gsdx ogl: commit texture in copy function

So far not yet used but safer this way
This commit is contained in:
Gregory Hainaut 2019-04-10 12:02:12 +02:00 committed by lightningterror
parent 568b96b885
commit ead3d21bdb
1 changed files with 4 additions and 0 deletions

View File

@ -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,