diff --git a/src/back/msl/writer.rs b/src/back/msl/writer.rs index d1931e85c8..3b29eaf56a 100644 --- a/src/back/msl/writer.rs +++ b/src/back/msl/writer.rs @@ -392,10 +392,9 @@ fn needs_array_length(ty: Handle, arena: &crate::UniqueArena bool { match *self { crate::AddressSpace::Uniform @@ -1695,8 +1694,8 @@ impl Writer { context: &ExpressionContext, is_scoped: bool, ) -> BackendResult { - // Since access chains never cross storage classes, we can just check the index - // bounds check policy once at the top. + // Since access chains never cross between address spaces, we can just + // check the index bounds check policy once at the top. let policy = context.choose_bounds_check_policy(pointer); if policy == index::BoundsCheckPolicy::ReadZeroSkipWrite && self.put_bounds_checks( diff --git a/src/back/spv/index.rs b/src/back/spv/index.rs index c8f16e83af..fa36d25289 100644 --- a/src/back/spv/index.rs +++ b/src/back/spv/index.rs @@ -315,7 +315,7 @@ impl<'w> BlockContext<'w> { /// Emit code for bounds checks for an array, vector, or matrix access. /// /// This implements either `index_bounds_check_policy` or - /// `buffer_bounds_check_policy`, depending on the storage class of the + /// `buffer_bounds_check_policy`, depending on the address space of the /// pointer being accessed. /// /// Return a `BoundsCheckResult` indicating how the index should be diff --git a/src/back/spv/writer.rs b/src/back/spv/writer.rs index 83253cc735..dad763b243 100644 --- a/src/back/spv/writer.rs +++ b/src/back/spv/writer.rs @@ -1298,9 +1298,10 @@ impl Writer { pointer_type_id } else { - // This is a global variable in a Storage class. The only way it could - // have `global_needs_wrapper() == false` is if it has a runtime-sized array. - // In this case, we need to decorate it with Block. + // This is a global variable in the Storage address space. The only + // way it could have `global_needs_wrapper() == false` is if it has + // a runtime-sized array. In this case, we need to decorate it with + // Block. if let crate::AddressSpace::Storage { .. } = global_variable.space { self.decorate(inner_type_id, Decoration::Block, &[]); } diff --git a/src/front/glsl/functions.rs b/src/front/glsl/functions.rs index d87892c08b..3751e63745 100644 --- a/src/front/glsl/functions.rs +++ b/src/front/glsl/functions.rs @@ -811,9 +811,9 @@ impl Parser { ), handle, ), - // If the argument is a pointer whose address space isn't `Function` an - // indirection trough a local variable is needed to align the storage - // classes of the call argument and the overload parameter + // If the argument is a pointer whose address space isn't `Function`, an + // indirection through a local variable is needed to align the address + // spaces of the call argument and the overload parameter. TypeInner::Pointer { base, space } if space != AddressSpace::Function => ( base, ctx.add_expression( diff --git a/src/proc/index.rs b/src/proc/index.rs index a7cd941706..340862ebc4 100644 --- a/src/proc/index.rs +++ b/src/proc/index.rs @@ -72,7 +72,7 @@ pub struct BoundsCheckPolicies { /// How should the generated code handle array, vector, or matrix indices /// that are out of range, when those values live in a [`GlobalVariable`] in - /// the [`Storage`] or [`Uniform`] storage classes? + /// the [`Storage`] or [`Uniform`] address spaces? /// /// Some graphics hardware provides "robust buffer access", a feature that /// ensures that using a pointer cannot access memory outside the 'buffer' @@ -143,7 +143,7 @@ impl BoundsCheckPolicies { match info[access].ty.inner_with(types).pointer_space() { Some(crate::AddressSpace::Storage { access: _ }) | Some(crate::AddressSpace::Uniform) => self.buffer, - // This covers other storage classes, but also accessing vectors and + // This covers other address spaces, but also accessing vectors and // matrices by value, where no pointer is involved. _ => self.index, }