[Bf-blender-cvs] [355fbe8] cycles_kernel_split: [BCYCLES-212 Fix] Make split kernel work on multiple OpenCL devices
Jothi_PM
noreply at git.blender.org
Wed Apr 15 17:37:15 CEST 2015
Commit: 355fbe89961138cf1b45921053162408e36672c8
Author: Jothi_PM
Date: Tue Apr 14 18:02:46 2015 +0530
Branches: cycles_kernel_split
https://developer.blender.org/rB355fbe89961138cf1b45921053162408e36672c8
[BCYCLES-212 Fix] Make split kernel work on multiple OpenCL devices
===================================================================
M intern/cycles/device/device_multi.cpp
===================================================================
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 9aac86d..58ced36 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -49,11 +49,20 @@ public:
{
Device *device;
+ bool use_split_kernel_test = false;
+
foreach(DeviceInfo& subinfo, info.multi_devices) {
device = Device::create(subinfo, stats, background);
+ use_split_kernel_test |= device->use_split_kernel;
devices.push_back(SubDevice(device));
}
+ /* Set use_split_kernel of multi device to true, even
+ * if one of the sub devices uses split kernel
+ * todo: Enable it only for OpenCL multiple devices
+ */
+ this->use_split_kernel = use_split_kernel_test;
+
#ifdef WITH_NETWORK
/* try to add network devices */
ServerDiscovery discovery(true);
@@ -90,10 +99,14 @@ public:
bool load_kernels(bool experimental)
{
- foreach(SubDevice& sub, devices)
- if(!sub.device->load_kernels(experimental))
+ foreach(SubDevice& sub, devices) {
+#ifdef SPLIT_KERNEL_CLOSURE_COUNT
+ sub.device->clos_max = this->clos_max;
+#endif
+ sub.device->closure_nodes = this->closure_nodes;
+ if (!sub.device->load_kernels(experimental))
return false;
-
+ }
return true;
}
More information about the Bf-blender-cvs
mailing list