microsoft / microsoft/DirectXShaderCompiler

LinAlg: restrict input vector component based on input ComponentEnum

Open
#8,398 0 comments 0 reactions 1 assignee View on GitHub

@V-FEXrt is already working on this.

Since Jul 22, 2026.

bug needs-triage
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

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.