Skip to content

Commit 9fdd756

Browse files
authored
Execution Tests: Prevent sinking in long vector derivative hlk (#8054)
This PR adds a workaround to the hlk long vector derivative tests to prevent sinking of the derivative call into the conditional. This is a known bug in DXC that will not be fixed for 6.9 release. DXC bug tracked via issue #8001
1 parent e5c51ea commit 9fdd756

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tools/clang/unittests/HLSLExec/ShaderOpArith.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4475,6 +4475,10 @@ void MSMain(uint GID : SV_GroupIndex,
44754475
44764476
vector<OUT_TYPE, NUM> Result = DERIVATIVE_FUNC(Vector);
44774477
4478+
// Prevents the above derivative call from being sunk into the if
4479+
// condition below. DXC Bug: https://github.com/microsoft/DirectXShaderCompiler/issues/8001
4480+
Result = WaveReadLaneAt(Result, 3);
4481+
44784482
// For coarse derivatives, all lanes in the quad get the same result.
44794483
// But for fine derivatives, each lane gets a different result. To
44804484
// keep things generic we only store in the third lane as thats the

0 commit comments

Comments
 (0)