summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorNeoBrainX <NeoBrainX@googlemail.com>2013-08-12 09:33:36 +0000
committerNeoBrainX <NeoBrainX@googlemail.com>2013-08-12 09:33:36 +0000
commit4c22e1264e0f59ae3ccc357d8d7ef178fa99f044 (patch)
tree6c9f616cbc56e7310e120b538bff0a5789bae93b /Source/Core
parent7f3c06de27635b35127006b2ab76f6fa2d3a08f7 (diff)
PixelShaderGen: Do not write depth in pixel shader if depth testing (and thus writing) is not enabled. Should improve performance quite a bit in some cases.
Fixes issue 6474.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
index 0ac9748d5f..28e609112e 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderGen.cpp
@@ -259,7 +259,7 @@ static void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_TYPE Api
unsigned int numTexgen = bpmem.genMode.numtexgens;
const bool forced_early_z = g_ActiveConfig.backend_info.bSupportsEarlyZ && bpmem.UseEarlyDepthTest() && (g_ActiveConfig.bFastDepthCalc || bpmem.alpha_test.TestResult() == AlphaTest::UNDETERMINED);
- const bool per_pixel_depth = (bpmem.ztex2.op != ZTEXTURE_DISABLE && bpmem.UseLateDepthTest()) || (!g_ActiveConfig.bFastDepthCalc && !forced_early_z);
+ const bool per_pixel_depth = (bpmem.ztex2.op != ZTEXTURE_DISABLE && bpmem.UseLateDepthTest()) || (!g_ActiveConfig.bFastDepthCalc && bpmem.zmode.testenable && !forced_early_z);
out.Write("//Pixel Shader for TEV stages\n");
out.Write("//%i TEV stages, %i texgens, %i IND stages\n",