Issue 164702
Summary [HLSL] [DXIL] HLSL Wave Size is not encoded in the DXIL
Labels backend:DirectX, HLSL
Assignees
Reporter Icohedron
    [HLSL Wave Size](https://microsoft.github.io/DirectX-Specs/d3d/HLSL_SM_6_6_WaveSize.html#hlsl-wave-size) is not written to the DXIL.
Therefore HLSL shaders using `[WaveSize(64)]` run with a wave size of 32.

https://godbolt.org/z/a616bKjP1

```hlsl
// compile args: -T cs_6_7 -E CSMain
[numthreads(64, 1, 1)][WaveSize(64)]
void CSMain() {}
```

Clang LLVM metadata
```llvm
!6 = !{ptr @CSMain, !"CSMain", null, null, !7}
!7 = !{i32 4, !8}
!8 = !{i32 64, i32 1, i32 1}
```

DXC LLVM metadata
```llvm
!16 = !{i32 1, void ()* @CSMain, !17}
!17 = !{!18}
!18 = !{i32 1, !2, !2}
!19 = !{void ()* @CSMain, !"CSMain", null, null, !20}
!20 = !{i32 4, !21, i32 11, !22}
!21 = !{i32 64, i32 1, i32 1}
!22 = !{i32 64}
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to