anv: Do hasvk devices check first

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31011>
This commit is contained in:
Jordan Justen
2024-09-04 00:32:03 -07:00
parent 16a835ed3d
commit aaaf9a3b87

View File

@@ -2253,14 +2253,14 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
goto fail_fd;
}
if (devinfo.ver > 20) {
result = vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER,
"Vulkan not yet supported on %s", devinfo.name);
goto fail_fd;
} else if (devinfo.ver < 9) {
if (devinfo.ver < 9) {
/* Silently fail here, hasvk should pick up this device. */
result = VK_ERROR_INCOMPATIBLE_DRIVER;
goto fail_fd;
} else if (devinfo.ver > 20) {
result = vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER,
"Vulkan not yet supported on %s", devinfo.name);
goto fail_fd;
}
if (devinfo.ver == 20 && instance->disable_xe2_ccs)