Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/gpu/metal/mtl_memory.hh')
-rw-r--r--source/blender/gpu/metal/mtl_memory.hh19
1 files changed, 10 insertions, 9 deletions
diff --git a/source/blender/gpu/metal/mtl_memory.hh b/source/blender/gpu/metal/mtl_memory.hh
index 81793b0647c..4dbc1b29c6b 100644
--- a/source/blender/gpu/metal/mtl_memory.hh
+++ b/source/blender/gpu/metal/mtl_memory.hh
@@ -23,7 +23,7 @@
* The Metal Backend Memory manager is designed to provide an interface
* for all other MTL_* modules where memory allocation is required.
*
- * Different allocation strategies and datastructures are used depending
+ * Different allocation strategies and data-structures are used depending
* on how the data is used by the backend. These aim to optimally handle
* system memory and abstract away any complexity from the MTL_* modules
* themselves.
@@ -107,8 +107,8 @@ class MTLBuffer {
/* Metal resource. */
id<MTLBuffer> metal_buffer_;
- /* Host-visible mapped-memory pointer. Behaviour depends on buffer type:
- * - Shared buffers: pointer represents base address of MTLBuffer whose data
+ /* Host-visible mapped-memory pointer. Behavior depends on buffer type:
+ * - Shared buffers: pointer represents base address of #MTLBuffer whose data
* access has shared access by both the CPU and GPU on
* Unified Memory Architectures (UMA).
* - Managed buffer: Host-side mapped buffer region for CPU (Host) access. Managed buffers
@@ -350,14 +350,14 @@ class MTLBufferPool {
bool ensure_initialised_ = false;
id<MTLDevice> device_ = nil;
- /* The buffer selection aims to pick a buffer which meets the minimum size requierments.
+ /* The buffer selection aims to pick a buffer which meets the minimum size requirements.
* To do this, we keep an ordered set of all available buffers. If the buffer is larger than the
- * desired allocation size, we check it aginst `mtl_buffer_size_threshold_factor_`, which defines
- * what % larger than the original allocation the buffer can be.
+ * desired allocation size, we check it against `mtl_buffer_size_threshold_factor_`,
+ * which defines what % larger than the original allocation the buffer can be.
* - A higher value results in greater re-use of previously allocated buffers of similar sizes.
- * - A lower value may result in more dynamic allocations, but minimised memory usage for a given
+ * - A lower value may result in more dynamic allocations, but minimized memory usage for a given
* scenario.
- * The current value of 1.26 is calibrated for optimal performance and memory utilisation. */
+ * The current value of 1.26 is calibrated for optimal performance and memory utilization. */
static constexpr float mtl_buffer_size_threshold_factor_ = 1.26;
/* Buffer pools using MTLResourceOptions as key for allocation type.
@@ -453,7 +453,8 @@ class MTLScratchBufferManager {
MTLScratchBufferManager(MTLContext &context) : context_(context){};
~MTLScratchBufferManager();
- /* Explicit initialisation and freeing of resources. Init must occur after device creation. */
+ /* Explicit initialization and freeing of resources.
+ * Initialization must occur after device creation. */
void init();
void free();