[SM6.10] Define and Dump LinAlg PSV0 runtime data - #8913
Open
Ashley Coleman (V-FEXrt) wants to merge 2 commits into
Open
[SM6.10] Define and Dump LinAlg PSV0 runtime data#8913Ashley Coleman (V-FEXrt) wants to merge 2 commits into
Ashley Coleman (V-FEXrt) wants to merge 2 commits into
Conversation
Add the PSV0 LinAlg runtime record layout and teach the PSV reader and writer to serialize the optional tables. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Print the optional LinAlg runtime tables and resolve their operation shape references in PSV dumps. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot started reviewing on behalf of
Ashley Coleman (V-FEXrt)
September 11, 2026 23:01
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical PSV0 compatibility, validation, and shader-dump test issues block approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds Shader Model 6.10 PSV0 Linear Algebra runtime metadata support, including definitions, serialization/deserialization, and shader-dump output.
Changes:
- Defines LinAlg runtime records, flags, and accessors.
- Adds PSV0 container I/O and diagnostic printing.
- Adds round-trip and dump-output regression coverage.
File summaries
| File | Reviewed changes and final notes |
|---|---|
tools/clang/unittests/HLSL/DxilContainerTest.cpp |
Adds LinAlg serialization and round-trip coverage. |
tools/clang/test/DXC/dumpPSV_VS.hlsl |
Updates dump checks. Critical finding (1 vote): requires dxil-1-8 although the v4-only line needs 1.10 or conditional checks. |
tools/clang/test/DXC/dumpPSV_PS.hlsl |
Updates dump checks. Critical finding (1 vote): requires dxil-1-8 although the v4-only line needs 1.10 or conditional checks. |
tools/clang/test/DXC/dumpPSV_MS.hlsl |
Updates PSV dump expectations. |
tools/clang/test/DXC/dumpPSV_HS.hlsl |
Updates dump checks. Critical finding (1 vote): requires dxil-1-8 although the v4-only line needs 1.10 or conditional checks. |
tools/clang/test/DXC/dumpPSV_GS.hlsl |
Updates dump checks. Critical finding (1 vote): requires dxil-1-8 although the v4-only line needs 1.10 or conditional checks. |
tools/clang/test/DXC/dumpPSV_DS.hlsl |
Updates dump checks. Critical finding (1 vote): requires dxil-1-8 although the v4-only line needs 1.10 or conditional checks. |
tools/clang/test/DXC/dumpPSV_CS.hlsl |
Updates PSV dump expectations. |
tools/clang/test/DXC/dumpPSV_AS.hlsl |
Updates PSV dump expectations. |
lib/DxilContainer/DxilPipelineStateValidation.cpp |
Prints LinAlg runtime metadata. |
include/dxc/DxilContainer/DxilPipelineStateValidation.h |
Adds LinAlg records and PSV0 I/O. Findings: critical wire-size compatibility (1 vote) and validator trailer parsing (3 votes); moderate shape-table presence (2 votes) and stale pointer (1 vote); nit release note (3 votes). |
Review details
Suppressed comments (1)
include/dxc/DxilContainer/DxilPipelineStateValidation.h:1350
- On a successful second
InitFromPSV0orInitNewcall without the flag, this condition is false butm_pPSVLinAlgRuntimeInfo0still points into the previous blob.Print()checks that pointer directly and will dump stale LinAlg records, while the getters expose stale counts. Reset the LinAlg runtime pointer before this branch.
bool HasLinAlgRuntimeInfo =
m_pPSVRuntimeInfo4 &&
(m_pPSVRuntimeInfo4->Flags &
static_cast<uint32_t>(PSVRuntimeInfo4Flag::LinAlgRuntimeInfoPresent));
PSVLinAlgRuntimeInfo0 tempLinAlgRuntimeInfo = {};
- Files reviewed: 11/11 changed files
- Comments generated: 9
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
185
to
+187
| struct PSVRuntimeInfo4 : public PSVRuntimeInfo3 { | ||
| uint32_t NumBytesGroupSharedMemory; | ||
| uint32_t Flags; // PSVRuntimeInfo4Flag |
Comment on lines
+1175
to
+1179
| // If PSVRuntimeInfo4::Flags has LinAlgRuntimeInfoPresent: | ||
| // uint32_t PSVLinAlgRuntimeInfo_size | ||
| // { PSVLinAlgRuntimeInfoN structure } | ||
| // For each non-empty LinAlg record table, in declaration order: | ||
| // uint32_t record_size |
| // CHECK-NEXT: SigOutputVectors[2]: 0 | ||
| // CHECK-NEXT: SigOutputVectors[3]: 0 | ||
| // CHECK-NEXT: EntryFunctionName: main | ||
| // CHECK-NEXT: LinAlgRuntimeInfoPresent: false |
| // CHECK-NEXT: SigOutputVectors[2]: 0 | ||
| // CHECK-NEXT: SigOutputVectors[3]: 0 | ||
| // CHECK-NEXT: EntryFunctionName: main | ||
| // CHECK-NEXT: LinAlgRuntimeInfoPresent: false |
| // CHECK-NEXT: SigOutputVectors[2]: 0 | ||
| // CHECK-NEXT: SigOutputVectors[3]: 0 | ||
| // CHECK-NEXT: EntryFunctionName: main | ||
| // CHECK-NEXT: LinAlgRuntimeInfoPresent: false |
| // CHECK-NEXT: SigOutputVectors[2]: 0 | ||
| // CHECK-NEXT: SigOutputVectors[3]: 0 | ||
| // CHECK-NEXT: EntryFunctionName: main | ||
| // CHECK-NEXT: LinAlgRuntimeInfoPresent: false |
| // CHECK-NEXT: SigOutputVectors[2]: 0 | ||
| // CHECK-NEXT: SigOutputVectors[3]: 0 | ||
| // CHECK-NEXT: EntryFunctionName: main | ||
| // CHECK-NEXT: LinAlgRuntimeInfoPresent: false |
Comment on lines
+614
to
+618
| return LinAlgMatrixConstructionCount || | ||
| LinAlgThreadMatrixVectorMultiplyCount || | ||
| LinAlgWaveMatrixMultiplyCount || | ||
| LinAlgThreadGroupMatrixMultiplyCount || LinAlgOuterProductCount || | ||
| LinAlgAccumulateStoreCount; |
Comment on lines
+178
to
+182
| enum class PSVRuntimeInfo4Flag : uint32_t { | ||
| None = 0x00000000, | ||
| // Indicates use of LinAlg operations beyond the Tier 1 required set, thus | ||
| // the presence of the PSVLinAlgRuntimeInfo structure with usage details. | ||
| LinAlgRuntimeInfoPresent = 0x00000001, |
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.
Part of #7843
Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com