From dcdc966969dd28a68a2778a5e25d8a3b2f2fbb34 Mon Sep 17 00:00:00 2001 From: Christophe Riccio Date: Sat, 6 Aug 2016 19:40:39 +0200 Subject: [PATCH] Workaround Cuda compiler bug #530 --- glm/detail/func_common.inl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glm/detail/func_common.inl b/glm/detail/func_common.inl index b589b1d4..6760b65f 100644 --- a/glm/detail/func_common.inl +++ b/glm/detail/func_common.inl @@ -439,7 +439,13 @@ namespace detail template GLM_FUNC_QUALIFIER genType mod(genType x, genType y) { - return mod(tvec1(x), y).x; +# if GLM_COMPILER & GLM_COMPILER_CUDA + // Another Cuda compiler bug https://github.com/g-truc/glm/issues/530 + tvec1 Result(mod(tvec1(x), y)); + return Result.x; +# else + return mod(tvec1(x), y).x; +# endif } template class vecType>