Blender V5.0
blender::gpu::MTLVertBuf Class Reference

#include <mtl_vertex_buffer.hh>

Inherits blender::gpu::VertBuf.

Public Member Functions

 MTLVertBuf ()
 ~MTLVertBuf () override
void bind ()
void flag_used ()
void update_sub (uint start, uint len, const void *data) override
void read (void *data) const override
void wrap_handle (uint64_t handle) override
Public Member Functions inherited from blender::gpu::VertBuf
 VertBuf ()
virtual ~VertBuf ()
void init (const GPUVertFormat &format, GPUUsageType usage)
void clear ()
void allocate (uint vert_len)
void resize (uint vert_len)
void upload ()
size_t size_alloc_get () const
size_t size_used_get () const
void reference_add ()
void reference_remove ()
GPUUsageType get_usage_type () const
template<typename T>
MutableSpan< Tdata ()

Protected Member Functions

void acquire_data () override
void resize_data () override
void release_data () override
void upload_data () override
void bind_as_ssbo (uint binding) override
void bind_as_texture (uint binding) override
 MEM_CXX_CLASS_ALLOC_FUNCS ("MTLVertBuf")

Friends

class gpu::MTLTexture
class MTLBatch
class MTLStorageBuf

Additional Inherited Members

Static Public Member Functions inherited from blender::gpu::VertBuf
template<typename FormatT>
static VertBufPtr from_size_with_format (const int size, GPUUsageType usage=GPU_USAGE_STATIC)
template<typename T>
static VertBufPtr from_size (const int size, GPUUsageType usage=GPU_USAGE_STATIC)
template<typename T>
static VertBufPtr from_span (const Span< T > data)
template<typename T>
static VertBufPtr from_varray (const VArray< T > &array)
template<typename T>
static VertBufPtr device_only (uint size)
Public Attributes inherited from blender::gpu::VertBuf
GPUVertFormat format = {}
uint vertex_len = 0
uint vertex_alloc = 0
GPUVertBufStatus flag = GPU_VERTBUF_INVALID
GPUUsageType extended_usage_ = GPU_USAGE_STATIC
Static Public Attributes inherited from blender::gpu::VertBuf
static size_t memory_usage = 0
Protected Attributes inherited from blender::gpu::VertBuf
uchardata_ = nullptr
GPUUsageType usage_ = GPU_USAGE_STATIC

Detailed Description

Definition at line 22 of file mtl_vertex_buffer.hh.

Constructor & Destructor Documentation

◆ MTLVertBuf()

blender::gpu::MTLVertBuf::MTLVertBuf ( )

Definition at line 14 of file mtl_vertex_buffer.mm.

References blender::gpu::VertBuf::VertBuf().

◆ ~MTLVertBuf()

blender::gpu::MTLVertBuf::~MTLVertBuf ( )
override

Definition at line 16 of file mtl_vertex_buffer.mm.

References release_data().

Member Function Documentation

◆ acquire_data()

void blender::gpu::MTLVertBuf::acquire_data ( )
overrideprotectedvirtual

◆ bind()

◆ bind_as_ssbo()

void blender::gpu::MTLVertBuf::bind_as_ssbo ( uint binding)
overrideprotectedvirtual

Implements blender::gpu::VertBuf.

Definition at line 243 of file mtl_vertex_buffer.mm.

References bind(), ceil_to_multiple_u(), flag_used(), and MTLStorageBuf.

◆ bind_as_texture()

void blender::gpu::MTLVertBuf::bind_as_texture ( uint binding)
overrideprotectedvirtual

◆ flag_used()

void blender::gpu::MTLVertBuf::flag_used ( )

◆ MEM_CXX_CLASS_ALLOC_FUNCS()

blender::gpu::MTLVertBuf::MEM_CXX_CLASS_ALLOC_FUNCS ( "MTLVertBuf" )
protected

◆ read()

◆ release_data()

void blender::gpu::MTLVertBuf::release_data ( )
overrideprotectedvirtual

Implements blender::gpu::VertBuf.

Definition at line 43 of file mtl_vertex_buffer.mm.

References blender::gpu::VertBuf::data_, GPU_TEXTURE_FREE_SAFE, and MEM_SAFE_FREE.

Referenced by ~MTLVertBuf().

◆ resize_data()

void blender::gpu::MTLVertBuf::resize_data ( )
overrideprotectedvirtual

◆ update_sub()

◆ upload_data()

void blender::gpu::MTLVertBuf::upload_data ( )
overrideprotectedvirtual

Implements blender::gpu::VertBuf.

Definition at line 61 of file mtl_vertex_buffer.mm.

References bind().

◆ wrap_handle()

void blender::gpu::MTLVertBuf::wrap_handle ( uint64_t handle)
overridevirtual

◆ gpu::MTLTexture

friend class gpu::MTLTexture
friend

Definition at line 23 of file mtl_vertex_buffer.hh.

◆ MTLBatch

friend class MTLBatch
friend

Definition at line 24 of file mtl_vertex_buffer.hh.

References MTLBatch.

Referenced by MTLBatch.

◆ MTLStorageBuf

friend class MTLStorageBuf
friend

Definition at line 25 of file mtl_vertex_buffer.hh.

References MTLStorageBuf.

Referenced by bind_as_ssbo(), and MTLStorageBuf.


The documentation for this class was generated from the following files: