From 877a1121934a32ba91b3e60d475711e024039c81 Mon Sep 17 00:00:00 2001 From: lightningterror Date: Thu, 30 May 2019 15:43:16 +0200 Subject: [PATCH] gsdx-hw: Remove no longer used linear parameter from ComputeFixedTEX0, add an assert that m_target isn't handled with invalid_tex0 yet due to upscaling. --- plugins/GSdx/GSDrawingContext.cpp | 2 +- plugins/GSdx/GSDrawingContext.h | 2 +- plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp | 3 +++ plugins/GSdx/Renderers/HW/GSRendererHW.cpp | 2 +- plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp | 3 +++ 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/GSdx/GSDrawingContext.cpp b/plugins/GSdx/GSDrawingContext.cpp index f3dcc4ad72..026823da18 100644 --- a/plugins/GSdx/GSDrawingContext.cpp +++ b/plugins/GSdx/GSDrawingContext.cpp @@ -136,7 +136,7 @@ GIFRegTEX0 GSDrawingContext::GetSizeFixedTEX0(int s_n, const GSVector4& st, bool return res; } -void GSDrawingContext::ComputeFixedTEX0(const GSVector4& st, bool linear) +void GSDrawingContext::ComputeFixedTEX0(const GSVector4& st) { // It is quite complex to handle rescaling so this function is less stricter than GetSizeFixedTEX0, // therefore we remove the reduce optimization and we don't handle bilinear filtering which might create wrong interpolation at the border. diff --git a/plugins/GSdx/GSDrawingContext.h b/plugins/GSdx/GSDrawingContext.h index 84964aad3e..11d41c4d57 100644 --- a/plugins/GSdx/GSDrawingContext.h +++ b/plugins/GSdx/GSDrawingContext.h @@ -147,7 +147,7 @@ public: } GIFRegTEX0 GetSizeFixedTEX0(int s_n, const GSVector4& st, bool linear, bool mipmap = false); - void ComputeFixedTEX0(const GSVector4& st, bool linear); + void ComputeFixedTEX0(const GSVector4& st); bool HasFixedTEX0() const { return m_fixed_tex0;} // Save & Restore before/after draw allow to correct/optimize current register for current draw diff --git a/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp b/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp index 74064e2c5b..69177ecb68 100644 --- a/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp +++ b/plugins/GSdx/Renderers/DX11/GSRendererDX11.cpp @@ -675,6 +675,9 @@ void GSRendererDX11::EmulateTextureSampler(const GSTextureCache::Source* tex) // Use invalid size to denormalize ST coordinate ps_cb.WH.x = (float)(1 << m_context->stack.TEX0.TW); ps_cb.WH.y = (float)(1 << m_context->stack.TEX0.TH); + + // We can't handle m_target with invalid_tex0 atm due to upscaling + ASSERT(!tex->m_target); } // Only enable clamping in CLAMP mode. REGION_CLAMP will be done manually in the shader diff --git a/plugins/GSdx/Renderers/HW/GSRendererHW.cpp b/plugins/GSdx/Renderers/HW/GSRendererHW.cpp index 4a3a976b30..7e38d37422 100644 --- a/plugins/GSdx/Renderers/HW/GSRendererHW.cpp +++ b/plugins/GSdx/Renderers/HW/GSRendererHW.cpp @@ -822,7 +822,7 @@ void GSRendererHW::Draw() // Fix TEX0 size if(PRIM->TME && !IsMipMapActive()) - m_context->ComputeFixedTEX0(m_vt.m_min.t.xyxy(m_vt.m_max.t), m_vt.IsLinear()); + m_context->ComputeFixedTEX0(m_vt.m_min.t.xyxy(m_vt.m_max.t)); // skip alpha test if possible // Note: do it first so we know if frame/depth writes are masked diff --git a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp index 6cfebd12c8..7d06d6bf8d 100644 --- a/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp +++ b/plugins/GSdx/Renderers/OpenGL/GSRendererOGL.cpp @@ -785,6 +785,9 @@ void GSRendererOGL::EmulateTextureSampler(const GSTextureCache::Source* tex) // Use invalid size to denormalize ST coordinate ps_cb.WH.x = (float)(1 << m_context->stack.TEX0.TW); ps_cb.WH.y = (float)(1 << m_context->stack.TEX0.TH); + + // We can't handle m_target with invalid_tex0 atm due to upscaling + ASSERT(!tex->m_target); } // Only enable clamping in CLAMP mode. REGION_CLAMP will be done manually in the shader