Mesa (staging/21.3): lavapipe: Don't wrap errors returned from vk_device_init in vk_error

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Nov 1 19:36:41 UTC 2021


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

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Oct 31 23:23:37 2021 -0500

lavapipe: Don't wrap errors returned from vk_device_init in vk_error

vk_device_init already calls vk_error so this is redundant.  Also, it
makes vk_error grumpy to see a VK_ERROR_FEATURE_NOT_PRESENT on an
instance rather than a physical device.

Fixes: 47adb1114376 ("lavapipe: Switch to the new vk_error helpers")
Reviewed-by: Dave Airlie <airlied at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13619>
(cherry picked from commit 79f57f68930ce4fcf59bdca82357e19b4f3d62e6)

---

 .pick_status.json                           | 2 +-
 src/gallium/frontends/lavapipe/lvp_device.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index dc876a8c7d8..92fe6250c8a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -31,7 +31,7 @@
         "description": "lavapipe: Don't wrap errors returned from vk_device_init in vk_error",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "47adb11143767b6e66945197a70dc91383406665"
     },
diff --git a/src/gallium/frontends/lavapipe/lvp_device.c b/src/gallium/frontends/lavapipe/lvp_device.c
index f2676004495..bfc07ba84eb 100644
--- a/src/gallium/frontends/lavapipe/lvp_device.c
+++ b/src/gallium/frontends/lavapipe/lvp_device.c
@@ -1428,7 +1428,7 @@ VKAPI_ATTR VkResult VKAPI_CALL lvp_CreateDevice(
                                     pAllocator);
    if (result != VK_SUCCESS) {
       vk_free(&device->vk.alloc, device);
-      return vk_error(instance, result);
+      return result;
    }
 
    device->instance = (struct lvp_instance *)physical_device->vk.instance;



More information about the mesa-commit mailing list