Skip to content

[SM6.10] LinAlg Validation: Rebuild stage error tests with valid calls - #8800

Merged
Ashley Coleman (V-FEXrt) merged 1 commit into
microsoft:mainfrom
V-FEXrt:linalg-vali-fix-stage-tests
Aug 19, 2026
Merged

[SM6.10] LinAlg Validation: Rebuild stage error tests with valid calls#8800
Ashley Coleman (V-FEXrt) merged 1 commit into
microsoft:mainfrom
V-FEXrt:linalg-vali-fix-stage-tests

Conversation

@V-FEXrt

Copy link
Copy Markdown
Collaborator

This PR rebuilds the "stage error" DXIL tests that existed only to test if a LinAlg operation was allowed in a given shader stage.

These tests were written so early on that they violated pretty much every linalg validation rule causing them all to need to be updated for every single validation PR. Due to the nature of those updates at IR level they would constantly create unnecessary merge conflicts.

This PR does the following

  • rebuilds the tests using the linalg.h header to avoid validation failures
  • renames them from linalg-foo.ll to linalg-stage-foo.ll to make it a bit clearer what they test
  • splits linalg-raytracing.ll into 6 linalg-foo.ll separate tests to it matches the one-stage-per-test pattern setup by all the other tests

Copilot AI balanced review requested due to automatic review settings August 18, 2026 22:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR updates the DXIL validator coverage for LinAlgMatrix by replacing older per-stage IR tests with a set of new “stage-*” tests that exercise stage restrictions across more shader stages (including raytracing library stages), while keeping a compute-shader case that validates successfully.

Changes:

  • Removed legacy LinAlgMatrix DXIL validation tests for VS/PS/CS/AS/Node.
  • Added new LinAlgMatrix stage-focused validation tests for VS/PS/CS/AS/MS/Node and raytracing library stages (raygeneration/intersection).
  • Updated expected diagnostics to include stage-related restrictions (e.g., TGSM usage outside compute).

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-vs.ll Removed legacy VS validation test.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-ps.ll Removed legacy PS validation test.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-cs.ll Removed legacy CS validation test.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-as.ll Removed legacy AS validation test.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-node.ll Removed legacy Node validation test.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-vs.ll Added VS-stage validation expectations for LinAlgMatrix/TGSM restrictions.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-ps.ll Added PS-stage validation expectations for LinAlgMatrix/TGSM restrictions.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-cs.ll Added CS-stage “Validation succeeded” coverage for same opcode set.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-as.ll Added AS-stage validation expectations for LinAlgMatrix restrictions.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-ms.ll Added MS-stage validation expectations for LinAlgMatrix restrictions.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-node.ll Added Node-stage validation expectations for LinAlgMatrix restrictions.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-raygeneration.ll Added raygeneration (lib) validation expectations for LinAlgMatrix/TGSM restrictions.
tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-stage-intersection.ll Added intersection (lib) validation expectations for LinAlgMatrix/TGSM restrictions.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@damyanp Damyan Pepper (damyanp) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - I've skimmed a few of these and figure that any other problems in them will be teased out as more validation is added.

@V-FEXrt
Ashley Coleman (V-FEXrt) merged commit 600ed47 into microsoft:main Aug 19, 2026
14 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Aug 19, 2026
@V-FEXrt
Ashley Coleman (V-FEXrt) deleted the linalg-vali-fix-stage-tests branch August 19, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants