mirror of
https://github.com/gfx-rs/wgpu.git
synced 2025-05-10 00:47:23 +00:00
![]() When the user provides values for a module's overrides, rather than replacing override-sized array types with ordinary array types (which could require adjusting type handles throughout the module), instead edit all overrides to have initializers that are fully-evaluated constant expressions. Then, change all backends to handle override-sized arrays by retrieving their overrides' values. For arrays whose sizes are override expressions, not simple references to a specific override's value, let front ends built array types that refer to anonymous overrides whose initializers are the necessary expression. This means that all arrays whose sizes are override expressions are references to some `Override`. Remove `naga::PendingArraySize`, and let `ArraySize::Pending` hold a `Handle<Override>` in all cases. Expand `tests/gpu-tests/shader/array_size_overrides.rs` to include the test case that motivated this approach. |
||
---|---|---|
.. | ||
compile-tests | ||
dependency-tests | ||
gpu-tests | ||
src | ||
validation-tests | ||
Cargo.toml |