microsoft / microsoft/DirectXShaderCompiler
missing textual information (comments section) about WaveSize range syntax / kDxilRangedWaveSizeTag in SM6.8 shaders
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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