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-out] Fix pointers to private or workgroup address spaces possibly being read only #1901

Merged
merged 1 commit into from
May 12, 2022

Conversation

teoxoy
Copy link
Member

@teoxoy teoxoy commented May 10, 2022

Changes pointers to private or workgroup address spaces to always be read-write (according to the WGSL spec).

fixes #1262

The added test used to fail with

error: no matching function for call to 'assign_through_ptr_fn'
    assign_through_ptr_fn(val);
    ^~~~~~~~~~~~~~~~~~~~~
note: candidate function not viable: 1st argument ('const threadgroup metal::uint' (aka 'const threadgroup unsigned int')) would lose const qualifier
void assign_through_ptr_fn(
     ^
1 error generated.

References
https://gpuweb.github.io/gpuweb/wgsl/#access-mode-defaults
https://gpuweb.github.io/gpuweb/wgsl/#address-space-table

@kvark kvark merged commit b688584 into gfx-rs:master May 12, 2022
@teoxoy teoxoy deleted the msl-const-ptr branch May 12, 2022 08:21
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-out] Immutability of nested pointer passing is incorrectly computed.
2 participants