Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_do_volume.h
| Show All 18 Lines | |||||
| ccl_device void kernel_do_volume(KernelGlobals *kg) | ccl_device void kernel_do_volume(KernelGlobals *kg) | ||||
| { | { | ||||
| #ifdef __VOLUME__ | #ifdef __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; | ||||
| } | } | ||||
| /* 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, | ||||
| 1); | 1); | ||||
| if(ray_index == QUEUE_EMPTY_SLOT) { | if(ray_index == QUEUE_EMPTY_SLOT) { | ||||
| return; | return; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 54 Lines • Show Last 20 Lines | |||||