DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

CoopVec Diagnose and test invalid use of CoopVec builtins in HLSL

Open simoll opened this issue 1 year ago • 2 comments

Diagnose problems specific to CoopVec during sema and test for those diagnostics.

Current CoopVec implementation has no CoopVec-specific diagnostics on HLSL level. Invalid use of the builtins is rejected only by the DXIl validator.

Originally posted by @tex3d in https://github.com/microsoft/DirectXShaderCompiler/pull/7290#discussion_r2038732359

simoll avatar Apr 11 '25 05:04 simoll

Add the following Diagnostic checks + tests:

  1. Validate constant args
  2. Validate enum values: a. Input/Matrix/Bias Interpretation b. Matrix Layouts: b1. Matrix Layout must be OuterProductOptimal for OuterProduct
  3. Check Illegal combinations a. Layout x Transpose b. Layout x Interpretation
  4. Check If the Input/Ouput vector and Matrix Dimensions are valid combinations
  5. Matrix Stride must be zero for optimal layouts
  6. Validate IsUnsigned setting

anupamachandra avatar Apr 23 '25 15:04 anupamachandra

See https://devblogs.microsoft.com/directx/shader-model-6-9-and-the-future-of-cooperative-vector/

damyanp avatar Sep 17 '25 00:09 damyanp