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:
Brecht Van Lommel 2026-07-15 14:32:56 +02:00
parent c43148f54a
commit beafdd0072

View file

@ -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()) {