Blender V5.0
kernel_arch_impl.h File Reference

Go to the source code of this file.

Macros

#define KERNEL_INVOKE(name, ...)
#define DEFINE_INTEGRATOR_INIT_KERNEL(name)
#define DEFINE_INTEGRATOR_SHADE_KERNEL(name)
#define KERNEL_FILM_CONVERT_FUNCTION(name, is_float)

Functions

void KERNEL_FUNCTION_FULL_NAME shader_eval_displace (const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
void KERNEL_FUNCTION_FULL_NAME shader_eval_background (const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
void KERNEL_FUNCTION_FULL_NAME shader_eval_curve_shadow_transparency (const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
void KERNEL_FUNCTION_FULL_NAME shader_eval_volume_density (const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
bool KERNEL_FUNCTION_FULL_NAME adaptive_sampling_convergence_check (const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int x, const int y, const float threshold, const int reset, const int offset, const int stride)
void KERNEL_FUNCTION_FULL_NAME adaptive_sampling_filter_x (const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int y, const int start_x, const int width, const int offset, const int stride)
void KERNEL_FUNCTION_FULL_NAME adaptive_sampling_filter_y (const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int x, const int start_y, const int height, const int offset, const int stride)
void KERNEL_FUNCTION_FULL_NAME cryptomatte_postprocess (const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int pixel_index)
void KERNEL_FUNCTION_FULL_NAME volume_guiding_filter_x (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, const int stride)
void KERNEL_FUNCTION_FULL_NAME volume_guiding_filter_y (const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int x, const int min_y, const int max_y, const int offset, const int stride)

Macro Definition Documentation

◆ DEFINE_INTEGRATOR_INIT_KERNEL

#define DEFINE_INTEGRATOR_INIT_KERNEL ( name)
Value:
bool KERNEL_FUNCTION_FULL_NAME(integrator_##name)(const ThreadKernelGlobalsCPU *kg, \
{ \
(void)kg; \
(void)state; \
(void)tile; \
(void)render_buffer; \
return KERNEL_INVOKE( \
name, kg, state, tile, render_buffer, tile->x, tile->y, tile->start_sample); \
}
#define ccl_global
#define KERNEL_FUNCTION_FULL_NAME(name)
const ccl_global KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
#define KERNEL_INVOKE(name,...)
static ulong state[N]
const char * name

Definition at line 56 of file kernel_arch_impl.h.

◆ DEFINE_INTEGRATOR_SHADE_KERNEL

#define DEFINE_INTEGRATOR_SHADE_KERNEL ( name)
Value:
void KERNEL_FUNCTION_FULL_NAME(integrator_##name)(const ThreadKernelGlobalsCPU *kg, \
{ \
(void)kg; \
(void)state; \
(void)render_buffer; \
KERNEL_INVOKE(name, kg, state, render_buffer); \
}

Definition at line 70 of file kernel_arch_impl.h.

◆ KERNEL_FILM_CONVERT_FUNCTION

#define KERNEL_FILM_CONVERT_FUNCTION ( name,
is_float )
Value:
void KERNEL_FUNCTION_FULL_NAME(film_convert_##name)(const KernelFilmConvert *kfilm_convert, \
const float *buffer, \
float *pixel, \
const int width, \
const int buffer_stride, \
const int pixel_stride) \
{ \
for (int i = 0; i < width; i++, buffer += buffer_stride, pixel += pixel_stride) { \
film_get_pass_pixel_##name(kfilm_convert, buffer, pixel); \
} \
} \
void KERNEL_FUNCTION_FULL_NAME(film_convert_half_rgba_##name)( \
const KernelFilmConvert *kfilm_convert, \
const float *buffer, \
half4 *pixel, \
const int width, \
const int buffer_stride) \
{ \
for (int i = 0; i < width; i++, buffer += buffer_stride, pixel++) { \
float pixel_rgba[4] = {0.0f, 0.0f, 0.0f, 1.0f}; \
film_get_pass_pixel_##name(kfilm_convert, buffer, pixel_rgba); \
if (is_float) { \
pixel_rgba[1] = pixel_rgba[0]; \
pixel_rgba[2] = pixel_rgba[0]; \
} \
film_apply_pass_pixel_overlays_rgba(kfilm_convert, buffer, pixel_rgba); \
make_float4(pixel_rgba[0], pixel_rgba[1], pixel_rgba[2], pixel_rgba[3])); \
} \
}
VecBase< half, 4 > half4
ccl_device_inline half4 float4_to_half4_display(const float4 f)
Definition half.h:151
#define make_float4
i
Definition text_draw.cc:230

Definition at line 336 of file kernel_arch_impl.h.

◆ KERNEL_INVOKE

#define KERNEL_INVOKE ( name,
... )
Value:
integrator_##name(__VA_ARGS__)

Definition at line 51 of file kernel_arch_impl.h.

Function Documentation

◆ adaptive_sampling_convergence_check()

bool KERNEL_FUNCTION_FULL_NAME adaptive_sampling_convergence_check ( const ThreadKernelGlobalsCPU * kg,
ccl_global float * render_buffer,
const int x,
const int y,
const float threshold,
const int reset,
const int offset,
const int stride )

◆ adaptive_sampling_filter_x()

void KERNEL_FUNCTION_FULL_NAME adaptive_sampling_filter_x ( const ThreadKernelGlobalsCPU * kg,
ccl_global float * render_buffer,
const int y,
const int start_x,
const int width,
const int offset,
const int stride )

◆ adaptive_sampling_filter_y()

void KERNEL_FUNCTION_FULL_NAME adaptive_sampling_filter_y ( const ThreadKernelGlobalsCPU * kg,
ccl_global float * render_buffer,
const int x,
const int start_y,
const int height,
const int offset,
const int stride )

◆ cryptomatte_postprocess()

void KERNEL_FUNCTION_FULL_NAME cryptomatte_postprocess ( const ThreadKernelGlobalsCPU * kg,
ccl_global float * render_buffer,
const int pixel_index )

◆ shader_eval_background()

void KERNEL_FUNCTION_FULL_NAME shader_eval_background ( const ThreadKernelGlobalsCPU * kg,
const KernelShaderEvalInput * input,
float * output,
const int offset )

◆ shader_eval_curve_shadow_transparency()

void KERNEL_FUNCTION_FULL_NAME shader_eval_curve_shadow_transparency ( const ThreadKernelGlobalsCPU * kg,
const KernelShaderEvalInput * input,
float * output,
const int offset )

◆ shader_eval_displace()

void KERNEL_FUNCTION_FULL_NAME shader_eval_displace ( const ThreadKernelGlobalsCPU * kg,
const KernelShaderEvalInput * input,
float * output,
const int offset )

◆ shader_eval_volume_density()

void KERNEL_FUNCTION_FULL_NAME shader_eval_volume_density ( const ThreadKernelGlobalsCPU * kg,
const KernelShaderEvalInput * input,
float * output,
const int offset )

◆ volume_guiding_filter_x()

void KERNEL_FUNCTION_FULL_NAME volume_guiding_filter_x ( 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,
const int stride )

◆ volume_guiding_filter_y()

void KERNEL_FUNCTION_FULL_NAME volume_guiding_filter_y ( const ThreadKernelGlobalsCPU * kg,
ccl_global float * render_buffer,
const int x,
const int min_y,
const int max_y,
const int offset,
const int stride )