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

◆ free_all_command_buffers()

void MayaFlux::Portal::Graphics::ShaderFoundry::free_all_command_buffers ( )

Free all allocated command buffers.

Definition at line 1018 of file ShaderFoundry.cpp.

1019{
1020 if (!m_backend || !s_initialized) {
1021 return;
1022 }
1023
1024 auto& cmd_manager = m_backend->get_command_manager();
1025 auto device = get_device();
1026 device.waitIdle();
1027
1028 for (auto& [id, state] : m_command_buffers) {
1029 if (state.is_active) {
1030 cmd_manager.free_command_buffer(state.cmd);
1031 }
1032 if (state.timestamp_pool) {
1033 device.destroyQueryPool(state.timestamp_pool);
1034 }
1035 }
1036 m_command_buffers.clear();
1037
1039 "Freed all command buffers");
1040}
#define MF_INFO(comp, ctx,...)
vk::PhysicalDevice device
Definition VKDevice.cpp:121
vk::Device get_device() const
Get logical device handle.
std::unordered_map< CommandBufferID, CommandBufferState > m_command_buffers
std::shared_ptr< Core::VulkanBackend > m_backend
@ ShaderCompilation
Shader compilation tasks (Portal::Graphics::ShaderCompiler)
@ Portal
High-level user-facing API layer.

References device, get_device(), m_backend, m_command_buffers, MF_INFO, MayaFlux::Journal::Portal, s_initialized, and MayaFlux::Journal::ShaderCompilation.

Referenced by shutdown(), and stop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: