Browse Source

Fixed build

Groove 7 years ago
parent
commit
5c543e65f8

+ 1 - 1
glm/detail/func_common.inl

@@ -781,6 +781,6 @@ namespace detail
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_common_simd.inl"
 #endif

+ 1 - 1
glm/detail/func_exponential.inl

@@ -146,7 +146,7 @@ namespace detail
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_exponential_simd.inl"
 #endif
 

+ 1 - 1
glm/detail/func_geometric.inl

@@ -242,6 +242,6 @@ namespace detail
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_geometric_simd.inl"
 #endif

+ 1 - 1
glm/detail/func_integer.inl

@@ -372,7 +372,7 @@ namespace detail
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_integer_simd.inl"
 #endif
 

+ 1 - 1
glm/detail/func_matrix.inl

@@ -395,7 +395,7 @@ namespace detail
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_matrix_simd.inl"
 #endif
 

+ 1 - 1
glm/detail/func_packing.inl

@@ -184,7 +184,7 @@ namespace glm
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_packing_simd.inl"
 #endif
 

+ 1 - 1
glm/detail/func_trigonometric.inl

@@ -194,7 +194,7 @@ namespace glm
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_trigonometric_simd.inl"
 #endif
 

+ 1 - 1
glm/detail/func_vector_relational.inl

@@ -100,6 +100,6 @@ namespace glm
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_UNRESTRICTED_UNIONS
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "func_vector_relational_simd.inl"
 #endif

+ 1 - 1
glm/detail/type_mat4x4.inl

@@ -704,6 +704,6 @@ namespace glm
 	}
 }//namespace glm
 
-#if GLM_ARCH != GLM_ARCH_PURE
+#if GLM_ARCH != GLM_ARCH_PURE && GLM_HAS_ANONYMOUS_STRUCT
 #	include "type_mat4x4_simd.inl"
 #endif

+ 6 - 2
glm/detail/type_vec4_simd.inl

@@ -316,7 +316,9 @@ namespace detail
 	{
 		static bool call(vec<4, int32, Q> const& v1, vec<4, int32, Q> const& v2)
 		{
-			return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0;
+			//return _mm_movemask_epi8(_mm_cmpeq_epi32(v1.data, v2.data)) != 0;
+			__m128i neq = _mm_xor_si128(v1.data, v2.data);
+			return _mm_test_all_zeros(neq, neq) == 0;
 		}
 	};
 
@@ -334,7 +336,9 @@ namespace detail
 	{
 		static bool call(vec<4, int32, Q> const& v1, vec<4, int32, Q> const& v2)
 		{
-			return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0;
+			//return _mm_movemask_epi8(_mm_cmpneq_epi32(v1.data, v2.data)) != 0;
+			__m128i neq = _mm_xor_si128(v1.data, v2.data);
+			return _mm_test_all_zeros(neq, neq) != 0;
 		}
 	};
 }//namespace detail

+ 17 - 0
test/core/core_type_vec4.cpp

@@ -757,11 +757,28 @@ static int test_constexpr()
 
 	return 0;
 }
+/*
+static int test_simd_gen()
+{
+	int Error = 0;
+
+	int const C = static_cast<int>(std::clock());
+	int const D = static_cast<int>(std::clock());
+
+	glm::ivec4 const A(C);
+	glm::ivec4 const B(D);
 
+	Error += A != B ? 0 : 1;
+
+	return Error;
+}
+*/
 int main()
 {
 	int Error = 0;
 
+	//Error += test_simd_gen();
+
 /*
 	{
 		glm::ivec4 const a1(2);