Blender V4.3
kernel_arch_impl.h File Reference

Go to the source code of this file.

Macros

#define KERNEL_INVOKE(name, ...)   integrator_##name(__VA_ARGS__)
 
#define DEFINE_INTEGRATOR_INIT_KERNEL(name)
 
#define DEFINE_INTEGRATOR_KERNEL(name)
 
#define DEFINE_INTEGRATOR_SHADE_KERNEL(name)
 
#define DEFINE_INTEGRATOR_SHADOW_KERNEL(name)
 
#define DEFINE_INTEGRATOR_SHADOW_SHADE_KERNEL(name)
 
#define KERNEL_FILM_CONVERT_FUNCTION(name, is_float)
 

Functions

void KERNEL_FUNCTION_FULL_NAME shader_eval_displace (const KernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
 
void KERNEL_FUNCTION_FULL_NAME shader_eval_background (const KernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
 
void KERNEL_FUNCTION_FULL_NAME shader_eval_curve_shadow_transparency (const KernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
 
bool KERNEL_FUNCTION_FULL_NAME adaptive_sampling_convergence_check (const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int x, int y, float threshold, int reset, int offset, int stride)
 
void KERNEL_FUNCTION_FULL_NAME adaptive_sampling_filter_x (const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int y, int start_x, int width, int offset, int stride)
 
void KERNEL_FUNCTION_FULL_NAME adaptive_sampling_filter_y (const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int x, int start_y, int height, int offset, int stride)
 
void KERNEL_FUNCTION_FULL_NAME cryptomatte_postprocess (const KernelGlobalsCPU *kg, ccl_global float *render_buffer, int pixel_index)
 

Macro Definition Documentation

◆ DEFINE_INTEGRATOR_INIT_KERNEL

#define DEFINE_INTEGRATOR_INIT_KERNEL ( name)
Value:
bool KERNEL_FUNCTION_FULL_NAME(integrator_##name)(const KernelGlobalsCPU *kg, \
{ \
return KERNEL_INVOKE( \
}
#define ccl_global
#define KERNEL_FUNCTION_FULL_NAME(name)
ccl_global const KernelWorkTile * tile
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
#define KERNEL_INVOKE(name,...)
static ulong state[N]

Definition at line 63 of file kernel_arch_impl.h.

◆ DEFINE_INTEGRATOR_KERNEL

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

Definition at line 73 of file kernel_arch_impl.h.

◆ DEFINE_INTEGRATOR_SHADE_KERNEL

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

Definition at line 80 of file kernel_arch_impl.h.

◆ DEFINE_INTEGRATOR_SHADOW_KERNEL

#define DEFINE_INTEGRATOR_SHADOW_KERNEL ( name)
Value:
void KERNEL_FUNCTION_FULL_NAME(integrator_##name)(const KernelGlobalsCPU *kg, \
{ \
KERNEL_INVOKE(name, kg, &state->shadow); \
}

Definition at line 87 of file kernel_arch_impl.h.

◆ DEFINE_INTEGRATOR_SHADOW_SHADE_KERNEL

#define DEFINE_INTEGRATOR_SHADOW_SHADE_KERNEL ( name)
Value:
void KERNEL_FUNCTION_FULL_NAME(integrator_##name)( \
{ \
KERNEL_INVOKE(name, kg, &state->shadow, render_buffer); \
}

Definition at line 94 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])); \
} \
}
ccl_device_forceinline float4 make_float4(const float x, const float y, const float z, const float w)
ccl_device_inline half4 float4_to_half4_display(const float4 f)
Definition half.h:152
Definition half.h:61

Definition at line 253 of file kernel_arch_impl.h.

◆ KERNEL_INVOKE

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

Definition at line 58 of file kernel_arch_impl.h.

Function Documentation

◆ adaptive_sampling_convergence_check()

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

◆ adaptive_sampling_filter_x()

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

◆ adaptive_sampling_filter_y()

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

◆ cryptomatte_postprocess()

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

◆ shader_eval_background()

void KERNEL_FUNCTION_FULL_NAME shader_eval_background ( const KernelGlobalsCPU * 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 KernelGlobalsCPU * kg,
const KernelShaderEvalInput * input,
float * output,
const int offset )

◆ shader_eval_displace()

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

Definition at line 120 of file kernel_arch_impl.h.

References KERNEL_ARCH, kernel_displace_evaluate(), and shader_eval_displace().

Referenced by shader_eval_displace().