mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-27 04:04:23 +08:00
zink: bail on choose_pdev immediately if no devices are available
cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30746>
This commit is contained in:
parent
07e0834774
commit
a442f67d2f
@ -1717,7 +1717,8 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor)
|
||||
return;
|
||||
}
|
||||
|
||||
assert(pdev_count > 0);
|
||||
if (!pdev_count)
|
||||
return;
|
||||
|
||||
pdevs = malloc(sizeof(*pdevs) * pdev_count);
|
||||
if (!pdevs) {
|
||||
@ -1753,6 +1754,8 @@ choose_pdev(struct zink_screen *screen, int64_t dev_major, int64_t dev_minor)
|
||||
mesa_loge("ZINK: vkEnumeratePhysicalDevices failed (%s)", vk_Result_to_str(result));
|
||||
return;
|
||||
}
|
||||
if (!pdev_count)
|
||||
return;
|
||||
screen->pdev = pdev;
|
||||
}
|
||||
VKSCR(GetPhysicalDeviceProperties)(screen->pdev, &screen->info.props);
|
||||
|
Loading…
Reference in New Issue
Block a user