[Bf-blender-cvs] [4d428d14af2] master: Fix T52443: Cycles OpenCL build error after recent mesh lights changes.

Brecht Van Lommel noreply at git.blender.org
Sat Aug 19 01:09:39 CEST 2017


Commit: 4d428d14af29420e6a76ddd4ba9749e3e67f91d7
Author: Brecht Van Lommel
Date:   Fri Aug 18 23:50:54 2017 +0200
Branches: master
https://developer.blender.org/rB4d428d14af29420e6a76ddd4ba9749e3e67f91d7

Fix T52443: Cycles OpenCL build error after recent mesh lights changes.

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

M	intern/cycles/util/util_math.h

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

diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 4d51ec5570a..0d27ee06fa7 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -330,15 +330,22 @@ template<class A, class B> A lerp(const A& a, const A& b, const B& t)
 	return (A)(a * ((B)1 - t) + b * t);
 }
 
+#endif  /* __KERNEL_OPENCL__ */
+
 /* Triangle */
 
+#ifndef __KERNEL_OPENCL__
 ccl_device_inline float triangle_area(const float3& v1,
                                       const float3& v2,
                                       const float3& v3)
+#else
+ccl_device_inline float triangle_area(const float3 v1,
+                                      const float3 v2,
+                                      const float3 v3)
+#endif
 {
 	return len(cross(v3 - v2, v1 - v2))*0.5f;
 }
-#endif  /* __KERNEL_OPENCL__ */
 
 /* Orthonormal vectors */



More information about the Bf-blender-cvs mailing list