|
Blender V4.3
|
#include <vk_vertex_buffer.hh>
Inherits blender::gpu::VertBuf.
Public Member Functions | |
| ~VKVertexBuffer () | |
| void | bind_as_ssbo (uint binding) override |
| void | bind_as_texture (uint binding) override |
| void | wrap_handle (uint64_t handle) override |
| void | update_sub (uint start, uint len, const void *data) override |
| void | read (void *data) const override |
| VkBuffer | vk_handle () const |
| VkBufferView | vk_buffer_view_get () const |
| void | device_format_ensure () |
| const GPUVertFormat & | device_format_get () const |
| void | ensure_updated () |
| void | ensure_buffer_view () |
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 () |
| VertBuf * | duplicate () |
| 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< T > | data () |
Protected Member Functions | |
| void | acquire_data () override |
| void | resize_data () override |
| void | release_data () override |
| void | upload_data () override |
| void | duplicate_data (VertBuf *dst) override |
Friends | |
| class | VKTexture |
Additional Inherited Members | |
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 | |
| uchar * | data_ = nullptr |
| GPUUsageType | usage_ = GPU_USAGE_STATIC |
Definition at line 18 of file vk_vertex_buffer.hh.
| blender::gpu::VKVertexBuffer::~VKVertexBuffer | ( | ) |
Definition at line 21 of file vk_vertex_buffer.cc.
References release_data().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 89 of file vk_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, GPU_USAGE_DEVICE_ONLY, MEM_mallocN, MEM_SAFE_FREE, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 26 of file vk_vertex_buffer.cc.
References blender::gpu::VKContext::get(), blender::gpu::VKStateManager::storage_buffer_bind(), and blender::gpu::BindSpaceStorageBuffers::VertexBuffer.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 33 of file vk_vertex_buffer.cc.
References blender::gpu::VKContext::get(), and blender::gpu::VKStateManager::texel_buffer_bind().
| void blender::gpu::VKVertexBuffer::device_format_ensure | ( | ) |
Definition at line 176 of file vk_vertex_buffer.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), blender::gpu::VertexFormatConverter::init(), blender::gpu::VertexFormatConverter::is_initialized(), and blender::gpu::VKDevice::workarounds_get().
Referenced by blender::gpu::VKVertexAttributeObject::update_bindings(), and upload_data().
| const GPUVertFormat & blender::gpu::VKVertexBuffer::device_format_get | ( | ) | const |
Definition at line 184 of file vk_vertex_buffer.cc.
References blender::gpu::VertexFormatConverter::device_format_get().
Referenced by blender::gpu::VKVertexAttributeObject::update_bindings().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 171 of file vk_vertex_buffer.cc.
References NOT_YET_IMPLEMENTED.
| void blender::gpu::VKVertexBuffer::ensure_buffer_view | ( | ) |
Definition at line 45 of file vk_vertex_buffer.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), blender::gpu::debug::object_label(), blender::gpu::VKBuffer::size_in_bytes(), blender::gpu::to_texture_format(), blender::gpu::to_vk_format(), VK_ALLOCATION_CALLBACKS, blender::gpu::VKBuffer::vk_handle(), and blender::gpu::VKDevice::vk_handle().
| void blender::gpu::VKVertexBuffer::ensure_updated | ( | ) |
Definition at line 40 of file vk_vertex_buffer.cc.
References upload_data().
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 76 of file vk_vertex_buffer.cc.
References blender::gpu::VKStagingBuffer::copy_from_device(), blender::gpu::VKStagingBuffer::DeviceToHost, blender::gpu::VKContext::get(), blender::gpu::VKStagingBuffer::host_buffer_get(), blender::gpu::VKBuffer::is_mapped(), and blender::gpu::VKBuffer::read().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 110 of file vk_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), MEM_SAFE_FREE, VK_ALLOCATION_CALLBACKS, and blender::gpu::VKDevice::vk_handle().
Referenced by ~VKVertexBuffer().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 101 of file vk_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, GPU_USAGE_DEVICE_ONLY, MEM_reallocN, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 71 of file vk_vertex_buffer.cc.
References NOT_YET_IMPLEMENTED.
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 144 of file vk_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, device_format_ensure(), ELEM, blender::gpu::VertBuf::flag, blender::gpu::VKContext::get(), GPU_USAGE_DYNAMIC, GPU_USAGE_STATIC, GPU_USAGE_STREAM, GPU_VERTBUF_DATA_DIRTY, GPU_VERTBUF_DATA_UPLOADED, blender::gpu::VKBuffer::is_allocated(), blender::gpu::VKBuffer::is_mapped(), MEM_SAFE_FREE, and blender::gpu::VertBuf::usage_.
Referenced by ensure_updated().
|
inline |
Definition at line 41 of file vk_vertex_buffer.hh.
References BLI_assert.
|
inline |
Definition at line 35 of file vk_vertex_buffer.hh.
References BLI_assert, blender::gpu::VKBuffer::is_allocated(), and blender::gpu::VKBuffer::vk_handle().
Referenced by blender::gpu::VKStorageBuffer::copy_sub().
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 66 of file vk_vertex_buffer.cc.
References NOT_YET_IMPLEMENTED.
|
friend |
Definition at line 66 of file vk_vertex_buffer.hh.