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] Round the stride to be a multiple of the alignment. #6967

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

s-perron
Copy link
Collaborator

We currently pick the size of a struct to be the stride of the array
elements when doing scalar layout. This is not correct because this
could cause the struct to not be correctly aligned.

This is fixed by rounding the size of the struct up to a mutliple of the
alignment.

Fixes #6947

@s-perron s-perron requested a review from a team as a code owner October 15, 2024 15:17
We currently pick the size of a struct to be the stride of the array
elements when doing scalar layout. This is not correct because this
could cause the struct to not be correctly aligned.

This is fixed by rounding the size of the struct up to a mutliple of the
alignment.

Fixes microsoft#6947
Copy link
Contributor

github-actions bot commented Oct 15, 2024

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

@s-perron s-perron enabled auto-merge (squash) October 17, 2024 22:07
@s-perron s-perron self-assigned this Oct 18, 2024
@s-perron s-perron merged commit c72be81 into microsoft:main Oct 21, 2024
12 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] Incorrect buffer layout with -fvk-use-scalar-layout
3 participants