Blender V4.3
blender::gpu::StorageBuf Class Referenceabstract

#include <gpu_storage_buffer_private.hh>

Inherited by blender::gpu::GLStorageBuf, blender::gpu::MTLStorageBuf, and blender::gpu::VKStorageBuffer.

Public Member Functions

 StorageBuf (size_t size, const char *name)
 
virtual ~StorageBuf ()
 
virtual void update (const void *data)=0
 
virtual void bind (int slot)=0
 
virtual void unbind ()=0
 
virtual void clear (uint32_t clear_value)=0
 
virtual void copy_sub (VertBuf *src, uint dst_offset, uint src_offset, uint copy_size)=0
 
virtual void read (void *data)=0
 
virtual void async_flush_to_host ()=0
 
virtual void sync_as_indirect_buffer ()=0
 

Protected Attributes

size_t size_in_bytes_
 
void * data_ = nullptr
 
char name_ [DEBUG_NAME_LEN]
 

Detailed Description

Implementation of Storage Buffers. Base class which is then specialized for each implementation (GL, VK, ...).

Definition at line 31 of file gpu_storage_buffer_private.hh.

Constructor & Destructor Documentation

◆ StorageBuf()

blender::gpu::StorageBuf::StorageBuf ( size_t size,
const char * name )

Definition at line 31 of file gpu_storage_buffer.cc.

References BLI_assert, name_, size(), size_in_bytes_, and STRNCPY.

◆ ~StorageBuf()

blender::gpu::StorageBuf::~StorageBuf ( )
virtual

Definition at line 41 of file gpu_storage_buffer.cc.

References data_, and MEM_SAFE_FREE.

Member Function Documentation

◆ async_flush_to_host()

virtual void blender::gpu::StorageBuf::async_flush_to_host ( )
pure virtual

◆ bind()

virtual void blender::gpu::StorageBuf::bind ( int slot)
pure virtual

◆ clear()

virtual void blender::gpu::StorageBuf::clear ( uint32_t clear_value)
pure virtual

◆ copy_sub()

virtual void blender::gpu::StorageBuf::copy_sub ( VertBuf * src,
uint dst_offset,
uint src_offset,
uint copy_size )
pure virtual

◆ read()

virtual void blender::gpu::StorageBuf::read ( void * data)
pure virtual

◆ sync_as_indirect_buffer()

virtual void blender::gpu::StorageBuf::sync_as_indirect_buffer ( )
pure virtual

◆ unbind()

virtual void blender::gpu::StorageBuf::unbind ( )
pure virtual

◆ update()

virtual void blender::gpu::StorageBuf::update ( const void * data)
pure virtual

Member Data Documentation

◆ data_

void* blender::gpu::StorageBuf::data_ = nullptr
protected

Continuous memory block to copy to GPU. This data is owned by the StorageBuf.

Definition at line 36 of file gpu_storage_buffer_private.hh.

Referenced by blender::gpu::GLStorageBuf::bind(), blender::gpu::MTLStorageBuf::bind(), blender::gpu::MTLStorageBuf::get_metal_buffer(), and ~StorageBuf().

◆ name_

◆ size_in_bytes_


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