[Bf-blender-cvs] [c886280] master: Fix T39525: branched path + no lights + disabled use all lights option crash.

Brecht Van Lommel noreply at git.blender.org
Mon Mar 31 13:54:37 CEST 2014


Commit: c8862806bafba79f1022cc3d17d36b22916e3422
Author: Brecht Van Lommel
Date:   Mon Mar 31 13:51:52 2014 +0200
https://developer.blender.org/rBc8862806bafba79f1022cc3d17d36b22916e3422

Fix T39525: branched path + no lights + disabled use all lights option crash.

===================================================================

M	intern/cycles/kernel/kernel_path.h

===================================================================

diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index 81f47db..2764d0e 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -954,8 +954,10 @@ ccl_device_noinline void kernel_branched_path_integrate_lighting(KernelGlobals *
 	PathState *state, PathRadiance *L, ccl_global float *buffer)
 {
 #ifdef __EMISSION__
-	bool all = kernel_data.integrator.sample_all_lights_direct;
-	kernel_branched_path_integrate_direct_lighting(kg, rng, sd, state, throughput, num_samples_adjust, L, all);
+	if(kernel_data.integrator.use_direct_light) {
+		bool all = kernel_data.integrator.sample_all_lights_direct;
+		kernel_branched_path_integrate_direct_lighting(kg, rng, sd, state, throughput, num_samples_adjust, L, all);
+	}
 #endif
 
 	for(int i = 0; i< sd->num_closure; i++) {




More information about the Bf-blender-cvs mailing list