From fffd829f8895c6736814681dd9b316b80077006b Mon Sep 17 00:00:00 2001 From: FlatOutPS2 Date: Mon, 16 Jan 2017 17:51:02 +0100 Subject: [PATCH] Revert "gsdx tc: partial support of pseudo depth for Dx" This reverts commit https://github.com/PCSX2/pcsx2/commit/d6383e6c211e03a9bb036c6fc8655cd6bba8b9ff It created a regression in Everybody's Golf 4/Hot Shots Golf 4, breaking the renderering when depth emulation is disabled/when using a Direct3D Hardware renderer. --- plugins/GSdx/GSTextureCache.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/plugins/GSdx/GSTextureCache.cpp b/plugins/GSdx/GSTextureCache.cpp index 4b5a5b4c08..d09c502c83 100644 --- a/plugins/GSdx/GSTextureCache.cpp +++ b/plugins/GSdx/GSTextureCache.cpp @@ -89,6 +89,11 @@ void GSTextureCache::RemoveAll() GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r, bool palette) { + if (!CanConvertDepth()) { + GL_CACHE("LookupDepthSource not supported (0x%x, F:0x%x)", TEX0.TBP0, TEX0.PSM); + throw GSDXRecoverableError(); + } + const GSLocalMemory::psm_t& psm_s = GSLocalMemory::m_psm[TEX0.PSM]; Source* src = NULL; @@ -113,17 +118,6 @@ GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0 } } - if (!CanConvertDepth()) { - if (dst) { - GL_CACHE("LookupDepthSource not supported (0x%x, %s)", TEX0.TBP0, psm_str(TEX0.PSM)); - throw GSDXRecoverableError(); - } else { - // LookupSource call LookupDepthSource, I'm sure it is nice testcase for formal tools ;) - GL_CACHE("LookupDepthSource not supported let's try standard LookupSource"); - return LookupSource(TEX0, TEXA, r); - } - } - if (!dst) { // Retry on the render target (Silent Hill 4) for(auto t : m_dst[RenderTarget]) { @@ -671,6 +665,9 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int // must invalidate the Target/Depth respectively void GSTextureCache::InvalidateVideoMemType(int type, uint32 bp) { + if (!CanConvertDepth()) + return; + for(list::iterator i = m_dst[type].begin(); i != m_dst[type].end(); ++i) { Target* t = *i;