Cycles compiler fixes related to OSL changes:
authorLukas Toenne <lukas.toenne@googlemail.com>
Thu, 6 Sep 2012 07:44:49 +0000 (07:44 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Thu, 6 Sep 2012 07:44:49 +0000 (07:44 +0000)
* reverted r50430
* removed 2 util_params.h includes from r50428, these were causing trouble with OIIO in CUDA compilation. The purpose of these was to define the ustring type, but can just use the standard string type from util_string as well.

intern/cycles/kernel/kernel_accumulate.h
intern/cycles/kernel/kernel_triangle.h
intern/cycles/kernel/kernel_types.h

index bd03537519f82665df29ed3ac9771827c005700a..2f2314c9a8bb076a4b5fc0a1421871e67a635a97 100644 (file)
@@ -301,7 +301,9 @@ __device_inline float3 path_radiance_sum(KernelGlobals *kg, PathRadiance *L)
 
 __device_inline void path_radiance_clamp(PathRadiance *L, float3 *L_sum, float clamp)
 {
+       #ifdef __OSL__
        using std::isfinite;
+       #endif
 
        float sum = fabsf((*L_sum).x) + fabsf((*L_sum).y) + fabsf((*L_sum).z);
 
index 60d6d9356ec2f1f8d11637b01c159676bf0d6dbe..901034cfac62c5d349f7b47c20fcc17a0820c1dc 100644 (file)
@@ -18,8 +18,6 @@
 
 #include "kernel_projection.h"
 
-#include "util_param.h"
-
 CCL_NAMESPACE_BEGIN
 
 /* Point on triangle for Moller-Trumbore triangles */
index 738d459df30eb1845a3f0e0bc48eadd15a320154..7faa1323258248be7380e0c3f844fb50db47cd85 100644 (file)
@@ -22,7 +22,7 @@
 #include "kernel_math.h"
 #include "svm/svm_types.h"
 
-#include "util_param.h"
+#include "util_string.h"
 
 #ifndef __KERNEL_GPU__
 #define __KERNEL_CPU__
@@ -370,28 +370,28 @@ typedef enum AttributeStandard {
        ATTR_STD_NOT_FOUND = ~0
 } AttributeStandard;
 
-__device ustring attribute_standard_name(AttributeStandard std)
+__device string attribute_standard_name(AttributeStandard std)
 {
        if(std == ATTR_STD_VERTEX_NORMAL)
-               return ustring("N");
+               return string("N");
        else if(std == ATTR_STD_FACE_NORMAL)
-               return ustring("Ng");
+               return string("Ng");
        else if(std == ATTR_STD_UV)
-               return ustring("uv");
+               return string("uv");
        else if(std == ATTR_STD_GENERATED)
-               return ustring("generated");
+               return string("generated");
        else if(std == ATTR_STD_POSITION_UNDEFORMED)
-               return ustring("undeformed");
+               return string("undeformed");
        else if(std == ATTR_STD_POSITION_UNDISPLACED)
-               return ustring("undisplaced");
+               return string("undisplaced");
        else if(std == ATTR_STD_MOTION_PRE)
-               return ustring("motion_pre");
+               return string("motion_pre");
        else if(std == ATTR_STD_MOTION_POST)
-               return ustring("motion_post");
+               return string("motion_post");
        else if(std == ATTR_STD_PARTICLE)
-               return ustring("particle");
+               return string("particle");
        
-       return ustring();
+       return string();
 }
 
 /* Closure data */