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:
Diffstat (limited to 'intern/cycles/kernel/split/kernel_branched.h')
-rw-r--r--intern/cycles/kernel/split/kernel_branched.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/intern/cycles/kernel/split/kernel_branched.h b/intern/cycles/kernel/split/kernel_branched.h
index 2313feac089..6456636caaa 100644
--- a/intern/cycles/kernel/split/kernel_branched.h
+++ b/intern/cycles/kernel/split/kernel_branched.h
@@ -30,10 +30,14 @@ ccl_device_inline void kernel_split_branched_path_indirect_loop_init(KernelGloba
BRANCHED_STORE(path_state);
BRANCHED_STORE(throughput);
BRANCHED_STORE(ray);
- BRANCHED_STORE(sd);
BRANCHED_STORE(isect);
BRANCHED_STORE(ray_state);
+ branched_state->sd = *kernel_split_sd(sd, ray_index);
+ for(int i = 0; i < branched_state->sd.num_closure; i++) {
+ branched_state->sd.closure[i] = kernel_split_sd(sd, ray_index)->closure[i];
+ }
+
#undef BRANCHED_STORE
/* set loop counters to intial position */
@@ -53,10 +57,14 @@ ccl_device_inline void kernel_split_branched_path_indirect_loop_end(KernelGlobal
BRANCHED_RESTORE(path_state);
BRANCHED_RESTORE(throughput);
BRANCHED_RESTORE(ray);
- BRANCHED_RESTORE(sd);
BRANCHED_RESTORE(isect);
BRANCHED_RESTORE(ray_state);
+ *kernel_split_sd(sd, ray_index) = branched_state->sd;
+ for(int i = 0; i < branched_state->sd.num_closure; i++) {
+ kernel_split_sd(sd, ray_index)->closure[i] = branched_state->sd.closure[i];
+ }
+
#undef BRANCHED_RESTORE
/* leave indirect loop */