mirror of
https://github.com/g-truc/glm.git
synced 2024-11-29 19:34:36 +00:00
Clean up detection
This commit is contained in:
parent
27a1b24835
commit
72bf05e06e
@ -448,9 +448,13 @@
|
|||||||
#define GLM_SWIZZLE_OPERATOR 1
|
#define GLM_SWIZZLE_OPERATOR 1
|
||||||
#define GLM_SWIZZLE_FUNCTION 2
|
#define GLM_SWIZZLE_FUNCTION 2
|
||||||
|
|
||||||
#if defined(GLM_FORCE_SWIZZLE) && !defined(GLM_FORCE_XYZW_ONLY) && (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
|
#if defined(GLM_FORCE_XYZW_ONLY)
|
||||||
|
# undef GLM_FORCE_SWIZZLE
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(GLM_FORCE_SWIZZLE) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)
|
||||||
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
|
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_OPERATOR
|
||||||
#elif defined(GLM_FORCE_SWIZZLE) && !defined(GLM_FORCE_XYZW_ONLY)
|
#elif defined(GLM_FORCE_SWIZZLE)
|
||||||
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
|
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_FUNCTION
|
||||||
#else
|
#else
|
||||||
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_DISABLED
|
# define GLM_CONFIG_SWIZZLE GLM_SWIZZLE_DISABLED
|
||||||
@ -718,6 +722,15 @@ namespace detail
|
|||||||
}//namespace glm
|
}//namespace glm
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Only use x, y, z, w as vector type components
|
||||||
|
|
||||||
|
#ifdef GLM_FORCE_XYZW_ONLY
|
||||||
|
# define GLM_CONFIG_XYZW_ONLY GLM_ENABLE
|
||||||
|
#else
|
||||||
|
# define GLM_CONFIG_XYZW_ONLY GLM_DISABLE
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Configure the use of defaulted initialized types
|
// Configure the use of defaulted initialized types
|
||||||
|
|
||||||
@ -761,15 +774,6 @@ namespace detail
|
|||||||
# define GLM_CONFIG_SIMD GLM_DISABLE
|
# define GLM_CONFIG_SIMD GLM_DISABLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Only use x, y, z, w as vector type components
|
|
||||||
|
|
||||||
#ifdef GLM_FORCE_XYZW_ONLY
|
|
||||||
# define GLM_CONFIG_XYZW_ONLY GLM_ENABLE
|
|
||||||
#else
|
|
||||||
# define GLM_CONFIG_XYZW_ONLY GLM_DISABLE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////
|
||||||
// Configure the use of anonymous structure as implementation detail
|
// Configure the use of anonymous structure as implementation detail
|
||||||
|
|
||||||
|
@ -144,7 +144,6 @@ namespace detail
|
|||||||
};
|
};
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
|
||||||
template<>
|
template<>
|
||||||
struct compute_vec4_div<float, aligned_lowp, true>
|
struct compute_vec4_div<float, aligned_lowp, true>
|
||||||
{
|
{
|
||||||
@ -155,7 +154,6 @@ namespace detail
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
# endif
|
|
||||||
|
|
||||||
template<typename T, qualifier Q>
|
template<typename T, qualifier Q>
|
||||||
struct compute_vec4_and<T, Q, true, 32, true>
|
struct compute_vec4_and<T, Q, true, 32, true>
|
||||||
@ -342,7 +340,6 @@ namespace detail
|
|||||||
};
|
};
|
||||||
}//namespace detail
|
}//namespace detail
|
||||||
|
|
||||||
# if GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
|
||||||
template<>
|
template<>
|
||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_lowp>::vec(float _s) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_lowp>::vec(float _s) :
|
||||||
data(_mm_set1_ps(_s))
|
data(_mm_set1_ps(_s))
|
||||||
@ -457,7 +454,6 @@ namespace detail
|
|||||||
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_highp>::vec(int _x, int _y, int _z, int _w) :
|
GLM_FUNC_QUALIFIER GLM_CONSTEXPR vec<4, float, aligned_highp>::vec(int _x, int _y, int _z, int _w) :
|
||||||
data(_mm_cvtepi32_ps(_mm_set_epi32(_w, _z, _y, _x)))
|
data(_mm_cvtepi32_ps(_mm_set_epi32(_w, _z, _y, _x)))
|
||||||
{}
|
{}
|
||||||
#endif// GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
|
||||||
}//namespace glm
|
}//namespace glm
|
||||||
|
|
||||||
#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
|
#endif//GLM_ARCH & GLM_ARCH_SSE2_BIT
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#define GLM_ENABLE_EXPERIMENTAL
|
#define GLM_ENABLE_EXPERIMENTAL
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
/*
|
/*
|
||||||
#if GLM_CONFIG_SIMD == GLM_ENABLE && GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
#if GLM_CONFIG_SIMD == GLM_ENABLE
|
||||||
|
|
||||||
#include <glm/gtx/common.hpp>
|
#include <glm/gtx/common.hpp>
|
||||||
#include <glm/gtc/integer.hpp>
|
#include <glm/gtc/integer.hpp>
|
||||||
@ -116,7 +116,7 @@ int main()
|
|||||||
{
|
{
|
||||||
int Error = 0;
|
int Error = 0;
|
||||||
/*
|
/*
|
||||||
# if GLM_CONFIG_SIMD == GLM_ENABLE && GLM_CONFIG_ALIGNED_GENTYPES == GLM_ENABLE
|
# if GLM_CONFIG_SIMD == GLM_ENABLE
|
||||||
Error += test_vec4_load();
|
Error += test_vec4_load();
|
||||||
# endif
|
# endif
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user