[Bf-blender-cvs] [45645936e91] master: Cleanup: spelling in comments

Campbell Barton noreply at git.blender.org
Wed Jun 29 02:11:52 CEST 2022


Commit: 45645936e91a8379b19f4fbe02732780dc6f60c1
Author: Campbell Barton
Date:   Wed Jun 29 09:40:16 2022 +1000
Branches: master
https://developer.blender.org/rB45645936e91a8379b19f4fbe02732780dc6f60c1

Cleanup: spelling in comments

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

M	intern/ghost/intern/GHOST_SystemWayland.cpp
M	source/blender/gpu/GPU_framebuffer.h
M	source/blender/gpu/intern/gpu_framebuffer.cc
M	source/blender/gpu/metal/mtl_command_buffer.mm
M	source/blender/gpu/metal/mtl_context.hh
M	source/blender/gpu/metal/mtl_context.mm
M	source/blender/gpu/metal/mtl_framebuffer.hh
M	source/blender/gpu/metal/mtl_framebuffer.mm
M	source/blender/imbuf/intern/anim_movie.c

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

diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp
index 96340fc9090..d45962817c1 100644
--- a/intern/ghost/intern/GHOST_SystemWayland.cpp
+++ b/intern/ghost/intern/GHOST_SystemWayland.cpp
@@ -278,7 +278,7 @@ struct input_t {
    */
   struct xkb_state *xkb_state_empty = nullptr;
   /**
-   * Keep a state with num-lock enabled, use to access predictable key-pad symbols.
+   * Keep a state with number-lock enabled, use to access predictable key-pad symbols.
    * If number-lock is not supported by the key-map, this is set to NULL.
    */
   struct xkb_state *xkb_state_empty_with_numlock = nullptr;
diff --git a/source/blender/gpu/GPU_framebuffer.h b/source/blender/gpu/GPU_framebuffer.h
index 6eb51c200f1..70ec7c19e7c 100644
--- a/source/blender/gpu/GPU_framebuffer.h
+++ b/source/blender/gpu/GPU_framebuffer.h
@@ -66,19 +66,19 @@ typedef struct GPULoadStore {
 /* Load store config array (load_store_actions) matches attachment structure of
  * GPU_framebuffer_config_array. This allows us to explicitly specify whether attachment data needs
  * to be loaded and stored on a per-attachment basis. This enables a number of bandwidth
- * optimisations:
+ * optimizations:
  *  - No need to load contents if subsequent work is over-writing every pixel.
  *  - No need to store attachments whose contents are not used beyond this pass e.g. depth buffer.
- *  - State can be customised at bind-time rather than applying to the framebuffer object as a
+ *  - State can be customized at bind-time rather than applying to the frame-buffer object as a
  * whole.
  *
  * Example:
  * \code{.c}
  * GPU_framebuffer_bind_loadstore(&fb, {
  *         {GPU_LOADACTION_LOAD, GPU_STOREACTION_DONT_CARE} // must be depth buffer
- *         {GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE}, // Colour attachment 0
- *         {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE}, // Colour attachment 1
- *         {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE} // Colour attachment 2
+ *         {GPU_LOADACTION_LOAD, GPU_STOREACTION_STORE}, // Color attachment 0
+ *         {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE}, // Color attachment 1
+ *         {GPU_LOADACTION_DONT_CARE, GPU_STOREACTION_STORE} // Color attachment 2
  * })
  * \encode
  */
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index f12d8fd7e55..019b5af461c 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -191,7 +191,7 @@ void FrameBuffer::recursive_downsample(int max_lvl,
     dirty_attachments_ = true;
     this->bind(true);
 
-    /* Optimise load-store state. */
+    /* Optimize load-store state. */
     GPUAttachmentType type = GPU_FB_DEPTH_ATTACHMENT;
     for (GPUAttachment &attachment : attachments_) {
       Texture *tex = reinterpret_cast<Texture *>(attachment.tex);
diff --git a/source/blender/gpu/metal/mtl_command_buffer.mm b/source/blender/gpu/metal/mtl_command_buffer.mm
index 375295e589e..434bc664ee6 100644
--- a/source/blender/gpu/metal/mtl_command_buffer.mm
+++ b/source/blender/gpu/metal/mtl_command_buffer.mm
@@ -16,7 +16,7 @@ namespace blender::gpu {
 
 /* Global sync event used across MTLContext's.
  * This resolves flickering artifacts from command buffer
- * dependencies not being honoured for work submitted between
+ * dependencies not being honored for work submitted between
  * different GPUContext's. */
 id<MTLEvent> MTLCommandBufferManager::sync_event = nil;
 unsigned long long MTLCommandBufferManager::event_signal_val = 0;
@@ -305,7 +305,7 @@ id<MTLRenderCommandEncoder> MTLCommandBufferManager::ensure_begin_render_command
     active_frame_buffer_->apply_state();
 
     /* FLAG FRAMEBUFFER AS CLEARED -- A clear only lasts as long as one has been specified.
-     * After this, resets to Load attachments to parallel GL behaviour. */
+     * After this, resets to Load attachments to parallel GL behavior. */
     active_frame_buffer_->mark_cleared();
 
     /* Reset RenderPassState to ensure resource bindings are re-applied. */
@@ -404,7 +404,7 @@ bool MTLCommandBufferManager::do_break_submission()
     return false;
   }
 
-  /* Use optimised heuristic to split heavy command buffer submissions to better saturate the
+  /* Use optimized heuristic to split heavy command buffer submissions to better saturate the
    * hardware and also reduce stalling from individual large submissions. */
   if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY) ||
       GPU_type_matches(GPU_DEVICE_ATI, GPU_OS_ANY, GPU_DRIVER_ANY)) {
@@ -440,12 +440,12 @@ void MTLCommandBufferManager::pop_debug_group()
   }
 }
 
-/* Workload Synchronisation. */
+/* Workload Synchronization. */
 bool MTLCommandBufferManager::insert_memory_barrier(eGPUBarrier barrier_bits,
                                                     eGPUStageBarrierBits before_stages,
                                                     eGPUStageBarrierBits after_stages)
 {
-  /* Only supporting Metal on 10.14 onwards anyway - Check required for warnings. */
+  /* Only supporting Metal on 10.14 onward anyway - Check required for warnings. */
   if (@available(macOS 10.14, *)) {
 
     /* Resolve scope. */
@@ -527,7 +527,7 @@ void MTLRenderPassState::prepare(MTLCommandBufferManager *cmd, MTLContext *mtl_c
 
 /* Reset binding state when a new RenderCommandEncoder is bound, to ensure
  * pipeline resources are re-applied to the new Encoder.
- * Note: In Metal, state is only persistent within an MTLCommandEncoder,
+ * NOTE: In Metal, state is only persistent within an MTLCommandEncoder,
  * not globally. */
 void MTLRenderPassState::reset_state()
 {
diff --git a/source/blender/gpu/metal/mtl_context.hh b/source/blender/gpu/metal/mtl_context.hh
index 92276a34b63..1b2af6a584b 100644
--- a/source/blender/gpu/metal/mtl_context.hh
+++ b/source/blender/gpu/metal/mtl_context.hh
@@ -508,7 +508,7 @@ class MTLCommandBufferManager {
   MTLFrameBuffer *active_frame_buffer_ = nullptr;
   MTLRenderPassDescriptor *active_pass_descriptor_ = nullptr;
 
-  /* Workload heuristics - We may need to split command buffers to optimise workload and balancing.
+  /* Workload heuristics - We may need to split command buffers to optimize workload and balancing.
    */
   int current_draw_call_count_ = 0;
   int encoder_count_ = 0;
@@ -552,7 +552,7 @@ class MTLCommandBufferManager {
   id<MTLBlitCommandEncoder> ensure_begin_blit_encoder();
   id<MTLComputeCommandEncoder> ensure_begin_compute_encoder();
 
-  /* Workload Synchronisation. */
+  /* Workload Synchronization. */
   bool insert_memory_barrier(eGPUBarrier barrier_bits,
                              eGPUStageBarrierBits before_stages,
                              eGPUStageBarrierBits after_stages);
@@ -634,13 +634,13 @@ class MTLContext : public Context {
 
   /** Metal Context Core functions. **/
 
-  /* Bind framebuffer to context. */
+  /* Bind frame-buffer to context. */
   void framebuffer_bind(MTLFrameBuffer *framebuffer);
 
-  /* Restore framebuffer used by active context to default backbuffer. */
+  /* Restore frame-buffer used by active context to default back-buffer. */
   void framebuffer_restore();
 
-  /* Ensure a render-pass using the Context framebuffer (active_fb_) is in progress. */
+  /* Ensure a render-pass using the Context frame-buffer (active_fb_) is in progress. */
   id<MTLRenderCommandEncoder> ensure_begin_render_pass();
 
   MTLFrameBuffer *get_current_framebuffer();
diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm
index d4e25defecf..6ecdb3f48b3 100644
--- a/source/blender/gpu/metal/mtl_context.mm
+++ b/source/blender/gpu/metal/mtl_context.mm
@@ -49,7 +49,7 @@ MTLContext::MTLContext(void *ghost_window)
   /* Init debug. */
   debug::mtl_debug_init();
 
-  /* Initialise command buffer state. */
+  /* Initialize command buffer state. */
   this->main_command_buffer.prepare(this);
 
   /* Frame management. */
@@ -61,14 +61,14 @@ MTLContext::MTLContext(void *ghost_window)
   this->front_left = mtl_front_left;
   this->back_left = mtl_back_left;
   this->active_fb = this->back_left;
-  /* Prepare platform and capabilities. (Note: With METAL, this needs to be done after CTX
-   * initialisation). */
+  /* Prepare platform and capabilities. (NOTE: With METAL, this needs to be done after CTX
+   * initialization). */
   MTLBackend::platform_init(this);
   MTLBackend::capabilities_init(this);
   /* Initialize Metal modules. */
   this->state_manager = new MTLStateManager(this);
 
-  /* Initialise texture read/update structures. */
+  /* Initialize texture read/update structures. */
   this->get_texture_utils().init();
 
   /* Bound Samplers struct. */
@@ -77,7 +77,7 @@ MTLContext::MTLContext(void *ghost_window)
     samplers_.mtl_sampler_flags[i] = DEFAULT_SAMPLER_STATE;
   }
 
-  /* Initialise samplers. */
+  /* Initialize samplers. */
   for (uint i = 0; i < GPU_SAMPLER_MAX; i++) {
     MTLSamplerState state;
     state.state = static_cast<eGPUSamplerState>(i);
diff --git a/source/blender/gpu/metal/mtl_framebuffer.hh b/source/blender/gpu/metal/mtl_framebuffer.hh
index 6849e574d81..d6fa1850109 100644
--- a/source/blender/gpu/metal/mtl_framebuffer.hh
+++ b/source/blender/gpu/metal/mtl_framebuffer.hh
@@ -1,7 +1,7 @@
 /** \file
  * \ingroup gpu
  *
- * Encapsulation of Framebuffer states (attached textures, viewport, scissors).
+ * Encapsulation of Frame-buffer states (attached textures, viewport, scissors).
  */
 
 #pragma once
@@ -64,17 +64,17 @@ class MTLFrameBuffer : public FrameBuffer {
   MTLContext *dirty_state_ctx_;
 
   /* Whether a clear is pending -- Used to toggle between clear and load FB configurations
-   * (without dirtying the state) - Framebuffer load config is used if no GPU_clear_* command
+   * (without dirtying the state) - Frame-buffer load config is used if no `GPU_clear_*` command
    * was issued after binding the FrameBuffer. */
   bool has_pending_clear_;
 
   /* Render Pass Descriptors:
-   * There are 3 MTLRenderPassDescriptors for different ways in which a framebuffer
+   * There are 3 MTLRenderPassDescriptors for different ways in which a frame-buffer
    * can b

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list