diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2016-11-01 17:51:56 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-11-09 13:20:37 +0000 |
commit | 88ebff8e2555a2572c483b1e2c224480482cbbac (patch) | |
tree | ec7c0761ddb65c5641da604c5b56228f5542fad1 /src/intel | |
parent | 9c722e8a2ea914e0693cefc49f7849a8eee12e1d (diff) | |
download | external_mesa3d-88ebff8e2555a2572c483b1e2c224480482cbbac.zip external_mesa3d-88ebff8e2555a2572c483b1e2c224480482cbbac.tar.gz external_mesa3d-88ebff8e2555a2572c483b1e2c224480482cbbac.tar.bz2 |
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@jlekstrand.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit a5f8ff6ca18c38a7c4b5b37a4d5b14ca01e71b1e)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |