libxshmfence: fix futex detection on Linux

A copy-paste error in the configure patch adding POSIX named semaphore
support caused futex to be disabled when --{enable,disable}-semaphore
was not passed (i.e. on all non-NetBSD platforms). This caused
libxshmfence to fallback to pthread fences on Linux.

The X server and client applications need to use the same fence
implementation in order for DRI3 fences to work. If a GL client is
linked with a different libxshmfence built with futex support (which
is the usual case on Linux) while the server uses libxshmfence with
pthread, the client will hang while awaiting a fence when allocating
a buffer.
This commit is contained in:
mcf 2021-08-21 19:22:12 +00:00
parent d854195b7f
commit e6ad537986
3 changed files with 6 additions and 6 deletions

View file

@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.14 2020/02/23 22:47:47 tnn Exp $
# $NetBSD: Makefile,v 1.15 2021/08/21 19:22:12 mcf Exp $
DISTNAME= libxshmfence-1.3
PKGREVISION= 2
PKGREVISION= 3
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_XORG:=lib/}
EXTRACT_SUFX= .tar.bz2

View file

@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.4 2018/02/27 08:16:03 wiz Exp $
$NetBSD: distinfo,v 1.5 2021/08/21 19:22:12 mcf Exp $
SHA1 (libxshmfence-1.3.tar.bz2) = 3472218fc0e8ee8183533d22dbcd4bbe90bf3ab8
RMD160 (libxshmfence-1.3.tar.bz2) = 1c74b70dbdc23e474fca6342f92414987d3908c2
SHA512 (libxshmfence-1.3.tar.bz2) = c446e055f8fac62b9aa266132289a4cfc030282147974c45ce96d1768a98d1afb997470e58e4a68513174c404cbf373bdde2f0cd4b34abdbce1d89dd0b6fe2b7
Size (libxshmfence-1.3.tar.bz2) = 308644 bytes
SHA1 (patch-configure.ac) = 9301700c19d55b0c80f0265274ea6a158657d039
SHA1 (patch-configure.ac) = 08af1a5035f7b16b0b2e6e3a9c3f008f64f861ca
SHA1 (patch-src_Makefile.am) = cdf80a7606cbc91ddca1443cd9210a3480de5241
SHA1 (patch-src_xshmfence__alloc.c) = 355c20c55601c4ea71306d1e10cbd632b2d7f393
SHA1 (patch-src_xshmfenceint.h) = 1996a0c18977c1e0f05fda3248ed3e97a181f6f1

View file

@ -1,4 +1,4 @@
$NetBSD: patch-configure.ac,v 1.1 2015/09/24 23:34:16 tnn Exp $
$NetBSD: patch-configure.ac,v 1.2 2021/08/21 19:22:12 mcf Exp $
--- configure.ac.orig 2015-01-02 18:43:42.000000000 +0000
+++ configure.ac
@ -7,7 +7,7 @@ $NetBSD: patch-configure.ac,v 1.1 2015/09/24 23:34:16 tnn Exp $
[FUTEX=$enableval], [FUTEX=auto])
+AC_ARG_ENABLE(semaphore, AS_HELP_STRING([--enable-semaphore], [Enable POSIX named semaphores (default: no)]),
+ [SEMAPHORE=$enableval], [FUTEX=no])
+ [SEMAPHORE=$enableval], [SEMAPHORE=no])
+
if test "x$FUTEX" = "xauto"; then
AC_CHECK_HEADER([linux/futex.h], [FUTEX=yes])