24using namespace nodes::derived_node_tree_types;
29 return socket->is_available() &&
StringRef(socket->
idname) !=
"NodeSocketVirtual";
35 if (!
input->is_logically_linked()) {
41 input.foreach_origin_socket([&](
const DSocket origin) { socket = origin; });
60 if (origin->is_input()) {
69 const std::optional<int> dimensions)
79 switch (dimensions.value_or(3)) {
115 bool condition_satisfied =
false;
116 output.foreach_target_socket(
118 if (condition(target.node())) {
119 condition_satisfied =
true;
123 return condition_satisfied;
129 if (!
output->is_logically_linked()) {
134 output.foreach_target_socket(
136 if (condition(target)) {
145 BLI_assert(
bool(node->typeinfo->gpu_fn) ==
bool(node->typeinfo->build_multi_function));
146 return node->typeinfo->gpu_fn && node->typeinfo->build_multi_function;
164 return input->index();
171 using namespace nodes;
181 const NodeDeclaration *node_declaration = socket->owner_node().declaration();
182 if (!node_declaration) {
183 return input_descriptor;
188 StructureType::Single;
193 return input_descriptor;
217 if (node.context()->instance_key().value !=
218 node.context()->derived_tree().active_context().instance_key().value)
237 if (
output->is_logically_linked()) {
#define BLI_assert_unreachable()
void GPU_compute_dispatch(blender::gpu::Shader *shader, uint groups_x_len, uint groups_y_len, uint groups_z_len, const blender::gpu::shader::SpecializationConstants *constants_state=nullptr)
Vector< SocketDeclaration * > inputs
StructureType structure_type
const CompositorInputRealizationMode & compositor_realization_mode() const
int compositor_domain_priority() const
InputSocketFieldType input_field_type
int number_of_inputs_linked_to_output_conditioned(DOutputSocket output, FunctionRef< bool(DInputSocket)> condition)
ResultType socket_data_type_to_result_type(const eNodeSocketDatatype data_type, const std::optional< int > dimensions=std::nullopt)
bool is_output_linked_to_node_conditioned(DOutputSocket output, FunctionRef< bool(DNode)> condition)
void compute_dispatch_threads_at_least(gpu::Shader *shader, int2 threads_range, int2 local_size=int2(16))
DSocket get_input_origin_socket(DInputSocket input)
DOutputSocket::TargetSocketPathInfo TargetSocketPathInfo
static int get_domain_priority(const bNodeSocket *input, const nodes::SocketDeclaration *socket_declaration)
static ImplicitInput get_implicit_input(const nodes::SocketDeclaration *socket_declaration)
DOutputSocket find_preview_output_socket(const DNode &node)
ResultType get_node_socket_result_type(const bNodeSocket *socket)
DOutputSocket get_output_linked_to_input(DInputSocket input)
InputDescriptor input_descriptor_from_input_socket(const bNodeSocket *socket)
bool is_pixel_node(DNode node)
bool is_socket_available(const bNodeSocket *socket)
bool is_node_preview_needed(const DNode &node)
VecBase< T, Size > divide_ceil(const VecBase< T, Size > &a, const VecBase< T, Size > &b)
VecBase< int32_t, 2 > int2