microsoft / microsoft/DirectXShaderCompiler

missing textual information (comments section) about WaveSize range syntax / kDxilRangedWaveSizeTag in SM6.8 shaders

Open
#6,813 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug dxil sm6.8
Dominant language
C++
Stars
3.7k
Forks
900
Avg merge
2d 11h
Merged PRs (30d)
44

Description

Description
DXC outputs textual information about the WaveSize / kDxilWaveSizeTag in the comments section in the beginning, when present in SM6.6+ shaders. This does not happen when using the WaveSize range syntax / kDxilRangedWaveSizeTag in SM6.8+ shaders.

Steps to Reproduce

// -T cs_6_8 -E main

Buffer<float4> input : register(t0);
RWBuffer<float4> output : register(u0);

#if 0
    // output as expected
    // ; Compute Shader
    // ; NumThreads=(8,1,1)
    // ; WaveSize=32
    [WaveSize(32)]
#else
    // no output, just
    // ; Compute Shader
    // ; NumThreads=(8,1,1)
    [WaveSize(16, 32, 16)]
#endif

[numthreads(8, 1, 1)]
void main(
	in uint3 Gid : SV_GroupID,
	in uint3 DTid : SV_DispatchThreadID,
	in uint3 GTid : SV_GroupThreadID,
	in uint GIdx : SV_GroupIndex)
{
	const uint address = DTid.x;
	const float4 val = input[address];
	output[address] = val;
}

https://hlsl.godbolt.org/z/ceW89b8T9

Environment

  • DXC version: tested every compiler release since SM6.8 support was integrated (v1.8.2403), including trunk
  • Host Operating System: 10.0.19045.4651

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compile the supplied SM6.8 shader with the WaveSize range syntax and compare its comments with the [WaveSize(32)] case. Trace how DXC emits the opening textual comments and handles kDxilRangedWaveSizeTag, then ensure the range form is represented there and verify the output against the reproduction.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.