diff --git a/glm/core/intrinsic_common.hpp b/glm/core/intrinsic_common.hpp index 81eec915..9028b4e7 100644 --- a/glm/core/intrinsic_common.hpp +++ b/glm/core/intrinsic_common.hpp @@ -12,10 +12,13 @@ #include "../setup.hpp" -//#if(GLM_ARCH >= GLM_ARCH_SSE2) +#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) +# error "SSE2 instructions not supported or enabled" +#else namespace glm{ -namespace detail{ +namespace detail +{ __m128 sse_abs_ps(__m128 x); __m128 sse_sgn_ps(__m128 x); @@ -63,5 +66,5 @@ namespace detail{ #include "intrinsic_common.inl" -//#endif//(GLM_ARCH >= GLM_ARCH_SSE2) +#endif//GLM_ARCH #endif//glm_detail_intrinsic_common diff --git a/glm/core/intrinsic_exponential.hpp b/glm/core/intrinsic_exponential.hpp index 9ece1f80..385e1fe0 100644 --- a/glm/core/intrinsic_exponential.hpp +++ b/glm/core/intrinsic_exponential.hpp @@ -12,7 +12,9 @@ #include "../setup.hpp" -#if(GLM_ARCH != GLM_ARCH_PURE) +#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) +# error "SSE2 instructions not supported or enabled" +#else namespace glm{ namespace detail @@ -54,5 +56,5 @@ inline __m128 sse_normalize_fast_ps( float * RESTRICT vOut, float * RESTRICT vI }//namespace detail }//namespace glm -#endif//GLM_ARCH != GLM_ARCH_PURE) +#endif//GLM_ARCH #endif//glm_detail_intrinsic_exponential diff --git a/glm/core/intrinsic_geometric.hpp b/glm/core/intrinsic_geometric.hpp index d5f324c7..3791e6df 100644 --- a/glm/core/intrinsic_geometric.hpp +++ b/glm/core/intrinsic_geometric.hpp @@ -10,6 +10,12 @@ #ifndef glm_core_intrinsic_geometric #define glm_core_intrinsic_geometric +#include "../setup.hpp" + +#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) +# error "SSE2 instructions not supported or enabled" +#else + #include "intrinsic_common.hpp" namespace glm{ @@ -47,4 +53,5 @@ namespace detail #include "intrinsic_geometric.inl" +#endif//GLM_ARCH #endif//glm_core_intrinsic_geometric diff --git a/glm/core/intrinsic_matrix.hpp b/glm/core/intrinsic_matrix.hpp index 7615cddc..36414e29 100644 --- a/glm/core/intrinsic_matrix.hpp +++ b/glm/core/intrinsic_matrix.hpp @@ -10,6 +10,12 @@ #ifndef glm_detail_intrinsic_matrix #define glm_detail_intrinsic_matrix +#include "../setup.hpp" + +#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) +# error "SSE2 instructions not supported or enabled" +#else + #include "intrinsic_geometric.hpp" namespace glm{ @@ -40,4 +46,5 @@ namespace detail #include "intrinsic_matrix.inl" +#endif//GLM_ARCH #endif//glm_detail_intrinsic_matrix diff --git a/glm/core/intrinsic_trigonometric.hpp b/glm/core/intrinsic_trigonometric.hpp index 458e3d92..6e4d532c 100644 --- a/glm/core/intrinsic_trigonometric.hpp +++ b/glm/core/intrinsic_trigonometric.hpp @@ -12,6 +12,10 @@ #include "../setup.hpp" +#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) +# error "SSE2 instructions not supported or enabled" +#else + namespace glm{ namespace detail { @@ -21,4 +25,5 @@ namespace detail #include "intrinsic_trigonometric.inl" +#endif//GLM_ARCH #endif//glm_detail_intrinsic_trigonometric diff --git a/glm/core/intrinsic_vector_relational.hpp b/glm/core/intrinsic_vector_relational.hpp index 260f28d6..5d6c1a7a 100644 --- a/glm/core/intrinsic_vector_relational.hpp +++ b/glm/core/intrinsic_vector_relational.hpp @@ -12,6 +12,10 @@ #include "../setup.hpp" +#if((GLM_ARCH & GLM_ARCH_SSE2) != GLM_ARCH_SSE2) +# error "SSE2 instructions not supported or enabled" +#else + namespace glm{ namespace detail { @@ -21,4 +25,5 @@ namespace detail #include "intrinsic_vector_relational.inl" +#endif//GLM_ARCH #endif//glm_detail_intrinsic_vector_relational