|
Blender V5.0
|
#include <vk_uniform_buffer.hh>
Inherits blender::gpu::UniformBuf, and blender::NonCopyable.
Public Member Functions | |
| VKUniformBuffer (size_t size, const char *name) | |
| void | update (const void *data) override |
| void | clear_to_zero () override |
| void | bind (int slot) override |
| void | bind_as_ssbo (int slot) override |
| void | unbind () override |
| VkBuffer | vk_handle () const |
| VkDeviceAddress | device_address_get () const |
| size_t | size_in_bytes () const |
| void | ensure_updated () |
| void | reset_data_uploaded () |
| Public Member Functions inherited from blender::gpu::UniformBuf | |
| UniformBuf (size_t size, const char *name) | |
| virtual | ~UniformBuf () |
| void | attach_data (void *data) |
Additional Inherited Members | |
| Protected Attributes inherited from blender::gpu::UniformBuf | |
| size_t | size_in_bytes_ |
| void * | data_ = nullptr |
| char | name_ [DEBUG_NAME_LEN] |
Definition at line 19 of file vk_uniform_buffer.hh.
|
inline |
Definition at line 29 of file vk_uniform_buffer.hh.
References name, size(), and blender::gpu::UniformBuf::UniformBuf().
|
overridevirtual |
Implements blender::gpu::UniformBuf.
Definition at line 86 of file vk_uniform_buffer.cc.
References blender::gpu::VKContext::get().
|
overridevirtual |
Implements blender::gpu::UniformBuf.
Definition at line 92 of file vk_uniform_buffer.cc.
References blender::gpu::VKContext::get(), and blender::gpu::BindSpaceStorageBuffers::UniformBuffer.
|
overridevirtual |
Implements blender::gpu::UniformBuf.
Definition at line 48 of file vk_uniform_buffer.cc.
References blender::gpu::VKContext::get().
|
inline |
Definition at line 45 of file vk_uniform_buffer.hh.
| void blender::gpu::VKUniformBuffer::ensure_updated | ( | ) |
Definition at line 58 of file vk_uniform_buffer.cc.
References CLOG_ERROR, blender::gpu::UniformBuf::data_, blender::gpu::VKContext::get(), blender::gpu::LOG, MEM_freeN(), and blender::gpu::UniformBuf::name_.
|
inline |
Reset data uploaded flag. When the resource is sure it isn't used, the caller can call reset_data_uploaded so the next update can use ReBAR when available.
Definition at line 61 of file vk_uniform_buffer.hh.
|
inline |
Definition at line 50 of file vk_uniform_buffer.hh.
References blender::gpu::UniformBuf::size_in_bytes_.
|
overridevirtual |
Unbind uniform buffer from active context.
Implements blender::gpu::UniformBuf.
Definition at line 99 of file vk_uniform_buffer.cc.
References blender::gpu::VKContext::get(), blender::gpu::VKStateManager::storage_buffer_unbind(), and blender::gpu::VKStateManager::uniform_buffer_unbind().
|
overridevirtual |
Implements blender::gpu::UniformBuf.
Definition at line 22 of file vk_uniform_buffer.cc.
References data, blender::gpu::VKContext::get(), MEM_mallocN(), and blender::gpu::UniformBuf::size_in_bytes_.
|
inline |
Definition at line 41 of file vk_uniform_buffer.hh.