Cycles: Avoid some ccl_local in various kernels
This commit is contained in:
parent
4833a71621
commit
26620f3f87
|
@ -25,10 +25,7 @@ ccl_device void kernel_do_volume(KernelGlobals *kg)
|
|||
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;
|
||||
}
|
||||
char 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);
|
||||
|
|
|
@ -29,10 +29,7 @@ ccl_device void kernel_lamp_emission(KernelGlobals *kg)
|
|||
}
|
||||
#endif
|
||||
/* 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;
|
||||
}
|
||||
char 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);
|
||||
|
|
|
@ -26,10 +26,7 @@ CCL_NAMESPACE_BEGIN
|
|||
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;
|
||||
}
|
||||
char 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);
|
||||
|
|
|
@ -19,12 +19,7 @@ CCL_NAMESPACE_BEGIN
|
|||
/* Shadow ray cast for AO. */
|
||||
ccl_device void kernel_shadow_blocked_ao(KernelGlobals *kg)
|
||||
{
|
||||
int lidx = ccl_local_id(1) * ccl_local_id(0) + ccl_local_id(0);
|
||||
|
||||
ccl_local unsigned int ao_queue_length;
|
||||
if(lidx == 0) {
|
||||
ao_queue_length = kernel_split_params.queue_index[QUEUE_SHADOW_RAY_CAST_AO_RAYS];
|
||||
}
|
||||
unsigned int ao_queue_length = kernel_split_params.queue_index[QUEUE_SHADOW_RAY_CAST_AO_RAYS];
|
||||
ccl_barrier(CCL_LOCAL_MEM_FENCE);
|
||||
|
||||
int ray_index = QUEUE_EMPTY_SLOT;
|
||||
|
|
|
@ -19,12 +19,7 @@ CCL_NAMESPACE_BEGIN
|
|||
/* Shadow ray cast for direct visible light. */
|
||||
ccl_device void kernel_shadow_blocked_dl(KernelGlobals *kg)
|
||||
{
|
||||
int lidx = ccl_local_id(1) * ccl_local_id(0) + ccl_local_id(0);
|
||||
|
||||
ccl_local unsigned int dl_queue_length;
|
||||
if(lidx == 0) {
|
||||
dl_queue_length = kernel_split_params.queue_index[QUEUE_SHADOW_RAY_CAST_DL_RAYS];
|
||||
}
|
||||
unsigned int dl_queue_length = kernel_split_params.queue_index[QUEUE_SHADOW_RAY_CAST_DL_RAYS];
|
||||
ccl_barrier(CCL_LOCAL_MEM_FENCE);
|
||||
|
||||
int ray_index = QUEUE_EMPTY_SLOT;
|
||||
|
|
Loading…
Reference in New Issue