Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2023-10-23 10:09:05 +11:00
parent 499f898400
commit c8c2343b4b
17 changed files with 35 additions and 35 deletions
+2 -2
View File
@@ -256,7 +256,7 @@ class GHOST_SharedOpenGLResource {
return GHOST_kFailure;
}
/* Build the renderbuffer. */
/* Build the render-buffer. */
glGenRenderbuffers(1, &m_gl_render_target);
glBindRenderbuffer(GL_RENDERBUFFER, m_gl_render_target);
@@ -273,7 +273,7 @@ class GHOST_SharedOpenGLResource {
reregisterSharedObject(TARGET_TEX2D);
}
/* Build the framebuffer */
/* Build the frame-buffer. */
glGenFramebuffers(1, &m_shared.fbo);
glBindFramebuffer(GL_FRAMEBUFFER, m_shared.fbo);
if (m_use_gl_texture2d) {
+5 -5
View File
@@ -894,7 +894,7 @@ static bool blf_glyph_set_variation_float(FontBLF *font,
}
/**
* Set the "wght" (Weight) axis to a specific weight value.
* Set the #BLF_VARIATION_AXIS_WEIGHT (Weight) axis to a specific weight value.
*
* \param coords: Array of design coordinates, per axis.
* \param weight: Weight class value (1-1000 allowed, 100-900 typical).
@@ -913,7 +913,7 @@ static float blf_glyph_set_variation_weight(FontBLF *font,
}
/**
* Set the "slnt" (Slant) axis to a specific slant value.
* Set the #BLF_VARIATION_AXIS_SLANT (Slant) axis to a specific slant value.
*
* \param coords: Array of design coordinates, per axis.
* \param degrees: Slant in clockwise (opposite to spec) degrees.
@@ -932,7 +932,7 @@ static float blf_glyph_set_variation_slant(FontBLF *font,
}
/**
* Set the "wdth" (Width) axis to a specific width value.
* Set the #BLF_VARIATION_AXIS_WIDTH (Width) axis to a specific width value.
*
* \param coords: Array of design coordinates, per axis.
* \param width: Glyph width value. 1.0 is normal, as per spec (which uses percent).
@@ -951,7 +951,7 @@ static float blf_glyph_set_variation_width(FontBLF *font,
}
/**
* Set the proposed "spac" (Spacing) axis to a specific value.
* Set the proposed #BLF_VARIATION_AXIS_SPACING (Spacing) axis to a specific value.
*
* \param coords: Array of design coordinates, per axis.
* \param spacing: Glyph spacing value. 0.0 is normal, as per spec.
@@ -970,7 +970,7 @@ static float blf_glyph_set_variation_spacing(FontBLF *font,
}
/**
* Set the "opsz" (Optical Size) axis to a specific size value.
* Set the #BLF_VARIATION_AXIS_OPTSIZE (Optical Size) axis to a specific size value.
*
* \param coords: Array of design coordinates, per axis.
* \param points: Non-zero size in typographic points.
+4 -4
View File
@@ -1975,7 +1975,7 @@ static float fcurve_eval_keyframes_interpolate(const FCurve *fcu,
const float eps = 1.e-8f;
uint a;
/* Evaltime occurs somewhere in the middle of the curve. */
/* Evaluation-time occurs somewhere in the middle of the curve. */
bool exact = false;
/* Use binary search to find appropriate keyframes...
@@ -2020,7 +2020,7 @@ static float fcurve_eval_keyframes_interpolate(const FCurve *fcu,
return 0.0f;
}
/* Evaltime occurs within the interval defined by these two keyframes. */
/* Evaluation-time occurs within the interval defined by these two keyframes. */
const float begin = prevbezt->vec[1][1];
const float change = bezt->vec[1][1] - prevbezt->vec[1][1];
const float duration = bezt->vec[1][0] - prevbezt->vec[1][0];
@@ -2351,10 +2351,10 @@ float evaluate_fcurve_driver(PathResolvedRNA *anim_rna,
float evaltime = anim_eval_context->eval_time;
/* If there is a driver (only if this F-Curve is acting as 'driver'),
* evaluate it to find value to use as "evaltime" since drivers essentially act as alternative
* evaluate it to find value to use as `evaltime` since drivers essentially act as alternative
* input (i.e. in place of 'time') for F-Curves. */
if (fcu->driver) {
/* Evaltime now serves as input for the curve. */
/* Evaluation-time now serves as input for the curve. */
evaltime = evaluate_driver(anim_rna, fcu->driver, driver_orig, anim_eval_context);
/* Only do a default 1-1 mapping if it's unlikely that anything else will set a value... */
@@ -134,7 +134,7 @@ bool BKE_subsurf_modifier_can_do_gpu_subdiv(const Scene *scene,
return false;
}
/* Deactivate GPU subdivision if autosmooth or custom split normals are used as those are
/* Deactivate GPU subdivision if auto-smooth or custom split normals are used as those are
* complicated to support on GPU, and should really be separate workflows. */
if (BKE_subsurf_modifier_use_custom_loop_normals(smd, mesh)) {
return false;
+6 -6
View File
@@ -194,14 +194,14 @@ ptrdiff_t BLI_str_utf8_invalid_byte(const char *str, size_t length)
/* Check for overlong sequences for each different length */
switch (ab) {
case 1:
/* Check for xx00 000x */
/* Check for: XX00 000X. */
if ((c & 0x3e) == 0) {
goto utf8_error;
}
continue; /* We know there aren't any more bytes to check */
case 2:
/* Check for 1110 0000, xx0x xxxx */
/* Check for: 1110 0000, XX0X XXXX. */
if (c == 0xe0 && (*p & 0x20) == 0) {
goto utf8_error;
}
@@ -243,28 +243,28 @@ ptrdiff_t BLI_str_utf8_invalid_byte(const char *str, size_t length)
break;
case 3:
/* Check for 1111 0000, xx00 xxxx */
/* Check for: 1111 0000, XX00 XXXX. */
if (c == 0xf0 && (*p & 0x30) == 0) {
goto utf8_error;
}
break;
case 4:
/* Check for 1111 1000, xx00 0xxx */
/* Check for 1111 1000, XX00 0XXX. */
if (c == 0xf8 && (*p & 0x38) == 0) {
goto utf8_error;
}
break;
case 5:
/* Check for 1111 1100, xx00 00xx */
/* Check for: 1111 1100, XX00 00XX. */
if (c == 0xfc && (*p & 0x3c) == 0) {
goto utf8_error;
}
break;
}
/* Check for valid bytes after the 2nd, if any; all must start 10 */
/* Check for valid bytes after the 2nd, if any; all must start 10. */
while (--ab > 0) {
p++;
length--;
+1 -1
View File
@@ -251,7 +251,7 @@ struct Render;
* the WorkScheduler controls the devices and selects the device where a
* WorkPackage will be calculated.
*
* \subsection WS_Devices Workscheduler
* \subsection WS_Devices Work-scheduler
* The WorkScheduler controls all Devices.
* When initializing the compositor the WorkScheduler selects all
* devices that will be used during compositor.
@@ -186,7 +186,7 @@
#define VOLUME_PROP_EMISSION_IMG_SLOT 2
#define VOLUME_PROP_PHASE_IMG_SLOT 3
#define VOLUME_OCCUPANCY_SLOT 4
/* Only during volume prepass. */
/* Only during volume pre-pass. */
#define VOLUME_HIT_DEPTH_SLOT 0
#define VOLUME_HIT_COUNT_SLOT 1
/* Only during shadow rendering. */
@@ -155,7 +155,7 @@ void VolumeModule::end_sync()
GPU_ATTACHMENT_TEXTURE_LAYER(prop_extinction_tx_, 0));
}
else {
/* Empty framebuffer. */
/* Empty frame-buffer. */
occupancy_fb_.ensure(data_.tex_size.xy());
}
@@ -55,7 +55,7 @@ class VolumeModule {
/**
* Occupancy map that allows to fill froxels that are inside the geometry.
* It is filled during a pre-pass using atomic operations.
* Using a 3D bitfield, we only allocate one bit per froxel.
* Using a 3D bit-field, we only allocate one bit per froxel.
*/
Texture occupancy_tx_ = {"occupancy_tx"};
/**
@@ -65,7 +65,7 @@ class VolumeModule {
*/
Texture hit_count_tx_ = {"hit_count_tx"};
Texture hit_depth_tx_ = {"hit_depth_tx"};
/** Empty framebuffer for occupancy pass. */
/** Empty frame-buffer for occupancy pass. */
Framebuffer occupancy_fb_ = {"occupancy_fb"};
/* Material Parameters */
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later */
/**
* Convert hit list to occupancy bitfield for the material pass.
* Convert hit list to occupancy bit-field for the material pass.
*/
#pragma BLENDER_REQUIRE(eevee_occupancy_lib.glsl)
@@ -34,7 +34,7 @@ void main()
nodetree_surface();
# ifdef MAT_FORWARD
/* Prepass only allows fully opaque areas to cut through all transparent layers. */
/* Pre-pass only allows fully opaque areas to cut through all transparent layers. */
float threshold = 0.0;
# else
float noise_offset = sampling_rng_1D_get(SAMPLING_TRANSPARENCY);
@@ -3,7 +3,7 @@
* SPDX-License-Identifier: GPL-2.0-or-later */
/**
* Prepass that voxelizes an object on frustum aligned voxels.
* Pre-pass that voxelizes an object on frustum aligned voxels.
*
* There is two method available:
*
@@ -18,8 +18,8 @@
* - Accurate method:
* For each fragment we write the fragment depth
* in a list (contained in one array texture). This list
* is then processed by a fullscreen pass (see
* eevee_occupancy_convert_frag.glsl) that sorts and
* is then processed by a full-screen pass (see
* `eevee_occupancy_convert_frag.glsl`) that sorts and
* converts all the hits to the occupancy bits. This
* emulate Cycles behavior by considering only back-face
* hits as exit events and front-face hits as entry events.
@@ -57,7 +57,7 @@ void main()
OccupancyBits occupancy_bits = occupancy_from_depth(volume_z, uniform_buf.volumes.tex_size.z);
for (int i = 0; i < imageSize(occupancy_img).z; i++) {
/* Negate occupancy bits before XORing so that meshes clipped by the near plane fill the
* space betwen the inner part of the mesh and the near plane.
* space between the inner part of the mesh and the near plane.
* It doesn't change anything for closed meshes. */
occupancy_bits.bits[i] = ~occupancy_bits.bits[i];
if (occupancy_bits.bits[i] != 0u) {
@@ -859,7 +859,7 @@ enum class CyclicalMode : int8_t {
CLOSE,
/* Sets all strokes to not cycle. */
OPEN,
/* Switchs the cyclic state of the strokes. */
/* Switches the cyclic state of the strokes. */
TOGGLE,
};
+1 -1
View File
@@ -96,7 +96,7 @@ MTLPixelFormat gpu_texture_format_to_metal(eGPUTextureFormat tex_format)
return MTLPixelFormatR16Float;
case GPU_R16:
return MTLPixelFormatR16Unorm;
/* Special formats texture & renderbuffer */
/* Special formats texture & render-buffer. */
case GPU_RGB10_A2:
return MTLPixelFormatRGB10A2Unorm;
case GPU_RGB10_A2UI:
+2 -2
View File
@@ -207,7 +207,7 @@ inline GLenum to_gl_internal_format(eGPUTextureFormat format)
return GL_R16F;
case GPU_R16:
return GL_R16;
/* Special formats texture & renderbuffer */
/* Special formats texture & render-buffer. */
case GPU_RGB10_A2:
return GL_RGB10_A2;
case GPU_RGB10_A2UI:
@@ -423,7 +423,7 @@ inline GLenum to_gl_data_format(eGPUTextureFormat format)
case GPU_R16UI:
case GPU_R16I:
return GL_RED_INTEGER;
/* Special formats texture & renderbuffer */
/* Special formats texture & render-buffer. */
case GPU_RGB10_A2UI:
case GPU_RGB10_A2:
case GPU_SRGB8_A8:
+1 -1
View File
@@ -421,7 +421,7 @@ static VkImageCreateFlagBits to_vk_image_create(const eGPUTextureType texture_ty
result = static_cast<VkImageCreateFlagBits>(result | VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT);
}
/* sRGB textures needs to be mutable as they can be used as non-sRGB framebuffer attachments. */
/* sRGB textures needs to be mutable as they can be used as non-sRGB frame-buffer attachments. */
if (usage & GPU_TEXTURE_USAGE_ATTACHMENT && format_flag & GPU_FORMAT_SRGB) {
result = static_cast<VkImageCreateFlagBits>(result | VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT);
}
+1 -1
View File
@@ -280,7 +280,7 @@ typedef struct Curve {
struct CharInfo curinfo;
/* font part end */
/** Current evaltime - for use by Objects parented to curves. */
/** Current evaluation-time, for use by Objects parented to curves. */
float ctime;
float bevfac1, bevfac2;
char bevfac1_mapping, bevfac2_mapping;