-
Notifications
You must be signed in to change notification settings - Fork 920
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
fix(wgpu-core)!: use u32
indices for bind group layouts everywhere
#3743
fix(wgpu-core)!: use u32
indices for bind group layouts everywhere
#3743
Conversation
CI indicates that |
I reran CI, that test keeps failing spuriously. |
2778335
to
ee9381f
Compare
The short description of this bug/fix pair is that, for some reason, we accept `u32` bind indices in the `wgpu` and `wgpu-core` APIs, narrow to `u8`, and then use `usize` for bind group indices in `wgpu-core`'s internals. This artificially narrows the range of bind group indices, and seems incorrect. Fix this by using `u32`s all the way until we convert to `usize`s. AFAIK, no supported platforms for `wgpu` have a `usize` whose size is less than `u32`'s. For further details, see [Mozilla's Bugzilla] and [`wgpu`'s Matrix chat]. [Mozilla's Bugzilla]: https://bugzilla.mozilla.org/show_bug.cgi?id=1813705#c8 [`wgpu`'s Matrix chat]: https://matrix.to/#/!FZyQrssSlHEZqrYcOb:matrix.org/$0wv-PJgyTTZ7LHtEhzFmAouNYa4VMY0MzVzW0n5J394?via=matrix.org&via=mozilla.org&via=kde.org
ee9381f
to
532b401
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense!
I don't have rights to merge this. 😖 Can somebody do it for me, please? |
Yeet |
Checklist
cargo clippy
.RunRUSTFLAGS=--cfg=web_sys_unstable_apis cargo clippy --target wasm32-unknown-unknown
if applicable.Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories
See
Description
.Description
Describe what problem this is solving, and how it's solved.
See discussions in Mozilla's Bugzilla and
wgpu
's Matrix chat.Testing
Explain how this change is tested.
cargo nextest run -- --workspace
WFM!