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

◆ cleanup()

void MayaFlux::Core::VKDescriptorManager::cleanup ( vk::Device  device)

Cleanup all descriptor resources.

Parameters
deviceLogical device (must match initialization)

Destroys all pools and layouts. Safe to call multiple times.

Definition at line 87 of file VKDescriptorManager.cpp.

88{
89 if (!device) {
91 "cleanup() called with null device");
92 return;
93 }
94
95 for (auto layout : m_layouts) {
96 if (layout) {
97 device.destroyDescriptorSetLayout(layout);
98 }
99 }
100 m_layouts.clear();
101 m_layout_cache.clear();
102
103 for (auto pool : m_pools) {
104 if (pool) {
105 device.destroyDescriptorPool(pool);
106 }
107 }
108 m_pools.clear();
109
112 m_pool_capacity = 0;
113 m_device = nullptr;
114
116 "Descriptor manager cleaned up");
117}
#define MF_WARN(comp, ctx,...)
#define MF_DEBUG(comp, ctx,...)
uint32_t m_allocated_count
Total allocated sets.
std::unordered_map< size_t, size_t > m_layout_cache
uint32_t m_pool_capacity
Total capacity across all pools.
std::vector< vk::DescriptorPool > m_pools
std::vector< vk::DescriptorSetLayout > m_layouts
@ GraphicsBackend
Graphics/visual rendering backend (Vulkan, OpenGL)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::GraphicsBackend, m_allocated_count, m_current_pool_index, m_device, m_layout_cache, m_layouts, m_pool_capacity, m_pools, MF_DEBUG, and MF_WARN.