venus: no supported device is not an error
Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Ryan Neph <ryanneph@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12653>
This commit is contained in:
parent
fc74233363
commit
7dfac808b0
|
@ -1336,9 +1336,7 @@ vn_instance_enumerate_physical_devices(struct vn_instance *instance)
|
||||||
}
|
}
|
||||||
|
|
||||||
count = supported_count;
|
count = supported_count;
|
||||||
if (!count)
|
if (count) {
|
||||||
goto out;
|
|
||||||
|
|
||||||
result = vn_instance_enumerate_physical_device_groups_locked(
|
result = vn_instance_enumerate_physical_device_groups_locked(
|
||||||
instance, physical_devs, count);
|
instance, physical_devs, count);
|
||||||
if (result != VK_SUCCESS) {
|
if (result != VK_SUCCESS) {
|
||||||
|
@ -1347,6 +1345,12 @@ vn_instance_enumerate_physical_devices(struct vn_instance *instance)
|
||||||
count = 0;
|
count = 0;
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* no supported physical device is not an error */
|
||||||
|
result = VK_SUCCESS;
|
||||||
|
vk_free(alloc, physical_devs);
|
||||||
|
physical_devs = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
instance->physical_device.devices = physical_devs;
|
instance->physical_device.devices = physical_devs;
|
||||||
instance->physical_device.device_count = count;
|
instance->physical_device.device_count = count;
|
||||||
|
|
Loading…
Reference in New Issue