Naga SPIR-V backend assumes that let-bound indexes are bounds checked in validation #6396
Open
Description
As shown in the example in #4390, WGSL says that let
-bound identifiers are not constants, and thus bounds checks cannot cause validation errors, but must be handled at runtime. But the SPIR-V backend includes code that assumes that any index known at compile time must have been checked already, and can be assumed to be in bounds.
When #4390 is fixed, the SPIR-V backend will need to be updated.
It might be good to search for all uses of these functions:
-
GuardedIndex::from_expression
-
GuardedIndex::try_resolve_to_constant
Metadata
Assignees
Labels
Type
Projects
Status
Todo