From 0764e36c3d5eaa27331342dd7e3edcf13ff3b11f Mon Sep 17 00:00:00 2001 From: san Date: Wed, 6 Jun 2018 19:58:10 +0300 Subject: [PATCH] 0029844: Volume Rendering - NVIDIA graphic driver timeout errors with callback enabled An attempt to resolve CPU-GPU synchronization issues using glFinish() --- src/OpenGl/OpenGl_Context.cxx | 2 +- src/OpenGl/OpenGl_View_Redraw.cxx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/OpenGl/OpenGl_Context.cxx b/src/OpenGl/OpenGl_Context.cxx index 18cbea056d..8e0beecc4b 100644 --- a/src/OpenGl/OpenGl_Context.cxx +++ b/src/OpenGl/OpenGl_Context.cxx @@ -671,7 +671,7 @@ void OpenGl_Context::SwapBuffers() if ((HDC )myWindowDC != NULL) { ::SwapBuffers ((HDC )myWindowDC); - glFlush(); + glFinish(); } #else if ((Display* )myDisplay != NULL) diff --git a/src/OpenGl/OpenGl_View_Redraw.cxx b/src/OpenGl/OpenGl_View_Redraw.cxx index d499839e4d..a25ebf2c08 100644 --- a/src/OpenGl/OpenGl_View_Redraw.cxx +++ b/src/OpenGl/OpenGl_View_Redraw.cxx @@ -561,7 +561,7 @@ void OpenGl_View::Redraw() } else { - aCtx->core11fwd->glFlush(); + aCtx->core11fwd->glFinish(); } // reset render mode state @@ -731,7 +731,7 @@ void OpenGl_View::RedrawImmediate() } else { - aCtx->core11fwd->glFlush(); + aCtx->core11fwd->glFinish(); } aCtx->FrameStats()->FrameEnd (myWorkspace); -- 2.39.5