Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/kernel/split/kernel_shadow_blocked_dl.h
| Show All 13 Lines | |||||
| * limitations under the License. | * limitations under the License. | ||||
| */ | */ | ||||
| CCL_NAMESPACE_BEGIN | CCL_NAMESPACE_BEGIN | ||||
| /* Shadow ray cast for direct visible light. */ | /* Shadow ray cast for direct visible light. */ | ||||
| ccl_device void kernel_shadow_blocked_dl(KernelGlobals *kg) | ccl_device void kernel_shadow_blocked_dl(KernelGlobals *kg) | ||||
| { | { | ||||
| int lidx = ccl_local_id(1) * ccl_local_id(0) + ccl_local_id(0); | unsigned int dl_queue_length = kernel_split_params.queue_index[QUEUE_SHADOW_RAY_CAST_DL_RAYS]; | ||||
| ccl_local unsigned int dl_queue_length; | |||||
| if(lidx == 0) { | |||||
| dl_queue_length = kernel_split_params.queue_index[QUEUE_SHADOW_RAY_CAST_DL_RAYS]; | |||||
| } | |||||
| ccl_barrier(CCL_LOCAL_MEM_FENCE); | ccl_barrier(CCL_LOCAL_MEM_FENCE); | ||||
| int ray_index = QUEUE_EMPTY_SLOT; | int ray_index = QUEUE_EMPTY_SLOT; | ||||
| int thread_index = ccl_global_id(1) * ccl_global_size(0) + ccl_global_id(0); | int thread_index = ccl_global_id(1) * ccl_global_size(0) + ccl_global_id(0); | ||||
| if(thread_index < dl_queue_length) { | if(thread_index < dl_queue_length) { | ||||
| ray_index = get_ray_index(kg, thread_index, QUEUE_SHADOW_RAY_CAST_DL_RAYS, | ray_index = get_ray_index(kg, thread_index, QUEUE_SHADOW_RAY_CAST_DL_RAYS, | ||||
| kernel_split_state.queue_data, kernel_split_params.queue_size, 1); | kernel_split_state.queue_data, kernel_split_params.queue_size, 1); | ||||
| } | } | ||||
| Show All 29 Lines | |||||