Skip to content

CP: PIX: Deduplicate globals when referenced in multiple library fns (#6305)#6313

Merged
jeffnn merged 1 commit intomicrosoft:release-1.8.2403from
jeffnn:PIX_CP_DeDupeGlobals
Feb 15, 2024
Merged

CP: PIX: Deduplicate globals when referenced in multiple library fns (#6305)#6313
jeffnn merged 1 commit intomicrosoft:release-1.8.2403from
jeffnn:PIX_CP_DeDupeGlobals

Conversation

@jeffnn
Copy link
Copy Markdown
Collaborator

@jeffnn jeffnn commented Feb 15, 2024

PIX's code for parsing debug data operates at the module level. When the same global is referenced by multiple functions in a module, that variable is referred to by multiple dbg.value/dbg.declare statements, and those are mapped (by the PIX passes) to multiple fake allocas using its usual scheme. This code was written before libraries were a thing, and wasn't expecting this duplication. A little more attention to the variable's scope fixes the issue.
Also, the changed code's original "return false" broke the whole process of discovering variables with the results that PIX's shader debugger locals window was completely empty. Makes more sense to ignore the one variable and keep going.

(cherry picked from commit 64cdb9c)

…rosoft#6305)

PIX's code for parsing debug data operates at the module level. When the
same global is referenced by multiple functions in a module, that
variable is referred to by multiple dbg.value/dbg.declare statements,
and those are mapped (by the PIX passes) to multiple fake allocas using
its usual scheme. This code was written before libraries were a thing,
and wasn't expecting this duplication. A little more attention to the
variable's scope fixes the issue.
Also, the changed code's original "return false" broke the whole process
of discovering variables with the results that PIX's shader debugger
locals window was completely empty. Makes more sense to ignore the one
variable and keep going.

(cherry picked from commit 64cdb9c)
@jeffnn jeffnn self-assigned this Feb 15, 2024
@jeffnn jeffnn requested a review from a team as a code owner February 15, 2024 17:36
Copy link
Copy Markdown
Collaborator

@pow2clk pow2clk left a comment

Choose a reason for hiding this comment

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

Looks good!

@jeffnn jeffnn merged commit 476d344 into microsoft:release-1.8.2403 Feb 15, 2024
@jeffnn jeffnn deleted the PIX_CP_DeDupeGlobals branch February 15, 2024 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants