Skip to content

[HLSL] [DirectX] WaveSize entry attribute is not encoded in the DXIL #164702

@Icohedron

Description

@Icohedron

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

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

Clang LLVM metadata

!6 = !{ptr @CSMain, !"CSMain", null, null, !7}
!7 = !{i32 4, !8}
!8 = !{i32 64, i32 1, i32 1}

DXC LLVM metadata

!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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions