microsoft / microsoft/DirectXShaderCompiler

WaveMatch with a vector input value

Open
#5,184 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The spec. of SM6.5 says:
uint4 WaveMatch( val )
...

val can be any expression which evaluates to any of the currently supported primitive data types (e.g. float4, uint2, etc.).

in https://microsoft.github.io/DirectX-Specs/d3d/HLSL_ShaderModel6_5.html

However, when I use WaveMatch(uint4), it shows a validation error:
1>Content\Shaders/ImpactRange.hlsli(59,18): error G315CBA34: Instructions must be of an allowed type.
1>note: at '%1219 = insertvalue %dx.types.fouri32 %1214, i32 %1218, 0' in block '#33' of function 'main'.

The error is only reported by the debug mode (disable optimization and enable debug info). Under release mode, it is silent. Anyway, after seeing this error, I even doubt whether dxcompiler really allows and has implemented uint4 val following the spec. description.

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

Start with the WaveMatch(uint4) use at Content\Shaders\ImpactRange.hlsli:59 and compare it with the SM 6.5 specification. Reproduce the validation error with optimization disabled and debug information enabled, then determine whether the compiler rejects a supported vector input; done means the implementation behavior is confirmed against the specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.