Cycles: Cleanup, make it more obvious which platform requires workaround for triangle...
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 20 Jun 2015 14:57:19 +0000 (16:57 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 20 Jun 2015 15:01:21 +0000 (17:01 +0200)
Should be no functional changes.

intern/cycles/kernel/geom/geom_triangle_intersect.h

index 220169f56d3fc1bede657e06666691c5581dce4c..5f41012bf308d0f67fa369a21ce85521dd840c8b 100644 (file)
@@ -49,16 +49,23 @@ typedef struct IsectPrecalc {
        float Sx, Sy, Sz;
 } IsectPrecalc;
 
-/* Workaround for CUDA toolkit 6.5.16. */
-#if defined(__KERNEL_CPU__) || !defined(__KERNEL_EXPERIMENTAL__) || __CUDA_ARCH__ < 500
+#if defined(__KERNEL_CUDA__)
 #  if (defined(i386) || defined(_M_IX86))
+#    if __CUDA_ARCH__ > 500
 ccl_device_noinline
-#  else
+#    else  /* __CUDA_ARCH__ > 500 */
 ccl_device_inline
-#  endif
-#else
+#    endif  /* __CUDA_ARCH__ > 500 */
+#  else  /* (defined(i386) || defined(_M_IX86)) */
+#    if defined(__KERNEL_EXPERIMENTAL__) && (__CUDA_ARCH__ == 500)
 ccl_device_noinline
-#endif
+#    else
+ccl_device_inline
+#    endif
+#  endif  /* (defined(i386) || defined(_M_IX86)) */
+#else  /* defined(__KERNEL_CUDA__) */
+ccl_device_inline
+#endif  /* defined(__KERNEL_CUDA__) */
 void triangle_intersect_precalc(float3 dir,
                                 IsectPrecalc *isect_precalc)
 {