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

[wgpu-core] Compute minimum binding size correctly for arrays. #5222

Merged
merged 1 commit into from
Feb 9, 2024

Commits on Feb 9, 2024

  1. [wgpu-core] Compute minimum binding size correctly for arrays.

    In early versions of WGSL, `storage` or `uniform` global variables had
    to be either structs or runtime-sized arrays. This rule was relaxed,
    and now globals can have any type; Naga automatically wraps such
    variables in structs when required by the backend shading language.
    
    Under the old rules, whenever wgpu-core saw a `storage` or `uniform`
    global variable with an array type, it could assume it was a
    runtime-sized array, and take the stride as the minimum binding size.
    Under the new rules, wgpu-core must consider fixed-sized and
    runtime-sized arrays separately.
    
    Fixes gfx-rs#5219.
    jimblandy committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    d05ea8c View commit details
    Browse the repository at this point in the history