Blender V4.3
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#include "util/types.h"
10
12
13struct KernelGlobalsCPU;
16struct TileInfo;
17
19 public:
20 /* Integrator. */
21
30
45
46 /* Shader evaluation. */
47
49 const KernelGlobalsCPU *kg, const KernelShaderEvalInput *, float *, const int)>;
50
54
55 /* Adaptive stopping. */
56
58 CPUKernelFunction<bool (*)(const KernelGlobalsCPU *kg,
60 int x,
61 int y,
62 float threshold,
63 int reset,
64 int offset,
65 int stride)>;
66
68 CPUKernelFunction<void (*)(const KernelGlobalsCPU *kg,
70 int y,
71 int start_x,
72 int width,
73 int offset,
74 int stride)>;
75
77 CPUKernelFunction<void (*)(const KernelGlobalsCPU *kg,
79 int x,
80 int start_y,
81 int height,
82 int offset,
83 int stride)>;
84
86
89
90 /* Cryptomatte. */
91
93 const KernelGlobalsCPU *kg, ccl_global float *render_buffer, 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(sample_count)
119
122
125 KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher)
126 KERNEL_FILM_CONVERT_FUNCTION(shadow_catcher_matte_with_shadow)
129
130#undef KERNEL_FILM_CONVERT_FUNCTION
131
132 CPUKernels();
133};
134
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
IntegratorFunction integrator_intersect_subsurface
ShaderEvalFunction shader_eval_background
IntegratorShadeFunction integrator_shade_dedicated_light
CryptomattePostprocessFunction cryptomatte_postprocess
IntegratorShadeFunction integrator_shade_shadow
IntegratorShadeFunction integrator_shade_surface
CPUKernelFunction< void(*)(const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int x, int start_y, int height, int offset, int stride)> AdaptiveSamplingFilterYFunction
IntegratorShadeFunction integrator_intersect_closest
CPUKernelFunction< void(*)(const KernelGlobalsCPU *kg, IntegratorStateCPU *state)> IntegratorFunction
IntegratorFunction integrator_intersect_shadow
ShaderEvalFunction shader_eval_displace
CPUKernelFunction< bool(*)(const KernelGlobalsCPU *kg, IntegratorStateCPU *state, KernelWorkTile *tile, ccl_global float *render_buffer)> IntegratorInitFunction
IntegratorFunction integrator_intersect_volume_stack
CPUKernelFunction< void(*)(const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int y, int start_x, int width, int offset, int stride)> AdaptiveSamplingFilterXFunction
ShaderEvalFunction shader_eval_curve_shadow_transparency
IntegratorFunction integrator_intersect_dedicated_light
IntegratorShadeFunction integrator_shade_background
CPUKernelFunction< void(*)( const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int pixel_index)> CryptomattePostprocessFunction
IntegratorShadeFunction integrator_megakernel
CPUKernelFunction< void(*)( const KernelGlobalsCPU *kg, const KernelShaderEvalInput *, float *, const int)> ShaderEvalFunction
CPUKernelFunction< bool(*)(const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int x, int y, float threshold, int reset, int offset, int stride)> AdaptiveSamplingConvergenceCheckFunction
AdaptiveSamplingFilterYFunction adaptive_sampling_filter_y
CPUKernelFunction< void(*)( const KernelGlobalsCPU *kg, IntegratorStateCPU *state, ccl_global float *render_buffer)> IntegratorShadeFunction
IntegratorShadeFunction integrator_shade_volume
IntegratorShadeFunction integrator_shade_light
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
#define KERNEL_FILM_CONVERT_FUNCTION(name)
#define ccl_global
#define CCL_NAMESPACE_END
draw_view push_constant(Type::INT, "radiance_src") .push_constant(Type capture_info_buf storage_buf(1, Qualifier::READ, "ObjectBounds", "bounds_buf[]") .push_constant(Type draw_view int
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
static ulong state[N]
Definition half.h:61
VecBase< float, 4 > float4