Skip to content

[PIX] Attribute library accesses to reaching entry points - #8849

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

[PIX] Attribute library accesses to reaching entry points#8849
Damyan Pepper (damyanp) wants to merge 1 commit into
users/damyanp/pix-fixes-07from
users/damyanp/pix-fixes-08

Conversation

@damyanp

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

Copy link
Copy Markdown
Member

Part 8 of 14 in the PIX instrumentation stack. It targets users/damyanp/pix-fixes-07, which supplies the bind-point test support.

The pass either skips a helper function in a library or gives its access the Library shader kind. Library is the kind of the module. It does not identify the pipeline stage that reaches the access. PIX cannot tell whether a record comes from a ray generation, closest-hit, or miss shader.

The access record holds the instruction number in a field of 24 bits. A larger number overflows into the adjacent fields of the record.

PIX receives records for helper functions, and each record carries a pipeline stage. A tool that filtered out records with the Library kind will see more data.

Assisted-by: Copilot

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


Stack created with GitHub Stacks CLIGive Feedback 💬

The pass either skips a helper function in a library or gives its access the Library shader kind. Library is the kind of the module. It does not identify the pipeline stage that reaches the access. PIX cannot tell whether a record comes from a ray generation, closest-hit, or miss shader.

The access record holds the instruction number in a field of 24 bits. A larger number overflows into the adjacent fields of the record.

PIX receives records for helper functions, and each record carries a pipeline stage. A tool that filtered out records with the Library kind will see more data.

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

Attributes PIX resource-access records in library helpers to their reaching shader entry-point kind and prevents instruction ordinals from corrupting adjacent record fields.

Changes:

  • Resolves shader kinds through the library call graph.
  • Masks instruction ordinals to 24 bits.
  • Adds library-helper and bindless-access tests.

Reviewed changes

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

File Description
lib/DxilPIXPasses/DxilShaderAccessTracking.cpp Adds shader-kind propagation and safe record encoding.
tools/clang/test/HLSLFileCheck/pix/AccessTrackingLibHelperShaderKind.hlsl Verifies ray-generation encoding in a helper.
tools/clang/unittests/HLSL/PixTest.cpp Adds instrumentation and validation tests.

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

Comment on lines +849 to +853
auto emplaced =
functionToShaderKind.emplace(reached, entryPointShaderKind);
if (!emplaced.second && emplaced.first->second != entryPointShaderKind) {
emplaced.first->second = ambiguousShaderKind;
}
Comment on lines +1335 to +1336
uint32_t value =
static_cast<uint32_t>(strtoul(line.c_str() + position, &end, 10));
Comment on lines +557 to +559
constexpr uint32_t InstructionOrdinalMask = 0x00FF'FFFF;
uint32_t EncodedInstructionNumber =
(InstructionNumber & InstructionOrdinalMask) |
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