Commit 390d846c by Chris Forbes

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: 's avatarChris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 32d47971
......@@ -96,12 +96,7 @@ namespace sw
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));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment