Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_scene_intersect.h
| Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | |||||
| * At exit, | * At exit, | ||||
| * QUEUE_ACTIVE_AND_REGENERATED_RAYS - All RAY_REGENERATED rays will have been converted to RAY_ACTIVE and | * QUEUE_ACTIVE_AND_REGENERATED_RAYS - All RAY_REGENERATED rays will have been converted to RAY_ACTIVE and | ||||
| * Some rays in QUEUE_ACTIVE_AND_REGENERATED_RAYS queue will move to state RAY_HIT_BACKGROUND | * Some rays in QUEUE_ACTIVE_AND_REGENERATED_RAYS queue will move to state RAY_HIT_BACKGROUND | ||||
| * QUEUE_HITBF_BUFF_UPDATE_TOREGEN_RAYS - no change | * QUEUE_HITBF_BUFF_UPDATE_TOREGEN_RAYS - no change | ||||
| */ | */ | ||||
| ccl_device void kernel_scene_intersect(KernelGlobals *kg) | ccl_device void kernel_scene_intersect(KernelGlobals *kg) | ||||
| { | { | ||||
| /* 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, | ||||
| 0); | 0); | ||||
| if(ray_index == QUEUE_EMPTY_SLOT) { | if(ray_index == QUEUE_EMPTY_SLOT) { | ||||
| return; | return; | ||||
| ▲ Show 20 Lines • Show All 67 Lines • Show Last 20 Lines | |||||