vulkan/wsi: Check that xshm can be attached
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

Cc: mesa-stable
Co-authored-by: Carlos Lopez <clopez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35284>
This commit is contained in:
Lucas Fryzek 2025-05-28 08:25:24 -04:00 committed by Marge Bot
parent a67af81944
commit 4933e60bc2

View file

@ -352,29 +352,9 @@ wsi_x11_connection_create(struct wsi_device *wsi_dev,
wsi_conn->is_proprietary_x11 = true;
wsi_conn->has_mit_shm = false;
#ifdef HAVE_X11_DRM
#if defined(HAVE_X11_DRM) && defined(HAVE_SYS_SHM_H)
if (wsi_conn->has_dri3 && wsi_conn->has_present && wants_shm) {
bool has_mit_shm = shm_reply->present != 0;
xcb_shm_query_version_cookie_t ver_cookie;
xcb_shm_query_version_reply_t *ver_reply;
ver_cookie = xcb_shm_query_version(conn);
ver_reply = xcb_shm_query_version_reply(conn, ver_cookie, NULL);
has_mit_shm = ver_reply->shared_pixmaps;
free(ver_reply);
xcb_void_cookie_t cookie;
xcb_generic_error_t *error;
if (has_mit_shm) {
cookie = xcb_shm_detach_checked(conn, 0);
if ((error = xcb_request_check(conn, cookie))) {
if (error->error_code != BadRequest)
wsi_conn->has_mit_shm = true;
free(error);
}
}
wsi_conn->has_mit_shm = x11_xcb_display_supports_xshm(conn);
}
#endif