From b4cb805a910172a0de398df0a6d1c0459212f066 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Fri, 18 Jan 2019 14:53:06 +0100 Subject: [PATCH] gsdx-tc: Remove CanConvertDepth virtual bool and use m_can_convert_depth for depth toggling. --- plugins/GSdx/Renderers/Common/GSTextureCache.cpp | 10 +++++----- plugins/GSdx/Renderers/Common/GSTextureCache.h | 2 -- plugins/GSdx/Renderers/DX11/GSTextureCache11.h | 2 -- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/plugins/GSdx/Renderers/Common/GSTextureCache.cpp b/plugins/GSdx/Renderers/Common/GSTextureCache.cpp index fda86f34d6..7f401d70ca 100644 --- a/plugins/GSdx/Renderers/Common/GSTextureCache.cpp +++ b/plugins/GSdx/Renderers/Common/GSTextureCache.cpp @@ -96,7 +96,7 @@ void GSTextureCache::RemoveAll() GSTextureCache::Source* GSTextureCache::LookupDepthSource(const GIFRegTEX0& TEX0, const GIFRegTEXA& TEXA, const GSVector4i& r, bool palette) { - if (!CanConvertDepth()) { + if (!m_can_convert_depth) { GL_CACHE("LookupDepthSource not supported (0x%x, F:0x%x)", TEX0.TBP0, TEX0.PSM); if (m_renderer->m_game.title == CRC::JackieChanAdv || m_renderer->m_game.title == CRC::SVCChaos) { // JackieChan and SVCChaos cause regressions when skipping the draw calls when depth is disabled/not supported. @@ -347,7 +347,7 @@ GSTextureCache::Source* GSTextureCache::LookupSource(const GIFRegTEX0& TEX0, con // // Sigh... They don't help us. - if (dst == NULL && CanConvertDepth()) { + if (dst == NULL && m_can_convert_depth) { // Let's try a trick to avoid to use wrongly a depth buffer // Unfortunately, I don't have any Arc the Lad testcase // @@ -458,7 +458,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int dst->m_dirty_alpha |= (psm_s.trbpp == 32 && (fbmask & 0xFF000000) != 0xFF000000) || (psm_s.trbpp == 16); - } else if (CanConvertDepth()) { + } else if (m_can_convert_depth) { int rev_type = (type == DepthStencil) ? RenderTarget : DepthStencil; @@ -655,7 +655,7 @@ GSTextureCache::Target* GSTextureCache::LookupTarget(const GIFRegTEX0& TEX0, int // must invalidate the Target/Depth respectively void GSTextureCache::InvalidateVideoMemType(int type, uint32 bp) { - if (!CanConvertDepth()) + if (!m_can_convert_depth) return; auto& list = m_dst[type]; @@ -1453,7 +1453,7 @@ GSTextureCache::Target* GSTextureCache::CreateTarget(const GIFRegTEX0& TEX0, int { ASSERT(type == RenderTarget || type == DepthStencil); - Target* t = new Target(m_renderer, TEX0, m_temp, CanConvertDepth()); + Target* t = new Target(m_renderer, TEX0, m_temp, m_can_convert_depth); // FIXME: initial data should be unswizzled from local mem in Update() if dirty diff --git a/plugins/GSdx/Renderers/Common/GSTextureCache.h b/plugins/GSdx/Renderers/Common/GSTextureCache.h index a8132730c3..f97cd60480 100644 --- a/plugins/GSdx/Renderers/Common/GSTextureCache.h +++ b/plugins/GSdx/Renderers/Common/GSTextureCache.h @@ -208,8 +208,6 @@ protected: // TODO: virtual void Write(Source* s, const GSVector4i& r) = 0; // TODO: virtual void Write(Target* t, const GSVector4i& r) = 0; - virtual bool CanConvertDepth() { return m_can_convert_depth; } - public: GSTextureCache(GSRenderer* r); virtual ~GSTextureCache(); diff --git a/plugins/GSdx/Renderers/DX11/GSTextureCache11.h b/plugins/GSdx/Renderers/DX11/GSTextureCache11.h index 67cd29f634..d5050472ea 100644 --- a/plugins/GSdx/Renderers/DX11/GSTextureCache11.h +++ b/plugins/GSdx/Renderers/DX11/GSTextureCache11.h @@ -32,8 +32,6 @@ protected: void Read(Target* t, const GSVector4i& r); void Read(Source* t, const GSVector4i& r); - virtual bool CanConvertDepth() { return m_can_convert_depth; } - public: GSTextureCache11(GSRenderer* r); };