Cleanup: spelling in comments

This commit is contained in:
Campbell Barton 2022-12-13 12:34:32 +11:00
parent cfcc728de6
commit adb49ffa24
15 changed files with 28 additions and 28 deletions

View File

@ -1127,7 +1127,7 @@ void boid_brain(BoidBrainData *bbd, int p, ParticleData *pa)
/* decide on jumping & liftoff */
if (bpa->data.mode == eBoidMode_OnLand) {
/* fuzziness makes boids capable of misjudgement */
/* Fuzziness makes boids capable of misjudgment. */
float mul = 1.0f + state->rule_fuzziness;
if (boids->options & BOID_ALLOW_FLIGHT && bbd->wanted_co[2] > 0.0f) {

View File

@ -1877,7 +1877,7 @@ KeyBlock *BKE_keyblock_add_ctime(Key *key, const char *name, const bool do_force
const float cpos = key->ctime / 100.0f;
/* In case of absolute keys, there is no point in adding more than one key with the same pos.
* Hence only set new keybloc pos to current time if none previous one already use it.
* Hence only set new key-block pos to current time if none previous one already use it.
* Now at least people just adding absolute keys without touching to ctime
* won't have to systematically use retiming func (and have ordering issues, too). See T39897.
*/

View File

@ -320,11 +320,11 @@ struct VolumeGrid {
openvdb::io::File file(filepath);
/* Isolate file loading since that's potentially multithreaded and we are
/* Isolate file loading since that's potentially multi-threaded and we are
* holding a mutex lock. */
blender::threading::isolate_task([&] {
try {
/* Disably delay loading and file copying, this has poor performance
/* Disable delay loading and file copying, this has poor performance
* on network drivers. */
const bool delay_load = false;
file.setCopyMaxBytes(0);
@ -886,7 +886,7 @@ bool BKE_volume_load(const Volume *volume, const Main *bmain)
openvdb::GridPtrVec vdb_grids;
try {
/* Disably delay loading and file copying, this has poor performance
/* Disable delay loading and file copying, this has poor performance
* on network drivers. */
const bool delay_load = false;
file.setCopyMaxBytes(0);

View File

@ -1158,7 +1158,7 @@ World *EEVEE_world_default_get(void)
* Source is provided separately, rather than via create-info as source is manipulated
* by `eevee_shader_material_create_info_amend`.
*
* We also retain the previous behaviour for ensuring library includes occur in the
* We also retain the previous behavior for ensuring library includes occur in the
* correct order. */
static const char *eevee_get_vert_info(int options, char **r_src)
{
@ -1288,7 +1288,7 @@ static char *eevee_get_defines(int options)
* CreateInfo's for EEVEE materials are declared in:
* `eevee/shaders/infos/eevee_legacy_material_info.hh`
*
* This function should only contain defines which alter behaviour, but do not affect shader
* This function should only contain defines which alter behavior, but do not affect shader
* resources. */
if ((options & VAR_WORLD_BACKGROUND) != 0) {

View File

@ -21,7 +21,7 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_irradiance_lib)
GPU_SHADER_CREATE_INFO(eevee_legacy_common_utiltex_lib)
.sampler(2, ImageType::FLOAT_2D_ARRAY, "utilTex");
/* Raytrace lib. */
/* Ray-trace lib. */
GPU_SHADER_CREATE_INFO(eevee_legacy_raytrace_lib)
.additional_info("draw_view")
.additional_info("eevee_legacy_common_lib")
@ -33,7 +33,7 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_ambient_occlusion_lib)
.additional_info("eevee_legacy_raytrace_lib")
.sampler(5, ImageType::FLOAT_2D, "horizonBuffer");
/* Lightprobe lib. */
/* Light-probe lib. */
GPU_SHADER_CREATE_INFO(eevee_legacy_lightprobe_lib)
.additional_info("eevee_legacy_common_lib")
.additional_info("eevee_legacy_common_utiltex_lib")
@ -128,7 +128,7 @@ GPU_SHADER_CREATE_INFO(eevee_legacy_surface_lib_hair)
GPU_SHADER_CREATE_INFO(eevee_legacy_surface_lib_pointcloud)
.define("USE_SURFACE_LIB_POINTCLOUD")
/* Pointcloud still uses the common interface as well. */
/* Point-cloud still uses the common interface as well. */
.additional_info("eevee_legacy_surface_lib_common")
.vertex_out(eevee_legacy_surface_point_cloud_iface);

View File

@ -2,7 +2,7 @@
#pragma once
/* Voluemtric iface. */
/* Volumetric iface. */
GPU_SHADER_INTERFACE_INFO(legacy_volume_vert_geom_iface, "volumetric_vert_iface")
.smooth(Type::VEC4, "vPos");

View File

@ -995,7 +995,7 @@ static void ui_apply_but_funcs_after(bContext *C)
BLI_listbase_clear(&UIAfterFuncs);
LISTBASE_FOREACH_MUTABLE (uiAfterFunc *, afterf, &funcs) {
uiAfterFunc after = *afterf; /* copy to avoid memleak on exit() */
uiAfterFunc after = *afterf; /* Copy to avoid memory leak on exit(). */
BLI_freelinkN(&funcs, afterf);
if (after.context) {

View File

@ -2312,7 +2312,7 @@ int UI_icon_from_rnaptr(const bContext *C, PointerRNA *ptr, int rnaicon, const b
return rnaicon;
}
/* try ID, material, texture or dynapaint slot */
/* Try ID, material, texture or dynamic-paint slot. */
if (RNA_struct_is_ID(ptr->type)) {
id = ptr->owner_id;
}

View File

@ -187,7 +187,7 @@ typedef enum eGPUDataFormat {
} eGPUDataFormat;
/** Texture usage flags.
* Texture usage flags allow backend implementations to contextually optimise texture resources.
* Texture usage flags allow backend implementations to contextually optimize texture resources.
* Any texture with an explicit flag should not perform operations which are not explicitly
* specified in the usage flags. If usage is unknown upfront, then GPU_TEXTURE_USAGE_GENERAL can be
* used.
@ -202,7 +202,7 @@ typedef enum eGPUTextureUsage {
GPU_TEXTURE_USAGE_SHADER_READ = (1 << 0),
/* Whether the texture is written to by a shader using imageStore. */
GPU_TEXTURE_USAGE_SHADER_WRITE = (1 << 1),
/* Whether a texture is used as an attachment in a framebuffer. */
/* Whether a texture is used as an attachment in a frame-buffer. */
GPU_TEXTURE_USAGE_ATTACHMENT = (1 << 2),
/* Whether the texture is used as a texture view, uses mip-map layer adjustment,
* OR, uses swizzle access masks. Mip-map base layer adjustment and texture channel swizzling
@ -226,11 +226,11 @@ unsigned int GPU_texture_memory_usage_get(void);
* \note \a data is expected to be float. If the \a format is not compatible with float data or if
* the data is not in float format, use GPU_texture_update to upload the data with the right data
* format.
* NOTE: _ex variants of texure creation functions allow specification of explicit usage for
* NOTE: `_ex` variants of texture creation functions allow specification of explicit usage for
* optimal performance. Using standard texture creation will use the `GPU_TEXTURE_USAGE_GENERAL`.
*
* Textures created via other means will either inherit usage from the source resource, or also
* be initialised with `GPU_TEXTURE_USAGE_GENERAL`.
* be initialized with `GPU_TEXTURE_USAGE_GENERAL`.
*
* flag. \a mips is the number of mip level to allocate. It must be >= 1.
*/

View File

@ -357,13 +357,13 @@ void gpu_shader_create_info_init()
basic_depth_pointcloud_conservative_clipped =
basic_depth_pointcloud_conservative_no_geom_clipped;
/* Overlay prepass wire. */
/* Overlay pre-pass wire. */
overlay_outline_prepass_wire = overlay_outline_prepass_wire_no_geom;
/* Edit UV Edges. */
overlay_edit_uv_edges = overlay_edit_uv_edges_no_geom;
/* Downsample Cube/Proe rendering. */
/* Down-sample Cube/Probe rendering. */
eevee_legacy_effect_downsample_cube = eevee_legacy_effect_downsample_cube_no_geom;
eevee_legacy_probe_filter_glossy = eevee_legacy_probe_filter_glossy_no_geom;
eevee_legacy_lightprobe_planar_downsample = eevee_legacy_lightprobe_planar_downsample_no_geom;

View File

@ -845,7 +845,7 @@ struct ShaderCreateInfo {
/* -------------------------------------------------------------------- */
/** \name Transform feedback properties
*
* Transform feedback enablement and output binding assignmnt.
* Transform feedback enablement and output binding assignment.
* \{ */
Self &transform_feedback_mode(eGPUShaderTFBType tf_mode)

View File

@ -82,7 +82,7 @@ class Texture {
eGPUTextureFormatFlag format_flag_;
/** Texture type. */
eGPUTextureType type_;
/** Texutre usage flags */
/** Texture usage flags. */
eGPUTextureUsage gpu_image_usage_flags_;
/** Number of mipmaps this texture has (Max miplvl). */

View File

@ -533,7 +533,7 @@ id<MTLRenderCommandEncoder> MTLBatch::bind(uint v_first, uint v_count, uint i_fi
}
/* Ensure Context Render Pipeline State is fully setup and ready to execute the draw.
* This should happen after all other final rendeirng setup is complete. */
* This should happen after all other final rendering setup is complete. */
MTLPrimitiveType mtl_prim_type = gpu_prim_type_to_metal(this->prim_type);
if (!ctx->ensure_render_pipeline_state(mtl_prim_type)) {
printf("FAILED TO ENSURE RENDER PIPELINE STATE");

View File

@ -223,7 +223,7 @@ id<MTLTexture> gpu::MTLTexture::get_metal_handle()
if (mip_swizzle_view_ != nil || texture_view_dirty_flags_) {
bake_mip_swizzle_view();
/* Optimisation: If texture view does not change mip parameters, no texture view will be
/* Optimization: If texture view does not change mip parameters, no texture view will be
* baked. This is because texture views remove the ability to perform lossless compression.
*/
if (mip_swizzle_view_ != nil) {
@ -620,7 +620,7 @@ void gpu::MTLTexture::update_sub(
BLI_assert(blit_encoder != nil);
/* If we need to use a texture view to write texture data as the source
* format is unwritable, if our texture has not been initialised with
* format is unwritable, if our texture has not been initialized with
* texture view support, use a staging texture. */
if ((compatible_write_format != destination_format) &&
!(gpu_image_usage_flags_ & GPU_TEXTURE_USAGE_MIP_SWIZZLE_VIEW)) {
@ -646,7 +646,7 @@ void gpu::MTLTexture::update_sub(
/* Allocate stating texture if needed. */
if (use_staging_texture) {
/* Create staging texture to avoid shader-write limiting optimisation. */
/* Create staging texture to avoid shader-write limiting optimization. */
BLI_assert(texture_descriptor_ != nullptr);
MTLTextureUsage original_usage = texture_descriptor_.usage;
texture_descriptor_.usage = original_usage | MTLTextureUsageShaderWrite |

View File

@ -384,7 +384,7 @@ class GlareOperation : public NodeOperation {
/* For the given number of iterations, accumulate four ghosts with different scales and color
* modulators. The result of the previous iteration is used as the input of the current
* iteration. We start from index 1 because we are not interested in the scales produced for
* the first iteration according to visual judgement, see the compute_ghost_scales method. */
* the first iteration according to visual judgment, see the compute_ghost_scales method. */
Result &input_ghost_result = base_ghost_result;
const IndexRange iterations_range = IndexRange(get_number_of_iterations()).drop_front(1);
for (const int i : iterations_range) {
@ -492,7 +492,7 @@ class GlareOperation : public NodeOperation {
* have n number of iterations, that means the total number of accumulations is 4 * n. To get a
* variety of scales, we generate an arithmetic progression that starts from 2.1 and ends at
* zero exclusive, containing 4 * n elements. The start scale of 2.1 is chosen arbitrarily using
* visual judgement. To get more scale variations, every other scale is inverted with a slight
* visual judgment. To get more scale variations, every other scale is inverted with a slight
* change in scale such that it alternates between scaling down and up, additionally every other
* ghost is flipped across the image center by negating its scale. Finally, to get variations
* across the number of iterations, a shift of 0.5 is introduced when the number of iterations is
@ -524,7 +524,7 @@ class GlareOperation : public NodeOperation {
/* The operation computes two base ghosts by blurring the highlights with two different radii,
* this method computes the blur radius for the smaller one. The value is chosen using visual
* judgement. Make sure to take the quality factor into account, see the get_quality_factor
* judgment. Make sure to take the quality factor into account, see the get_quality_factor
* method for more information. */
float get_small_ghost_radius()
{