This commit is contained in:
Christophe Riccio
2011-01-24 15:44:14 +00:00
parent 019c6ced18
commit c06484ff12
23 changed files with 30 additions and 77 deletions

View File

@@ -7,7 +7,6 @@
// File : test/gtx/simd-mat4.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#define GLM_INSTRUCTION_SET GLM_PLATFORM_SSE3 | GLM_PLATFORM_SSE2
#include <glm/glm.hpp>
int test_static_assert()
@@ -130,8 +129,7 @@ int test_all()
return 0;
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -131,7 +131,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -131,7 +131,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -131,7 +131,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -131,7 +131,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -131,7 +131,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -131,7 +131,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -7,7 +7,6 @@
// File : test/gtx/simd-mat4.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#define GLM_INSTRUCTION_SET GLM_PLATFORM_SSE3 | GLM_PLATFORM_SSE2
#include <glm/glm.hpp>
int test_static_assert()
@@ -131,7 +130,7 @@ int test_all()
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -7,7 +7,6 @@
// File : test/gtx/simd-mat4.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#define GLM_INSTRUCTION_SET GLM_PLATFORM_SSE3 | GLM_PLATFORM_SSE2
#include <glm/glm.hpp>
int test_static_assert()
@@ -130,8 +129,7 @@ int test_all()
return 0;
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_static_assert();

View File

@@ -9,8 +9,6 @@
#include <glm/glm.hpp>
#include <glm/gtc/half_float.hpp>
#include <xmmintrin.h>
#include <emmintrin.h>
template <int Value>
struct mask
@@ -26,12 +24,12 @@ enum comp
W
};
template<comp X, comp Y, comp Z, comp W>
__m128 swizzle(glm::vec4 const & v)
{
__m128 Src = _mm_set_ps(v.w, v.z, v.y, v.x);
return _mm_shuffle_ps(Src, Src, mask<(int(W) << 6) | (int(Z) << 4) | (int(Y) << 2) | (int(X) << 0)>::value);
}
//template<comp X, comp Y, comp Z, comp W>
//__m128 swizzle(glm::vec4 const & v)
//{
// __m128 Src = _mm_set_ps(v.w, v.z, v.y, v.x);
// return _mm_shuffle_ps(Src, Src, mask<(int(W) << 6) | (int(Z) << 4) | (int(Y) << 2) | (int(X) << 0)>::value);
//}
bool test_hvec4()
{
@@ -57,8 +55,8 @@ int main()
{
test_hvec4();
__m128 DataA = swizzle<X, Y, Z, W>(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f));
__m128 DataB = swizzle<W, Z, Y, X>(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f));
//__m128 DataA = swizzle<X, Y, Z, W>(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f));
//__m128 DataB = swizzle<W, Z, Y, X>(glm::vec4(1.0f, 2.0f, 3.0f, 4.0f));
bool Result = true;

View File

@@ -20,7 +20,7 @@ int test_int_matrix()
return 0;
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_int_matrix();

View File

@@ -114,7 +114,7 @@ int test_swizzle_vec4_const_static()
return 0;
}
int main(int argc, void* argv[])
int main()
{
int Failed = 0;
Failed += test_swizzle_vec4_ref_dynamic();

View File

@@ -127,7 +127,7 @@ namespace bitRevert
}
}//bitRevert
int main(int argc, void* argv[])
int main()
{
::extractField::test();
::bitRevert::test();

View File

@@ -221,7 +221,7 @@ int test_compute_gtx()
return Output.size() != 0;
}
int main(int argc, void* argv[])
int main()
{
int Failed = GLM_COMPILER;

View File

@@ -7,12 +7,11 @@
// File : test/gtx/simd-vec4.cpp
///////////////////////////////////////////////////////////////////////////////////////////////////
#define GLM_INSTRUCTION_SET GLM_PLATFORM_SSE3 | GLM_PLATFORM_SSE2
#include <glm/glm.hpp>
#include <glm/gtx/simd_vec4.hpp>
#include <cstdio>
int main(int argc, char* argv[])
int main()
{
glm::simd_vec4 A1(0.0f, 0.1f, 0.2f, 0.3f);
glm::simd_vec4 B1(0.4f, 0.5f, 0.6f, 0.7f);