forked from bartvdbraak/blender
Fix T60300: Cycles SSS render hanging with AMD OpenCL.
This commit is contained in:
parent
1e386d98ce
commit
8491dba0c6
@ -47,6 +47,11 @@ ccl_device_noinline bool kernel_split_branched_path_subsurface_indirect_light_it
|
||||
if(!CLOSURE_IS_BSSRDF(sc->type))
|
||||
continue;
|
||||
|
||||
/* Closure memory will be overwritten, so read required variables now. */
|
||||
Bssrdf *bssrdf = (Bssrdf *)sc;
|
||||
ClosureType bssrdf_type = sc->type;
|
||||
float bssrdf_roughness = bssrdf->roughness;
|
||||
|
||||
/* set up random number generator */
|
||||
if(branched_state->ss_next_sample == 0 && branched_state->next_hit == 0 &&
|
||||
branched_state->next_closure == 0 && branched_state->next_sample == 0)
|
||||
@ -110,10 +115,6 @@ ccl_device_noinline bool kernel_split_branched_path_subsurface_indirect_light_it
|
||||
*bssrdf_sd = *sd; /* note: copy happens each iteration of inner loop, this is
|
||||
* important as the indirect path will write into bssrdf_sd */
|
||||
|
||||
Bssrdf *bssrdf = (Bssrdf *)sc;
|
||||
ClosureType bssrdf_type = sc->type;
|
||||
float bssrdf_roughness = bssrdf->roughness;
|
||||
|
||||
LocalIntersection ss_isect_private = *ss_isect;
|
||||
subsurface_scatter_multi_setup(kg,
|
||||
&ss_isect_private,
|
||||
|
Loading…
Reference in New Issue
Block a user