diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm index fc9a8cecd75..304efc813ec 100644 --- a/intern/cycles/device/metal/kernel.mm +++ b/intern/cycles/device/metal/kernel.mm @@ -172,7 +172,7 @@ void ShaderCache::load_kernel(DeviceKernel device_kernel, for (auto &pipeline : pipelines[device_kernel]) { if (scene_specialized) { if (pipeline->source_md5 == device->source_md5[PSO_SPECIALISED]) { - /* we already requested a pipeline that is specialised for this kernel data */ + /* we already requested a pipeline that is specialized for this kernel data */ metal_printf("Specialized kernel already requested (%s)\n", device_kernel_as_string(device_kernel)); return; @@ -445,7 +445,7 @@ void MetalKernelPipeline::compile() string options; if (use_metalrt && kernel_has_intersection(device_kernel)) { - /* incorporate any MetalRT specialisations into the archive name */ + /* incorporate any MetalRT specializations into the archive name */ options += string_printf(".hair_%d.hair_thick_%d.pointcloud_%d", metalrt_hair ? 1 : 0, metalrt_hair_thick ? 1 : 0, diff --git a/intern/cycles/kernel/osl/services.h b/intern/cycles/kernel/osl/services.h index 27d7f7fb8e1..edffd912bad 100644 --- a/intern/cycles/kernel/osl/services.h +++ b/intern/cycles/kernel/osl/services.h @@ -41,7 +41,7 @@ struct KernelGlobalsCPU; * These are stored in a concurrent hash map, because OSL can compile multiple * shaders in parallel. * - * Note: The svm_slots array contains a compressed mapping of tile to svm_slot pairs + * NOTE: The svm_slots array contains a compressed mapping of tile to svm_slot pairs * stored as follows: x:tile_a, y:svm_slot_a, z:tile_b, w:svm_slot_b etc. */ struct OSLTextureHandle : public OIIO::RefCnt { diff --git a/intern/ghost/intern/GHOST_SystemCocoa.mm b/intern/ghost/intern/GHOST_SystemCocoa.mm index b6836614962..8677c0b9552 100644 --- a/intern/ghost/intern/GHOST_SystemCocoa.mm +++ b/intern/ghost/intern/GHOST_SystemCocoa.mm @@ -967,7 +967,7 @@ bool GHOST_SystemCocoa::processEvents(bool waitForEvent) return anyProcessed; } -// Note: called from NSApplication delegate +/* NOTE: called from #NSApplication delegate. */ GHOST_TSuccess GHOST_SystemCocoa::handleApplicationBecomeActiveEvent() { for (GHOST_IWindow *iwindow : m_windowManager->getWindows()) { @@ -1046,7 +1046,7 @@ void GHOST_SystemCocoa::notifyExternalEventProcessed() m_outsideLoopEventProcessed = true; } -// Note: called from NSWindow delegate +/* NOTE: called from #NSWindow delegate. */ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa *window) { @@ -1108,7 +1108,7 @@ GHOST_TSuccess GHOST_SystemCocoa::handleWindowEvent(GHOST_TEventType eventType, return GHOST_kSuccess; } -// Note: called from NSWindow subclass +/* NOTE: called from #NSWindow subclass. */ GHOST_TSuccess GHOST_SystemCocoa::handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowCocoa *window, diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 4a1b3c2fe16..e7f5fdaa011 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -426,8 +426,8 @@ GHOST_WindowCocoa::~GHOST_WindowCocoa() [m_window close]; } - // Check for other blender opened windows and make the frontmost key - // Note: for some reason the closed window is still in the list + /* Check for other blender opened windows and make the front-most key + * NOTE: for some reason the closed window is still in the list. */ NSArray *windowsList = [NSApp orderedWindows]; for (int a = 0; a < [windowsList count]; a++) { if (m_window != (CocoaWindow *)[windowsList objectAtIndex:a]) { diff --git a/intern/ghost/intern/GHOST_WindowWin32.cpp b/intern/ghost/intern/GHOST_WindowWin32.cpp index 897e6c145da..2e17454d24f 100644 --- a/intern/ghost/intern/GHOST_WindowWin32.cpp +++ b/intern/ghost/intern/GHOST_WindowWin32.cpp @@ -322,7 +322,7 @@ void GHOST_WindowWin32::adjustWindowRectForClosestMonitor(LPRECT win_rect, } /* Adjust to allow for caption, borders, shadows, scaling, etc. Resulting values can be - * correctly outside of monitor bounds. Note: You cannot specify WS_OVERLAPPED when calling. */ + * correctly outside of monitor bounds. NOTE: You cannot specify #WS_OVERLAPPED when calling. */ if (fpAdjustWindowRectExForDpi) { UINT dpiX, dpiY; GetDpiForMonitor(hmonitor, MDT_EFFECTIVE_DPI, &dpiX, &dpiY); diff --git a/intern/iksolver/intern/IK_QTask.cpp b/intern/iksolver/intern/IK_QTask.cpp index caf9585a94e..80eda01b17f 100644 --- a/intern/iksolver/intern/IK_QTask.cpp +++ b/intern/iksolver/intern/IK_QTask.cpp @@ -116,7 +116,7 @@ void IK_QOrientationTask::ComputeJacobian(IK_QJacobian &jacobian) } // IK_QCenterOfMassTask -// Note: implementation not finished! +// NOTE: implementation not finished! IK_QCenterOfMassTask::IK_QCenterOfMassTask(bool primary, const IK_QSegment *segment, diff --git a/intern/libmv/libmv/multiview/euclidean_resection.h b/intern/libmv/libmv/multiview/euclidean_resection.h index 3c4c3979ff6..cdb9b5af52e 100644 --- a/intern/libmv/libmv/multiview/euclidean_resection.h +++ b/intern/libmv/libmv/multiview/euclidean_resection.h @@ -118,7 +118,7 @@ void EuclideanResectionAnsarDaniilidis(const Mat2X& x_camera, * This is the algorithm described in: * "{EP$n$P: An Accurate $O(n)$ Solution to the P$n$P Problem", by V. Lepetit * and F. Moreno-Noguer and P. Fua, IJCV 2009. vol. 81, no. 2 - * \note: the non-linear optimization is not implemented here. + * \note the non-linear optimization is not implemented here. */ bool EuclideanResectionEPnP(const Mat2X& x_camera, const Mat3X& X_world, diff --git a/intern/opensubdiv/internal/evaluator/eval_output_cpu.h b/intern/opensubdiv/internal/evaluator/eval_output_cpu.h index 58bae7a322e..42aa052863a 100644 --- a/intern/opensubdiv/internal/evaluator/eval_output_cpu.h +++ b/intern/opensubdiv/internal/evaluator/eval_output_cpu.h @@ -32,7 +32,7 @@ using OpenSubdiv::Osd::CpuVertexBuffer; namespace blender { namespace opensubdiv { -// Note: Define as a class instead of typedef to make it possible +// NOTE: Define as a class instead of typedef to make it possible // to have anonymous class in opensubdiv_evaluator_internal.h class CpuEvalOutput : public VolatileEvalOutputlin_stiffness = (v1->bend_stiff + v2->bend_stiff) / 2.0f; } else if (spring->type == CLOTH_SPRING_TYPE_GOAL) { - /* Warning: Appending NEW goal springs does not work + /* WARNING: Appending NEW goal springs does not work * because implicit solver would need reset! */ /* Activate / Deactivate existing springs */ diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 84621be1960..35b514ac1a0 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -2803,7 +2803,7 @@ void BKE_gpencil_update_layer_transforms(const Depsgraph *depsgraph, Object *ob) /* Iterate over frame range. */ for (bGPDframe *gpf = gpf_start; gpf != NULL && gpf != gpf_end; gpf = gpf->next) { - /* Skip frames without a valid onion skinning id (note: active frame has one). */ + /* Skip frames without a valid onion skinning id (NOTE: active frame has one). */ if (gpf->runtime.onion_id == INT_MAX) { continue; } diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index ffa39f79e7c..49a8406d92d 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -1116,7 +1116,7 @@ static void node_init(const struct bContext *C, bNodeTree *ntree, bNode *node) PointerRNA ptr; RNA_pointer_create((ID *)ntree, &RNA_Node, node, &ptr); - /* XXX Warning: context can be nullptr in case nodes are added in do_versions. + /* XXX WARNING: context can be nullptr in case nodes are added in do_versions. * Delayed init is not supported for nodes with context-based `initfunc_api` at the moment. */ BLI_assert(C != nullptr); ntype->initfunc_api(C, &ptr); @@ -1165,7 +1165,7 @@ static void node_set_typeinfo(const struct bContext *C, } } -/* Warning: default_value must either be null or match the typeinfo at this point. +/* WARNING: default_value must either be null or match the typeinfo at this point. * This function is called both for initializing new sockets and after loading files. */ static void node_socket_set_typeinfo(bNodeTree *ntree, diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index b935f2afaaa..72d9f72eb14 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3628,7 +3628,7 @@ static void psys_cache_edit_paths_iter(void *__restrict iter_data_v, BKE_defvert_weight_to_rgb(ca->col, pind.hkey[1]->weight); } else { - /* warning: copied from 'do_particle_interpolation' (without 'mvert' array stepping) */ + /* WARNING: copied from 'do_particle_interpolation' (without 'mvert' array stepping) */ float real_t; if (result.time < 0.0f) { real_t = -result.time; diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index b5480673653..76db3d1245c 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -141,7 +141,7 @@ struct PBVH { /* Mesh data */ const struct Mesh *mesh; - /* Note: Normals are not const because they can be updated for drawing by sculpt code. */ + /* NOTE: Normals are not `const` because they can be updated for drawing by sculpt code. */ float (*vert_normals)[3]; MVert *verts; const MPoly *mpoly; diff --git a/source/blender/blenlib/BLI_any.hh b/source/blender/blenlib/BLI_any.hh index ca3d5756c52..e80dad82d01 100644 --- a/source/blender/blenlib/BLI_any.hh +++ b/source/blender/blenlib/BLI_any.hh @@ -184,7 +184,7 @@ class Any { } /** - * \note: Only needed because the template below does not count as copy assignment operator. + * \note Only needed because the template below does not count as copy assignment operator. */ Any &operator=(const Any &other) { diff --git a/source/blender/blenlib/BLI_bitmap.h b/source/blender/blenlib/BLI_bitmap.h index ca11cd6574e..19d8525311c 100644 --- a/source/blender/blenlib/BLI_bitmap.h +++ b/source/blender/blenlib/BLI_bitmap.h @@ -15,7 +15,7 @@ extern "C" { typedef unsigned int BLI_bitmap; -/* warning: the bitmap does not keep track of its own size or check +/* WARNING: the bitmap does not keep track of its own size or check * for out-of-bounds access */ /* internal use */ diff --git a/source/blender/blenlib/BLI_virtual_array.hh b/source/blender/blenlib/BLI_virtual_array.hh index 7aa221f62ce..6efd1d6d769 100644 --- a/source/blender/blenlib/BLI_virtual_array.hh +++ b/source/blender/blenlib/BLI_virtual_array.hh @@ -463,7 +463,7 @@ template class VArrayImpl_For_Func final : public }; /** - * \note: This is `final` so that #may_have_ownership can be implemented reliably. + * \note This is `final` so that #may_have_ownership can be implemented reliably. */ template class VArrayCommon { /** * Get the element at a specific index. - * \note: This can't return a reference because the value may be computed on the fly. This also + * \note This can't return a reference because the value may be computed on the fly. This also * implies that one can not use this method for assignments. */ T operator[](const int64_t index) const diff --git a/source/blender/blenlib/intern/hash_md5.c b/source/blender/blenlib/intern/hash_md5.c index cc59662b6de..9da8c0a0941 100644 --- a/source/blender/blenlib/intern/hash_md5.c +++ b/source/blender/blenlib/intern/hash_md5.c @@ -271,7 +271,7 @@ static void *md5_read_ctx(const struct md5_ctx *ctx, void *resbuf) int BLI_hash_md5_stream(FILE *stream, void *resblock) { -#define BLOCKSIZE 4096 /* Important: must be a multiple of 64. */ +#define BLOCKSIZE 4096 /* IMPORTANT: must be a multiple of 64. */ struct md5_ctx ctx; md5_uint32 len[2]; char buffer[BLOCKSIZE + 72]; diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index bc07669687e..92fd7f5937b 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -871,7 +871,7 @@ unsigned int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const int flag, const /* Similar code used elsewhere, but this checks for double ups * which historically this function supports so better not change */ - /* warning: this only gives stable direction with single polygons, + /* WARNING: this only gives stable direction with single polygons, * ideally we'd calculate connectivity and each polys normal, see T41047 */ const float *v_prev; diff --git a/source/blender/bmesh/intern/bmesh_core.c b/source/blender/bmesh/intern/bmesh_core.c index d6bf556f14b..4d84d558cd7 100644 --- a/source/blender/bmesh/intern/bmesh_core.c +++ b/source/blender/bmesh/intern/bmesh_core.c @@ -1460,7 +1460,7 @@ BMFace *bmesh_kernel_split_face_make_edge(BMesh *bm, } else { /* this code is not significant until holes actually work */ - // printf("warning: call to split face euler without holes argument; holes will be tossed.\n"); + // printf("WARNING: call to split face euler without holes argument; holes will be tossed.\n"); for (lst = f->loops.last; lst != f->loops.first; lst = lst2) { lst2 = lst->prev; BLI_mempool_free(bm->looplistpool, lst); diff --git a/source/blender/bmesh/intern/bmesh_mods.c b/source/blender/bmesh/intern/bmesh_mods.c index 70710edea5c..8b56e08c22b 100644 --- a/source/blender/bmesh/intern/bmesh_mods.c +++ b/source/blender/bmesh/intern/bmesh_mods.c @@ -597,7 +597,7 @@ bool BM_face_validate(BMFace *face, FILE *err) bool ret = true; if (face->len == 2) { - fprintf(err, "warning: found two-edged face. face ptr: %p\n", face); + fprintf(err, "WARNING: found two-edged face. face ptr: %p\n", face); fflush(err); } diff --git a/source/blender/bmesh/intern/bmesh_polygon.c b/source/blender/bmesh/intern/bmesh_polygon.c index 9ea16c8b61c..6df446a377c 100644 --- a/source/blender/bmesh/intern/bmesh_polygon.c +++ b/source/blender/bmesh/intern/bmesh_polygon.c @@ -415,7 +415,7 @@ void BM_face_calc_tangent_edge_diagonal(const BMFace *f, float r_tangent[3]) /* In case of degenerate faces. */ zero_v3(r_tangent); - /* warning: O(n^2) loop here, take care! */ + /* WARNING: O(n^2) loop here, take care! */ float dist_max_sq = 0.0f; do { BMLoop *l_iter_other = l_iter->next; @@ -447,7 +447,7 @@ void BM_face_calc_tangent_vert_diagonal(const BMFace *f, float r_tangent[3]) /* In case of degenerate faces. */ zero_v3(r_tangent); - /* warning: O(n^2) loop here, take care! */ + /* WARNING: O(n^2) loop here, take care! */ float dist_max_sq = 0.0f; do { BMLoop *l_iter_other = l_iter->next; diff --git a/source/blender/bmesh/tools/bmesh_bevel.c b/source/blender/bmesh/tools/bmesh_bevel.c index 8f32f878c58..fa852cdd6da 100644 --- a/source/blender/bmesh/tools/bmesh_bevel.c +++ b/source/blender/bmesh/tools/bmesh_bevel.c @@ -5354,7 +5354,7 @@ static BMEdge *snap_edge_for_center_vmesh_vert(int i, * so the arguments bndv_rep_faces is an array of size n_bndv give the freps for each i, * and center_frep is the frep for the center. * - * Note: this function is for edge bevels only, at the moment. + * NOTE: this function is for edge bevels only, at the moment. */ static void snap_edges_for_vmesh_vert(int i, int j, diff --git a/source/blender/draw/engines/eevee/eevee_lightcache.c b/source/blender/draw/engines/eevee/eevee_lightcache.c index 0b9909a904b..7f722ff1764 100644 --- a/source/blender/draw/engines/eevee/eevee_lightcache.c +++ b/source/blender/draw/engines/eevee/eevee_lightcache.c @@ -1118,7 +1118,7 @@ static void eevee_lightbake_render_grid_sample(void *ved, void *user_data) SWAP(GPUTexture *, lbake->grid_prev, lcache->grid_tx.tex); /* TODO: do this once for the whole bake when we have independent DRWManagers. - * Warning: Some of the things above require this. */ + * WARNING: Some of the things above require this. */ eevee_lightbake_cache_create(vedata, lbake); /* Compute sample position */ diff --git a/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl b/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl index d6eeedd8640..a81d37f4e6f 100644 --- a/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/volumetric_frag.glsl @@ -8,7 +8,7 @@ flat in int slice; -/* Warning: these are not attributes, these are global vars. */ +/* WARNING: these are not attributes, these are global vars. */ vec3 worldPosition = vec3(0.0); vec3 objectPosition = vec3(0.0); vec3 viewPosition = vec3(0.0); @@ -80,8 +80,8 @@ void main() volumeOrco = OrcoTexCoFactors[0].xyz + objectPosition * OrcoTexCoFactors[1].xyz; if (any(lessThan(volumeOrco, vec3(0.0))) || any(greaterThan(volumeOrco, vec3(1.0)))) { - /* Note: Discard is not an explicit return in Metal prior to versions 2.3. - * adding return after discard ensures consistent behaviour and avoids GPU + /* NOTE: Discard is not an explicit return in Metal prior to versions 2.3. + * adding return after discard ensures consistent behavior and avoids GPU * side-effects where control flow continues with undefined values. */ discard; return; diff --git a/source/blender/draw/engines/eevee/shaders/volumetric_integration_frag.glsl b/source/blender/draw/engines/eevee/shaders/volumetric_integration_frag.glsl index 527bbd18896..3ce54b3122a 100644 --- a/source/blender/draw/engines/eevee/shaders/volumetric_integration_frag.glsl +++ b/source/blender/draw/engines/eevee/shaders/volumetric_integration_frag.glsl @@ -70,7 +70,7 @@ void main() vec3 Tr = exp(-s_extinction * s_len); /* integrate along the current step segment */ - /* Note: Original calculation carries precision issues when compiling for AMD GPUs + /* NOTE: Original calculation carries precision issues when compiling for AMD GPUs * and running Metal. This version of the equation retains precision well for all * macOS HW configurations. */ Lscat = (Lscat * (1.0f - Tr)) / max(vec3(1e-8), s_extinction); diff --git a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh index ccd67360073..12b8e085455 100644 --- a/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh +++ b/source/blender/draw/engines/eevee_next/shaders/infos/eevee_material_info.hh @@ -66,7 +66,7 @@ GPU_SHADER_INTERFACE_INFO(eevee_surf_iface, "interp") GPU_SHADER_CREATE_INFO(eevee_surf_deferred) .vertex_out(eevee_surf_iface) - /* Note: This removes the possibility of using gl_FragDepth. */ + /* NOTE: This removes the possibility of using gl_FragDepth. */ // .early_fragment_test(true) /* Direct output. */ .fragment_out(0, Type::VEC4, "out_radiance", DualBlend::SRC_0) diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 40ebd262df5..ec44fdf42d5 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -290,7 +290,7 @@ GPENCIL_tLayer *gpencil_layer_cache_add(GPENCIL_PrivateData *pd, /* Masking: Go through mask list and extract valid masks in a bitmap. */ if (is_masked) { bool valid_mask = false; - /* Warning: only GP_MAX_MASKBITS amount of bits. + /* WARNING: only #GP_MAX_MASKBITS amount of bits. * TODO(fclem): Find a better system without any limitation. */ tgp_layer->mask_bits = BLI_memblock_alloc(pd->gp_maskbit_pool); tgp_layer->mask_invert_bits = BLI_memblock_alloc(pd->gp_maskbit_pool); diff --git a/source/blender/draw/engines/overlay/shaders/outline_detect_frag.glsl b/source/blender/draw/engines/overlay/shaders/outline_detect_frag.glsl index c33bb474d96..3e3c0e4e89f 100644 --- a/source/blender/draw/engines/overlay/shaders/outline_detect_frag.glsl +++ b/source/blender/draw/engines/overlay/shaders/outline_detect_frag.glsl @@ -347,7 +347,7 @@ void main() line_end = vec2(0.0, 0.5); break; default: - /* Ensure values are assigned to, avoids undefined behaviour for + /* Ensure values are assigned to, avoids undefined behavior for * divergent control-flow. This can occur if discard is called * as discard is not treated as a return in Metal 2.2. So * side-effects can still cause problems. */ diff --git a/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh b/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh index e2a54788c72..735e7b6d867 100644 --- a/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh +++ b/source/blender/draw/engines/workbench/shaders/infos/workbench_prepass_info.hh @@ -91,7 +91,7 @@ GPU_SHADER_CREATE_INFO(workbench_material) * \{ */ GPU_SHADER_CREATE_INFO(workbench_transparent_accum) - /* Note: Blending will be skipped on objectId because output is a + /* NOTE: Blending will be skipped on objectId because output is a * non-normalized integer buffer. */ .fragment_out(0, Type::VEC4, "transparentAccum") .fragment_out(1, Type::VEC4, "revealageAccum") diff --git a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl index 36059b6076f..49e26cd3e0c 100644 --- a/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl +++ b/source/blender/draw/engines/workbench/shaders/workbench_volume_frag.glsl @@ -218,13 +218,13 @@ void main() /* Manual depth test. TODO: remove. */ float depth = texelFetch(depthBuffer, ivec2(gl_FragCoord.xy), 0).r; if (gl_FragCoord.z >= depth) { - /* Note: In the Metal API, prior to Metal 2.3, Discard is not an explicit return and can - * produce undefined behaviour. This is especially prominent with derivatives if control-flow + /* NOTE: In the Metal API, prior to Metal 2.3, Discard is not an explicit return and can + * produce undefined behavior. This is especially prominent with derivatives if control-flow * divergence is present. * - * Adding a return call eliminates undefined behaviour and a later out-of-bounds read causing + * Adding a return call eliminates undefined behavior and a later out-of-bounds read causing * a crash on AMD platforms. - * This behaviour can also affect OpenGL on certain devices. */ + * This behavior can also affect OpenGL on certain devices. */ discard; return; } diff --git a/source/blender/draw/intern/draw_cache_impl_mesh.c b/source/blender/draw/intern/draw_cache_impl_mesh.c index 7dc0244275d..ee5223af68d 100644 --- a/source/blender/draw/intern/draw_cache_impl_mesh.c +++ b/source/blender/draw/intern/draw_cache_impl_mesh.c @@ -531,7 +531,7 @@ static uint mesh_cd_calc_gpu_layers_vcol_used(const Mesh *me_query, layer_i; } - /* Note: this is not the same as the layer_i below. */ + /* NOTE: this is not the same as the layer_i below. */ if (layer_i != -1) { layer = (domain == ATTR_DOMAIN_POINT ? cd_vdata : cd_ldata)->layers + layer_i; } @@ -544,7 +544,7 @@ static uint mesh_cd_calc_gpu_layers_vcol_used(const Mesh *me_query, return -1; } - /* Note: this is the logical index into the color attribute list, + /* NOTE: this is the logical index into the color attribute list, * not the customdata index. */ int vcol_i = BKE_id_attribute_to_index( (ID *)me_query, layer, ATTR_DOMAIN_MASK_COLOR, CD_MASK_COLOR_ALL); @@ -701,7 +701,7 @@ static DRW_MeshCDMask mesh_cd_calc_used_gpu_layers(const Object *object, break; } - /* Note: attr->type will always be CD_PROP_COLOR even for + /* NOTE: attr->type will always be CD_PROP_COLOR even for * CD_PROP_BYTE_COLOR layers, see node_shader_gpu_vertex_color in * node_shader_vertex_color.cc. */ diff --git a/source/blender/draw/intern/draw_hair.cc b/source/blender/draw/intern/draw_hair.cc index 2ce3bbe7a82..578c36e3245 100644 --- a/source/blender/draw/intern/draw_hair.cc +++ b/source/blender/draw/intern/draw_hair.cc @@ -343,7 +343,7 @@ void DRW_hair_update(void) int max_read_px_len = min_ii(width * height, pr_call->vert_len); DRW_draw_pass_subset(g_tf_pass, pr_call->shgrp, pr_call->shgrp); - /* Readback result to main memory. */ + /* Read back result to main memory. */ GPU_framebuffer_read_color(fb, 0, 0, width, height, 4, 0, GPU_DATA_FLOAT, data); /* Upload back to VBO. */ GPU_vertbuf_use(pr_call->vbo); diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index f71d88342f1..b3c4e21639d 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -501,7 +501,7 @@ static DRWData *drw_viewport_data_ensure(GPUViewport *viewport) * - size can be NULL to get it from viewport. * - if viewport and size are NULL, size is set to (1, 1). * - * Important: drw_manager_init can be called multiple times before drw_manager_exit. + * IMPORTANT: #drw_manager_init can be called multiple times before #drw_manager_exit. */ static void drw_manager_init(DRWManager *dst, GPUViewport *viewport, const int size[2]) { diff --git a/source/blender/draw/intern/shaders/common_hair_lib.glsl b/source/blender/draw/intern/shaders/common_hair_lib.glsl index ff52b483d77..dfa2f307800 100644 --- a/source/blender/draw/intern/shaders/common_hair_lib.glsl +++ b/source/blender/draw/intern/shaders/common_hair_lib.glsl @@ -212,8 +212,8 @@ void hair_get_pos_tan_binor_time(bool is_persp, wpos += wbinor * thick_time * scale; } else { - /* Note: Ensures 'hairThickTime' is initialised - - * avoids undefined behaviour on certain macOS configurations. */ + /* NOTE: Ensures 'hairThickTime' is initialized - + * avoids undefined behavior on certain macOS configurations. */ thick_time = 0.0; } } diff --git a/source/blender/editors/gizmo_library/gizmo_draw_utils.c b/source/blender/editors/gizmo_library/gizmo_draw_utils.c index c6303c197e7..178a2b52b62 100644 --- a/source/blender/editors/gizmo_library/gizmo_draw_utils.c +++ b/source/blender/editors/gizmo_library/gizmo_draw_utils.c @@ -95,7 +95,7 @@ void wm_gizmo_vec_draw( immEnd(); } else if (primitive_type == GPU_PRIM_TRI_FAN) { - /* Note(Metal): Tri-fan alternative for Metal. Triangle List is more efficient for small + /* NOTE(Metal): Tri-fan alternative for Metal. Triangle List is more efficient for small * primitive counts. */ int tri_count = vert_count - 2; immBegin(GPU_PRIM_TRIS, tri_count * 3); diff --git a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c index b326d6d1859..a0e30c7518a 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/button2d_gizmo.c @@ -74,7 +74,7 @@ static void button2d_geom_draw_backdrop(const wmGizmo *gz, GPU_viewport_size_get_f(viewport); GPUVertFormat *format = immVertexFormat(); - /* Note(Metal): Prefer 3D coordinate for 2D rendering when using 3D shader. */ + /* NOTE(Metal): Prefer 3D coordinate for 2D rendering when using 3D shader. */ uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT); /* TODO: other draw styles. */ diff --git a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c index a76242404ba..1d9fc35eda8 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/dial3d_gizmo.c @@ -96,7 +96,7 @@ static void dial_geom_draw(const float color[4], ED_GIZMO_DIAL_DRAW_FLAG_FILL))); GPUVertFormat *format = immVertexFormat(); - /* Note(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */ + /* NOTE(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */ uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT); if (clip_plane) { diff --git a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c index 5fb1173521a..46fede8f6be 100644 --- a/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c +++ b/source/blender/editors/gizmo_library/gizmo_types/move3d_gizmo.c @@ -98,7 +98,7 @@ static void move_geom_draw(const wmGizmo *gz, ED_GIZMO_MOVE_DRAW_FLAG_FILL))); GPUVertFormat *format = immVertexFormat(); - /* Note(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */ + /* NOTE(Metal): Prefer using 3D coordinates with 3D shader, even if rendering 2D gizmo's. */ uint pos = GPU_vertformat_attr_add(format, "pos", GPU_COMP_F32, 3, GPU_FETCH_FLOAT); immBindBuiltinProgram(filled ? GPU_SHADER_3D_UNIFORM_COLOR : diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 60af05baed7..da40eef87fd 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -549,7 +549,7 @@ typedef enum eAnimChannels_SetFlag { /* types of settings for AnimChannels */ typedef enum eAnimChannel_Settings { ACHANNEL_SETTING_SELECT = 0, - /** warning: for drawing UI's, need to check if this is off (maybe inverse this later) */ + /** WARNING: for drawing UI's, need to check if this is off (maybe inverse this later). */ ACHANNEL_SETTING_PROTECT = 1, ACHANNEL_SETTING_MUTE = 2, ACHANNEL_SETTING_EXPAND = 3, diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h index 41123aff79f..f909a13c2cb 100644 --- a/source/blender/editors/include/ED_screen.h +++ b/source/blender/editors/include/ED_screen.h @@ -666,7 +666,7 @@ bool ED_region_panel_category_gutter_calc_rect(const ARegion *region, rcti *r_re bool ED_region_panel_category_gutter_isect_xy(const ARegion *region, const int event_xy[2]); /** - * \note: This may return true for multiple overlapping regions. + * \note This may return true for multiple overlapping regions. * If it matters, check overlapped regions first (#ARegion.overlap). */ bool ED_region_contains_xy(const struct ARegion *region, const int event_xy[2]); diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 5d8cf176b87..5de7681a1e6 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -198,7 +198,7 @@ typedef struct KnifeObjectInfo { * Optionally allocate triangle indices, these are needed for non-interactive knife * projection as multiple cuts are made without the BVH being updated. * Using these indices the it's possible to access `cagecos` even if the face has been cut - * and the loops in `em->looptris` no longer refer to the original triangles, see: + * and the loops in `em->looptris` no longer refer to the original triangles, see: T97153. */ const int (*tri_indices)[3]; diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc index b7deade5146..ac8ab834cb7 100644 --- a/source/blender/editors/object/object_add.cc +++ b/source/blender/editors/object/object_add.cc @@ -1888,7 +1888,7 @@ void OBJECT_OT_collection_external_asset_drop(wmOperatorType *ot) ED_object_add_generic_props(ot, false); - /* Important: Instancing option. Intentionally remembered across executions (no #PROP_SKIP_SAVE). + /* IMPORTANT: Instancing option. Intentionally remembered across executions (no #PROP_SKIP_SAVE). */ RNA_def_boolean(ot->srna, "use_instance", diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index d5385181055..43c19670a41 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1315,7 +1315,7 @@ void ED_screen_full_restore(bContext *C, ScrArea *area) else { ED_screen_state_toggle(C, win, area, state); } - /* warning: 'area' may be freed */ + /* WARNING: 'area' may be freed */ } /* otherwise just tile the area again */ else { diff --git a/source/blender/editors/space_sequencer/sequencer_channels_draw.c b/source/blender/editors/space_sequencer/sequencer_channels_draw.c index a777132e9fc..c11388e8555 100644 --- a/source/blender/editors/space_sequencer/sequencer_channels_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_channels_draw.c @@ -200,7 +200,7 @@ static float text_size_get(const SeqChannelDrawContext *context) return UI_fontstyle_height_max(&style->widget) * 1.5f * context->scale; } -/* Todo: decide what gets priority - label or buttons */ +/* TODO: decide what gets priority - label or buttons. */ static rctf label_rect_init(const SeqChannelDrawContext *context, const int channel_index, const float used_width) @@ -286,7 +286,7 @@ static void draw_channel_labels(const SeqChannelDrawContext *context, } } -/* Todo: different text/buttons alignment */ +/* TODO: different text/buttons alignment. */ static void draw_channel_header(const SeqChannelDrawContext *context, uiBlock *block, const int channel_index) diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 0305ad279a0..117e206eac7 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -2596,7 +2596,7 @@ static int sequencer_paste_exec(bContext *C, wmOperator *op) } /* Paste animation. - * Note: Only fcurves are copied. Drivers and NLA action strips are not copied. + * NOTE: Only fcurves are copied. Drivers and NLA action strips are not copied. * First backup original curves from scene and move curves from clipboard into scene. This way, * when pasted strips are renamed, pasted fcurves are renamed with them. Finally restore original * curves from backup. diff --git a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp index 03e9134c6c2..979673fd736 100644 --- a/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp +++ b/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.cpp @@ -499,9 +499,9 @@ void BlenderStrokeRenderer::test_strip_visibility(Strip::vertex_container &strip StrokeVertexRep *svRep[3]; bool visible; - // iterate over all vertices and count visible faces and strip segments - // (note: a strip segment is a series of visible faces, while two strip - // segments are separated by one or more invisible faces) + /* Iterate over all vertices and count visible faces and strip segments + * (NOTE: a strip segment is a series of visible faces, while two strip + * segments are separated by one or more invisible faces). */ v[0] = strip_vertices.begin(); v[1] = v[0] + 1; v[2] = v[0] + 2; diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh index 0005d788a3b..46051a58e8b 100644 --- a/source/blender/functions/FN_field.hh +++ b/source/blender/functions/FN_field.hh @@ -372,7 +372,7 @@ class FieldEvaluator : NonMovable, NonCopyable { /** * \param field: Field to add to the evaluator. * \param dst: Mutable span that the evaluated result for this field is be written into. - * \note: When the output may only be used as a single value, the version of this function with + * \note When the output may only be used as a single value, the version of this function with * a virtual array result array should be used. */ int add_with_destination(GField field, GMutableSpan dst); @@ -380,7 +380,7 @@ class FieldEvaluator : NonMovable, NonCopyable { /** * \param field: Field to add to the evaluator. * \param dst: Mutable span that the evaluated result for this field is be written into. - * \note: When the output may only be used as a single value, the version of this function with + * \note When the output may only be used as a single value, the version of this function with * a virtual array result array should be used. */ template int add_with_destination(Field field, MutableSpan dst) diff --git a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h index 99107a96cfe..9e44990cfca 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h +++ b/source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h @@ -487,7 +487,7 @@ typedef struct LineartBoundingArea { * r_aligned: True when 1) a and b is exactly on the same straight line and 2) a and b share a * common end-point. * - * Important: if r_aligned is true, r_ratio will be either 0 or 1 depending on which point from + * IMPORTANT: if r_aligned is true, r_ratio will be either 0 or 1 depending on which point from * segment a is shared with segment b. If it's a1 then r_ratio is 0, else then r_ratio is 1. This * extra information is needed for line art occlusion stage to work correctly in such cases. */ diff --git a/source/blender/gpu/GPU_state.h b/source/blender/gpu/GPU_state.h index 7641b50fe24..7519b3bc1cb 100644 --- a/source/blender/gpu/GPU_state.h +++ b/source/blender/gpu/GPU_state.h @@ -35,7 +35,8 @@ typedef enum eGPUBarrier { ENUM_OPERATORS(eGPUBarrier, GPU_BARRIER_ELEMENT_ARRAY) -/* Note: For Metal and Vulkan only. TODO(Metal): Update barrier calls to use stage flags. */ +/* NOTE: For Metal and Vulkan only. + * TODO(Metal): Update barrier calls to use stage flags. */ typedef enum eGPUStageBarrierBits { GPU_BARRIER_STAGE_VERTEX = (1 << 0), GPU_BARRIER_STAGE_FRAGMENT = (1 << 1), diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c index 7ec6ee5183a..23028f58059 100644 --- a/source/blender/gpu/intern/gpu_material.c +++ b/source/blender/gpu/intern/gpu_material.c @@ -626,7 +626,7 @@ eGPUMaterialFlag GPU_material_flag(const GPUMaterial *mat) return mat->flag; } -/* Note: Consumes the flags. */ +/* NOTE: Consumes the flags. */ bool GPU_material_recalc_flag_get(GPUMaterial *mat) { bool updated = (mat->flag & GPU_MATFLAG_UPDATED) != 0; diff --git a/source/blender/gpu/metal/mtl_context.hh b/source/blender/gpu/metal/mtl_context.hh index 938ea8edc13..1849a04ea48 100644 --- a/source/blender/gpu/metal/mtl_context.hh +++ b/source/blender/gpu/metal/mtl_context.hh @@ -57,12 +57,12 @@ typedef struct MTLContextDepthStencilState { MTLStencilOperation stencil_op_back_depth_fail; MTLStencilOperation stencil_op_back_depthstencil_pass; - /* Framebuffer State -- We need to mark this, incase stencil state remains unchanged, + /* Frame-buffer State -- We need to mark this, in case stencil state remains unchanged, * but attachment state has changed. */ bool has_depth_target; bool has_stencil_target; - /* TODO(Metal): Consider optimising this function using memcmp. + /* TODO(Metal): Consider optimizing this function using memcmp. * Un-used, but differing, stencil state leads to over-generation * of state objects when doing trivial compare. */ inline bool operator==(const MTLContextDepthStencilState &other) const @@ -297,7 +297,7 @@ typedef struct MTLContextGlobalShaderPipelineState { /* Whether the pipeline state has been modified since application. * `dirty_flags` is a bitmask of the types of state which have been updated. - * This is in order to optimise calls and only re-apply state as needed. + * This is in order to optimize calls and only re-apply state as needed. * Some state parameters are dynamically applied on the RenderCommandEncoder, * others may be encapsulated in GPU-resident state objects such as * MTLDepthStencilState or MTLRenderPipelineState. */ @@ -374,7 +374,7 @@ typedef struct MTLTemporaryBufferRange { } MTLTemporaryBufferRange; /** MTLContext -- Core render loop and state management. **/ -/* Note(Metal): Partial MTLContext stub to provide wrapper functionality +/* NOTE(Metal): Partial MTLContext stub to provide wrapper functionality * for work-in-progress MTL* classes. */ class MTLContext : public Context { diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm index de72340a9a8..94f5682b11b 100644 --- a/source/blender/gpu/metal/mtl_context.mm +++ b/source/blender/gpu/metal/mtl_context.mm @@ -49,7 +49,7 @@ MTLContext::MTLContext(void *ghost_window) /* Init debug. */ debug::mtl_debug_init(); - /* Initialise Metal modules. */ + /* Initialize Metal modules. */ this->state_manager = new MTLStateManager(this); /* TODO(Metal): Implement. */ @@ -121,7 +121,7 @@ bool MTLContext::is_render_pass_active() /* Metal Context Pipeline State. */ void MTLContext::pipeline_state_init() { - /*** Initialise state only once. ***/ + /*** Initialize state only once. ***/ if (!this->pipeline_state.initialised) { this->pipeline_state.initialised = true; this->pipeline_state.active_shader = NULL; @@ -277,7 +277,7 @@ id MTLContext::get_sampler_from_state(MTLSamplerState sampler_s id MTLContext::generate_sampler_from_state(MTLSamplerState sampler_state) { - /* Check if samper already exists for given state. */ + /* Check if sampler already exists for given state. */ id st = this->sampler_state_cache_[(unsigned int)sampler_state]; if (st != nil) { return st; diff --git a/source/blender/gpu/metal/mtl_state.mm b/source/blender/gpu/metal/mtl_state.mm index 5cd88c4ff7b..5f52bc55f72 100644 --- a/source/blender/gpu/metal/mtl_state.mm +++ b/source/blender/gpu/metal/mtl_state.mm @@ -24,7 +24,7 @@ void MTLStateManager::mtl_state_init(void) MTLStateManager::MTLStateManager(MTLContext *ctx) : StateManager() { - /* Initialise State. */ + /* Initialize State. */ this->context_ = ctx; mtl_state_init(); @@ -92,10 +92,10 @@ void MTLStateManager::set_state(const GPUState &state) /* TODO remove (Following GLState). */ if (changed.polygon_smooth) { - /* Note: Unsupported in Metal. */ + /* NOTE: Unsupported in Metal. */ } if (changed.line_smooth) { - /* Note: Unsupported in Metal. */ + /* NOTE: Unsupported in Metal. */ } current_ = state; @@ -341,7 +341,7 @@ void MTLStateManager::set_clip_distances(const int new_dist_len, const int old_d void MTLStateManager::set_logic_op(const bool enable) { - /* Note(Metal): Logic Operations not directly supported. */ + /* NOTE(Metal): Logic Operations not directly supported. */ } void MTLStateManager::set_facing(const bool invert) @@ -376,9 +376,9 @@ void MTLStateManager::set_backface_culling(const eGPUFaceCullTest test) void MTLStateManager::set_provoking_vert(const eGPUProvokingVertex vert) { - /* Note(Metal): Provoking vertex is not a feature in the Metal API. + /* NOTE(Metal): Provoking vertex is not a feature in the Metal API. * Shaders are handled on a case-by-case basis using a modified vertex shader. - * For example, wireframe rendering and edit-mesh shaders utilise an SSBO-based + * For example, wireframe rendering and edit-mesh shaders utilize an SSBO-based * vertex fetching mechanism which considers the inverse convention for flat * shading, to ensure consistent results with OpenGL. */ } @@ -439,7 +439,7 @@ void MTLStateManager::set_blend(const eGPUBlend value) break; } case GPU_BLEND_ADDITIVE: { - /* Do not let alpha accumulate but premult the source RGB by it. */ + /* Do not let alpha accumulate but pre-multiply the source RGB by it. */ src_rgb = MTLBlendFactorSourceAlpha; dst_rgb = MTLBlendFactorOne; src_alpha = MTLBlendFactorZero; @@ -530,14 +530,14 @@ void MTLStateManager::set_blend(const eGPUBlend value) /** \name Memory barrier * \{ */ -/* Note(Metal): Granular option for specifying before/after stages for a barrier +/* NOTE(Metal): Granular option for specifying before/after stages for a barrier * Would be a useful feature. */ /*void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits, eGPUStageBarrierBits before_stages, eGPUStageBarrierBits after_stages) */ void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits) { - /* Note(Metal): The Metal API implictly tracks dependencies between resources. + /* NOTE(Metal): The Metal API implicitly tracks dependencies between resources. * Memory barriers and execution barriers (Fences/Events) can be used to coordinate * this explicitly, however, in most cases, the driver will be able to * resolve these dependencies automatically. @@ -551,7 +551,7 @@ void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits) /* Apple Silicon does not support memory barriers. * We do not currently need these due to implicit API guarantees. - * Note(Metal): MTLFence/MTLEvent may be required to synchronize work if + * NOTE(Metal): MTLFence/MTLEvent may be required to synchronize work if * untracked resources are ever used. */ if ([ctx->device hasUnifiedMemory]) { return; @@ -562,7 +562,7 @@ void MTLStateManager::issue_barrier(eGPUBarrier barrier_bits) id rec = nil; // ctx->get_active_render_command_encoder(); BLI_assert(rec); - /* Only supporting Metal on 10.15 onwards anyway - Check required for warnings. */ + /* Only supporting Metal on 10.15 onward anyway - Check required for warnings. */ if (@available(macOS 10.14, *)) { MTLBarrierScope scope = 0; if (barrier_bits & GPU_BARRIER_SHADER_IMAGE_ACCESS || diff --git a/source/blender/gpu/metal/mtl_texture.mm b/source/blender/gpu/metal/mtl_texture.mm index 7ec3d390416..ca19d1f9e4b 100644 --- a/source/blender/gpu/metal/mtl_texture.mm +++ b/source/blender/gpu/metal/mtl_texture.mm @@ -1163,7 +1163,7 @@ void gpu::MTLTexture::mip_range_set(int min, int max) { BLI_assert(min <= max && min >= 0 && max <= mipmaps_); - /* Note: + /* NOTE: * - mip_min_ and mip_max_ are used to Clamp LODs during sampling. * - Given functions like Framebuffer::recursive_downsample modifies the mip range * between each layer, we do not want to be re-baking the texture. diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index 934163846e4..16cf0e2125e 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -47,7 +47,7 @@ typedef struct DDSData { * Also; add new variables to the end to save pain! */ -/* Warning: Keep explicit value assignments here, +/* WARNING: Keep explicit value assignments here, * this file is included in areas where not all format defines are set * (e.g. intern/dds only get WITH_DDS, even if TIFF, HDR etc are also defined). * See T46524. */ diff --git a/source/blender/imbuf/intern/dds/Stream.cpp b/source/blender/imbuf/intern/dds/Stream.cpp index 34f3654aa3f..566891dac8b 100644 --- a/source/blender/imbuf/intern/dds/Stream.cpp +++ b/source/blender/imbuf/intern/dds/Stream.cpp @@ -45,7 +45,7 @@ unsigned int mem_read(Stream &mem, unsigned long long &i) mem.set_failed(msg_error_seek); return 0; } - memcpy(&i, mem.mem + mem.pos, 8); /* @@ todo: make sure little endian */ + memcpy(&i, mem.mem + mem.pos, 8); /* TODO: make sure little endian. */ mem.pos += 8; return 8; } @@ -56,7 +56,7 @@ unsigned int mem_read(Stream &mem, unsigned int &i) mem.set_failed(msg_error_read); return 0; } - memcpy(&i, mem.mem + mem.pos, 4); /* @@ todo: make sure little endian */ + memcpy(&i, mem.mem + mem.pos, 4); /* TODO: make sure little endian. */ mem.pos += 4; return 4; } @@ -67,7 +67,7 @@ unsigned int mem_read(Stream &mem, unsigned short &i) mem.set_failed(msg_error_read); return 0; } - memcpy(&i, mem.mem + mem.pos, 2); /* @@ todo: make sure little endian */ + memcpy(&i, mem.mem + mem.pos, 2); /* TODO: make sure little endian. */ mem.pos += 2; return 2; } diff --git a/source/blender/io/collada/AnimationImporter.h b/source/blender/io/collada/AnimationImporter.h index 7c5b38f5f8d..1c5b7570b9d 100644 --- a/source/blender/io/collada/AnimationImporter.h +++ b/source/blender/io/collada/AnimationImporter.h @@ -228,7 +228,7 @@ class AnimationImporter : private TransformReader, public AnimationImporterBase COLLADAFW::Transformation::TransformationType tm_type); /** * Internal, better make it private - * warning: evaluates only rotation and only assigns matrix transforms now + * WARNING: evaluates only rotation and only assigns matrix transforms now * prerequisites: animlist_map, curve_map. */ void evaluate_transform_at_frame(float mat[4][4], COLLADAFW::Node *node, float fra); diff --git a/source/blender/io/collada/MeshImporter.h b/source/blender/io/collada/MeshImporter.h index 79b9778738d..85f960abfe6 100644 --- a/source/blender/io/collada/MeshImporter.h +++ b/source/blender/io/collada/MeshImporter.h @@ -142,7 +142,7 @@ class MeshImporter : public MeshImporterBase { /** * Return the number of faces by summing up * the face-counts of the parts. - * hint: This is done because `mesh->getFacesCount()` does + * HINT: This is done because `mesh->getFacesCount()` does * count loose edges as extra faces, which is not what we want here. */ void allocate_poly_data(COLLADAFW::Mesh *collada_mesh, Mesh *me); @@ -150,7 +150,7 @@ class MeshImporter : public MeshImporterBase { /* TODO: import uv set names */ /** * Read all faces from TRIANGLES, TRIANGLE_FANS, POLYLIST, POLYGON - * Important: This function MUST be called before read_lines() + * IMPORTANT: This function MUST be called before read_lines() * Otherwise we will lose all edges from faces (see read_lines() above) * * TODO: import uv set names. @@ -158,7 +158,7 @@ class MeshImporter : public MeshImporterBase { void read_polys(COLLADAFW::Mesh *mesh, Mesh *me); /** * Read all loose edges. - * Important: This function assumes that all edges from existing + * IMPORTANT: This function assumes that all edges from existing * faces have already been generated and added to me->medge * So this function MUST be called after read_faces() (see below) */ diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc index b027df73b1e..11d1bafdafe 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc +++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.cc @@ -385,7 +385,7 @@ void OBJWriter::write_edges_indices(FormatHandler &fh, const IndexOffsets &offsets, const OBJMesh &obj_mesh_data) const { - /* Note: ensure_mesh_edges should be called before. */ + /* NOTE: ensure_mesh_edges should be called before. */ const int tot_edges = obj_mesh_data.tot_edges(); for (int edge_index = 0; edge_index < tot_edges; edge_index++) { const std::optional> vertex_indices = diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh index 0d7c089ec14..f0263989bfc 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh @@ -236,7 +236,7 @@ constexpr FormattingSyntax syntax_elem_to_formatting(const eMTLSyntaxElement key case eMTLSyntaxElement::Ke: { return {"Ke {:.6f} {:.6f} {:.6f}\n", 3, is_type_float}; } - /* Note: first texture map related argument, if present, will have its own leading space. */ + /* NOTE: first texture map related argument, if present, will have its own leading space. */ case eMTLSyntaxElement::map_Kd: { return {"map_Kd{} {}\n", 2, is_type_string_related}; } diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh index e41a7f8518e..8bfc5fe8bf0 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.hh @@ -13,7 +13,7 @@ namespace blender::io::obj { -/* Note: the OBJ parser implementation is planned to get fairly large changes "soon", +/* NOTE: the OBJ parser implementation is planned to get fairly large changes "soon", * so don't read too much into current implementation... */ class OBJParser { private: diff --git a/source/blender/io/wavefront_obj/importer/obj_import_string_utils.cc b/source/blender/io/wavefront_obj/importer/obj_import_string_utils.cc index ffafbe41d0f..c8eaa046e68 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_string_utils.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_string_utils.cc @@ -2,7 +2,7 @@ #include "obj_import_string_utils.hh" -/* Note: we could use C++17 from_chars to parse +/* NOTE: we could use C++17 from_chars to parse * floats, but even if some compilers claim full support, * their standard libraries are not quite there yet. * LLVM/libc++ only has a float parser since LLVM 14, diff --git a/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc b/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc index 3d34fb6f9c6..d7f4ce3d773 100644 --- a/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc +++ b/source/blender/io/wavefront_obj/tests/obj_importer_tests.cc @@ -333,7 +333,7 @@ TEST_F(obj_importer_test, import_invalid_syntax) {"OBCube", OB_MESH, 8, 12, 6, 24, float3(1, 1, -1), float3(-1, 1, 1)}, {"OBObjectWithAReallyLongNameToCheckHowImportHandlesNamesThatAreLon", OB_MESH, - 10, /* Note: right now parses some invalid obj syntax as valid vertices. */ + 10, /* NOTE: right now parses some invalid obj syntax as valid vertices. */ 3, 1, 3, diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 8e29d88a583..85649a31ea4 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -173,7 +173,7 @@ typedef struct SpaceProperties { /* button defines (deprecated) */ #ifdef DNA_DEPRECATED_ALLOW -/* warning: the values of these defines are used in SpaceProperties.tabs[8] */ +/* WARNING: the values of these defines are used in SpaceProperties.tabs[8] */ /* SpaceProperties.mainb new */ # define CONTEXT_SCENE 0 # define CONTEXT_OBJECT 1 diff --git a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc index b45a0d6c81a..73b2c400e90 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_curve_to_points.cc @@ -120,7 +120,7 @@ static Array calculate_spline_point_offsets(GeoNodeExecParams ¶ms, } /** - * \note: Relies on the fact that all attributes on point clouds are stored contiguously. + * \note Relies on the fact that all attributes on point clouds are stored contiguously. */ static GMutableSpan ensure_point_attribute(PointCloudComponent &points, const AttributeIDRef &attribute_id, diff --git a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc index 4591cfa1da2..1f16e8d55bd 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_extrude_mesh.cc @@ -109,7 +109,7 @@ static MutableSpan mesh_loops(Mesh &mesh) } /** - * \note: Some areas in this file rely on the new sections of attributes from #CustomData_realloc + * \note Some areas in this file rely on the new sections of attributes from #CustomData_realloc * to be zeroed. */ static void expand_mesh(Mesh &mesh, diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.cc b/source/blender/nodes/shader/nodes/node_shader_tex_image.cc index 06c238fead0..c9588949761 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.cc +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.cc @@ -74,7 +74,7 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, const char *gpu_node_name = use_cubic ? "node_tex_tile_cubic" : "node_tex_tile_linear"; GPUNodeLink *gpu_image = GPU_image_tiled(mat, ima, iuser, sampler_state); GPUNodeLink *gpu_image_tile_mapping = GPU_image_tiled_mapping(mat, ima, iuser); - /* UDIM tiles needs a samper2DArray and sampler1DArray for tile mapping. */ + /* UDIM tiles needs a `sampler2DArray` and `sampler1DArray` for tile mapping. */ GPU_stack_link(mat, node, gpu_node_name, in, out, gpu_image, gpu_image_tile_mapping); } else { diff --git a/source/blender/python/intern/bpy_rna.c b/source/blender/python/intern/bpy_rna.c index 2276e5e97a8..14be9ceda94 100644 --- a/source/blender/python/intern/bpy_rna.c +++ b/source/blender/python/intern/bpy_rna.c @@ -8886,7 +8886,7 @@ static PyObject *pyrna_register_class(PyObject *UNUSED(self), PyObject *py_class return NULL; } - /* Warning: gets parent classes srna, only for the register function. */ + /* WARNING: gets parent classes srna, only for the register function. */ srna = pyrna_struct_as_srna(py_class, true, "register_class(...):"); if (srna == NULL) { return NULL; diff --git a/source/blender/render/intern/texture_image.c b/source/blender/render/intern/texture_image.c index 69c24a18f36..3b1eb293a3a 100644 --- a/source/blender/render/intern/texture_image.c +++ b/source/blender/render/intern/texture_image.c @@ -1215,7 +1215,7 @@ static int imagewraposa_aniso(Tex *tex, AFD.intpol = intpol; AFD.extflag = extflag; - /* brecht: added stupid clamping here, large dx/dy can give very large + /* NOTE(@brecht): added stupid clamping here, large dx/dy can give very large * filter sizes which take ages to render, it may be better to do this * more intelligently later in the code .. probably it's not noticeable */ if (AFD.dxt[0] * AFD.dxt[0] + AFD.dxt[1] * AFD.dxt[1] > 2.0f * 2.0f) { diff --git a/source/blender/render/intern/texture_procedural.c b/source/blender/render/intern/texture_procedural.c index 73dbcfdfeab..ce58993b7cf 100644 --- a/source/blender/render/intern/texture_procedural.c +++ b/source/blender/render/intern/texture_procedural.c @@ -1208,9 +1208,8 @@ static int multitex(Tex *tex, case TEX_MUSGRAVE: /* newnoise: musgrave types */ - /* ton: added this, for Blender convention reason. - * artificer: added the use of tmpvec to avoid scaling texvec - */ + /* NOTE(@ton): added this, for Blender convention reason. + * NOTE(@artificer): added the use of tmpvec to avoid scaling texvec. */ copy_v3_v3(tmpvec, texvec); mul_v3_fl(tmpvec, 1.0f / tex->noisesize); @@ -1230,18 +1229,16 @@ static int multitex(Tex *tex, break; /* newnoise: voronoi type */ case TEX_VORONOI: - /* ton: added this, for Blender convention reason. - * artificer: added the use of tmpvec to avoid scaling texvec - */ + /* NOTE(@ton): added this, for Blender convention reason. + * NOTE(@artificer): added the use of tmpvec to avoid scaling texvec. */ copy_v3_v3(tmpvec, texvec); mul_v3_fl(tmpvec, 1.0f / tex->noisesize); retval = voronoiTex(tex, tmpvec, texres); break; case TEX_DISTNOISE: - /* ton: added this, for Blender convention reason. - * artificer: added the use of tmpvec to avoid scaling texvec - */ + /* NOTE(@ton): added this, for Blender convention reason. + * NOTE(@artificer): added the use of tmpvec to avoid scaling texvec. */ copy_v3_v3(tmpvec, texvec); mul_v3_fl(tmpvec, 1.0f / tex->noisesize); diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 525301d4393..268382ec923 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -1196,7 +1196,7 @@ struct ID *WM_drag_get_local_ID_from_event(const struct wmEvent *event, short id bool WM_drag_is_ID_type(const struct wmDrag *drag, int idcode); /** - * \note: Does not store \a asset in any way, so it's fine to pass a temporary. + * \note Does not store \a asset in any way, so it's fine to pass a temporary. */ wmDragAsset *WM_drag_create_asset_data(const struct AssetHandle *asset, struct AssetMetaData *metadata, @@ -1228,7 +1228,7 @@ void WM_drag_free_imported_drag_ID(struct Main *bmain, struct wmDragAssetCatalog *WM_drag_get_asset_catalog_data(const struct wmDrag *drag); /** - * \note: Does not store \a asset in any way, so it's fine to pass a temporary. + * \note Does not store \a asset in any way, so it's fine to pass a temporary. */ void WM_drag_add_asset_list_item(wmDrag *drag, const struct bContext *C, diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 5776184aec0..92fa3754d3a 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -5908,7 +5908,7 @@ bool WM_window_modal_keymap_status_draw(bContext *C, wmWindow *win, uiLayout *la bool show_text = true; { - /* Warning: O(n^2). */ + /* WARNING: O(n^2). */ wmKeyMapItem *kmi = NULL; for (kmi = keymap->items.first; kmi; kmi = kmi->next) { if (kmi->propvalue == items[i].value) {