Fixed build
This commit is contained in:
parent
16106b2e3e
commit
da8b136419
@ -1,6 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
#include "_vectorize.hpp"
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "setup.hpp"
|
#include "setup.hpp"
|
||||||
|
#include "type_int.hpp"
|
||||||
|
|
||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
@ -46,7 +47,6 @@ namespace detail
|
|||||||
static const bool value = false;
|
static const bool value = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
# if GLM_HAS_ALIGNED_TYPE
|
|
||||||
template<>
|
template<>
|
||||||
struct is_aligned<glm::aligned_lowp>
|
struct is_aligned<glm::aligned_lowp>
|
||||||
{
|
{
|
||||||
@ -64,6 +64,89 @@ namespace detail
|
|||||||
{
|
{
|
||||||
static const bool value = true;
|
static const bool value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<length_t L, typename T, bool is_aligned>
|
||||||
|
struct storage
|
||||||
|
{
|
||||||
|
typedef struct type {
|
||||||
|
T data[L];
|
||||||
|
} type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<length_t L, typename T>
|
||||||
|
struct storage<L, T, true>
|
||||||
|
{
|
||||||
|
typedef struct alignas(L * sizeof(T)) type {
|
||||||
|
T data[L];
|
||||||
|
} type;
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
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
|
# endif
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
@ -7,110 +7,8 @@
|
|||||||
#include "type_int.hpp"
|
#include "type_int.hpp"
|
||||||
#include "compute_vector_relational.hpp"
|
#include "compute_vector_relational.hpp"
|
||||||
|
|
||||||
namespace glm{
|
namespace glm
|
||||||
namespace detail
|
|
||||||
{
|
{
|
||||||
template<length_t L, typename T, qualifier Q>
|
|
||||||
struct storage_alignment
|
|
||||||
{};
|
|
||||||
|
|
||||||
template<length_t L, typename T>
|
|
||||||
struct alignas(L * sizeof(T)) storage_alignment<L, T, aligned_highp>
|
|
||||||
{};
|
|
||||||
|
|
||||||
template<length_t L, typename T>
|
|
||||||
struct alignas(L * sizeof(T)) storage_alignment<L, T, aligned_mediump>
|
|
||||||
{};
|
|
||||||
|
|
||||||
template<length_t L, typename T>
|
|
||||||
struct alignas(L * sizeof(T)) storage_alignment<L, T, aligned_lowp>
|
|
||||||
{};
|
|
||||||
|
|
||||||
template<length_t L, typename T, bool is_aligned>
|
|
||||||
struct storage
|
|
||||||
{
|
|
||||||
typedef struct type {
|
|
||||||
T data[L];
|
|
||||||
} type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<length_t L, typename T>
|
|
||||||
struct storage<L, T, true>
|
|
||||||
{
|
|
||||||
typedef struct alignas(L * sizeof(T)) type {
|
|
||||||
T data[L];
|
|
||||||
} type;
|
|
||||||
};
|
|
||||||
|
|
||||||
template<typename T>
|
|
||||||
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
|
#if GLM_HAS_TEMPLATE_ALIASES
|
||||||
template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
|
template <typename T, qualifier Q = defaultp> using tvec2 = vec<2, T, Q>;
|
||||||
template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
|
template <typename T, qualifier Q = defaultp> using tvec3 = vec<3, T, Q>;
|
||||||
|
@ -21,7 +21,7 @@ namespace glm
|
|||||||
// -- Implementation detail --
|
// -- Implementation detail --
|
||||||
|
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef vec type;
|
typedef vec<2, T, Q> type;
|
||||||
typedef vec<2, bool, Q> bool_type;
|
typedef vec<2, bool, Q> bool_type;
|
||||||
|
|
||||||
// -- Data --
|
// -- Data --
|
||||||
|
@ -21,7 +21,7 @@ namespace glm
|
|||||||
// -- Implementation detail --
|
// -- Implementation detail --
|
||||||
|
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef vec type;
|
typedef vec<3, T, Q> type;
|
||||||
typedef vec<3, bool, Q> bool_type;
|
typedef vec<3, bool, Q> bool_type;
|
||||||
|
|
||||||
// -- Data --
|
// -- Data --
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
namespace glm
|
namespace glm
|
||||||
{
|
{
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
struct vec<4, T, Q> : detail::storage_alignment<4, T, Q>
|
struct vec<4, T, Q>
|
||||||
{
|
{
|
||||||
// -- Implementation detail --
|
// -- Implementation detail --
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ namespace glm
|
|||||||
// -- Implementation detail --
|
// -- Implementation detail --
|
||||||
|
|
||||||
typedef T value_type;
|
typedef T value_type;
|
||||||
typedef vec type;
|
typedef vec<1, T, Q> type;
|
||||||
typedef vec<1, bool, Q> bool_type;
|
typedef vec<1, bool, Q> bool_type;
|
||||||
|
|
||||||
// -- Data --
|
// -- Data --
|
||||||
|
Loading…
x
Reference in New Issue
Block a user