Commit: 2b940716a1aaa166832f363c7d4a152fe949f4f1 Author: Omar Emara Date: Mon Apr 11 13:30:35 2022 +0200 Branches: temp-viewport-compositor-compiler https://developer.blender.org/rB2b940716a1aaa166832f363c7d4a152fe949f4f1
Viewport Compositor: Move input descriptor to operation header =================================================================== M source/blender/viewport_compositor/CMakeLists.txt D source/blender/viewport_compositor/VPC_input_descriptor.hh M source/blender/viewport_compositor/VPC_operation.hh M source/blender/viewport_compositor/VPC_processor_operation.hh M source/blender/viewport_compositor/intern/conversion_processor_operation.cc M source/blender/viewport_compositor/intern/operation.cc M source/blender/viewport_compositor/intern/processor_operation.cc M source/blender/viewport_compositor/intern/realize_on_domain_processor_operation.cc M source/blender/viewport_compositor/intern/reduce_to_single_value_processor_operation.cc =================================================================== diff --git a/source/blender/viewport_compositor/CMakeLists.txt b/source/blender/viewport_compositor/CMakeLists.txt index 2cf00c16fae..bf0e141720f 100644 --- a/source/blender/viewport_compositor/CMakeLists.txt +++ b/source/blender/viewport_compositor/CMakeLists.txt @@ -41,7 +41,6 @@ set(SRC VPC_evaluator.hh VPC_gpu_material_node.hh VPC_gpu_material_operation.hh - VPC_input_descriptor.hh VPC_node_operation.hh VPC_operation.hh VPC_processor_operation.hh diff --git a/source/blender/viewport_compositor/VPC_input_descriptor.hh b/source/blender/viewport_compositor/VPC_input_descriptor.hh deleted file mode 100644 index 6166124e864..00000000000 --- a/source/blender/viewport_compositor/VPC_input_descriptor.hh +++ /dev/null @@ -1,32 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later - * Copyright 2022 Blender Foundation. All rights reserved. */ - -#pragma once - -#include "VPC_result.hh" - -namespace blender::viewport_compositor { - -/* A class that describes an input of an operation. */ -class InputDescriptor { - public: - /* The type of input. This may be different that the type of result that the operation will - * receive for the input, in which case, an implicit conversion input processor operation will - * be added to convert it to the required type. */ - ResultType type; - /* If true, then the input does not need to be realized on the domain of the operation before its - * execution. See the Domain class for more information. */ - bool skip_realization = false; - /* The priority of the input for determining the operation domain. The non-single value input - * with the highest priority will be used to infer the operation domain, the highest priority - * being zero. See the Domain class for more information. */ - int domain_priority = 0; - /* If true, the input expects a single value, and if a non-single value is provided, a default - * single value will be used instead, see the get_*_value_default methods in the Result - * class. It follows that this also imply skip_realization, because we don't need to realize a - * result that will be discarded anyways. If false, the input can work with both single and - * non-single values. */ - bool expects_single_value = false; -}; - -} // namespace blender::viewport_compositor diff --git a/source/blender/viewport_compositor/VPC_operation.hh b/source/blender/viewport_compositor/VPC_operation.hh index 5ce181f3a55..63ffde6bddc 100644 --- a/source/blender/viewport_compositor/VPC_operation.hh +++ b/source/blender/viewport_compositor/VPC_operation.hh @@ -9,12 +9,33 @@ #include "VPC_context.hh" #include "VPC_domain.hh" -#include "VPC_input_descriptor.hh" #include "VPC_result.hh" #include "VPC_texture_pool.hh" namespace blender::viewport_compositor { +/* A class that describes an input of an operation. */ +class InputDescriptor { + public: + /* The type of input. This may be different that the type of result that the operation will + * receive for the input, in which case, an implicit conversion input processor operation will + * be added to convert it to the required type. */ + ResultType type; + /* If true, then the input does not need to be realized on the domain of the operation before its + * execution. See the Domain class for more information. */ + bool skip_realization = false; + /* The priority of the input for determining the operation domain. The non-single value input + * with the highest priority will be used to infer the operation domain, the highest priority + * being zero. See the Domain class for more information. */ + int domain_priority = 0; + /* If true, the input expects a single value, and if a non-single value is provided, a default + * single value will be used instead, see the get_*_value_default methods in the Result + * class. It follows that this also imply skip_realization, because we don't need to realize a + * result that will be discarded anyways. If false, the input can work with both single and + * non-single values. */ + bool expects_single_value = false; +}; + /* Forward declare processor operation because it is used in the operation definition. */ class ProcessorOperation; diff --git a/source/blender/viewport_compositor/VPC_processor_operation.hh b/source/blender/viewport_compositor/VPC_processor_operation.hh index 7070ba51146..0e14bd8fb6b 100644 --- a/source/blender/viewport_compositor/VPC_processor_operation.hh +++ b/source/blender/viewport_compositor/VPC_processor_operation.hh @@ -5,7 +5,6 @@ #include "BLI_string_ref.hh" -#include "VPC_input_descriptor.hh" #include "VPC_operation.hh" #include "VPC_result.hh" diff --git a/source/blender/viewport_compositor/intern/conversion_processor_operation.cc b/source/blender/viewport_compositor/intern/conversion_processor_operation.cc index de5b7f9021a..cc1a8dea5bd 100644 --- a/source/blender/viewport_compositor/intern/conversion_processor_operation.cc +++ b/source/blender/viewport_compositor/intern/conversion_processor_operation.cc @@ -8,7 +8,6 @@ #include "VPC_context.hh" #include "VPC_conversion_processor_operation.hh" -#include "VPC_input_descriptor.hh" #include "VPC_result.hh" namespace blender::viewport_compositor { diff --git a/source/blender/viewport_compositor/intern/operation.cc b/source/blender/viewport_compositor/intern/operation.cc index 717c2d43d7e..37c94852209 100644 --- a/source/blender/viewport_compositor/intern/operation.cc +++ b/source/blender/viewport_compositor/intern/operation.cc @@ -10,7 +10,7 @@ #include "VPC_context.hh" #include "VPC_conversion_processor_operation.hh" #include "VPC_domain.hh" -#include "VPC_input_descriptor.hh" +#include "VPC_operation.hh" #include "VPC_processor_operation.hh" #include "VPC_realize_on_domain_processor_operation.hh" #include "VPC_reduce_to_single_value_processor_operation.hh" diff --git a/source/blender/viewport_compositor/intern/processor_operation.cc b/source/blender/viewport_compositor/intern/processor_operation.cc index 09fc00f9f74..c5375c21b15 100644 --- a/source/blender/viewport_compositor/intern/processor_operation.cc +++ b/source/blender/viewport_compositor/intern/processor_operation.cc @@ -1,7 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-or-later * Copyright 2022 Blender Foundation. All rights reserved. */ -#include "VPC_input_descriptor.hh" #include "VPC_operation.hh" #include "VPC_processor_operation.hh" #include "VPC_result.hh" diff --git a/source/blender/viewport_compositor/intern/realize_on_domain_processor_operation.cc b/source/blender/viewport_compositor/intern/realize_on_domain_processor_operation.cc index bfd44f5e8f4..da2a9dfe35f 100644 --- a/source/blender/viewport_compositor/intern/realize_on_domain_processor_operation.cc +++ b/source/blender/viewport_compositor/intern/realize_on_domain_processor_operation.cc @@ -11,7 +11,6 @@ #include "VPC_context.hh" #include "VPC_domain.hh" -#include "VPC_input_descriptor.hh" #include "VPC_realize_on_domain_processor_operation.hh" #include "VPC_result.hh" diff --git a/source/blender/viewport_compositor/intern/reduce_to_single_value_processor_operation.cc b/source/blender/viewport_compositor/intern/reduce_to_single_value_processor_operation.cc index 21ed8aebfa0..a0693fbe11a 100644 --- a/source/blender/viewport_compositor/intern/reduce_to_single_value_processor_operation.cc +++ b/source/blender/viewport_compositor/intern/reduce_to_single_value_processor_operation.cc @@ -7,7 +7,6 @@ #include "MEM_guardedalloc.h" #include "VPC_context.hh" -#include "VPC_input_descriptor.hh" #include "VPC_reduce_to_single_value_processor_operation.hh" #include "VPC_result.hh" _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs