wgpu/naga/tests
Jim Blandy ed3006ccc6 [naga spv-out] Spill arrays and matrices for runtime indexing.
Improve handling of `Access` expressions whose base is an array or
matrix (not a pointer to such), and whose index is not known at
compile time. SPIR-V does not have instructions that can do this
directly, so spill such values to temporary variables, and perform the
accesses using `OpAccessChain` instructions applied to the
temporaries.

When performing chains of accesses like `a[i].x[j]`, do not reify
intermediate values; generate a single `OpAccessChain` for the entire
thing.

Remove special cases for arrays; the same code now handles arrays and
matrices.

Update validation to permit dynamic indexing of matrices.

For details, see the comments on the new tracking structures in
`naga:🔙:spv::Function`.

Add snapshot test `index-by-value.wgsl`.

Fixes #6358.
Fixes #4337.
Alternative to #6362.
2024-10-11 08:27:15 -07:00
..
in [naga spv-out] Spill arrays and matrices for runtime indexing. 2024-10-11 08:27:15 -07:00
out [naga spv-out] Spill arrays and matrices for runtime indexing. 2024-10-11 08:27:15 -07:00
example_wgsl.rs [naga] Make the example_wgsl test build without wgsl-in feature. 2023-11-24 13:17:30 +01:00
root.rs [naga] Test CallResult and AtomicResult population. 2024-05-28 09:17:16 +02:00
snapshots.rs [naga spv-out] Spill arrays and matrices for runtime indexing. 2024-10-11 08:27:15 -07:00
spirv_capabilities.rs Add cfg_alias indirection to Naga's x_out features 2024-07-09 09:53:39 +02:00
validation.rs [naga] Permit only structs as binding array elements. (#6333) 2024-09-27 17:00:21 -07:00
wgsl_errors.rs [naga spv-out] Spill arrays and matrices for runtime indexing. 2024-10-11 08:27:15 -07:00