From 63334698e1bc778871fb7c837f3536a0064d1b52 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sat, 9 Nov 2013 18:16:26 +0100 Subject: [PATCH] Add temporary setting to disable the vertex decoder jit while we debug it --- Core/Config.cpp | 3 +++ Core/Config.h | 1 + GPU/GLES/VertexDecoder.cpp | 2 +- UI/GameSettingsScreen.cpp | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 5c1be4e32e..8e11eab12a 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -169,6 +169,8 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { iAnisotropyLevel = 4; } graphics->Get("VertexCache", &bVertexCache, true); + graphics->Get("VertexDecoderJit", &bVertexDecoderJit, true); + #ifdef _WIN32 graphics->Get("FullScreen", &bFullScreen, false); #endif @@ -407,6 +409,7 @@ void Config::Save() { graphics->Set("ForceMaxEmulatedFPS", iForceMaxEmulatedFPS); graphics->Set("AnisotropyLevel", iAnisotropyLevel); graphics->Set("VertexCache", bVertexCache); + graphics->Set("VertexDecoderJit", bVertexDecoderJit); #ifdef _WIN32 graphics->Set("FullScreen", bFullScreen); #endif diff --git a/Core/Config.h b/Core/Config.h index 51af3b3e57..b5a4073b3f 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -80,6 +80,7 @@ public: int iWindowHeight; bool bVertexCache; + bool bVertexDecoderJit; bool bFullScreen; int iInternalResolution; // 0 = Auto (native), 1 = 1x (480x272), 2 = 2x, 3 = 3x, 4 = 4x and so on. int iAnisotropyLevel; // 0 - 5, powers of 2: 0 = 1x = no aniso diff --git a/GPU/GLES/VertexDecoder.cpp b/GPU/GLES/VertexDecoder.cpp index a991fd9fe3..5d4ae09048 100644 --- a/GPU/GLES/VertexDecoder.cpp +++ b/GPU/GLES/VertexDecoder.cpp @@ -710,7 +710,7 @@ void VertexDecoder::SetVertexType(u32 fmt, VertexDecoderJitCache *jitCache) { DEBUG_LOG(G3D,"SVT : size = %i, aligned to biggest %i", size, biggest); // Attempt to JIT as well - if (jitCache) { + if (jitCache && g_Config.bVertexDecoderJit) { jitted_ = jitCache->Compile(*this); } } diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index c797674cdd..251f4bd173 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -144,6 +144,10 @@ void GameSettingsScreen::CreateViews() { #endif graphicsSettings->Add(new CheckBox(&g_Config.bHardwareTransform, gs->T("Hardware Transform"))); graphicsSettings->Add(new CheckBox(&g_Config.bVertexCache, gs->T("Vertex Cache"))); + CheckBox *vtxJit = graphicsSettings->Add(new CheckBox(&g_Config.bVertexDecoderJit, gs->T("Vertex Decoder JIT"))); + if (PSP_IsInited()) + vtxJit->SetEnabled(false); + graphicsSettings->Add(new CheckBox(&g_Config.bLowQualitySplineBezier, gs->T("LowCurves", "Low quality spline/bezier curves"))); // This setting is not really useful for anyone atm.