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

◆ destroy_pipeline()

void MayaFlux::Portal::Graphics::RenderFlow::destroy_pipeline ( RenderPipelineID  pipeline_id)

Destroy a graphics pipeline.

Parameters
pipeline_idPipeline ID to destroy

Definition at line 511 of file RenderFlow.cpp.

512{
513 auto it = m_pipelines.find(pipeline_id);
514 if (it == m_pipelines.end()) {
515 return;
516 }
517
518 auto device = m_shader_foundry->get_device();
519
520 if (it->second.pipeline) {
521 it->second.pipeline->cleanup(device);
522 }
523
524 if (it->second.layout) {
525 device.destroyPipelineLayout(it->second.layout);
526 }
527
528 for (auto layout : it->second.layouts) {
529 if (layout) {
530 device.destroyDescriptorSetLayout(layout);
531 }
532 }
533
534 m_pipelines.erase(it);
535
537 "Destroyed graphics pipeline (ID: {})", pipeline_id);
538}
#define MF_DEBUG(comp, ctx,...)
std::unordered_map< RenderPipelineID, PipelineState > m_pipelines
vk::Device get_device() const
Get logical device handle.
@ Rendering
GPU rendering operations (graphics pipeline, frame rendering)
@ Portal
High-level user-facing API layer.

References MayaFlux::Portal::Graphics::ShaderFoundry::get_device(), m_pipelines, m_shader_foundry, MF_DEBUG, MayaFlux::Journal::Portal, and MayaFlux::Journal::Rendering.

+ Here is the call graph for this function: