Cycles: Define ccl_local variables in kernel functions
Declaring ccl_local in a device function is not supported by certain compilers.
This commit is contained in:
@@ -40,11 +40,11 @@ CCL_NAMESPACE_BEGIN
|
||||
* shadow_blocked function must be executed, after this kernel call
|
||||
* Before this kernel call the QUEUE_SHADOW_RAY_CAST_DL_RAYS will be empty.
|
||||
*/
|
||||
ccl_device void kernel_direct_lighting(KernelGlobals *kg)
|
||||
ccl_device void kernel_direct_lighting(KernelGlobals *kg,
|
||||
ccl_local_param unsigned int *local_queue_atomics)
|
||||
{
|
||||
ccl_local unsigned int local_queue_atomics;
|
||||
if(ccl_local_id(0) == 0 && ccl_local_id(1) == 0) {
|
||||
local_queue_atomics = 0;
|
||||
*local_queue_atomics = 0;
|
||||
}
|
||||
ccl_barrier(CCL_LOCAL_MEM_FENCE);
|
||||
|
||||
@@ -130,7 +130,7 @@ ccl_device void kernel_direct_lighting(KernelGlobals *kg)
|
||||
QUEUE_SHADOW_RAY_CAST_DL_RAYS,
|
||||
enqueue_flag,
|
||||
kernel_split_params.queue_size,
|
||||
&local_queue_atomics,
|
||||
local_queue_atomics,
|
||||
kernel_split_state.queue_data,
|
||||
kernel_split_params.queue_index);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user