Mesa (main): wl/shm: don't fetch formats if not requested.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Jul 19 19:21:35 UTC 2021
Module: Mesa
Branch: main
Commit: 75aa8524ec22888229e5849b5715d7111a0885b4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=75aa8524ec22888229e5849b5715d7111a0885b4
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Jul 19 10:22:09 2021 +1000
wl/shm: don't fetch formats if not requested.
This aligns the code with the drm format code
Acked-By: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Reviewed-by: Simon Ser <contact at emersion.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11945>
---
src/vulkan/wsi/wsi_common_wayland.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index f7ecc85b248..f91d9464aff 100644
--- a/src/vulkan/wsi/wsi_common_wayland.c
+++ b/src/vulkan/wsi/wsi_common_wayland.c
@@ -418,6 +418,9 @@ static void
shm_handle_format(void *data, struct wl_shm *shm, uint32_t format)
{
struct wsi_wl_display *display = data;
+ if (display->swrast.formats.element_size == 0)
+ return;
+
wsi_wl_display_add_wl_shm_format(display, &display->swrast.formats, format);
}
More information about the mesa-commit
mailing list