Skip to content

Commit

Permalink
Workaround Cuda compiler bug #530
Browse files Browse the repository at this point in the history
  • Loading branch information
Groovounet committed Aug 6, 2016
1 parent cd50d4a commit dcdc966
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion glm/detail/func_common.inl
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,13 @@ namespace detail
template <typename genType>
GLM_FUNC_QUALIFIER genType mod(genType x, genType y)
{
return mod(tvec1<genType, defaultp>(x), y).x;
# if GLM_COMPILER & GLM_COMPILER_CUDA
// Another Cuda compiler bug https://github.com/g-truc/glm/issues/530
tvec1<genType, defaultp> Result(mod(tvec1<genType, defaultp>(x), y));
return Result.x;
# else
return mod(tvec1<genType, defaultp>(x), y).x;
# endif
}

template <typename T, precision P, template <typename, precision> class vecType>
Expand Down

0 comments on commit dcdc966

Please sign in to comment.