* Revert r57203 (len() renaming)
There seems to be a problem with nVidia OpenCL after this and I haven't figured out the real cause yet. 
Better to selectively enable native length() later, after figuring out what's wrong. 

This fixes [#35612].
This commit is contained in:
Thomas Dinges
2013-06-04 17:20:00 +00:00
parent 4a7f37f6ed
commit 9e4914e055
22 changed files with 75 additions and 74 deletions

View File

@@ -222,7 +222,7 @@ __device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ra
ray->P = ray_offset(sd.P, -sd.Ng);
if(ray->t != FLT_MAX)
ray->D = normalize_length(Pend - ray->P, &ray->t);
ray->D = normalize_len(Pend - ray->P, &ray->t);
bounce++;
}
@@ -266,7 +266,7 @@ __device float4 kernel_path_progressive(KernelGlobals *kg, RNG *rng, int sample,
if((kernel_data.cam.resolution == 1) && (state.flag & PATH_RAY_CAMERA)) {
float3 pixdiff = ray.dD.dx + ray.dD.dy;
/*pixdiff = pixdiff - dot(pixdiff, ray.D)*ray.D;*/
difl = kernel_data.curve_kernel_data.minimum_width * length(pixdiff) * 0.5f;
difl = kernel_data.curve_kernel_data.minimum_width * len(pixdiff) * 0.5f;
}
extmax = kernel_data.curve_kernel_data.maximum_width;
@@ -957,7 +957,7 @@ __device float4 kernel_path_non_progressive(KernelGlobals *kg, RNG *rng, int sam
if((kernel_data.cam.resolution == 1) && (state.flag & PATH_RAY_CAMERA)) {
float3 pixdiff = ray.dD.dx + ray.dD.dy;
/*pixdiff = pixdiff - dot(pixdiff, ray.D)*ray.D;*/
difl = kernel_data.curve_kernel_data.minimum_width * length(pixdiff) * 0.5f;
difl = kernel_data.curve_kernel_data.minimum_width * len(pixdiff) * 0.5f;
}
extmax = kernel_data.curve_kernel_data.maximum_width;