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: Rationalize UAV generation #6883

Merged
merged 20 commits into from
Sep 3, 2024

Conversation

jeffnn
Copy link
Collaborator

@jeffnn jeffnn commented Aug 28, 2024

The impetus for these changes was unexplained crashes in a display driver while attempting to create a debug-instrumented shader for PIX. The heart of it is the new test in pixtest.cpp: use the compiler to generate a raw UAV, and then compare the generated DXIL with what PIX generates for the same purpose.
Some of the PIX passes need only one UAV for a module, but some need two or more. In the latter case, the previous code was a bit loose about what it was doing with respect to adding the UAV resource, and creating its handles for each interested function. Most of the actual changes herein are to do with that.
Lastly, the PIX UAV is raw at the D3D API level, but the instrumentation had been doing non-raw writes. No driver seemed to care, but I've fixed it anyway.

@jeffnn jeffnn requested a review from a team as a code owner August 28, 2024 00:54
Copy link
Contributor

github-actions bot commented Aug 28, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@jeffnn jeffnn self-assigned this Aug 28, 2024
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 merged commit bf24b7a into microsoft:main Sep 3, 2024
12 checks passed
@jeffnn jeffnn deleted the PIX_GraphNodeShaderdebug1 branch September 3, 2024 16:02
jeffnn added a commit to jeffnn/DirectXShaderCompiler that referenced this pull request Sep 4, 2024
The impetus for these changes was unexplained crashes in a display
driver while attempting to create a debug-instrumented shader for PIX.
The heart of it is the new test in pixtest.cpp: use the compiler to
generate a raw UAV, and then compare the generated DXIL with what PIX
generates for the same purpose.
Some of the PIX passes need only one UAV for a module, but some need two
or more. In the latter case, the previous code was a bit loose about
what it was doing with respect to adding the UAV resource, and creating
its handles for each interested function. Most of the actual changes
herein are to do with that.
Lastly, the PIX UAV is raw at the D3D API level, but the instrumentation
had been doing non-raw writes. No driver seemed to care, but I've fixed
it anyway.

(cherry picked from commit bf24b7a)
jeffnn added a commit to jeffnn/DirectXShaderCompiler that referenced this pull request Sep 4, 2024
The impetus for these changes was unexplained crashes in a display
driver while attempting to create a debug-instrumented shader for PIX.
The heart of it is the new test in pixtest.cpp: use the compiler to
generate a raw UAV, and then compare the generated DXIL with what PIX
generates for the same purpose.
Some of the PIX passes need only one UAV for a module, but some need two
or more. In the latter case, the previous code was a bit loose about
what it was doing with respect to adding the UAV resource, and creating
its handles for each interested function. Most of the actual changes
herein are to do with that.
Lastly, the PIX UAV is raw at the D3D API level, but the instrumentation
had been doing non-raw writes. No driver seemed to care, but I've fixed
it anyway.

(cherry picked from commit bf24b7a)
jeffnn added a commit that referenced this pull request Sep 5, 2024
The impetus for these changes was unexplained crashes in a display
driver while attempting to create a debug-instrumented shader for PIX.
The heart of it is the new test in pixtest.cpp: use the compiler to
generate a raw UAV, and then compare the generated DXIL with what PIX
generates for the same purpose.
Some of the PIX passes need only one UAV for a module, but some need two
or more. In the latter case, the previous code was a bit loose about
what it was doing with respect to adding the UAV resource, and creating
its handles for each interested function. Most of the actual changes
herein are to do with that.
Lastly, the PIX UAV is raw at the D3D API level, but the instrumentation
had been doing non-raw writes. No driver seemed to care, but I've fixed
it anyway.

(cherry picked from commit bf24b7a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants