Disable DRI3 and sync fence FD functions if xshmfence isn't available
Make sure the server can build when the xshmfence library isn't present Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
33c85beed5
commit
aaf0e29619
|
@ -919,6 +919,7 @@ SyncCreate(ClientPtr client, XID id, unsigned char type)
|
|||
int
|
||||
SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL initially_triggered)
|
||||
{
|
||||
#if HAVE_XSHMFENCE
|
||||
SyncFence *pFence;
|
||||
int status;
|
||||
|
||||
|
@ -936,12 +937,19 @@ SyncCreateFenceFromFD(ClientPtr client, DrawablePtr pDraw, XID id, int fd, BOOL
|
|||
return BadAlloc;
|
||||
|
||||
return Success;
|
||||
#else
|
||||
return BadImplementation;
|
||||
#endif
|
||||
}
|
||||
|
||||
int
|
||||
SyncFDFromFence(ClientPtr client, DrawablePtr pDraw, SyncFence *pFence)
|
||||
{
|
||||
#if HAVE_XSHMFENCE
|
||||
return miSyncFDFromFence(pDraw, pFence);
|
||||
#else
|
||||
return BadImplementation;
|
||||
#endif
|
||||
}
|
||||
|
||||
static SyncCounter *
|
||||
|
|
54
configure.ac
54
configure.ac
|
@ -792,6 +792,7 @@ DMXPROTO="dmxproto >= 2.2.99.1"
|
|||
VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1"
|
||||
WINDOWSWMPROTO="windowswmproto"
|
||||
APPLEWMPROTO="applewmproto >= 1.4"
|
||||
XSHMFENCE="xshmfence"
|
||||
|
||||
dnl Required modules
|
||||
XPROTO="xproto >= 7.0.22"
|
||||
|
@ -1119,17 +1120,59 @@ AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes)
|
|||
|
||||
PKG_CHECK_MODULES([DRI3PROTO], $DRI3PROTO,
|
||||
[HAVE_DRI3PROTO=yes], [HAVE_DRI3PROTO=no])
|
||||
|
||||
case "$DRI3,$HAVE_DRI3PROTO" in
|
||||
yes,yes | auto,yes)
|
||||
;;
|
||||
yes,no)
|
||||
AC_MSG_ERROR([DRI3 requested, but dri3proto not found.])
|
||||
DRI3=no
|
||||
;;
|
||||
yes,yes | auto,yes)
|
||||
AC_DEFINE(DRI3, 1, [Build DRI3 extension])
|
||||
DRI3=yes
|
||||
DRI3_LIB='$(top_builddir)/dri3/libdri3.la'
|
||||
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO"
|
||||
no,*)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_NOTICE([DRI3 disabled because dri3proto not found.])
|
||||
DRI3=no
|
||||
;;
|
||||
esac
|
||||
|
||||
PKG_CHECK_MODULES([XSHMFENCE], $XSHMFENCE,
|
||||
[HAVE_XSHMFENCE=yes], [HAVE_XSHMFENCE=no])
|
||||
|
||||
AM_CONDITIONAL(XSHMFENCE, test "x$HAVE_XSHMFENCE" = xyes)
|
||||
|
||||
case x"$HAVE_XSHMFENCE" in
|
||||
xyes)
|
||||
AC_DEFINE(HAVE_XSHMFENCE, 1, [Have X Shared Memory Fence library])
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
case "$DRI3,$HAVE_XSHMFENCE" in
|
||||
yes,yes | auto,yes)
|
||||
;;
|
||||
yes,no)
|
||||
AC_MSG_ERROR("DRI3 requested, but xshmfence not found.])
|
||||
DRI3=no
|
||||
;;
|
||||
no,*)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_NOTICE([DRI3 disabled because xshmfence not found.])
|
||||
DRI3=no
|
||||
;;
|
||||
esac
|
||||
|
||||
case x"$DRI3" in
|
||||
xyes|xauto)
|
||||
DRI3=yes
|
||||
AC_DEFINE(DRI3, 1, [Build DRI3 extension])
|
||||
DRI3_LIB='$(top_builddir)/dri3/libdri3.la'
|
||||
SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI3PROTO"
|
||||
AC_MSG_NOTICE([DRI3 enabled]);
|
||||
;;
|
||||
esac
|
||||
|
||||
AM_CONDITIONAL(DRI3, test "x$DRI3" = xyes)
|
||||
|
||||
if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$DRI3" = xyes || test "x$CONFIG_UDEV_KMS" = xyes; then
|
||||
|
@ -1333,7 +1376,6 @@ if test "x$XDMAUTH" = xyes; then
|
|||
XDMCP_MODULES="xdmcp"
|
||||
fi
|
||||
fi
|
||||
REQUIRED_LIBS="$REQUIRED_LIBS xshmfence"
|
||||
|
||||
AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path])
|
||||
AC_DEFINE_DIR(SERVER_MISC_CONFIG_PATH, SERVERCONFIG, [Server miscellaneous config path])
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
#ifndef _DRI3_H_
|
||||
#define _DRI3_H_
|
||||
|
||||
#include <xorg-server.h>
|
||||
|
||||
#ifdef DRI3
|
||||
|
||||
#include <X11/extensions/dri3proto.h>
|
||||
#include <randrstr.h>
|
||||
|
||||
|
@ -56,4 +60,6 @@ typedef struct dri3_screen_info {
|
|||
extern _X_EXPORT Bool
|
||||
dri3_screen_init(ScreenPtr screen, dri3_screen_info_ptr info);
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _DRI3_H_ */
|
||||
|
|
|
@ -218,4 +218,7 @@
|
|||
#define _XSERVER64 1
|
||||
#endif
|
||||
|
||||
/* Have support for X shared memory fence library (xshmfence) */
|
||||
#undef HAVE_XSHMFENCE
|
||||
|
||||
#endif /* _XORG_SERVER_H_ */
|
||||
|
|
|
@ -8,8 +8,13 @@ if XORG
|
|||
sdk_HEADERS = misync.h misyncstr.h misyncshm.h
|
||||
endif
|
||||
|
||||
XSHMFENCE_SRCS = misyncshm.c
|
||||
|
||||
libsync_la_SOURCES = \
|
||||
misync.c \
|
||||
misync.h \
|
||||
misyncshm.c \
|
||||
misyncstr.h
|
||||
|
||||
if XSHMFENCE
|
||||
libsync_la_SOURCES += $(XSHMFENCE_SRCS)
|
||||
endif
|
||||
|
|
Loading…
Reference in New Issue