Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_lamp_emission.h
| Show All 38 Lines | |||||
| ccl_device void kernel_lamp_emission(KernelGlobals *kg) | ccl_device void kernel_lamp_emission(KernelGlobals *kg) | ||||
| { | { | ||||
| #ifndef __VOLUME__ | #ifndef __VOLUME__ | ||||
| /* We will empty this queue in this kernel. */ | /* We will empty this queue in this kernel. */ | ||||
| if(ccl_global_id(0) == 0 && ccl_global_id(1) == 0) { | if(ccl_global_id(0) == 0 && ccl_global_id(1) == 0) { | ||||
| kernel_split_params.queue_index[QUEUE_ACTIVE_AND_REGENERATED_RAYS] = 0; | kernel_split_params.queue_index[QUEUE_ACTIVE_AND_REGENERATED_RAYS] = 0; | ||||
| } | } | ||||
| #endif | #endif | ||||
| /* Fetch use_queues_flag. */ | |||||
| ccl_local char local_use_queues_flag; | |||||
| if(ccl_local_id(0) == 0 && ccl_local_id(1) == 0) { | |||||
| local_use_queues_flag = *kernel_split_params.use_queues_flag; | |||||
| } | |||||
| ccl_barrier(CCL_LOCAL_MEM_FENCE); | |||||
| 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); | ||||
| if(local_use_queues_flag) { | if(*kernel_split_params.use_queues_flag) { | ||||
| ray_index = get_ray_index(kg, ray_index, | ray_index = get_ray_index(kg, 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, | ||||
| #ifndef __VOLUME__ | #ifndef __VOLUME__ | ||||
| 1 | 1 | ||||
| #else | #else | ||||
| 0 | 0 | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||