microsoft / microsoft/DirectXShaderCompiler
LinAlg: restrict input vector component based on input ComponentEnum
@V-FEXrt is already working on this.
Since Jul 22, 2026.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
Description
See the Convert() API in the linalg.h header here:
https://github.com/microsoft/DirectXShaderCompiler/blob/c763461468246fb779fb234b08ad3b460fb93a02/tools/clang/lib/Headers/hlsl/dx/linalg.h#L238
And the MakeInterpretedVector() API:
https://github.com/microsoft/DirectXShaderCompiler/blob/c763461468246fb779fb234b08ad3b460fb93a02/tools/clang/lib/Headers/hlsl/dx/linalg.h#L230
These both need to implement a restriction for the allowed input vector's native HLSL component type based on the ComponentType (or ComponentEnum) enum value for that input vector.
For instance, this check would report an error when using an input vector<float, ...> with ComponentType::PackedS8x32 for that input.
We should also look for any other APIs where this restriction should apply.
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.
Assessment
This issue has not been assessed yet.