Differential D9039 Diff 29413 intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_holdout_emission_blurring_pathtermination_ao.h
| Show First 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | #endif | ||||
| int ray_index = ccl_global_id(1) * ccl_global_size(0) + ccl_global_id(0); | int ray_index = ccl_global_id(1) * ccl_global_size(0) + ccl_global_id(0); | ||||
| ray_index = get_ray_index(kg, | ray_index = get_ray_index(kg, | ||||
| ray_index, | ray_index, | ||||
| QUEUE_ACTIVE_AND_REGENERATED_RAYS, | QUEUE_ACTIVE_AND_REGENERATED_RAYS, | ||||
| kernel_split_state.queue_data, | kernel_split_state.queue_data, | ||||
| kernel_split_params.queue_size, | kernel_split_params.queue_size, | ||||
| 0); | 0); | ||||
| #ifdef __COMPUTE_DEVICE_GPU__ | |||||
| /* If we are executing on a GPU device, we exit all threads that are not | |||||
| * required. | |||||
| * | |||||
| * If we are executing on a CPU device, then we need to keep all threads | |||||
| * active since we have barrier() calls later in the kernel. CPU devices, | |||||
| * expect all threads to execute barrier statement. | |||||
| */ | |||||
| if (ray_index == QUEUE_EMPTY_SLOT) { | |||||
| return; | |||||
| } | |||||
| #endif /* __COMPUTE_DEVICE_GPU__ */ | |||||
| #ifndef __COMPUTE_DEVICE_GPU__ | |||||
| if (ray_index != QUEUE_EMPTY_SLOT) { | if (ray_index != QUEUE_EMPTY_SLOT) { | ||||
| #endif | |||||
| ccl_global PathState *state = 0x0; | ccl_global PathState *state = 0x0; | ||||
| float3 throughput; | float3 throughput; | ||||
| ccl_global char *ray_state = kernel_split_state.ray_state; | ccl_global char *ray_state = kernel_split_state.ray_state; | ||||
| ShaderData *sd = kernel_split_sd(sd, ray_index); | ShaderData *sd = kernel_split_sd(sd, ray_index); | ||||
| if (IS_STATE(ray_state, ray_index, RAY_ACTIVE)) { | if (IS_STATE(ray_state, ray_index, RAY_ACTIVE)) { | ||||
| uint buffer_offset = kernel_split_state.buffer_offset[ray_index]; | uint buffer_offset = kernel_split_state.buffer_offset[ray_index]; | ||||
| ▲ Show 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| #ifdef __AO__ | #ifdef __AO__ | ||||
| if (IS_STATE(ray_state, ray_index, RAY_ACTIVE)) { | if (IS_STATE(ray_state, ray_index, RAY_ACTIVE)) { | ||||
| /* ambient occlusion */ | /* ambient occlusion */ | ||||
| if (kernel_data.integrator.use_ambient_occlusion) { | if (kernel_data.integrator.use_ambient_occlusion) { | ||||
| enqueue_flag = 1; | enqueue_flag = 1; | ||||
| } | } | ||||
| } | } | ||||
| #endif /* __AO__ */ | #endif /* __AO__ */ | ||||
| #ifndef __COMPUTE_DEVICE_GPU__ | |||||
| } | } | ||||
| #endif | |||||
| #ifdef __AO__ | #ifdef __AO__ | ||||
| /* Enqueue to-shadow-ray-cast rays. */ | /* Enqueue to-shadow-ray-cast rays. */ | ||||
| enqueue_ray_index_local(ray_index, | enqueue_ray_index_local(ray_index, | ||||
| QUEUE_SHADOW_RAY_CAST_AO_RAYS, | QUEUE_SHADOW_RAY_CAST_AO_RAYS, | ||||
| enqueue_flag, | enqueue_flag, | ||||
| kernel_split_params.queue_size, | kernel_split_params.queue_size, | ||||
| &locals->queue_atomics_ao, | &locals->queue_atomics_ao, | ||||
| kernel_split_state.queue_data, | kernel_split_state.queue_data, | ||||
| kernel_split_params.queue_index); | kernel_split_params.queue_index); | ||||
| #endif | #endif | ||||
| } | } | ||||
| CCL_NAMESPACE_END | CCL_NAMESPACE_END | ||||