mirror of
https://github.com/g-truc/glm.git
synced 2024-11-26 18:24:35 +00:00
Fixed SSE detection on Visual C++
This commit is contained in:
parent
88cbbebac6
commit
e8cbc50343
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
|
||||||
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
|
#if(!(GLM_ARCH & GLM_ARCH_SSE2))
|
||||||
# error "SSE2 instructions not supported or enabled"
|
# error "SSE2 instructions not supported or enabled"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
|
||||||
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
|
#if(!(GLM_ARCH & GLM_ARCH_SSE2))
|
||||||
# error "SSE2 instructions not supported or enabled"
|
# error "SSE2 instructions not supported or enabled"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
|
||||||
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
|
#if(!(GLM_ARCH & GLM_ARCH_SSE2))
|
||||||
# error "SSE2 instructions not supported or enabled"
|
# error "SSE2 instructions not supported or enabled"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
|
||||||
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
|
#if(!(GLM_ARCH & GLM_ARCH_SSE2))
|
||||||
# error "SSE2 instructions not supported or enabled"
|
# error "SSE2 instructions not supported or enabled"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
|
||||||
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
|
#if(!(GLM_ARCH & GLM_ARCH_SSE2))
|
||||||
# error "SSE2 instructions not supported or enabled"
|
# error "SSE2 instructions not supported or enabled"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
|
||||||
#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2)
|
#if(!(GLM_ARCH & GLM_ARCH_SSE2))
|
||||||
# error "SSE2 instructions not supported or enabled"
|
# error "SSE2 instructions not supported or enabled"
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -482,26 +482,26 @@
|
|||||||
#if(defined(GLM_FORCE_PURE))
|
#if(defined(GLM_FORCE_PURE))
|
||||||
# define GLM_ARCH GLM_ARCH_PURE
|
# define GLM_ARCH GLM_ARCH_PURE
|
||||||
#elif(defined(GLM_FORCE_AVX2))
|
#elif(defined(GLM_FORCE_AVX2))
|
||||||
# define GLM_ARCH GLM_ARCH_AVX2
|
# define GLM_ARCH (GLM_ARCH_AVX2 | GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
#elif(defined(GLM_FORCE_AVX))
|
#elif(defined(GLM_FORCE_AVX))
|
||||||
# define GLM_ARCH GLM_ARCH_AVX
|
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
#elif(defined(GLM_FORCE_SSE4))
|
#elif(defined(GLM_FORCE_SSE4))
|
||||||
# define GLM_ARCH GLM_ARCH_SSE4
|
# define GLM_ARCH (GLM_ARCH_SSE4 | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
#elif(defined(GLM_FORCE_SSE3))
|
#elif(defined(GLM_FORCE_SSE3))
|
||||||
# define GLM_ARCH GLM_ARCH_SSE3
|
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
#elif(defined(GLM_FORCE_SSE2))
|
#elif(defined(GLM_FORCE_SSE2))
|
||||||
# define GLM_ARCH GLM_ARCH_SSE2
|
# define GLM_ARCH (GLM_ARCH_SSE2)
|
||||||
#elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))
|
#elif((GLM_COMPILER & GLM_COMPILER_VC) && (defined(_M_IX86) || defined(_M_X64)))
|
||||||
# if(defined(_M_CEE_PURE))
|
# if(defined(_M_CEE_PURE))
|
||||||
# define GLM_ARCH GLM_ARCH_PURE
|
# define GLM_ARCH GLM_ARCH_PURE
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC2010)
|
||||||
# if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
|
# if(_MSC_FULL_VER >= 160031118) //160031118: VC2010 SP1 beta full version
|
||||||
# define GLM_ARCH GLM_ARCH_AVX //GLM_ARCH_AVX (Require SP1)
|
# define GLM_ARCH (GLM_ARCH_AVX | GLM_ARCH_SSE3 | GLM_ARCH_SSE2)//GLM_ARCH_AVX (Require SP1)
|
||||||
# else
|
# else
|
||||||
# define GLM_ARCH GLM_ARCH_SSE3
|
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
# endif
|
# endif
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2008)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC2008)
|
||||||
# define GLM_ARCH GLM_ARCH_SSE3
|
# define GLM_ARCH (GLM_ARCH_SSE3 | GLM_ARCH_SSE2)
|
||||||
# elif(GLM_COMPILER >= GLM_COMPILER_VC2005)
|
# elif(GLM_COMPILER >= GLM_COMPILER_VC2005)
|
||||||
# define GLM_ARCH GLM_ARCH_SSE2
|
# define GLM_ARCH GLM_ARCH_SSE2
|
||||||
# else
|
# else
|
||||||
|
Loading…
Reference in New Issue
Block a user