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

[SPIRV] Use copy-in/copy-out for non-declaration #7127

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

s-perron
Copy link
Collaborator

@s-perron s-perron commented Feb 6, 2025

DXC tries to avoid the copy-in-copy-out for some parameters when it
thinks it is possible. However, the SPIR-V spec says that if a parameter
is a pointer, it must point to a memory object declarion or a pointer to
an element in a sampler or image array.

This PR enforces this. If the pointer for the parameter is not an
OpVariable (a memory object declaration), then we do not elide the
copy-in copy-out.

Fixes #7095
Fixes #5191
Fixes #3645

DXC tries to avoid the copy-in-copy-out for some parameters when it
thinks it is possible. However, the SPIR-V spec says that if a parameter
is a pointer, it must point to a memory object declarion or a pointer to
an element in a sampler or image array.

This PR enforces this. If the pointer for the parameter is not an
OpVariable (a memory object declaration), then we do not elide the
copy-in copy-out.

Fixes microsoft#7095
Fixes microsoft#5191
@s-perron s-perron requested a review from a team as a code owner February 6, 2025 16:17
@s-perron s-perron enabled auto-merge (squash) February 6, 2025 19:53
@devshgraphicsprogramming

How badly does this affect our inout is restrict & assuming hacks?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment