[Bf-blender-cvs] [61e4800] master: Cycles: One more attempt to fix compilation of 32bit CUDA kernels

Sergey Sharybin noreply at git.blender.org
Mon Jul 27 14:21:12 CEST 2015


Commit: 61e4800b45dc0c079449e07cf9b4d73dba3156e6
Author: Sergey Sharybin
Date:   Mon Jul 27 14:18:20 2015 +0200
Branches: master
https://developer.blender.org/rB61e4800b45dc0c079449e07cf9b4d73dba3156e6

Cycles: One more attempt to fix compilation of 32bit CUDA kernels

===================================================================

M	intern/cycles/util/util_math.h

===================================================================

diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 2262f8f..2bf62df 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -1447,10 +1447,14 @@ ccl_device bool ray_triangle_intersect_uv(
 	return true;
 }
 
-ccl_device bool ray_quad_intersect(
-	float3 ray_P, float3 ray_D, float ray_t,
-	float3 quad_P, float3 quad_u, float3 quad_v,
-	float3 *isect_P, float *isect_t)
+#if defined(__KERNEL_CUDA__) && (defined(i386) || defined(_M_IX86))
+ccl_device_noinline
+#else
+ccl_device
+#endif
+bool ray_quad_intersect(float3 ray_P, float3 ray_D, float ray_t,
+                        float3 quad_P, float3 quad_u, float3 quad_v,
+                        float3 *isect_P, float *isect_t)
 {
 	float3 v0 = quad_P - quad_u*0.5f - quad_v*0.5f;
 	float3 v1 = quad_P + quad_u*0.5f - quad_v*0.5f;




More information about the Bf-blender-cvs mailing list