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

◆ cleanup()

void MayaFlux::Yantra::GpuResourceManager::cleanup ( )

Definition at line 159 of file GpuResourceManager.cpp.

160{
161 if (!m_ready) {
162 return;
163 }
164
165 auto& foundry = Portal::Graphics::get_shader_foundry();
166 auto& compute_press = Portal::Graphics::get_compute_press();
167 auto device = foundry.get_device();
168
169 if (m_impl) {
170 for (auto& slot : m_impl->buffers) {
171 free_slot(device, slot);
172 }
173 }
174 m_impl.reset();
175 m_buffer_slots.clear();
176 m_image_slots.clear();
177
179 compute_press.destroy_pipeline(m_pipeline_id);
181 }
182
184 foundry.destroy_shader(m_shader_id);
186 }
187
188 m_descriptor_set_ids.clear();
189 m_ready = false;
190}
Portal::Graphics::ComputePipelineID m_pipeline_id
std::vector< std::shared_ptr< Core::VKImage > > m_image_slots
std::vector< Portal::Graphics::DescriptorSetID > m_descriptor_set_ids
std::unique_ptr< GpuResourceManagerImpl > m_impl
constexpr ShaderID INVALID_SHADER
MAYAFLUX_API ShaderFoundry & get_shader_foundry()
Get the global shader compiler instance.
constexpr ComputePipelineID INVALID_COMPUTE_PIPELINE
MAYAFLUX_API ComputePress & get_compute_press()

References MayaFlux::Portal::Graphics::get_compute_press(), MayaFlux::Portal::Graphics::get_shader_foundry(), MayaFlux::Portal::Graphics::INVALID_COMPUTE_PIPELINE, MayaFlux::Portal::Graphics::INVALID_SHADER, m_buffer_slots, m_descriptor_set_ids, m_image_slots, m_impl, m_pipeline_id, m_ready, and m_shader_id.

Referenced by ~GpuResourceManager().

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