Wait on device idle vs GL_BlockingSwapBuffers() before vertex cache shudown on game exit

This commit is contained in:
Stephen Saunders 2024-02-05 14:24:15 -05:00
parent f47a46abd2
commit 36f42a949e

View file

@ -2209,14 +2209,8 @@ void idRenderSystemLocal::Shutdown()
UnbindBufferObjects();
// SRS - wait for fence to hit before freeing any resources the GPU may be using, otherwise get Vulkan validation layer errors on shutdown
// SRS - skip this step if we are in a Doom Classic game
#if defined(USE_DOOMCLASSIC)
if( common->GetCurrentGame() == DOOM3_BFG )
{
backend.GL_BlockingSwapBuffers();
}
#endif
// SRS - wait for device idle before freeing any resources the GPU may be using, otherwise get errors on shutdown
deviceManager->GetDevice()->waitForIdle();
// free the vertex cache, which should have nothing allocated now
vertexCache.Shutdown();