diff options
-rw-r--r-- | source/blender/blenlib/BLI_devirtualize_parameters.hh | 2 | ||||
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 8 | ||||
-rw-r--r-- | source/blender/functions/FN_multi_function_builder.hh | 2 | ||||
-rw-r--r-- | source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 2 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_context.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_debug.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_texture.hh | 22 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_texture.mm | 34 | ||||
-rw-r--r-- | source/blender/gpu/metal/mtl_texture_util.mm | 4 |
9 files changed, 39 insertions, 39 deletions
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:bufferOptions]; @@ -1592,7 +1592,7 @@ bool gpu::MTLTexture::init_internal(void) bool gpu::MTLTexture::init_internal(GPUVertBuf *vbo) { - /* Zero initialise. */ + /* Zero initialize. */ this->prepare_internal(); /* TODO(Metal): Add implementation for GPU Vert buf. */ @@ -1603,7 +1603,7 @@ bool gpu::MTLTexture::init_internal(const GPUTexture *src, int mip_offset, int l { BLI_assert(src); - /* Zero initialise. */ + /* Zero initialize. */ this->prepare_internal(); /* Flag as using texture view. */ @@ -1618,7 +1618,7 @@ bool gpu::MTLTexture::init_internal(const GPUTexture *src, int mip_offset, int l BLI_assert(this->texture_); [this->texture_ retain]; - /* Flag texture as baked -- we do not need explicit initialisation. */ + /* Flag texture as baked -- we do not need explicit initialization. */ this->is_baked_ = true; this->is_dirty_ = false; @@ -1638,7 +1638,7 @@ bool gpu::MTLTexture::texture_is_baked() return this->is_baked_; } -/* Prepare texture parameters after initialisation, but before baking. */ +/* Prepare texture parameters after initialization, but before baking. */ void gpu::MTLTexture::prepare_internal() { @@ -1647,7 +1647,7 @@ void gpu::MTLTexture::prepare_internal() this->gpu_image_usage_flags_ |= GPU_TEXTURE_USAGE_ATTACHMENT; } - /* Derive maxmimum number of mip levels by default. + /* Derive maximum number of mip levels by default. * TODO(Metal): This can be removed if max mip counts are specified upfront. */ if (this->type_ == GPU_TEXTURE_1D || this->type_ == GPU_TEXTURE_1D_ARRAY || this->type_ == GPU_TEXTURE_BUFFER) { @@ -1684,7 +1684,7 @@ void gpu::MTLTexture::ensure_baked() BLI_assert(this->resource_mode_ != MTL_TEXTURE_MODE_TEXTURE_VIEW); BLI_assert(this->resource_mode_ != MTL_TEXTURE_MODE_VBO); - /* Format and mip levels (TODO(Metal): Optimise mipmaps counts, specify up-front). */ + /* Format and mip levels (TODO(Metal): Optimize mipmaps counts, specify up-front). */ MTLPixelFormat mtl_format = gpu_texture_format_to_metal(this->format_); /* Create texture descriptor. */ @@ -1709,7 +1709,7 @@ void gpu::MTLTexture::ensure_baked() 1; this->texture_descriptor_.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite | - MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimise usage flags. */ + MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimize usage flags. */ this->texture_descriptor_.storageMode = MTLStorageModePrivate; this->texture_descriptor_.sampleCount = 1; this->texture_descriptor_.cpuCacheMode = MTLCPUCacheModeDefaultCache; @@ -1735,7 +1735,7 @@ void gpu::MTLTexture::ensure_baked() 1; this->texture_descriptor_.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite | - MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimise usage flags. */ + MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimize usage flags. */ this->texture_descriptor_.storageMode = MTLStorageModePrivate; this->texture_descriptor_.sampleCount = 1; this->texture_descriptor_.cpuCacheMode = MTLCPUCacheModeDefaultCache; @@ -1757,7 +1757,7 @@ void gpu::MTLTexture::ensure_baked() 1; this->texture_descriptor_.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite | - MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimise usage flags. */ + MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimize usage flags. */ this->texture_descriptor_.storageMode = MTLStorageModePrivate; this->texture_descriptor_.sampleCount = 1; this->texture_descriptor_.cpuCacheMode = MTLCPUCacheModeDefaultCache; @@ -1786,7 +1786,7 @@ void gpu::MTLTexture::ensure_baked() 1; this->texture_descriptor_.usage = MTLTextureUsageRenderTarget | MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite | - MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimise usage flags. */ + MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimize usage flags. */ this->texture_descriptor_.storageMode = MTLStorageModePrivate; this->texture_descriptor_.sampleCount = 1; this->texture_descriptor_.cpuCacheMode = MTLCPUCacheModeDefaultCache; @@ -1807,7 +1807,7 @@ void gpu::MTLTexture::ensure_baked() 1; this->texture_descriptor_.usage = MTLTextureUsageShaderRead | MTLTextureUsageShaderWrite | - MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimise usage flags. */ + MTLTextureUsagePixelFormatView; /* TODO(Metal): Optimize usage flags. */ this->texture_descriptor_.storageMode = MTLStorageModePrivate; this->texture_descriptor_.sampleCount = 1; this->texture_descriptor_.cpuCacheMode = MTLCPUCacheModeDefaultCache; diff --git a/source/blender/gpu/metal/mtl_texture_util.mm b/source/blender/gpu/metal/mtl_texture_util.mm index c166a9362c8..698aec77fc3 100644 --- a/source/blender/gpu/metal/mtl_texture_util.mm +++ b/source/blender/gpu/metal/mtl_texture_util.mm @@ -325,7 +325,7 @@ id<MTLComputePipelineState> gpu::MTLTexture::mtl_texture_update_impl( NSString *tex_update_kernel_src = [NSString stringWithUTF8String:datatoc_compute_texture_update_msl]; - /* Prepare options and specialisations. */ + /* Prepare options and specializations. */ MTLCompileOptions *options = [[[MTLCompileOptions alloc] init] autorelease]; options.languageVersion = MTLLanguageVersion2_2; options.preprocessorMacros = @{ @@ -635,7 +635,7 @@ id<MTLComputePipelineState> gpu::MTLTexture::mtl_texture_read_impl( } } - /* Prepare options and specialisations. */ + /* Prepare options and specializations. */ MTLCompileOptions *options = [[[MTLCompileOptions alloc] init] autorelease]; options.languageVersion = MTLLanguageVersion2_2; options.preprocessorMacros = @{ |