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>
This commit is contained in:
Eric Anholt 2013-12-18 11:35:53 -08:00
parent 54e78ec31e
commit d26f533515
6 changed files with 89 additions and 26 deletions

View File

@ -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 \

View File

@ -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

View File

@ -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
libglamor_egl_stubs_la_SOURCES = glamor_egl_stubs.c
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

View File

@ -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)

64
glamor/glamor_egl_stubs.c Normal file
View File

@ -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;
}

View File

@ -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_ */