Commit 7288151c by Chris Forbes

Wire up FragDepth builtin

Bug: b/118386749 Test: dEQP-VK.renderpass.* Test: dEQP-VK.glsl.* Change-Id: I1f830c3fbe5b1f6bca0a6f17dd37fffd00e0cfa3 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29249Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 91cf5ad4
......@@ -71,6 +71,12 @@ 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));
......
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