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@gmail.com>2017-10-20 06:08:26 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2017-10-24 02:03:59 +0300
commitae41f38f78f8c54f92cf34dd88e35948e19aed55 (patch)
tree4fb39bf2ed8ca0bece837f93b8e69851b07bf547 /intern/cycles/device
parentcc96cdd9d49c6029e2abc62d81556e2f22480438 (diff)
Code refactor: pass device to scene, check OSL with device info.
Diffstat (limited to 'intern/cycles/device')
-rw-r--r--intern/cycles/device/device.cpp3
-rw-r--r--intern/cycles/device/device.h2
-rw-r--r--intern/cycles/device/device_cpu.cpp1
-rw-r--r--intern/cycles/device/device_network.cpp1
4 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/device/device.cpp b/intern/cycles/device/device.cpp
index f31cacd8ec1..16c027e2cb5 100644
--- a/intern/cycles/device/device.cpp
+++ b/intern/cycles/device/device.cpp
@@ -380,10 +380,13 @@ DeviceInfo Device::get_multi_device(const vector<DeviceInfo>& subdevices, int th
info.has_bindless_textures = 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;
if(device.type == DEVICE_CPU && subdevices.size() > 1) {
if(background) {
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h
index f400eeb3e6b..4bf88f75932 100644
--- a/intern/cycles/device/device.h
+++ b/intern/cycles/device/device.h
@@ -57,6 +57,7 @@ public:
bool has_bindless_textures; /* flag for GPU and Multi device */
bool has_volume_decoupled;
bool has_qbvh;
+ bool has_osl;
bool use_split_kernel; /* Denotes if the device is going to run cycles using split-kernel */
int cpu_threads;
vector<DeviceInfo> multi_devices;
@@ -72,6 +73,7 @@ public:
has_bindless_textures = false;
has_volume_decoupled = false;
has_qbvh = false;
+ has_osl = false;
use_split_kernel = false;
}
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index 0ba00da16a6..b05f24659ee 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -1028,6 +1028,7 @@ void device_cpu_info(vector<DeviceInfo>& devices)
info.advanced_shading = true;
info.has_qbvh = system_cpu_support_sse2();
info.has_volume_decoupled = true;
+ info.has_osl = true;
devices.insert(devices.begin(), info);
}
diff --git a/intern/cycles/device/device_network.cpp b/intern/cycles/device/device_network.cpp
index ced10c98dc9..3fea89a243c 100644
--- a/intern/cycles/device/device_network.cpp
+++ b/intern/cycles/device/device_network.cpp
@@ -348,6 +348,7 @@ void device_network_info(vector<DeviceInfo>& devices)
info.advanced_shading = true;
info.has_volume_decoupled = false;
info.has_qbvh = false;
+ info.has_osl = false;
devices.push_back(info);
}