Cleanup: spelling in comments

Also add missing task ID.
This commit is contained in:
Campbell Barton 2022-09-28 09:41:31 +10:00
parent 72a7f107d8
commit 6d1d1bf2b1
22 changed files with 42 additions and 39 deletions

View File

@ -174,7 +174,7 @@ class DeviceQueue {
/* Accumulated execution time for combinations of kernels launched together. */
map<DeviceKernelMask, double> stats_kernel_time_;
/* If it is true, then a performance statistics in the debugging logs will have focus on kernels
* and an explicitqueue synchronization will be added after each kernel execution. */
* and an explicit queue synchronization will be added after each kernel execution. */
bool is_per_kernel_performance_;
};

View File

@ -52,9 +52,9 @@ class PathTraceWorkCPU : public PathTraceWork {
virtual void cryptomatte_postproces() override;
#ifdef WITH_PATH_GUIDING
/* Intializes the per-thread guiding kernel data. The function sets the pointers to the
/* Initializes the per-thread guiding kernel data. The function sets the pointers to the
* global guiding field and the sample data storage as well es initializes the per-thread
* guided sampling distrubtions (e.g., SurfaceSamplingDistribution and
* guided sampling distributions (e.g., SurfaceSamplingDistribution and
* VolumeSamplingDistribution). */
void guiding_init_kernel_globals(void *guiding_field,
void *sample_data_storage,

View File

@ -298,7 +298,7 @@ ccl_device_forceinline void guiding_record_volume_emission(KernelGlobals kg,
/* Adds a pseudo path vertex/segment when intersecting a virtual light source.
* (e.g., area, sphere, or disk light). This call is often followed
* a call of guiding_record_surface_emission, if the intersected light source
* emits light in the direction of tha path. */
* emits light in the direction of the path. */
ccl_device_forceinline void guiding_record_light_surface_segment(
KernelGlobals kg, IntegratorState state, ccl_private const Intersection *ccl_restrict isect)
{

View File

@ -47,8 +47,8 @@ KERNEL_STRUCT_MEMBER(path, float, min_ray_pdf, KERNEL_FEATURE_PATH_TRACING)
KERNEL_STRUCT_MEMBER(path, float, continuation_probability, KERNEL_FEATURE_PATH_TRACING)
/* Throughput. */
KERNEL_STRUCT_MEMBER(path, PackedSpectrum, throughput, KERNEL_FEATURE_PATH_TRACING)
/* Factor to multiple with throughput to get remove any guiding pdfs.
* Such throughput without guiding pdfs is used for Russian rouletter termination. */
/* Factor to multiple with throughput to get remove any guiding PDFS.
* Such throughput without guiding PDFS is used for Russian roulette termination. */
KERNEL_STRUCT_MEMBER(path, float, unguided_throughput, KERNEL_FEATURE_PATH_GUIDING)
/* Ratio of throughput to distinguish diffuse / glossy / transmission render passes. */
KERNEL_STRUCT_MEMBER(path, PackedSpectrum, pass_diffuse_weight, KERNEL_FEATURE_LIGHT_PASSES)
@ -117,17 +117,17 @@ KERNEL_STRUCT_MEMBER(guiding, uint64_t, path_segment, KERNEL_FEATURE_PATH_GUIDIN
/* If surface guiding is enabled */
KERNEL_STRUCT_MEMBER(guiding, bool, use_surface_guiding, KERNEL_FEATURE_PATH_GUIDING)
/* Random number used for additional guiding decisions (e.g., cache query, selection to use guiding
* or bsdf sampling) */
* or BSDF sampling) */
KERNEL_STRUCT_MEMBER(guiding, float, sample_surface_guiding_rand, KERNEL_FEATURE_PATH_GUIDING)
/* The probability to use surface guiding (i.e., diffuse sampling prob * guiding prob)*/
KERNEL_STRUCT_MEMBER(guiding, float, surface_guiding_sampling_prob, KERNEL_FEATURE_PATH_GUIDING)
/* Probability of sampling a bssrdf closure instead of a bsdf closure*/
/* Probability of sampling a BSSRDF closure instead of a BSDF closure*/
KERNEL_STRUCT_MEMBER(guiding, float, bssrdf_sampling_prob, KERNEL_FEATURE_PATH_GUIDING)
/* If volume guiding is enabled */
KERNEL_STRUCT_MEMBER(guiding, bool, use_volume_guiding, KERNEL_FEATURE_PATH_GUIDING)
/* Random number used for additional guiding decisions (e.g., cache query, selection to use guiding
* or bsdf sampling) */
* or BSDF sampling) */
KERNEL_STRUCT_MEMBER(guiding, float, sample_volume_guiding_rand, KERNEL_FEATURE_PATH_GUIDING)
/* The probability to use surface guiding (i.e., diffuse sampling prob * guiding prob)*/
/* The probability to use surface guiding (i.e., diffuse sampling prob * guiding prob). */
KERNEL_STRUCT_MEMBER(guiding, float, volume_guiding_sampling_prob, KERNEL_FEATURE_PATH_GUIDING)
KERNEL_STRUCT_END(guiding)

View File

@ -111,8 +111,8 @@ ccl_device_inline void volume_shader_prepare_guiding(KernelGlobals kg,
const float volume_guiding_probability = kernel_data.integrator.volume_guiding_probability;
float rand_phase_guiding = path_state_rng_1D(kg, rng_state, PRNG_VOLUME_PHASE_GUIDING);
/* If we have more than one ohase function we select one random based on its
* sample weight to caclulate the product distribution for guiding. */
/* If we have more than one phase function we select one random based on its
* sample weight to calculate the product distribution for guiding. */
int phase_id = 0;
float phase_weight = 1.0f;

View File

@ -741,7 +741,7 @@ extern unsigned int GHOST_GetContextDefaultOpenGLFramebuffer(GHOST_ContextHandle
extern unsigned int GHOST_GetDefaultOpenGLFramebuffer(GHOST_WindowHandle windowhandle);
/**
* Use multitouch gestures if supported.
* Use multi-touch gestures if supported.
* \param systemhandle: The handle to the system.
* \param use: Enable or disable.
*/

View File

@ -422,7 +422,7 @@ class GHOST_ISystem {
virtual GHOST_TSuccess getButtonState(GHOST_TButton mask, bool &isDown) const = 0;
/**
* Enable multitouch gestures if supported.
* Enable multi-touch gestures if supported.
* \param use: Enable or disable.
*/
virtual void setMultitouchGestures(const bool use) = 0;

View File

@ -240,7 +240,7 @@ class GHOST_System : public GHOST_ISystem {
GHOST_TSuccess getButtonState(GHOST_TButton mask, bool &isDown) const;
/**
* Enable multitouch gestures if supported.
* Enable multi-touch gestures if supported.
* \param use: Enable or disable.
*/
void setMultitouchGestures(const bool use);
@ -408,7 +408,7 @@ class GHOST_System : public GHOST_ISystem {
/** Settings of the display before the display went full-screen. */
GHOST_DisplaySetting m_preFullScreenSetting;
/* Use multitouch gestures? */
/* Use multi-touch gestures? */
bool m_multitouchGestures;
/** Which tablet API to use. */

View File

@ -117,7 +117,7 @@ struct ID *BKE_lib_override_library_create_from_id(struct Main *bmain,
/**
* Create overridden local copies of all tagged data-blocks in given Main.
*
* \note Set `id->newid` of overridden libs with newly created overrides,
* \note Set `id->newid` of overridden libraries with newly created overrides,
* caller is responsible to clean those pointers before/after usage as needed.
*
* \note By default, it will only remap newly created local overriding data-blocks between

View File

@ -61,7 +61,7 @@ static CLG_LogRef LOG = {"bke.blendfile_link_append"};
typedef struct BlendfileLinkAppendContextItem {
/** Name of the ID (without the heading two-chars IDcode). */
char *name;
/** All libs (from BlendfileLinkAppendContext.libraries) to try to load this ID from. */
/** All libraries (from #BlendfileLinkAppendContext.libraries) to try to load this ID from. */
BLI_bitmap *libraries;
/** ID type. */
short idcode;
@ -1258,7 +1258,7 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re
}
/* For each lib file, we try to link all items belonging to that lib,
* and tag those successful to not try to load them again with the other libs. */
* and tag those successful to not try to load them again with the other libraries. */
for (item_idx = 0, itemlink = lapp_context->items.list; itemlink;
item_idx++, itemlink = itemlink->next) {
BlendfileLinkAppendContextItem *item = itemlink->link;
@ -1272,7 +1272,7 @@ void BKE_blendfile_link(BlendfileLinkAppendContext *lapp_context, ReportList *re
mainl, &blo_handle, item->idcode, item->name, lapp_context->params);
if (new_id) {
/* If the link is successful, clear item's libs 'todo' flags.
/* If the link is successful, clear item's libraries 'todo' flags.
* This avoids trying to link same item with other libraries to come. */
BLI_bitmap_set_all(item->libraries, false, lapp_context->num_libraries);
item->new_id = new_id;

View File

@ -2382,7 +2382,7 @@ void BKE_fcurve_blend_write(BlendWriter *writer, ListBase *fcurves)
void BKE_fcurve_blend_read_data(BlendDataReader *reader, ListBase *fcurves)
{
/* link F-Curve data to F-Curve again (non ID-libs) */
/* Link F-Curve data to F-Curve again (non ID-libraries). */
LISTBASE_FOREACH (FCurve *, fcu, fcurves) {
/* curve data */
BLO_read_data_address(reader, &fcu->bezt);

View File

@ -18,7 +18,7 @@ extern "C" {
* \param r_points: An array of the convex hull vertex indices (max is n).
* \return The number of indices in r_points.
*
* \note Performance is O(n.log(n)), same as qsort.
* \note Performance is `O(n.log(n))`, same as `qsort`.
*
*/
int BLI_convexhull_2d(const float (*points)[2], int n, int r_points[/* n */]);

View File

@ -434,8 +434,8 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
* but oldmain itself shall *never* be 'transferred' to new mainlist! */
BLI_assert(old_mainlist.first == oldmain);
/* That way, libs (aka mains) we did not reuse in new undone/redone state
* will be cleared together with oldmain... */
/* That way, libraries (aka mains) we did not reuse in new undone/redone state
* will be cleared together with `oldmain`. */
blo_join_main(&old_mainlist);
blo_filedata_free(fd);

View File

@ -2261,7 +2261,7 @@ void blo_do_versions_key_uidgen(Key *key)
#ifdef USE_SETSCENE_CHECK
/**
* A version of #BKE_scene_validate_setscene with special checks for linked libs.
* A version of #BKE_scene_validate_setscene with special checks for linked libraries.
*/
static bool scene_validate_setscene__liblink(Scene *sce, const int totscene)
{
@ -2904,7 +2904,7 @@ static void fix_relpaths_library(const char *basepath, Main *main)
else {
LISTBASE_FOREACH (Library *, lib, &main->libraries) {
/* Libraries store both relative and abs paths, recreate relative paths,
* relative to the blend file since indirectly linked libs will be
* relative to the blend file since indirectly linked libraries will be
* relative to their direct linked library. */
if (BLI_path_is_rel(lib->filepath)) { /* if this is relative to begin with? */
BLI_strncpy(lib->filepath, lib->filepath_abs, sizeof(lib->filepath));
@ -3151,7 +3151,7 @@ static bool read_libblock_is_identical(FileData *fd, BHead *bhead)
/* For undo, restore matching library datablock from the old main. */
static bool read_libblock_undo_restore_library(FileData *fd, Main *main, const ID *id)
{
/* In undo case, most libs and linked data should be kept as is from previous state
/* In undo case, most libraries and linked data should be kept as is from previous state
* (see BLO_read_from_memfile).
* However, some needed by the snapshot being read may have been removed in previous one,
* and would go missing.
@ -4586,7 +4586,7 @@ static void library_link_end(Main *mainl, FileData **fd, const int flag)
/* make main consistent */
BLO_expand_main(*fd, mainl);
/* do this when expand found other libs */
/* Do this when expand found other libraries. */
read_libraries(*fd, (*fd)->mainlist);
curlib = mainl->curlib;

View File

@ -319,8 +319,8 @@ template<> void DebugDraw::print_value<uint4>(const uint4 &value)
/* -------------------------------------------------------------------- */
/** \name Internals
*
* IMPORTANT: All of these are copied from the shader libs (common_debug_draw_lib.glsl &
* common_debug_print_lib.glsl). They need to be kept in sync to write the same data.
* IMPORTANT: All of these are copied from the shader libraries (`common_debug_draw_lib.glsl` &
* `common_debug_print_lib.glsl`). They need to be kept in sync to write the same data.
* \{ */
void DebugDraw::draw_line(float3 v1, float3 v2, uint color)

View File

@ -2214,7 +2214,7 @@ static int make_local_exec(bContext *C, wmOperator *op)
CTX_DATA_END;
}
BKE_library_make_local(bmain, NULL, NULL, true, false); /* NULL is all libs */
BKE_library_make_local(bmain, NULL, NULL, true, false); /* NULL is all libraries. */
WM_event_add_notifier(C, NC_WINDOW, NULL);
return OPERATOR_FINISHED;

View File

@ -388,7 +388,7 @@ static int compare_direntry_generic(const FileListInternEntry *entry1,
if (entry1->typeflag & FILE_TYPE_DIR) {
if (entry2->typeflag & FILE_TYPE_DIR) {
/* If both entries are tagged as dirs, we make a 'sub filter' that shows first the real dirs,
* then libs (.blend files), then categories in libs. */
* then libraries (.blend files), then categories in libraries. */
if (entry1->typeflag & FILE_TYPE_BLENDERLIB) {
if (!(entry2->typeflag & FILE_TYPE_BLENDERLIB)) {
return 1;
@ -2922,7 +2922,7 @@ static int filelist_readjob_list_dir(const char *root,
if (!(entry->typeflag & FILE_TYPE_DIR)) {
if (do_lib && BLO_has_bfile_extension(target)) {
/* If we are considering .blend files as libs, promote them to directory status. */
/* If we are considering .blend files as libraries, promote them to directory status. */
entry->typeflag = FILE_TYPE_BLENDER;
/* prevent current file being used as acceptable dir */
if (BLI_path_cmp(main_name, target) != 0) {

View File

@ -2246,7 +2246,7 @@ void view3d_depths_rect_create(ARegion *region, rcti *rect, ViewDepths *r_d)
}
}
/* NOTE: with nouveau drivers the glReadPixels() is very slow. T24339. */
/* NOTE: with NOUVEAU drivers the #glReadPixels() is very slow. T24339. */
static ViewDepths *view3d_depths_create(ARegion *region)
{
ViewDepths *d = MEM_cnew<ViewDepths>("ViewDepths");

View File

@ -64,7 +64,8 @@ struct GPU_ShaderCreateFromArray_Params {
/**
* Use via #GPU_shader_create_from_arrays macro (avoids passing in param).
*
* Similar to #DRW_shader_create_with_lib with the ability to include libs for each type of shader.
* Similar to #DRW_shader_create_with_lib with the ability to include libraries for each type of
* shader.
*
* It has the advantage that each item can be conditionally included
* without having to build the string inline, then free it.

View File

@ -471,7 +471,7 @@ typedef struct Library {
*/
char filepath_abs[1024];
/** Set for indirectly linked libs, used in the outliner and while reading. */
/** Set for indirectly linked libraries, used in the outliner and while reading. */
struct Library *parent;
struct PackedFile *packedfile;

View File

@ -12,8 +12,10 @@
/* XXX(@campbellbarton): temp feature. */
#define DURIAN_CAMERA_SWITCH
/* check for cyclic set-scene,
* libs can cause this case which is normally prevented, see (T#####) */
/**
* Check for cyclic set-scene.
* Libraries can cause this case which is normally prevented, see (T42009).
*/
#define USE_SETSCENE_CHECK
#include "DNA_ID.h"

View File

@ -184,7 +184,7 @@ typedef struct Sequence {
/** Old animation system, deprecated for 2.5. */
struct Ipo *ipo DNA_DEPRECATED;
/** these ID vars should never be NULL but can be when linked libs fail to load,
/** these ID vars should never be NULL but can be when linked libraries fail to load,
* so check on access */
struct Scene *scene;
/** Override scene camera. */