Mesa (main): vulkan/log: Tweak our handling of a couple error enums

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 14 15:10:24 UTC 2021


Module: Mesa
Branch: main
Commit: 071437d29d9ebe5f1dbc4e14e63fd8a3861ce6f9
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=071437d29d9ebe5f1dbc4e14e63fd8a3861ce6f9

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed Oct 13 11:05:48 2021 -0500

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 <tapani.palli at intel.com>
Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13341>

---

 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:



More information about the mesa-commit mailing list