From ebb2a8ad5a4c9d9bd67f83a5cf05cb5f5118d849 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sun, 25 Sep 2016 13:50:29 +0200 Subject: [PATCH] gsdx debug: Add DISABLE_WIP_ASSERTION To easily disable assertion on codes that only require investigation --- plugins/GSdx/GSRendererHW.cpp | 2 ++ plugins/GSdx/GSRendererOGL.cpp | 4 ++++ plugins/GSdx/config.h | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index b68eed1969..688b677497 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -228,7 +228,9 @@ GSTexture* GSRendererHW::GetOutput(int i, int& y_offset) if (delta > 0) { // Code was corrected to use generic format. But I'm not sure behavior is correct. // Let's keep the warning to easily spot game that trigger this code path. +#ifndef DISABLE_WIP_ASSERTION ASSERT(DISPFB.PSM == PSM_PSMCT32 || DISPFB.PSM == PSM_PSMCT24); +#endif int pages = delta >> 5u; int y_pages = pages / DISPFB.FBW; diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 8acfd2ee00..e5b6504b8c 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -562,7 +562,9 @@ void GSRendererOGL::EmulateChannelShuffle(GSTexture** rt, const GSTextureCache:: } else { GL_INS("channel not supported"); m_channel_shuffle = false; +#ifndef DISABLE_WIP_ASSERTION ASSERT(0); +#endif } } @@ -756,7 +758,9 @@ void GSRendererOGL::EmulateTextureSampler(const GSTextureCache::Source* tex) // Depth + bilinear filtering isn't done yet (And I'm not sure we need it anyway but a game will prove me wrong) // So of course, GTA set the linear mode, but sampling is done at texel center so it is equivalent to nearest sampling +#ifndef DISABLE_WIP_ASSERTION ASSERT(!(psm.depth && m_vt.IsLinear())); +#endif // Performance note: // 1/ Don't set 0 as it is the default value diff --git a/plugins/GSdx/config.h b/plugins/GSdx/config.h index 2e292f56d5..9c199d8107 100644 --- a/plugins/GSdx/config.h +++ b/plugins/GSdx/config.h @@ -52,3 +52,7 @@ #ifdef _WIN32 //#define ENABLE_OPENCL #endif + +// Disable harmless assertion on stuff not yet finish. Or that requires investigation. +// Goal of the define is to allow to run a debug build without too much pain. +//#define DISABLE_WIP_ASSERTION