Description
DXC can sink a call to SetMeshOutputCounts into a scalar branch if the branches are used to compute the number of vertices/indices. Anecdotally I have been able to fix it by wrapping the branch condition with WaveReadLaneFirst, despite the branch being scalar anyway.
Steps to Reproduce
See https://godbolt.org/z/oca77vqGh
Actual Behavior
DXC validation fails after SetMeshOutputCounts is duplicated in resulting DXIL:
<source>:32:5: error: SetMeshOUtputCounts cannot be called multiple times.
Environment
- DXC version: DXC 1.8.2505 on compiler explorer
- Host Operating System Observed on: windows and linux (via compiler explorer)
Description
DXC can sink a call to
SetMeshOutputCountsinto a scalar branch if the branches are used to compute the number of vertices/indices. Anecdotally I have been able to fix it by wrapping the branch condition withWaveReadLaneFirst, despite the branch being scalar anyway.Steps to Reproduce
See https://godbolt.org/z/oca77vqGh
Actual Behavior
DXC validation fails after SetMeshOutputCounts is duplicated in resulting DXIL:
<source>:32:5: error: SetMeshOUtputCounts cannot be called multiple times.Environment