Updated SSE setup
This commit is contained in:
parent
9bfef421e2
commit
d7755485c8
@ -12,11 +12,10 @@
|
|||||||
|
|
||||||
#include "../setup.hpp"
|
#include "../setup.hpp"
|
||||||
|
|
||||||
#if(GLM_ARCH != GLM_ARCH_PURE)
|
#if(GLM_ARCH >= GLM_ARCH_SSE2)
|
||||||
|
|
||||||
namespace glm{
|
namespace glm{
|
||||||
namespace detail
|
namespace detail{
|
||||||
{
|
|
||||||
__m128 sse_abs_ps(__m128 x);
|
__m128 sse_abs_ps(__m128 x);
|
||||||
|
|
||||||
__m128 sse_sgn_ps(__m128 x);
|
__m128 sse_sgn_ps(__m128 x);
|
||||||
@ -62,5 +61,5 @@ namespace detail
|
|||||||
|
|
||||||
#include "intrinsic_common.inl"
|
#include "intrinsic_common.inl"
|
||||||
|
|
||||||
#endif//(GLM_ARCH != GLM_ARCH_PURE)
|
#endif//(GLM_ARCH >= GLM_ARCH_SSE2)
|
||||||
#endif//glm_detail_intrinsic_common
|
#endif//glm_detail_intrinsic_common
|
||||||
|
|||||||
@ -110,6 +110,10 @@ namespace glm
|
|||||||
{
|
{
|
||||||
typedef detail::fvec4SIMD simd_vec4;
|
typedef detail::fvec4SIMD simd_vec4;
|
||||||
|
|
||||||
|
detail::fvec4SIMD cross(
|
||||||
|
detail::fvec4SIMD const & a,
|
||||||
|
detail::fvec4SIMD const & b);
|
||||||
|
|
||||||
}//namespace simd_vec4
|
}//namespace simd_vec4
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|||||||
@ -266,8 +266,25 @@ namespace glm
|
|||||||
namespace gtx{
|
namespace gtx{
|
||||||
namespace simd_vec4
|
namespace simd_vec4
|
||||||
{
|
{
|
||||||
|
# if(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_SSE)
|
||||||
|
inline detail::fvec4SIMD cross
|
||||||
|
(
|
||||||
|
detail::fvec4SIMD const & a,
|
||||||
|
detail::fvec4SIMD const & b
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return _mm_xpd_ps(a.Data, b.Data);
|
||||||
|
}
|
||||||
|
# else//(GLM_INSTRUCTION_SET & GLM_INSTRUCTION_SET_PURE)
|
||||||
|
inline detail::fvec4SIMD cross
|
||||||
|
(
|
||||||
|
detail::fvec4SIMD const & a,
|
||||||
|
detail::fvec4SIMD const & b
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return glm::cross(a, b);
|
||||||
|
}
|
||||||
|
# endif
|
||||||
}//namespace simd_vec4
|
}//namespace simd_vec4
|
||||||
}//namespace gtx
|
}//namespace gtx
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|||||||
@ -241,10 +241,18 @@
|
|||||||
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC))
|
#if(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_GCC))
|
||||||
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_NULL
|
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_NULL
|
||||||
#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
|
#elif(defined(GLM_COMPILER) && (GLM_COMPILER & GLM_COMPILER_VC))
|
||||||
# ifdef _M_CEE_PURE
|
# if(GLM_MODEL == GLM_MODEL_64)
|
||||||
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_PURE
|
# ifdef _M_CEE_PURE
|
||||||
|
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_PURE
|
||||||
|
# else
|
||||||
|
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_MMX | GLM_INSTRUCTION_SET_SSE
|
||||||
|
# endif
|
||||||
# else
|
# else
|
||||||
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_NULL
|
# ifdef _M_CEE_PURE
|
||||||
|
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_PURE
|
||||||
|
# else
|
||||||
|
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_NULL
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_PURE
|
# define GLM_INSTRUCTION_SET GLM_INSTRUCTION_SET_PURE
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user