summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2011-09-09 21:34:46 +0200
committerNeoBrainX <NeoBrainX@googlemail.com>2011-09-09 21:34:46 +0200
commit5c14a24ce115a85d9edfdd11bbf6d78ccd9eddaa (patch)
tree76e7b472c9b981e7289db71a25df2486f401876a /Source/Core/VideoCommon
parentb28348066e083d532d5ab62c93ce0f1dc5c217ed (diff)
Make shader ID validation optional by adding a gfx setting called "EnableShaderDebugging".
Setting this to True will enable additional checks if the shader cache misses any relevant register changes.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/Src/VideoConfig.cpp4
-rw-r--r--Source/Core/VideoCommon/Src/VideoConfig.h3
2 files changed, 7 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp
index 8bad7b005a..2c7788c9cc 100644
--- a/Source/Core/VideoCommon/Src/VideoConfig.cpp
+++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp
@@ -96,6 +96,8 @@ void VideoConfig::Load(const char *ini_file)
iniFile.Get("Settings", "EnableOpenCL", &bEnableOpenCL, false);
iniFile.Get("Settings", "OMPDecoder", &bOMPDecoder, false);
+ iniFile.Get("Settings", "EnableShaderDebugging", &bEnableShaderDebugging, false);
+
iniFile.Get("Enhancements", "ForceFiltering", &bForceFiltering, 0);
iniFile.Get("Enhancements", "MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x)
iniFile.Get("Enhancements", "PostProcessingShader", &sPostProcessingShader, "");
@@ -231,6 +233,8 @@ void VideoConfig::Save(const char *ini_file)
iniFile.Set("Settings", "EnableOpenCL", bEnableOpenCL);
iniFile.Set("Settings", "OMPDecoder", bOMPDecoder);
+ iniFile.Set("Settings", "EnableShaderDebugging", bEnableShaderDebugging);
+
iniFile.Set("Enhancements", "ForceFiltering", bForceFiltering);
iniFile.Set("Enhancements", "MaxAnisotropy", iMaxAnisotropy);
iniFile.Set("Enhancements", "PostProcessingShader", sPostProcessingShader);
diff --git a/Source/Core/VideoCommon/Src/VideoConfig.h b/Source/Core/VideoCommon/Src/VideoConfig.h
index 92a8b67741..83ec08784d 100644
--- a/Source/Core/VideoCommon/Src/VideoConfig.h
+++ b/Source/Core/VideoCommon/Src/VideoConfig.h
@@ -147,6 +147,9 @@ struct VideoConfig
// D3D only config, mostly to be merged into the above
int iAdapter;
+ // Debugging
+ bool bEnableShaderDebugging;
+
// Static config per API
// TODO: Move this out of VideoConfig
struct