Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-03-08 15:34:29 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-03-16 13:27:17 +0300
commit1cad64900e3f052fa895a4ac2a994d87b0c3fce1 (patch)
tree562c79fc2622efaf0df7f2a4a75b856c48646ad9 /intern/cycles/kernel/split/kernel_next_iteration_setup.h
parent1ff753baa4bbf9aeb2c65e0d697840545bfbea24 (diff)
Cycles: Define ccl_local variables in kernel functions
Declaring ccl_local in a device function is not supported by certain compilers.
Diffstat (limited to 'intern/cycles/kernel/split/kernel_next_iteration_setup.h')
-rw-r--r--intern/cycles/kernel/split/kernel_next_iteration_setup.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/split/kernel_next_iteration_setup.h b/intern/cycles/kernel/split/kernel_next_iteration_setup.h
index ad1f6c78e8f..056fb1d8c08 100644
--- a/intern/cycles/kernel/split/kernel_next_iteration_setup.h
+++ b/intern/cycles/kernel/split/kernel_next_iteration_setup.h
@@ -44,11 +44,11 @@ CCL_NAMESPACE_BEGIN
* - QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS will be filled with
* RAY_TO_REGENERATE and more RAY_UPDATE_BUFFER rays.
*/
-ccl_device void kernel_next_iteration_setup(KernelGlobals *kg)
+ccl_device void kernel_next_iteration_setup(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);
@@ -161,7 +161,7 @@ ccl_device void kernel_next_iteration_setup(KernelGlobals *kg)
QUEUE_HITBG_BUFF_UPDATE_TOREGEN_RAYS,
enqueue_flag,
kernel_split_params.queue_size,
- &local_queue_atomics,
+ local_queue_atomics,
kernel_split_state.queue_data,
kernel_split_params.queue_index);
}