Blender V5.3
blender::gpu::VKBufferPool Class Reference

A pool of VkBuffers. More...

#include <vk_buffer_pool.hh>

Public Member Functions

 VKBufferPool (VKBufferPool &&other)=default
 VKBufferPool (StringRefNull name, VkDeviceSize default_buffer_size, VkDeviceSize alignment, VkBufferUsageFlags vk_buffer_usage, VmaMemoryUsage vma_memory_usage, VmaAllocationCreateFlags vma_allocation_create_flags, float priority=1.0f)
virtual ~VKBufferPool ()
VKBufferWithOffset append (Span< uint8_t > data)
 Append the given data.
void ensure_uploaded ()
 Ensure that all the data is uploaded.
void discard ()
 Discard the current buffers to the discard pool.

Detailed Description

A pool of VkBuffers.

Definition at line 20 of file vk_buffer_pool.hh.

Constructor & Destructor Documentation

◆ VKBufferPool() [1/2]

blender::gpu::VKBufferPool::VKBufferPool ( VKBufferPool && other)
default

References VKBufferPool().

Referenced by VKBufferPool().

◆ VKBufferPool() [2/2]

blender::gpu::VKBufferPool::VKBufferPool ( StringRefNull name,
VkDeviceSize default_buffer_size,
VkDeviceSize alignment,
VkBufferUsageFlags vk_buffer_usage,
VmaMemoryUsage vma_memory_usage,
VmaAllocationCreateFlags vma_allocation_create_flags,
float priority = 1.0f )
inline

Definition at line 37 of file vk_buffer_pool.hh.

◆ ~VKBufferPool()

blender::gpu::VKBufferPool::~VKBufferPool ( )
virtual

Definition at line 20 of file vk_buffer_pool.cc.

References blender::BLI_assert().

Member Function Documentation

◆ append()

VKBufferWithOffset blender::gpu::VKBufferPool::append ( Span< uint8_t > data)

Append the given data.

Returns
the buffer handle and offset in the buffer where the data is stored.
Note
data might not be available in the buffer yet. Use ensure_uploaded to ensure that all data is available by the GPU.

Definition at line 25 of file vk_buffer_pool.cc.

References blender::ceil_to_multiple_ul(), blender::data, blender::IndexRange::from_begin_size(), blender::gpu::debug::object_label(), and blender::result.

◆ discard()

void blender::gpu::VKBufferPool::discard ( )

Discard the current buffers to the discard pool.

Definition at line 71 of file vk_buffer_pool.cc.

Referenced by blender::gpu::VKContext::flush_render_graph().

◆ ensure_uploaded()

void blender::gpu::VKBufferPool::ensure_uploaded ( )

Ensure that all the data is uploaded.

Definition at line 64 of file vk_buffer_pool.cc.

Referenced by blender::gpu::VKContext::flush_render_graph().


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