Blender V5.0
device/cpu/kernel.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011-2022 Blender Foundation
2 *
3 * SPDX-License-Identifier: Apache-2.0 */
4
5#pragma once
6
8#include "util/half.h"
9
11
15struct TileInfo;
16
18 public:
19 /* Integrator. */
20
30
34
35 /* Shader evaluation. */
36
38 const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *, float *, const int)>;
39
44
45 /* Adaptive stopping. */
46
50 const int x,
51 const int y,
52 const float threshold,
53 const int reset,
54 const int offset,
55 int stride)>;
56
59 const int y,
60 const int start_x,
61 const int width,
62 const int offset,
63 int stride)>;
64
67 const int x,
68 const int start_y,
69 const int height,
70 const int offset,
71 int stride)>;
72
74
77
78 /* Volume Scattering Probability Guiding. */
81 const int y,
82 const int center_x,
83 const int min_x,
84 const int max_x,
85 const int offset,
86 int stride)>
89
90 /* Cryptomatte. */
91
93 const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int pixel_index)>;
94
96
97 /* Film Convert. */
98 using FilmConvertFunction = CPUKernelFunction<void (*)(const KernelFilmConvert *kfilm_convert,
99 const float *buffer,
100 float *pixel,
101 const int width,
102 const int buffer_stride,
103 const int pixel_stride)>;
105 CPUKernelFunction<void (*)(const KernelFilmConvert *kfilm_convert,
106 const float *buffer,
107 half4 *pixel,
108 const int width,
109 const int buffer_stride)>;
110
111#define KERNEL_FILM_CONVERT_FUNCTION(name) \
112 FilmConvertFunction film_convert_##name; \
113 FilmConvertHalfRGBAFunction film_convert_half_rgba_##name;
114
117 KERNEL_FILM_CONVERT_FUNCTION(volume_majorant)
118 KERNEL_FILM_CONVERT_FUNCTION(sample_count)
120
124
127 KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher)
128 KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher_matte_with_shadow)
131
132#undef KERNEL_FILM_CONVERT_FUNCTION
133
134 CPUKernels();
135};
136
void reset()
clear internal cached data and reset random seed
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, IntegratorStateCPU *state, ccl_global float *render_buffer)> IntegratorShadeFunction
FilterYFunction volume_guiding_filter_y
AdaptiveSamplingConvergenceCheckFunction adaptive_sampling_convergence_check
ShaderEvalFunction shader_eval_background
CryptomattePostprocessFunction cryptomatte_postprocess
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, IntegratorStateCPU *state)> IntegratorFunction
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int y, const int center_x, const int min_x, const int max_x, const int offset, int stride)> volume_guiding_filter_x
ShaderEvalFunction shader_eval_volume_density
CPUKernelFunction< bool(*)(const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int x, const int y, const float threshold, const int reset, const int offset, int stride)> AdaptiveSamplingConvergenceCheckFunction
ShaderEvalFunction shader_eval_displace
FilterYFunction adaptive_sampling_filter_y
FilterXFunction adaptive_sampling_filter_x
CPUKernelFunction< void(*)(const KernelFilmConvert *kfilm_convert, const float *buffer, float *pixel, const int width, const int buffer_stride, const int pixel_stride)> FilmConvertFunction
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int x, const int start_y, const int height, const int offset, int stride)> FilterYFunction
ShaderEvalFunction shader_eval_curve_shadow_transparency
IntegratorShadeFunction integrator_megakernel
CPUKernelFunction< void(*)( const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int pixel_index)> CryptomattePostprocessFunction
CPUKernelFunction< bool(*)(const ThreadKernelGlobalsCPU *kg, IntegratorStateCPU *state, KernelWorkTile *tile, ccl_global float *render_buffer)> IntegratorInitFunction
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int y, const int start_x, const int width, const int offset, int stride)> FilterXFunction
IntegratorInitFunction integrator_init_from_bake
CPUKernelFunction< void(*)(const KernelFilmConvert *kfilm_convert, const float *buffer, half4 *pixel, const int width, const int buffer_stride)> FilmConvertHalfRGBAFunction
CPUKernelFunction< void(*)( const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *, float *, const int)> ShaderEvalFunction
IntegratorInitFunction integrator_init_from_camera
#define ccl_global
#define KERNEL_FILM_CONVERT_FUNCTION(name)
#define CCL_NAMESPACE_END
const ccl_global KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
static ulong state[N]
Definition half.h:60