[spv-out] Add comment about AccessIndex on non-pointer values.

This commit is contained in:
Jim Blandy
2021-11-13 13:58:45 -08:00
committed by Dzmitry Malyshau
parent 61e3af2989
commit e8f564dc83

View File

@@ -226,6 +226,10 @@ impl<'w> BlockContext<'w> {
| crate::TypeInner::Matrix { .. }
| crate::TypeInner::Array { .. }
| crate::TypeInner::Struct { .. } => {
// We never need bounds checks here: dynamically sized arrays can
// only appear behind pointers, and are thus handled by the
// `is_intermediate` case above. Everything else's size is
// statically known and checked in validation.
let id = self.gen_id();
let base_id = self.cached[base];
block.body.push(Instruction::composite_extract(