anv/hasvk: tweak loading failure messages
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 2 Sep 2022 06:27:31 +0000 (09:27 +0300)
committerMarge Bot <emma+marge@anholt.net>
Fri, 2 Sep 2022 09:40:46 +0000 (09:40 +0000)
We don't want to print out too many :

  MESA: error: ../src/intel/vulkan/anv_device.c:769: anv does not support Intel(R) HD Graphics (HSW GT1); use hasvk (VK_ERROR_INCOMPATIBLE_DRIVER)

whenever anv is not able to load on a HSW device. Similarly hasvk
should not print error on anything gfx9+.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18208>

src/intel/vulkan/anv_device.c
src/intel/vulkan_hasvk/anv_device.c

index 64a34eb..5452efc 100644 (file)
@@ -766,8 +766,8 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
                          "Vulkan not yet supported on %s", devinfo.name);
       goto fail_fd;
    } else if (devinfo.ver < 9) {
-      result = vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER,
-                         "anv does not support %s; use hasvk", devinfo.name);
+      /* Silently fail here, hasvk should pick up this device. */
+      result = VK_ERROR_INCOMPATIBLE_DRIVER;
       goto fail_fd;
    }
 
index c52aece..16a2a1a 100644 (file)
@@ -774,8 +774,10 @@ anv_physical_device_try_create(struct vk_instance *vk_instance,
       /* Gfx8 fully supported */
       is_alpha = false;
    } else {
-      result = vk_errorf(instance, VK_ERROR_INCOMPATIBLE_DRIVER,
-                         "Vulkan not yet supported on %s", devinfo.name);
+      /* Silently fail here, anv will either pick up this device or display an
+       * error message.
+       */
+      result = VK_ERROR_INCOMPATIBLE_DRIVER;
       goto fail_fd;
    }