27 class ReadBufferOperation;
28 class ExecutionSystem;
30 class NodeOperationOutput;
113 resize_mode_ = resize_mode;
127 #ifdef WITH_CXX_GUARDEDALLOC
128 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:NodeOperation")
155 #ifdef WITH_CXX_GUARDEDALLOC
156 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:NodeOperation")
266 size_t parents_hash_;
279 return type_hash_ == other.type_hash_ && parents_hash_ == other.parents_hash_ &&
280 params_hash_ == other.params_hash_;
285 return !(*
this == other);
290 return type_hash_ < other.type_hash_ ||
291 (type_hash_ == other.type_hash_ && parents_hash_ < other.parents_hash_) ||
292 (type_hash_ == other.type_hash_ && parents_hash_ == other.parents_hash_ &&
293 params_hash_ < other.params_hash_);
311 bool is_hash_output_params_implemented_;
316 unsigned int canvas_input_index_;
318 std::function<
void(
rcti &canvas)> modify_determined_canvas_fn_;
395 return inputs_.
size();
399 return outputs_.
size();
501 std::list<cl_mem> * ,
502 std::list<cl_kernel> * )
543 modify_determined_canvas_fn_ = fn;
613 return std::unique_ptr<MetaData>();
661 is_hash_output_params_implemented_ =
false;
679 template<
typename T1,
typename T2,
typename T3>
void hash_params(
T1 param1,
T2 param2,
T3 param3)
757 float [4],
float ,
float ,
float [2],
float [2])
776 void render_full_frame_fallback(
MemoryBuffer *output_buf,
784 void remove_buffers_and_restore_original_inputs(
792 #ifdef WITH_CXX_GUARDEDALLOC
793 MEM_CXX_CLASS_ALLOC_FUNCS(
"COM:NodeOperation")
size_t BLI_ghashutil_combine_hash(size_t hash_a, size_t hash_b)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
pthread_mutex_t ThreadMutex
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
the ExecutionSystem contains the whole compositor tree.
a MemoryBuffer contains access to the data of a chunk
NodeOperationOutput(NodeOperation *op, DataType datatype)
void determine_canvas(const rcti &preferred_area, rcti &r_area)
NodeOperation & get_operation() const
DataType get_data_type() const
NodeOperation contains calculation logic.
void set_bnodetree(const bNodeTree *tree)
static void combine_hashes(size_t &combined, size_t other)
void set_name(const std::string name)
virtual void init_execution()
unsigned int get_height() const
void set_id(const int id)
void set_canvas(const rcti &canvas_area)
virtual void execute_pixel_filtered(float[4], float, float, float[2], float[2])
calculate a single pixel using an EWA filter
void add_output_socket(DataType datatype)
void read_filtered(float result[4], float x, float y, float dx[2], float dy[2])
virtual void execute_opencl_region(OpenCLDevice *, rcti *, unsigned int, MemoryBuffer **, MemoryBuffer *)
when a chunk is executed by an OpenCLDevice, this method is called
unsigned int get_number_of_output_sockets() const
virtual bool is_output_operation(bool) const
is_output_operation determines whether this operation is an output of the ExecutionSystem during rend...
virtual void update_memory_buffer(MemoryBuffer *UNUSED(output), const rcti &UNUSED(area), Span< MemoryBuffer * > UNUSED(inputs))
const NodeOperationFlags get_flags() const
SocketReader * get_input_socket_reader(unsigned int index)
virtual void get_area_of_interest(int input_idx, const rcti &output_area, rcti &r_input_area)
Get input operation area being read by this operation on rendering given output area.
std::optional< NodeOperationHash > generate_hash()
float get_constant_value_default(float default_value)
virtual MemoryBuffer * get_input_memory_buffer(MemoryBuffer **)
unsigned int get_number_of_input_sockets() const
unsigned int get_width() const
eExecutionModel execution_model_
NodeOperationFlags flags_
virtual bool is_active_viewer_output() const
is this operation the active viewer output user can select an ViewerNode to be active (the result of ...
NodeOperationOutput * get_output_socket(unsigned int index=0)
const rcti & get_canvas() const
NodeOperation * get_input_operation(int index)
const float * get_constant_elem_default(const float *default_elem)
void hash_params(T1 param1, T2 param2, T3 param3)
ExecutionSystem * exec_system_
virtual void deinit_execution()
NodeOperationInput * get_input_socket(unsigned int index)
void set_width(unsigned int width)
virtual void execute_region(rcti *, unsigned int)
when a chunk is executed by a CPUDevice, this method is called
void read(float result[4], int x, int y, void *chunk_data)
virtual bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output)
virtual void execute_opencl(OpenCLDevice *, MemoryBuffer *, cl_mem, MemoryBuffer **, std::list< cl_mem > *, std::list< cl_kernel > *)
custom handle to add new tasks to the OpenCL command queue in order to execute a chunk on an GPUDevic...
virtual eCompositorPriority get_render_priority() const
get the render priority of this node.
void set_height(unsigned int height)
virtual void deinitialize_tile_data(rcti *, void *)
void read_sampled(float result[4], float x, float y, PixelSampler sampler)
virtual std::unique_ptr< MetaData > get_meta_data()
void set_determined_canvas_modifier(std::function< void(rcti &canvas)> fn)
virtual void hash_output_params()
void add_input_socket(DataType datatype, ResizeMode resize_mode=ResizeMode::Center)
virtual void execute_pixel(float output[4], int x, int y, void *)
calculate a single pixel
void set_execution_system(ExecutionSystem *system)
const std::string get_name() const
void set_canvas_input_index(unsigned int index)
set the index of the input socket that will determine the canvas of this operation
void hash_params(T1 param1, T2 param2)
virtual void execute_pixel_sampled(float[4], float, float, PixelSampler)
calculate a single pixel
void set_complex(bool complex)
set whether this operation is complex
void set_execution_model(const eExecutionModel model)
virtual void * initialize_tile_data(rcti *)
void render(MemoryBuffer *output_buf, Span< rcti > areas, Span< MemoryBuffer * > inputs_bufs)
virtual void determine_canvas(const rcti &preferred_area, rcti &r_area)
device representing an GPU OpenCL device. an instance of this class represents a single cl_device
SyclQueue void void size_t num_bytes void
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
eCompositorPriority
Possible priority settings.
@ Low
Low quality setting.
DataType
possible data types for sockets
ResizeMode
Resize modes of inputsockets How are the input and working resolutions matched.
@ FitAny
Fit the width or the height of the input image to the width or height of the working area of the node...
@ FitWidth
Fit the width of the input image to the width of the working area of the node.
@ Center
Center the input image to the center of the working area of the node, no resizing occurs.
@ FitHeight
Fit the height of the input image to the height of the working area of the node.
@ Stretch
Fit the width and the height of the input image to the width and height of the working area of the no...
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_global KernelShaderEvalInput * input
static constexpr unsigned int RESOLUTION_INPUT_ANY
static void area(int d1, int d2, int e1, int e2, float weights[2])
constexpr rcti COM_AREA_NONE
NodeOperation SocketReader
std::ostream & operator<<(std::ostream &os, const eCompositorPriority &priority)
uint64_t get_default_hash(const T &v)
uint64_t get_default_hash_2(const T1 &v1, const T2 &v2)
uint64_t get_default_hash_3(const T1 &v1, const T2 &v2, const T3 &v3)
static bNodeSocketTemplate inputs[]
int(* test_break)(void *)
void(* update_draw)(void *)
bool is_write_buffer_operation
bool use_datatype_conversion
bool is_preview_operation
bool is_constant_operation
bool is_read_buffer_operation
bool is_fullframe_operation
bool operator!=(const NodeOperationHash &other) const
bool operator==(const NodeOperationHash &other) const
NodeOperation * get_operation() const
bool operator<(const NodeOperationHash &other) const