Cycles: Cleanup, de-duplicate function parameter list

Was only needed to sue const reference on CPU. Now it is done using ccl_ref.
This commit is contained in:
Sergey Sharybin 2017-08-08 14:39:00 +02:00
parent fd397a7d28
commit 19d19add1e
1 changed files with 14 additions and 28 deletions

View File

@ -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);