2
0
mirror of https://github.com/gfx-rs/wgpu.git synced 2025-05-10 00:47:23 +00:00
wgpu/tests
Kent Slaney 2fac7fa954 [naga] Correct override resolution in array lengths.
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.
2025-03-06 14:21:40 -08:00
..
compile-tests Make tests/compile_tests into tests/compile-tests 2025-02-23 14:06:34 -05:00
dependency-tests Turn dependency tests from xtask subcommand into #[test]s () 2025-02-27 05:22:08 +00:00
gpu-tests [naga] Correct override resolution in array lengths. 2025-03-06 14:21:40 -08:00
src Move REPO_MSRV to 1.85 () 2025-02-24 23:39:34 -05:00
validation-tests Rename tests/validation_tests to tests/validation-tests 2025-02-23 14:06:34 -05:00
Cargo.toml Turn dependency tests from xtask subcommand into #[test]s () 2025-02-27 05:22:08 +00:00