diff options
author | Hristo Gueorguiev <prem.nirved@gmail.com> | 2017-03-21 14:24:47 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-27 11:46:28 +0300 |
commit | 8ada7f73971a9c5232daddf0c6c76262cae4d905 (patch) | |
tree | f87e6bdb8a79363ef442b05023887cf085830118 /intern/cycles/kernel/split/kernel_subsurface_scatter.h | |
parent | d14e39622ae627c1a4329e630715c5197c762493 (diff) |
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.
Diffstat (limited to 'intern/cycles/kernel/split/kernel_subsurface_scatter.h')
-rw-r--r-- | intern/cycles/kernel/split/kernel_subsurface_scatter.h | 5 |
1 files changed, 3 insertions, 2 deletions
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__ |