Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-24 00:27:17 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-02-24 00:27:17 +0400
commit0cf38faea42c69d58f16ad7fd47c60ecf9b92308 (patch)
tree2cefe0813d741403c08a41ff48da67d4dd34ad1e /intern/cycles/device
parentc4b64343d02069b83083e974aaee1fed686f4328 (diff)
Fix #30140: cycles multi GPU rendering with one device supporting full
shading and the other not can't work correct, disabled that now.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device_multi.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/intern/cycles/device/device_multi.cpp b/intern/cycles/device/device_multi.cpp
index 375719133b8..1f69f2c53fa 100644
--- a/intern/cycles/device/device_multi.cpp
+++ b/intern/cycles/device/device_multi.cpp
@@ -293,7 +293,7 @@ Device *device_multi_create(DeviceInfo& info, bool background)
return new MultiDevice(info, background);
}
-static void device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool with_display, const char *id_fmt, int num)
+static bool device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool with_display, bool with_advanced_shading, const char *id_fmt, int num)
{
DeviceInfo info;
@@ -302,10 +302,12 @@ static void device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool
map<string, int>::iterator dt;
int num_added = 0, num_display = 0;
- info.advanced_shading = true;
+ info.advanced_shading = with_advanced_shading;
foreach(DeviceInfo& subinfo, devices) {
if(subinfo.type == type) {
+ if(subinfo.advanced_shading != info.advanced_shading)
+ continue;
if(subinfo.display_device) {
if(with_display)
num_display++;
@@ -323,14 +325,12 @@ static void device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool
info.multi_devices.push_back(subinfo);
if(subinfo.display_device)
info.display_device = true;
- if(!subinfo.advanced_shading)
- info.advanced_shading = false;
num_added++;
}
}
if(num_added <= 1 || (with_display && num_display == 0))
- return;
+ return false;
/* generate string */
stringstream desc;
@@ -384,17 +384,24 @@ static void device_multi_add(vector<DeviceInfo>& devices, DeviceType type, bool
devices.push_back(info);
else
devices.insert(devices.begin(), info);
+
+ return true;
}
void device_multi_info(vector<DeviceInfo>& devices)
{
int num = 0;
- device_multi_add(devices, DEVICE_CUDA, false, "CUDA_MULTI_%d", num++);
- device_multi_add(devices, DEVICE_CUDA, true, "CUDA_MULTI_%d", num++);
+
+ if(!device_multi_add(devices, DEVICE_CUDA, false, true, "CUDA_MULTI_%d", num++))
+ device_multi_add(devices, DEVICE_CUDA, false, false, "CUDA_MULTI_%d", num++);
+ if(!device_multi_add(devices, DEVICE_CUDA, true, true, "CUDA_MULTI_%d", num++))
+ device_multi_add(devices, DEVICE_CUDA, true, false, "CUDA_MULTI_%d", num++);
num = 0;
- device_multi_add(devices, DEVICE_OPENCL, false, "OPENCL_MULTI_%d", num++);
- device_multi_add(devices, DEVICE_OPENCL, true, "OPENCL_MULTI_%d", num++);
+ if(!device_multi_add(devices, DEVICE_OPENCL, false, true, "OPENCL_MULTI_%d", num++))
+ device_multi_add(devices, DEVICE_OPENCL, false, false, "OPENCL_MULTI_%d", num++);
+ if(!device_multi_add(devices, DEVICE_OPENCL, true, true, "OPENCL_MULTI_%d", num++))
+ device_multi_add(devices, DEVICE_OPENCL, true, false, "OPENCL_MULTI_%d", num++);
}
CCL_NAMESPACE_END