From 8d57d5399bf69379851902766af927a2983b3cbd Mon Sep 17 00:00:00 2001 From: Stephen Saunders Date: Mon, 14 Nov 2022 23:38:55 -0500 Subject: [PATCH] Skip GL_BlockingSwapBuffers() sync during shutdown when in Doom 3 mode (com_smp = -1) --- neo/renderer/RenderSystem_init.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/neo/renderer/RenderSystem_init.cpp b/neo/renderer/RenderSystem_init.cpp index 7db1f552..a2d9287c 100644 --- a/neo/renderer/RenderSystem_init.cpp +++ b/neo/renderer/RenderSystem_init.cpp @@ -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();