diff --git a/plugins/GSdx/GSRendererDX.cpp b/plugins/GSdx/GSRendererDX.cpp index a1d976289a..abdb5e8d8f 100644 --- a/plugins/GSdx/GSRendererDX.cpp +++ b/plugins/GSdx/GSRendererDX.cpp @@ -225,7 +225,9 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc GSDeviceDX::PSSamplerSelector ps_ssel; GSDeviceDX::PSConstantBuffer ps_cb; - if (m_texture_shuffle) { + // Gregory: code is not yet ready so let's only enable it when + // CRC is below the FULL level + if (m_texture_shuffle && (m_crc_hack_level < 3)) { ps_sel.shuffle = 1; ps_sel.fmt = 0; @@ -373,10 +375,7 @@ void GSRendererDX::DrawPrims(GSTexture* rt, GSTexture* ds, GSTextureCache::Sourc ps_sel.wmt = context->CLAMP.WMT; if (ps_sel.shuffle) { ps_sel.fmt = 0; - - } - else - { + } else { ps_sel.fmt = tex->m_palette ? cpsm.fmt | 4 : cpsm.fmt; } ps_sel.aem = env.TEXA.AEM; diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 81fa59f42a..ae9f8cc8b7 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -26,12 +26,12 @@ GSTextureCache::GSTextureCache(GSRenderer* r) : m_renderer(r) { m_spritehack = !!theApp.GetConfig("UserHacks", 0) ? theApp.GetConfig("UserHacks_SpriteHack", 0) : 0; - m_preload_frame = theApp.GetConfig("preload_frame_with_gs_data", 0); - UserHacks_HalfPixelOffset = !!theApp.GetConfig("UserHacks", 0) && !!theApp.GetConfig("UserHacks_HalfPixelOffset", 0); - m_paltex = !!theApp.GetConfig("paltex", 0); - m_can_convert_depth = theApp.GetConfig("Renderer", 12) == 12 ? theApp.GetConfig("texture_cache_depth", 1) : 0; + m_paltex = !!theApp.GetConfig("paltex", 0); + m_preload_frame = theApp.GetConfig("preload_frame_with_gs_data", 0); + m_can_convert_depth = IsOpenGL() ? theApp.GetConfig("texture_cache_depth", 1) : 0; + m_crc_hack_level = theApp.GetConfig("crc_hack_level", 3); m_temp = (uint8*)_aligned_malloc(1024 * 1024 * sizeof(uint32), 32); } @@ -148,7 +148,13 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con // 1/ it just works :) // 2/ even with upscaling // 3/ for both DX and OpenGL - Read(t, t->m_valid); + + // Gregory: to avoid a massive slow down for nothing, let's only enable + // this code when CRC is below the FULL level + if (m_crc_hack_level < 3) + Read(t, t->m_valid); + else + dst = t; } else { dst = t; } diff --git a/plugins/GSdx/GSTextureCache.h b/plugins/GSdx/GSTextureCache.h index 748f0205c5..6314955d1b 100644 --- a/plugins/GSdx/GSTextureCache.h +++ b/plugins/GSdx/GSTextureCache.h @@ -115,6 +115,7 @@ protected: bool m_preload_frame; uint8* m_temp; bool m_can_convert_depth; + int m_crc_hack_level; 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);