You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DXC can sink and duplicate SetMeshOutputCounts if the inputs are computed within a scalar branch #8104
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.
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)
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: DC94:3F9BEF:447318F:5993951:69EBE042)
Activity
damyanp commentedon Feb 3, 2026
A possible workaround for this is to change the SetMeshOutputs call to:
See https://godbolt.org/z/W4bh6dErW
llvm-beanz commentedon Apr 24, 2026
The correct fix here is that we should just annotate these operations with
noduplicate.Copilot commentedon Apr 24, 2026
The agent encountered an error and was unable to start working on this issue: Please try again later, or contact support if the problem persists. (Request id: DC94:3F9BEF:447318F:5993951:69EBE042)
damyanp commentedon Apr 24, 2026
Chris B (@llvm-beanz) - can you have copilot work on this in your fork please?