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

◆ cleanup()

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

Definition at line 200 of file GpuResourceManager.cpp.

201{
202 if (!m_ready) {
203 return;
204 }
205
206 auto& foundry = Portal::Graphics::get_shader_foundry();
207 auto& compute_press = Portal::Graphics::get_compute_press();
208 auto device = foundry.get_device();
209
210 if (m_impl) {
211 for (auto& slot : m_impl->buffers) {
212 free_slot(device, slot);
213 }
214 }
215 m_impl.reset();
216 m_buffer_slots.clear();
217 m_image_slots.clear();
218
220 compute_press.destroy_pipeline(m_pipeline_id);
222 }
223
225 foundry.destroy_shader(m_shader_id);
227 }
228
229 m_descriptor_set_ids.clear();
230 m_ready = false;
231}
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: