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;