Cycles: Workaround CUDA 6.5.16 error after watertight commit

This issue doesn't happen with 6.5.12 and there's slight piece of hope it'll be
fixed in next toolkit releases..

For now we're forcing CUDA to not inline ray precalculation. This could lead to
some speed regression, but wouldn't expect it to be huge -- this code does not
run that often comparing to actual triangle intersection.
This commit is contained in:
Sergey Sharybin 2014-12-25 14:15:37 +05:00
parent 010f3ee438
commit fe06ec82a9
1 changed files with 8 additions and 2 deletions

View File

@ -49,8 +49,14 @@ typedef struct IsectPrecalc {
float Sx, Sy, Sz;
} IsectPrecalc;
ccl_device_inline void triangle_intersect_precalc(float3 dir,
IsectPrecalc *isect_precalc)
/* Workaround for CUDA toolkit 6.5.16. */
#ifdef __KERNEL_CPU__
ccl_device_inline
#else
ccl_device_noinline
#endif
void triangle_intersect_precalc(float3 dir,
IsectPrecalc *isect_precalc)
{
/* Calculate dimension where the ray direction is maximal. */
int kz = util_max_axis(make_float3(fabsf(dir.x),