Skip GL_BlockingSwapBuffers() sync during shutdown when in Doom 3 mode (com_smp = -1)

This commit is contained in:
Stephen Saunders 2022-11-14 23:38:55 -05:00
parent 7a7571f88a
commit 8d57d5399b

View file

@ -2245,6 +2245,8 @@ idRenderSystemLocal::Shutdown
*/
void idRenderSystemLocal::Shutdown()
{
extern idCVar com_smp;
common->Printf( "idRenderSystem::Shutdown()\n" );
fonts.DeleteContents();
@ -2270,7 +2272,11 @@ 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
backend.GL_BlockingSwapBuffers();
// SRS - skip this step if we are in Doom 3 mode (com_smp = -1) which has already finished and presented
if( com_smp.GetInteger() != -1 )
{
backend.GL_BlockingSwapBuffers();
}
// free the vertex cache, which should have nothing allocated now
vertexCache.Shutdown();