mirror of
https://github.com/g-truc/glm.git
synced 2024-11-10 12:41:54 +00:00
Fixed SSE detection on GCC
This commit is contained in:
parent
438089295e
commit
019c6ced18
@ -25,7 +25,7 @@ namespace glm
|
||||
|
||||
namespace detail
|
||||
{
|
||||
#ifndef GLM_USE_ANONYMOUS_UNION
|
||||
#ifndef _MSC_EXTENSIONS
|
||||
template <>
|
||||
struct tvec2<thalf>
|
||||
{
|
||||
@ -319,7 +319,7 @@ namespace glm
|
||||
tvec4<thalf> swizzle(comp X, comp Y, comp Z, comp W) const;
|
||||
tref4<thalf> swizzle(comp X, comp Y, comp Z, comp W);
|
||||
};
|
||||
#endif//GLM_USE_ANONYMOUS_UNION
|
||||
#endif//_MSC_EXTENSIONS
|
||||
}
|
||||
//namespace detail
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
namespace glm{
|
||||
namespace detail{
|
||||
|
||||
#ifndef GLM_USE_ANONYMOUS_UNION
|
||||
#ifndef _MSC_EXTENSIONS
|
||||
|
||||
//////////////////////////////////////
|
||||
// hvec2
|
||||
@ -969,7 +969,7 @@ inline tref4<thalf> tvec4<thalf>::swizzle(comp x, comp y, comp z, comp w)
|
||||
(*this)[w]);
|
||||
}
|
||||
|
||||
#endif//GLM_USE_ANONYMOUS_UNION
|
||||
#endif//_MSC_EXTENSIONS
|
||||
|
||||
}//namespace detail
|
||||
}//namespace glm
|
||||
|
@ -262,10 +262,12 @@
|
||||
# define GLM_ARCH GLM_ARCH_PURE
|
||||
# endif
|
||||
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)))
|
||||
# if(GLM_COMPILER >= GLM_COMPILER_GCC44)
|
||||
# if(defined(__AVX__))
|
||||
# define GLM_ARCH GLM_ARCH_AVX
|
||||
# elif(GLM_COMPILER >= GLM_COMPILER_GCC40)
|
||||
# elif(defined(__SSE3__))
|
||||
# define GLM_ARCH GLM_ARCH_SSE3
|
||||
# elif(defined(__SSE2__))
|
||||
# define GLM_ARCH GLM_ARCH_SSE2
|
||||
# else
|
||||
# define GLM_ARCH GLM_ARCH_PURE
|
||||
# endif
|
||||
@ -340,8 +342,10 @@
|
||||
# define GLM_STATIC_ASSERT(x, message) static_assert(x, message)
|
||||
#elif(defined(BOOST_STATIC_ASSERT))
|
||||
# define GLM_STATIC_ASSERT(x, message) BOOST_STATIC_ASSERT(x)
|
||||
#else
|
||||
#elif(GLM_COMPILER & GLM_COMPILER_VC)
|
||||
# define GLM_STATIC_ASSERT(x, message) typedef char __CASSERT__##__LINE__[(x) ? 1 : -1]
|
||||
#else
|
||||
# define GLM_STATIC_ASSERT(x, message)
|
||||
#endif//GLM_LANG
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -19,12 +19,12 @@ int main()
|
||||
glm::half C = A + B;
|
||||
glm::half D(C);
|
||||
float E = D;
|
||||
int F = C;
|
||||
int F = float(C);
|
||||
glm::half G = B * C;
|
||||
glm::half H = G / C;
|
||||
H += glm::half(1.0f);
|
||||
double J = H;
|
||||
int I = H;
|
||||
int I = float(H);
|
||||
|
||||
Result = Result && J == 3.0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user