From eb2867de90446bdf3c52fb2171f64a248978ccb7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 19 Apr 2023 08:02:41 +1000 Subject: [PATCH] Cleanup: spelling in comments --- intern/cycles/blender/device.cpp | 6 +++--- intern/cycles/device/oneapi/device_impl.cpp | 2 +- intern/cycles/kernel/bvh/bvh.h | 4 ++-- intern/cycles/kernel/device/cpu/bvh.h | 8 ++++---- intern/cycles/kernel/device/oneapi/kernel.cpp | 2 +- source/blender/blenkernel/BKE_lib_id.h | 2 +- source/blender/blenkernel/intern/lib_id.c | 4 ++-- source/blender/blenlib/intern/winstuff.c | 5 +++-- source/blender/blenloader/intern/readfile.cc | 2 +- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/intern/cycles/blender/device.cpp b/intern/cycles/blender/device.cpp index b23549950b1..b5fc5b0df44 100644 --- a/intern/cycles/blender/device.cpp +++ b/intern/cycles/blender/device.cpp @@ -124,11 +124,11 @@ DeviceInfo blender_device_info(BL::Preferences &b_preferences, info.use_hardware_raytracing = false; } - /* There is an accumulative logic here, because Multidevices are support only for + /* There is an accumulative logic here, because Multi-devices are support only for * the same backend + CPU in Blender right now, and both oneAPI and Metal have a * global boolean backend setting (see above) for enabling/disabling HW RT, - * so all subdevices in the multidevice should enable (or disable) HW RT - * simultaneously (and CPU device are expected to ignore "use_hardware_raytracing" setting) */ + * so all sub-devices in the multi-device should enable (or disable) HW RT + * simultaneously (and CPU device are expected to ignore `use_hardware_raytracing` setting). */ accumulated_use_hardware_raytracing |= info.use_hardware_raytracing; } device.use_hardware_raytracing = accumulated_use_hardware_raytracing; diff --git a/intern/cycles/device/oneapi/device_impl.cpp b/intern/cycles/device/oneapi/device_impl.cpp index 1d49a74f63a..8fca166e665 100644 --- a/intern/cycles/device/oneapi/device_impl.cpp +++ b/intern/cycles/device/oneapi/device_impl.cpp @@ -122,7 +122,7 @@ bool OneapiDevice::check_peer_access(Device * /*peer_device*/) bool OneapiDevice::can_use_hardware_raytracing_for_features(uint requested_features) const { - /* MNEE and Raytrace kernels currently don't work correctly with HWRT. */ + /* MNEE and Ray-trace kernels currently don't work correctly with HWRT. */ return !(requested_features & (KERNEL_FEATURE_MNEE | KERNEL_FEATURE_NODE_RAYTRACE)); } diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h index 50ec52c6a9a..4141def71bf 100644 --- a/intern/cycles/kernel/bvh/bvh.h +++ b/intern/cycles/kernel/bvh/bvh.h @@ -27,8 +27,8 @@ * Instead of adding one more bool specialization constant, we reuse existing embree_features one * and use RTC_FEATURE_FLAG_NONE as value to test for avoiding to call Embree on GPU. */ -/* We set it to RTC_FEATURE_FLAG_NONE by default so AoT binaries contain MNE and raytrace kernels - * precompiled without Embree. +/* We set it to RTC_FEATURE_FLAG_NONE by default so AoT binaries contain MNE and ray-trace kernels + * pre-compiled without Embree. * Changing this default value would require updating the logic in oneapi_load_kernels(). */ static constexpr sycl::specialization_id oneapi_embree_features{ RTC_FEATURE_FLAG_NONE}; diff --git a/intern/cycles/kernel/device/cpu/bvh.h b/intern/cycles/kernel/device/cpu/bvh.h index 8e2b0be3cdc..751a4623a8d 100644 --- a/intern/cycles/kernel/device/cpu/bvh.h +++ b/intern/cycles/kernel/device/cpu/bvh.h @@ -667,7 +667,7 @@ ccl_device_intersect bool kernel_embree_intersect(KernelGlobals kg, CCLFirstHitContext ctx; rtcInitRayQueryContext(&ctx); # ifdef __KERNEL_ONEAPI__ - /* NOTE(sirgienko) Cycles GPU backends passes NULL to KernelGlobals and + /* NOTE(sirgienko): Cycles GPU back-ends passes NULL to KernelGlobals and * uses global device allocation (CUDA, Optix, HIP) or passes all needed data * as a class context (Metal, oneAPI). So we need to pass this context here * in order to have an access to it later in Embree filter functions on GPU. */ @@ -717,7 +717,7 @@ ccl_device_intersect bool kernel_embree_intersect_local(KernelGlobals kg, CCLLocalContext ctx; rtcInitRayQueryContext(&ctx); # ifdef __KERNEL_ONEAPI__ - /* NOTE(sirgienko) Cycles GPU backends passes NULL to KernelGlobals and + /* NOTE(sirgienko): Cycles GPU back-ends passes NULL to KernelGlobals and * uses global device allocation (CUDA, Optix, HIP) or passes all needed data * as a class context (Metal, oneAPI). So we need to pass this context here * in order to have an access to it later in Embree filter functions on GPU. */ @@ -802,7 +802,7 @@ ccl_device_intersect bool kernel_embree_intersect_shadow_all(KernelGlobals kg, CCLShadowContext ctx; rtcInitRayQueryContext(&ctx); # ifdef __KERNEL_ONEAPI__ - /* NOTE(sirgienko) Cycles GPU backends passes NULL to KernelGlobals and + /* NOTE(sirgienko): Cycles GPU back-ends passes NULL to KernelGlobals and * uses global device allocation (CUDA, Optix, HIP) or passes all needed data * as a class context (Metal, oneAPI). So we need to pass this context here * in order to have an access to it later in Embree filter functions on GPU. */ @@ -851,7 +851,7 @@ ccl_device_intersect uint kernel_embree_intersect_volume(KernelGlobals kg, CCLVolumeContext ctx; rtcInitRayQueryContext(&ctx); # ifdef __KERNEL_ONEAPI__ - /* NOTE(sirgienko) Cycles GPU backends passes NULL to KernelGlobals and + /* NOTE(sirgienko) Cycles GPU back-ends passes NULL to KernelGlobals and * uses global device allocation (CUDA, Optix, HIP) or passes all needed data * as a class context (Metal, oneAPI). So we need to pass this context here * in order to have an access to it later in Embree filter functions on GPU. */ diff --git a/intern/cycles/kernel/device/oneapi/kernel.cpp b/intern/cycles/kernel/device/oneapi/kernel.cpp index fa68237914a..6d82b79c59e 100644 --- a/intern/cycles/kernel/device/oneapi/kernel.cpp +++ b/intern/cycles/kernel/device/oneapi/kernel.cpp @@ -177,7 +177,7 @@ bool oneapi_kernel_is_required_for_features(const std::string &kernel_name, bool oneapi_kernel_is_using_embree(const std::string &kernel_name) { # ifdef WITH_EMBREE_GPU - /* MNEE and Raytrace kernels aren't yet enabled to use Embree. */ + /* MNEE and Ray-trace kernels aren't yet enabled to use Embree. */ for (int i = 0; i < (int)DEVICE_KERNEL_NUM; i++) { DeviceKernel kernel = (DeviceKernel)i; if (device_kernel_has_intersection(kernel)) { diff --git a/source/blender/blenkernel/BKE_lib_id.h b/source/blender/blenkernel/BKE_lib_id.h index a96791707e8..cb8b6e665af 100644 --- a/source/blender/blenkernel/BKE_lib_id.h +++ b/source/blender/blenkernel/BKE_lib_id.h @@ -465,7 +465,7 @@ struct ID *BKE_id_copy_for_use_in_bmain(struct Main *bmain, const struct ID *id) * \note Most internal ID data itself is not swapped (only IDProperties are). * * \param bmain: May be NULL, in which case there is no guarantee that internal remapping of ID - * pointers to themselves will be complete (reguarding depsgraph and/or runtime data updates). + * pointers to themselves will be complete (regarding depsgraph and/or runtime data updates). * \param do_self_remap: Whether to remap internal pointers to itself or not. * \param self_remap_flags: Flags controlling self remapping, see BKE_lib_remap.h. */ diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c index 638aa6d9b7b..063aad1f9cc 100644 --- a/source/blender/blenkernel/intern/lib_id.c +++ b/source/blender/blenkernel/intern/lib_id.c @@ -845,7 +845,7 @@ static void id_swap(Main *bmain, BKE_id_remapper_add(remapper_id_b, id_a, id_b); } - /* Finalize remapping of internal referrences to self broken by swapping, if requested. */ + /* Finalize remapping of internal references to self broken by swapping, if requested. */ if (do_self_remap) { LinkNode ids = {.next = NULL, .link = id_a}; BKE_libblock_relink_multiple( @@ -864,7 +864,7 @@ static void id_swap(Main *bmain, } /* Conceptually, embedded IDs are part of their owner's data. However, some parts of the code - * (like e.g. the depsgraph) may treat them as independant IDs, so swapping them here and + * (like e.g. the depsgraph) may treat them as independent IDs, so swapping them here and * switching their pointers in the owner IDs allows to help not break cached relationships and * such (by preserving the pointer values). */ static void id_embedded_swap(ID **embedded_id_a, diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index a57ac8612ea..126b6bcf25b 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -180,8 +180,9 @@ bool BLI_windows_register_blend_extension(const bool background) return true; } -/* Check the registry to see if there is an operation association to a file - * extension. Extension *should almost always contain a dot like ".txt", +/** + * Check the registry to see if there is an operation association to a file + * extension. Extension *should almost always contain a dot like `.txt`, * but this does allow querying non - extensions *like "Directory", "Drive", * "AllProtocols", etc - anything in Classes with a "shell" branch. */ diff --git a/source/blender/blenloader/intern/readfile.cc b/source/blender/blenloader/intern/readfile.cc index 55d1bb29568..b75fb31d7bf 100644 --- a/source/blender/blenloader/intern/readfile.cc +++ b/source/blender/blenloader/intern/readfile.cc @@ -3100,7 +3100,7 @@ static void read_libblock_undo_restore_at_old_address(FileData *fd, Main *main, * * Passing a NULL BMain means that not all potential runtime data (like collections' parent * pointers etc.) will be up-to-date. However, this should not be a problem here, since these - * data are re-generated later in fileread process anyway.. */ + * data are re-generated later in file-read process anyway. */ BKE_lib_id_swap_full(nullptr, id, id_old,