diff options
| author | Scott Mansell <phire@gmail.com> | 2015-02-21 10:34:34 +1300 |
|---|---|---|
| committer | Scott Mansell <phire@gmail.com> | 2015-02-21 10:52:29 +1300 |
| commit | 355be1719ee5ac8487fa0a172d32b53e2279d9aa (patch) | |
| tree | ad6d277336b9da543f4ff77f47d7f009891b339e /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | ec065eef8d43f93b02fe8f94e2fd30bc5f47f79c (diff) | |
Fix regression with directx when zfreeze=true and ztest=false.
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 7c76628dd4..e4efccaac9 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -275,8 +275,10 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T && (g_ActiveConfig.bFastDepthCalc || bpmem.alpha_test.TestResult() == AlphaTest::UNDETERMINED) // We can't allow early_ztest for zfreeze because depth is overridden per-pixel. // This means it's impossible for zcomploc to be emulated on a zfrozen polygon. - && !bpmem.genMode.zfreeze; - const bool per_pixel_depth = (bpmem.ztex2.op != ZTEXTURE_DISABLE && bpmem.UseLateDepthTest()) || (!g_ActiveConfig.bFastDepthCalc && bpmem.zmode.testenable && !forced_early_z) || bpmem.genMode.zfreeze; + && !(bpmem.zmode.testenable && bpmem.genMode.zfreeze); + const bool per_pixel_depth = (bpmem.ztex2.op != ZTEXTURE_DISABLE && bpmem.UseLateDepthTest()) + || (!g_ActiveConfig.bFastDepthCalc && bpmem.zmode.testenable && !forced_early_z) + || (bpmem.zmode.testenable && bpmem.genMode.zfreeze); if (forced_early_z) { @@ -369,7 +371,7 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T out.Write("void main(\n"); out.Write(" out float4 ocol0 : SV_Target0,%s%s\n in float4 rawpos : SV_Position,\n", dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND ? "\n out float4 ocol1 : SV_Target1," : "", - (per_pixel_depth && bpmem.zmode.testenable) ? "\n out float depth : SV_Depth," : ""); + per_pixel_depth ? "\n out float depth : SV_Depth," : ""); out.Write(" in centroid float4 colors_0 : COLOR0,\n"); out.Write(" in centroid float4 colors_1 : COLOR1\n"); |
