From c2777ff989518012c2e3148f124d365771275a39 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 2 Oct 2016 13:23:38 +0200 Subject: [PATCH] gsdx state: split IsMipmapActive in 2 pieces This way we can test if a draw call requires a triliner filtering. It will be used in next commit to implement automatic trilinear --- plugins/GSdx/GSState.cpp | 7 ++++++- plugins/GSdx/GSState.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index c5f2ec47d0..380b543224 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -3183,9 +3183,14 @@ bool GSState::IsOpaque() return context->ALPHA.IsOpaque(amin, amax); } +bool GSState::IsMipMapDraw() +{ + return m_context->TEX1.MXL > 0 && m_context->TEX1.MMIN >= 2 && m_context->TEX1.MMIN <= 5 && m_vt.m_lod.y > 0; +} + bool GSState::IsMipMapActive() { - return m_mipmap && m_context->TEX1.MXL > 0 && m_context->TEX1.MMIN >= 2 && m_context->TEX1.MMIN <= 5 && m_vt.m_lod.y > 0; + return m_mipmap && IsMipMapDraw(); } GIFRegTEX0 GSState::GetTex0Layer(int lod) diff --git a/plugins/GSdx/GSState.h b/plugins/GSdx/GSState.h index 48c0f46583..e12ce478ce 100644 --- a/plugins/GSdx/GSState.h +++ b/plugins/GSdx/GSState.h @@ -204,6 +204,7 @@ protected: void GetAlphaMinMax(); bool TryAlphaTest(uint32& fm, uint32& zm); bool IsOpaque(); + bool IsMipMapDraw(); bool IsMipMapActive(); GIFRegTEX0 GetTex0Layer(int lod);