diff --git a/intern/ghost/intern/GHOST_ContextVK.cpp b/intern/ghost/intern/GHOST_ContextVK.cpp index 3f9b197939a..271d4a9c69e 100644 --- a/intern/ghost/intern/GHOST_ContextVK.cpp +++ b/intern/ghost/intern/GHOST_ContextVK.cpp @@ -535,7 +535,7 @@ static GHOST_TSuccess getGraphicQueueFamily(VkPhysicalDevice device, uint32_t *r for (const auto &queue_family : queue_families) { /* Every vulkan implementation by spec must have one queue family that support both graphics * and compute pipelines. We select this one; compute only queue family hints at async compute - * implementations.*/ + * implementations. */ if ((queue_family.queueFlags & VK_QUEUE_GRAPHICS_BIT) && (queue_family.queueFlags & VK_QUEUE_COMPUTE_BIT)) { return GHOST_kSuccess; diff --git a/source/blender/blenkernel/BKE_nla.h b/source/blender/blenkernel/BKE_nla.h index a58b4166ba5..2d76dfb9b30 100644 --- a/source/blender/blenkernel/BKE_nla.h +++ b/source/blender/blenkernel/BKE_nla.h @@ -162,9 +162,9 @@ void BKE_nlastrips_sort_strips(ListBase *strips); void BKE_nlastrips_add_strip_unsafe(ListBase *strips, struct NlaStrip *strip); /** - * NULL checks incoming strip and verifies no overlap / invalid - * configuration against other strips in NLA Track before calling - * #BKE_nlastrips_add_strip_unsafe. + * NULL checks incoming strip and verifies no overlap / invalid + * configuration against other strips in NLA Track before calling + * #BKE_nlastrips_add_strip_unsafe. */ bool BKE_nlastrips_add_strip(ListBase *strips, struct NlaStrip *strip); diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c index 09120a34d80..b8235176502 100644 --- a/source/blender/blenkernel/intern/anim_sys.c +++ b/source/blender/blenkernel/intern/anim_sys.c @@ -3287,7 +3287,7 @@ static bool is_action_track_evaluated_without_nla(const AnimData *adt, * sure why. Preferably, it would be as simple as checking for `(adt->act_Track == nlt)` but that * doesn't work either, neither does comparing indices. * - * This function is a temporary work around. The first disabled track is always the tweaked track. + * This function is a temporary work around. The first disabled track is always the tweaked track. */ static NlaTrack *nlatrack_find_tweaked(const AnimData *adt) { diff --git a/source/blender/blenkernel/intern/geometry_component_mesh.cc b/source/blender/blenkernel/intern/geometry_component_mesh.cc index 44697ca2a30..61dbe5d790b 100644 --- a/source/blender/blenkernel/intern/geometry_component_mesh.cc +++ b/source/blender/blenkernel/intern/geometry_component_mesh.cc @@ -211,7 +211,8 @@ void adapt_mesh_domain_corner_to_point_impl(const Mesh &mesh, /* Deselect loose vertices without corners that are still selected from the 'true' default. */ /* The record fact says that the value is true. - *Writing to the array from different threads is okay because each thread sets the same value. */ + * Writing to the array from different threads is okay because each thread sets the same value. + */ threading::parallel_for(loose_verts.index_range(), 2048, [&](const IndexRange range) { for (const int vert_index : range) { if (loose_verts[vert_index]) { diff --git a/source/blender/blenkernel/intern/gpencil_geom.cc b/source/blender/blenkernel/intern/gpencil_geom.cc index 94404bbe039..d38d4b5908a 100644 --- a/source/blender/blenkernel/intern/gpencil_geom.cc +++ b/source/blender/blenkernel/intern/gpencil_geom.cc @@ -1015,12 +1015,14 @@ bool BKE_gpencil_stroke_smooth_point(bGPDstroke *gps, return false; } - /* Overview of the algorithm here and in the following smooth functions: - * The smooth functions return the new attribute in question for a single point. - * The result is stored in r_gps->points[point_index], while the data is read from gps. - * To get a correct result, duplicate the stroke point data and read from the copy, - * while writing to the real stroke. Not doing that will result in acceptable, but - * asymmetric results. + /* - Overview of the algorithm here and in the following smooth functions: + * + * The smooth functions return the new attribute in question for a single point. + * The result is stored in r_gps->points[point_index], while the data is read from gps. + * To get a correct result, duplicate the stroke point data and read from the copy, + * while writing to the real stroke. Not doing that will result in acceptable, but + * asymmetric results. + * * This algorithm works as long as all points are being smoothed. If there is * points that should not get smoothed, use the old repeat smooth pattern with * the parameter "iterations" set to 1 or 2. (2 matches the old algorithm). @@ -3237,7 +3239,7 @@ bGPDstroke *BKE_gpencil_stroke_delete_tagged_points(bGPdata *gpd, pts = new_stroke->points; for (j = 0; j < new_stroke->totpoints; j++, pts++) { - /* Some points have time = 0, so check to not get negative time values.*/ + /* Some points have time = 0, so check to not get negative time values. */ pts->time = max_ff(pts->time - delta, 0.0f); /* set flag for select again later */ if (select == true) { diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index f0b446e589b..f796d6adca5 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -57,8 +57,8 @@ #include "BLI_threads.h" #include "BLI_utildefines.h" +/* NOTE: The implementation for Apple lives in storage_apple.mm. */ #if !defined(__APPLE__) -/* The implementation for Apple lives in storage_apple.mm.*/ bool BLI_change_working_dir(const char *dir) { BLI_assert(BLI_thread_is_main()); diff --git a/source/blender/blenlib/intern/storage_apple.mm b/source/blender/blenlib/intern/storage_apple.mm index f2a493fd8ef..43448fe570c 100644 --- a/source/blender/blenlib/intern/storage_apple.mm +++ b/source/blender/blenlib/intern/storage_apple.mm @@ -189,7 +189,7 @@ const char *BLI_expand_tilde(const char *path_with_tilde) char *BLI_current_working_dir(char *dir, const size_t maxncpy) { - /* Can't just copy to the *dir pointer, as [path getCString gets grumpy.*/ + /* Can't just copy to the *dir pointer, as [path getCString gets grumpy. */ char path_expanded[PATH_MAX]; @autoreleasepool { NSString *path = [[NSFileManager defaultManager] currentDirectoryPath]; diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.h b/source/blender/compositor/operations/COM_BokehImageOperation.h index 28506ba36b5..e3ae3ef922b 100644 --- a/source/blender/compositor/operations/COM_BokehImageOperation.h +++ b/source/blender/compositor/operations/COM_BokehImageOperation.h @@ -8,8 +8,8 @@ namespace blender::compositor { /** - * \brief The BokehImageOperation class is an operation that creates an image useful to mimic the - *internals of a camera. + * \brief The #BokehImageOperation class is an operation that creates an image useful to mimic the + * internals of a camera. * * features: * - number of flaps @@ -19,20 +19,20 @@ namespace blender::compositor { * - simulate lens-shift * * Per pixel the algorithm determines the edge of the bokeh on the same line as the center of the - *image and the pixel is evaluating. + * image and the pixel is evaluating. * * The edge is detected by finding the closest point on the direct line between the two nearest - *flap-corners. this edge is interpolated with a full circle. Result of this edge detection is - *stored as the distance between the center of the image and the edge. + * flap-corners. this edge is interpolated with a full circle. Result of this edge detection is + * stored as the distance between the center of the image and the edge. * * catadioptric lenses are simulated to interpolate between the center of the image and the - *distance of the edge. We now have three distances: - * - distance between the center of the image and the pixel to be evaluated - * - distance between the center of the image and the outer-edge - * - distance between the center of the image and the inner-edge - * + * distance of the edge. We now have three distances: + * - Distance between the center of the image and the pixel to be evaluated. + * - Distance between the center of the image and the outer-edge. + * - Distance between the center of the image and the inner-edge. + * With a simple compare it can be detected if the evaluated pixel is between the outer and inner - *edge. + * edge. */ class BokehImageOperation : public MultiThreadedOperation { private: @@ -105,7 +105,7 @@ class BokehImageOperation : public MultiThreadedOperation { void init_execution() override; /** - * \brief Deinitialize the execution + * \brief De-initialize the execution */ void deinit_execution() override; diff --git a/source/blender/draw/engines/eevee/eevee_shaders.cc b/source/blender/draw/engines/eevee/eevee_shaders.cc index 638c3dd3cd4..22495c4ad31 100644 --- a/source/blender/draw/engines/eevee/eevee_shaders.cc +++ b/source/blender/draw/engines/eevee/eevee_shaders.cc @@ -1400,7 +1400,7 @@ struct GPUMaterial *EEVEE_material_get( case GPU_MAT_QUEUED: { vedata->stl->g_data->queued_shaders_count++; GPUMaterial *default_mat = EEVEE_material_default_get(scene, ma, options); - /* Mark pending material with its default material for future cache warming.*/ + /* Mark pending material with its default material for future cache warming. */ GPU_material_set_default(mat, default_mat); /* Return default material. */ mat = default_mat; diff --git a/source/blender/draw/engines/eevee_next/eevee_shadow.cc b/source/blender/draw/engines/eevee_next/eevee_shadow.cc index c7d6dcb62d7..5b5eec04d9a 100644 --- a/source/blender/draw/engines/eevee_next/eevee_shadow.cc +++ b/source/blender/draw/engines/eevee_next/eevee_shadow.cc @@ -440,7 +440,7 @@ void ShadowDirectional::cascade_tilemaps_distribution(Light &light, const Camera /* The bias is applied in cascade_level_range(). * Using clipmap_lod_min here simplify code in shadow_directional_level(). - * Minus 1 because of the ceil().*/ + * Minus 1 because of the ceil(). */ light._clipmap_lod_bias = light.clipmap_lod_min - 1; /* Scaling is handled by ShadowCoordinates.lod_relative. */ diff --git a/source/blender/editors/interface/interface_templates.cc b/source/blender/editors/interface/interface_templates.cc index 42c4bfd983e..5cde372222a 100644 --- a/source/blender/editors/interface/interface_templates.cc +++ b/source/blender/editors/interface/interface_templates.cc @@ -2337,7 +2337,7 @@ void uiTemplateModifiers(uiLayout * /*layout*/, bContext *C) /* -------------------------------------------------------------------- */ /** \name Constraints Template * - * Template for building the panel layout for the active object or bone's constraints. + * Template for building the panel layout for the active object or bone's constraints. * \{ */ /** For building the panel UI for constraints. */ diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.hh b/source/blender/editors/sculpt_paint/sculpt_intern.hh index bee2e37df9c..36d942fc439 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.hh +++ b/source/blender/editors/sculpt_paint/sculpt_intern.hh @@ -1896,12 +1896,13 @@ void SCULPT_ensure_valid_pivot(const Object *ob, Scene *scene); /* Ensures vertex island keys exist and are valid. */ void SCULPT_topology_islands_ensure(Object *ob); -/* Mark vertex island keys as invalid. Call when adding or hiding - * geometry. +/** + * Mark vertex island keys as invalid. + * Call when adding or hiding geometry. */ void SCULPT_topology_islands_invalidate(SculptSession *ss); -/* Get vertex island key.*/ +/** Get vertex island key. */ int SCULPT_vertex_island_get(SculptSession *ss, PBVHVertRef vertex); /** \} */ diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c index f315690a50d..23f3cb068ab 100644 --- a/source/blender/editors/space_graph/graph_draw.c +++ b/source/blender/editors/space_graph/graph_draw.c @@ -593,7 +593,7 @@ static void draw_fcurve_curve(bAnimContext *ac, * * If the automatically determined sampling frequency is likely to cause an infinite * loop (i.e. too close to 0), then clamp it to a determined "safe" value. The value - * chosen here is just the coarsest value which still looks reasonable... + * chosen here is just the coarsest value which still looks reasonable. */ /* TODO: perhaps we should have 1.0 frames diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index f92fe71455b..c6a0f0e945a 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -107,10 +107,8 @@ static void nearest_fcurve_vert_store(ListBase *matches, int screen_co[2], dist; /* convert from data-space to screen coordinates - * NOTE: hpoint+1 gives us 0,1,2 respectively for each handle, - * needed to access the relevant vertex coordinates in the 3x3 - * 'vec' matrix - */ + * NOTE: `hpoint +1` gives us 0,1,2 respectively for each handle, + * needed to access the relevant vertex coordinates in the 3x3 'vec' matrix */ if (UI_view2d_view_to_region_clip(v2d, bezt->vec[hpoint + 1][0], (bezt->vec[hpoint + 1][1] + offset) * unit_scale, diff --git a/source/blender/geometry/intern/uv_parametrizer.cc b/source/blender/geometry/intern/uv_parametrizer.cc index 61f37ca5fd7..0bc432b7371 100644 --- a/source/blender/geometry/intern/uv_parametrizer.cc +++ b/source/blender/geometry/intern/uv_parametrizer.cc @@ -3724,13 +3724,14 @@ using GeoUVPinIndex = struct GeoUVPinIndex { ParamKey reindex; }; -/* Find a (mostly) unique ParamKey given a BMVert index and UV co-ordinates. - * For each unique pinned UVs, return a unique ParamKey, starting with - * a very large number, and decreasing steadily from there. - * For non-pinned UVs which share a BMVert with a pinned UV, - * return the index corresponding to the closest pinned UV. - * For everything else, just return the BMVert index. - * Note that ParamKeys will eventually be hashed, so they don't need to be contiguous. +/** + * Find a (mostly) unique #ParamKey given a #BMVert index and UV co-ordinates. + * For each unique pinned UVs, return a unique #ParamKey, starting with + * a very large number, and decreasing steadily from there. + * For non-pinned UVs which share a #BMVert with a pinned UV, + * return the index corresponding to the closest pinned UV. + * For everything else, just return the #BMVert index. + * Note that #ParamKeys will eventually be hashed, so they don't need to be contiguous. */ ParamKey GEO_uv_find_pin_index(ParamHandle *handle, const int bmvertindex, const float uv[2]) { diff --git a/source/blender/gpu/GPU_material.h b/source/blender/gpu/GPU_material.h index 7e7905c3aeb..c706b10f1dd 100644 --- a/source/blender/gpu/GPU_material.h +++ b/source/blender/gpu/GPU_material.h @@ -254,9 +254,9 @@ void GPU_materials_free(struct Main *bmain); struct Scene *GPU_material_scene(GPUMaterial *material); struct GPUPass *GPU_material_get_pass(GPUMaterial *material); -/* Return the most optimal shader configuration for the given material .*/ +/** Return the most optimal shader configuration for the given material. */ struct GPUShader *GPU_material_get_shader(GPUMaterial *material); -/* Return the base un-optimized shader. */ +/** Return the base un-optimized shader. */ struct GPUShader *GPU_material_get_shader_base(GPUMaterial *material); const char *GPU_material_get_name(GPUMaterial *material); diff --git a/source/blender/gpu/intern/gpu_codegen.cc b/source/blender/gpu/intern/gpu_codegen.cc index 78cddc6d272..5c2b81f4b84 100644 --- a/source/blender/gpu/intern/gpu_codegen.cc +++ b/source/blender/gpu/intern/gpu_codegen.cc @@ -306,7 +306,7 @@ class GPUCodegen { bool should_optimize_heuristic() const { /* If each of the maximal attributes are exceeded, we can optimize, but we should also ensure - * the baseline is met.*/ + * the baseline is met. */ bool do_optimize = (nodes_total_ >= 60 || textures_total_ >= 4 || uniforms_total_ >= 64) && (textures_total_ >= 1 && uniforms_total_ >= 8 && nodes_total_ >= 4); return do_optimize; diff --git a/source/blender/gpu/intern/gpu_shader_create_info.hh b/source/blender/gpu/intern/gpu_shader_create_info.hh index 04d72716e8e..3da0eb20530 100644 --- a/source/blender/gpu/intern/gpu_shader_create_info.hh +++ b/source/blender/gpu/intern/gpu_shader_create_info.hh @@ -291,8 +291,10 @@ struct StageInterfaceInfo { }; StringRefNull name; - /** Name of the instance of the block (used to access). - * Can be empty string (i.e: "") only if not using geometry shader. */ + /** + * Name of the instance of the block (used to access). + * Can be empty string (i.e: "") only if not using geometry shader. + */ StringRefNull instance_name; /** List of all members of the interface. */ Vector inouts; diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c index 059a1a32c6a..af46df4e6cf 100644 --- a/source/blender/gpu/intern/gpu_viewport.c +++ b/source/blender/gpu/intern/gpu_viewport.c @@ -155,7 +155,7 @@ static void gpu_viewport_textures_create(GPUViewport *viewport) /* Can be shared with GPUOffscreen. */ if (viewport->depth_tx == NULL) { - /* Depth texture can be read back by gizmos #view3d_depths_create .*/ + /* Depth texture can be read back by gizmos #view3d_depths_create. */ viewport->depth_tx = GPU_texture_create_2d("dtxl_depth", UNPACK2(size), 1, diff --git a/source/blender/gpu/metal/mtl_context.mm b/source/blender/gpu/metal/mtl_context.mm index 85f18f16fd6..963459466b7 100644 --- a/source/blender/gpu/metal/mtl_context.mm +++ b/source/blender/gpu/metal/mtl_context.mm @@ -1527,7 +1527,7 @@ void MTLContext::ensure_texture_bindings( int compute_arg_buffer_bind_index = -1; /* Argument buffers are used for samplers, when the limit of 16 is exceeded. - * NOTE: Compute uses vertex argument for arg buffer bind index.*/ + * NOTE: Compute uses vertex argument for arg buffer bind index. */ bool use_argument_buffer_for_samplers = shader_interface->uses_argument_buffer_for_samplers(); compute_arg_buffer_bind_index = shader_interface->get_argument_buffer_bind_index( ShaderStage::COMPUTE); diff --git a/source/blender/gpu/metal/mtl_memory.hh b/source/blender/gpu/metal/mtl_memory.hh index ab3abf554f8..e763eff24b9 100644 --- a/source/blender/gpu/metal/mtl_memory.hh +++ b/source/blender/gpu/metal/mtl_memory.hh @@ -252,31 +252,32 @@ struct CompareMTLBuffer { } }; -/* An MTLSafeFreeList is a temporary list of gpu::MTLBuffers which have +/** + * An #MTLSafeFreeList is a temporary list of #gpu::MTLBuffers which have * been freed by the high level backend, but are pending GPU work execution before - * the gpu::MTLBuffers can be returned to the Memory manager pools. + * the #gpu::MTLBuffers can be returned to the Memory manager pools. * This list is implemented as a chunked linked-list. * - * Only a single MTLSafeFreeList is active at one time and is associated with current command - * buffer submissions. If an MTLBuffer is freed during the lifetime of a command buffer, it could - * still possibly be in-use and as such, the MTLSafeFreeList will increment its reference count for - * each command buffer submitted while the current pool is active. + * Only a single #MTLSafeFreeList is active at one time and is associated with current command + * buffer submissions. If an #MTLBuffer is freed during the lifetime of a command buffer, it could + * still possibly be in-use and as such, the #MTLSafeFreeList will increment its reference count + * for each command buffer submitted while the current pool is active. * - * -- Reference count is incremented upon MTLCommandBuffer commit. - * -- Reference count is decremented in the MTLCommandBuffer completion callback handler. + * - Reference count is incremented upon #MTLCommandBuffer commit. + * - Reference count is decremented in the #MTLCommandBuffer completion callback handler. * - * A new MTLSafeFreeList will begin each render step (frame). This pooling of buffers, rather than + * A new #MTLSafeFreeList will begin each render step (frame). This pooling of buffers, rather than * individual buffer resource tracking reduces performance overhead. * - * * The reference count starts at 1 to ensure that the reference count cannot prematurely reach - * zero until any command buffers have been submitted. This additional decrement happens - * when the next MTLSafeFreeList is created, to allow the existing pool to be released once - * the reference count hits zero after submitted command buffers complete. + * - The reference count starts at 1 to ensure that the reference count cannot prematurely reach + * zero until any command buffers have been submitted. This additional decrement happens + * when the next #MTLSafeFreeList is created, to allow the existing pool to be released once + * the reference count hits zero after submitted command buffers complete. * * NOTE: the Metal API independently tracks resources used by command buffers for the purpose of * keeping resources alive while in-use by the driver and CPU, however, this differs from the - * MTLSafeFreeList mechanism in the Metal backend, which exists for the purpose of allowing - * previously allocated MTLBuffer resources to be re-used. This allows us to save on the expensive + * #MTLSafeFreeList mechanism in the Metal backend, which exists for the purpose of allowing + * previously allocated #MTLBuffer resources to be re-used. This allows us to save on the expensive * cost of memory allocation. */ class MTLSafeFreeList { diff --git a/source/blender/gpu/metal/mtl_shader.hh b/source/blender/gpu/metal/mtl_shader.hh index 095ca94cc41..941f93675c8 100644 --- a/source/blender/gpu/metal/mtl_shader.hh +++ b/source/blender/gpu/metal/mtl_shader.hh @@ -788,7 +788,7 @@ inline bool mtl_convert_vertex_format(MTLVertexFormat shader_attrib_format, } else if (shader_attrib_format == MTLVertexFormatUInt && component_length == 4) { /* Special case here, format has been specified as GPU_COMP_U8 with 4 components, which - *is equivalent to a UInt-- so data will be compatible with shader interface. */ + * is equivalent to a UInt-- so data will be compatible with shader interface. */ out_vert_format = MTLVertexFormatUInt; } else { diff --git a/source/blender/gpu/metal/mtl_shader.mm b/source/blender/gpu/metal/mtl_shader.mm index 3f0bcaea875..d5d9cbd88fb 100644 --- a/source/blender/gpu/metal/mtl_shader.mm +++ b/source/blender/gpu/metal/mtl_shader.mm @@ -1269,7 +1269,7 @@ bool MTLShader::bake_compute_pipeline_state(MTLContext *ctx) * specialization constant, customized per unique pipeline state permutation. * * For Compute shaders, this offset is always zero, but this needs setting as - * it is expected as part of the common Metal shader header.*/ + * it is expected as part of the common Metal shader header. */ int MTL_uniform_buffer_base_index = 0; [values setConstantValue:&MTL_uniform_buffer_base_index type:MTLDataTypeInt diff --git a/source/blender/gpu/metal/mtl_texture.hh b/source/blender/gpu/metal/mtl_texture.hh index ed0576f14ec..174307aedf8 100644 --- a/source/blender/gpu/metal/mtl_texture.hh +++ b/source/blender/gpu/metal/mtl_texture.hh @@ -353,8 +353,8 @@ class MTLTexture : public Texture { * * blender::map update_2d_array_kernel_psos; * - Generate compute shader with configured kernel below with variable parameters depending - * on input/output format configurations. Do not need to keep source or descriptors around, - * just PSO, as same input defines will always generate the same code. + * on input/output format configurations. Do not need to keep source or descriptors around, + * just PSO, as same input defines will always generate the same code. * * - IF datatype IS an exact match e.g. : * - Per-component size matches (e.g. GPU_DATA_UBYTE) diff --git a/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl b/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl index 7b64f6b1bfe..a626accfb0a 100644 --- a/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl +++ b/source/blender/gpu/shaders/gpu_shader_2D_widget_shadow_vert.glsl @@ -25,7 +25,7 @@ void main() { /* NOTE(Metal): Declaring constant array in function scope to avoid increasing local shader - * memory pressure.*/ + * memory pressure. */ const vec2 cornervec[36] = vec2[36](vec2(0.0, 1.0), vec2(0.02, 0.805), vec2(0.067, 0.617), diff --git a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl index a7d5294b8c4..66f43faba79 100644 --- a/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_point_uniform_color_aa_frag.glsl @@ -6,7 +6,7 @@ void main() /* transparent outside of point * --- 0 --- - * smooth transition + * smooth transition * --- 1 --- * pure point color * ... diff --git a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl index d31d160e776..f4ab1a571e0 100644 --- a/source/blender/gpu/shaders/gpu_shader_text_frag.glsl +++ b/source/blender/gpu/shaders/gpu_shader_text_frag.glsl @@ -73,7 +73,7 @@ void main() if (interp_size == 1) { /* NOTE(Metal): Declaring constant array in function scope to avoid increasing local shader - * memory pressure.*/ + * memory pressure. */ const vec2 offsets4[4] = vec2[4]( vec2(-0.5, 0.5), vec2(0.5, 0.5), vec2(-0.5, -0.5), vec2(-0.5, -0.5)); @@ -87,7 +87,7 @@ void main() } else { /* NOTE(Metal): Declaring constant array in function scope to avoid increasing local shader - * memory pressure.*/ + * memory pressure. */ const vec2 offsets16[16] = vec2[16](vec2(-1.5, 1.5), vec2(-0.5, 1.5), vec2(0.5, 1.5), diff --git a/source/blender/gpu/tests/gpu_storage_buffer_test.cc b/source/blender/gpu/tests/gpu_storage_buffer_test.cc index 38004391dd8..79b23e29407 100644 --- a/source/blender/gpu/tests/gpu_storage_buffer_test.cc +++ b/source/blender/gpu/tests/gpu_storage_buffer_test.cc @@ -37,7 +37,7 @@ static void test_gpu_storage_buffer_create_update_read() read_data.resize(SIZE, 0); GPU_storagebuf_read(ssbo, read_data.data()); - /* Check if data is the same.*/ + /* Check if data is the same. */ for (int i : IndexRange(SIZE)) { EXPECT_EQ(data[i], read_data[i]); } @@ -47,4 +47,4 @@ static void test_gpu_storage_buffer_create_update_read() GPU_TEST(gpu_storage_buffer_create_update_read); -} // namespace blender::gpu::tests \ No newline at end of file +} // namespace blender::gpu::tests diff --git a/source/blender/gpu/vulkan/vk_command_buffer.hh b/source/blender/gpu/vulkan/vk_command_buffer.hh index 75c3a5f8a79..ff360711505 100644 --- a/source/blender/gpu/vulkan/vk_command_buffer.hh +++ b/source/blender/gpu/vulkan/vk_command_buffer.hh @@ -14,9 +14,9 @@ namespace blender::gpu { class VKBuffer; class VKTexture; -/** Command buffer to keep track of the life-time of a command buffer.*/ +/** Command buffer to keep track of the life-time of a command buffer. */ class VKCommandBuffer : NonCopyable, NonMovable { - /** None owning handle to the command buffer and device. Handle is owned by `GHOST_ContextVK`.*/ + /** None owning handle to the command buffer and device. Handle is owned by `GHOST_ContextVK`. */ VkDevice vk_device_ = VK_NULL_HANDLE; VkCommandBuffer vk_command_buffer_ = VK_NULL_HANDLE; VkQueue vk_queue_ = VK_NULL_HANDLE; diff --git a/source/blender/gpu/vulkan/vk_common.cc b/source/blender/gpu/vulkan/vk_common.cc index 1a8dc6769cd..08d46962418 100644 --- a/source/blender/gpu/vulkan/vk_common.cc +++ b/source/blender/gpu/vulkan/vk_common.cc @@ -298,7 +298,7 @@ VkImageViewType to_vk_image_view_type(const eGPUTextureType type) VkComponentMapping to_vk_component_mapping(const eGPUTextureFormat /*format*/) { /* TODO: this should map to OpenGL defaults based on the eGPUTextureFormat. The implementation of - * this function will be implemented when implementing other parts of VKTexture.*/ + * this function will be implemented when implementing other parts of VKTexture. */ VkComponentMapping component_mapping; component_mapping.r = VK_COMPONENT_SWIZZLE_R; component_mapping.g = VK_COMPONENT_SWIZZLE_G; diff --git a/source/blender/gpu/vulkan/vk_context.cc b/source/blender/gpu/vulkan/vk_context.cc index 224b03fb64c..87e94a557a4 100644 --- a/source/blender/gpu/vulkan/vk_context.cc +++ b/source/blender/gpu/vulkan/vk_context.cc @@ -36,7 +36,7 @@ VKContext::VKContext(void *ghost_window, void *ghost_context) VmaAllocatorCreateInfo info = {}; /* Should use same vulkan version as GHOST (1.2), but set to 1.0 as 1.2 requires * correct extensions and functions to be found by VMA, which isn't working as expected and - * requires more research. To continue development we lower the API to version 1.0.*/ + * requires more research. To continue development we lower the API to version 1.0. */ info.vulkanApiVersion = VK_API_VERSION_1_0; info.physicalDevice = vk_physical_device_; info.device = vk_device_; diff --git a/source/blender/gpu/vulkan/vk_descriptor_set.cc b/source/blender/gpu/vulkan/vk_descriptor_set.cc index 81b267066a9..ca180322bb1 100644 --- a/source/blender/gpu/vulkan/vk_descriptor_set.cc +++ b/source/blender/gpu/vulkan/vk_descriptor_set.cc @@ -18,7 +18,7 @@ namespace blender::gpu { VKDescriptorSet::~VKDescriptorSet() { if (vk_descriptor_set_ != VK_NULL_HANDLE) { - /* Handle should be given back to the pool.*/ + /* Handle should be given back to the pool. */ VKContext &context = *VKContext::get(); context.descriptor_pools_get().free(*this); BLI_assert(vk_descriptor_set_ == VK_NULL_HANDLE); diff --git a/source/blender/gpu/vulkan/vk_descriptor_set.hh b/source/blender/gpu/vulkan/vk_descriptor_set.hh index e81e0bfd9dc..68e661a3911 100644 --- a/source/blender/gpu/vulkan/vk_descriptor_set.hh +++ b/source/blender/gpu/vulkan/vk_descriptor_set.hh @@ -102,7 +102,7 @@ class VKDescriptorSet : NonCopyable { VkDescriptorPool vk_descriptor_pool_ = VK_NULL_HANDLE; VkDescriptorSet vk_descriptor_set_ = VK_NULL_HANDLE; - /** A list of bindings that needs to be updated.*/ + /** A list of bindings that needs to be updated. */ Vector bindings_; public: diff --git a/source/blender/gpu/vulkan/vk_shader.cc b/source/blender/gpu/vulkan/vk_shader.cc index cee42faa656..e5947383a09 100644 --- a/source/blender/gpu/vulkan/vk_shader.cc +++ b/source/blender/gpu/vulkan/vk_shader.cc @@ -681,7 +681,7 @@ bool VKShader::finalize(const shader::ShaderCreateInfo *info) } /* TODO we might need to move the actual pipeline construction to a later stage as the graphics - * pipeline requires more data before it can be constructed.*/ + * pipeline requires more data before it can be constructed. */ bool result; if (is_graphics_shader()) { BLI_assert((fragment_module_ != VK_NULL_HANDLE && info->tf_type_ == GPU_SHADER_TFB_NONE) || diff --git a/source/blender/gpu/vulkan/vk_shader_interface.cc b/source/blender/gpu/vulkan/vk_shader_interface.cc index 71b6a600adf..50cbc8e3bb0 100644 --- a/source/blender/gpu/vulkan/vk_shader_interface.cc +++ b/source/blender/gpu/vulkan/vk_shader_interface.cc @@ -40,7 +40,7 @@ void VKShaderInterface::init(const shader::ShaderCreateInfo &info) break; } } - /* Make sure that the image slots don't overlap with the sampler slots.*/ + /* Make sure that the image slots don't overlap with the sampler slots. */ image_offset_++; int32_t input_tot_len = ubo_len_ + uniform_len_ + ssbo_len_; @@ -99,7 +99,7 @@ void VKShaderInterface::init(const shader::ShaderCreateInfo &info) builtin_blocks_[u] = (block != nullptr) ? block->binding : -1; } - /* Determine the descriptor set locations after the inputs have been sorted.*/ + /* Determine the descriptor set locations after the inputs have been sorted. */ descriptor_set_locations_ = Array(input_tot_len); uint32_t descriptor_set_location = 0; for (ShaderCreateInfo::Resource &res : all_resources) { diff --git a/source/blender/gpu/vulkan/vk_texture.cc b/source/blender/gpu/vulkan/vk_texture.cc index a52c99cc061..281996e797c 100644 --- a/source/blender/gpu/vulkan/vk_texture.cc +++ b/source/blender/gpu/vulkan/vk_texture.cc @@ -52,7 +52,7 @@ void VKTexture::mip_range_set(int /*min*/, int /*max*/) void *VKTexture::read(int mip, eGPUDataFormat format) { - /* Vulkan images cannot be directly mapped to host memory and requires a staging buffer.*/ + /* Vulkan images cannot be directly mapped to host memory and requires a staging buffer. */ VKContext &context = *VKContext::get(); VKBuffer staging_buffer; @@ -85,7 +85,7 @@ void *VKTexture::read(int mip, eGPUDataFormat format) void *data = MEM_mallocN(host_memory_size, __func__); - /* TODO: add conversion when data format is different.*/ + /* TODO: add conversion when data format is different. */ BLI_assert_msg(device_memory_size == host_memory_size, "Memory data conversions not implemented yet"); @@ -120,7 +120,7 @@ bool VKTexture::init_internal() { /* Initialization can only happen after the usage is known. By the current API this isn't set * at this moment, so we cannot initialize here. The initialization is postponed until the - * allocation of the texture on the device.*/ + * allocation of the texture on the device. */ return true; } @@ -193,7 +193,7 @@ bool VKTexture::allocate() return false; } - /* Promote image to the correct layout.*/ + /* Promote image to the correct layout. */ VkImageMemoryBarrier barrier{}; barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; diff --git a/source/blender/gpu/vulkan/vk_texture.hh b/source/blender/gpu/vulkan/vk_texture.hh index e0b1fe84ec9..9c32d933685 100644 --- a/source/blender/gpu/vulkan/vk_texture.hh +++ b/source/blender/gpu/vulkan/vk_texture.hh @@ -58,7 +58,7 @@ class VKTexture : public Texture { bool init_internal(const GPUTexture *src, int mip_offset, int layer_offset) override; private: - /** Is this texture already allocated on device.*/ + /** Is this texture already allocated on device. */ bool is_allocated(); /** * Allocate the texture of the device. Result is `true` when texture is successfully allocated diff --git a/source/blender/imbuf/intern/transform.cc b/source/blender/imbuf/intern/transform.cc index a9f960acda9..312ed69db00 100644 --- a/source/blender/imbuf/intern/transform.cc +++ b/source/blender/imbuf/intern/transform.cc @@ -117,7 +117,7 @@ struct TransformUserData { return; } - /* Transform the src_crop to the destination buffer with a margin.*/ + /* Transform the src_crop to the destination buffer with a margin. */ const int2 margin(2); rcti rect; BLI_rcti_init_minmax(&rect); @@ -133,7 +133,7 @@ struct TransformUserData { BLI_rcti_do_minmax_v(&rect, int2(dst_co) - margin); } - /* Clamp rect to fit inside the image buffer.*/ + /* Clamp rect to fit inside the image buffer. */ rcti dest_rect; BLI_rcti_init(&dest_rect, 0, dst->x, 0, dst->y); BLI_rcti_isect(&rect, &dest_rect, &rect); diff --git a/source/blender/io/alembic/intern/abc_util.h b/source/blender/io/alembic/intern/abc_util.h index 4db90820757..285527db039 100644 --- a/source/blender/io/alembic/intern/abc_util.h +++ b/source/blender/io/alembic/intern/abc_util.h @@ -23,9 +23,9 @@ std::string get_id_name(const Object *const ob); std::string get_valid_abc_name(const char *name); /** * \brief get_object_dag_path_name returns the name under which the object - * will be exported in the Alembic file. It is of the form - * "[../grandparent/]parent/object" if dupli_parent is NULL, or - * "dupli_parent/[../grandparent/]parent/object" otherwise. + * will be exported in the Alembic file. It is of the form + * "[../grandparent/]parent/object" if dupli_parent is NULL, or + * "dupli_parent/[../grandparent/]parent/object" otherwise. * \param ob: * \param dupli_parent: * \return diff --git a/source/blender/io/collada/Materials.cpp b/source/blender/io/collada/Materials.cpp index cf63722c369..d09b3b79fa7 100644 --- a/source/blender/io/collada/Materials.cpp +++ b/source/blender/io/collada/Materials.cpp @@ -173,9 +173,8 @@ void MaterialNode::set_alpha(COLLADAFW::EffectCommon::OpaqueMode mode, COLLADAFW::ColorOrTexture &cot, COLLADAFW::FloatOrParam &val) { - /* Handling the alpha value according to the Collada 1.4 reference guide - * see page 7-5 Determining Transparency (Opacity) - */ + /* Handling the alpha value according to the Collada 1.4 reference guide + * see page 7-5 Determining Transparency (Opacity). */ if (effect == nullptr) { return; diff --git a/source/blender/io/collada/SkinInfo.cpp b/source/blender/io/collada/SkinInfo.cpp index b4615635318..9d109d1dee0 100644 --- a/source/blender/io/collada/SkinInfo.cpp +++ b/source/blender/io/collada/SkinInfo.cpp @@ -248,7 +248,7 @@ void SkinInfo::link_armature(bContext *C, * ^ bone index can be -1 meaning weight toward bind shape, how to express this in Blender? * * for each vertex in weight indices - * for each bone index in vertex + * for each bone index in vertex * add vertex to group at group index * treat group index -1 specially * diff --git a/source/blender/io/usd/intern/usd_capi_export.cc b/source/blender/io/usd/intern/usd_capi_export.cc index 9258934030b..ca00c69c6ac 100644 --- a/source/blender/io/usd/intern/usd_capi_export.cc +++ b/source/blender/io/usd/intern/usd_capi_export.cc @@ -213,7 +213,7 @@ static void export_startjob(void *customdata, /* Set the default prim if it doesn't exist */ if (!usd_stage->GetDefaultPrim()) { /* Use TraverseAll since it's guaranteed to be depth first and will get the first top level - * prim, and is less verbose than getting the PseudoRoot + iterating its children.*/ + * prim, and is less verbose than getting the PseudoRoot + iterating its children. */ for (auto prim : usd_stage->TraverseAll()) { usd_stage->SetDefaultPrim(prim); break; diff --git a/source/blender/io/usd/intern/usd_reader_material.h b/source/blender/io/usd/intern/usd_reader_material.h index 6fd6d2f1213..7eedcf9eb12 100644 --- a/source/blender/io/usd/intern/usd_reader_material.h +++ b/source/blender/io/usd/intern/usd_reader_material.h @@ -146,8 +146,8 @@ void build_material_map(const Main *bmain, std::map *r_ * Returns null if no such material exists. * * \param mat_map Map a material name to a Blender material. Note that the name key - * might be the Blender material name modified to be a valid USD identifier, - * to match the material names in the imported USD. + * might be the Blender material name modified to be a valid USD identifier, + * to match the material names in the imported USD. * \param usd_path_to_mat_name Map a USD material path to the imported Blender material name. * * The usd_path_to_mat_name is needed to determine the name of the Blender diff --git a/source/blender/io/usd/intern/usd_writer_mesh.cc b/source/blender/io/usd/intern/usd_writer_mesh.cc index 8363f9f8b35..8264fb0dd10 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.cc +++ b/source/blender/io/usd/intern/usd_writer_mesh.cc @@ -381,9 +381,9 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context, } if (mesh_material_bound) { - /* USD will require that prims with material bindings have the MaterialBindingAPI applied + /* USD will require that prims with material bindings have the #MaterialBindingAPI applied * schema. While Bind() above will create the binding attribute, Apply() needs to be called as - * well to add the MaterialBindingAPI schema to the prim itself.*/ + * well to add the #MaterialBindingAPI schema to the prim itself. */ material_binding_api.Apply(mesh_prim); } else { @@ -416,7 +416,7 @@ void USDGenericMeshWriter::assign_materials(const HierarchyContext &context, auto subset_prim = usd_face_subset.GetPrim(); auto subset_material_api = pxr::UsdShadeMaterialBindingAPI(subset_prim); subset_material_api.Bind(usd_material); - /* Apply the MaterialBindingAPI applied schema, as required by USD.*/ + /* Apply the #MaterialBindingAPI applied schema, as required by USD. */ subset_material_api.Apply(subset_prim); } } diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc index edd46ccd690..66253cf4373 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc @@ -175,11 +175,11 @@ static const char *parse_vertex_index(const char *p, const char *end, size_t n_e /** * Parse a polyline and add its line segments as loose edges. * We support the following polyline specifications: - * - "l v1/vt1 v2/vt2 ..." - * - "l v1 v2 ..." - * If a line only has one vertex (technically not allowed by the spec), - * no line is created, but the vertex will be added to - * the mesh even if it is unconnected. + * - "l v1/vt1 v2/vt2 ..." + * - "l v1 v2 ..." + * If a line only has one vertex (technically not allowed by the spec), + * no line is created, but the vertex will be added to + * the mesh even if it is unconnected. */ static void geom_add_polyline(Geometry *geom, const char *p, diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index a5fea870a9b..44e8ea517cf 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -272,8 +272,10 @@ enum { /** User cannot change that override operation. */ IDOVERRIDE_LIBRARY_FLAG_LOCKED = 1 << 1, - /** For overrides of ID pointers: this override still matches (follows) the hierarchy of the - * reference linked data. */ + /** + * For overrides of ID pointers: this override still matches (follows) the hierarchy of the + * reference linked data. + */ IDOVERRIDE_LIBRARY_FLAG_IDPOINTER_MATCH_REFERENCE = 1 << 8, }; diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index 481c9f5e673..d1b853132e8 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -678,8 +678,10 @@ typedef struct bAction { int idroot; char _pad[4]; - /** Start and end of the manually set intended playback frame range. Used by UI and - * some editing tools, but doesn't directly affect animation evaluation in any way. */ + /** + * Start and end of the manually set intended playback frame range. Used by UI and + * some editing tools, but doesn't directly affect animation evaluation in any way. + */ float frame_start, frame_end; PreviewImage *preview; diff --git a/source/blender/makesdna/DNA_anim_types.h b/source/blender/makesdna/DNA_anim_types.h index 0ab14988e40..c788109add8 100644 --- a/source/blender/makesdna/DNA_anim_types.h +++ b/source/blender/makesdna/DNA_anim_types.h @@ -374,8 +374,10 @@ typedef enum eDriverTarget_RotationMode { DTAR_ROTMODE_QUATERNION, - /** Implements the very common Damped Track + child trick to decompose - * rotation into bending followed by twist around the remaining axis. */ + /** + * Implements the very common Damped Track + child trick to decompose + * rotation into bending followed by twist around the remaining axis. + */ DTAR_ROTMODE_SWING_TWIST_X, DTAR_ROTMODE_SWING_TWIST_Y, DTAR_ROTMODE_SWING_TWIST_Z, diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 572048079ca..f6347fd1193 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2075,7 +2075,7 @@ static bool get_uv_index_and_layer(const PointerRNA *ptr, } } /* This can happen if the Customdata arrays were re-allocated between obtaining the - * python object and accessing it.*/ + * Python object and accessing it. */ return false; } diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.cc b/source/blender/modifiers/intern/MOD_surfacedeform.cc index bf8eb5acaf2..5c6fdebbf79 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.cc +++ b/source/blender/modifiers/intern/MOD_surfacedeform.cc @@ -105,11 +105,15 @@ struct SDefBindPoly { float weight_dist_proj; float weight_dist; float weight; - /** Distances from the centroid to edges flanking the corner vertex, used to penalize - * small or long and narrow faces in favor of bigger and more square ones. */ + /** + * Distances from the centroid to edges flanking the corner vertex, used to penalize + * small or long and narrow faces in favor of bigger and more square ones. + */ float scales[2]; - /** Distance weight from the corner vertex to the chord line, used to penalize - * cases with the three consecutive vertices being nearly in line. */ + /** + * Distance weight from the corner vertex to the chord line, used to penalize + * cases with the three consecutive vertices being nearly in line. + */ float scale_mid; /** Center of `coords` */ float centroid[3]; @@ -119,18 +123,24 @@ struct SDefBindPoly { * The calculated normal of coords (could be shared between faces). */ float normal[3]; - /** Vectors pointing from the centroid to the midpoints of the two edges - * flanking the corner vertex. */ + /** + * Vectors pointing from the centroid to the midpoints of the two edges + * flanking the corner vertex. + */ float cent_edgemid_vecs_v2[2][2]; /** Angle between the cent_edgemid_vecs_v2 vectors. */ float edgemid_angle; - /** Angles between the centroid-to-point and cent_edgemid_vecs_v2 vectors. - * Positive values measured towards the corner; clamped non-negative. */ + /** + * Angles between the centroid-to-point and cent_edgemid_vecs_v2 vectors. + * Positive values measured towards the corner; clamped non-negative. + */ float point_edgemid_angles[2]; /** Angles between the centroid-to-corner and cent_edgemid_vecs_v2 vectors. */ float corner_edgemid_angles[2]; - /** Weight of the bind mode based on the corner and two adjacent vertices, - * versus the one based on the centroid and the dominant edge. */ + /** + * Weight of the bind mode based on the corner and two adjacent vertices, + * versus the one based on the centroid and the dominant edge. + */ float dominant_angle_weight; /** Index of the input polygon. */ uint index; diff --git a/source/blender/render/intern/texture_margin.cc b/source/blender/render/intern/texture_margin.cc index e0e2781b562..c353f5f8975 100644 --- a/source/blender/render/intern/texture_margin.cc +++ b/source/blender/render/intern/texture_margin.cc @@ -574,7 +574,7 @@ static void generate_margin(ImBuf *ibuf, char *tmpmask = (char *)MEM_dupallocN(mask); /* Extend (with averaging) by 2 pixels. Those will be overwritten, but it - * helps linear interpolations on the edges of polygons. */ + * helps linear interpolations on the edges of polygons. */ IMB_filter_extend(ibuf, tmpmask, 2); MEM_freeN(tmpmask); diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 46213bea120..65c6379a5fa 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -534,7 +534,7 @@ void WM_window_set_dpi(const wmWindow *win) U.inv_dpi_fac = 1.0f / U.dpi_fac; /* Widget unit is 20 pixels at 1X scale. This consists of 18 user-scaled units plus - * left and right borders of line-width (pixelsize). */ + * left and right borders of line-width (pixel-size). */ U.widget_unit = (int)roundf(18.0f * U.dpi_fac) + (2 * pixelsize); }