MayaFlux 0.4.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 792 of file ShaderFoundry.cpp.

793{
794 if (!m_backend || !s_initialized) {
795 return;
796 }
797
798 auto& cmd_manager = m_backend->get_command_manager();
799 auto device = get_device();
800 device.waitIdle();
801
802 for (auto& [id, state] : m_command_buffers) {
803 if (state.is_active) {
804 cmd_manager.free_command_buffer(state.cmd);
805 }
806 if (state.timestamp_pool) {
807 device.destroyQueryPool(state.timestamp_pool);
808 }
809 }
810 m_command_buffers.clear();
811
813 "Freed all command buffers");
814}
#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: