[Bf-blender-cvs] [a42b10f] cycles_kernel_split: Cycles: Make sure there's no double spaces in the build options
Sergey Sharybin
noreply at git.blender.org
Mon Mar 30 18:56:11 CEST 2015
Commit: a42b10fe6b34d0bc65540993e7910bb75135053f
Author: Sergey Sharybin
Date: Mon Mar 30 21:54:54 2015 +0500
Branches: cycles_kernel_split
https://developer.blender.org/rBa42b10fe6b34d0bc65540993e7910bb75135053f
Cycles: Make sure there's no double spaces in the build options
This confuses OSX OpenCL compiler.
===================================================================
M intern/cycles/device/device_opencl.cpp
===================================================================
diff --git a/intern/cycles/device/device_opencl.cpp b/intern/cycles/device/device_opencl.cpp
index 875c3ff..1748ea4 100644
--- a/intern/cycles/device/device_opencl.cpp
+++ b/intern/cycles/device/device_opencl.cpp
@@ -1560,15 +1560,18 @@ public:
/* Enable only the macros related to the scene */
for(int node_iter = NODE_END; node_iter <= NODE_UVMAP; node_iter++) {
if(node_iter == NODE_GEOMETRY_DUPLI || node_iter == NODE_UVMAP) { continue; }
+ if(node_iter != NODE_END)
+ svm_build_options += " ";
if(closure_nodes.find(node_iter) == closure_nodes.end()) {
- svm_build_options += " -D" + get_node_type_as_string((NodeType)node_iter) + "=0 ";
+ svm_build_options += "-D" + get_node_type_as_string((NodeType)node_iter) + "=0";
}
else {
- svm_build_options += " -D" + get_node_type_as_string((NodeType)node_iter) + "=1 ";
+ svm_build_options += "-D" + get_node_type_as_string((NodeType)node_iter) + "=1";
}
}
+ svm_build_options += " ";
#ifdef __MULTI_CLOSURE__
- opt += string_printf(" -DMAX_CLOSURE=%d ", clos_max);
+ opt += string_printf("-DMAX_CLOSURE=%d ", clos_max);
#endif
compute_device_type_build_option = "";
@@ -1576,7 +1579,7 @@ public:
ciErr = clGetDeviceInfo(cdDevice, CL_DEVICE_TYPE, sizeof(cl_device_type), &device_type, NULL);
assert(ciErr == CL_SUCCESS);
if(device_type == CL_DEVICE_TYPE_GPU) {
- compute_device_type_build_option = " -D__COMPUTE_DEVICE_GPU__ ";
+ compute_device_type_build_option = "-D__COMPUTE_DEVICE_GPU__ ";
}
string kernel_path = path_get("kernel");
More information about the Bf-blender-cvs
mailing list