From 77204bed177aafb3c5a484a69aeee4a7a5eae3f5 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 12 Dec 2023 12:56:25 +1100 Subject: [PATCH] Cleanup: spelling in comments --- .../eevee_next/shaders/infos/eevee_shadow_info.hh | 4 ++-- source/blender/gpu/intern/gpu_shader_create_info.hh | 2 +- source/blender/gpu/metal/mtl_shader_generator.mm | 4 ++-- source/blender/gpu/metal/mtl_texture.mm | 2 +- .../blender/gpu/shaders/metal/mtl_shader_defines.msl | 11 ++++++----- source/blender/makesdna/DNA_meshdata_types.h | 2 +- 6 files changed, 13 insertions(+), 12 deletions(-) diff --git a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_shadow_info.hh b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_shadow_info.hh index 1db1c450053..f0834cdd063 100644 --- a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_shadow_info.hh +++ b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_shadow_info.hh @@ -260,8 +260,8 @@ GPU_SHADER_CREATE_INFO(eevee_shadow_page_tile_store) * \{ */ GPU_SHADER_CREATE_INFO(eevee_shadow_data) - /* SHADOW_READ_ATOMIC macro indiciating shadow funcions should use usampler2DArrayAtomic as the - atlas type. */ + /* SHADOW_READ_ATOMIC macro indicating shadow functions should use `usampler2DArrayAtomic` as + * the atlas type. */ .define("SHADOW_READ_ATOMIC") .sampler(SHADOW_ATLAS_TEX_SLOT, ImageType::UINT_2D_ARRAY_ATOMIC, "shadow_atlas_tx") .sampler(SHADOW_TILEMAPS_TEX_SLOT, ImageType::UINT_2D, "shadow_tilemaps_tx"); diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index e77ae5e0a3f..20ae857e893 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -270,7 +270,7 @@ enum class ImageType { * NOTE: Atomic variants MUST be used if the texture bound to this resource has usage flag: * `GPU_TEXTURE_USAGE_ATOMIC`, even if atomic texture operations are not used in the given * shader. - * The shader source MUST also utilise the correct atomic sampler handle e.g. + * The shader source MUST also utilize the correct atomic sampler handle e.g. * `usampler2DAtomic` in conjunction with these types, for passing texture/image resources into * functions. */ UINT_2D_ATOMIC, diff --git a/source/blender/gpu/metal/mtl_shader_generator.mm b/source/blender/gpu/metal/mtl_shader_generator.mm index 9373523f79a..2fc265914be 100644 --- a/source/blender/gpu/metal/mtl_shader_generator.mm +++ b/source/blender/gpu/metal/mtl_shader_generator.mm @@ -1949,7 +1949,7 @@ void MSLGeneratorInterface::prepare_from_createinfo(const shader::ShaderCreateIn } } - /* For texure atomic fallback support, bind texture source buffers and data buffer as storage + /* For texture atomic fallback support, bind texture source buffers and data buffer as storage * blocks. */ if (!MTLBackend::get_capabilities().supports_texture_atomics) { uint atomic_fallback_buffer_count = 0; @@ -1962,7 +1962,7 @@ void MSLGeneratorInterface::prepare_from_createinfo(const shader::ShaderCreateIn ImageType::INT_2D_ARRAY_ATOMIC, ImageType::INT_3D_ATOMIC)) { - /* Add storagebuffer bindpoint. */ + /* Add storage-buffer bind-point. */ MSLBufferBlock ssbo; /* We maintain two bind indices. "Slot" refers to the storage index buffer(N) in which diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm index 827ffab51a2..f78f80fb795 100644 --- a/source/blender/gpu/metal/mtl_texture.mm +++ b/source/blender/gpu/metal/mtl_texture.mm @@ -2401,7 +2401,7 @@ void gpu::MTLTexture::ensure_baked() total_bytes, (gpu_image_usage_flags_ & GPU_TEXTURE_USAGE_HOST_READ)); BLI_assert(backing_buffer_ != nullptr); - /* NOTE: Fallback buffer-backed textue always set to Texture2D. */ + /* NOTE: Fallback buffer-backed texture always set to Texture2D. */ texture_descriptor_.textureType = MTLTextureType2D; texture_descriptor_.depth = 1; texture_descriptor_.arrayLength = 1; diff --git a/source/blender/gpu/shaders/metal/mtl_shader_defines.msl b/source/blender/gpu/shaders/metal/mtl_shader_defines.msl index 5c699730a30..4b94e10045f 100644 --- a/source/blender/gpu/shaders/metal/mtl_shader_defines.msl +++ b/source/blender/gpu/shaders/metal/mtl_shader_defines.msl @@ -226,7 +226,7 @@ template T atomicExchange(device T &mem, T data) SAMPLER_DECLARATION \ } -/* If native texture atomics are unsupported, we instead utilise a custom type which wraps a +/* If native texture atomics are unsupported, we instead utilize a custom type which wraps a * buffer-backed texture. This texture will always be a Texture2D, but will emulate access to * Texture3D and Texture2DArray by stacking layers. * Access pattern will be derived based on the source type. 2DArray and 3D atomic texture @@ -1271,10 +1271,11 @@ S _texture_image_atomic_exchange_internal(thread _mtl_combined_image_sampler_3d< #else -/** Texture atomic fallback function entry points. +/** + * Texture atomic fallback function entry points. * NOTE: When texture atomics are unsupported, the wrapped type contains a buffer-backed 2D - * texture. Atomic operations happen directly on the underlying buffer, and texture coordiantes are - * remapped into 2D texture space from 2D Array or 3D texture coordiantes. + * texture. Atomic operations happen directly on the underlying buffer, and texture coordinates are + * remapped into 2D texture space from 2D Array or 3D texture coordinates. */ /* Image atomic operations. */ @@ -1363,7 +1364,7 @@ template bool in_range(vec value, vec min, vec ma return (all(value >= min) && all(value < max)); } -/* Map 2D/3D texture coordiante into buffer index, accounting for padded row widths. */ +/* Map 2D/3D texture coordinate into buffer index, accounting for padded row widths. */ template uint tex_coord_to_linear_buffer_id(thread _mtl_combined_image_sampler_2d_atomic_fallback tex, uint2 coord) diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 9ff009c0f25..970de79b5ab 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -54,7 +54,7 @@ enum { * the array is recalculated from scratch; there is no extra attempt to maintain the validity over * time. * - * #MLoopTri is stored in an array, where each faces's triangles are stored contiguously. + * #MLoopTri is stored in an array, where triangles tessellated from faces stored contiguously. * The number of triangles for each polygon is guaranteed to be the corner count - 2, even for * degenerate geometry (see #bke::mesh::face_triangles_num). *