From e51b4afa1e5afc03af6e991f67f2ea503d29a4a4 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Fri, 4 Aug 2023 14:45:48 +0200 Subject: [PATCH] clarify binding array of handles comment --- src/back/spv/block.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/back/spv/block.rs b/src/back/spv/block.rs index 74d8cdfef1..6c455bbff6 100644 --- a/src/back/spv/block.rs +++ b/src/back/spv/block.rs @@ -271,6 +271,7 @@ impl<'w> BlockContext<'w> { crate::TypeInner::Vector { .. } => { self.write_vector_access(expr_handle, base, index, block)? } + // Only binding arrays in the Handle address space will take this path (due to `is_intermediate`) crate::TypeInner::BindingArray { base: binding_type, .. } => { @@ -347,6 +348,7 @@ impl<'w> BlockContext<'w> { )); id } + // Only binding arrays in the Handle address space will take this path (due to `is_intermediate`) crate::TypeInner::BindingArray { base: binding_type, .. } => { @@ -1426,8 +1428,8 @@ impl<'w> BlockContext<'w> { ) -> Result { let result_lookup_ty = match self.fun_info[expr_handle].ty { TypeResolution::Handle(ty_handle) => match return_type_override { - // We use the return type override as a special case for binding arrays as the OpAccessChain - // needs to return a pointer, but indexing into a binding array just gives you the type of + // We use the return type override as a special case for handle binding arrays as the OpAccessChain + // needs to return a pointer, but indexing into a handle binding array just gives you the type of // the binding in the IR. Some(ty) => ty, None => LookupType::Handle(ty_handle),