Cycles compile fix: only use std::isfinite when OSL is enabled.
authorLukas Toenne <lukas.toenne@googlemail.com>
Sun, 2 Sep 2012 18:11:28 +0000 (18:11 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Sun, 2 Sep 2012 18:11:28 +0000 (18:11 +0000)
intern/cycles/kernel/kernel_accumulate.h

index 3f4cd0c..e73b2ba 100644 (file)
@@ -301,9 +301,13 @@ __device_inline float3 path_radiance_sum(KernelGlobals *kg, PathRadiance *L)
 
 __device_inline void path_radiance_clamp(PathRadiance *L, float3 *L_sum, float clamp)
 {
+       #ifdef WITH_OSL
+       using std::isfinite;
+       #endif
+
        float sum = fabsf((*L_sum).x) + fabsf((*L_sum).y) + fabsf((*L_sum).z);
 
-       if(!std::isfinite(sum)) {
+       if(!isfinite(sum)) {
                /* invalid value, reject */
                *L_sum = make_float3(0.0f, 0.0f, 0.0f);