diff --git a/CMakeLists.txt b/CMakeLists.txt index 7375f2d5..85ae87a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) #add_definitions(-pedantic) #add_definitions(-S) #add_definitions(-s) -#add_definitions(-msse2) +add_definitions(-msse2) #add_definitions(-m32) #add_definitions(-mfpmath=387) #add_definitions(-ffast-math) diff --git a/glm/core/_detail.hpp b/glm/core/_detail.hpp index d41fa7f8..8f8a1c55 100644 --- a/glm/core/_detail.hpp +++ b/glm/core/_detail.hpp @@ -332,7 +332,7 @@ namespace detail # define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct # define GLM_RESTRICT __declspec(restrict) # define GLM_RESTRICT_VAR __restrict -#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) +#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31)) # define GLM_DEPRECATED __attribute__((__deprecated__)) # define GLM_ALIGN(x) __attribute__((aligned(x))) # define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x))) diff --git a/glm/core/setup.hpp b/glm/core/setup.hpp index d4124369..619e7adc 100644 --- a/glm/core/setup.hpp +++ b/glm/core/setup.hpp @@ -343,7 +343,18 @@ # else # define GLM_ARCH GLM_ARCH_PURE # endif +#elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC) +# if(defined(__AVX__)) +# define GLM_ARCH GLM_ARCH_AVX +# 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 #elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__))) +# error "GCC" # if(defined(__AVX__)) # define GLM_ARCH GLM_ARCH_AVX # elif(defined(__SSE3__)) diff --git a/glm/gtx/simd_vec4.hpp b/glm/gtx/simd_vec4.hpp index 3384e9e1..05fb99ec 100644 --- a/glm/gtx/simd_vec4.hpp +++ b/glm/gtx/simd_vec4.hpp @@ -33,7 +33,7 @@ namespace detail { /// 4-dimensional vector implemented using SIMD SEE intrinsics. /// \ingroup gtx_simd_vec4 - GLM_ALIGNED_STRUCT(4) fvec4SIMD + GLM_ALIGNED_STRUCT(16) fvec4SIMD { enum ctor{null}; typedef __m128 value_type; @@ -114,7 +114,7 @@ namespace detail namespace gtx{ namespace simd_vec4 ///< GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type. { - typedef detail::fvec4SIMD simdVec4; + typedef glm::detail::fvec4SIMD simdVec4; /// \addtogroup gtx_simd_vec4 ///@{