From aaaf9a3b8780710f09447b4044feb68ed31b163a Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 4 Sep 2024 00:32:03 -0700 Subject: [PATCH] anv: Do hasvk devices check first Signed-off-by: Jordan Justen Reviewed-by: Sagar Ghuge Part-of: --- src/intel/vulkan/anv_physical_device.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/intel/vulkan/anv_physical_device.c b/src/intel/vulkan/anv_physical_device.c index 6764b1ec5ec..6fffa0177b0 100644 --- a/src/intel/vulkan/anv_physical_device.c +++ b/src/intel/vulkan/anv_physical_device.c @@ -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)