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:
authorHristo Gueorguiev <prem.nirved@gmail.com>2017-03-21 14:24:47 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-03-27 11:46:28 +0300
commit8ada7f73971a9c5232daddf0c6c76262cae4d905 (patch)
treef87e6bdb8a79363ef442b05023887cf085830118 /intern/cycles/kernel/split/kernel_direct_lighting.h
parentd14e39622ae627c1a4329e630715c5197c762493 (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_direct_lighting.h')
-rw-r--r--intern/cycles/kernel/split/kernel_direct_lighting.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/kernel/split/kernel_direct_lighting.h b/intern/cycles/kernel/split/kernel_direct_lighting.h
index 3d062cf0e2b..0a0733b9a9f 100644
--- a/intern/cycles/kernel/split/kernel_direct_lighting.h
+++ b/intern/cycles/kernel/split/kernel_direct_lighting.h
@@ -83,11 +83,12 @@ ccl_device void kernel_direct_lighting(KernelGlobals *kg,
(sd->flag & SD_BSDF_HAS_EVAL)))
{
/* Sample illumination from lights to find path contribution. */
- ccl_global RNG* rng = &kernel_split_state.rng[ray_index];
- float light_t = path_state_rng_1D(kg, rng, state, PRNG_LIGHT);
+ RNG rng = kernel_split_state.rng[ray_index];
+ float light_t = path_state_rng_1D(kg, &rng, state, PRNG_LIGHT);
float light_u, light_v;
- path_state_rng_2D(kg, rng, state, PRNG_LIGHT_U, &light_u, &light_v);
- float terminate = path_state_rng_light_termination(kg, rng, state);
+ path_state_rng_2D(kg, &rng, state, PRNG_LIGHT_U, &light_u, &light_v);
+ float terminate = path_state_rng_light_termination(kg, &rng, state);
+ kernel_split_state.rng[ray_index] = rng;
LightSample ls;
if(light_sample(kg,