Blender  V3.3
Public Member Functions | Protected Attributes | List of all members
blender::gpu::StorageBuf Class Referenceabstract

#include <gpu_storage_buffer_private.hh>

Inheritance diagram for blender::gpu::StorageBuf:
blender::gpu::GLStorageBuf

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 (eGPUTextureFormat internal_format, eGPUDataFormat data_format, void *data)=0
 
virtual void copy_sub (VertBuf *src, uint dst_offset, uint src_offset, uint copy_size)=0
 

Protected Attributes

size_t size_in_bytes_
 
voiddata_ = 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 27 of file gpu_storage_buffer_private.hh.

Constructor & Destructor Documentation

◆ StorageBuf()

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

Definition at line 29 of file gpu_storage_buffer.cc.

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

◆ ~StorageBuf()

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

Definition at line 39 of file gpu_storage_buffer.cc.

References data_, and MEM_SAFE_FREE.

Member Function Documentation

◆ bind()

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

Implemented in blender::gpu::GLStorageBuf.

◆ clear()

virtual void blender::gpu::StorageBuf::clear ( eGPUTextureFormat  internal_format,
eGPUDataFormat  data_format,
void data 
)
pure virtual

Implemented in blender::gpu::GLStorageBuf.

◆ copy_sub()

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

Implemented in blender::gpu::GLStorageBuf.

◆ unbind()

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

Implemented in blender::gpu::GLStorageBuf.

◆ 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 32 of file gpu_storage_buffer_private.hh.

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

◆ name_

char blender::gpu::StorageBuf::name_[DEBUG_NAME_LEN]
protected

Debugging name

Definition at line 34 of file gpu_storage_buffer_private.hh.

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

◆ size_in_bytes_

size_t blender::gpu::StorageBuf::size_in_bytes_
protected

Data size in bytes.

Definition at line 30 of file gpu_storage_buffer_private.hh.

Referenced by StorageBuf(), and blender::gpu::GLStorageBuf::update().


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