From: Jason Ekstrand Date: Wed, 13 Oct 2021 16:05:48 +0000 (-0500) Subject: vulkan/log: Tweak our handling of a couple error enums X-Git-Tag: upstream/22.3.5~16636 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=071437d29d9ebe5f1dbc4e14e63fd8a3861ce6f9;p=platform%2Fupstream%2Fmesa.git vulkan/log: Tweak our handling of a couple error enums 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: --- diff --git a/src/vulkan/util/vk_log.c b/src/vulkan/util/vk_log.c index abea4f4..95962d0 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: