x86_test-gl:
extends: .use-x86_test-base
variables:
- FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-07-28-x86-2"
+ FDO_DISTRIBUTION_TAG: &x86_test-gl "2020-08-14-xcb-shm"
# Debian 10 based x86 test image for VK
x86_test-vk:
"
apt-get install -y --no-remove \
+ libxcb-shm0 \
$STABLE_EPHEMERAL
dep_xcb_xfixes = null_dep
dep_xshmfence = null_dep
dep_xcb_xrandr = null_dep
+dep_xcb_shm = null_dep
dep_xlib_xrandr = null_dep
if with_platform_x11
if with_glx == 'xlib' or with_glx == 'gallium-xlib'
dep_xdamage = dependency('xdamage', version : '>= 1.1')
dep_xfixes = dependency('xfixes')
dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
+ dep_xcb_shm = dependency('xcb-shm')
endif
if (with_any_vk or with_glx == 'dri' or with_egl or
(with_gallium_vdpau or with_gallium_xvmc or with_gallium_va or
#if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
+#include <xcb/xproto.h>
+#include <xcb/shm.h>
#include <X11/Xlib.h>
+#include <X11/Xlib-xcb.h>
#include "glxclient.h"
#include <dlfcn.h>
#include "dri_common.h"
static int
check_xshm(Display *dpy)
{
- int (*old_handler)(Display *, XErrorEvent *);
-
+ xcb_connection_t *c = XGetXCBConnection(dpy);
+ xcb_void_cookie_t cookie;
+ xcb_generic_error_t *error;
+ int ret = True;
int ignore;
- XShmSegmentInfo info = { 0, };
if (!XQueryExtension(dpy, "MIT-SHM", &xshm_opcode, &ignore, &ignore))
return False;
- old_handler = XSetErrorHandler(handle_xerror);
- XShmDetach(dpy, &info);
- XSync(dpy, False);
- (void) XSetErrorHandler(old_handler);
-
- /* BadRequest means we're a remote client. If we were local we'd
- * expect BadValue since 'info' has an invalid segment name.
- */
- if (xshm_error == BadRequest)
- return False;
+ cookie = xcb_shm_detach_checked(c, 0);
+ if ((error = xcb_request_check(c, cookie))) {
+ /* BadRequest means we're a remote client. If we were local we'd
+ * expect BadValue since 'info' has an invalid segment name.
+ */
+ if (error->error_code == BadRequest)
+ ret = False;
+ free(error);
+ }
- xshm_error = 0;
- return True;
+ return ret;
}
static struct glx_screen *
dependencies : [
dep_libdrm, dep_dl, dep_m, dep_thread, dep_x11, dep_xcb_glx, dep_xcb,
dep_x11_xcb, dep_xcb_dri2, dep_xext, dep_xfixes, dep_xdamage, dep_xxf86vm,
- extra_deps_libgl,
+ dep_xcb_shm, extra_deps_libgl,
],
version : gl_lib_version,
install : true,