Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_scene_intersect.h
| Show All 20 Lines | |||||
| * This kernel changes the ray_state of RAY_REGENERATED rays to RAY_ACTIVE. | * This kernel changes the ray_state of RAY_REGENERATED rays to RAY_ACTIVE. | ||||
| * This kernel processes rays of ray state RAY_ACTIVE | * This kernel processes rays of ray state RAY_ACTIVE | ||||
| * This kernel determines the rays that have hit the background and changes | * This kernel determines the rays that have hit the background and changes | ||||
| * their ray state to RAY_HIT_BACKGROUND. | * their ray state to RAY_HIT_BACKGROUND. | ||||
| */ | */ | ||||
| ccl_device void kernel_scene_intersect(KernelGlobals *kg) | ccl_device void kernel_scene_intersect(KernelGlobals *kg) | ||||
| { | { | ||||
| /* Fetch use_queues_flag */ | /* Fetch use_queues_flag */ | ||||
| ccl_local char local_use_queues_flag; | char local_use_queues_flag = *kernel_split_params.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); | 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(local_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, | ||||
| ▲ Show 20 Lines • Show All 70 Lines • Show Last 20 Lines | |||||