diff options
author | Brecht Van Lommel <brecht@blender.org> | 2020-10-28 21:55:41 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-10-29 18:01:38 +0300 |
commit | f75b09e7e6b3ed9345993455ecab8a6d1690179f (patch) | |
tree | bc5b915e58deed55d9e8b406460765a8cdfc49c8 /intern/cycles/device/device.h | |
parent | 09be2a83580faaf4fa9b87da2632ab51d0934235 (diff) |
Cycles: abort rendering when --cycles-device not found
Rather than just printing a message and falling back to the CPU. For render
farms it's better to avoid a potentially slow render on the CPU if the intent
was to render on the GPU.
Ref T82193, D9086
Diffstat (limited to 'intern/cycles/device/device.h')
-rw-r--r-- | intern/cycles/device/device.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/device/device.h b/intern/cycles/device/device.h index ddf608aa430..2006db02ce7 100644 --- a/intern/cycles/device/device.h +++ b/intern/cycles/device/device.h @@ -48,6 +48,7 @@ enum DeviceType { DEVICE_NETWORK, DEVICE_MULTI, DEVICE_OPTIX, + DEVICE_DUMMY, }; enum DeviceTypeMask { @@ -87,6 +88,7 @@ class DeviceInfo { int cpu_threads; vector<DeviceInfo> multi_devices; vector<DeviceInfo> denoising_devices; + string error_msg; DeviceInfo() { @@ -471,6 +473,7 @@ class Device { static string string_from_type(DeviceType type); static vector<DeviceType> available_types(); static vector<DeviceInfo> available_devices(uint device_type_mask = DEVICE_MASK_ALL); + static DeviceInfo dummy_device(const string &error_msg = ""); static string device_capabilities(uint device_type_mask = DEVICE_MASK_ALL); static DeviceInfo get_multi_device(const vector<DeviceInfo> &subdevices, int threads, |