lavapipe: Don't wrap errors returned from vk_device_init in vk_error
authorJason Ekstrand <jason@jlekstrand.net>
Mon, 1 Nov 2021 04:23:37 +0000 (23:23 -0500)
committerDave Airlie <airlied@redhat.com>
Mon, 1 Nov 2021 04:30:32 +0000 (14:30 +1000)
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@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13619>

src/gallium/frontends/lavapipe/lvp_device.c

index f267600..bfc07ba 100644 (file)
@@ -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;