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

Set the layout rule explicitly for raw buffer operations #6701

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

s-perron
Copy link
Collaborator

The first first fix in #5392 was not correct. It relied on the layout
rule for the address to be the correct layout rule, but that is not
always the case. The address is just an integer that could exist in any
storage class. The correct solution is to explicitly set the layout rule
for the BitCast operation when expanding the RawBuffer* functions. We
know that the result of the BitCast is a pointer to the physical storage
buffer storage class, so we know the layout need to be the storage
buffer layout.

Fixes #6554

The first first fix in microsoft#5392 was not correct. It relied on the layout
rule for the address to be the correct layout rule, but that is not
always the case. The address is just an integer that could exist in any
storage class. The correct solution is to explicitly set the layout rule
for the BitCast operation when expanding the RawBuffer* functions. We
know that the result of the BitCast is a pointer to the physical storage
buffer storage class, so we know the layout need to be the storage
buffer layout.

Fixes microsoft#6554
@devshgraphicsprogramming

Does this also fix #6541 ?

@s-perron
Copy link
Collaborator Author

s-perron commented Jun 21, 2024

Does this also fix #6541 ?

No, it does not. They are similar in that the layout of the BitCast is wrong, but different because with the inline spir-v, the compiler does not know what the layout should be.

@s-perron s-perron merged commit e5183a0 into microsoft:main Jun 25, 2024
13 checks passed
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.

[SPIR-V] RawBufferStore still trips up on missing member offsets
4 participants