Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PIX: split vector alloca writes to enable debug instrumentation #6990

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

jeffnn
Copy link
Collaborator

@jeffnn jeffnn commented Oct 29, 2024

Bit of background: PIX's debug passes add new allocas, stores to which tie debug info to DXIL Values.
In the case of a preexisting alloca, PIX will still add its debug writes, but the codegen may have emitted vector-valued stores. Concretely, this happens for the ray payload and RayDesc structs in DXR. Those vector-values stores were being treated incorrectly, resulting in missing values in the PIX shader debugger.

This change splits vector-valued stores to such allocas into extractelement/scalar-stores, which enables the rest of the PIX instrumentation to function as expected.

(Worth noting that this change only applies to the PIX shader debugging pass.)

@jeffnn jeffnn self-assigned this Oct 29, 2024
@jeffnn jeffnn requested a review from a team as a code owner October 29, 2024 17:42
Copy link
Member

@damyanp damyanp left a comment

Choose a reason for hiding this comment

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

LGTM, but we should get a review from someone more familiar with all of this. @adam-yang perhaps?

Is there a reason that the testing for this isn't filecheck based?

Copy link
Contributor

@adam-yang adam-yang left a comment

Choose a reason for hiding this comment

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

Only big one is the leak.

@jeffnn
Copy link
Collaborator Author

jeffnn commented Nov 20, 2024

LGTM, but we should get a review from someone more familiar with all of this. @adam-yang perhaps?

Is there a reason that the testing for this isn't filecheck based?

Yes: you can't get the textual pass "printf" output via filecheck.

Copy link
Contributor

@adam-yang adam-yang left a comment

Choose a reason for hiding this comment

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

LGTM!

@jeffnn jeffnn requested a review from damyanp November 21, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

Successfully merging this pull request may close these issues.

3 participants