Mesa (master): anv: Better handle return codes from anv_physical_device_init
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Wed Nov 2 16:27:26 UTC 2016
Module: Mesa
Branch: master
Commit: a5f8ff6ca18c38a7c4b5b37a4d5b14ca01e71b1e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5f8ff6ca18c38a7c4b5b37a4d5b14ca01e71b1e
Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date: Tue Nov 1 17:51:56 2016 -0700
anv: Better handle return codes from anv_physical_device_init
The case where we just want the loop to continue is INCOMPATIBLE_DRIVER
because that simply means that whatever FD we opened isn't a supported
Intel chip. Other error codes such as OUT_OF_HOST_MEMORY are actual errors
and we should be returning early in that case.
Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom at imgtec.com>
Cc: "13.0" <mesa-stable at lists.freedesktop.org>
---
src/intel/vulkan/anv_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 37615ef..fcbe587 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -350,7 +350,7 @@ VkResult anv_EnumeratePhysicalDevices(
snprintf(path, sizeof(path), "/dev/dri/renderD%d", 128 + i);
result = anv_physical_device_init(&instance->physicalDevice,
instance, path);
- if (result == VK_SUCCESS)
+ if (result != VK_ERROR_INCOMPATIBLE_DRIVER)
break;
}
More information about the mesa-commit
mailing list