|
Blender V5.0
|
#include <gpu_uniform_buffer_private.hh>
Inherited by blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Public Member Functions | |
| UniformBuf (size_t size, const char *name) | |
| virtual | ~UniformBuf () |
| virtual void | update (const void *data)=0 |
| virtual void | clear_to_zero ()=0 |
| virtual void | bind (int slot)=0 |
| virtual void | bind_as_ssbo (int slot)=0 |
| virtual void | unbind ()=0 |
| void | attach_data (void *data) |
Protected Attributes | |
| size_t | size_in_bytes_ |
| void * | data_ = nullptr |
| char | name_ [DEBUG_NAME_LEN] |
Implementation of Uniform Buffers. Base class which is then specialized for each implementation (GL, VK, ...).
Definition at line 25 of file gpu_uniform_buffer_private.hh.
| blender::gpu::UniformBuf::UniformBuf | ( | size_t | size, |
| const char * | name ) |
Definition at line 35 of file gpu_uniform_buffer.cc.
References BLI_assert, name, name_, size(), size_in_bytes_, and STRNCPY().
Referenced by blender::gpu::GLUniformBuf::GLUniformBuf(), blender::gpu::MTLUniformBuf::MTLUniformBuf(), and blender::gpu::VKUniformBuffer::VKUniformBuffer().
|
virtual |
Definition at line 45 of file gpu_uniform_buffer.cc.
References data_, and MEM_SAFE_FREE.
|
inline |
Used to defer data upload at drawing time. This is useful if the thread has no context bound. This transfers ownership to this UniformBuf.
Definition at line 47 of file gpu_uniform_buffer_private.hh.
Referenced by GPU_uniformbuf_create_from_list().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Referenced by GPU_uniformbuf_bind().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Referenced by GPU_uniformbuf_bind_as_ssbo().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Referenced by GPU_uniformbuf_clear_to_zero().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
Referenced by GPU_uniformbuf_unbind().
|
pure virtual |
Implemented in blender::gpu::GLUniformBuf, blender::gpu::MTLUniformBuf, and blender::gpu::VKUniformBuffer.
References data.
Referenced by GPU_uniformbuf_create_ex(), and GPU_uniformbuf_update().
|
protected |
Continuous memory block to copy to GPU. This data is owned by the UniformBuf.
Definition at line 30 of file gpu_uniform_buffer_private.hh.
Referenced by attach_data(), blender::gpu::GLUniformBuf::bind(), blender::gpu::MTLUniformBuf::bind(), blender::gpu::GLUniformBuf::bind_as_ssbo(), blender::gpu::MTLUniformBuf::bind_as_ssbo(), blender::gpu::VKUniformBuffer::ensure_updated(), and ~UniformBuf().
|
protected |
Debugging name
Definition at line 32 of file gpu_uniform_buffer_private.hh.
Referenced by blender::gpu::GLUniformBuf::bind(), blender::gpu::VKUniformBuffer::ensure_updated(), blender::gpu::MTLUniformBuf::get_name(), UniformBuf(), and blender::gpu::MTLUniformBuf::update().
|
protected |
Data size in bytes.
Definition at line 28 of file gpu_uniform_buffer_private.hh.
Referenced by blender::gpu::MTLUniformBuf::bind_as_ssbo(), blender::gpu::MTLUniformBuf::clear_to_zero(), blender::gpu::MTLUniformBuf::get_size(), blender::gpu::VKUniformBuffer::size_in_bytes(), UniformBuf(), blender::gpu::GLUniformBuf::update(), blender::gpu::MTLUniformBuf::update(), and blender::gpu::VKUniformBuffer::update().