|
Blender V5.0
|
#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 |
| VkDeviceAddress | device_address_get () const |
| VkBufferView | vk_buffer_view_get () const |
| void | ensure_updated () |
| void | ensure_buffer_view () |
| VkFormat | to_vk_format () |
| 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 () |
| 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 |
Friends | |
| class | VKTexture |
Additional Inherited Members | |
| Static Public Member Functions inherited from blender::gpu::VertBuf | |
| template<typename FormatT> | |
| static VertBufPtr | from_size_with_format (const int size, GPUUsageType usage=GPU_USAGE_STATIC) |
| template<typename T> | |
| static VertBufPtr | from_size (const int size, GPUUsageType usage=GPU_USAGE_STATIC) |
| template<typename T> | |
| static VertBufPtr | from_span (const Span< T > data) |
| template<typename T> | |
| static VertBufPtr | from_varray (const VArray< T > &array) |
| template<typename T> | |
| static VertBufPtr | device_only (uint size) |
| 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 19 of file vk_vertex_buffer.hh.
| blender::gpu::VKVertexBuffer::~VKVertexBuffer | ( | ) |
Definition at line 24 of file vk_vertex_buffer.cc.
References release_data().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 115 of file vk_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, GPU_USAGE_DEVICE_ONLY, MEM_malloc_arrayN(), MEM_SAFE_FREE, blender::gpu::VertBuf::size_alloc_get(), and blender::gpu::VertBuf::usage_.
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 29 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 36 of file vk_vertex_buffer.cc.
References blender::gpu::VKContext::get(), and blender::gpu::VKStateManager::texel_buffer_bind().
|
inline |
Definition at line 41 of file vk_vertex_buffer.hh.
Referenced by blender::gpu::VKDescriptorBufferUpdator::bind_texel_buffer().
| void blender::gpu::VKVertexBuffer::ensure_buffer_view | ( | ) |
Definition at line 48 of file vk_vertex_buffer.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), blender::gpu::debug::object_label(), to_vk_format(), and blender::gpu::VKDevice::vk_handle().
Referenced by blender::gpu::VKDescriptorSetPoolUpdator::bind_texel_buffer().
| void blender::gpu::VKVertexBuffer::ensure_updated | ( | ) |
Definition at line 43 of file vk_vertex_buffer.cc.
References upload_data().
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 90 of file vk_vertex_buffer.cc.
References CLOG_ERROR, blender::gpu::VKStagingBuffer::copy_from_device(), blender::gpu::VertBuf::data(), blender::gpu::VKStagingBuffer::DeviceToHost, blender::gpu::VKContext::get(), blender::gpu::VKStagingBuffer::host_buffer_get(), blender::gpu::VKBuffer::is_mapped(), blender::gpu::LOG, and blender::gpu::VKBuffer::read().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 136 of file vk_vertex_buffer.cc.
References blender::gpu::VertBuf::data_, blender::gpu::VKDiscardPool::discard_buffer_view(), blender::gpu::VKDiscardPool::discard_pool_get(), and MEM_SAFE_FREE.
Referenced by ~VKVertexBuffer().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 127 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_.
|
inline |
Definition at line 55 of file vk_vertex_buffer.hh.
References blender::gpu::VertBuf::format, blender::gpu::to_texture_format(), and blender::gpu::to_vk_format().
Referenced by blender::gpu::VKDescriptorBufferUpdator::bind_texel_buffer(), and ensure_buffer_view().
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 70 of file vk_vertex_buffer.cc.
References BLI_assert_msg, blender::gpu::VKStagingBuffer::copy_to_device(), blender::gpu::VertBuf::data(), blender::gpu::VKContext::get(), blender::gpu::VKStagingBuffer::host_buffer_get(), blender::gpu::VKStagingBuffer::HostToDevice, and blender::gpu::VKBuffer::mapped_memory_get().
|
overrideprotectedvirtual |
Implements blender::gpu::VertBuf.
Definition at line 169 of file vk_vertex_buffer.cc.
References CLOG_ERROR, blender::gpu::VertBuf::data_, 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::LOG, MEM_SAFE_FREE, and blender::gpu::VertBuf::usage_.
Referenced by ensure_updated().
|
inline |
Definition at line 46 of file vk_vertex_buffer.hh.
References BLI_assert.
Referenced by blender::gpu::VKDescriptorSetPoolUpdator::bind_texel_buffer().
|
inline |
Definition at line 36 of file vk_vertex_buffer.hh.
Referenced by blender::gpu::VKStorageBuffer::copy_sub().
|
overridevirtual |
Implements blender::gpu::VertBuf.
Definition at line 65 of file vk_vertex_buffer.cc.
References NOT_YET_IMPLEMENTED.
|
friend |