From a021dd7b79062d20552852d32387cf6b36ab06e6 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Fri, 9 Sep 2011 21:45:11 +0200 Subject: [PATCH] Small fix to the previous commit. --- Source/Core/VideoCommon/Src/PixelShaderGen.cpp | 3 +++ Source/Core/VideoCommon/Src/VertexShaderGen.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp index 25007be93b..1ea7479990 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp @@ -243,6 +243,9 @@ void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, DSTALPHA_MODE dstAlphaMode) void ValidatePixelShaderIDs(API_TYPE api, PIXELSHADERUIDSAFE old_id, const std::string& old_code, DSTALPHA_MODE dstAlphaMode, u32 components) { + if (!g_ActiveConfig.bEnableShaderDebugging) + return; + PIXELSHADERUIDSAFE new_id; GetSafePixelShaderId(&new_id, dstAlphaMode); diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 902f645bec..f3dab89173 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -93,6 +93,9 @@ void GetSafeVertexShaderId(VERTEXSHADERUIDSAFE *uid, u32 components) void ValidateVertexShaderIDs(API_TYPE api, VERTEXSHADERUIDSAFE old_id, const std::string& old_code, u32 components) { + if (!g_ActiveConfig.bEnableShaderDebugging) + return; + VERTEXSHADERUIDSAFE new_id; GetSafeVertexShaderId(&new_id, components);