mirror of
https://github.com/blender/blender
synced 2026-09-27 01:34:15 +03:00
Fix: Cycles: Hydra uses unsupported GPU when driver is outdated
Take into account new meets_driver_requirement.
Issue introduced in 4f07d79bcc.
Pull Request: https://projects.blender.org/blender/blender/pulls/161464
This commit is contained in:
parent
c43148f54a
commit
beafdd0072
1 changed files with 8 additions and 2 deletions
|
|
@ -94,8 +94,14 @@ SessionParams GetSessionParams(const HdRenderSettingsMap &settings)
|
|||
// Move to all uppercase for Device::type_from_string
|
||||
std::transform(deviceType.begin(), deviceType.end(), deviceType.begin(), ::toupper);
|
||||
|
||||
vector<DeviceInfo> devices = Device::available_devices(
|
||||
DEVICE_MASK(Device::type_from_string(deviceType.c_str())));
|
||||
vector<DeviceInfo> devices;
|
||||
for (const DeviceInfo &info :
|
||||
Device::available_devices(DEVICE_MASK(Device::type_from_string(deviceType.c_str()))))
|
||||
{
|
||||
if (info.meets_driver_requirement) {
|
||||
devices.push_back(info);
|
||||
}
|
||||
}
|
||||
if (devices.empty()) {
|
||||
devices = Device::available_devices(DEVICE_MASK_CPU);
|
||||
if (!devices.empty()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue