Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_queue_enqueue.h
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| * State of queue during other times this kernel is called : | * State of queue during other times this kernel is called : | ||||
| * At entry, | * At entry, | ||||
| * QUEUE_ACTIVE_AND_REGENERATED_RAYS will be empty. | * QUEUE_ACTIVE_AND_REGENERATED_RAYS will be empty. | ||||
| * QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS will contain RAY_TO_REGENERATE and RAY_UPDATE_BUFFER rays. | * QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS will contain RAY_TO_REGENERATE and RAY_UPDATE_BUFFER rays. | ||||
| * At exit, | * At exit, | ||||
| * QUEUE_ACTIVE_AND_REGENERATED_RAYS will be filled with RAY_ACTIVE rays. | * QUEUE_ACTIVE_AND_REGENERATED_RAYS will be filled with RAY_ACTIVE rays. | ||||
| * QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS will be filled with RAY_TO_REGENERATE, RAY_UPDATE_BUFFER, RAY_HIT_BACKGROUND rays. | * QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS will be filled with RAY_TO_REGENERATE, RAY_UPDATE_BUFFER, RAY_HIT_BACKGROUND rays. | ||||
| */ | */ | ||||
| ccl_device void kernel_queue_enqueue(KernelGlobals *kg) | ccl_device void kernel_queue_enqueue(KernelGlobals *kg, | ||||
| ccl_local_param unsigned int local_queue_atomics[2]) | |||||
| { | { | ||||
| /* We have only 2 cases (Hit/Not-Hit) */ | /* We have only 2 cases (Hit/Not-Hit) */ | ||||
| ccl_local unsigned int local_queue_atomics[2]; | |||||
| int lidx = ccl_local_id(1) * ccl_local_size(0) + ccl_local_id(0); | int lidx = ccl_local_id(1) * ccl_local_size(0) + ccl_local_id(0); | ||||
| 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(lidx == 0) { | if(lidx == 0) { | ||||
| local_queue_atomics[0] = 0; | local_queue_atomics[0] = 0; | ||||
| local_queue_atomics[1] = 0; | local_queue_atomics[1] = 0; | ||||
| } | } | ||||
| ccl_barrier(CCL_LOCAL_MEM_FENCE); | ccl_barrier(CCL_LOCAL_MEM_FENCE); | ||||
| Show All 40 Lines | |||||