Revert "Fixed vec4 SIMD constexpr #653"

This reverts commit 950d226154.
This commit is contained in:
Christophe Riccio
2017-08-06 15:49:50 +02:00
parent 6c70e74f3c
commit e4ffe16bed
11 changed files with 73 additions and 64 deletions

View File

@@ -61,7 +61,7 @@ int test_ctr()
#if GLM_HAS_INITIALIZER_LISTS
glm::mat2x2 m0(
glm::vec2(0, 1),
glm::vec2(0, 1),
glm::vec2(2, 3));
glm::mat2x2 m1{0, 1, 2, 3};

View File

@@ -38,10 +38,6 @@ int test_vec1_ctor()
{
int Error = 0;
# if GLM_HAS_CONSTEXPR
constexpr glm::vec1 v(0);
# endif
# if GLM_HAS_TRIVIAL_QUERIES
// Error += std::is_trivially_default_constructible<glm::vec1>::value ? 0 : 1;
// Error += std::is_trivially_copy_assignable<glm::vec1>::value ? 0 : 1;

View File

@@ -199,10 +199,6 @@ int test_vec2_ctor()
{
int Error = 0;
# if GLM_HAS_CONSTEXPR
constexpr glm::vec2 v(0);
# endif
{
glm::vec2 A(1);
glm::vec2 B(A);

View File

@@ -15,10 +15,6 @@ int test_vec3_ctor()
{
int Error = 0;
# if GLM_HAS_CONSTEXPR
constexpr glm::vec3 v(0);
# endif
# if GLM_HAS_TRIVIAL_QUERIES
// Error += std::is_trivially_default_constructible<glm::vec3>::value ? 0 : 1;
// Error += std::is_trivially_copy_assignable<glm::vec3>::value ? 0 : 1;
@@ -263,7 +259,7 @@ int test_vec3_swizzle3_2()
int Error = 0;
glm::vec3 v(1, 2, 3);
glm::vec2 u(0);
glm::vec2 u;
# if(GLM_LANG & GLM_LANG_CXXMS_FLAG)
// Can not assign a vec3 swizzle to a vec2
@@ -326,7 +322,7 @@ int test_vec3_swizzle3_3()
int Error = 0;
glm::vec3 v(1, 2, 3);
glm::vec3 u(0);
glm::vec3 u;
# if(GLM_LANG & GLM_LANG_CXXMS_FLAG)
u = v; Error += (u.x == 1.0f && u.y == 2.0f && u.z == 3.0f) ? 0 : 1;
@@ -352,7 +348,7 @@ int test_vec3_swizzle_operators()
{
int Error = 0;
glm::vec3 q(0), u, v;
glm::vec3 q, u, v;
u = glm::vec3(1, 2, 3);
v = glm::vec3(10, 20, 30);
@@ -409,9 +405,9 @@ int test_vec3_swizzle_functions()
r = glm::dot(glm::vec2(a.xy()), glm::vec2(b.yy())); Error += (int(r) == 60) ? 0 : 1;
// vec3
glm::vec3 q(0);
glm::vec3 u = glm::vec3(1, 2, 3);
glm::vec3 v = glm::vec3(10, 20, 30);
glm::vec3 q, u, v;
u = glm::vec3(1, 2, 3);
v = glm::vec3(10, 20, 30);
r = glm::dot(u, v); Error += (int(r) == 140) ? 0 : 1;
r = glm::dot(u.xyz(), v.zyz()); Error += (int(r) == 160) ? 0 : 1;
r = glm::dot(u, v.zyx()); Error += (int(r) == 100) ? 0 : 1;
@@ -419,8 +415,9 @@ int test_vec3_swizzle_functions()
r = glm::dot(u.xy(), v.xy()); Error += (int(r) == 50) ? 0 : 1;
// vec4
glm::vec4 s = glm::vec4(1, 2, 3, 4);
glm::vec4 t = glm::vec4(10, 20, 30, 40);
glm::vec4 s, t;
s = glm::vec4(1, 2, 3, 4);
t = glm::vec4(10, 20, 30, 40);
r = glm::dot(s, t); Error += (int(r) == 300) ? 0 : 1;
r = glm::dot(s.xyzw(), t.xyzw()); Error += (int(r) == 300) ? 0 : 1;
r = glm::dot(s.xyz(), t.xyz()); Error += (int(r) == 140) ? 0 : 1;
@@ -486,6 +483,9 @@ int main()
{
int Error = 0;
glm::vec3 v;
assert(v.length() == 3);
Error += test_vec3_ctor();
Error += test_vec3_operators();
Error += test_vec3_size();

View File

@@ -37,10 +37,6 @@ int test_vec4_ctor()
{
int Error = 0;
# if GLM_HAS_CONSTEXPR
constexpr glm::vec4 v(0.0f);
# endif
{
glm::ivec4 A(1, 2, 3, 4);
glm::ivec4 B(A);
@@ -550,6 +546,8 @@ int main()
printf("GNI\n");
}
*/
glm::vec4 v;
assert(v.length() == 4);
# ifdef NDEBUG
std::size_t const Size(1000000);