Skip to content

[PIX] Recompute shader flags after NURI instrumentation - #8846

Open
Damyan Pepper (damyanp) wants to merge 1 commit into
users/damyanp/pix-fixes-04from
users/damyanp/pix-fixes-05
Open

[PIX] Recompute shader flags after NURI instrumentation#8846
Damyan Pepper (damyanp) wants to merge 1 commit into
users/damyanp/pix-fixes-04from
users/damyanp/pix-fixes-05

Conversation

@damyanp

@damyanp Damyan Pepper (damyanp) commented Aug 27, 2026

Copy link
Copy Markdown
Member

Part 5 of 14 in the PIX instrumentation stack. It targets users/damyanp/pix-fixes-04. Its content depends on PR 3, which changes the same pass and the same cleanup path.

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

This changes only the PIX instrumentation, so it needs no release note.


Stack created with GitHub Stacks CLIGive Feedback 💬

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

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

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) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

3 participants