From ead3d21bdbc850e5fc0a6fc365e1b6148bf5036a Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Wed, 10 Apr 2019 12:02:12 +0200 Subject: [PATCH] gsdx ogl: commit texture in copy function So far not yet used but safer this way --- plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp b/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp index 1028bc78b3..fa60593938 100644 --- a/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/plugins/GSdx/Renderers/OpenGL/GSDeviceOGL.cpp @@ -1221,6 +1221,8 @@ void GSDeviceOGL::CopyRectConv(GSTexture* sTex, GSTexture* dTex, const GSVector4 GL_PUSH(format("CopyRectConv from %d to %d", sid, did).c_str()); + dTex->CommitRegion(GSVector2i(r.z, r.w)); + glBindFramebuffer(GL_READ_FRAMEBUFFER, m_fbo_read); glFramebufferTexture2D(GL_READ_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, sid, 0); @@ -1248,6 +1250,8 @@ void GSDeviceOGL::CopyRect(GSTexture* sTex, GSTexture* dTex, const GSVector4i& r PSSetShaderResource(6, sTex); #endif + dTex->CommitRegion(GSVector2i(r.z, r.w)); + ASSERT(GLExtension::Has("GL_ARB_copy_image") && glCopyImageSubData); glCopyImageSubData( sid, GL_TEXTURE_2D, 0, r.x, r.y, 0,