vulkan/wsi/wayland: handle dmabuf params allocation failure
Return VK_ERROR_OUT_OF_HOST_MEMORY if zwp_linux_dmabuf_v1_create_params fails. 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:
@@ -954,6 +954,8 @@ wsi_wl_image_init(struct wsi_wl_swapchain *chain,
|
||||
if (display->dmabuf.wl_dmabuf) {
|
||||
struct zwp_linux_buffer_params_v1 *params =
|
||||
zwp_linux_dmabuf_v1_create_params(display->dmabuf.wl_dmabuf);
|
||||
if (!params)
|
||||
goto fail_image;
|
||||
|
||||
for (int i = 0; i < image->base.num_planes; i++) {
|
||||
zwp_linux_buffer_params_v1_add(params,
|
||||
|
||||
Reference in New Issue
Block a user