Cleanup: spelling in comments

This commit is contained in:
Campbell Barton
2024-08-04 13:45:06 +10:00
parent cdd72e689f
commit c071030ac3
18 changed files with 42 additions and 41 deletions

View File

@@ -524,7 +524,7 @@ ccl_device_inline bool shadow_intersection_filter_curves(const hiprtRay &ray,
float ray_tmax = hit.t;
# ifdef __SHADOW_LINKING__
/* It doesn't seem like this is neccesary. */
/* It doesn't seem like this is necessary. */
if (intersection_skip_shadow_link(nullptr, self, object)) {
/* Ignore hit - continue traversal */
return true;

View File

@@ -30,7 +30,7 @@
#include "IMB_colormanagement.hh"
/* -------------------------------------------------------------------- */
/** \name Paste API based on 'partial' blendfiles.
/** \name Paste API based on 'partial' blend-files.
* \{ */
/* Common helper for paste functions. */

View File

@@ -6592,7 +6592,7 @@ void BKE_constraint_blend_read_data(BlendDataReader *reader, ID *id_owner, ListB
}
else {
/* No `BLI_assert_unreachable()` here, this code can be reached in some cases, like the
* deprecated RigidBody contraint. */
* deprecated RigidBody constraint. */
con->data = nullptr;
}

View File

@@ -1064,7 +1064,7 @@ void BKE_modifier_blend_write(BlendWriter *writer, const ID *id_owner, ListBase
}
}
else if (md->type == eModifierType_Fluidsim) {
BLI_assert_unreachable(); /* Deprecatd data, should never be written. */
BLI_assert_unreachable(); /* Deprecated data, should never be written. */
}
else if (md->type == eModifierType_DynamicPaint) {
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md;

View File

@@ -985,7 +985,7 @@ static void direct_link_node_socket(BlendDataReader *reader, bNodeSocket *sock)
BLO_read_struct(reader, bNodeLink, &sock->link);
sock->typeinfo = nullptr;
/* FIXME Avoid using low-level untyped read function here. Although this seems to be only for
* versionning code now? Does not seem to be written anymore at least. */
* versioning code now? Does not seem to be written anymore at least. */
BLO_read_data_address(reader, &sock->storage);
/* FIXME Avoid using low-level untyped read function here. Most likely by just mirroring
* #write_node_socket_default_value ? */

View File

@@ -348,7 +348,7 @@ static void socket_data_write(BlendWriter *writer, bNodeTreeInterfaceSocket &soc
template<typename T> void socket_data_read_data_impl(BlendDataReader *reader, T **data)
{
/* FIXME Avoid using low-level untyped read function here. Cannot use the BLO_read_struct
* currently (macro expension would process `T` instead of the actual type). */
* currently (macro expansion would process `T` instead of the actual type). */
BLO_read_data_address(reader, data);
}
template<> void socket_data_read_data_impl(BlendDataReader *reader, bNodeSocketValueMenu **data)

View File

@@ -111,8 +111,8 @@ static void workspace_blend_read_data(BlendDataReader *reader, ID *id)
/* Parent pointer does not belong to workspace data and is therefore restored in lib_link step
* of window manager. */
/* FIXME: Should not use that untyped #BLO_read_data_address call, especially since it's
* refcounting the matching data in readfile code. Problem currently is that there is no type
* info available for this void pointer (_should_ be pointing to a `WorkSpaceLayout`?), so
* reference-counting the matching data in readfile code. Problem currently is that there is no
* type info available for this void pointer (_should_ be pointing to a #WorkSpaceLayout ?), so
* #BLO_read_get_new_data_address_no_us cannot be used here. */
BLO_read_data_address(reader, &relation->value);
}

View File

@@ -179,11 +179,11 @@ void BLO_write_destroy_id_buffer(BLO_Write_IDBuffer **id_buffer);
* where it is actually needed (e.g. the ShapeKey's data, since its items size varies depending on
* the type of geometry owning it, see #shapekey_blend_write).
*
* \warning Data written with this call have no type information attached to them in the blendfile.
* The main consequence is that there will be no handling of endianness conversion for them in
* readfile code.
* \warning Data written with this call have no type information attached to them
* in the blend-file. The main consequence is that there will be no handling of endianness
* conversion for them in readfile code.
* Basic types array functions (like #BLO_write_int8_array etc.) also use #BLO_write_raw
* internally, but if their matching read funtion is used to load the data (like
* internally, but if their matching read function is used to load the data (like
* #BLO_read_int8_array), the read function will take care of endianness conversion.
*/
void BLO_write_raw(BlendWriter *writer, size_t size_in_bytes, const void *data_ptr);
@@ -253,9 +253,10 @@ bool BLO_write_is_undo(BlendWriter *writer);
* BLO_read_int32_array(reader, hmd->totindex, &hmd->indexar);
* \endcode
*
* Avoid using the generic #BLO_read_data_address (and lowe-level API like
* #BLO_read_get_new_data_address) when possible, use the typed functions instead. Only data
* written with #BLO_write_raw should typically be read with #BLO_read_data_address.
* Avoid using the generic #BLO_read_data_address
* (and low-level API like #BLO_read_get_new_data_address)
* when possible, use the typed functions instead.
* Only data written with #BLO_write_raw should typically be read with #BLO_read_data_address.
* \{ */
void *BLO_read_get_new_data_address(BlendDataReader *reader, const void *old_address);
@@ -267,9 +268,9 @@ void *BLO_read_get_new_data_address(BlendDataReader *reader, const void *old_add
* end of the reading process, if no other 'real' usage was detected for it.
*
* Typical valid usages include:
* - Restoring pointers to a specific item in an array or list (usually 'active' item e.g.). The
* found item is expected to also be read as part of its array/list storage reading.
* - Doing temporary access to deprecated data as part of some versionning code.
* - Restoring pointers to a specific item in an array or list (usually 'active' item e.g.). The
* found item is expected to also be read as part of its array/list storage reading.
* - Doing temporary access to deprecated data as part of some versioning code.
*/
void *BLO_read_get_new_data_address_no_us(BlendDataReader *reader,
const void *old_address,

View File

@@ -198,7 +198,7 @@ void DrawMulti::execute(RecordingState &state) const
gpu::Batch *batch = group.gpu_batch;
if (GPUPrimType(group.expanded_prim_type) != GPU_PRIM_NONE) {
/* Bind original batck as resource and use a procedural batch to issue the drawcall. */
/* Bind original batch as resource and use a procedural batch to issue the draw-call. */
GPU_batch_bind_as_resources(group.gpu_batch, state.shader);
batch = procedural_batch_get(GPUPrimType(group.expanded_prim_type));
}

View File

@@ -1114,9 +1114,9 @@ void fcurve_to_keylist(AnimData *adt,
const bool do_extremes = (saction_flag & SACTION_SHOW_EXTREMES) != 0;
BezTripleChain chain = {nullptr};
/* The indices for which keys have been addeed to the key columns. Initialized as invalid bounds
* for the case that no keyframes get added to the keycolumns, which happens when the given range
* doesn't overlap with the existing keyframes. */
/* The indices for which keys have been added to the key columns. Initialized as invalid bounds
* for the case that no keyframes get added to the key-columns, which happens when the given
* range doesn't overlap with the existing keyframes. */
blender::Bounds<int> index_bounds(int(fcu->totvert), 0);
/* Loop through beztriples, making ActKeysColumns. */
for (int v = 0; v < fcu->totvert; v++) {

View File

@@ -323,7 +323,7 @@ void smooth_curve_positions(bke::CurvesGeometry &curves,
});
});
/* Copy the resulting values from the flat array back into the three posititon attributes for
/* Copy the resulting values from the flat array back into the three position attributes for
* the left and right handles as well as the control points. */
bke::curves::bezier::write_all_positions(curves, bezier_curves_to_smooth, all_positions);

View File

@@ -241,12 +241,12 @@ static uint16_t bind_attribute_as_ssbo(const ShaderInterface *interface,
const GPUVertFormat *format = &vbo->format;
if (format->deinterleaved == true) {
/* Deinterleaved attribute buffers are not supported for now. */
/* De-interleaved attribute buffers are not supported for now. */
/* TODO(fclem): Detect this case and assert? */
return 0u;
}
/* We need to support GPU OpenSubdiv meshes. This assert can be enabled back after we refactor
* our opensubdiv implementation to output the same layout as the regular mesh extraction. */
* our OpenSubdiv implementation to output the same layout as the regular mesh extraction. */
// BLI_assert_msg(format->attr_len == 1, "Multi attribute buffers are not supported for now");
char uniform_name[] = "gpu_attr_0";
@@ -291,7 +291,7 @@ void GPU_batch_bind_as_resources(Batch *batch, GPUShader *shader)
GPU_shader_uniform_1i(shader, "gpu_index_base_index", batch->elem->index_base_get());
}
else {
/* Still fullfil the binding requirements even if the buffer will not be read. */
/* Still fulfill the binding requirements even if the buffer will not be read. */
GPU_vertbuf_bind_as_ssbo(batch->verts[0], GPU_SSBO_INDEX_BUF_SLOT);
GPU_shader_uniform_1b(shader, "gpu_index_no_buffer", true);
}

View File

@@ -270,22 +270,22 @@ enum class Qualifier {
};
ENUM_OPERATORS(Qualifier, Qualifier::QUALIFIER_MAX);
/* Maps to different descriptor sets. */
/** Maps to different descriptor sets. */
enum class Frequency {
BATCH = 0,
PASS,
/* Special freqency tag that will automatically source storage buffers from GPUBatch. */
/** Special frequency tag that will automatically source storage buffers from GPUBatch. */
GEOMETRY,
};
/* Dual Source Blending Index. */
/** Dual Source Blending Index. */
enum class DualBlend {
NONE = 0,
SRC_0,
SRC_1,
};
/* Interpolation qualifiers. */
/** Interpolation qualifiers. */
enum class Interpolation {
SMOOTH = 0,
FLAT,
@@ -553,8 +553,8 @@ struct ShaderCreateInfo {
* Resources are grouped by frequency of change.
* Pass resources are meant to be valid for the whole pass.
* Batch resources can be changed in a more granular manner (per object/material).
* Geometry resources can be changed in a very granular manner (per drawcall).
* Mis-usage will only produce suboptimal performance.
* Geometry resources can be changed in a very granular manner (per draw-call).
* Misuse will only produce suboptimal performance.
*/
Vector<Resource> pass_resources_, batch_resources_, geometry_resources_;

View File

@@ -10,7 +10,7 @@
* Implemented as macros to avoid compiler differences with buffer qualifiers.
*/
/* Returns index in the first component. Needed for non trivialy packed data. */
/** Returns index in the first component. Needed for non trivially packed data. */
uint gpu_attr_load_index(uint vertex_index, ivec2 stride_and_offset)
{
return vertex_index * uint(stride_and_offset.x) + uint(stride_and_offset.y);

View File

@@ -87,7 +87,7 @@ typedef struct SDNA {
/**
* Contains the number of allocated items in both #members and #members_array_num arrays below.
*
* Typically same as #members_len, unless after versionning DNA info (these arrays are
* Typically same as #members_len, unless after versioning DNA info (these arrays are
* reallocated by chunks, see #DNA_sdna_patch_struct_member).
*/
int members_num_alloc;

View File

@@ -504,7 +504,7 @@ static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error
/* Calculate 'sdna->pointer_size'.
*
* NOTE: Cannot just do `sizeof(void *)` here, since the current DNA may come from a blendfile
* NOTE: Cannot just do `sizeof(void *)` here, since the current DNA may come from a blend-file
* saved on a different system, using a different pointer size. So instead, use half the size of
* the #ListBase struct (only made of two pointers).
*/
@@ -520,8 +520,8 @@ static bool init_structDNA(SDNA *sdna, bool do_endian_swap, const char **r_error
const SDNA_Struct *struct_info = sdna->structs[struct_index];
sdna->pointer_size = sdna->types_size[struct_info->type_index] / 2;
/* Should never fail, double-check that #ListBase struct is still what is should be (akak a
* couple of pointers and nothing else). */
/* Should never fail, double-check that #ListBase struct is still what is should be
* (a couple of pointers and nothing else). */
if (UNLIKELY(struct_info->members_num != 2 || !ELEM(sdna->pointer_size, 4, 8))) {
*r_error_message = "ListBase struct error: invalid computed pointer-size.";
return false;

View File

@@ -80,9 +80,9 @@ char *DNA_member_id_rename(struct MemArena *mem_arena,
/**
* When requesting version info, support both directions.
*
* - 'Static' is the original name of the data, the one that is still stored in blendfiles DNA
* info (to avoid breaking forward compatibility).
* - 'Alias' is the current name of the data, the one used in current DNA definition code.
* - 'Static' is the original name of the data, the one that is still stored in blend-files
* DNA info (to avoid breaking forward compatibility).
* - 'Alias' is the current name of the data, the one used in current DNA definition code.
*/
enum eDNA_RenameDir {
DNA_RENAME_STATIC_FROM_ALIAS = -1,

View File

@@ -858,7 +858,7 @@ static bool seq_read_data_cb(Sequence *seq, void *user_data)
/* `SEQ_TYPE_SOUND_HD` case needs to be kept here, for backward compatibility. */
if (ELEM(seq->type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD)) {
/* FIXME In #SEQ_TYPE_IMAGE case, there is currently no available information about the
* lenght of the stored array of #StripElem.
* length of the stored array of #StripElem.
*
* This is 'not a problem' because the reading code only checks that the loaded buffer is at
* least large enough for the requested data (here a single #StripElem item), and always