[Bf-blender-cvs] [19d19add1eb] master: Cycles: Cleanup, de-duplicate function parameter list

Sergey Sharybin noreply at git.blender.org
Tue Aug 8 15:27:31 CEST 2017


Commit: 19d19add1eb8697fef24171d1170bdce98a5e6cd
Author: Sergey Sharybin
Date:   Tue Aug 8 14:39:00 2017 +0200
Branches: master
https://developer.blender.org/rB19d19add1eb8697fef24171d1170bdce98a5e6cd

Cycles: Cleanup, de-duplicate function parameter list

Was only needed to sue const reference on CPU. Now it is done using ccl_ref.

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

M	intern/cycles/kernel/geom/geom_curve_intersect.h

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

diff --git a/intern/cycles/kernel/geom/geom_curve_intersect.h b/intern/cycles/kernel/geom/geom_curve_intersect.h
index 8378e002506..e9a149ea1ab 100644
--- a/intern/cycles/kernel/geom/geom_curve_intersect.h
+++ b/intern/cycles/kernel/geom/geom_curve_intersect.h
@@ -31,34 +31,20 @@ ccl_device_inline ssef transform_point_T3(const ssef t[3], const ssef &a)
 }
 #endif
 
-#ifdef __KERNEL_SSE2__
-/* Pass P and dir by reference to aligned vector */
-ccl_device_curveintersect bool cardinal_curve_intersect(KernelGlobals *kg,
-                                                        Intersection *isect,
-                                                        const float3 &P,
-                                                        const float3 &dir,
-                                                        uint visibility,
-                                                        int object,
-                                                        int curveAddr,
-                                                        float time,
-                                                        int type,
-                                                        uint *lcg_state,
-                                                        float difl,
-                                                        float extmax)
-#else
-ccl_device_curveintersect bool cardinal_curve_intersect(KernelGlobals *kg,
-                                                        Intersection *isect,
-                                                        float3 P,
-                                                        float3 dir,
-                                                        uint visibility,
-                                                        int object,
-                                                        int curveAddr,
-                                                        float time,
-                                                        int type,
-                                                        uint *lcg_state,
-                                                        float difl,
-                                                        float extmax)
-#endif
+/* On CPU pass P and dir by reference to aligned vector. */
+ccl_device_curveintersect bool cardinal_curve_intersect(
+        KernelGlobals *kg,
+        Intersection *isect,
+        const float3 ccl_ref P,
+        const float3 ccl_ref dir,
+        uint visibility,
+        int object,
+        int curveAddr,
+        float time,
+        int type,
+        uint *lcg_state,
+        float difl,
+        float extmax)
 {
 	const bool is_curve_primitive = (type & PRIMITIVE_CURVE);




More information about the Bf-blender-cvs mailing list