vulkan/wsi/wayland: fix wsi_wl_image_init error code

If image->buffer cannot be allocated, the value returned by
wsi_create_native_image is returned. However, if we got that far,
that value is VK_SUCCESS.

Fix it and return VK_ERROR_OUT_OF_HOST_MEMORY.

Signed-off-by: Simon Ser <contact@emersion.fr>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11589>
This commit is contained in:
Simon Ser
2021-06-24 20:30:25 +02:00
parent c45a1de5c6
commit 7d711a10aa
+1 -1
View File
@@ -1000,7 +1000,7 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain,
fail_image:
wsi_destroy_image(&chain->base, &image->base);
return result;
return VK_ERROR_OUT_OF_HOST_MEMORY;
}
static VkResult