From 6490c2b86b7c56be6a1cd49f6d5f5bea639f8f59 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 9 Feb 2018 01:25:14 +1000 Subject: [PATCH] OGL: Use explicit flush instead of GL_SYNC_FLUSH_COMMANDS_BIT --- Source/Core/VideoBackends/OGL/OGLTexture.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/OGL/OGLTexture.cpp b/Source/Core/VideoBackends/OGL/OGLTexture.cpp index 89b6436f2b..91c83762e1 100644 --- a/Source/Core/VideoBackends/OGL/OGLTexture.cpp +++ b/Source/Core/VideoBackends/OGL/OGLTexture.cpp @@ -417,6 +417,7 @@ void OGLStagingTexture::CopyFromTexture(const AbstractTexture* src, glMemoryBarrier(GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT); m_fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + glFlush(); } m_needs_flush = true; @@ -475,6 +476,7 @@ void OGLStagingTexture::CopyToTexture(const MathUtil::Rectangle& src_rect, glDeleteSync(m_fence); m_fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + glFlush(); } m_needs_flush = true; @@ -490,7 +492,7 @@ void OGLStagingTexture::Flush() return; } - glClientWaitSync(m_fence, GL_SYNC_FLUSH_COMMANDS_BIT, GL_TIMEOUT_IGNORED); + glClientWaitSync(m_fence, 0, GL_TIMEOUT_IGNORED); glDeleteSync(m_fence); m_fence = 0; m_needs_flush = false;