From 8cf76f049bc91a667c820098e88dd064595da557 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 30 Apr 2016 16:23:55 +0200 Subject: [PATCH] Fixed Visual C++ SIMD instruction set automatic detection in 64 bits --- glm/detail/setup.hpp | 8 +++++++- readme.md | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index 4d668549..e599e177 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -423,8 +423,14 @@ # define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) # elif defined(__AVX__) # define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2) -# elif _M_IX86_FP == 2 +# elif defined(_M_X64) # define GLM_ARCH (GLM_ARCH_SSE2) +# elif defined(_M_IX86_FP) +# if _M_IX86_FP >= 2 +# define GLM_ARCH (GLM_ARCH_SSE2) +# else +# define GLM_ARCH (GLM_ARCH_PURE) +# endif # else # define GLM_ARCH (GLM_ARCH_PURE) # endif diff --git a/readme.md b/readme.md index 227347eb..c9fc6b8f 100644 --- a/readme.md +++ b/readme.md @@ -80,6 +80,7 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ##### Fixes: - Fixed uaddCarry warning #497 - Fixed roundPowerOfTwo and floorPowerOfTwo #503 +- Fixed Visual C++ SIMD instruction set automatic detection in 64 bits #### [GLM 0.9.7.4](https://github.com/g-truc/glm/releases/tag/0.9.7.4) - 2016-03-19 ##### Fixes: