Cycles: Attempt to work around compilation errors of CUDA on sm_2x
This commit is contained in:
@@ -22,6 +22,12 @@ CCL_NAMESPACE_BEGIN
|
|||||||
|
|
||||||
#ifdef __HAIR__
|
#ifdef __HAIR__
|
||||||
|
|
||||||
|
#if defined(__KERNEL_CUDA__) && (__CUDA_ARCH__ < 300)
|
||||||
|
# define ccl_device_curveintersect ccl_device
|
||||||
|
#else
|
||||||
|
# define ccl_device_curveintersect ccl_device_forceinline
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Reading attributes on various curve elements */
|
/* Reading attributes on various curve elements */
|
||||||
|
|
||||||
ccl_device float curve_attribute_float(KernelGlobals *kg, const ShaderData *sd, const AttributeDescriptor desc, float *dx, float *dy)
|
ccl_device float curve_attribute_float(KernelGlobals *kg, const ShaderData *sd, const AttributeDescriptor desc, float *dx, float *dy)
|
||||||
@@ -222,10 +228,10 @@ ccl_device_inline ssef transform_point_T3(const ssef t[3], const ssef &a)
|
|||||||
|
|
||||||
#ifdef __KERNEL_SSE2__
|
#ifdef __KERNEL_SSE2__
|
||||||
/* Pass P and dir by reference to aligned vector */
|
/* Pass P and dir by reference to aligned vector */
|
||||||
ccl_device_forceinline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersection *isect,
|
ccl_device_curveintersect bool bvh_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)
|
const float3 &P, const float3 &dir, uint visibility, int object, int curveAddr, float time, int type, uint *lcg_state, float difl, float extmax)
|
||||||
#else
|
#else
|
||||||
ccl_device_forceinline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersection *isect,
|
ccl_device_curveintersect bool bvh_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)
|
float3 P, float3 dir, uint visibility, int object, int curveAddr, float time,int type, uint *lcg_state, float difl, float extmax)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
@@ -688,7 +694,7 @@ ccl_device_forceinline bool bvh_cardinal_curve_intersect(KernelGlobals *kg, Inte
|
|||||||
return hit;
|
return hit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ccl_device_forceinline bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
|
ccl_device_curveintersect bool bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
|
||||||
float3 P, float3 direction, uint visibility, int object, int curveAddr, float time, int type, uint *lcg_state, float difl, float extmax)
|
float3 P, float3 direction, uint visibility, int object, int curveAddr, float time, int type, uint *lcg_state, float difl, float extmax)
|
||||||
{
|
{
|
||||||
/* define few macros to minimize code duplication for SSE */
|
/* define few macros to minimize code duplication for SSE */
|
||||||
|
Reference in New Issue
Block a user