|
Blender V4.5
|
#include <vk_descriptor_pools.hh>
Public Member Functions | |
| VKDescriptorPools () | |
| ~VKDescriptorPools () | |
| void | init (const VKDevice &vk_device) |
| VkDescriptorSet | allocate (const VkDescriptorSetLayout descriptor_set_layout) |
| void | discard (VKContext &vk_context) |
List of VkDescriptorPools.
In Vulkan a pool is constructed with a fixed size per resource type. When more resources are needed it a next pool should be created. VKDescriptorPools will keep track of those pools and construct new pools when the previous one is exhausted.
At the beginning of a new frame the descriptor pools are reset. This will start allocating again from the first descriptor pool in order to use freed space from previous pools.
Definition at line 28 of file vk_descriptor_pools.hh.
| blender::gpu::VKDescriptorPools::VKDescriptorPools | ( | ) |
Definition at line 15 of file vk_descriptor_pools.cc.
| blender::gpu::VKDescriptorPools::~VKDescriptorPools | ( | ) |
Definition at line 17 of file vk_descriptor_pools.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKBackend::get(), and blender::gpu::VKDevice::vk_handle().
| VkDescriptorSet blender::gpu::VKDescriptorPools::allocate | ( | const VkDescriptorSetLayout | descriptor_set_layout | ) |
Definition at line 88 of file vk_descriptor_pools.cc.
References allocate(), BLI_assert, blender::gpu::VKBackend::device, ELEM, blender::gpu::VKBackend::get(), result, and blender::gpu::VKDevice::vk_handle().
Referenced by allocate().
| void blender::gpu::VKDescriptorPools::discard | ( | VKContext & | vk_context | ) |
Discard all existing pools and re-initializes this instance.
This is a fix to ensure that resources will not be rewritten. Eventually we should discard the resource pools for reuse.
Definition at line 31 of file vk_descriptor_pools.cc.
References blender::gpu::VKBackend::device, blender::gpu::VKDiscardPool::discard_descriptor_pool(), and blender::gpu::VKBackend::get().
Referenced by blender::gpu::VKContext::flush_render_graph().
| void blender::gpu::VKDescriptorPools::init | ( | const VKDevice & | vk_device | ) |
Definition at line 25 of file vk_descriptor_pools.cc.
References BLI_assert.