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

◆ shutdown()

void MayaFlux::Portal::Graphics::ComputePress::shutdown ( )

Definition at line 36 of file ComputePress.cpp.

37{
38 if (!s_initialized) {
39 return;
40 }
41
44 "Cannot shutdown ComputePress: ShaderFoundry not initialized");
45 return;
46 }
47
48 auto device = m_shader_foundry->get_device();
49
50 if (!device) {
52 "Cannot shutdown ComputePress: Vulkan device is null");
53 return;
54 }
55
56 for (auto& [id, state] : m_pipelines) {
57 if (state.pipeline) {
58 state.pipeline->cleanup(device);
59 }
60
61 if (state.layout && device) {
62 device.destroyPipelineLayout(state.layout);
63 }
64 }
65
66 if (m_descriptor_manager && device) {
67 m_descriptor_manager->cleanup(device);
68 m_descriptor_manager = nullptr;
69 }
70
71 m_pipelines.clear();
72
73 s_initialized = false;
74
76 "ComputePress shutdown complete");
77}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
std::unordered_map< ComputePipelineID, PipelineState > m_pipelines
std::shared_ptr< Core::VKDescriptorManager > m_descriptor_manager
bool is_initialized() const
Check if compiler is initialized.
@ GPUCompute
GPU compute operations (shaders, GPGPU tasks)
@ Portal
High-level user-facing API layer.

References MayaFlux::Portal::Graphics::ShaderFoundry::get_device(), MayaFlux::Journal::GPUCompute, MayaFlux::Portal::Graphics::ShaderFoundry::is_initialized(), m_descriptor_manager, m_pipelines, m_shader_foundry, MF_ERROR, MF_INFO, MayaFlux::Journal::Portal, and s_initialized.

Referenced by MayaFlux::Portal::Graphics::shutdown().

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