From 4988213fe66da9d9f321c0b0d6211846ef12c011 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 24 Nov 2025 09:22:22 +1000 Subject: [PATCH] dozen: return INCOMPATIBLE_DRIVER on instance create failure When probing on generic Linux platforms, the loading of d3d12 and the first init of could fail, but the error returned causes a loader warning to be printed. Use the correct error return to stop this. Cc: mesa-stable (cherry picked from commit c00b66fa71aba9dd980a3568239576f1ef9a8cd7) Part-of: --- .pick_status.json | 2 +- src/microsoft/vulkan/dzn_device.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 95c458a63c0..50303dba273 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -3264,7 +3264,7 @@ "description": "dozen: return INCOMPATIBLE_DRIVER on instance create failure", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/microsoft/vulkan/dzn_device.c b/src/microsoft/vulkan/dzn_device.c index 51643bf19eb..e1ae049b963 100644 --- a/src/microsoft/vulkan/dzn_device.c +++ b/src/microsoft/vulkan/dzn_device.c @@ -1836,13 +1836,13 @@ dzn_instance_create(const VkInstanceCreateInfo *pCreateInfo, instance->d3d12_mod = util_dl_open(UTIL_DL_PREFIX "d3d12" UTIL_DL_EXT); if (!instance->d3d12_mod) { dzn_instance_destroy(instance, pAllocator); - return vk_error(NULL, VK_ERROR_INITIALIZATION_FAILED); + return vk_error(NULL, VK_ERROR_INCOMPATIBLE_DRIVER); } instance->d3d12.serialize_root_sig = d3d12_get_serialize_root_sig(instance->d3d12_mod); if (!instance->d3d12.serialize_root_sig) { dzn_instance_destroy(instance, pAllocator); - return vk_error(NULL, VK_ERROR_INITIALIZATION_FAILED); + return vk_error(NULL, VK_ERROR_INCOMPATIBLE_DRIVER); } instance->factory = try_create_device_factory(instance->d3d12_mod);