[Bf-blender-cvs] [ab9079f4598] master: Fix Cycles adaptive compile without volumes broken after recent changes.

Carlo Andreacchio noreply at git.blender.org
Mon Sep 18 13:09:27 CEST 2017


Commit: ab9079f45986ae9cbf4eaca1d99cdfc0837d4d03
Author: Carlo Andreacchio
Date:   Mon Sep 18 12:31:17 2017 +0200
Branches: master
https://developer.blender.org/rBab9079f45986ae9cbf4eaca1d99cdfc0837d4d03

Fix Cycles adaptive compile without volumes broken after recent changes.

Differential Revision: https://developer.blender.org/D2847

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

M	intern/cycles/kernel/kernel_path.h

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

diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index fc157feb28c..3a242a06a72 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -154,6 +154,7 @@ ccl_device_forceinline void kernel_path_background(
 
 #ifndef __SPLIT_KERNEL__
 
+#ifdef __VOLUME__
 ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
 	KernelGlobals *kg,
 	ShaderData *sd,
@@ -165,7 +166,6 @@ ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
 	ShaderData *emission_sd,
 	PathRadiance *L)
 {
-#ifdef __VOLUME__
 	/* Sanitize volume stack. */
 	if(!hit) {
 		kernel_volume_clean_stack(kg, state->volume_stack);
@@ -252,10 +252,10 @@ ccl_device_forceinline VolumeIntegrateResult kernel_path_volume(
 #  endif  /* __VOLUME_SCATTER__ */
 		}
 	}
-#endif  /* __VOLUME__ */
 
 	return VOLUME_PATH_ATTENUATED;
 }
+#endif  /* __VOLUME__ */
 
 #endif /* __SPLIT_KERNEL__ */
 
@@ -400,6 +400,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
 		/* Find intersection with lamps and compute emission for MIS. */
 		kernel_path_lamp_emission(kg, state, ray, throughput, &isect, emission_sd, L);
 
+#ifdef __VOLUME__
 		/* Volume integration. */
 		VolumeIntegrateResult result = kernel_path_volume(kg,
 		                                                   sd,
@@ -417,6 +418,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
 		else if(result == VOLUME_PATH_MISSED) {
 			break;
 		}
+#endif /* __VOLUME__*/
 
 		/* Shade background. */
 		if(!hit) {
@@ -558,6 +560,7 @@ ccl_device_forceinline void kernel_path_integrate(
 		/* Find intersection with lamps and compute emission for MIS. */
 		kernel_path_lamp_emission(kg, state, ray, throughput, &isect, emission_sd, L);
 
+#ifdef __VOLUME__
 		/* Volume integration. */
 		VolumeIntegrateResult result = kernel_path_volume(kg,
 		                                                   &sd,
@@ -575,6 +578,7 @@ ccl_device_forceinline void kernel_path_integrate(
 		else if(result == VOLUME_PATH_MISSED) {
 			break;
 		}
+#endif /* __VOLUME__*/
 
 		/* Shade background. */
 		if(!hit) {



More information about the Bf-blender-cvs mailing list