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

◆ cleanup()

void MayaFlux::Buffers::RenderProcessor::cleanup ( )
overrideprotectedvirtual

Reimplemented from MayaFlux::Buffers::ShaderProcessor.

Definition at line 1042 of file RenderProcessor.cpp.

1043{
1044 auto& foundry = Portal::Graphics::get_shader_foundry();
1045 auto& flow = Portal::Graphics::get_render_flow();
1046
1048 flow.destroy_pipeline(m_pipeline_id);
1050 }
1051
1052 for (const auto& retired : m_retired) {
1053 flow.destroy_pipeline(retired.pipeline);
1054 }
1055 m_retired.clear();
1056
1058 foundry.destroy_shader(m_geometry_shader_id);
1060 }
1061
1063 foundry.destroy_shader(m_tess_control_shader_id);
1065 }
1066
1068 foundry.destroy_shader(m_tess_eval_shader_id);
1070 }
1071
1073 foundry.destroy_shader(m_fragment_shader_id);
1075 }
1076
1077 for (auto& [buffer, state] : m_buffer_info) {
1078 state.geometry_prepared = false;
1079 state.draw_source.reset();
1080 state.mill.reset();
1081 state.first_vertex = 0;
1082 state.vertex_count = 0;
1083 state.index_count = 0;
1084 }
1086 m_runs.clear();
1087
1088 m_render_transform_ubo.reset();
1091
1092 if (m_target_window) {
1093 flow.unregister_window(m_target_window);
1094 m_target_window.reset();
1095 }
1096
1098
1100 "RenderProcessor cleanup complete");
1101}
#define MF_DEBUG(comp, ctx,...)
std::shared_ptr< NetworkGeometryBuffer > buffer
Portal::Graphics::ShaderID m_fragment_shader_id
Portal::Graphics::ShaderID m_geometry_shader_id
std::vector< Portal::Graphics::DrawRun > m_runs
Portal::Graphics::RenderPipelineID m_pipeline_id
Portal::Graphics::ShaderID m_tess_control_shader_id
Portal::Graphics::DescriptorSetID m_render_transform_descriptor_set_id
std::unordered_map< std::shared_ptr< VKBuffer >, BufferState > m_buffer_info
std::vector< RetiredPipeline > m_retired
std::shared_ptr< Core::Window > m_target_window
Portal::Graphics::ShaderID m_tess_eval_shader_id
std::shared_ptr< VKBuffer > m_render_transform_ubo
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
constexpr RenderPipelineID INVALID_RENDER_PIPELINE
constexpr ShaderID INVALID_SHADER
MAYAFLUX_API RenderFlow & get_render_flow()
Get the global render flow instance.
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
constexpr DescriptorSetID INVALID_DESCRIPTOR_SET

References buffer, MayaFlux::Journal::BufferProcessing, MayaFlux::Journal::Buffers, MayaFlux::Portal::Graphics::get_render_flow(), MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Portal::Graphics::INVALID_DESCRIPTOR_SET, MayaFlux::Portal::Graphics::INVALID_RENDER_PIPELINE, MayaFlux::Portal::Graphics::INVALID_SHADER, and MF_DEBUG.

+ Here is the call graph for this function: