Improved SIMD and swizzle operators interactions with GCC and Clang, Added raw SIMD API.

This commit is contained in:
Christophe Riccio
2016-05-03 23:57:41 +02:00
parent aca1710c5f
commit 1f71f6fb3a
30 changed files with 1670 additions and 1875 deletions

View File

@@ -96,7 +96,7 @@ int test_vec1_ctor()
}
#endif
*/
#if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
{
glm::vec2 A = glm::vec2(1.0f, 2.0f);
glm::vec2 B = A.xy;
@@ -107,7 +107,7 @@ int test_vec1_ctor()
Error += glm::all(glm::equal(A, C)) ? 0 : 1;
Error += glm::all(glm::equal(A, D)) ? 0 : 1;
}
#endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
{
glm::vec2 A = glm::vec2(2.0f);

View File

@@ -262,7 +262,7 @@ int test_vec2_ctor()
}
#endif
#if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
{
glm::vec2 A = glm::vec2(1.0f, 2.0f);
glm::vec2 B = A.xy;
@@ -273,7 +273,7 @@ int test_vec2_ctor()
Error += glm::all(glm::equal(A, C)) ? 0 : 1;
Error += glm::all(glm::equal(A, D)) ? 0 : 1;
}
#endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
#endif//GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
{
glm::vec2 A = glm::vec2(2.0f);

View File

@@ -71,7 +71,7 @@ int test_vec3_ctor()
}
#endif
#if(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
#if(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE))
{
glm::vec3 A = glm::vec3(1.0f, 2.0f, 3.0f);
glm::vec3 B = A.xyz;
@@ -90,7 +90,7 @@ int test_vec3_ctor()
Error += glm::all(glm::equal(A, G)) ? 0 : 1;
Error += glm::all(glm::equal(A, H)) ? 0 : 1;
}
#endif//(GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE))
#endif//(GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE))
{
glm::vec3 A(1);

View File

@@ -98,7 +98,7 @@ int test_vec4_ctor()
}
#endif
#if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
#if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
{
glm::vec4 A = glm::vec4(1.0f, 2.0f, 3.0f, 4.0f);
glm::vec4 B = A.xyzw;
@@ -127,7 +127,7 @@ int test_vec4_ctor()
Error += glm::all(glm::equal(A, L)) ? 0 : 1;
Error += glm::all(glm::equal(A, M)) ? 0 : 1;
}
#endif// GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE)
#endif// GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE)
{
glm::vec4 A(1);
@@ -334,7 +334,7 @@ int test_vec4_swizzle_partial()
glm::vec4 A(1, 2, 3, 4);
# if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SWIZZLE_RELAX)
# if GLM_HAS_UNRESTRICTED_UNIONS && defined(GLM_SWIZZLE_RELAX)
{
glm::vec4 B(A.xy, A.zw);
Error += A == B ? 0 : 1;