summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_device.c
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-08-22 18:10:14 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-08-22 18:49:49 -0700
commit34ff4fbba658dbdfb2b0c852b07a0ee2db549d2e (patch)
treec44abdce4aa4b6479c99c2617039a39735561559 /src/intel/vulkan/anv_device.c
parent26187f3890cd92d6871ffb431763b27cacd8d4fe (diff)
downloadexternal_mesa3d-34ff4fbba658dbdfb2b0c852b07a0ee2db549d2e.zip
external_mesa3d-34ff4fbba658dbdfb2b0c852b07a0ee2db549d2e.tar.gz
external_mesa3d-34ff4fbba658dbdfb2b0c852b07a0ee2db549d2e.tar.bz2
anv: Throw INCOMPATIBLE_DRIVER for non-fatal initialization errors
The only reason we should throw INITIALIZATION_FAILED is if we have found useable intel hardware but have failed to bring it up for some reason. Otherwise, we should just throw INCOMPATIBLE_DRIVER which will turn into successfully advertising 0 physical devices Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Diffstat (limited to 'src/intel/vulkan/anv_device.c')
-rw-r--r--src/intel/vulkan/anv_device.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 6aa20eb..0d79ed9 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -62,8 +62,7 @@ anv_physical_device_init(struct anv_physical_device *device,
fd = open(path, O_RDWR | O_CLOEXEC);
if (fd < 0)
- return vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
- "failed to open %s: %m", path);
+ return vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
device->_loader_data.loaderMagic = ICD_LOADER_MAGIC;
device->instance = instance;
@@ -73,15 +72,14 @@ anv_physical_device_init(struct anv_physical_device *device,
device->chipset_id = anv_gem_get_param(fd, I915_PARAM_CHIPSET_ID);
if (!device->chipset_id) {
- result = VK_ERROR_INITIALIZATION_FAILED;
+ result = vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
goto fail;
}
device->name = brw_get_device_name(device->chipset_id);
device->info = brw_get_device_info(device->chipset_id);
if (!device->info) {
- result = vk_errorf(VK_ERROR_INITIALIZATION_FAILED,
- "failed to get device info");
+ result = vk_error(VK_ERROR_INCOMPATIBLE_DRIVER);
goto fail;
}