diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 3ad59e9b0c4..adbe5c3dafe 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -2933,10 +2933,8 @@ VkResult anv_CreateDevice( result = vk_device_init(&device->vk, &physical_device->vk, &dispatch_table, pCreateInfo, pAllocator); - if (result != VK_SUCCESS) { - vk_error(physical_device, result); + if (result != VK_SUCCESS) goto fail_alloc; - } if (INTEL_DEBUG & DEBUG_BATCH) { const unsigned decode_flags = diff --git a/src/panfrost/vulkan/panvk_device.c b/src/panfrost/vulkan/panvk_device.c index 03be27ff1aa..079d55f64d6 100644 --- a/src/panfrost/vulkan/panvk_device.c +++ b/src/panfrost/vulkan/panvk_device.c @@ -980,7 +980,7 @@ panvk_CreateDevice(VkPhysicalDevice physicalDevice, pCreateInfo, pAllocator); if (result != VK_SUCCESS) { vk_free(&device->vk.alloc, device); - return vk_errorf(physical_device->instance, result, "vk_device_init failed"); + return result; } device->instance = physical_device->instance; diff --git a/src/vulkan/util/vk_device.c b/src/vulkan/util/vk_device.c index 9b88f14b12a..e3617507bae 100644 --- a/src/vulkan/util/vk_device.c +++ b/src/vulkan/util/vk_device.c @@ -25,6 +25,7 @@ #include "vk_common_entrypoints.h" #include "vk_instance.h" +#include "vk_log.h" #include "vk_physical_device.h" #include "vk_queue.h" #include "vk_util.h" @@ -62,14 +63,20 @@ vk_device_init(struct vk_device *device, } if (idx >= VK_DEVICE_EXTENSION_COUNT) - return VK_ERROR_EXTENSION_NOT_PRESENT; + return vk_errorf(physical_device, VK_ERROR_EXTENSION_NOT_PRESENT, + "%s not supported", + pCreateInfo->ppEnabledExtensionNames[i]); if (!physical_device->supported_extensions.extensions[idx]) - return VK_ERROR_EXTENSION_NOT_PRESENT; + return vk_errorf(physical_device, VK_ERROR_EXTENSION_NOT_PRESENT, + "%s not supported", + pCreateInfo->ppEnabledExtensionNames[i]); #ifdef ANDROID if (!vk_android_allowed_device_extensions.extensions[idx]) - return VK_ERROR_EXTENSION_NOT_PRESENT; + return vk_errorf(physical_device, VK_ERROR_EXTENSION_NOT_PRESENT, + "%s not supported", + pCreateInfo->ppEnabledExtensionNames[i]); #endif device->enabled_extensions.extensions[idx] = true;