Linalg vali matrixstoretodescriptor - #8771
Open
Ashley Coleman (V-FEXrt) wants to merge 4 commits into
Open
Conversation
Contributor
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds DXIL validation rules for LinAlgMatrixStoreToDescriptor.
Changes:
- Validates layout, matrix scope, UAV resource type, and alignment.
- Adds diagnostics and negative validation tests.
- Updates existing fixtures to use valid layout and alignment values.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
utils/hct/hctdb.py |
Adds the layout validation rule. |
lib/DxilValidation/DxilValidation.cpp |
Implements descriptor-store validation. |
docs/DXIL.rst |
Documents the new diagnostic. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretodescriptor.ll |
Tests invalid operands and matrix scope. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-vs.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ps.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-cs.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-hs.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ds.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-gs.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ms.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-as.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-node.ll |
Uses valid store arguments. |
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-raytracing.ll |
Updates ray-tracing fixtures. |
tools/clang/test/CodeGenDXIL/hlsl/linalg/builtins/matrixstoretodescriptor/nominal.hlsl |
Updates nominal alignment expectations. |
Suppressed comments (1)
lib/DxilValidation/DxilValidation.cpp:1188
- The nonconstant
Alignrejection is also untested: current cases cover zero and a non-multiple only. Add a runtime i32 alignment case and verify the immediate-constant diagnostic so this branch cannot regress.
} else
ValCtx.EmitInstrFormatError(CI, ValidationRule::InstrOpConst,
{"Align", "LinAlgMatrixStoreToDescriptor"});
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 15 out of 15 changed files in this pull request and generated no new comments.
Suppressed comments (2)
lib/DxilValidation/DxilValidation.cpp:1131
- This adds user-visible validation behavior for experimental Shader Model 6.10. Please add a single-sentence entry under
### Upcoming Preview Releaseindocs/ReleaseNotes.md, as required for significant compiler behavior changes byCONTRIBUTING.md.
ValidateLinAlgOpParameters(CI, ValCtx);
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretodescriptor.ll:28
- This case uses an SRV RawBuffer, so it exercises only the UAV-class half of the new resource check; it would still pass if the
RawBuffer-kind check were removed. Add a second case using a UAV of a non-RawBuffer kind (for example, a typed or structured UAV) and verify the same diagnostic.
%6 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 11, i32 0 }) ; AnnotateHandle(res,props) resource: ByteAddressBuffer
call void @dx.op.linAlgMatrixStoreToDescriptor.mC8M4N4U0S1(i32 -2147483628, %dx.types.LinAlgMatrixC8M4N4U0S1 %4, %dx.types.Handle %6, i32 0, i32 0, i32 0, i32 128) ; LinAlgMatrixStoreToDescriptor(matrix,handle,offset,stride,layout,align)
Damyan Pepper (damyanp)
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #8497
Implements validation rules for MatrixStoreToDescriptor