Files
wgpu/naga/tests
Jim BlandyandClaude Sonnet 5 f892b2e235 spv-out: don't dynamically index PushConstant vectors with OpAccessChain
Per VUID-RuntimeSpirv-None-04745, all accesses into a PushConstant-storage-class
variable that are arrays must use dynamically uniform indices; this restriction
also applies to vectors. Naga was emitting `OpAccessChain` with per-invocation
(non-uniform) indices directly into push-constant vectors, which is undefined
behavior under that rule -- observed on RADV as every invocation silently
reading element 0 of the vector.

Add a special case to `write_checked_load`, alongside the existing matCx2
ones, that loads the whole vector and uses `OpVectorExtractDynamic` instead,
which isn't subject to the restriction.

Fixes gfx-rs/wgpu#8612.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-21 12:05:24 -07:00
..