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: 47adb11143 ("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>
This commit is contained in:
Jason Ekstrand 2021-10-31 23:23:37 -05:00 committed by Dave Airlie
parent 73af67883d
commit 79f57f6893

View 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;