From 071437d29d9ebe5f1dbc4e14e63fd8a3861ce6f9 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 13 Oct 2021 11:05:48 -0500 Subject: [PATCH] vulkan/log: Tweak our handling of a couple error enums MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit VK_ERROR_INITIALIZATION_FAILED can happen as part of device creation and isn't really an instance error in that case. VK_ERROR_EXTENSION_NOT_PRESENT, on the other hand, is always an instance thing and we should handle it as such. Fixes: 0cad3beb2a0d ("vulkan/log: Add common vk_error and vk_errorf helpers") Reviewed-by: Tapani Pälli Reviewed-by: Iago Toral Quiroga Part-of: --- src/vulkan/util/vk_log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vulkan/util/vk_log.c b/src/vulkan/util/vk_log.c index abea4f4352a..95962d0b42c 100644 --- a/src/vulkan/util/vk_log.c +++ b/src/vulkan/util/vk_log.c @@ -257,8 +257,8 @@ vk_object_for_error(struct vk_object_base *obj, VkResult error) switch (error) { case VK_ERROR_OUT_OF_HOST_MEMORY: - case VK_ERROR_INITIALIZATION_FAILED: case VK_ERROR_LAYER_NOT_PRESENT: + case VK_ERROR_EXTENSION_NOT_PRESENT: case VK_ERROR_UNKNOWN: return &vk_object_to_instance(obj)->base; case VK_ERROR_FEATURE_NOT_PRESENT: