This commit is contained in:
Robert Beckebans 2022-11-03 18:54:38 +01:00
parent 3d3658384d
commit 600e50ad50
4 changed files with 12 additions and 12 deletions

View file

@ -200,14 +200,14 @@ void idRenderBackend::Init()
void idRenderBackend::Shutdown()
{
// SRS - Clean up NVRHI resources before Sys_Quit(), otherwise non-zero exit code (destructors too late)
// Clear all cached pipeline data
tr.backend.ClearCaches();
pipelineCache.Shutdown();
// Delete all renderpass resources
commonPasses.Shutdown();
// Delete current binding sets
for( int i = 0; i < currentBindingSets.Num(); i++ )
{
@ -219,13 +219,13 @@ void idRenderBackend::Shutdown()
// Delete renderlog command buffer and timer query resources
renderLog.Shutdown();
// Delete command list
commandList.Reset();
// Delete immediate mode buffer objects
fhImmediateMode::Shutdown();
#if defined( VULKAN_USE_PLATFORM_SDL )
VKimp_Shutdown();
#else

View file

@ -182,7 +182,7 @@ void CommonRenderPasses::Shutdown()
// SRS - Delete the pipelines referenced by the blit cache
for( auto& [key, pipeline] : m_BlitPsoCache )
{
pipeline.Reset();
pipeline.Reset();
}
// SRS - These assets have automatic resource management with overloaded = operator
@ -209,7 +209,7 @@ void CommonRenderPasses::Shutdown()
m_AnisotropicClampEdgeSampler = nullptr;
m_BlitBindingLayout = nullptr;
// SRS - Remove reference to nvrhi::IDevice, otherwise won't clean up properly on shutdown
m_Device = nullptr;
}

View file

@ -769,7 +769,7 @@ idRenderProgManager::Shutdown()
void idRenderProgManager::Shutdown()
{
KillAllShaders();
#if defined( USE_NVRHI )
// SRS - Delete renderprogs builtin binding layouts
for( int i = 0; i < renderProgs.Num(); i++ )
@ -779,7 +779,7 @@ void idRenderProgManager::Shutdown()
renderProgs[i].bindingLayouts[j].Reset();
}
}
// SRS - Delete binding layouts
for( int i = 0; i < bindingLayouts.Num(); i++ )
{
@ -788,7 +788,7 @@ void idRenderProgManager::Shutdown()
bindingLayouts[i][j].Reset();
}
}
// SRS - Unmap buffer memory using overloaded = operator
constantBuffer = nullptr;
#endif

View file

@ -552,7 +552,7 @@ void VKimp_Shutdown()
deviceManager->Shutdown();
}
#endif
if( window )
{
SDL_DestroyWindow( window );