From ac8ec9b97c9d7af454d403a6cbe93c7b5bdb0945 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 30 Jun 2012 01:05:45 +0100 Subject: [PATCH] Fixed SSE includes with GCC --- glm/core/setup.hpp | 27 ++++++++++++++++----------- readme.txt | 2 ++ 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index a12adb46..c573b702 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -49,9 +49,12 @@ #define GLM_PLATFORM_ANDROID 0x00100000 #define GLM_PLATFORM_CHROME_NACL 0x00200000 #define GLM_PLATFORM_UNIX 0x00400000 +#define GLM_PLATFORM_QNXNTO 0x00800000 #ifdef GLM_FORCE_PLATFORM_UNKNOWN # define GLM_PLATFORM GLM_PLATFORM_UNKNOWN +#elif defined(__QNXNTO__) +# define GLM_PLATFORM GLM_PLATFORM_QNXNTO #elif defined(__APPLE__) # define GLM_PLATFORM GLM_PLATFORM_APPLE #elif defined(_WIN32) @@ -471,10 +474,10 @@ #define GLM_ARCH_PURE 0x0000 #define GLM_ARCH_SSE2 0x0001 -#define GLM_ARCH_SSE3 0x0002 | GLM_ARCH_SSE2 -#define GLM_ARCH_SSE4 0x0004 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 -#define GLM_ARCH_AVX 0x0008 | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 -#define GLM_ARCH_AVX2 0x0010 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 +#define GLM_ARCH_SSE3 0x0002// | GLM_ARCH_SSE2 +#define GLM_ARCH_SSE4 0x0004// | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 +#define GLM_ARCH_AVX 0x0008// | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 +#define GLM_ARCH_AVX2 0x0010// | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2 #if(defined(GLM_FORCE_PURE)) # define GLM_ARCH GLM_ARCH_PURE @@ -504,6 +507,8 @@ # else # define GLM_ARCH GLM_ARCH_PURE # endif +#elif((GLM_PLATFORM & GLM_PLATFORM_APPLE) && (GLM_COMPILER & GLM_COMPILER_GCC)) +# define GLM_ARCH GLM_ARCH_PURE #elif(((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) || (GLM_COMPILER & GLM_COMPILER_LLVM_GCC)) # if(defined(__AVX2__)) # define GLM_ARCH GLM_ARCH_AVX2 @@ -522,23 +527,23 @@ # define GLM_ARCH GLM_ARCH_PURE #endif -#if(GLM_ARCH != GLM_ARCH_PURE) -#if((GLM_ARCH & GLM_ARCH_AVX2) == GLM_ARCH_AVX2) +//#if(GLM_ARCH != GLM_ARCH_PURE) +#if(GLM_ARCH & GLM_ARCH_AVX2) # include #endif//GLM_ARCH -#if((GLM_ARCH & GLM_ARCH_AVX) == GLM_ARCH_AVX) +#if(GLM_ARCH & GLM_ARCH_AVX) # include #endif//GLM_ARCH -#if((GLM_ARCH & GLM_ARCH_SSE4) == GLM_ARCH_SSE4) +#if(GLM_ARCH & GLM_ARCH_SSE4) # include #endif//GLM_ARCH -#if((GLM_ARCH & GLM_ARCH_SSE3) == GLM_ARCH_SSE3) +#if(GLM_ARCH & GLM_ARCH_SSE3) # include #endif//GLM_ARCH -#if((GLM_ARCH & GLM_ARCH_SSE2) == GLM_ARCH_SSE2) +#if(GLM_ARCH & GLM_ARCH_SSE2) # include #endif//GLM_ARCH -#endif//(GLM_ARCH != GLM_ARCH_PURE) +//#endif//(GLM_ARCH != GLM_ARCH_PURE) #if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_ARCH_DISPLAYED)) # define GLM_MESSAGE_ARCH_DISPLAYED diff --git a/readme.txt b/readme.txt index 4e016f26..f186d8aa 100644 --- a/readme.txt +++ b/readme.txt @@ -44,6 +44,8 @@ GLM 0.9.3.4: 2012-06-28 - Fixed C++11 compiler option for GCC - Removed MS language extension option for GCC (not fonctionnal) - Fixed bitfieldExtract for vector types +- Fixed warnings +- Fixed SSE includes ================================================================================ GLM 0.9.3.3: 2012-05-10