Fix CUDA build error after last commit, and remove some comments.

This commit is contained in:
Brecht Van Lommel 2013-01-03 13:18:35 +00:00
parent b3f21a2254
commit e1004eb139
4 changed files with 7 additions and 3 deletions

@ -222,7 +222,7 @@ __device_inline void bvh_curve_intersect(KernelGlobals *kg, Intersection *isect,
float4 P1 = kernel_tex_fetch(__curve_keys, k0);
float4 P2 = kernel_tex_fetch(__curve_keys, k1);
float l = len(P2 - P1); // XXX slower
float l = len(P2 - P1);
float r1 = P1.w;
float r2 = P2.w;
float mr = max(r1,r2);
@ -730,7 +730,7 @@ __device_inline float3 bvh_curve_refine(KernelGlobals *kg, ShaderData *sd, const
float4 P1 = kernel_tex_fetch(__curve_keys, k0);
float4 P2 = kernel_tex_fetch(__curve_keys, k1);
float l = len(P2 - P1); // XXX slower
float l = len(P2 - P1);
float r1 = P1.w;
float r2 = P2.w;
float3 tg = float4_to_float3(P2 - P1) / l;

@ -341,7 +341,7 @@ __device void curve_segment_light_sample(KernelGlobals *kg, int prim, int object
float4 P1 = kernel_tex_fetch(__curve_keys, k0);
float4 P2 = kernel_tex_fetch(__curve_keys, k1);
float l = len(P2 - P1); // XXX slower
float l = len(P2 - P1);
float r1 = P1.w;
float r2 = P2.w;

@ -37,7 +37,9 @@ __device_inline int find_attribute(KernelGlobals *kg, ShaderData *sd, uint id, A
{
/* for SVM, find attribute by unique id */
uint attr_offset = sd->object*kernel_data.bvh.attributes_map_stride;
#ifdef __HAIR__
attr_offset = (sd->segment == ~0)? attr_offset: attr_offset + ATTR_PRIM_CURVE;
#endif
uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset);
while(attr_map.x != id) {

@ -28,7 +28,9 @@ __device void svm_node_attr_init(KernelGlobals *kg, ShaderData *sd,
/* find attribute by unique id */
uint id = node.y;
uint attr_offset = sd->object*kernel_data.bvh.attributes_map_stride;
#ifdef __HAIR__
attr_offset = (sd->segment == ~0)? attr_offset: attr_offset + ATTR_PRIM_CURVE;
#endif
uint4 attr_map = kernel_tex_fetch(__attributes_map, attr_offset);
while(attr_map.x != id) {