diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index d9ea1bcacf..17e661baa4 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -23,6 +23,7 @@ #include "GSTextureCache.h" bool s_IS_OPENGL = false; +bool GSTextureCache::m_disable_partial_invalidation = false; GSTextureCache::GSTextureCache(GSRenderer* r) : m_renderer(r) @@ -743,10 +744,14 @@ void GSTextureCache::InvalidateLocalMem(GSOffset* off, const GSVector4i& r) // note: r.rintersect breaks Wizardry and Chaos Legion // Read(t, t->m_valid) works in all tested games but is very slow in GUST titles >< - if (r.x == 0 && r.y == 0) // Full screen read? - Read(t, t->m_valid); - else // Block level read? + if (GSTextureCache::m_disable_partial_invalidation) { Read(t, r.rintersect(t->m_valid)); + } else { + if (r.x == 0 && r.y == 0) // Full screen read? + Read(t, t->m_valid); + else // Block level read? + Read(t, r.rintersect(t->m_valid)); + } } } } diff --git a/plugins/GSdx/GSTextureCache.h b/plugins/GSdx/GSTextureCache.h index 9138b8edcd..dbd9a430eb 100644 --- a/plugins/GSdx/GSTextureCache.h +++ b/plugins/GSdx/GSTextureCache.h @@ -116,7 +116,7 @@ protected: uint8* m_temp; bool m_can_convert_depth; int m_crc_hack_level; - bool m_disable_partial_invalidation; + static bool m_disable_partial_invalidation; virtual Source* CreateSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, Target* t = NULL, bool half_right = false); virtual Target* CreateTarget(const GIFRegTEX0& TEX0, int w, int h, int type);