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

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Oct 14 20:48:06 UTC 2021


Module: Mesa
Branch: staging/21.3
Commit: 999b3318fd70f23e6d47c40a365e3c0fdb1ef703
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=999b3318fd70f23e6d47c40a365e3c0fdb1ef703

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>
(cherry picked from commit 071437d29d9ebe5f1dbc4e14e63fd8a3861ce6f9)

---

 .pick_status.json        | 2 +-
 src/vulkan/util/vk_log.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 9ded2bdd57d..c80d07f31b0 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -49,7 +49,7 @@
         "description": "vulkan/log: Tweak our handling of a couple error enums",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "0cad3beb2a0dda7a8f6c6a1e8c9d253b9c988a9f"
     },
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