Commit 2e043583 by Chris Forbes

Fix killMask initialization

The shader is run multiple times reusing the same routine state. We need to set the mask correctly before each execution. Test: dEQP-VK.glsl.discard.* Change-Id: Ic34385715cc4a16d931a3ff4fae4eeaf48d52223 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/30328Tested-by: 's avatarChris Forbes <chrisforbes@google.com> Presubmit-Ready: Chris Forbes <chrisforbes@google.com> Reviewed-by: 's avatarBen Clayton <bclayton@google.com>
parent 8c56e8d3
...@@ -67,7 +67,11 @@ namespace sw ...@@ -67,7 +67,11 @@ namespace sw
routine.getVariable(it->second.Id)[it->second.FirstComponent] = As<Float4>(frontFacing); routine.getVariable(it->second.Id)[it->second.FirstComponent] = As<Float4>(frontFacing);
} }
auto activeLaneMask = SIMD::Int(0xFFFFFFFF); // TODO: Control this. // Note: all lanes initially active to facilitate derivatives etc. Actual coverage is
// handled separately, through the cMask.
auto activeLaneMask = SIMD::Int(0xFFFFFFFF);
routine.killMask = 0;
spirvShader->emit(&routine, activeLaneMask, descriptorSets); spirvShader->emit(&routine, activeLaneMask, descriptorSets);
spirvShader->emitEpilog(&routine); spirvShader->emitEpilog(&routine);
......
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