mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-24 02:34:17 +08:00
glx/drisw: use xcb instead of X to query connection
Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17155>
This commit is contained in:
parent
d3e723fb77
commit
68e8940114
@ -863,9 +863,16 @@ check_xshm(Display *dpy)
|
||||
xcb_void_cookie_t cookie;
|
||||
xcb_generic_error_t *error;
|
||||
int ret = True;
|
||||
int ignore;
|
||||
xcb_query_extension_cookie_t shm_cookie;
|
||||
xcb_query_extension_reply_t *shm_reply;
|
||||
bool has_mit_shm;
|
||||
|
||||
if (!XQueryExtension(dpy, "MIT-SHM", &xshm_opcode, &ignore, &ignore))
|
||||
shm_cookie = xcb_query_extension(c, 7, "MIT-SHM");
|
||||
shm_reply = xcb_query_extension_reply(c, shm_cookie, NULL);
|
||||
|
||||
has_mit_shm = shm_reply->present;
|
||||
free(shm_reply);
|
||||
if (!has_mit_shm)
|
||||
return False;
|
||||
|
||||
cookie = xcb_shm_detach_checked(c, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user