From ed3052dea570ba8a515f231b1e066a592d9df50c Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Tue, 8 Nov 2016 18:57:45 +0100 Subject: [PATCH] gsdx: remove various assertion Useless or wrong assertion --- plugins/GSdx/GSClut.cpp | 12 ++---------- plugins/GSdx/GSRendererOGL.cpp | 5 ----- plugins/GSdx/GSState.cpp | 4 +--- plugins/GSdx/config.h | 4 ---- 4 files changed, 3 insertions(+), 22 deletions(-) diff --git a/plugins/GSdx/GSClut.cpp b/plugins/GSdx/GSClut.cpp index 013e0a271e..708199296d 100644 --- a/plugins/GSdx/GSClut.cpp +++ b/plugins/GSdx/GSClut.cpp @@ -115,16 +115,8 @@ bool GSClut::WriteTest(const GIFRegTEX0& TEX0, const GIFRegTEXCLUT& TEXCLUT) case 3: m_CBP[1] = TEX0.CBP; break; case 4: if(m_CBP[0] == TEX0.CBP) return false; m_CBP[0] = TEX0.CBP; break; case 5: if(m_CBP[1] == TEX0.CBP) return false; m_CBP[1] = TEX0.CBP; break; - case 6: -#ifndef DISABLE_WIP_ASSERTION - ASSERT(0); -#endif - return false; // ffx2 menu - case 7: -#ifndef DISABLE_WIP_ASSERTION - ASSERT(0); -#endif - return false; // ford mustang racing // Bouken Jidai Katsugeki Goemon + case 6: return false; // ffx2 menu + case 7: return false; // ford mustang racing // Bouken Jidai Katsugeki Goemon default: __assume(0); } diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 2482d63bdd..04def276af 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -567,9 +567,6 @@ void GSRendererOGL::EmulateChannelShuffle(GSTexture** rt, const GSTextureCache:: } else { GL_INS("channel not supported"); m_channel_shuffle = false; -#ifndef DISABLE_WIP_ASSERTION - ASSERT(0); -#endif } } @@ -806,9 +803,7 @@ 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/GSState.cpp b/plugins/GSdx/GSState.cpp index a4d0ddf03f..f5d0c09354 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -500,8 +500,7 @@ float GSState::GetTvRefreshRate() vertical_frequency = 60; break; default: - if (videomode == GSVideoMode::Unknown) - ASSERT(0); + ASSERT(videomode != GSVideoMode::Unknown); } return vertical_frequency; @@ -1578,7 +1577,6 @@ void GSState::FlushPrim() break; default: fprintf(stderr, "%d:INVALID PSM 0x%x !!!\n", s_n, m_context->TEX0.PSM); - ASSERT(0); break; } #endif diff --git a/plugins/GSdx/config.h b/plugins/GSdx/config.h index 91552974d0..1213dee8cb 100644 --- a/plugins/GSdx/config.h +++ b/plugins/GSdx/config.h @@ -54,7 +54,3 @@ #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