summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-18 11:35:53 -0800
committerEric Anholt <eric@anholt.net>2014-01-27 09:30:47 -0800
commitd26f5335151a9e962afa4bbf29ca5b94660a33ca (patch)
treeac13bb1c427fcdeb55856c36938c0da62d39221b
parent54e78ec31e030d488765341a0c143c5a060c3768 (diff)
glamor: Hook the module back up to the build.
For now we're just building an uninstalled library. The extra EGL stubs are required so that we can get the DIX building and usable without pulling in the xf86 DDX code in glamor_egl.c. Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac10
-rw-r--r--glamor/Makefile.am31
-rw-r--r--glamor/glamor.c1
-rw-r--r--glamor/glamor_egl_stubs.c64
-rw-r--r--include/dix-config.h.in3
6 files changed, 89 insertions, 26 deletions
diff --git a/Makefile.am b/Makefile.am
index add69d193..fb527a8f2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,6 +27,10 @@ if PRESENT
PRESENT_DIR=present
endif
+if GLAMOR
+GLAMOR_DIR=glamor
+endif
+
SUBDIRS = \
doc \
man \
@@ -51,6 +55,7 @@ SUBDIRS = \
$(PRESENT_DIR) \
$(DRI3_DIR) \
exa \
+ $(GLAMOR_DIR) \
config \
hw \
test
@@ -102,6 +107,7 @@ DIST_SUBDIRS = \
composite \
glx \
exa \
+ $(GLAMOR_DIR) \
config \
dri3 \
present \
diff --git a/configure.ac b/configure.ac
index 560c46030..20e3f18db 100644
--- a/configure.ac
+++ b/configure.ac
@@ -636,6 +636,7 @@ AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest serv
AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no])
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
+AC_ARG_ENABLE(glamor, AS_HELP_STRING([--enable-glamor], [Build glamor dix module (default: no)]), [GLAMOR=$enableval], [GLAMOR=no])
dnl kdrive and its subsystems
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
@@ -2063,6 +2064,14 @@ AM_CONDITIONAL([SOLARIS_VT], [test "x$solaris_vt" = xyes])
AM_CONDITIONAL([DGA], [test "x$DGA" = xyes])
AM_CONDITIONAL([XF86VIDMODE], [test "x$XF86VIDMODE" = xyes])
AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes])
+
+dnl glamor
+AM_CONDITIONAL([GLAMOR], [test "x$GLAMOR" = xyes])
+if test "x$GLAMOR" = xyes; then
+ AC_DEFINE(GLAMOR, 1, [Build glamor])
+ PKG_CHECK_MODULES([GLAMOR], [egl gl])
+fi
+
dnl XWin DDX
AC_MSG_CHECKING([whether to build XWin DDX])
@@ -2432,6 +2441,7 @@ doc/Makefile
doc/dtrace/Makefile
man/Makefile
fb/Makefile
+glamor/Makefile
record/Makefile
config/Makefile
mi/Makefile
diff --git a/glamor/Makefile.am b/glamor/Makefile.am
index 90d80a746..3fe25304d 100644
--- a/glamor/Makefile.am
+++ b/glamor/Makefile.am
@@ -1,14 +1,8 @@
-lib_LTLIBRARIES = libglamor.la
+noinst_LTLIBRARIES = libglamor.la libglamor_egl_stubs.la
-if GLAMOR_GLES2
-libglamor_la_LIBADD = $(GLESV2_LIBS)
-else
-libglamor_la_LIBADD = $(GL_LIBS)
-endif
+libglamor_la_LIBADD = $(GLAMOR_LIBS)
-AM_CFLAGS = $(CWARNFLAGS) $(DIX_CFLAGS) $(LIBDRM_CFLAGS)
-
-libglamor_la_LDFLAGS = -version-info 0:0:0
+AM_CFLAGS = $(CWARNFLAGS) $(DIX_CFLAGS) $(GLAMOR_CFLAGS)
libglamor_la_SOURCES = \
glamor.c \
@@ -48,21 +42,6 @@ libglamor_la_SOURCES = \
glamor_utils.h\
glamor.h
-sdk_HEADERS = glamor.h
-
-if EGL
-LIBGLAMOREGL = libglamoregl.la
-module_LTLIBRARIES = $(LIBGLAMOREGL)
-libglamoregl_la_DEPENDENCIES = libglamor.la
-libglamoregl_la_LDFLAGS = -avoid-version -module
-libglamoregl_la_LIBADD = $(EGL_LIBS) $(GLX_SYS_LIBS) $(GBM_LIBS) libglamor.la
-libglamoregl_la_SOURCES = glamor_eglmodule.c glamor_egl.c
-libglamoregl_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLX_DEFINES) \
- $(LIBDRM_CFLAGS) \
- $(EGL_CFLAGS) \
- $(GBM_CFLAGS)
-endif
-
+libglamor_egl_stubs_la_SOURCES = glamor_egl_stubs.c
+sdk_HEADERS = glamor.h
diff --git a/glamor/glamor.c b/glamor/glamor.c
index 188aef57e..feb110a66 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -261,6 +261,7 @@ glamor_set_debug_level(int *debug_level)
int glamor_debug_level;
+
/** Set up glamor for an already-configured GL context. */
Bool
glamor_init(ScreenPtr screen, unsigned int flags)
diff --git a/glamor/glamor_egl_stubs.c b/glamor/glamor_egl_stubs.c
new file mode 100644
index 000000000..1449d0874
--- /dev/null
+++ b/glamor/glamor_egl_stubs.c
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ */
+
+/** @file glamor_egl_stubs.c
+ *
+ * Stubbed out glamor_egl.c functions for servers other than Xorg.
+ */
+
+#include "glamor_priv.h"
+
+void
+glamor_egl_screen_init(ScreenPtr screen)
+{
+}
+
+void
+glamor_egl_destroy_textured_pixmap(PixmapPtr pixmap)
+{
+}
+
+void
+glamor_egl_make_current(ScreenPtr screen)
+{
+}
+
+void
+glamor_egl_restore_context(ScreenPtr screen)
+{
+}
+
+int
+glamor_egl_dri3_fd_name_from_tex(ScreenPtr screen,
+ PixmapPtr pixmap,
+ unsigned int tex,
+ Bool want_name, CARD16 *stride, CARD32 *size)
+{
+ return 0;
+}
+
+unsigned int
+glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h)
+{
+ return 0;
+}
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 55cfe4710..247b114d0 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -475,4 +475,7 @@
/* Ask fontsproto to make font path element names const */
#define FONT_PATH_ELEMENT_NAME_CONST 1
+/* Build GLAMOR */
+#undef GLAMOR
+
#endif /* _DIX_CONFIG_H_ */