diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-01 23:02:28 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-05 22:48:33 +0300 |
commit | 8a72be7697f8fbfc8cb6cc9f3df049104e41d4a6 (patch) | |
tree | c8997adcc23053eb6b4cfb7f499581644b23f61e /intern/cycles/kernel/split/kernel_direct_lighting.h | |
parent | c571be4e05788b8d3447a0bfe59942ebb4464750 (diff) |
Cycles: reduce closure memory usage for emission/shadow shader data.
With a Titan Xp, reduces path trace local memory from 1092MB to 840MB.
Benchmark performance was within 1% with both RX 480 and Titan Xp.
Original patch was implemented by Sergey.
Differential Revision: https://developer.blender.org/D2249
Diffstat (limited to 'intern/cycles/kernel/split/kernel_direct_lighting.h')
-rw-r--r-- | intern/cycles/kernel/split/kernel_direct_lighting.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/intern/cycles/kernel/split/kernel_direct_lighting.h b/intern/cycles/kernel/split/kernel_direct_lighting.h index 2aac66ecb84..832b0e5b265 100644 --- a/intern/cycles/kernel/split/kernel_direct_lighting.h +++ b/intern/cycles/kernel/split/kernel_direct_lighting.h @@ -98,7 +98,16 @@ ccl_device void kernel_direct_lighting(KernelGlobals *kg, BsdfEval L_light; bool is_lamp; - if(direct_emission(kg, sd, &kernel_split_state.sd_DL_shadow[ray_index], &ls, state, &light_ray, &L_light, &is_lamp, terminate)) { + if(direct_emission(kg, + sd, + AS_SHADER_DATA(&kernel_split_state.sd_DL_shadow[ray_index]), + &ls, + state, + &light_ray, + &L_light, + &is_lamp, + terminate)) + { /* Write intermediate data to global memory to access from * the next kernel. */ |