Minor tidying in PixelProgram - Fold together the shader -> oDepth handling. If these conditions were not the same, the shader is invalid. Change-Id: I9bec710886c9961f4141006d2d48f3eb76a3dfee Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29988 Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: Chris Forbes <chrisforbes@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Pipeline/PixelProgram.cpp b/src/Pipeline/PixelProgram.cpp index 3b26f6d..7fe2ec3 100644 --- a/src/Pipeline/PixelProgram.cpp +++ b/src/Pipeline/PixelProgram.cpp
@@ -96,12 +96,7 @@ it = spirvShader->outputBuiltins.find(spv::BuiltInFragDepth); if (it != spirvShader->outputBuiltins.end()) { - oDepth = routine.getVariable(it->second.Id)[it->second.FirstComponent]; - } - - if(spirvShader->getModes().DepthReplacing) - { - oDepth = Min(Max(oDepth, Float4(0.0f)), Float4(1.0f)); + oDepth = Min(Max(routine.getVariable(it->second.Id)[it->second.FirstComponent], Float4(0.0f)), Float4(1.0f)); } }