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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2017-08-23 04:57:27 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-09-28 16:18:43 +0300
commit400e6f37b80dde3910b8d7a9d5e619b778a1c1ff (patch)
tree61ecd35d2231c0f7585dc0148638de00819638b5 /intern/cycles/kernel/kernel_path_surface.h
parent9ddee885aea4d026bb0409a51a137706c95d318b (diff)
Cycles: reduce subsurface stack memory usage.
This is done by storing only a subset of PathRadiance, and by storing direct light immediately in the main PathRadiance. Saves about 10% of CUDA stack memory, and simplifies subsurface indirect ray code.
Diffstat (limited to 'intern/cycles/kernel/kernel_path_surface.h')
-rw-r--r--intern/cycles/kernel/kernel_path_surface.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_path_surface.h b/intern/cycles/kernel/kernel_path_surface.h
index e798fcc6a2c..7b566b01b04 100644
--- a/intern/cycles/kernel/kernel_path_surface.h
+++ b/intern/cycles/kernel/kernel_path_surface.h
@@ -150,7 +150,7 @@ ccl_device bool kernel_branched_path_surface_bounce(
int num_samples,
ccl_addr_space float3 *throughput,
ccl_addr_space PathState *state,
- PathRadiance *L,
+ PathRadianceState *L_state,
ccl_addr_space Ray *ray,
float sum_sample_weight)
{
@@ -170,7 +170,7 @@ ccl_device bool kernel_branched_path_surface_bounce(
return false;
/* modify throughput */
- path_radiance_bsdf_bounce(L, throughput, &bsdf_eval, bsdf_pdf, state->bounce, label);
+ path_radiance_bsdf_bounce(kg, L_state, throughput, &bsdf_eval, bsdf_pdf, state->bounce, label);
#ifdef __DENOISING_FEATURES__
state->denoising_feature_weight *= sc->sample_weight / (sum_sample_weight * num_samples);
@@ -271,7 +271,7 @@ ccl_device bool kernel_path_surface_bounce(KernelGlobals *kg,
ShaderData *sd,
ccl_addr_space float3 *throughput,
ccl_addr_space PathState *state,
- PathRadiance *L,
+ PathRadianceState *L_state,
ccl_addr_space Ray *ray)
{
/* no BSDF? we can stop here */
@@ -292,7 +292,7 @@ ccl_device bool kernel_path_surface_bounce(KernelGlobals *kg,
return false;
/* modify throughput */
- path_radiance_bsdf_bounce(L, throughput, &bsdf_eval, bsdf_pdf, state->bounce, label);
+ path_radiance_bsdf_bounce(kg, L_state, throughput, &bsdf_eval, bsdf_pdf, state->bounce, label);
/* set labels */
if(!(label & LABEL_TRANSPARENT)) {