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

fix(wgpu-core)!: use u32 indices for bind group layouts everywhere #3743

Merged
merged 1 commit into from May 4, 2023

Commits on May 3, 2023

  1. fix(wgpu-core)!: use u32 indices for bind group layouts everywhere

    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
    ErichDonGubler committed May 3, 2023
    Configuration menu
    Copy the full SHA
    532b401 View commit details
    Browse the repository at this point in the history