DirectXShaderCompiler
DirectXShaderCompiler copied to clipboard
CoopVec Diagnose and test invalid use of CoopVec builtins in HLSL
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
Add the following Diagnostic checks + tests:
- Validate constant args
- Validate enum values: a. Input/Matrix/Bias Interpretation b. Matrix Layouts: b1. Matrix Layout must be OuterProductOptimal for OuterProduct
- Check Illegal combinations a. Layout x Transpose b. Layout x Interpretation
- Check If the Input/Ouput vector and Matrix Dimensions are valid combinations
- Matrix Stride must be zero for optimal layouts
- Validate IsUnsigned setting
See https://devblogs.microsoft.com/directx/shader-model-6-9-and-the-future-of-cooperative-vector/