[PATCH 3/6] xorg: Build a glamor_egl module.
Eric Anholt
eric at anholt.net
Mon Feb 24 17:47:40 PST 2014
This is not exposing the API we want long term, but it should get
existing DDX drivers up and running while we massage the API into
shape.
v2: Use LIBADD instead of LDFLAGS to fix deps on libglamor.la, and use
version 0.5.1 (the point it was forked from the external repo).
Signed-off-by: Eric Anholt <eric at anholt.net>
---
configure.ac | 11 +++++++++++
glamor/glamor_eglmodule.c | 3 ++-
hw/xfree86/Makefile.am | 7 ++++++-
hw/xfree86/glamor_egl/Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++
include/dix-config.h.in | 3 +++
5 files changed, 61 insertions(+), 2 deletions(-)
create mode 100644 hw/xfree86/glamor_egl/Makefile.am
diff --git a/configure.ac b/configure.ac
index 5934950..74819bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -806,6 +806,8 @@ LIBAPPLEWM="applewm >= 1.4"
LIBDMX="dmx >= 1.0.99.1"
LIBDRI="dri >= 7.8.0"
LIBDRM="libdrm >= 2.3.0"
+LIBEGL="egl"
+LIBGBM="gbm >= 9"
LIBGL="gl >= 7.1.0"
LIBXEXT="xext >= 1.0.99.4"
LIBXFONT="xfont >= 1.4.2"
@@ -2070,7 +2072,15 @@ AM_CONDITIONAL([GLAMOR], [test "x$GLAMOR" = xyes])
if test "x$GLAMOR" = xyes; then
AC_DEFINE(GLAMOR, 1, [Build glamor])
PKG_CHECK_MODULES([GLAMOR], [epoxy])
+
+ PKG_CHECK_MODULES(GBM, "$LIBGBM", [GBM=yes], [GBM=no])
+ if test "x$GBM" = xyes; then
+ AC_DEFINE(GLAMOR_HAS_GBM, 1,
+ [Build glamor with GBM-based EGL support])
+ fi
+
fi
+AM_CONDITIONAL([GLAMOR_EGL], [test "x$GBM" = xyes])
dnl XWin DDX
@@ -2479,6 +2489,7 @@ hw/xfree86/exa/Makefile
hw/xfree86/exa/man/Makefile
hw/xfree86/fbdevhw/Makefile
hw/xfree86/fbdevhw/man/Makefile
+hw/xfree86/glamor_egl/Makefile
hw/xfree86/i2c/Makefile
hw/xfree86/int10/Makefile
hw/xfree86/loader/Makefile
diff --git a/glamor/glamor_eglmodule.c b/glamor/glamor_eglmodule.c
index 5ddd602..fb5b855 100644
--- a/glamor/glamor_eglmodule.c
+++ b/glamor/glamor_eglmodule.c
@@ -30,6 +30,7 @@
#include "dix-config.h"
#include <xorg-server.h>
+#include <xf86.h>
#define GLAMOR_FOR_XORG
#include <xf86Module.h>
#include "glamor.h"
@@ -40,7 +41,7 @@ static XF86ModuleVersionInfo VersRec = {
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
- PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
+ 0, 5, 1, /* version */
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
MOD_CLASS_NONE,
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 9672904..73e1b4c 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -14,6 +14,10 @@ DRI3_BUILDDIR = $(top_builddir)/dri3
DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la
endif
+if GLAMOR_EGL
+GLAMOR_EGL_SUBDIR = glamor_egl
+endif
+
if XF86UTILS
XF86UTILS_SUBDIR = utils
endif
@@ -33,7 +37,8 @@ endif
SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \
ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \
$(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \
- fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man
+ fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \
+ $(GLAMOR_EGL_SUBDIR)
DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \
parser ramdac shadowfb vbe vgahw \
diff --git a/hw/xfree86/glamor_egl/Makefile.am b/hw/xfree86/glamor_egl/Makefile.am
new file mode 100644
index 0000000..827e033
--- /dev/null
+++ b/hw/xfree86/glamor_egl/Makefile.am
@@ -0,0 +1,39 @@
+# Copyright © 2013 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice (including the next
+# paragraph) shall be included in all copies or substantial portions of the
+# Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+# IN THE SOFTWARE.
+
+module_LTLIBRARIES = libglamoregl.la
+
+libglamoregl_la_SOURCES = \
+ $(top_srcdir)/glamor/glamor_egl.c \
+ $(top_srcdir)/glamor/glamor_eglmodule.c \
+ $()
+
+libglamoregl_la_LDFLAGS = \
+ -avoid-version \
+ $(GBM_LIBS) \
+ $()
+
+libglamoregl_la_LIBADD = \
+ $(top_builddir)/glamor/libglamor.la \
+ $()
+
+AM_CPPFLAGS = $(XORG_INCS)
+AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(GLAMOR_CFLAGS) $(GBM_CFLAGS)
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 7c77956..754e81e 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -481,4 +481,7 @@
/* Build GLAMOR */
#undef GLAMOR
+/* Build glamor's GBM-based EGL support */
+#undef GLAMOR_HAS_GBM
+
#endif /* _DIX_CONFIG_H_ */
--
1.9.rc1
More information about the xorg-devel
mailing list