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.
This commit is contained in:
Brecht Van Lommel
2017-08-23 03:57:27 +02:00
parent 9ddee885ae
commit 400e6f37b8
12 changed files with 91 additions and 115 deletions

View File

@@ -68,7 +68,7 @@ bool kernel_path_volume_bounce(
ShaderData *sd,
ccl_addr_space float3 *throughput,
ccl_addr_space PathState *state,
PathRadiance *L,
PathRadianceState *L_state,
ccl_addr_space Ray *ray)
{
/* sample phase function */
@@ -87,7 +87,7 @@ bool kernel_path_volume_bounce(
return false;
/* modify throughput */
path_radiance_bsdf_bounce(L, throughput, &phase_eval, phase_pdf, state->bounce, label);
path_radiance_bsdf_bounce(kg, L_state, throughput, &phase_eval, phase_pdf, state->bounce, label);
/* set labels */
state->ray_pdf = phase_pdf;