Blender  V3.3
COM_ReadBufferOperation.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #pragma once
5 
6 #include "COM_MemoryBuffer.h"
7 #include "COM_MemoryProxy.h"
8 #include "COM_NodeOperation.h"
9 
10 namespace blender::compositor {
11 
13  private:
14  MemoryProxy *memory_proxy_;
15  bool single_value_; /* single value stored in buffer, copied from associated write operation */
16  unsigned int offset_;
17  MemoryBuffer *buffer_;
18 
19  public:
20  ReadBufferOperation(DataType datatype);
21  void set_memory_proxy(MemoryProxy *memory_proxy)
22  {
23  memory_proxy_ = memory_proxy;
24  }
25 
27  {
28  return memory_proxy_;
29  }
30 
31  void determine_canvas(const rcti &preferred_area, rcti &r_area) override;
32 
33  void *initialize_tile_data(rcti *rect) override;
34  void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override;
35  void execute_pixel_extend(float output[4],
36  float x,
37  float y,
39  MemoryBufferExtend extend_x,
40  MemoryBufferExtend extend_y);
42  float output[4], float x, float y, float dx[2], float dy[2]) override;
43  void set_offset(unsigned int offset)
44  {
45  offset_ = offset;
46  }
47  unsigned int get_offset() const
48  {
49  return offset_;
50  }
52  ReadBufferOperation *read_operation,
53  rcti *output) override;
55  {
56  return memory_buffers[offset_];
57  }
59  void update_memory_buffer();
60 };
61 
62 } // namespace blender::compositor
_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
a MemoryBuffer contains access to the data of a chunk
A MemoryProxy is a unique identifier for a memory buffer. A single MemoryProxy is used among all chun...
NodeOperation contains calculation logic.
void determine_canvas(const rcti &preferred_area, rcti &r_area) override
void execute_pixel_extend(float output[4], float x, float y, PixelSampler sampler, MemoryBufferExtend extend_x, MemoryBufferExtend extend_y)
bool determine_depending_area_of_interest(rcti *input, ReadBufferOperation *read_operation, rcti *output) override
void execute_pixel_sampled(float output[4], float x, float y, PixelSampler sampler) override
calculate a single pixel
void set_memory_proxy(MemoryProxy *memory_proxy)
void execute_pixel_filtered(float output[4], float x, float y, float dx[2], float dy[2]) override
calculate a single pixel using an EWA filter
MemoryBuffer * get_input_memory_buffer(MemoryBuffer **memory_buffers) override
depth_tx sampler(1, ImageType::FLOAT_2D, "combined_tx") .sampler(2
DataType
possible data types for sockets
Definition: COM_defines.h:30
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
ccl_global KernelShaderEvalInput * input