MayaFlux 0.5.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 872 of file ShaderFoundry.cpp.

873{
874 if (!m_backend || !s_initialized) {
875 return;
876 }
877
878 auto& cmd_manager = m_backend->get_command_manager();
879 auto device = get_device();
880 device.waitIdle();
881
882 for (auto& [id, state] : m_command_buffers) {
883 if (state.is_active) {
884 cmd_manager.free_command_buffer(state.cmd);
885 }
886 if (state.timestamp_pool) {
887 device.destroyQueryPool(state.timestamp_pool);
888 }
889 }
890 m_command_buffers.clear();
891
893 "Freed all command buffers");
894}
#define MF_INFO(comp, ctx,...)
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 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: