diff --git a/glm/detail/type_vec.hpp b/glm/detail/type_vec.hpp index 82e4ba01..62f8bc30 100644 --- a/glm/detail/type_vec.hpp +++ b/glm/detail/type_vec.hpp @@ -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 struct storage { @@ -24,6 +26,7 @@ namespace detail uint8 data[size]; } type; }; +# endif # if GLM_ARCH & GLM_ARCH_SSE2_BIT template <> diff --git a/glm/ext.hpp b/glm/ext.hpp index dee032e3..f99dec44 100644 --- a/glm/ext.hpp +++ b/glm/ext.hpp @@ -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 diff --git a/glm/gtc/type_aligned.hpp b/glm/gtc/type_aligned.hpp index d143bcf3..e7624eab 100644 --- a/glm/gtc/type_aligned.hpp +++ b/glm/gtc/type_aligned.hpp @@ -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 struct tvec2; template struct tvec3; template struct tvec4; - - /// @addtogroup gtc_type_aligned /// @{