diff options
author | Mai Lavelle <mai.lavelle@gmail.com> | 2016-11-10 17:10:36 +0300 |
---|---|---|
committer | Mai Lavelle <mai.lavelle@gmail.com> | 2016-11-10 17:10:36 +0300 |
commit | aebade59a9dadbebb81e5af4fc01a970f7d75c2e (patch) | |
tree | ed4c89461b7a95be4e9c68524d787a45002634a2 /intern/cycles/device/device.h | |
parent | 9228722a8a9c488649214e13823dcf943afc1150 (diff) | |
parent | 0b9b8ab2dd6283f8a9dcc72df64f9e61a75338de (diff) |
Merge branch 'master' into cycles_split_kernel
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r-- | intern/cycles/device/device.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index c832e1940c2..e1b5687ff50 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -49,7 +49,7 @@ class DeviceInfo { public: DeviceType type; string description; - string id; + string id; /* used for user preferences, should stay fixed with changing hardware config */ int num; bool display_device; bool advanced_shading; @@ -69,6 +69,12 @@ public: has_bindless_textures = false; use_split_kernel = false; } + + bool operator==(const DeviceInfo &info) { + /* Multiple Devices with the same ID would be very bad. */ + assert(id != info.id || (type == info.type && num == info.num && description == info.description)); + return id == info.id; + } }; class DeviceRequestedFeatures { @@ -362,6 +368,7 @@ public: static vector<DeviceType>& available_types(); static vector<DeviceInfo>& available_devices(); static string device_capabilities(); + static DeviceInfo get_multi_device(vector<DeviceInfo> subdevices); /* Tag devices lists for update. */ static void tag_update(); |