From 92ae8a5be759665e8348b6b9051b0f33543f2311 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 31 Jul 2016 13:14:51 +0200 Subject: [PATCH] gsdx sw: print current draw call of GetSizeFixedTEX0 To easily detect compare with hardware renderer --- plugins/GSdx/GSDrawingContext.cpp | 5 +++-- plugins/GSdx/GSDrawingContext.h | 2 +- plugins/GSdx/GSRendererSW.cpp | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/GSDrawingContext.cpp b/plugins/GSdx/GSDrawingContext.cpp index d9cd94d396..4c8c86f285 100644 --- a/plugins/GSdx/GSDrawingContext.cpp +++ b/plugins/GSdx/GSDrawingContext.cpp @@ -72,7 +72,7 @@ static int extend(int uv, int size) return size; } -GIFRegTEX0 GSDrawingContext::GetSizeFixedTEX0(const GSVector4& st, bool linear, bool mipmap) +GIFRegTEX0 GSDrawingContext::GetSizeFixedTEX0(int s_n, const GSVector4& st, bool linear, bool mipmap) { if(mipmap) return TEX0; // no mipmaping allowed @@ -120,7 +120,8 @@ GIFRegTEX0 GSDrawingContext::GetSizeFixedTEX0(const GSVector4& st, bool linear, #ifdef _DEBUG if(TEX0.TW != tw || TEX0.TH != th) { - printf("FixedTEX0 %05x %d %d tw %d=>%d th %d=>%d st (%.0f,%.0f,%.0f,%.0f) uvmax %d,%d wm %d,%d (%d,%d,%d,%d)\n", + printf("%5d:FixedTEX0 %05x %d %d tw %d=>%d th %d=>%d st (%.0f,%.0f,%.0f,%.0f) uvmax %d,%d wm %d,%d (%d,%d,%d,%d)\n", + s_n, (int)TEX0.TBP0, (int)TEX0.TBW, (int)TEX0.PSM, (int)TEX0.TW, tw, (int)TEX0.TH, th, uvf.x, uvf.y, uvf.z, uvf.w, diff --git a/plugins/GSdx/GSDrawingContext.h b/plugins/GSdx/GSDrawingContext.h index df764d9310..f6d29a9d81 100644 --- a/plugins/GSdx/GSDrawingContext.h +++ b/plugins/GSdx/GSDrawingContext.h @@ -125,7 +125,7 @@ public: return ZBUF.ZMSK == 0 && TEST.ZTE != 0; // ZTE == 0 is bug on the real hardware, write is blocked then } - GIFRegTEX0 GetSizeFixedTEX0(const GSVector4& st, bool linear, bool mipmap); + GIFRegTEX0 GetSizeFixedTEX0(int s_n, const GSVector4& st, bool linear, bool mipmap); void Dump(const std::string& filename) { diff --git a/plugins/GSdx/GSRendererSW.cpp b/plugins/GSdx/GSRendererSW.cpp index d81dd86be1..7fbc1ea16b 100644 --- a/plugins/GSdx/GSRendererSW.cpp +++ b/plugins/GSdx/GSRendererSW.cpp @@ -1105,7 +1105,7 @@ bool GSRendererSW::GetScanlineGlobalData(SharedData* data) bool mipmap = IsMipMapActive(); - GIFRegTEX0 TEX0 = m_context->GetSizeFixedTEX0(m_vt.m_min.t.xyxy(m_vt.m_max.t), m_vt.IsLinear(), mipmap); + GIFRegTEX0 TEX0 = m_context->GetSizeFixedTEX0(s_n, m_vt.m_min.t.xyxy(m_vt.m_max.t), m_vt.IsLinear(), mipmap); GSVector4i r;