Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naga SPIR-V backend assumes that let-bound indexes are bounds checked in validation #6396

Open
2 tasks
jimblandy opened this issue Oct 11, 2024 · 0 comments
Open
2 tasks

Comments

@jimblandy
Copy link
Member

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

1 participant