diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-19 00:50:54 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-08-19 02:02:55 +0300 |
commit | 4d428d14af29420e6a76ddd4ba9749e3e67f91d7 (patch) | |
tree | 977f908bf4523b3b2d607177a7741d4b0a8bc775 /intern | |
parent | d282dc04ef0561611c80626c880c2c1701b5a759 (diff) |
Fix T52443: Cycles OpenCL build error after recent mesh lights changes.
Diffstat (limited to 'intern')
-rw-r--r-- | intern/cycles/util/util_math.h | 9 |
1 files changed, 8 insertions, 1 deletions
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 */ |