[Bf-blender-cvs] [4e7eef02bc9] gsoc-2018-many-light-sampling: Fix T55137: Compilation failing on non-x86-64 architectures

Lukas Stockner noreply at git.blender.org
Fri Jun 1 16:17:18 CEST 2018


Commit: 4e7eef02bc9c529e32ddc0ead02644638485663e
Author: Lukas Stockner
Date:   Thu May 24 01:41:18 2018 +0200
Branches: gsoc-2018-many-light-sampling
https://developer.blender.org/rB4e7eef02bc9c529e32ddc0ead02644638485663e

Fix T55137: Compilation failing on non-x86-64 architectures

Some conversion helper functions were (most likely by accident) contained
inside an ifdef for SSE2 support, so on e.g. ARM they would be undefined
and therefore cause compilation to fail.

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

M	source/blender/blenlib/intern/math_base_inline.c

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

diff --git a/source/blender/blenlib/intern/math_base_inline.c b/source/blender/blenlib/intern/math_base_inline.c
index 268279f98b1..0f282805e71 100644
--- a/source/blender/blenlib/intern/math_base_inline.c
+++ b/source/blender/blenlib/intern/math_base_inline.c
@@ -513,6 +513,8 @@ MALWAYS_INLINE __m128 _bli_math_blend_sse(const __m128 mask,
 	return _mm_or_ps(_mm_and_ps(mask, a), _mm_andnot_ps(mask, b));
 }
 
+#endif  /* __SSE2__ */
+
 /* Low level conversion functions */
 MINLINE unsigned char unit_float_to_uchar_clamp(float val)
 {
@@ -544,6 +546,4 @@ MINLINE unsigned char unit_ushort_to_uchar(unsigned short val)
 	(v1)[3] = unit_float_to_uchar_clamp((v2[3]));                                           \
 } ((void)0)
 
-#endif  /* __SSE2__ */
-
 #endif /* __MATH_BASE_INLINE_C__ */



More information about the Bf-blender-cvs mailing list