From 79f6d92c8ae9e4f430a47da21ef333aaa0f8278f Mon Sep 17 00:00:00 2001 From: Christophe R Date: Sun, 9 Aug 2015 10:50:29 +0200 Subject: [PATCH] Added GLM_SIMD to enable automatic SIMD code generation for generic GLM types #235 #370 --- glm/detail/type_vec4.hpp | 6 ++++-- glm/detail/type_vec4.inl | 2 +- readme.md | 4 ++++ test/core/core_type_mat4x4.cpp | 1 + 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index c2d9f60e..94583f1f 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -114,14 +114,16 @@ namespace detail // -- Data -- -# if GLM_HAS_ANONYMOUS_UNION +# if GLM_HAS_ANONYMOUS_UNION && GLM_NOT_BUGGY_VC32BITS union { struct { T x, y, z, w;}; struct { T r, g, b, a; }; struct { T s, t, p, q; }; - typename detail::simd::type data; +# ifdef GLM_SIMD + typename detail::simd::type data; +# endif # ifdef GLM_SWIZZLE _GLM_SWIZZLE4_2_MEMBERS(T, P, tvec2, x, y, z, w) diff --git a/glm/detail/type_vec4.inl b/glm/detail/type_vec4.inl index 7518748e..27391693 100644 --- a/glm/detail/type_vec4.inl +++ b/glm/detail/type_vec4.inl @@ -1104,7 +1104,7 @@ namespace glm } }//namespace glm -#if GLM_HAS_ANONYMOUS_UNION && GLM_NOT_BUGGY_VC32BITS +#if GLM_HAS_ANONYMOUS_UNION && defined(GLM_SIMD) && GLM_NOT_BUGGY_VC32BITS #if GLM_ARCH & GLM_ARCH_SSE2 # include "type_vec4_sse2.inl" #endif diff --git a/readme.md b/readme.md index fe0a37f8..d899dd8c 100644 --- a/readme.md +++ b/readme.md @@ -50,6 +50,10 @@ glm::mat4 camera(float Translate, glm::vec2 const & Rotate) ## Release notes +#### [GLM 0.9.7.1](https://github.com/g-truc/glm/releases/latest) - 2015-XX-XX +##### Features: +- Added GLM_SIMD to enable automatic SIMD code generation for generic GLM types #235 #370 + #### [GLM 0.9.7.0](https://github.com/g-truc/glm/releases/tag/0.9.7.0) - 2015-08-02 ##### Features: - Added GTC_color_space: convertLinearToSRGB and convertSRGBToLinear functions diff --git a/test/core/core_type_mat4x4.cpp b/test/core/core_type_mat4x4.cpp index 9e16c53d..6b7b36e3 100644 --- a/test/core/core_type_mat4x4.cpp +++ b/test/core/core_type_mat4x4.cpp @@ -29,6 +29,7 @@ /// @author Christophe Riccio /////////////////////////////////////////////////////////////////////////////////// +#define GLM_SIMD #include #include #include