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:
authorCampbell Barton <campbell@blender.org>2022-10-19 04:52:55 +0300
committerCampbell Barton <campbell@blender.org>2022-10-19 04:52:55 +0300
commit8aca40652a5729895f1ba6efd2d03829785ae43f (patch)
tree41b9143ec031bd694513dda15d2b0214b836cc15 /source/blender/gpu
parent8115d30dcaddeb399ea9a557694788b03505b2bd (diff)
Cleanup: spelling in comments
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/metal/mtl_batch.mm20
-rw-r--r--source/blender/gpu/metal/mtl_drawlist.mm12
-rw-r--r--source/blender/gpu/metal/mtl_texture.mm2
3 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/gpu/metal/mtl_batch.mm b/source/blender/gpu/metal/mtl_batch.mm
index 3961e7a71a0..0d9a3225a51 100644
--- a/source/blender/gpu/metal/mtl_batch.mm
+++ b/source/blender/gpu/metal/mtl_batch.mm
@@ -69,7 +69,7 @@ void MTLBatch::MTLVertexDescriptorCache::vertex_descriptor_cache_ensure()
}
}
- /* Initialise cache if not ready. */
+ /* Initialize cache if not ready. */
if (cache_context_ == nullptr) {
this->vertex_descriptor_cache_init(MTLContext::get());
}
@@ -189,7 +189,7 @@ int MTLBatch::prepare_vertex_binding(MTLVertBuf *verts,
buffer_stride);
}
else {
- /* Ensure stride is correct for de-interlevaed attributes. */
+ /* Ensure stride is correct for de-interleaved attributes. */
desc.vertex_descriptor.buffer_layouts[buffer_index].stride = buffer_stride;
}
@@ -279,7 +279,7 @@ int MTLBatch::prepare_vertex_binding(MTLVertBuf *verts,
* elements).
*
* Certain conversion cannot be performed however, and in these cases, we need to
- * instruct the shader to generate a specialised version with a conversion routine upon
+ * instruct the shader to generate a specialized version with a conversion routine upon
* attribute read.
* - This handles cases such as conversion between types e.g. Integer to float without
* normalization.
@@ -311,7 +311,7 @@ int MTLBatch::prepare_vertex_binding(MTLVertBuf *verts,
* This then controls how a given attribute is interpreted. The data will be read
* as specified and then converted appropriately to the correct form.
*
- * e.g. if `GPU_FETCH_INT_TO_FLOAT` is specified, the specialised read-routine
+ * e.g. if `GPU_FETCH_INT_TO_FLOAT` is specified, the specialized read-routine
* in the shader will read the data as an int, and cast this to floating point
* representation. (Rather than reading the source data as float).
*
@@ -404,7 +404,7 @@ id<MTLRenderCommandEncoder> MTLBatch::bind(uint v_first, uint v_count, uint i_fi
active_shader_ = (shader) ? static_cast<MTLShader *>(unwrap(shader)) : nullptr;
if (active_shader_ == nullptr || !active_shader_->is_valid()) {
- /* Skip drawing if there is no vaid Metal shader.
+ /* Skip drawing if there is no valid Metal shader.
* This will occur if the path through which the shader is prepared
* is invalid (e.g. Python without create-info), or, the source shader uses a geometry pass. */
BLI_assert_msg(false, "No valid Metal shader!");
@@ -456,7 +456,7 @@ id<MTLRenderCommandEncoder> MTLBatch::bind(uint v_first, uint v_count, uint i_fi
/* Fetch RenderPassState to enable resource binding for active pass. */
MTLRenderPassState &rps = ctx->main_command_buffer.get_render_pass_state();
- /* Debug Check: Ensure Framebuffer instance is not dirty. */
+ /* Debug Check: Ensure Frame-buffer instance is not dirty. */
BLI_assert(!ctx->main_command_buffer.get_active_framebuffer()->get_dirty());
/* Bind Shader. */
@@ -496,8 +496,8 @@ id<MTLRenderCommandEncoder> MTLBatch::bind(uint v_first, uint v_count, uint i_fi
if (mtl_elem != nullptr) {
- /* Fetch index buffer. This function can situationally return an optimised
- * index buffer of a different primtiive type. If this is the case, `final_prim_type`
+ /* Fetch index buffer. This function can situationally return an optimized
+ * index buffer of a different primitive type. If this is the case, `final_prim_type`
* and `v_count` will be updated with the new format.
* NOTE: For indexed rendering, v_count represents the number of indices. */
idx_buffer = mtl_elem->get_index_buffer(final_prim_type, v_count);
@@ -672,7 +672,7 @@ void MTLBatch::prepare_vertex_descriptor_and_bindings(
}
}
- /* Extract Vertex attribues (First-bound vertex buffer takes priority). */
+ /* Extract Vertex attributes (First-bound vertex buffer takes priority). */
for (int v = 0; v < GPU_BATCH_VBO_MAX_LEN; v++) {
if (mtl_verts[v] != NULL) {
MTL_LOG_INFO(" -- [Batch] Checking bindings for bound vertex buffer %p\n", mtl_verts[v]);
@@ -830,7 +830,7 @@ void MTLBatch::draw_advanced(int v_first, int v_count, int i_first, int i_count)
"Index offset is not 2/4-byte aligned as per METAL spec");
/* Fetch index buffer. May return an index buffer of a differing format,
- * if index buffer optimisation is used. In these cases, final_prim_type and
+ * if index buffer optimization is used. In these cases, final_prim_type and
* index_count get updated with the new properties. */
GPUPrimType final_prim_type = this->prim_type;
uint index_count = v_count;
diff --git a/source/blender/gpu/metal/mtl_drawlist.mm b/source/blender/gpu/metal/mtl_drawlist.mm
index dc3e4665dcf..99194d2b72c 100644
--- a/source/blender/gpu/metal/mtl_drawlist.mm
+++ b/source/blender/gpu/metal/mtl_drawlist.mm
@@ -153,7 +153,7 @@ void MTLDrawList::submit()
{
/* Metal does not support MDI from the host side, but we still benefit from only executing the
* batch bind a single time, rather than per-draw.
- * NOTE(Metal): Consider using MTLIndirectCommandBuffer to achieve similar behaviour. */
+ * NOTE(Metal): Consider using #MTLIndirectCommandBuffer to achieve similar behavior. */
if (command_len_ == 0) {
return;
}
@@ -194,12 +194,12 @@ void MTLDrawList::submit()
/* Common properties. */
MTLPrimitiveType mtl_prim_type = gpu_prim_type_to_metal(batch_->prim_type);
- /* Execute multidraw indirect. */
+ /* Execute multi-draw indirect. */
if (can_use_MDI && false) {
/* Metal Doesn't support MDI -- Singular Indirect draw calls are supported,
- * but Multidraw is not.
- * TODO(Metal): Consider using IndirectCommandBuffers to provide similar
- * behaviour. */
+ * but Multi-draw is not.
+ * TODO(Metal): Consider using #IndirectCommandBuffers to provide similar
+ * behavior. */
}
else {
@@ -216,7 +216,7 @@ void MTLDrawList::submit()
uint32_t index_count = cmd->indexCount;
/* Fetch index buffer. May return an index buffer of a differing format,
- * if index buffer optimisation is used. In these cases, mtl_prim_type and
+ * if index buffer optimization is used. In these cases, mtl_prim_type and
* index_count get updated with the new properties. */
GPUPrimType final_prim_type = batch_->prim_type;
id<MTLBuffer> index_buffer = mtl_elem->get_index_buffer(final_prim_type, index_count);
diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm
index 4931f8a4f52..29dcc8d32ee 100644
--- a/source/blender/gpu/metal/mtl_texture.mm
+++ b/source/blender/gpu/metal/mtl_texture.mm
@@ -1510,7 +1510,7 @@ bool gpu::MTLTexture::init_internal(GPUVertBuf *vbo)
texture_descriptor_.mipmapLevelCount = mtl_max_mips_;
texture_descriptor_.usage =
MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite |
- MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimise usage flags. */
+ MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimize usage flags. */
texture_descriptor_.storageMode = [source_buffer storageMode];
texture_descriptor_.sampleCount = 1;
texture_descriptor_.cpuCacheMode = [source_buffer cpuCacheMode];