diff --git a/source/blender/compositor/COM_compositor.hh b/source/blender/compositor/COM_compositor.hh index cd644a6a78e..89d26243bd4 100644 --- a/source/blender/compositor/COM_compositor.hh +++ b/source/blender/compositor/COM_compositor.hh @@ -4,7 +4,6 @@ #pragma once -#include "DNA_color_types.h" #include "DNA_node_types.h" namespace blender::compositor { diff --git a/source/blender/compositor/COM_context.hh b/source/blender/compositor/COM_context.hh index 55fc813ca75..48b0690a94c 100644 --- a/source/blender/compositor/COM_context.hh +++ b/source/blender/compositor/COM_context.hh @@ -12,7 +12,6 @@ #include "DNA_vec_types.h" #include "GPU_shader.hh" -#include "GPU_texture.hh" #include "COM_domain.hh" #include "COM_meta_data.hh" diff --git a/source/blender/compositor/COM_domain.hh b/source/blender/compositor/COM_domain.hh index 3067a775201..e9affd4468c 100644 --- a/source/blender/compositor/COM_domain.hh +++ b/source/blender/compositor/COM_domain.hh @@ -143,7 +143,6 @@ class Domain { * RealizationOptions struct for more information. */ RealizationOptions realization_options; - public: /* A size only constructor that sets the transformation to identity. */ Domain(const int2 &size); diff --git a/source/blender/compositor/COM_evaluator.hh b/source/blender/compositor/COM_evaluator.hh index 40c922f1f6b..9ee40360cb7 100644 --- a/source/blender/compositor/COM_evaluator.hh +++ b/source/blender/compositor/COM_evaluator.hh @@ -8,15 +8,12 @@ #include "BLI_vector.hh" -#include "DNA_node_types.h" - #include "NOD_derived_node_tree.hh" #include "COM_compile_state.hh" #include "COM_context.hh" #include "COM_node_operation.hh" #include "COM_operation.hh" -#include "COM_shader_operation.hh" namespace blender::compositor { diff --git a/source/blender/compositor/COM_multi_function_procedure_operation.hh b/source/blender/compositor/COM_multi_function_procedure_operation.hh index 02e36672007..4f212a42f42 100644 --- a/source/blender/compositor/COM_multi_function_procedure_operation.hh +++ b/source/blender/compositor/COM_multi_function_procedure_operation.hh @@ -7,9 +7,7 @@ #include #include "BLI_map.hh" -#include "BLI_string_ref.hh" #include "BLI_vector.hh" -#include "BLI_vector_set.hh" #include "FN_multi_function_procedure.hh" #include "FN_multi_function_procedure_builder.hh" @@ -19,7 +17,6 @@ #include "NOD_multi_function.hh" #include "COM_context.hh" -#include "COM_operation.hh" #include "COM_pixel_operation.hh" #include "COM_scheduler.hh" diff --git a/source/blender/compositor/COM_profiler.hh b/source/blender/compositor/COM_profiler.hh index 1ae05d5708c..9ec95897316 100644 --- a/source/blender/compositor/COM_profiler.hh +++ b/source/blender/compositor/COM_profiler.hh @@ -9,8 +9,6 @@ #include "DNA_node_types.h" -#include "NOD_derived_node_tree.hh" - namespace blender::compositor { class Context; diff --git a/source/blender/compositor/COM_realize_on_domain_operation.hh b/source/blender/compositor/COM_realize_on_domain_operation.hh index 60389110f2a..a32477168e1 100644 --- a/source/blender/compositor/COM_realize_on_domain_operation.hh +++ b/source/blender/compositor/COM_realize_on_domain_operation.hh @@ -4,8 +4,6 @@ #pragma once -#include "GPU_shader.hh" - #include "COM_context.hh" #include "COM_domain.hh" #include "COM_input_descriptor.hh" diff --git a/source/blender/compositor/COM_result.hh b/source/blender/compositor/COM_result.hh index 90c5feff5a9..3edd17e8d5d 100644 --- a/source/blender/compositor/COM_result.hh +++ b/source/blender/compositor/COM_result.hh @@ -8,7 +8,6 @@ #include #include "BLI_assert.h" -#include "BLI_math_base.hh" #include "BLI_math_interp.hh" #include "BLI_math_matrix_types.hh" #include "BLI_math_vector.h" @@ -178,7 +177,6 @@ class Result { * written to file. */ MetaData meta_data; - public: /* Construct a result within the given context. */ Result(Context &context); diff --git a/source/blender/compositor/COM_shader_operation.hh b/source/blender/compositor/COM_shader_operation.hh index 6d06591ee10..9d0fe78c329 100644 --- a/source/blender/compositor/COM_shader_operation.hh +++ b/source/blender/compositor/COM_shader_operation.hh @@ -7,8 +7,6 @@ #include #include "BLI_map.hh" -#include "BLI_string_ref.hh" -#include "BLI_vector_set.hh" #include "GPU_material.hh" #include "GPU_shader.hh" @@ -18,7 +16,6 @@ #include "NOD_derived_node_tree.hh" #include "COM_context.hh" -#include "COM_operation.hh" #include "COM_pixel_operation.hh" #include "COM_scheduler.hh" @@ -73,7 +70,7 @@ class ShaderOperation : public PixelOperation { ShaderOperation(Context &context, PixelCompileUnit &compile_unit, const Schedule &schedule); /* Free the GPU material. */ - ~ShaderOperation(); + ~ShaderOperation() override; /* Allocate the output results, bind the shader and all its needed resources, then dispatch the * shader. */ diff --git a/source/blender/compositor/algorithms/intern/compute_preview.cc b/source/blender/compositor/algorithms/intern/compute_preview.cc index 82bb7433e86..e5c89a0111f 100644 --- a/source/blender/compositor/algorithms/intern/compute_preview.cc +++ b/source/blender/compositor/algorithms/intern/compute_preview.cc @@ -4,7 +4,6 @@ #include "BLI_index_range.hh" #include "BLI_math_color.h" -#include "BLI_math_vector.hh" #include "BLI_math_vector_types.hh" #include "BLI_task.hh" @@ -14,6 +13,7 @@ #include "IMB_imbuf.hh" #include "GPU_shader.hh" +#include "GPU_state.hh" #include "GPU_texture.hh" #include "BKE_node.hh" @@ -116,9 +116,7 @@ static int2 compute_preview_size(int2 size) if (size.x > size.y) { return int2(greater_dimension_size, int(greater_dimension_size * (float(size.y) / size.x))); } - else { - return int2(int(greater_dimension_size * (float(size.x) / size.y)), greater_dimension_size); - } + return int2(int(greater_dimension_size * (float(size.x) / size.y)), greater_dimension_size); } void compute_preview(Context &context, const DNode &node, const Result &input_result) diff --git a/source/blender/compositor/algorithms/intern/deriche_gaussian_blur.cc b/source/blender/compositor/algorithms/intern/deriche_gaussian_blur.cc index 836e1d776d6..5328706ef9b 100644 --- a/source/blender/compositor/algorithms/intern/deriche_gaussian_blur.cc +++ b/source/blender/compositor/algorithms/intern/deriche_gaussian_blur.cc @@ -3,7 +3,6 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ #include "BLI_assert.h" -#include "BLI_math_base.hh" #include "BLI_math_vector.hh" #include "BLI_math_vector_types.hh" diff --git a/source/blender/compositor/algorithms/intern/extract_alpha.cc b/source/blender/compositor/algorithms/intern/extract_alpha.cc index 6b97077a907..7770906970f 100644 --- a/source/blender/compositor/algorithms/intern/extract_alpha.cc +++ b/source/blender/compositor/algorithms/intern/extract_alpha.cc @@ -2,9 +2,6 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "BLI_index_range.hh" -#include "BLI_task.hh" - #include "GPU_shader.hh" #include "COM_context.hh" diff --git a/source/blender/compositor/algorithms/intern/gamma_correct.cc b/source/blender/compositor/algorithms/intern/gamma_correct.cc index a389aaab221..c85a3f7e387 100644 --- a/source/blender/compositor/algorithms/intern/gamma_correct.cc +++ b/source/blender/compositor/algorithms/intern/gamma_correct.cc @@ -2,8 +2,6 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "BLI_math_base.hh" - #include "GPU_shader.hh" #include "COM_context.hh" diff --git a/source/blender/compositor/algorithms/intern/morphological_distance.cc b/source/blender/compositor/algorithms/intern/morphological_distance.cc index c8fb32ebfd9..aaebad584fe 100644 --- a/source/blender/compositor/algorithms/intern/morphological_distance.cc +++ b/source/blender/compositor/algorithms/intern/morphological_distance.cc @@ -8,7 +8,6 @@ #include "BLI_math_vector_types.hh" #include "GPU_shader.hh" -#include "GPU_texture.hh" #include "COM_context.hh" #include "COM_result.hh" diff --git a/source/blender/compositor/algorithms/intern/morphological_distance_feather.cc b/source/blender/compositor/algorithms/intern/morphological_distance_feather.cc index 31863641e66..1cad0d0dbf0 100644 --- a/source/blender/compositor/algorithms/intern/morphological_distance_feather.cc +++ b/source/blender/compositor/algorithms/intern/morphological_distance_feather.cc @@ -6,7 +6,6 @@ #include "BLI_math_vector_types.hh" #include "GPU_shader.hh" -#include "GPU_texture.hh" #include "COM_algorithm_morphological_distance_feather.hh" #include "COM_context.hh" diff --git a/source/blender/compositor/algorithms/intern/parallel_reduction.cc b/source/blender/compositor/algorithms/intern/parallel_reduction.cc index b0c0c7a64cc..0721720dc80 100644 --- a/source/blender/compositor/algorithms/intern/parallel_reduction.cc +++ b/source/blender/compositor/algorithms/intern/parallel_reduction.cc @@ -15,6 +15,7 @@ #include "GPU_compute.hh" #include "GPU_shader.hh" +#include "GPU_state.hh" #include "GPU_texture.hh" #include "COM_context.hh" diff --git a/source/blender/compositor/algorithms/intern/recursive_gaussian_blur.cc b/source/blender/compositor/algorithms/intern/recursive_gaussian_blur.cc index d152dd6bf5f..796ee99bbb7 100644 --- a/source/blender/compositor/algorithms/intern/recursive_gaussian_blur.cc +++ b/source/blender/compositor/algorithms/intern/recursive_gaussian_blur.cc @@ -2,7 +2,6 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include "BLI_math_base.hh" #include "BLI_math_vector.hh" #include "COM_context.hh" diff --git a/source/blender/compositor/algorithms/intern/smaa.cc b/source/blender/compositor/algorithms/intern/smaa.cc index 04e77d879fc..851a0b5c957 100644 --- a/source/blender/compositor/algorithms/intern/smaa.cc +++ b/source/blender/compositor/algorithms/intern/smaa.cc @@ -9,7 +9,6 @@ #include "BLI_assert.h" #include "BLI_math_vector.hh" -#include "BLI_smaa_textures.h" #include "IMB_colormanagement.hh" @@ -1283,8 +1282,9 @@ static float4 SMAABlendingWeightCalculationPS(float2 texcoord, #if !defined(SMAA_DISABLE_DIAG_DETECTION) } - else + else { e.x = 0.0f; /* Skip vertical processing. */ + } #endif } @@ -1377,36 +1377,35 @@ static float4 SMAANeighborhoodBlendingPS(float2 texcoord, return color; } - else { - bool h = math::max(a.x, a.z) > math::max(a.y, a.w); /* `max(horizontal) > max(vertical)`. */ - /* Calculate the blending offsets: */ - float4 blendingOffset = float4(0.0f, a.y, 0.0f, a.w); - float2 blendingWeight = float2(a.y, a.w); - SMAAMovc(float4(h), blendingOffset, float4(a.x, 0.0f, a.z, 0.0f)); - SMAAMovc(float2(h), blendingWeight, float2(a.x, a.z)); - blendingWeight /= math::dot(blendingWeight, float2(1.0f, 1.0f)); + bool h = math::max(a.x, a.z) > math::max(a.y, a.w); /* `max(horizontal) > max(vertical)`. */ - /* Calculate the texture coordinates: */ - float4 blendingCoord = float4(texcoord, texcoord) + blendingOffset / float4(size, -size); + /* Calculate the blending offsets: */ + float4 blendingOffset = float4(0.0f, a.y, 0.0f, a.w); + float2 blendingWeight = float2(a.y, a.w); + SMAAMovc(float4(h), blendingOffset, float4(a.x, 0.0f, a.z, 0.0f)); + SMAAMovc(float2(h), blendingWeight, float2(a.x, a.z)); + blendingWeight /= math::dot(blendingWeight, float2(1.0f, 1.0f)); - /* We exploit bilinear filtering to mix current pixel with the chosen neighbor: */ - float4 color = blendingWeight.x * SMAASampleLevelZero(colorTex, blendingCoord.xy()); - color += blendingWeight.y * SMAASampleLevelZero(colorTex, blendingCoord.zw()); + /* Calculate the texture coordinates: */ + float4 blendingCoord = float4(texcoord, texcoord) + blendingOffset / float4(size, -size); + + /* We exploit bilinear filtering to mix current pixel with the chosen neighbor: */ + float4 color = blendingWeight.x * SMAASampleLevelZero(colorTex, blendingCoord.xy()); + color += blendingWeight.y * SMAASampleLevelZero(colorTex, blendingCoord.zw()); #if SMAA_REPROJECTION - /* Anti-alias velocity for proper reprojection in a later stage: */ - float2 velocity = blendingWeight.x * - SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.xy())); - velocity += blendingWeight.y * - SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.zw())); + /* Anti-alias velocity for proper reprojection in a later stage: */ + float2 velocity = blendingWeight.x * + SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.xy())); + velocity += blendingWeight.y * + SMAA_DECODE_VELOCITY(SMAASampleLevelZero(velocityTex, blendingCoord.zw())); - /* Pack velocity into the alpha channel: */ - color.a = math::sqrt(5.0f * math::length(velocity)); + /* Pack velocity into the alpha channel: */ + color.a = math::sqrt(5.0f * math::length(velocity)); #endif - return color; - } + return color; } static float3 get_luminance_coefficients(ResultType type) diff --git a/source/blender/compositor/algorithms/intern/summed_area_table.cc b/source/blender/compositor/algorithms/intern/summed_area_table.cc index 72dffd13ee5..fb6f95f4c8d 100644 --- a/source/blender/compositor/algorithms/intern/summed_area_table.cc +++ b/source/blender/compositor/algorithms/intern/summed_area_table.cc @@ -4,18 +4,15 @@ #include "BLI_assert.h" #include "BLI_index_range.hh" -#include "BLI_math_base.hh" #include "BLI_math_vector.hh" #include "BLI_math_vector_types.hh" #include "BLI_task.hh" #include "GPU_compute.hh" #include "GPU_shader.hh" -#include "GPU_texture.hh" #include "COM_context.hh" #include "COM_result.hh" -#include "COM_utilities.hh" #include "COM_algorithm_summed_area_table.hh" diff --git a/source/blender/compositor/algorithms/intern/symmetric_separable_blur.cc b/source/blender/compositor/algorithms/intern/symmetric_separable_blur.cc index 6318434d0aa..afa62a40dbc 100644 --- a/source/blender/compositor/algorithms/intern/symmetric_separable_blur.cc +++ b/source/blender/compositor/algorithms/intern/symmetric_separable_blur.cc @@ -8,7 +8,6 @@ #include "BLI_math_vector_types.hh" #include "GPU_shader.hh" -#include "GPU_texture.hh" #include "COM_context.hh" #include "COM_result.hh" diff --git a/source/blender/compositor/algorithms/intern/symmetric_separable_blur_variable_size.cc b/source/blender/compositor/algorithms/intern/symmetric_separable_blur_variable_size.cc index 391053b962f..8ccb5731a79 100644 --- a/source/blender/compositor/algorithms/intern/symmetric_separable_blur_variable_size.cc +++ b/source/blender/compositor/algorithms/intern/symmetric_separable_blur_variable_size.cc @@ -3,8 +3,6 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ #include "BLI_assert.h" -#include "BLI_math_base.hh" -#include "BLI_math_vector.hh" #include "BLI_math_vector_types.hh" #include "GPU_shader.hh" diff --git a/source/blender/compositor/algorithms/intern/van_vliet_gaussian_blur.cc b/source/blender/compositor/algorithms/intern/van_vliet_gaussian_blur.cc index e06ddf94d10..b4f64cb93e9 100644 --- a/source/blender/compositor/algorithms/intern/van_vliet_gaussian_blur.cc +++ b/source/blender/compositor/algorithms/intern/van_vliet_gaussian_blur.cc @@ -3,7 +3,6 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ #include "BLI_assert.h" -#include "BLI_math_base.hh" #include "BLI_math_vector.hh" #include "GPU_shader.hh" diff --git a/source/blender/compositor/cached_resources/COM_bokeh_kernel.hh b/source/blender/compositor/cached_resources/COM_bokeh_kernel.hh index be04edb0036..45db97c1134 100644 --- a/source/blender/compositor/cached_resources/COM_bokeh_kernel.hh +++ b/source/blender/compositor/cached_resources/COM_bokeh_kernel.hh @@ -46,7 +46,6 @@ class BokehKernel : public CachedResource { public: Result result; - public: BokehKernel(Context &context, int2 size, int sides, diff --git a/source/blender/compositor/cached_resources/COM_cached_mask.hh b/source/blender/compositor/cached_resources/COM_cached_mask.hh index 8035431de39..51e25bb8498 100644 --- a/source/blender/compositor/cached_resources/COM_cached_mask.hh +++ b/source/blender/compositor/cached_resources/COM_cached_mask.hh @@ -12,7 +12,6 @@ #include "BLI_math_vector_types.hh" #include "DNA_mask_types.h" -#include "DNA_scene_types.h" #include "COM_cached_resource.hh" #include "COM_result.hh" @@ -55,7 +54,6 @@ class CachedMask : public CachedResource { public: Result result; - public: CachedMask(Context &context, Mask *mask, int2 size, diff --git a/source/blender/compositor/cached_resources/COM_cached_texture.hh b/source/blender/compositor/cached_resources/COM_cached_texture.hh index 0bcf276ca28..afc88291d8c 100644 --- a/source/blender/compositor/cached_resources/COM_cached_texture.hh +++ b/source/blender/compositor/cached_resources/COM_cached_texture.hh @@ -50,7 +50,6 @@ class CachedTexture : public CachedResource { Result color_result; Result value_result; - public: CachedTexture(Context &context, Tex *texture, bool use_color_management, diff --git a/source/blender/compositor/cached_resources/COM_distortion_grid.hh b/source/blender/compositor/cached_resources/COM_distortion_grid.hh index fa31b38aa60..e74caa32bef 100644 --- a/source/blender/compositor/cached_resources/COM_distortion_grid.hh +++ b/source/blender/compositor/cached_resources/COM_distortion_grid.hh @@ -58,7 +58,6 @@ class DistortionGrid : public CachedResource { public: Result result; - public: /* The calibration size is the size of the image where the tracking camera was calibrated, this * is the size of the movie clip in most cases. */ DistortionGrid(Context &context, diff --git a/source/blender/compositor/cached_resources/COM_keying_screen.hh b/source/blender/compositor/cached_resources/COM_keying_screen.hh index 6f0f0dc948e..9f9ed6605ac 100644 --- a/source/blender/compositor/cached_resources/COM_keying_screen.hh +++ b/source/blender/compositor/cached_resources/COM_keying_screen.hh @@ -45,7 +45,6 @@ class KeyingScreen : public CachedResource { public: Result result; - public: KeyingScreen(Context &context, MovieClip *movie_clip, MovieTrackingObject *movie_tracking_object, diff --git a/source/blender/compositor/cached_resources/COM_morphological_distance_feather_weights.hh b/source/blender/compositor/cached_resources/COM_morphological_distance_feather_weights.hh index 24acc4b76f0..97773699b2f 100644 --- a/source/blender/compositor/cached_resources/COM_morphological_distance_feather_weights.hh +++ b/source/blender/compositor/cached_resources/COM_morphological_distance_feather_weights.hh @@ -50,7 +50,6 @@ class MorphologicalDistanceFeatherWeights : public CachedResource { Result weights_result; Result falloffs_result; - public: MorphologicalDistanceFeatherWeights(Context &context, int type, int radius); ~MorphologicalDistanceFeatherWeights(); diff --git a/source/blender/compositor/cached_resources/COM_symmetric_blur_weights.hh b/source/blender/compositor/cached_resources/COM_symmetric_blur_weights.hh index 74621bf06c7..71c8d998ad3 100644 --- a/source/blender/compositor/cached_resources/COM_symmetric_blur_weights.hh +++ b/source/blender/compositor/cached_resources/COM_symmetric_blur_weights.hh @@ -47,7 +47,6 @@ class SymmetricBlurWeights : public CachedResource { public: Result result; - public: SymmetricBlurWeights(Context &context, int type, float2 radius); ~SymmetricBlurWeights(); diff --git a/source/blender/compositor/cached_resources/COM_symmetric_separable_blur_weights.hh b/source/blender/compositor/cached_resources/COM_symmetric_separable_blur_weights.hh index 517778c7fd6..b40d3f555cc 100644 --- a/source/blender/compositor/cached_resources/COM_symmetric_separable_blur_weights.hh +++ b/source/blender/compositor/cached_resources/COM_symmetric_separable_blur_weights.hh @@ -9,7 +9,6 @@ #include "BLI_array.hh" #include "BLI_map.hh" -#include "BLI_math_vector_types.hh" #include "COM_cached_resource.hh" #include "COM_result.hh" @@ -53,7 +52,6 @@ class SymmetricSeparableBlurWeights : public CachedResource { public: Result result; - public: SymmetricSeparableBlurWeights(Context &context, int type, float radius); ~SymmetricSeparableBlurWeights(); diff --git a/source/blender/compositor/cached_resources/intern/cached_image.cc b/source/blender/compositor/cached_resources/intern/cached_image.cc index 884f33d3c3d..f13538ea5f3 100644 --- a/source/blender/compositor/cached_resources/intern/cached_image.cc +++ b/source/blender/compositor/cached_resources/intern/cached_image.cc @@ -6,8 +6,6 @@ #include #include -#include "BLI_array.hh" -#include "BLI_assert.h" #include "BLI_hash.hh" #include "BLI_listbase.h" #include "BLI_string_ref.hh" diff --git a/source/blender/compositor/cached_resources/intern/cached_mask.cc b/source/blender/compositor/cached_resources/intern/cached_mask.cc index b89d178825a..60ae42cafd5 100644 --- a/source/blender/compositor/cached_resources/intern/cached_mask.cc +++ b/source/blender/compositor/cached_resources/intern/cached_mask.cc @@ -7,9 +7,7 @@ #include "BLI_array.hh" #include "BLI_hash.hh" -#include "BLI_index_range.hh" #include "BLI_math_vector_types.hh" -#include "BLI_task.hh" #include "GPU_texture.hh" diff --git a/source/blender/compositor/cached_resources/intern/cached_shader.cc b/source/blender/compositor/cached_resources/intern/cached_shader.cc index 172aa783bb2..44dd9a4d893 100644 --- a/source/blender/compositor/cached_resources/intern/cached_shader.cc +++ b/source/blender/compositor/cached_resources/intern/cached_shader.cc @@ -9,7 +9,6 @@ #include "BLI_hash.hh" #include "GPU_shader.hh" -#include "GPU_texture.hh" #include "COM_cached_shader.hh" #include "COM_result.hh" diff --git a/source/blender/compositor/cached_resources/intern/cached_texture.cc b/source/blender/compositor/cached_resources/intern/cached_texture.cc index 88f6adee0c5..697c68fb993 100644 --- a/source/blender/compositor/cached_resources/intern/cached_texture.cc +++ b/source/blender/compositor/cached_resources/intern/cached_texture.cc @@ -18,7 +18,6 @@ #include "BKE_texture.h" #include "DNA_ID.h" -#include "DNA_scene_types.h" #include "DNA_texture_types.h" #include "RE_texture.h" @@ -26,7 +25,6 @@ #include "COM_cached_texture.hh" #include "COM_context.hh" #include "COM_result.hh" -#include "COM_utilities.hh" namespace blender::compositor { diff --git a/source/blender/compositor/cached_resources/intern/distortion_grid.cc b/source/blender/compositor/cached_resources/intern/distortion_grid.cc index cc9419877de..27015890b51 100644 --- a/source/blender/compositor/cached_resources/intern/distortion_grid.cc +++ b/source/blender/compositor/cached_resources/intern/distortion_grid.cc @@ -7,9 +7,7 @@ #include "BLI_array.hh" #include "BLI_hash.hh" -#include "BLI_index_range.hh" #include "BLI_math_vector_types.hh" -#include "BLI_task.hh" #include "DNA_defaults.h" #include "DNA_movieclip_types.h" diff --git a/source/blender/compositor/cached_resources/intern/keying_screen.cc b/source/blender/compositor/cached_resources/intern/keying_screen.cc index 6d75e8e1989..7f5e2f8315a 100644 --- a/source/blender/compositor/cached_resources/intern/keying_screen.cc +++ b/source/blender/compositor/cached_resources/intern/keying_screen.cc @@ -22,7 +22,6 @@ #include "GPU_shader.hh" #include "GPU_storage_buffer.hh" -#include "GPU_texture.hh" #include "BKE_movieclip.h" #include "BKE_tracking.h" diff --git a/source/blender/compositor/derived_resources/intern/denoised_auxiliary_pass.cc b/source/blender/compositor/derived_resources/intern/denoised_auxiliary_pass.cc index 8d7049171d6..1b971e63d85 100644 --- a/source/blender/compositor/derived_resources/intern/denoised_auxiliary_pass.cc +++ b/source/blender/compositor/derived_resources/intern/denoised_auxiliary_pass.cc @@ -12,6 +12,7 @@ # include "MEM_guardedalloc.h" +# include "GPU_state.hh" # include "GPU_texture.hh" # include "COM_context.hh" diff --git a/source/blender/compositor/intern/COM_compositor.cc b/source/blender/compositor/intern/COM_compositor.cc index 7dda88b1760..0b9b4cbafb5 100644 --- a/source/blender/compositor/intern/COM_compositor.cc +++ b/source/blender/compositor/intern/COM_compositor.cc @@ -8,7 +8,6 @@ #include "BKE_node.hh" #include "BKE_node_runtime.hh" -#include "BKE_scene.hh" #include "COM_compositor.hh" diff --git a/source/blender/compositor/intern/compile_state.cc b/source/blender/compositor/intern/compile_state.cc index 511c0f45103..68db05daff9 100644 --- a/source/blender/compositor/intern/compile_state.cc +++ b/source/blender/compositor/intern/compile_state.cc @@ -32,12 +32,12 @@ const Schedule &CompileState::get_schedule() void CompileState::map_node_to_node_operation(DNode node, NodeOperation *operations) { - return node_operations_.add_new(node, operations); + node_operations_.add_new(node, operations); } void CompileState::map_node_to_pixel_operation(DNode node, PixelOperation *operations) { - return pixel_operations_.add_new(node, operations); + pixel_operations_.add_new(node, operations); } Result &CompileState::get_result_from_output_socket(DOutputSocket output) diff --git a/source/blender/compositor/intern/evaluator.cc b/source/blender/compositor/intern/evaluator.cc index 4e7101c267d..6cd9dd4c563 100644 --- a/source/blender/compositor/intern/evaluator.cc +++ b/source/blender/compositor/intern/evaluator.cc @@ -2,8 +2,6 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include - #include "DNA_node_types.h" #include "NOD_derived_node_tree.hh" diff --git a/source/blender/compositor/intern/multi_function_procedure_operation.cc b/source/blender/compositor/intern/multi_function_procedure_operation.cc index 1812d17c9a2..a1ae1404370 100644 --- a/source/blender/compositor/intern/multi_function_procedure_operation.cc +++ b/source/blender/compositor/intern/multi_function_procedure_operation.cc @@ -28,7 +28,6 @@ #include "NOD_derived_node_tree.hh" #include "NOD_multi_function.hh" -#include "NOD_node_declaration.hh" #include "COM_context.hh" #include "COM_domain.hh" diff --git a/source/blender/compositor/intern/node_operation.cc b/source/blender/compositor/intern/node_operation.cc index 254aa0047bc..95833064968 100644 --- a/source/blender/compositor/intern/node_operation.cc +++ b/source/blender/compositor/intern/node_operation.cc @@ -2,24 +2,13 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ -#include - #include "BLI_assert.h" -#include "BLI_map.hh" -#include "BLI_math_base.h" -#include "BLI_math_base.hh" -#include "BLI_math_vector_types.hh" #include "BLI_string_ref.hh" #include "BLI_timeit.hh" -#include "BLI_vector.hh" - -#include "GPU_shader.hh" -#include "GPU_texture.hh" #include "DNA_node_types.h" #include "NOD_derived_node_tree.hh" -#include "NOD_node_declaration.hh" #include "BKE_node.hh" diff --git a/source/blender/compositor/intern/operation.cc b/source/blender/compositor/intern/operation.cc index 45376363d80..b461b39a74c 100644 --- a/source/blender/compositor/intern/operation.cc +++ b/source/blender/compositor/intern/operation.cc @@ -7,7 +7,6 @@ #include "BLI_map.hh" #include "BLI_string_ref.hh" -#include "BLI_vector.hh" #include "COM_context.hh" #include "COM_conversion_operation.hh" diff --git a/source/blender/compositor/intern/profiler.cc b/source/blender/compositor/intern/profiler.cc index a0168d4a7b4..2e70523c938 100644 --- a/source/blender/compositor/intern/profiler.cc +++ b/source/blender/compositor/intern/profiler.cc @@ -10,7 +10,6 @@ #include "NOD_derived_node_tree.hh" -#include "COM_context.hh" #include "COM_profiler.hh" namespace blender::compositor { diff --git a/source/blender/compositor/intern/result.cc b/source/blender/compositor/intern/result.cc index 60382ce18a7..df496f10737 100644 --- a/source/blender/compositor/intern/result.cc +++ b/source/blender/compositor/intern/result.cc @@ -6,7 +6,6 @@ #include "BLI_assert.h" #include "BLI_math_matrix_types.hh" -#include "BLI_math_vector.h" #include "BLI_math_vector_types.hh" #include "GPU_shader.hh" diff --git a/source/blender/compositor/intern/scheduler.cc b/source/blender/compositor/intern/scheduler.cc index 24bb035c440..a43667193c4 100644 --- a/source/blender/compositor/intern/scheduler.cc +++ b/source/blender/compositor/intern/scheduler.cc @@ -2,16 +2,16 @@ * * SPDX-License-Identifier: GPL-2.0-or-later */ +#include + #include "BLI_map.hh" #include "BLI_set.hh" #include "BLI_stack.hh" #include "BLI_vector.hh" -#include "BLI_vector_set.hh" #include "NOD_derived_node_tree.hh" #include "BKE_node_legacy_types.hh" -#include "BKE_node_runtime.hh" #include "COM_context.hh" #include "COM_scheduler.hh" @@ -255,9 +255,8 @@ static NeededBuffers compute_number_of_needed_buffers(Stack &output_nodes * buffers needed by the dependencies, then update the latter to be the former. This is * computing the "d" in the aforementioned equation "max(n + m, d)". */ const int buffers_needed_by_dependency = needed_buffers.lookup(doutput.node()); - if (buffers_needed_by_dependency > buffers_needed_by_dependencies) { - buffers_needed_by_dependencies = buffers_needed_by_dependency; - } + buffers_needed_by_dependencies = std::max(buffers_needed_by_dependency, + buffers_needed_by_dependencies); } /* Compute the number of buffers that will be computed/output by this node. */ diff --git a/source/blender/compositor/intern/shader_operation.cc b/source/blender/compositor/intern/shader_operation.cc index dd192c4c7cc..53d9ef0fdd2 100644 --- a/source/blender/compositor/intern/shader_operation.cc +++ b/source/blender/compositor/intern/shader_operation.cc @@ -9,7 +9,6 @@ #include "BLI_listbase.h" #include "BLI_map.hh" #include "BLI_string_ref.hh" -#include "BLI_utildefines.h" #include "DNA_customdata_types.h" @@ -22,7 +21,6 @@ #include "gpu_shader_create_info.hh" #include "NOD_derived_node_tree.hh" -#include "NOD_node_declaration.hh" #include "COM_context.hh" #include "COM_pixel_operation.hh" diff --git a/source/blender/compositor/intern/utilities.cc b/source/blender/compositor/intern/utilities.cc index cf0d1ef0352..78721de824a 100644 --- a/source/blender/compositor/intern/utilities.cc +++ b/source/blender/compositor/intern/utilities.cc @@ -5,7 +5,6 @@ #include "BLI_assert.h" #include "BLI_math_vector.hh" #include "BLI_math_vector_types.hh" -#include "BLI_utildefines.h" #include "DNA_node_types.h" @@ -15,7 +14,6 @@ #include "GPU_compute.hh" #include "GPU_shader.hh" -#include "COM_operation.hh" #include "COM_result.hh" #include "COM_utilities.hh"