Mesa (main): vulkan/wsi/wayland: handle dmabuf params allocation failure
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jul 8 10:25:05 UTC 2021
Module: Mesa
Branch: main
Commit: 3ee30d98ff3606d79f9d597674bf3812957ae1b5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3ee30d98ff3606d79f9d597674bf3812957ae1b5
Author: Simon Ser <contact at emersion.fr>
Date: Thu Jun 24 20:32:16 2021 +0200
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 at emersion.fr>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11589>
---
src/vulkan/wsi/wsi_common_wayland.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index 219c77692c4..7530f58ec3a 100644
--- a/src/vulkan/wsi/wsi_common_wayland.c
+++ b/src/vulkan/wsi/wsi_common_wayland.c
@@ -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,
More information about the mesa-commit
mailing list