[PIX] Recompute shader flags after NURI instrumentation - #8846
Open
Damyan Pepper (damyanp) wants to merge 1 commit into
Open
[PIX] Recompute shader flags after NURI instrumentation#8846Damyan Pepper (damyanp) wants to merge 1 commit into
Damyan Pepper (damyanp) wants to merge 1 commit into
Conversation
The non-uniform resource index pass inserts WaveActiveAllEqual to test whether a dynamic index is uniform. It inserts these calls after the compiler computed the shader flags. The module can therefore declare no wave operations and still contain them, and the validator refuses that module. The pass computes the flags again, but only when it changed the module. Assisted-by: Copilot Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 40dc9de3-617e-4caf-ab0d-fba0a033ed93
Damyan Pepper (damyanp)
requested a review
from Austin Kinross (austinkinross)
August 27, 2026 23:35
Damyan Pepper (damyanp)
marked this pull request as ready for review
August 27, 2026 23:37
Austin Kinross (austinkinross)
approved these changes
Aug 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Recomputes DXIL shader flags after PIX NURI instrumentation inserts wave operations.
Changes:
- Recollects shader flags before metadata re-emission.
- Adds regression validation for the WaveOps flag.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
lib/DxilPIXPasses/DxilNonUniformResourceIndexInstrumentation.cpp |
Recomputes shader flags after instrumentation. |
tools/clang/unittests/HLSL/PixTest.cpp |
Tests instrumented module validation and wave-op insertion. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // index already marked NonUniformResourceIndex would be skipped. | ||
| // Instrumentation inserts WaveActiveAllEqual, which requires the WaveOps | ||
| // shader flag. | ||
| auto compiled = Compile(m_dllSupport, source, L"ps_6_6", {L"-Od"}); |
| VERIFY_IS_FALSE(IsPermittedValidationException(realDiagnostic)); | ||
| } | ||
|
|
||
| TEST_F(PixTest, Validation_NonUniformResourceIndex_WaveOpsFlag) { |
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.
The non-uniform resource index pass inserts WaveActiveAllEqual to test whether a dynamic index is uniform. It inserts these calls after the compiler computed the shader flags. The module can therefore declare no wave operations and still contain them, and the validator refuses that module.
The pass computes the flags again, but only when it changed the module.
Assisted-by: Copilot
Stack created with GitHub Stacks CLI • Give Feedback 💬