diff options
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 77dc1fa9713..b9bdffa2618 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 { @@ -282,6 +288,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(); |