Permalink
Browse files

gsdx ogl: add a texture barrier when target is read back

Fix graphical corruption in Nouveau/BUA/devil may cry

Issue #1805
  • Loading branch information...
1 parent ba91c8f commit 2a2a0227923b6fde9d5a7c6fb6eb56429f4e79d4 @gregory38 gregory38 committed Feb 8, 2017
Showing with 4 additions and 0 deletions.
  1. +4 −0 plugins/GSdx/GSDeviceOGL.cpp
@@ -1202,6 +1202,10 @@ GSTexture* GSDeviceOGL::CopyOffscreen(GSTexture* src, const GSVector4& sRect, in
GSVector4 dRect(0, 0, w, h);
+ // StretchRect will read an old target. However, the memory cache might contains
+ // invalid data (for example due to SW blending).
+ glTextureBarrier();
+
StretchRect(src, sRect, dst, dRect, m_convert.ps[ps_shader]);
return dst;

0 comments on commit 2a2a022

Please sign in to comment.