diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-03 22:21:19 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-11-03 22:32:29 +0300 |
commit | 6ec599c68214413475cbea403ef869ed7c8113f9 (patch) | |
tree | 5052e130555b6850e17ad0b0944d22b7331871f6 /intern/cycles/device/device.cpp | |
parent | 6664ee209e96fe4a4ae8018bcf10f798a3b53751 (diff) |
Fix T53247: mixed CPU + GPU render wrong texture limits.
Diffstat (limited to 'intern/cycles/device/device.cpp')
-rw-r--r-- | intern/cycles/device/device.cpp | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp index 1a3a3846c25..b2f20bab58b 100644 --- a/intern/cycles/device/device.cpp +++ b/intern/cycles/device/device.cpp @@ -361,39 +361,48 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo>& subdevices, int th info.description = "Multi Device"; info.num = 0; - info.has_bindless_textures = true; + info.has_fermi_limits = false; + info.has_half_images = true; info.has_volume_decoupled = true; info.has_qbvh = true; info.has_osl = true; foreach(const DeviceInfo &device, subdevices) { - info.has_bindless_textures &= device.has_bindless_textures; - info.has_volume_decoupled &= device.has_volume_decoupled; - info.has_qbvh &= device.has_qbvh; - info.has_osl &= device.has_osl; - + /* Ensure CPU device does not slow down GPU. */ if(device.type == DEVICE_CPU && subdevices.size() > 1) { if(background) { int orig_cpu_threads = (threads)? threads: system_cpu_thread_count(); int cpu_threads = max(orig_cpu_threads - (subdevices.size() - 1), 0); + VLOG(1) << "CPU render threads reduced from " + << orig_cpu_threads << " to " << cpu_threads + << ", to dedicate to GPU."; + if(cpu_threads >= 1) { DeviceInfo cpu_device = device; cpu_device.cpu_threads = cpu_threads; info.multi_devices.push_back(cpu_device); } - - VLOG(1) << "CPU render threads reduced from " - << orig_cpu_threads << " to " << cpu_threads - << ", to dedicate to GPU."; + else { + continue; + } } else { VLOG(1) << "CPU render threads disabled for interactive render."; + continue; } } else { info.multi_devices.push_back(device); } + + /* Accumulate device info. */ + info.has_fermi_limits = info.has_fermi_limits || + device.has_fermi_limits; + info.has_half_images &= device.has_half_images; + info.has_volume_decoupled &= device.has_volume_decoupled; + info.has_qbvh &= device.has_qbvh; + info.has_osl &= device.has_osl; } return info; |