diff --git a/source/blender/editors/io/io_collada.cc b/source/blender/editors/io/io_collada.cc index 23c6f21693e..3eaff096f4a 100644 --- a/source/blender/editors/io/io_collada.cc +++ b/source/blender/editors/io/io_collada.cc @@ -290,7 +290,8 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) uiItemR(sub, imfptr, "export_mesh_type_selection", 0, "", ICON_NONE); if (RNA_boolean_get(imfptr, "include_animations")) { - uiItemR(col, imfptr, "export_animation_transformation_type_selection", 0, nullptr, ICON_NONE); + uiItemR( + col, imfptr, "export_animation_transformation_type_selection", 0, nullptr, ICON_NONE); } else { uiItemR(col, imfptr, "export_object_transformation_type_selection", 0, nullptr, ICON_NONE); @@ -317,7 +318,8 @@ static void uiCollada_exportSettings(uiLayout *layout, PointerRNA *imfptr) uiLayoutSetActive(row, include_animations && animation_type == BC_ANIMATION_EXPORT_SAMPLES); if (RNA_boolean_get(imfptr, "include_animations")) { - uiItemR(box, imfptr, "export_animation_transformation_type_selection", 0, nullptr, ICON_NONE); + uiItemR( + box, imfptr, "export_animation_transformation_type_selection", 0, nullptr, ICON_NONE); } else { uiItemR(box, imfptr, "export_object_transformation_type_selection", 0, nullptr, ICON_NONE); diff --git a/source/blender/editors/io/io_gpencil_import.cc b/source/blender/editors/io/io_gpencil_import.cc index 76f824f9746..e5a7076c06c 100644 --- a/source/blender/editors/io/io_gpencil_import.cc +++ b/source/blender/editors/io/io_gpencil_import.cc @@ -86,7 +86,7 @@ static int wm_gpencil_import_svg_exec(bContext *C, wmOperator *op) const int resolution = RNA_int_get(op->ptr, "resolution"); const float scale = RNA_float_get(op->ptr, "scale"); - GpencilIOParams params {}; + GpencilIOParams params{}; params.C = C; params.region = region; params.v3d = v3d; diff --git a/source/blender/editors/sculpt_paint/paint_ops.cc b/source/blender/editors/sculpt_paint/paint_ops.cc index ba1ef7ba243..c0d1a81fc06 100644 --- a/source/blender/editors/sculpt_paint/paint_ops.cc +++ b/source/blender/editors/sculpt_paint/paint_ops.cc @@ -391,8 +391,7 @@ static int palette_color_add_exec(bContext *C, wmOperator * /*op*/) PAINT_MODE_TEXTURE_3D, PAINT_MODE_TEXTURE_2D, PAINT_MODE_VERTEX, - PAINT_MODE_SCULPT)) - { + PAINT_MODE_SCULPT)) { copy_v3_v3(color->rgb, BKE_brush_color_get(scene, brush)); color->value = 0.0; } diff --git a/source/blender/gpu/metal/mtl_immediate.mm b/source/blender/gpu/metal/mtl_immediate.mm index b2e358eaf29..81b4f3d156d 100644 --- a/source/blender/gpu/metal/mtl_immediate.mm +++ b/source/blender/gpu/metal/mtl_immediate.mm @@ -382,8 +382,7 @@ void MTLImmediate::end() /* SSBO vertex fetch - Nullify elements buffer. */ if (rps.cached_vertex_buffer_bindings[MTL_SSBO_VERTEX_FETCH_IBO_INDEX].metal_buffer == - nil) - { + nil) { rps.bind_vertex_buffer(null_buffer, 0, MTL_SSBO_VERTEX_FETCH_IBO_INDEX); } diff --git a/source/blender/gpu/metal/mtl_memory.mm b/source/blender/gpu/metal/mtl_memory.mm index e8e86a5d4d3..5f3f41dfed7 100644 --- a/source/blender/gpu/metal/mtl_memory.mm +++ b/source/blender/gpu/metal/mtl_memory.mm @@ -306,18 +306,19 @@ void MTLBufferPool::update_memory_pools() deletion_time_threshold_s = 2; } else - /* Spare pool memory >= 1GB. */ - if (allocations_in_pool_ >= MEMORY_SIZE_1GB) { - deletion_time_threshold_s = 4; - } - /* Spare pool memory >= 512MB.*/ - else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) { - deletion_time_threshold_s = 15; - } - /* Spare pool memory >= 256MB. */ - else if (allocations_in_pool_ >= MEMORY_SIZE_256MB) { - deletion_time_threshold_s = 60; - } + /* Spare pool memory >= 1GB. */ + if (allocations_in_pool_ >= MEMORY_SIZE_1GB) + { + deletion_time_threshold_s = 4; + } + /* Spare pool memory >= 512MB.*/ + else if (allocations_in_pool_ >= MEMORY_SIZE_512MB) { + deletion_time_threshold_s = 15; + } + /* Spare pool memory >= 256MB. */ + else if (allocations_in_pool_ >= MEMORY_SIZE_256MB) { + deletion_time_threshold_s = 60; + } if (time_passed > deletion_time_threshold_s) { diff --git a/source/blender/gpu/metal/mtl_shader.mm b/source/blender/gpu/metal/mtl_shader.mm index 0cf0d929f28..4f5e483b232 100644 --- a/source/blender/gpu/metal/mtl_shader.mm +++ b/source/blender/gpu/metal/mtl_shader.mm @@ -338,8 +338,7 @@ bool MTLShader::finalize(const shader::ShaderCreateInfo *info) if (error) { /* Only exit out if genuine error and not warning. */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) - { + NSNotFound) { const char *errors_c_str = [[error localizedDescription] UTF8String]; const char *sources_c_str = shd_builder_->glsl_fragment_source_.c_str(); @@ -877,8 +876,7 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state( } else { for (const uint i : - IndexRange(pipeline_descriptor.vertex_descriptor.max_attribute_value + 1)) - { + IndexRange(pipeline_descriptor.vertex_descriptor.max_attribute_value + 1)) { /* Metal back-end attribute descriptor state. */ const MTLVertexAttributeDescriptorPSO &attribute_desc = @@ -1071,8 +1069,7 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state( bool null_pointsize = true; float MTL_pointsize = pipeline_descriptor.point_size; if (pipeline_descriptor.vertex_descriptor.prim_topology_class == - MTLPrimitiveTopologyClassPoint) - { + MTLPrimitiveTopologyClassPoint) { /* `if pointsize is > 0.0`, PROGRAM_POINT_SIZE is enabled, and `gl_PointSize` shader keyword * overrides the value. Otherwise, if < 0.0, use global constant point size. */ if (MTL_pointsize < 0.0) { @@ -1144,8 +1141,7 @@ MTLRenderPipelineStateInstance *MTLShader::bake_pipeline_state( /* Setup pixel format state */ for (int color_attachment = 0; color_attachment < GPU_FB_MAX_COLOR_ATTACHMENT; - color_attachment++) - { + color_attachment++) { /* Fetch color attachment pixel format in back-end pipeline state. */ MTLPixelFormat pixel_format = pipeline_descriptor.color_attachment_format[color_attachment]; /* Populate MTL API PSO attachment descriptor. */ @@ -1386,8 +1382,7 @@ bool MTLShader::bake_compute_pipeline_state(MTLContext *ctx) /* Only exit out if genuine error and not warning */ if ([[error localizedDescription] rangeOfString:@"Compilation succeeded"].location == - NSNotFound) - { + NSNotFound) { BLI_assert(false); return false; }