diff options
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 98484419f9..531c70e8d9 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -40,6 +40,10 @@ #include "lldir.h" #include "llfindlocale.h" +#include "../newview/llviewercontrol.h" + +extern LLControlGroup gSavedSettings; + #if LL_GTK extern "C" { # include "gtk/gtk.h" @@ -1098,6 +1102,18 @@ void LLWindowSDL::swapBuffers() if (mWindow) { SDL_GL_SwapWindow(mWindow); + U32 mode = gSavedSettings.getU32("MPVBufferOptiMode"); + if (mode == 0) + { + if(gGLManager.mIsApple) mode = 2; + else mode = 1; + } + if (mode > 2) + { + glClientWaitSync(swapFense, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED); + glDeleteSync(swapFense); + swapFense = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + } } } |