From 8ada7f73971a9c5232daddf0c6c76262cae4d905 Mon Sep 17 00:00:00 2001 From: Hristo Gueorguiev Date: Tue, 21 Mar 2017 12:24:47 +0100 Subject: Cycles: Remove ccl_addr_space from RNG passed to functions Simplifies code quite a bit, making it shorter and easier to extend. Currently no functional changes for users, but is required for the upcoming work of shadow catcher support with OpenCL. --- intern/cycles/kernel/split/kernel_subsurface_scatter.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'intern/cycles/kernel/split/kernel_subsurface_scatter.h') diff --git a/intern/cycles/kernel/split/kernel_subsurface_scatter.h b/intern/cycles/kernel/split/kernel_subsurface_scatter.h index 4eaa7f56332..0b4d50c70ee 100644 --- a/intern/cycles/kernel/split/kernel_subsurface_scatter.h +++ b/intern/cycles/kernel/split/kernel_subsurface_scatter.h @@ -55,7 +55,7 @@ ccl_device void kernel_subsurface_scatter(KernelGlobals *kg, ccl_global char *ray_state = kernel_split_state.ray_state; ccl_global PathState *state = &kernel_split_state.path_state[ray_index]; PathRadiance *L = &kernel_split_state.path_radiance[ray_index]; - ccl_global RNG *rng = &kernel_split_state.rng[ray_index]; + RNG rng = kernel_split_state.rng[ray_index]; ccl_global Ray *ray = &kernel_split_state.ray[ray_index]; ccl_global float3 *throughput = &kernel_split_state.throughput[ray_index]; ccl_global SubsurfaceIndirectRays *ss_indirect = &kernel_split_state.ss_rays[ray_index]; @@ -69,7 +69,7 @@ ccl_device void kernel_subsurface_scatter(KernelGlobals *kg, emission_sd, L, state, - rng, + &rng, ray, throughput, ss_indirect)) { @@ -77,6 +77,7 @@ ccl_device void kernel_subsurface_scatter(KernelGlobals *kg, enqueue_flag = 1; } } + kernel_split_state.rng[ray_index] = rng; } #ifndef __COMPUTE_DEVICE_GPU__ -- cgit v1.2.3