diff --git a/CMakeLists.txt b/CMakeLists.txt index 818af5b2..daf45035 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,7 @@ elseif(GLM_TEST_ENABLE_SIMD_AVX2) elseif(GLM_USE_INTEL) add_definitions(/QxAVX2) elseif(MSVC) + message("AVX2") add_definitions(/arch:AVX2) endif() elseif(GLM_TEST_ENABLE_SIMD_AVX) diff --git a/glm/detail/setup.hpp b/glm/detail/setup.hpp index ffa74640..d45dc37b 100644 --- a/glm/detail/setup.hpp +++ b/glm/detail/setup.hpp @@ -592,7 +592,9 @@ # define GLM_ARCH GLM_ARCH_PURE # endif #elif GLM_COMPILER & GLM_COMPILER_VC -# if _M_IX86_FP == 2 && defined(__AVX__) +# if defined(__AVX2__) +# 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 # define GLM_ARCH (GLM_ARCH_SSE2)