[Bf-blender-cvs] [198a7639441] master: Cleanup: spelling in comments

Campbell Barton noreply at git.blender.org
Thu Apr 28 06:04:25 CEST 2022


Commit: 198a7639441536681a257debd905917e02d52b7f
Author: Campbell Barton
Date:   Thu Apr 28 14:03:49 2022 +1000
Branches: master
https://developer.blender.org/rB198a7639441536681a257debd905917e02d52b7f

Cleanup: spelling in comments

Also use back-slashes for doxy commands.

===================================================================

M	source/blender/blenlib/BLI_devirtualize_parameters.hh
M	source/blender/editors/include/ED_anim_api.h
M	source/blender/functions/FN_multi_function_builder.hh
M	source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
M	source/blender/gpu/metal/mtl_context.hh
M	source/blender/gpu/metal/mtl_debug.hh
M	source/blender/gpu/metal/mtl_texture.hh
M	source/blender/gpu/metal/mtl_texture.mm
M	source/blender/gpu/metal/mtl_texture_util.mm

===================================================================

diff --git a/source/blender/blenlib/BLI_devirtualize_parameters.hh b/source/blender/blenlib/BLI_devirtualize_parameters.hh
index ca11ec2e579..07458906756 100644
--- a/source/blender/blenlib/BLI_devirtualize_parameters.hh
+++ b/source/blender/blenlib/BLI_devirtualize_parameters.hh
@@ -12,7 +12,7 @@
  *
  * Using virtual arrays has the downside that individual elements are accessed through a virtual
  * method call, which has some overhead compared to normal array access. Whether this overhead is
- * negilible depends on the context. For very small functions (e.g. a single addition), the
+ * negligible depends on the context. For very small functions (e.g. a single addition), the
  * overhead can make the function many times slower. Furthermore, it prevents the compiler from
  * doing some optimizations (e.g. loop unrolling and inserting SIMD instructions).
  *
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index 26bde5ec24f..60af05baed7 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -1097,11 +1097,11 @@ void animviz_calc_motionpaths(struct Depsgraph *depsgraph,
                               bool restore);
 
 /**
- * Update motion path computation range (in ob.avs or armature.avs) from user choice in
- *  ob.avs.path_range or arm.avs.path_range, depending on active user mode.
+ * Update motion path computation range (in `ob.avs` or `armature.avs`) from user choice in
+ * `ob.avs.path_range` or `arm.avs.path_range`, depending on active user mode.
  *
- * @param ob: Object to compute range for (must be provided)
- * @param scene: Used when scene range is choosen
+ * \param ob: Object to compute range for (must be provided)
+ * \param scene: Used when scene range is chosen.
  */
 void animviz_motionpath_compute_range(struct Object *ob, struct Scene *scene);
 
diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh
index b3865bc3cb7..a35339b2495 100644
--- a/source/blender/functions/FN_multi_function_builder.hh
+++ b/source/blender/functions/FN_multi_function_builder.hh
@@ -75,7 +75,7 @@ struct AllSpanOrSingle {
 };
 
 /**
- * A slighly weaker variant of #AllSpanOrSingle. It generates less code, because it assumes that
+ * A slightly weaker variant of #AllSpanOrSingle. It generates less code, because it assumes that
  * some of the inputs are most likely single values. It should be used for small functions which
  * have too many inputs to make #AllSingleOrSpan a reasonable choice.
  */
diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
index 08737c19eef..24e11f6be3b 100644
--- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
+++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
@@ -3003,7 +3003,7 @@ static void lineart_triangle_intersect_in_bounding_area(LineartRenderBuffer *rb,
 
   double *G0 = tri->v[0]->gloc, *G1 = tri->v[1]->gloc, *G2 = tri->v[2]->gloc;
 
-  /* If this is not the smallest subdiv bounding area. */
+  /* If this is not the smallest subdivision bounding area. */
   if (ba->child) {
     lineart_triangle_intersect_in_bounding_area(rb, tri, &ba->child[0]);
     lineart_triangle_intersect_in_bounding_area(rb, tri, &ba->child[1]);
diff --git a/source/blender/gpu/metal/mtl_context.hh b/source/blender/gpu/metal/mtl_context.hh
index e855f9cb91a..a317cd03e37 100644
--- a/source/blender/gpu/metal/mtl_context.hh
+++ b/source/blender/gpu/metal/mtl_context.hh
@@ -133,7 +133,7 @@ class MTLContext : public Context {
   friend class MTLBackend;
 
  private:
-  /* Compute and specialisation caches */
+  /* Compute and specialization caches. */
   MTLContextTextureUtils texture_utils_;
 
  public:
diff --git a/source/blender/gpu/metal/mtl_debug.hh b/source/blender/gpu/metal/mtl_debug.hh
index 455a6da5ddc..25aaf30892b 100644
--- a/source/blender/gpu/metal/mtl_debug.hh
+++ b/source/blender/gpu/metal/mtl_debug.hh
@@ -13,7 +13,7 @@ namespace debug {
 
 extern CLG_LogRef LOG;
 
-/* Initialise debugging. */
+/* Initialize debugging. */
 void mtl_debug_init();
 
 /* Using Macro's instead of variadic template due to non-string-literal
diff --git a/source/blender/gpu/metal/mtl_texture.hh b/source/blender/gpu/metal/mtl_texture.hh
index 0762470dd88..94892544f96 100644
--- a/source/blender/gpu/metal/mtl_texture.hh
+++ b/source/blender/gpu/metal/mtl_texture.hh
@@ -58,7 +58,7 @@ template<> struct blender::DefaultHash<TextureUpdateRoutineSpecialisation> {
   }
 };
 
-/* Type of data is being writen to the depth target:
+/* Type of data is being written to the depth target:
  * 0 = floating point (0.0 - 1.0)
  * 1 = 24 bit integer (0 - 2^24)
  * 2 = 32 bit integer (0 - 2^32) */
@@ -179,9 +179,9 @@ class MTLTexture : public Texture {
  private:
   /* Where the textures data comes from. */
   enum {
-    MTL_TEXTURE_MODE_DEFAULT,     /* Texture is self-initialised (Standard). */
+    MTL_TEXTURE_MODE_DEFAULT,     /* Texture is self-initialized (Standard). */
     MTL_TEXTURE_MODE_EXTERNAL,    /* Texture source from external id<MTLTexture> handle */
-    MTL_TEXTURE_MODE_VBO,         /* Texture source initialised from VBO */
+    MTL_TEXTURE_MODE_VBO,         /* Texture source initialized from VBO */
     MTL_TEXTURE_MODE_TEXTURE_VIEW /* Texture is a view into an existing texture. */
   } resource_mode_;
 
@@ -197,15 +197,15 @@ class MTLTexture : public Texture {
   id<MTLBuffer> texture_buffer_;
   unsigned int aligned_w_ = 0;
 
-  /* Blit Framebuffer. */
+  /* Blit Frame-buffer. */
   GPUFrameBuffer *blit_fb_ = nullptr;
   unsigned int blit_fb_slice_ = 0;
   unsigned int blit_fb_mip_ = 0;
 
-  /* Texure view properties */
+  /* Texture view properties */
   /* In Metal, we use texture views to either limit mipmap ranges,
    * , apply a swizzle mask, or both.
-
+   *
    * We apply the mip limit in the view rather than in the sampler, as
    * certain effects and functionality such as textureSize rely on the base level
    * being modified.
@@ -214,7 +214,7 @@ class MTLTexture : public Texture {
    * texture if MTL_TEXTURE_MODE_TEXTURE_VIEW is used.
    * If this mode is used, source_texture points to a GPUTexture from which
    * we pull their texture handle as a root.
-  */
+   */
   const GPUTexture *source_texture_ = nullptr;
 
   enum TextureViewDirtyState {
@@ -286,10 +286,10 @@ class MTLTexture : public Texture {
                      int layer_offset) override; /* Texture View */
 
  private:
-  /* Common Constructor, default initialisation */
+  /* Common Constructor, default initialization. */
   void mtl_texture_init();
 
-  /* Post-construction and member initialisation, prior to baking.
+  /* Post-construction and member initialization, prior to baking.
    * Called during init_internal */
   void prepare_internal();
 
@@ -349,8 +349,8 @@ class MTLTexture : public Texture {
   MEM_CXX_CLASS_ALLOC_FUNCS("gpu::MTLTexture")
 
   /* Texture Update function Utilities. */
-  /* Metal texture updating does not provide the same range of functionality for type conversiona
-   * and format compatibilities as are available in OpenGL. To achieve the same level of
+  /* Metal texture updating does not provide the same range of functionality for type conversion
+   * and format compatibility as are available in OpenGL. To achieve the same level of
    * functionality, we need to instead use compute kernels to perform texture data conversions
    * where appropriate.
    * There are a number of different inputs which affect permutations and thus require different
diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm
index 5ffcd167df9..aedccc60920 100644
--- a/source/blender/gpu/metal/mtl_texture.mm
+++ b/source/blender/gpu/metal/mtl_texture.mm
@@ -71,7 +71,7 @@ void gpu::MTLTexture::mtl_texture_init()
 
 gpu::MTLTexture::MTLTexture(const char *name) : Texture(name)
 {
-  /* Common Initialisation. */
+  /* Common Initialization. */
   mtl_texture_init();
 }
 
@@ -81,7 +81,7 @@ gpu::MTLTexture::MTLTexture(const char *name,
                             id<MTLTexture> metal_texture)
     : Texture(name)
 {
-  /* Common Initialisation. */
+  /* Common Initialization. */
   mtl_texture_init();
 
   /* Prep texture from METAL handle. */
@@ -447,7 +447,7 @@ void gpu::MTLTexture::update_sub(
     int totalsize = 0;
 
     /* If unpack row length is used, size of input data uses the unpack row length, rather than the
-     * image lenght */
+     * image length. */
     int expected_update_w = ((ctx->pipeline_state.unpack_row_length == 0) ?
                                  extent[0] :
                                  ctx->pipeline_state.unpack_row_length);
@@ -1168,7 +1168,7 @@ void gpu::MTLTexture::mip_range_set(int min, int max)
    * - For the time being, we are going to just need to generate a FULL mipmap chain
    *   as we do not know ahead of time whether mipmaps will be used.
    *
-   *   TODO(Metal): Add texture initialisation flag to determine whether mipmaps are used
+   *   TODO(Metal): Add texture initialization flag to determine whether mipmaps are used
    *   or not. Will be important for saving memory for big textures. */
   this->mip_min_ = min;
   this->mip_max_ = max;
@@ -1236,7 +1236,7 @@ void gpu::MTLTexture::read_internal(int mip,
                                     int debug_data_size,
                                     void *r_data)
 {
-  /* Verify texures are baked. */
+  /* Verify textures are baked. */
   if (!this->is_baked_) {
     MTL_LOG_WARNING("gpu::MTLTexture::read_internal - Trying to read from a non-baked texture!\n");
     return;
@@ -1308,7 +1308,7 @@ void gpu::MTLTexture::read_internal(int mip,
   unsigned int destination_offset = 0;
   void *destination_buffer_host_ptr = nullptr;
 
-  /* TODO(Metal): Optimise buffer allocation. */
+  /* TODO(Metal): Optimize buffer allocation. */
   MTLResourceOptions bufferOptions = MTLResourceStorageModeManaged;
   destination_buffer = [ctx->device newBufferWithLength:max_ii(total_bytes, 256)
                                                 options:bu

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list