mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
* [wgpu-core] Add tests for minimum binding size validation. * [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.