16#ifdef __KERNEL_METAL__
18#elif defined(__KERNEL_ONEAPI__)
48#ifdef __KERNEL_METAL__
50#elif defined(__KERNEL_ONEAPI__)
150#if !defined(__KERNEL_HIPRT__)
154# ifdef __KERNEL_ONEAPI__
247# ifdef __KERNEL_ONEAPI__
328#if defined(__KERNEL_METAL_APPLE__) && defined(__KERNEL_METALRT__)
332#if !defined(__KERNEL_HIPRT__)
336# ifdef __KERNEL_ONEAPI__
351# if defined(__KERNEL_METAL_APPLE__) && defined(__KERNEL_METALRT__)
355 kg += __dummy_constant;
364# ifdef __KERNEL_ONEAPI__
420 const int kernel_index)
424 ccl_gpu_kernel_lambda_pass.kernel_index = kernel_index;
435 const int kernel_index)
439 ccl_gpu_kernel_lambda_pass.kernel_index = kernel_index;
462 const int indices_offset)
467 num_states, indices + indices_offset, num_indices, ccl_gpu_kernel_lambda_pass);
476 const int indices_offset)
481 num_states, indices + indices_offset, num_indices, ccl_gpu_kernel_lambda_pass);
488 const int num_states_limit,
493 const int kernel_index)
499 ccl_gpu_kernel_lambda_pass.kernel_index = kernel_index;
509 ccl_gpu_kernel_lambda_pass);
514#ifdef __KERNEL_ONEAPI__
518 const int partition_size,
519 const int num_states_limit,
521 const int kernel_index,
522 sycl::local_accessor<int> &local_mem)
527 const int partition_size,
528 const int num_states_limit,
530 const int kernel_index)
540#ifdef __KERNEL_ONEAPI__
544 local_mem.get_multi_ptr<sycl::access::decorated::no>().
get();
558#ifdef __KERNEL_ONEAPI__
562 const int partition_size,
563 const int num_states_limit,
565 const int kernel_index,
566 sycl::local_accessor<int> &local_mem)
571 const int partition_size,
572 const int num_states_limit,
574 const int kernel_index)
585#ifdef __KERNEL_ONEAPI__
589 local_mem.get_multi_ptr<sycl::access::decorated::no>().
get();
622 const ccl_global int *active_terminated_states,
623 const int active_states_offset,
624 const int terminated_states_offset,
630 const int from_state = active_terminated_states[active_states_offset + global_index];
631 const int to_state = active_terminated_states[terminated_states_offset + global_index];
656 const ccl_global int *active_terminated_states,
657 const int active_states_offset,
658 const int terminated_states_offset,
664 const int from_state = active_terminated_states[active_states_offset + global_index];
665 const int to_state = active_terminated_states[terminated_states_offset + global_index];
690 const float threshold,
697 const int y = work_index / sw;
698 const int x = work_index -
y * sw;
701 bool converged =
true;
703 if (
x < sw &&
y < sh) {
708#ifdef __KERNEL_ONEAPI__
709 const sycl::nd_item<1> &item_id = sycl::ext::oneapi::this_work_item::get_nd_item<1>();
710 const uint num_active_pixels_in_warp = sycl::inclusive_scan_over_group(
711 item_id.get_sub_group(),
static_cast<uint>(!converged), std::plus<>());
712 if (lane_id == item_id.get_sub_group().get_local_range()[0] - 1) {
770 const int num_pixels)
774 if (pixel_index < num_pixels) {
785 const int rgba_offset,
786 const int rgba_stride,
789 const half4 half_pixel)
794 out[0] = half_pixel.
x;
795 out[1] = half_pixel.
y;
796 out[2] = half_pixel.
z;
797 out[3] = half_pixel.
w;
804#ifdef __KERNEL_METAL__
808# define FILM_GET_PASS_PIXEL_F32(variant, input_channel_count) \
809 float local_pixel[4]; \
810 film_get_pass_pixel_##variant(&kfilm_convert, buffer, local_pixel); \
811 if (input_channel_count >= 1) { \
812 pixel[0] = local_pixel[0]; \
814 if (input_channel_count >= 2) { \
815 pixel[1] = local_pixel[1]; \
817 if (input_channel_count >= 3) { \
818 pixel[2] = local_pixel[2]; \
820 if (input_channel_count >= 4) { \
821 pixel[3] = local_pixel[3]; \
826# define FILM_GET_PASS_PIXEL_F32(variant, input_channel_count) \
827 film_get_pass_pixel_##variant(&kfilm_convert, buffer, pixel);
831#define KERNEL_FILM_CONVERT_VARIANT(variant, input_channel_count) \
832 ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) \
833 ccl_gpu_kernel_signature(film_convert_##variant, \
834 const KernelFilmConvert kfilm_convert, \
835 ccl_global float *pixels, \
836 ccl_global float *render_buffer, \
841 int channel_offset, \
845 const int render_pixel_index = ccl_gpu_global_id_x(); \
846 if (render_pixel_index >= num_pixels) { \
850 const int x = render_pixel_index % width; \
851 const int y = render_pixel_index / width; \
853 const uint64_t buffer_pixel_index = x + y * stride; \
854 ccl_global const float *buffer = render_buffer + offset + \
855 buffer_pixel_index * kfilm_convert.pass_stride; \
857 ccl_global float *pixel = pixels + channel_offset + \
858 (render_pixel_index + rgba_offset) * kfilm_convert.pixel_stride; \
860 FILM_GET_PASS_PIXEL_F32(variant, input_channel_count); \
862 ccl_gpu_kernel_postfix \
864 ccl_gpu_kernel(GPU_KERNEL_BLOCK_NUM_THREADS, GPU_KERNEL_MAX_REGISTERS) \
865 ccl_gpu_kernel_signature(film_convert_##variant##_half_rgba, \
866 const KernelFilmConvert kfilm_convert, \
867 ccl_global uchar4 *rgba, \
868 ccl_global float *render_buffer, \
876 const int render_pixel_index = ccl_gpu_global_id_x(); \
877 if (render_pixel_index >= num_pixels) { \
881 const int x = render_pixel_index % width; \
882 const int y = render_pixel_index / width; \
884 const uint64_t buffer_pixel_index = x + y * stride; \
885 ccl_global const float *buffer = render_buffer + offset + \
886 buffer_pixel_index * kfilm_convert.pass_stride; \
889 film_get_pass_pixel_##variant(&kfilm_convert, buffer, pixel); \
891 if (input_channel_count == 1) { \
892 pixel[1] = pixel[2] = pixel[0]; \
894 if (input_channel_count <= 3) { \
898 film_apply_pass_pixel_overlays_rgba(&kfilm_convert, buffer, pixel); \
900 const half4 half_pixel = float4_to_half4_display( \
901 make_float4(pixel[0], pixel[1], pixel[2], pixel[3])); \
902 kernel_gpu_film_convert_half_write(rgba, rgba_offset, rgba_stride, x, y, half_pixel); \
904 ccl_gpu_kernel_postfix
926#undef KERNEL_FILM_CONVERT_VARIANT
1016 const int pass_stride,
1017 const int pass_denoised)
1020 const int y = work_index / width;
1021 const int x = work_index -
y * width;
1023 if (
x >= width ||
y >= height) {
1027 const uint64_t render_pixel_index = offset + (
x + full_x) + (
y + full_y) * stride;
1030 ccl_global float *color_out = buffer + pass_denoised;
1031 color_out[0] =
clamp(color_out[0], 0.0f, 10000.0f);
1032 color_out[1] =
clamp(color_out[1], 0.0f, 10000.0f);
1033 color_out[2] =
clamp(color_out[2], 0.0f, 10000.0f);
1047 const int pass_stride,
1048 const int pass_denoised,
1049 const int num_components)
1051#ifdef __KERNEL_CUDA__
1053 const int y = work_index / width;
1054 const int x = work_index -
y * width;
1056 if (
x >= width ||
y >= height) {
1060 const uint64_t render_pixel_index = offset + (
x + full_x) + (
y + full_y) * stride;
1063 ccl_global float *denoised_pixel = buffer + pass_denoised;
1066 color_value.
x = denoised_pixel[0];
1067 color_value.
y = denoised_pixel[1];
1068 color_value.
z = denoised_pixel[2];
1069 color_value.
w = num_components > 3 ? denoised_pixel[3] : 1.0f;
1071 surf2Dwrite(color_value, color_surface,
x *
sizeof(
float4),
y);
1079 const int guiding_pass_stride,
1080 const int guiding_pass_albedo,
1081 const int guiding_pass_normal,
1082 const int guiding_pass_flow,
1084 const int render_offset,
1085 const int render_stride,
1086 const int render_pass_stride,
1087 const int render_pass_sample_count,
1088 const int render_pass_denoising_albedo,
1089 const int render_pass_denoising_normal,
1090 const int render_pass_motion,
1095 const int num_samples)
1098 const int y = work_index / width;
1099 const int x = work_index -
y * width;
1101 if (
x >= width ||
y >= height) {
1105 const uint64_t render_pixel_index = render_offset + (
x + full_x) + (
y + full_y) * render_stride;
1108 const uint64_t guiding_pixel_index =
x +
y * width;
1109 ccl_global float *guiding_pixel = guiding_buffer + guiding_pixel_index * guiding_pass_stride;
1113 pixel_scale = 1.0f / num_samples;
1116 pixel_scale = 1.0f /
__float_as_uint(buffer[render_pass_sample_count]);
1123 const ccl_global float *albedo_in = buffer + render_pass_denoising_albedo;
1124 ccl_global float *albedo_out = guiding_pixel + guiding_pass_albedo;
1126 albedo_out[0] = albedo_in[0] * pixel_scale;
1127 albedo_out[1] = albedo_in[1] * pixel_scale;
1128 albedo_out[2] = albedo_in[2] * pixel_scale;
1135 const ccl_global float *normal_in = buffer + render_pass_denoising_normal;
1136 ccl_global float *normal_out = guiding_pixel + guiding_pass_normal;
1138 normal_out[0] = normal_in[0] * pixel_scale;
1139 normal_out[1] = normal_in[1] * pixel_scale;
1140 normal_out[2] = normal_in[2] * pixel_scale;
1147 const ccl_global float *motion_in = buffer + render_pass_motion;
1148 ccl_global float *flow_out = guiding_pixel + guiding_pass_flow;
1150 flow_out[0] = -motion_in[0] * pixel_scale;
1151 flow_out[1] = -motion_in[1] * pixel_scale;
1160 const uint64_t specular_albedo_surface,
1161 const uint64_t normal_roughness_surface,
1163 const uint64_t specular_motion_surface,
1165 const int render_offset,
1166 const int render_stride,
1167 const int render_pass_stride,
1168 const int render_pass_sample_count,
1169 const int render_pass_depth,
1170 const int render_pass_albedo,
1171 const int render_pass_specular_albedo,
1172 const int render_pass_normal,
1173 const int render_pass_roughness,
1174 const int render_pass_motion,
1175 const int render_pass_specular_motion,
1180 const int num_samples)
1182#ifdef __KERNEL_CUDA__
1184 const int y = work_index / width;
1185 const int x = work_index -
y * width;
1187 if (
x >= width ||
y >= height) {
1191 const uint64_t render_pixel_index = render_offset + (
x + full_x) + (
y + full_y) * render_stride;
1196 pixel_scale = 1.0f / num_samples;
1199 pixel_scale = 1.0f /
__float_as_uint(buffer[render_pass_sample_count]);
1204 const ccl_global float *depth_in = buffer + render_pass_depth;
1206 const float depth_value = depth_in[0] * pixel_scale;
1208 surf2Dwrite(depth_value, depth_surface,
x *
sizeof(
float),
y);
1213 const ccl_global float *albedo_in = buffer + render_pass_albedo;
1216 albedo_value.
x = albedo_in[0] * pixel_scale;
1217 albedo_value.
y = albedo_in[1] * pixel_scale;
1218 albedo_value.
z = albedo_in[2] * pixel_scale;
1219 albedo_value.
w = 1.0;
1222 albedo_value.
x =
clamp(albedo_value.
x / (1.0f + albedo_value.
x), 0.0f, 1.0f);
1223 albedo_value.
y =
clamp(albedo_value.
y / (1.0f + albedo_value.
y), 0.0f, 1.0f);
1224 albedo_value.
z =
clamp(albedo_value.
z / (1.0f + albedo_value.
z), 0.0f, 1.0f);
1226 surf2Dwrite(albedo_value, albedo_surface,
x *
sizeof(
float4),
y);
1231 const ccl_global float *albedo_in = buffer + render_pass_specular_albedo;
1233 float4 specular_albedo_value;
1234 specular_albedo_value.
x = albedo_in[0] * pixel_scale;
1235 specular_albedo_value.
y = albedo_in[1] * pixel_scale;
1236 specular_albedo_value.
z = albedo_in[2] * pixel_scale;
1237 specular_albedo_value.
w = 1.0;
1239 surf2Dwrite(specular_albedo_value, specular_albedo_surface,
x *
sizeof(
float4),
y);
1244 const ccl_global float *normal_in = buffer + render_pass_normal;
1245 const ccl_global float *roughness_in = buffer + render_pass_roughness;
1247 float4 normal_roughness_value;
1248 normal_roughness_value.
x = normal_in[0] * pixel_scale;
1249 normal_roughness_value.
y = normal_in[1] * pixel_scale;
1250 normal_roughness_value.
z = normal_in[2] * pixel_scale;
1251 normal_roughness_value.
w = roughness_in[0] * pixel_scale;
1253 surf2Dwrite(normal_roughness_value, normal_roughness_surface,
x *
sizeof(
float4),
y);
1258 const ccl_global float *motion_in = buffer + render_pass_motion;
1261 motion_value.
x = motion_in[0] * pixel_scale;
1262 motion_value.
y = motion_in[1] * pixel_scale;
1264 surf2Dwrite(motion_value, motion_surface,
x *
sizeof(
float2),
y);
1269 const ccl_global float *motion_in = buffer + render_pass_specular_motion;
1272 motion_value.
x = motion_in[0] * pixel_scale;
1273 motion_value.
y = motion_in[1] * pixel_scale;
1275 surf2Dwrite(motion_value, specular_motion_surface,
x *
sizeof(
float2),
y);
1284 const int guiding_pass_stride,
1285 const int guiding_pass_albedo,
1292 const int y = work_index / width;
1293 const int x = work_index -
y * width;
1295 if (
x >= width ||
y >= height) {
1299 const uint64_t guiding_pixel_index =
x +
y * width;
1300 ccl_global float *guiding_pixel = guiding_buffer + guiding_pixel_index * guiding_pass_stride;
1302 ccl_global float *albedo_out = guiding_pixel + guiding_pass_albedo;
1303 albedo_out[0] = 0.5f;
1304 albedo_out[1] = 0.5f;
1305 albedo_out[2] = 0.5f;
1318 const int pass_stride,
1319 const int num_samples,
1320 const int pass_noisy,
1321 const int pass_denoised,
1322 const int pass_sample_count,
1323 const int num_components,
1324 const float upscale_factor)
1327 const int y = work_index / width;
1328 const int x = work_index -
y * width;
1330 if (
x >= width ||
y >= height) {
1334 const uint64_t render_pixel_index = offset + (
x + full_x) + (
y + full_y) * stride;
1339 pixel_scale = num_samples;
1341 else if (upscale_factor == 1.0f) {
1345 ccl_global float *denoised_pixel = buffer + pass_denoised;
1347 if (num_components > 3) {
1349 denoised_pixel[3] = 1.0f - denoised_pixel[3];
1352 if (pass_sample_count ==
PASS_UNUSED || upscale_factor == 1.0f) {
1353 for (
int c = 0; c < 4 && c < num_components; c++) {
1354 denoised_pixel[c] *= pixel_scale;
1370 const int pass_stride,
1371 const int num_samples,
1372 const int pass_noisy,
1373 const int pass_denoised,
1374 const int pass_sample_count,
1375 const int num_components,
1376 const float upscale_factor)
1378#ifdef __KERNEL_CUDA__
1380 const int y = work_index / width;
1381 const int x = work_index -
y * width;
1383 if (
x >= width ||
y >= height) {
1387 const uint64_t render_pixel_index = offset + (
x + full_x) + (
y + full_y) * stride;
1392 pixel_scale = num_samples;
1394 else if (upscale_factor == 1.0f) {
1398 ccl_global float *denoised_pixel = buffer + pass_denoised;
1401 surf2Dread(&color_value, color_surface,
x *
sizeof(
float4),
y);
1403 denoised_pixel[0] = color_value.
x;
1404 denoised_pixel[1] = color_value.
y;
1405 denoised_pixel[2] = color_value.
z;
1406 if (num_components > 3) {
1408 denoised_pixel[3] = 1.0f - color_value.
w;
1411 if (pass_sample_count ==
PASS_UNUSED || upscale_factor == 1.0f) {
1412 for (
int c = 0; c < 4 && c < num_components; c++) {
1413 denoised_pixel[c] *= pixel_scale;
1429 const int pass_stride,
1430 const int pass_denoised,
1431 const int num_components)
1434 const int y = work_index / width;
1435 const int x = work_index -
y * width;
1437 if (
x >= width ||
y >= height / 2) {
1441 const uint64_t render_pixel_index = offset + (
x + full_x) + (
y + full_y) * stride;
1443 ccl_global float *buffer_flipped = buffer + (height - 1 -
y * 2) * stride * pass_stride;
1446 for (
int c = 0; c < 4 && c < num_components; c++) {
1447 temp[c] = buffer[c];
1448 buffer[c] = buffer_flipped[c];
1449 buffer_flipped[c] = temp[c];
1466 bool can_split =
false;
1472#ifdef __KERNEL_ONEAPI__
1473 const sycl::nd_item<1> &item_id = sycl::ext::oneapi::this_work_item::get_nd_item<1>();
1474 const uint num_possible_splits_in_warp = sycl::inclusive_scan_over_group(
1475 item_id.get_sub_group(),
static_cast<uint>(can_split), std::plus<>());
1476 if (lane_id == item_id.get_sub_group().get_local_range()[0] - 1) {
1504 const int y = work_index / sw;
1505 const int x = work_index % sw;
1509 nullptr,
render_buffer, sy +
y, sx +
x, sx, sx + sw, offset, stride));
ATOMIC_INLINE uint32_t atomic_fetch_and_add_uint32(uint32_t *p, uint32_t x)
#define GPU_PARALLEL_SORTED_INDEX_INACTIVE_KEY
#define GPU_PARALLEL_SORTED_INDEX_DEFAULT_BLOCK_SIZE
#define GPU_PARALLEL_PREFIX_SUM_DEFAULT_BLOCK_SIZE
#define GPU_PARALLEL_ACTIVE_INDEX_DEFAULT_BLOCK_SIZE
#define GPU_PARALLEL_SORT_BLOCK_SIZE
unsigned long long int uint64_t
ccl_device_inline void film_cryptomatte_post(KernelGlobals kg, ccl_global float *render_buffer, const int pixel_index)
#define kernel_assert(cond)
#define ccl_device_inline
#define ccl_gpu_thread_idx_x
#define ccl_gpu_global_id_x()
#define ccl_gpu_warp_size
#define ccl_gpu_ballot(predicate)
#define kernel_integrator_state
constexpr T clamp(T, U, U) RET
ccl_device bool integrator_init_from_bake(KernelGlobals kg, IntegratorState state, const ccl_global KernelWorkTile *ccl_restrict tile, ccl_global float *render_buffer, const int x, const int y, const int scheduled_sample)
ccl_device bool integrator_init_from_camera(KernelGlobals kg, IntegratorState state, const ccl_global KernelWorkTile *ccl_restrict tile, ccl_global float *render_buffer, const int x_, const int y_, const int scheduled_sample)
ccl_device void integrator_intersect_closest(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
CCL_NAMESPACE_BEGIN ccl_device void integrator_intersect_dedicated_light(KernelGlobals kg, IntegratorState state)
CCL_NAMESPACE_BEGIN ccl_device void integrator_intersect_mnee(KernelGlobals kg, IntegratorState state)
ccl_device void integrator_intersect_shadow(KernelGlobals kg, IntegratorShadowState state)
CCL_NAMESPACE_BEGIN ccl_device void integrator_intersect_subsurface(KernelGlobals kg, IntegratorState state)
ccl_device void integrator_intersect_volume_stack(KernelGlobals kg, IntegratorState state)
ccl_device void kernel_volume_density_evaluate(KernelGlobals kg, ccl_global const KernelShaderEvalInput *input, ccl_global float *output, ccl_global uint *cache_miss, const int offset)
ccl_device void kernel_background_evaluate(KernelGlobals kg, const ccl_global KernelShaderEvalInput *input, ccl_global float *output, ccl_global uint *cache_miss, const int offset)
ccl_device void kernel_curve_shadow_transparency_evaluate(KernelGlobals kg, const ccl_global KernelShaderEvalInput *input, ccl_global float *output, ccl_global uint *cache_miss, const int offset)
CCL_NAMESPACE_BEGIN ccl_device void kernel_displace_evaluate(KernelGlobals kg, const ccl_global KernelShaderEvalInput *input, ccl_global float *output, ccl_global uint *cache_miss, const int offset)
#define ccl_gpu_kernel(block_num_threads, thread_num_registers)
#define GPU_KERNEL_MAX_REGISTERS
#define GPU_KERNEL_BLOCK_NUM_THREADS
#define ccl_gpu_kernel_within_bounds(i, n)
#define ccl_gpu_kernel_call(x)
#define ccl_gpu_kernel_postfix
#define ccl_gpu_kernel_threads(block_num_threads)
#define ccl_gpu_kernel_lambda(func,...)
#define ccl_gpu_kernel_signature(name,...)
const int tile_work_index
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float const int const ccl_global int const int num_active_paths
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int num_tiles
#define KERNEL_FILM_CONVERT_VARIANT(variant, input_channel_count)
ccl_gpu_kernel_postfix ccl_global KernelWorkTile * tiles
ccl_gpu_kernel_postfix const ccl_global int ccl_global float const int work_size
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float const int max_tile_work_size
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float const int const ccl_global int * path_index_array
ccl_gpu_kernel_postfix ccl_global KernelWorkTile const int ccl_global float * render_buffer
const ccl_global KernelWorkTile * tile
ccl_device void film_adaptive_sampling_filter_y(KernelGlobals kg, ccl_global float *render_buffer, const int x, const int start_y, const int height, const int offset, const int stride)
ccl_device void film_adaptive_sampling_filter_x(KernelGlobals kg, ccl_global float *render_buffer, const int y, const int start_x, const int width, const int offset, const int stride)
ccl_device bool film_adaptive_sampling_convergence_check(KernelGlobals 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 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, int stride)
void KERNEL_FUNCTION_FULL_NAME volume_guiding_filter_y(const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, const int x, const int center_y, const int height, const int offset, int stride)
void KERNEL_FUNCTION_FULL_NAME shader_eval_background(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, int stride)
void KERNEL_FUNCTION_FULL_NAME cryptomatte_postprocess(const ThreadKernelGlobalsCPU *kg, ccl_global float *render_buffer, int pixel_index)
void KERNEL_FUNCTION_FULL_NAME shader_eval_displace(const ThreadKernelGlobalsCPU *kg, const KernelShaderEvalInput *input, float *output, const int offset)
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, 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, int stride)
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)
ccl_device_inline uint popcount(const uint x)
std::shared_ptr< const T > get(const GenericKey &key, FunctionRef< std::unique_ptr< T >()> compute_fn)
#define gpu_parallel_active_index_array
CCL_NAMESPACE_BEGIN __device__ void gpu_parallel_prefix_sum(const int global_id, ccl_global int *ccl_restrict counter, ccl_global int *ccl_restrict prefix_sum, const int num_values)
#define gpu_parallel_sort_write_pass
__device__ void gpu_parallel_sorted_index_array(const uint state_index, const uint num_states, const int num_states_limit, ccl_global int *indices, ccl_global int *num_indices, ccl_global int *key_counter, ccl_global int *key_prefix_sum, GetKeyOp get_key_op)
#define gpu_parallel_sort_bucket_pass
ccl_device void integrator_shade_background(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
CCL_NAMESPACE_BEGIN ccl_device void integrator_shade_dedicated_light(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict)
ccl_device void integrator_shade_light_nee(KernelGlobals kg, IntegratorShadowState state, ccl_global float *ccl_restrict)
ccl_device void integrator_shade_light_forward(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
ccl_device void integrator_shade_shadow(KernelGlobals kg, IntegratorShadowState state, ccl_global float *ccl_restrict render_buffer)
ccl_device_forceinline void integrator_shade_surface(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
ccl_device_forceinline void integrator_shade_surface_raytrace(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
ccl_device void integrator_shade_volume_ray_marching(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
ccl_device void integrator_shade_volume(KernelGlobals kg, IntegratorState state, ccl_global float *ccl_restrict render_buffer)
ccl_device_inline bool kernel_shadow_catcher_path_can_split(ConstIntegratorState state)
#define INTEGRATOR_STATE_WRITE(state, nested_struct, member)
#define INTEGRATOR_STATE(state, nested_struct, member)
CCL_NAMESPACE_BEGIN ccl_device_inline void get_work_pixel(const ccl_global KernelWorkTile *tile, const uint global_work_index, ccl_private uint *x, ccl_private uint *y, ccl_private uint *sample)