Blender  V3.3
device/cpu/kernel.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: Apache-2.0
2  * Copyright 2011-2022 Blender Foundation */
3 
4 #pragma once
5 
7 #include "util/half.h"
8 #include "util/types.h"
9 
11 
12 struct KernelGlobalsCPU;
13 struct KernelFilmConvert;
14 struct IntegratorStateCPU;
15 struct TileInfo;
16 
17 class CPUKernels {
18  public:
19  /* Integrator. */
20 
28  ccl_global float *render_buffer)>;
29 
42 
43  /* Shader evaluation. */
44 
46  const KernelGlobalsCPU *kg, const KernelShaderEvalInput *, float *, const int)>;
47 
51 
52  /* Adaptive stopping. */
53 
57  int x,
58  int y,
59  float threshold,
60  bool reset,
61  int offset,
62  int stride)>;
63 
67  int y,
68  int start_x,
69  int width,
70  int offset,
71  int stride)>;
72 
76  int x,
77  int start_y,
78  int height,
79  int offset,
80  int stride)>;
81 
83 
86 
87  /* Cryptomatte. */
88 
90  const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int pixel_index)>;
91 
93 
94  /* Film Convert. */
95  using FilmConvertFunction = CPUKernelFunction<void (*)(const KernelFilmConvert *kfilm_convert,
96  const float *buffer,
97  float *pixel,
98  const int width,
99  const int buffer_stride,
100  const int pixel_stride)>;
102  CPUKernelFunction<void (*)(const KernelFilmConvert *kfilm_convert,
103  const float *buffer,
104  half4 *pixel,
105  const int width,
106  const int buffer_stride)>;
107 
108 #define KERNEL_FILM_CONVERT_FUNCTION(name) \
109  FilmConvertFunction film_convert_##name; \
110  FilmConvertHalfRGBAFunction film_convert_half_rgba_##name;
111 
114  KERNEL_FILM_CONVERT_FUNCTION(sample_count)
116 
117  KERNEL_FILM_CONVERT_FUNCTION(light_path)
119 
121  KERNEL_FILM_CONVERT_FUNCTION(cryptomatte)
122  KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher)
123  KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher_matte_with_shadow)
126 
127 #undef KERNEL_FILM_CONVERT_FUNCTION
128 
129  CPUKernels();
130 };
131 
_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
_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 GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei stride
float float4[4]
AdaptiveSamplingConvergenceCheckFunction adaptive_sampling_convergence_check
IntegratorFunction integrator_intersect_subsurface
ShaderEvalFunction shader_eval_background
CryptomattePostprocessFunction cryptomatte_postprocess
IntegratorShadeFunction integrator_shade_shadow
IntegratorShadeFunction integrator_shade_surface
IntegratorShadeFunction integrator_intersect_closest
IntegratorFunction integrator_intersect_shadow
ShaderEvalFunction shader_eval_displace
IntegratorFunction integrator_intersect_volume_stack
ShaderEvalFunction shader_eval_curve_shadow_transparency
IntegratorShadeFunction integrator_shade_background
IntegratorShadeFunction integrator_megakernel
AdaptiveSamplingFilterYFunction adaptive_sampling_filter_y
IntegratorShadeFunction integrator_shade_volume
IntegratorShadeFunction integrator_shade_light
IntegratorInitFunction integrator_init_from_bake
AdaptiveSamplingFilterXFunction adaptive_sampling_filter_x
IntegratorInitFunction integrator_init_from_camera
#define ccl_global
Definition: cuda/compat.h:43
#define CCL_NAMESPACE_END
Definition: cuda/compat.h:9
#define KERNEL_FILM_CONVERT_FUNCTION(name)
SyclQueue void void size_t num_bytes void
ccl_global float * buffer
ccl_gpu_kernel_postfix ccl_global float int int int int float threshold
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
const int state
ccl_gpu_kernel_postfix ccl_global float int int int int float bool reset
clear internal cached data and reset random seed
Definition: half.h:64