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

MSL: Treat pointer to vector as scalar type when bitcasting #2452

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

Conversation

dboyan
Copy link
Contributor

@dboyan dboyan commented Mar 3, 2025

Otherwise, they will be misregarded as vectors and can be used in as_type, which does not support pointer type as destination.

Fixes #2451

Copy link
Contributor

@cdavis5e cdavis5e left a comment

Choose a reason for hiding this comment

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

The change itself looks good, but needs a test case.

@squidbus
Copy link
Contributor

squidbus commented Mar 3, 2025

Can confirm this fixes the shader issue I had, thanks!

Otherwise, they will be misregarded as vectors and can be used in
as_type, which does not support pointer type as destination.
@dboyan
Copy link
Contributor Author

dboyan commented Mar 4, 2025

I added a test case taken from the original bug report. It's a little bit long but glslang doesn't generate the spirv I want and I'm not proficient enough to edit raw spirv assembly.

@dboyan dboyan requested a review from cdavis5e March 4, 2025 04:34
Copy link
Contributor

@cdavis5e cdavis5e left a comment

Choose a reason for hiding this comment

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

LGTM, FWIW. But, I lack authority to merge changes to this repo. H-K tends to be away from this project for long periods. You'll have to wait till he gets back--and he may have feedback of his own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MSL: Accessing buffer address as vector pointer not compiling
3 participants