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_do_volume.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_do_volume.h')
-rw-r--r-- | intern/cycles/kernel/split/kernel_do_volume.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/split/kernel_do_volume.h b/intern/cycles/kernel/split/kernel_do_volume.h index 491487f1230..02881da6c04 100644 --- a/intern/cycles/kernel/split/kernel_do_volume.h +++ b/intern/cycles/kernel/split/kernel_do_volume.h @@ -31,7 +31,7 @@ ccl_device_noinline bool kernel_split_branched_path_volume_indirect_light_iter(K ShaderData *sd = &kernel_split_state.sd[ray_index]; PathRadiance *L = &kernel_split_state.path_radiance[ray_index]; - ShaderData *emission_sd = &kernel_split_state.sd_DL_shadow[ray_index]; + ShaderData *emission_sd = AS_SHADER_DATA(&kernel_split_state.sd_DL_shadow[ray_index]); /* GPU: no decoupled ray marching, scatter probalistically */ int num_samples = kernel_data.integrator.volume_samples; @@ -141,7 +141,7 @@ ccl_device void kernel_do_volume(KernelGlobals *kg) ccl_global Ray *ray = &kernel_split_state.ray[ray_index]; ccl_global Intersection *isect = &kernel_split_state.isect[ray_index]; ShaderData *sd = &kernel_split_state.sd[ray_index]; - ShaderData *emission_sd = &kernel_split_state.sd_DL_shadow[ray_index]; + ShaderData *emission_sd = AS_SHADER_DATA(&kernel_split_state.sd_DL_shadow[ray_index]); bool hit = ! IS_STATE(ray_state, ray_index, RAY_HIT_BACKGROUND); |