From 7dfff148b8ee4fe7fec1118e3ed91b3a4e8aa2a0 Mon Sep 17 00:00:00 2001 From: ramapcsx2 Date: Fri, 23 Dec 2011 20:58:10 +0000 Subject: [PATCH] GSdx: Hack around a problem with the texture cache finding depth stencils when there can't be any. This makes the Arc the Lad fog issue go away. Review would be nice though :) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5011 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/GSdx/GSTextureCache.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 7e908e9c07..d5574b9231 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -97,11 +97,14 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con uint32 bp = TEX0.TBP0; uint32 psm = TEX0.PSM; - // This should get looked at if you feel like hackfixing the texture cache. - // Checking for type < 1 (so no only RenderTarget, not DepthStencil get checked), it fixes the fog in Arc the Lad. - // Simply not doing this code at all makes a lot of previsouly missing stuff show (but breaks pretty much everything - // else. - for(int type = 0; type < 2 && dst == NULL; type++) + // Arc the Lad finds the wrong surface here when looking for a depth stencil. + // Since we're currently not caching depth stencils (check ToDo in CreateSource) we should not look for it here. + + // (Simply not doing this code at all makes a lot of previsouly missing stuff show (but breaks pretty much everything + // else.) + + //for(int type = 0; type < 2 && dst == NULL; type++) + for(int type = 0; type < 1 && dst == NULL; type++) // Only look for render target, no depth stencil { for(list::iterator i = m_dst[type].begin(); i != m_dst[type].end(); i++) {