Blender V4.5
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
43
44 /* Adaptive stopping. */
45
49 const int x,
50 const int y,
51 const float threshold,
52 const int reset,
53 const int offset,
54 int stride)>;
55
59 const int y,
60 const int start_x,
61 const int width,
62 const int offset,
63 int stride)>;
64
68 const int x,
69 const int start_y,
70 const int height,
71 const int offset,
72 int stride)>;
73
75
78
79 /* Cryptomatte. */
80
82 const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int pixel_index)>;
83
85
86 /* Film Convert. */
87 using FilmConvertFunction = CPUKernelFunction<void (*)(const KernelFilmConvert *kfilm_convert,
88 const float *buffer,
89 float *pixel,
90 const int width,
91 const int buffer_stride,
92 const int pixel_stride)>;
94 CPUKernelFunction<void (*)(const KernelFilmConvert *kfilm_convert,
95 const float *buffer,
96 half4 *pixel,
97 const int width,
98 const int buffer_stride)>;
99
100#define KERNEL_FILM_CONVERT_FUNCTION(name) \
101 FilmConvertFunction film_convert_##name; \
102 FilmConvertHalfRGBAFunction film_convert_half_rgba_##name;
103
106 KERNEL_FILM_CONVERT_FUNCTION(sample_count)
108
111
114 KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher)
115 KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher_matte_with_shadow)
118
119#undef KERNEL_FILM_CONVERT_FUNCTION
120
121 CPUKernels();
122};
123
void reset()
clear internal cached data and reset random seed
AdaptiveSamplingConvergenceCheckFunction adaptive_sampling_convergence_check
CPUKernelFunction< void(*)(const KernelFilmConvert *kfilm_convert, const float *buffer, half4 *pixel, const int width, const int buffer_stride)> FilmConvertHalfRGBAFunction
ShaderEvalFunction shader_eval_background
CryptomattePostprocessFunction cryptomatte_postprocess
CPUKernelFunction< void(*)( const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *, float *, const int)> ShaderEvalFunction
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, IntegratorStateCPU *state)> IntegratorFunction
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
CPUKernelFunction< void(*)( const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int pixel_index)> CryptomattePostprocessFunction
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)> AdaptiveSamplingFilterYFunction
ShaderEvalFunction shader_eval_curve_shadow_transparency
IntegratorShadeFunction integrator_megakernel
AdaptiveSamplingFilterYFunction adaptive_sampling_filter_y
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)> AdaptiveSamplingFilterXFunction
IntegratorInitFunction integrator_init_from_bake
CPUKernelFunction< void(*)(const KernelFilmConvert *kfilm_convert, const float *buffer, float *pixel, const int width, const int buffer_stride, const int pixel_stride)> FilmConvertFunction
AdaptiveSamplingFilterXFunction adaptive_sampling_filter_x
IntegratorInitFunction integrator_init_from_camera
CPUKernelFunction< void(*)(const ThreadKernelGlobalsCPU *kg, IntegratorStateCPU *state, ccl_global float *render_buffer)> IntegratorShadeFunction
CPUKernelFunction< bool(*)(const ThreadKernelGlobalsCPU *kg, IntegratorStateCPU *state, KernelWorkTile *tile, ccl_global float *render_buffer)> IntegratorInitFunction
#define ccl_global
#define KERNEL_FILM_CONVERT_FUNCTION(name)
#define CCL_NAMESPACE_END
VecBase< float, 4 > float4
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