From da8b136419020d580626d236c5f097aa4a0dd031 Mon Sep 17 00:00:00 2001 From: Groove Date: Wed, 11 Jul 2018 03:30:01 +0200 Subject: [PATCH] Fixed build --- glm/detail/compute_common.hpp | 1 + glm/detail/qualifier.hpp | 115 +++++++++++++++++++++++++++++----- glm/detail/type_vec.hpp | 104 +----------------------------- glm/detail/type_vec2.hpp | 2 +- glm/detail/type_vec3.hpp | 2 +- glm/detail/type_vec4.hpp | 2 +- glm/ext/vec1.hpp | 2 +- 7 files changed, 105 insertions(+), 123 deletions(-) diff --git a/glm/detail/compute_common.hpp b/glm/detail/compute_common.hpp index 4e3b3b81..b9cc2bde 100644 --- a/glm/detail/compute_common.hpp +++ b/glm/detail/compute_common.hpp @@ -1,6 +1,7 @@ #pragma once #include "setup.hpp" +#include "_vectorize.hpp" #include #include diff --git a/glm/detail/qualifier.hpp b/glm/detail/qualifier.hpp index 262ec329..222f86d7 100644 --- a/glm/detail/qualifier.hpp +++ b/glm/detail/qualifier.hpp @@ -4,6 +4,7 @@ #pragma once #include "setup.hpp" +#include "type_int.hpp" namespace glm { @@ -46,24 +47,106 @@ namespace detail static const bool value = false; }; -# if GLM_HAS_ALIGNED_TYPE - template<> - struct is_aligned - { - static const bool value = true; - }; + template<> + struct is_aligned + { + static const bool value = true; + }; - template<> - struct is_aligned - { - static const bool value = true; - }; + template<> + struct is_aligned + { + static const bool value = true; + }; - template<> - struct is_aligned - { - static const bool value = true; - }; + template<> + struct is_aligned + { + static const bool value = true; + }; + + template + struct storage + { + typedef struct type { + T data[L]; + } type; + }; + + template + struct storage + { + typedef struct alignas(L * sizeof(T)) type { + T data[L]; + } type; + }; + + template + struct storage<3, T, true> + { + typedef struct alignas(4 * sizeof(T)) type { + T data[4]; + } type; + }; + +# if GLM_ARCH & GLM_ARCH_SSE2_BIT + template<> + struct storage<4, float, true> + { + typedef glm_f32vec4 type; + }; + + template<> + struct storage<4, int32, true> + { + typedef glm_i32vec4 type; + }; + + template<> + struct storage<4, uint32, true> + { + typedef glm_u32vec4 type; + }; + + template<> + struct storage<2, double, true> + { + typedef glm_f64vec2 type; + }; + + template<> + struct storage<2, int64, true> + { + typedef glm_i64vec2 type; + }; + + template<> + struct storage<2, uint64, true> + { + typedef glm_u64vec2 type; + }; +# endif + +# if (GLM_ARCH & GLM_ARCH_AVX_BIT) + template<> + struct storage<4, double, true> + { + typedef glm_f64vec4 type; + }; +# endif + +# if (GLM_ARCH & GLM_ARCH_AVX2_BIT) + template<> + struct storage<4, int64, true> + { + typedef glm_i64vec4 type; + }; + + template<> + struct storage<4, uint64, true> + { + typedef glm_u64vec4 type; + }; # endif }//namespace detail }//namespace glm diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index baf72300..34b904df 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -7,110 +7,8 @@ #include "type_int.hpp" #include "compute_vector_relational.hpp" -namespace glm{ -namespace detail +namespace glm { - template - struct storage_alignment - {}; - - template - struct alignas(L * sizeof(T)) storage_alignment - {}; - - template - struct alignas(L * sizeof(T)) storage_alignment - {}; - - template - struct alignas(L * sizeof(T)) storage_alignment - {}; - - template - struct storage - { - typedef struct type { - T data[L]; - } type; - }; - - template - struct storage - { - typedef struct alignas(L * sizeof(T)) type { - T data[L]; - } type; - }; - - template - struct storage<3, T, true> - { - typedef struct alignas(4 * sizeof(T)) type { - T data[4]; - } type; - }; - -# if GLM_ARCH & GLM_ARCH_SSE2_BIT - template<> - struct storage<4, float, true> - { - typedef glm_f32vec4 type; - }; - - template<> - struct storage<4, int32, true> - { - typedef glm_i32vec4 type; - }; - - template<> - struct storage<4, uint32, true> - { - typedef glm_u32vec4 type; - }; - - template<> - struct storage<2, double, true> - { - typedef glm_f64vec2 type; - }; - - template<> - struct storage<2, int64, true> - { - typedef glm_i64vec2 type; - }; - - template<> - struct storage<2, uint64, true> - { - typedef glm_u64vec2 type; - }; -# endif - -# if (GLM_ARCH & GLM_ARCH_AVX_BIT) - template<> - struct storage<4, double, true> - { - typedef glm_f64vec4 type; - }; -# endif - -# if (GLM_ARCH & GLM_ARCH_AVX2_BIT) - template<> - struct storage<4, int64, true> - { - typedef glm_i64vec4 type; - }; - - template<> - struct storage<4, uint64, true> - { - typedef glm_u64vec4 type; - }; -# endif -}//namespace detail - #if GLM_HAS_TEMPLATE_ALIASES template using tvec2 = vec<2, T, Q>; template using tvec3 = vec<3, T, Q>; diff --git a/glm/detail/type_vec2.hpp b/glm/detail/type_vec2.hpp index 534c7087..bbb65e1c 100644 --- a/glm/detail/type_vec2.hpp +++ b/glm/detail/type_vec2.hpp @@ -21,7 +21,7 @@ namespace glm // -- Implementation detail -- typedef T value_type; - typedef vec type; + typedef vec<2, T, Q> type; typedef vec<2, bool, Q> bool_type; // -- Data -- diff --git a/glm/detail/type_vec3.hpp b/glm/detail/type_vec3.hpp index 642c3709..a3ff0a75 100644 --- a/glm/detail/type_vec3.hpp +++ b/glm/detail/type_vec3.hpp @@ -21,7 +21,7 @@ namespace glm // -- Implementation detail -- typedef T value_type; - typedef vec type; + typedef vec<3, T, Q> type; typedef vec<3, bool, Q> bool_type; // -- Data -- diff --git a/glm/detail/type_vec4.hpp b/glm/detail/type_vec4.hpp index 092d4c04..d00119c3 100644 --- a/glm/detail/type_vec4.hpp +++ b/glm/detail/type_vec4.hpp @@ -16,7 +16,7 @@ namespace glm { template - struct vec<4, T, Q> : detail::storage_alignment<4, T, Q> + struct vec<4, T, Q> { // -- Implementation detail -- diff --git a/glm/ext/vec1.hpp b/glm/ext/vec1.hpp index 69e9d296..bc056cc3 100644 --- a/glm/ext/vec1.hpp +++ b/glm/ext/vec1.hpp @@ -38,7 +38,7 @@ namespace glm // -- Implementation detail -- typedef T value_type; - typedef vec type; + typedef vec<1, T, Q> type; typedef vec<1, bool, Q> bool_type; // -- Data --