From 9b97123bf9340539657a13381dd1acb673cb67a4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 2 Jun 2023 10:16:16 +1000 Subject: [PATCH] Cleanup: spelling in comments, odd comment block spacing --- source/blender/blenkernel/intern/dynamicpaint.cc | 4 ++-- .../blenkernel/intern/grease_pencil_convert_legacy.cc | 2 +- source/blender/blenkernel/intern/lib_override.cc | 2 +- .../blender/blenkernel/intern/mesh_legacy_convert.cc | 2 +- source/blender/blenkernel/intern/node.cc | 2 +- source/blender/blenkernel/intern/screen.c | 2 +- source/blender/blenlib/BLI_implicit_sharing.hh | 2 +- source/blender/blenlib/intern/fileops.c | 2 +- source/blender/blenlib/intern/index_mask.cc | 2 +- source/blender/blenlib/tests/BLI_string_test.cc | 2 +- .../draw/engines/gpencil/gpencil_antialiasing.hh | 2 +- source/blender/draw/engines/gpencil/gpencil_engine.cc | 2 +- source/blender/draw/engines/gpencil/gpencil_shader.hh | 2 +- .../draw/engines/gpencil/gpencil_shader_shared.h | 2 +- .../draw/engines/overlay/overlay_next_instance.hh | 6 ++++-- .../draw/intern/draw_cache_impl_grease_pencil.cc | 8 ++++---- source/blender/editors/animation/anim_channels_edit.c | 2 +- .../editors/gpencil_legacy/gpencil_weight_paint.c | 2 +- source/blender/editors/include/ED_view3d.h | 2 +- .../blender/editors/space_view3d/view3d_gizmo_ruler.cc | 4 ++-- source/blender/geometry/intern/uv_pack.cc | 10 +++++----- source/blender/gpu/metal/mtl_context.mm | 4 ++-- source/blender/gpu/metal/mtl_debug.hh | 2 +- source/blender/gpu/metal/mtl_shader_generator.hh | 2 +- source/blender/gpu/vulkan/vk_batch.cc | 2 +- source/blender/gpu/vulkan/vk_command_buffer.cc | 2 +- source/blender/gpu/vulkan/vk_framebuffer.cc | 2 +- source/blender/gpu/vulkan/vk_framebuffer.hh | 4 ++-- source/blender/gpu/vulkan/vk_pipeline_state.cc | 7 +++---- source/blender/gpu/vulkan/vk_state_manager.hh | 4 ++-- source/blender/gpu/vulkan/vk_vertex_buffer.hh | 2 +- source/blender/io/usd/intern/usd_capi_export.cc | 6 ++++-- source/blender/io/usd/intern/usd_reader_material.h | 2 +- source/blender/io/usd/intern/usd_writer_curves.cc | 2 +- source/blender/render/RE_pipeline.h | 2 +- source/creator/creator_args.c | 2 +- 36 files changed, 56 insertions(+), 53 deletions(-) diff --git a/source/blender/blenkernel/intern/dynamicpaint.cc b/source/blender/blenkernel/intern/dynamicpaint.cc index 2a30f94c4b4..d6848c1891c 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.cc +++ b/source/blender/blenkernel/intern/dynamicpaint.cc @@ -1650,8 +1650,8 @@ static void dynamicPaint_setInitialColor(const Scene *scene, DynamicPaintSurface return; } - /* for vertex surface loop through tfaces and find uv color - * that provides highest alpha */ + /* For vertex surface loop through `looptris` and find UV color + * that provides highest alpha. */ if (surface->format == MOD_DPAINT_SURFACE_F_VERTEX) { struct ImagePool *pool = BKE_image_pool_new(); diff --git a/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc b/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc index 7c7b79fae1d..27000cc4c31 100644 --- a/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc +++ b/source/blender/blenkernel/intern/grease_pencil_convert_legacy.cc @@ -93,7 +93,7 @@ void legacy_gpencil_frame_to_grease_pencil_drawing(const bGPDframe &gpf, int stroke_i = 0; LISTBASE_FOREACH_INDEX (bGPDstroke *, gps, &gpf.strokes, stroke_i) { - /* TODO: check if gps->editcurve is not nullptr and parse bezier curve instead. */ + /* TODO: check if `gps->editcurve` is not nullptr and parse bezier curve instead. */ /* Write curve attributes. */ stroke_cyclic.span[stroke_i] = (gps->flag & GP_STROKE_CYCLIC) != 0; diff --git a/source/blender/blenkernel/intern/lib_override.cc b/source/blender/blenkernel/intern/lib_override.cc index 98e09cf4212..a0c1dccf2a6 100644 --- a/source/blender/blenkernel/intern/lib_override.cc +++ b/source/blender/blenkernel/intern/lib_override.cc @@ -2272,7 +2272,7 @@ static bool lib_override_library_resync(Main *bmain, RNA_OVERRIDE_APPLY_FLAG_NOP); /* Clear the old shape key pointer again, otherwise it won't make ID management code happy - * when freeing (at least from user count side of things). */ + * when freeing (at least from user count side of things). */ if (key_override_old_p != nullptr) { *key_override_old_p = nullptr; } diff --git a/source/blender/blenkernel/intern/mesh_legacy_convert.cc b/source/blender/blenkernel/intern/mesh_legacy_convert.cc index 55823aaacb5..97b67f9a47c 100644 --- a/source/blender/blenkernel/intern/mesh_legacy_convert.cc +++ b/source/blender/blenkernel/intern/mesh_legacy_convert.cc @@ -1178,7 +1178,7 @@ static int mesh_tessface_calc(Mesh &mesh, /* NOTE: quad detection issue - fourth vertex-index vs fourth loop-index: * Polygons take care of their loops ordering, hence not of their vertices ordering. - * Currently, our tfaces' fourth vertex index might be 0 even for a quad. + * Currently, the #TFace fourth vertex index might be 0 even for a quad. * However, we know our fourth loop index is never 0 for quads * (because they are sorted for polygons, and our quads are still mere copies of their polygons). * So we pass nullptr as #MFace pointer, and #mesh_loops_to_tessdata diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc index 4a324470825..dfb8bfce90c 100644 --- a/source/blender/blenkernel/intern/node.cc +++ b/source/blender/blenkernel/intern/node.cc @@ -1776,7 +1776,7 @@ void nodeModifySocketType(bNodeTree *ntree, if (sock->type != socktype->type) { /* Only reallocate the default value if the type changed so that UI data like min and max * isn't removed. This assumes that the default value is stored in the same format for all - * socket types with the same #eNodeSocketDatatype. */ + * socket types with the same #eNodeSocketDatatype. */ socket_id_user_decrement(sock); MEM_freeN(sock->default_value); sock->default_value = nullptr; diff --git a/source/blender/blenkernel/intern/screen.c b/source/blender/blenkernel/intern/screen.c index dfd129624e6..03cc9cb1087 100644 --- a/source/blender/blenkernel/intern/screen.c +++ b/source/blender/blenkernel/intern/screen.c @@ -228,7 +228,7 @@ void BKE_screen_foreach_id_screen_area(LibraryForeachIDData *data, ScrArea *area /* Embedded ID pointers are not remapped (besides exceptions), ensure it still matches * actual data. Note that `snode->id` was already processed (and therefore potentially - * remapped) above.*/ + * remapped) above. */ if (!is_readonly) { snode->nodetree = (snode->id == NULL) ? NULL : ntreeFromID(snode->id); if (path != NULL) { diff --git a/source/blender/blenlib/BLI_implicit_sharing.hh b/source/blender/blenlib/BLI_implicit_sharing.hh index 6f9543b39f5..ef350c47ea6 100644 --- a/source/blender/blenlib/BLI_implicit_sharing.hh +++ b/source/blender/blenlib/BLI_implicit_sharing.hh @@ -149,7 +149,7 @@ class ImplicitSharingInfo : NonCopyable, NonMovable { * data can be freed though. */ const_cast(this)->delete_data_only(); /* Also remove the "fake" weak user that indicated that there was at least one strong - * user.*/ + * user. */ this->remove_weak_user_and_delete_if_last(); } } diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 8683abeff5b..f81e13680b2 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -343,7 +343,7 @@ bool BLI_dir_create_recursive(const char *dirname) if (mode != 0) { /* The file exists, either it's a directory (ok), or not, * in which case this function can't do anything useful - * (the caller could remove it and re-run this function). */ + * (the caller could remove it and re-run this function). */ return S_ISDIR(mode) ? true : false; } diff --git a/source/blender/blenlib/intern/index_mask.cc b/source/blender/blenlib/intern/index_mask.cc index 7eb6b3904e6..520ced6cb95 100644 --- a/source/blender/blenlib/intern/index_mask.cc +++ b/source/blender/blenlib/intern/index_mask.cc @@ -341,7 +341,7 @@ static int64_t get_size_before_gap(const Span indices) BLI_assert(indices.size() >= 2); if (indices[1] > indices[0] + 1) { /* For sparse indices, often the next gap is just after the next index. - * In this case we can skip the logarithmic check below.*/ + * In this case we can skip the logarithmic check below. */ return 1; } return unique_sorted_indices::find_size_of_next_range(indices); diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc index 16b68cf639e..f077c33c2ea 100644 --- a/source/blender/blenlib/tests/BLI_string_test.cc +++ b/source/blender/blenlib/tests/BLI_string_test.cc @@ -125,7 +125,7 @@ TEST(string, StrCopyUTF8_TerminateEncodingEarly) /** \} */ /* -------------------------------------------------------------------- */ -/** \name String Concatinate +/** \name String Concatenate * \{ */ TEST(string, StrCat) diff --git a/source/blender/draw/engines/gpencil/gpencil_antialiasing.hh b/source/blender/draw/engines/gpencil/gpencil_antialiasing.hh index fa42a998d1a..3479be9d4b7 100644 --- a/source/blender/draw/engines/gpencil/gpencil_antialiasing.hh +++ b/source/blender/draw/engines/gpencil/gpencil_antialiasing.hh @@ -86,7 +86,7 @@ class AntiAliasing { pass.framebuffer_set(&output_fb_); pass.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_CUSTOM); pass.shader_set(shaders_.static_shader_get(ANTIALIASING_RESOLVE)); - /** \note use color_tx as dummy if AA is diabled. */ + /** \note use color_tx as dummy if AA is disabled. */ pass.bind_texture("blendTex", anti_aliasing_enabled_ ? &blend_weight_tx_ : &color_tx); pass.bind_texture("colorTex", &color_tx); pass.bind_texture("revealTex", &reveal_tx); diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.cc b/source/blender/draw/engines/gpencil/gpencil_engine.cc index a37f8ba87cc..0684894f80a 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.cc +++ b/source/blender/draw/engines/gpencil/gpencil_engine.cc @@ -103,7 +103,7 @@ class Instance { objects.init(v3d, scene); lights.init(v3d); - /* TODO(fclem): Vfx. */ + /* TODO(@fclem): VFX. */ // vfx.init(use_vfx_, camera_, rv3d); anti_aliasing.init(v3d, scene); } diff --git a/source/blender/draw/engines/gpencil/gpencil_shader.hh b/source/blender/draw/engines/gpencil/gpencil_shader.hh index 848946e71cb..576c7b9a73f 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader.hh +++ b/source/blender/draw/engines/gpencil/gpencil_shader.hh @@ -13,7 +13,7 @@ namespace blender::draw::greasepencil { enum eShaderType { - /* SMAA antialiasing */ + /* SMAA anti-aliasing. */ ANTIALIASING_EDGE_DETECT = 0, ANTIALIASING_BLEND_WEIGHT, ANTIALIASING_RESOLVE, diff --git a/source/blender/draw/engines/gpencil/gpencil_shader_shared.h b/source/blender/draw/engines/gpencil/gpencil_shader_shared.h index 397ecbb4d5b..8f278c1365b 100644 --- a/source/blender/draw/engines/gpencil/gpencil_shader_shared.h +++ b/source/blender/draw/engines/gpencil/gpencil_shader_shared.h @@ -133,7 +133,7 @@ BLI_STATIC_ASSERT_ALIGN(gpLight, 16) #endif struct gpObject { - /** Wether or not to apply lighting to the GPencil object. */ + /** Weather or not to apply lighting to the GPencil object. */ bool1 is_shadeless; /** Switch between 2d and 3D stroke order. */ bool1 stroke_order3d; diff --git a/source/blender/draw/engines/overlay/overlay_next_instance.hh b/source/blender/draw/engines/overlay/overlay_next_instance.hh index 7fcf440e2ec..2ea8a15f09f 100644 --- a/source/blender/draw/engines/overlay/overlay_next_instance.hh +++ b/source/blender/draw/engines/overlay/overlay_next_instance.hh @@ -18,8 +18,10 @@ namespace blender::draw::overlay { -/* Selection engine reuse most of the Overlay engine by creating selection IDs for each - * selectable component and using a special shaders for drawing.*/ +/** + * Selection engine reuse most of the Overlay engine by creating selection IDs for each + * selectable component and using a special shaders for drawing. + */ class Instance { const SelectionType selection_type_; diff --git a/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc b/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc index ea371fa29b4..aa6c7ff9a7c 100644 --- a/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc +++ b/source/blender/draw/intern/draw_cache_impl_grease_pencil.cc @@ -160,12 +160,12 @@ BLI_INLINE int32_t pack_rotation_aspect_hardness(float rot, float asp, float har /* Aspect uses 9 bits */ float asp_normalized = (asp > 1.0f) ? (1.0f / asp) : asp; packed |= int32_t(unit_float_to_uchar_clamp(asp_normalized)); - /* Store if inversed in the 9th bit. */ + /* Store if inverted in the 9th bit. */ if (asp > 1.0f) { packed |= 1 << 8; } /* Rotation uses 9 bits */ - /* Rotation are in [-90°..90°] range, so we can encode the sign of the angle + the cosine + /* Rotation are in [-90..90] degree range, so we can encode the sign of the angle + the cosine * because the cosine will always be positive. */ packed |= int32_t(unit_float_to_uchar_clamp(cosf(rot))) << 9; /* Store sine sign in 9th bit. */ @@ -197,7 +197,7 @@ static void grease_pencil_batches_ensure(GreasePencil &grease_pencil, int cfra) cfra, [&](GreasePencilDrawing &drawing) { drawings.append(&drawing); }); /* First, count how many vertices and triangles are needed for the whole object. Also record the - * offsets into the curves for the verticies and triangles. */ + * offsets into the curves for the vertices and triangles. */ int total_points_num = 0; int total_triangles_num = 0; int v_offset = 0; @@ -240,7 +240,7 @@ static void grease_pencil_batches_ensure(GreasePencil &grease_pencil, int cfra) } /* One vertex is stored before and after as padding. Cyclic strokes have one extra - * vertex.*/ + * vertex. */ total_points_num += curves.points_num() + num_cyclic + curves.curves_num() * 2; total_triangles_num += (curves.points_num() + num_cyclic) * 2; total_triangles_num += drawing.triangles().size(); diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c index 143bc488890..2ca2b58cdfa 100644 --- a/source/blender/editors/animation/anim_channels_edit.c +++ b/source/blender/editors/animation/anim_channels_edit.c @@ -3354,7 +3354,7 @@ static int click_select_channel_object(bContext *C, * to avoid getting stuck there, see: #48747. */ ED_object_base_activate_with_mode_exit_if_needed(C, base); /* adds notifier */ - /* Similar to outliner, do not change active element when selecting elements in range.*/ + /* Similar to outliner, do not change active element when selecting elements in range. */ if ((adt) && (adt->flag & ADT_UI_SELECTED) && (selectmode != SELECT_EXTEND_RANGE)) { adt->flag |= ADT_UI_ACTIVE; } diff --git a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c index 236de80ba0b..244eb867e72 100644 --- a/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c +++ b/source/blender/editors/gpencil_legacy/gpencil_weight_paint.c @@ -1688,7 +1688,7 @@ static int gpencil_weight_sample_invoke(bContext *C, wmOperator *UNUSED(op), con } } - /* Set brush weight, based on points found.*/ + /* Set brush weight, based on points found. */ if (closest_count > 0) { if (closest_count == 1) { brush->weight = closest_weight[0]; diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h index 02470624a09..3b70e60ab79 100644 --- a/source/blender/editors/include/ED_view3d.h +++ b/source/blender/editors/include/ED_view3d.h @@ -1332,7 +1332,7 @@ void ED_view3d_shade_update(struct Main *bmain, struct View3D *v3d, struct ScrAr #define OVERLAY_RETOPOLOGY_ENABLED(overlay) \ (((overlay).edit_flag & V3D_OVERLAY_EDIT_RETOPOLOGY) != 0) #ifdef __APPLE__ -/* Apple silicon tile depth test requires a higher value to reduce drawing artifacts.*/ +/* Apple silicon tile depth test requires a higher value to reduce drawing artifacts. */ # define OVERLAY_RETOPOLOGY_MIN_OFFSET_ENABLED 0.0015f # define OVERLAY_RETOPOLOGY_MIN_OFFSET_DISABLED 0.0015f #else diff --git a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc index 2f3957d017d..cf748633e06 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_ruler.cc @@ -951,11 +951,11 @@ static void gizmo_ruler_draw(const bContext *C, wmGizmo *gz) if ((len < (numstr_size[1] * 2.5f)) || ((len < (numstr_size[0] + bg_margin + bg_margin)) && (fabs(rot_90_vec[0]) < 0.5f))) { - /* Super short, or quite short and also shallow angle. Position below line.*/ + /* Super short, or quite short and also shallow angle. Position below line. */ posit[1] = MIN2(co_ss[0][1], co_ss[2][1]) - numstr_size[1] - bg_margin - bg_margin; } else if (fabs(rot_90_vec[0]) < 0.2f) { - /* Very shallow angle. Shift down by text height.*/ + /* Very shallow angle. Shift down by text height. */ posit[1] -= numstr_size[1]; } diff --git a/source/blender/geometry/intern/uv_pack.cc b/source/blender/geometry/intern/uv_pack.cc index 462bdbadbd2..8ca13dd1a0a 100644 --- a/source/blender/geometry/intern/uv_pack.cc +++ b/source/blender/geometry/intern/uv_pack.cc @@ -185,7 +185,7 @@ static bool can_rotate(const Span islands, const UVPackIsland_Para return true; } -/** Angle rounding helper for "D4" transforms. */ +/** Angle rounding helper for "D4" transforms. */ static float angle_match(float angle_radians, float target_radians) { if (fabsf(angle_radians - target_radians) < DEG2RADF(0.1f)) { @@ -194,7 +194,7 @@ static float angle_match(float angle_radians, float target_radians) return angle_radians; } -/** Angle rounding helper for "D4" transforms. */ +/** Angle rounding helper for "D4" transforms. */ static float plusminus_90_angle(float angle_radians) { angle_radians = angle_radians - floorf((angle_radians + M_PI_2) / M_PI) * M_PI; @@ -1109,7 +1109,7 @@ static bool rotate_inside_square(const Span> islan } if (params.shape_method == ED_UVPACK_SHAPE_AABB) { /* AABB margin calculations are not preserved under rotations. */ - if (island_indices.size() > 1) { /* Unless there's only one island...*/ + if (island_indices.size() > 1) { /* Unless there's only one island. */ if (params.target_aspect_y != 1.0f) { /* TODO: Check for possible 90 degree rotation. */ @@ -1146,10 +1146,10 @@ static bool rotate_inside_square(const Span> islan /* Now we have all the points in the correct space, compute the 2D convex hull. */ const float(*source)[2] = reinterpret_cast(square_finder.points.data()); - square_finder.indices.resize(square_finder.points.size()); /* Allocate worst-case.*/ + square_finder.indices.resize(square_finder.points.size()); /* Allocate worst-case. */ int convex_size = BLI_convexhull_2d( source, int(square_finder.points.size()), square_finder.indices.data()); - square_finder.indices.resize(convex_size); /* Resize to actual size.*/ + square_finder.indices.resize(convex_size); /* Resize to actual size. */ /* Run the computation to find the best angle. (Slow!) */ const float quad_180 = square_finder.update(DEG2RADF(-180.0f)); diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm index a7dc129ed8d..5c92e1ee702 100644 --- a/source/blender/gpu/metal/mtl_context.mm +++ b/source/blender/gpu/metal/mtl_context.mm @@ -1265,7 +1265,7 @@ bool MTLContext::ensure_buffer_bindings( const MTLShaderBufferBlock &ssbo = shader_interface->get_storage_block(ssbo_index); if (ssbo.buffer_index >= 0 && ssbo.location >= 0) { - /* Explicit lookup location for SSBO in bind table.*/ + /* Explicit lookup location for SSBO in bind table. */ const uint32_t ssbo_location = ssbo.location; /* buffer(N) index of where to bind the SSBO. */ const uint32_t buffer_index = ssbo.buffer_index; @@ -1444,7 +1444,7 @@ bool MTLContext::ensure_buffer_bindings( const MTLShaderBufferBlock &ssbo = shader_interface->get_storage_block(ssbo_index); if (ssbo.buffer_index >= 0 && ssbo.location >= 0) { - /* Explicit lookup location for UBO in bind table.*/ + /* Explicit lookup location for UBO in bind table. */ const uint32_t ssbo_location = ssbo.location; /* buffer(N) index of where to bind the UBO. */ const uint32_t buffer_index = ssbo.buffer_index; diff --git a/source/blender/gpu/metal/mtl_debug.hh b/source/blender/gpu/metal/mtl_debug.hh index a0ff8e1f6cc..027df1be3d6 100644 --- a/source/blender/gpu/metal/mtl_debug.hh +++ b/source/blender/gpu/metal/mtl_debug.hh @@ -11,7 +11,7 @@ #include "BKE_global.h" #include "CLG_log.h" -/** Options for organising Metal GPU debug captures. */ +/** Options for organizing Metal GPU debug captures. */ /* Maximum nested debug group depth. Groups beyond this will still have the pass name pulled into * the RenderCommandEncoder, but will not display in the trace. * Use -1 for unlimited. */ diff --git a/source/blender/gpu/metal/mtl_shader_generator.hh b/source/blender/gpu/metal/mtl_shader_generator.hh index 0efcc305336..bd62025dfaf 100644 --- a/source/blender/gpu/metal/mtl_shader_generator.hh +++ b/source/blender/gpu/metal/mtl_shader_generator.hh @@ -249,7 +249,7 @@ struct MSLTextureResource { MSLTextureSamplerAccess access; /* Whether resource is a texture sampler or an image. */ bool is_texture_sampler; - /* Index in shader bind table [[texture(N)]].*/ + /* Index in shader bind table `[[texture(N)]]`. */ uint slot; /* Explicit bind index provided by ShaderCreateInfo. */ uint location; diff --git a/source/blender/gpu/vulkan/vk_batch.cc b/source/blender/gpu/vulkan/vk_batch.cc index 953ef161bcc..2d7e04db72a 100644 --- a/source/blender/gpu/vulkan/vk_batch.cc +++ b/source/blender/gpu/vulkan/vk_batch.cc @@ -19,7 +19,7 @@ namespace blender::gpu { void VKBatch::draw(int vertex_first, int vertex_count, int instance_first, int instance_count) { /* Currently the pipeline is rebuild on each draw command. Clearing the dirty flag for - * consistency with the internals of GPU module. */ + * consistency with the internals of GPU module. */ flag &= ~GPU_BATCH_DIRTY; /* Finalize graphics pipeline */ diff --git a/source/blender/gpu/vulkan/vk_command_buffer.cc b/source/blender/gpu/vulkan/vk_command_buffer.cc index c0bfe1c176d..dec7ce2f33a 100644 --- a/source/blender/gpu/vulkan/vk_command_buffer.cc +++ b/source/blender/gpu/vulkan/vk_command_buffer.cc @@ -41,7 +41,7 @@ void VKCommandBuffer::init(const VkDevice vk_device, /* When a the last GHOST context is destroyed the device is deallocate. A moment later the GPU * context is destroyed. The first step is to activate it. Activating would retrieve the device - * from GHOST which in that case is a VK_NULL_HANDLE.*/ + * from GHOST which in that case is a #VK_NULL_HANDLE. */ if (vk_device == VK_NULL_HANDLE) { return; } diff --git a/source/blender/gpu/vulkan/vk_framebuffer.cc b/source/blender/gpu/vulkan/vk_framebuffer.cc index 264c26d4680..5a584a8d97d 100644 --- a/source/blender/gpu/vulkan/vk_framebuffer.cc +++ b/source/blender/gpu/vulkan/vk_framebuffer.cc @@ -441,7 +441,7 @@ void VKFrameBuffer::render_pass_create() size_set(size[0], size[1]); } else { - /* A framebuffer should at least be 1 by 1.*/ + /* A frame-buffer should at least be 1 by 1. */ this->size_set(1, 1); } viewport_reset(); diff --git a/source/blender/gpu/vulkan/vk_framebuffer.hh b/source/blender/gpu/vulkan/vk_framebuffer.hh index 6d6e8166a0c..d0addb9c8af 100644 --- a/source/blender/gpu/vulkan/vk_framebuffer.hh +++ b/source/blender/gpu/vulkan/vk_framebuffer.hh @@ -113,9 +113,9 @@ class VKFrameBuffer : public FrameBuffer { } /** - * Is this framebuffer immutable? + * Is this frame-buffer immutable? * - * Framebuffers that are owned by GHOST are immutable and + * Frame-buffers that are owned by GHOST are immutable and * don't have any attachments assigned. It should be assumed that there is a single color texture * in slot 0. */ diff --git a/source/blender/gpu/vulkan/vk_pipeline_state.cc b/source/blender/gpu/vulkan/vk_pipeline_state.cc index 644aba6af32..8c142d2923d 100644 --- a/source/blender/gpu/vulkan/vk_pipeline_state.cc +++ b/source/blender/gpu/vulkan/vk_pipeline_state.cc @@ -78,9 +78,8 @@ void VKPipelineStateManager::finalize_color_blend_state(const VKFrameBuffer &fra { color_blend_attachments.clear(); if (framebuffer.is_immutable()) { - /* Immutable framebuffers are owned by GHOST and don't have any attachments assigned. In this - * case we assume that there is a single color texture assigned. - */ + /* Immutable frame-buffers are owned by GHOST and don't have any attachments assigned. In this + * case we assume that there is a single color texture assigned. */ color_blend_attachments.append(color_blend_attachment_template); } else { @@ -95,7 +94,7 @@ void VKPipelineStateManager::finalize_color_blend_state(const VKFrameBuffer &fra else { /* Test to detect if all color textures are sequential attached from the first slot. We * assume at this moment that this is the case. Otherwise we need to rewire how attachments - * and bindings work.*/ + * and bindings work. */ is_sequential = false; } } diff --git a/source/blender/gpu/vulkan/vk_state_manager.hh b/source/blender/gpu/vulkan/vk_state_manager.hh index 628c738e719..5b3caa9f5c5 100644 --- a/source/blender/gpu/vulkan/vk_state_manager.hh +++ b/source/blender/gpu/vulkan/vk_state_manager.hh @@ -20,7 +20,7 @@ class VKUniformBuffer; class VKVertexBuffer; class VKStateManager : public StateManager { - /* Dummy sampler for now.*/ + /* Dummy sampler for now. */ VKSampler sampler_; uint texture_unpack_row_length_ = 0; @@ -48,7 +48,7 @@ class VKStateManager : public StateManager { void issue_barrier(eGPUBarrier barrier_bits) override; - /** Apply resources to the bindings of the active shader.*/ + /** Apply resources to the bindings of the active shader. */ void apply_bindings(); void texture_bind(Texture *tex, GPUSamplerState sampler, int unit) override; diff --git a/source/blender/gpu/vulkan/vk_vertex_buffer.hh b/source/blender/gpu/vulkan/vk_vertex_buffer.hh index b24694f82e2..6660cdedb84 100644 --- a/source/blender/gpu/vulkan/vk_vertex_buffer.hh +++ b/source/blender/gpu/vulkan/vk_vertex_buffer.hh @@ -54,7 +54,7 @@ class VKVertexBuffer : public VertBuf { void allocate(); void *convert() const; - /* VKTexture requires access to `buffer_` to convert a vertex buffer to a texture.*/ + /* VKTexture requires access to `buffer_` to convert a vertex buffer to a texture. */ friend class VKTexture; }; diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc index fd6f10fd921..4decfe3bc77 100644 --- a/source/blender/io/usd/intern/usd_capi_export.cc +++ b/source/blender/io/usd/intern/usd_capi_export.cc @@ -119,10 +119,12 @@ static bool export_params_valid(const USDExportParams ¶ms) return valid; } -/* Create the root Xform primitive, if the Root Prim path has been set +/** + * Create the root Xform primitive, if the Root Prim path has been set * in the export options. In the future, this function can be extended * to author transforms and additional schema data (e.g., model Kind) - * on the root prim. */ + * on the root prim. + */ static void ensure_root_prim(pxr::UsdStageRefPtr stage, const USDExportParams ¶ms) { if (params.root_prim_path[0] == '\0') { diff --git a/source/blender/io/usd/intern/usd_reader_material.h b/source/blender/io/usd/intern/usd_reader_material.h index a6b7e21897f..0d592a124be 100644 --- a/source/blender/io/usd/intern/usd_reader_material.h +++ b/source/blender/io/usd/intern/usd_reader_material.h @@ -34,7 +34,7 @@ struct NodePlacementContext { /* Map a USD shader prim path to the Blender node converted * from that shader. This map is updated during shader * conversion and is used to avoid creating duplicate nodes - * for a given shader. */ + * for a given shader. */ ShaderToNodeMap node_cache; NodePlacementContext(float in_origx, diff --git a/source/blender/io/usd/intern/usd_writer_curves.cc b/source/blender/io/usd/intern/usd_writer_curves.cc index 4f81a0f1b56..4efae0ede2c 100644 --- a/source/blender/io/usd/intern/usd_writer_curves.cc +++ b/source/blender/io/usd/intern/usd_writer_curves.cc @@ -275,7 +275,7 @@ static void populate_curve_props_for_nurbs(const bke::CurvesGeometry &geometry, const bool is_cyclic) { /* Order and range, when representing a batched NurbsCurve should be authored one value per - * curve.*/ + * curve. */ const int num_curves = geometry.curve_num; orders.resize(num_curves); diff --git a/source/blender/render/RE_pipeline.h b/source/blender/render/RE_pipeline.h index 7092ebca75b..0e0a37f1cf5 100644 --- a/source/blender/render/RE_pipeline.h +++ b/source/blender/render/RE_pipeline.h @@ -528,7 +528,7 @@ void RE_RenderBuffer_assign_shared(RenderBuffer *lhs, const RenderBuffer *rhs); void RE_RenderBuffer_data_free(RenderBuffer *render_buffer); /* Implementation of above, but for byte buffer. */ -/* TODO(sergey): Once everything is C++ we can remove the duplicated API. */ +/* TODO(sergey): Once everything is C++ we can remove the duplicated API. */ RenderByteBuffer RE_RenderByteBuffer_new(uint8_t *data); void RE_RenderByteBuffer_assign_data(RenderByteBuffer *render_buffer, uint8_t *data); void RE_RenderByteBuffer_assign_shared(RenderByteBuffer *lhs, const RenderByteBuffer *rhs); diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c index e8336d4432b..9a8c34c01c7 100644 --- a/source/creator/creator_args.c +++ b/source/creator/creator_args.c @@ -555,7 +555,7 @@ static void print_help(bArgs *ba, bool all) struct BuildDefs defs; build_defs_init(&defs, all); -/* All printing must go via `PRINT` macro. */ +/* All printing must go via `PRINT` macro. */ # define printf __ERROR__ # define PRINT(...) BLI_args_printf(ba, __VA_ARGS__)