MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ initialize()

bool MayaFlux::Core::VKDescriptorManager::initialize ( vk::Device  device,
uint32_t  initial_pool_size = 1024 
)

Initialize descriptor manager.

Parameters
deviceLogical device
initial_pool_sizeNumber of descriptor sets per pool
Returns
true if initialization succeeded

Creates initial descriptor pool. More pools are allocated on-demand when the current pool is exhausted.

Definition at line 58 of file VKDescriptorManager.cpp.

59{
60 if (!device) {
62 "Cannot initialize descriptor manager with null device");
63 return false;
64 }
65
66 m_device = device;
67 m_pool_size = initial_pool_size;
68
69 auto pool = create_pool(device, m_pool_size);
70 if (!pool) {
72 "Failed to create initial descriptor pool");
73 return false;
74 }
75
76 m_pools.push_back(pool);
80
82 "Descriptor manager initialized (pool size: {} sets)", m_pool_size);
83
84 return true;
85}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
uint32_t m_allocated_count
Total allocated sets.
uint32_t m_pool_capacity
Total capacity across all pools.
vk::DescriptorPool create_pool(vk::Device device, uint32_t max_sets)
Create a new descriptor pool.
std::vector< vk::DescriptorPool > m_pools
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, create_pool(), MayaFlux::Journal::GraphicsBackend, m_allocated_count, m_current_pool_index, m_device, m_pool_capacity, m_pool_size, m_pools, MF_ERROR, and MF_INFO.

+ Here is the call graph for this function: