Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOmar Emara <mail@OmarEmara.dev>2022-08-10 10:14:22 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-08-10 10:14:22 +0300
commit624b0ac656e4876c8518adb479be94e581c46bb8 (patch)
treecd5cd314498cab0ca367d33ce41f768de1af378e /source/blender/blenkernel/BKE_node.h
parent169216684a7dd9fff065bad2c0bad60578f9412f (diff)
Realtime Compositor: Add evaluator and engine
This patch adds the core realtime compositor evaluator as well as a compositor draw engine powered by the evaluator that operates in the viewport. The realtime compositor is a new GPU accelerated compositor that will be used to power the viewport compositor imminently as well as the existing compositor in the future. This patch only adds the evaluator and engine as an experimental feature, the implementation of the nodes themselves will be committed separately. See T99210. Differential Revision: https://developer.blender.org/D15206 Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/blenkernel/BKE_node.h')
-rw-r--r--source/blender/blenkernel/BKE_node.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index 02e3cefe6a5..b42b9df510d 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -101,6 +101,7 @@ typedef struct bNodeSocketTemplate {
namespace blender {
class CPPType;
namespace nodes {
+class DNode;
class NodeMultiFunctionBuilder;
class GeoNodeExecParams;
class NodeDeclarationBuilder;
@@ -109,6 +110,11 @@ class GatherLinkSearchOpParams;
namespace fn {
class MFDataType;
} // namespace fn
+namespace realtime_compositor {
+class Context;
+class NodeOperation;
+class ShaderNode;
+} // namespace realtime_compositor
} // namespace blender
using CPPTypeHandle = blender::CPPType;
@@ -123,7 +129,14 @@ using SocketGetGeometryNodesCPPValueFunction = void (*)(const struct bNodeSocket
using NodeGatherSocketLinkOperationsFunction =
void (*)(blender::nodes::GatherLinkSearchOpParams &params);
+using NodeGetCompositorOperationFunction = blender::realtime_compositor::NodeOperation
+ *(*)(blender::realtime_compositor::Context &context, blender::nodes::DNode node);
+using NodeGetCompositorShaderNodeFunction =
+ blender::realtime_compositor::ShaderNode *(*)(blender::nodes::DNode node);
+
#else
+typedef void *NodeGetCompositorOperationFunction;
+typedef void *NodeGetCompositorShaderNodeFunction;
typedef void *NodeMultiFunctionBuildFunction;
typedef void *NodeGeometryExecFunction;
typedef void *NodeDeclareFunction;
@@ -309,6 +322,14 @@ typedef struct bNodeType {
/* gpu */
NodeGPUExecFunction gpu_fn;
+ /* Get an instance of this node's compositor operation. Freeing the instance is the
+ * responsibility of the caller. */
+ NodeGetCompositorOperationFunction get_compositor_operation;
+
+ /* Get an instance of this node's compositor shader node. Freeing the instance is the
+ * responsibility of the caller. */
+ NodeGetCompositorShaderNodeFunction get_compositor_shader_node;
+
/* Build a multi-function for this node. */
NodeMultiFunctionBuildFunction build_multi_function;