dri3: Switch to libxshmfence version 1.1
authorKeith Packard <keithp@keithp.com>
Fri, 22 Nov 2013 04:22:16 +0000 (20:22 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Sat, 21 Dec 2013 00:17:54 +0000 (16:17 -0800)
libxshmfence v1.0 foolishly used 'int32_t *' for the fence type, which
works when the fence is a linux futex. However, version 1.1
changes the exported datatype to 'struct xshmfence *'

Require libxshmfence version 1.1 and switch the API around.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
configure.ac
src/glx/dri3_glx.c
src/glx/dri3_priv.h

index b0e2b4c38443eef239d06dfff165ffdb1edaf214..07680c09a117c17891bdc2ce56f34abd1913d667 100644 (file)
@@ -836,7 +836,7 @@ xyesno)
     dri_modules="x11 xext xdamage xfixes x11-xcb xcb-glx >= 1.8.1 xcb-dri2 >= 1.8"
 
     if test x"$enable_dri3" = xyes; then
-        dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence"
+        dri_modules="$dri_modules xcb-dri3 xcb-present xcb-sync xshmfence >= 1.1"
     fi
 
     # add xf86vidmode if available
index b047cc880c874913d4862221142e0720e90c5ecb..1834c6d4a8e933695e7a6b608e2c367aac8c91b2 100644 (file)
@@ -676,7 +676,7 @@ dri3_alloc_render_buffer(struct glx_screen *glx_screen, Drawable draw,
    xcb_connection_t *c = XGetXCBConnection(dpy);
    xcb_pixmap_t pixmap;
    xcb_sync_fence_t sync_fence;
-   int32_t *shm_fence;
+   struct xshmfence *shm_fence;
    int buffer_fd, fence_fd;
    int stride;
 
@@ -921,7 +921,7 @@ dri3_get_pixmap_buffer(__DRIdrawable *driDrawable,
    struct dri3_screen                   *psc;
    xcb_connection_t                     *c;
    xcb_sync_fence_t                     sync_fence;
-   int32_t                              *shm_fence;
+   struct xshmfence                     *shm_fence;
    int                                  fence_fd;
    __DRIimage                           *image_planar;
    int                                  stride, offset;
index c8928004207c6c345eede28341483f2b29d3783b..efdc2ae2d2f6abda3a63cf49fc31716785ae43fe 100644 (file)
@@ -87,7 +87,7 @@ struct dri3_buffer {
     */
 
    uint32_t     sync_fence;     /* XID of X SyncFence object */
-   int32_t      *shm_fence;     /* pointer to xshmfence object */
+   struct xshmfence *shm_fence; /* pointer to xshmfence object */
    GLboolean    busy;           /* Set on swap, cleared on IdleNotify */
    void         *driverPrivate;