Cleanup: spelling in comments

Also use back-slashes for doxy commands.
This commit is contained in:
Campbell Barton 2022-04-28 14:03:49 +10:00
parent eb4b79c556
commit 198a763944
Notes: blender-bot 2023-02-13 22:38:46 +01:00
Referenced by issue #97693, [Mac:Xcode] Mysterious pointer-alignment requirement
9 changed files with 39 additions and 39 deletions

View File

@ -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).
*

View File

@ -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);

View File

@ -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.
*/

View File

@ -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]);

View File

@ -133,7 +133,7 @@ class MTLContext : public Context {
friend class MTLBackend;
private:
/* Compute and specialisation caches */
/* Compute and specialization caches. */
MTLContextTextureUtils texture_utils_;
public:

View File

@ -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

View File

@ -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

View File

@ -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;

View File

@ -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 = @{