mirror of
https://github.com/g-truc/glm.git
synced 2024-11-23 01:14:34 +00:00
Fixed Cuda build, no support of __declspec(align(alignment))
This commit is contained in:
parent
39020ad727
commit
ec8fa4623c
@ -17,6 +17,8 @@ namespace detail
|
||||
} type;
|
||||
};
|
||||
|
||||
// Cuda doesn't support __declspec(align(x)), no aligned types for Cuda
|
||||
# if GLM_COMPILER & GLM_COMPILER_CUDA
|
||||
template <typename T, std::size_t size>
|
||||
struct storage<T, size, true>
|
||||
{
|
||||
@ -24,6 +26,7 @@ namespace detail
|
||||
uint8 data[size];
|
||||
} type;
|
||||
};
|
||||
# endif
|
||||
|
||||
# if GLM_ARCH & GLM_ARCH_SSE2_BIT
|
||||
template <>
|
||||
|
@ -50,7 +50,7 @@
|
||||
#include "./gtc/type_ptr.hpp"
|
||||
#include "./gtc/ulp.hpp"
|
||||
#include "./gtc/vec1.hpp"
|
||||
#if GLM_HAS_ALIGNED_TYPE
|
||||
#if GLM_HAS_ALIGNED_TYPE && !(GLM_COMPILER & GLM_COMPILER_CUDA)
|
||||
# include "./gtc/type_aligned.hpp"
|
||||
#endif
|
||||
|
||||
|
@ -12,6 +12,9 @@
|
||||
#if !GLM_HAS_ALIGNED_TYPE
|
||||
# error "GLM: Aligned types are not supported on this platform"
|
||||
#endif
|
||||
#if GLM_COMPILER & GLM_COMPILER_CUDA
|
||||
# error "GLM: GTC_type_aligned is not supported on Cuda due to lack of __declspec(align(alignment)) support, issue #539"
|
||||
#endif
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTC_type_aligned extension included")
|
||||
@ -30,8 +33,6 @@ namespace glm
|
||||
template <typename T, precision P> struct tvec2;
|
||||
template <typename T, precision P> struct tvec3;
|
||||
template <typename T, precision P> struct tvec4;
|
||||
|
||||
|
||||
/// @addtogroup gtc_type_aligned
|
||||
/// @{
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user