From 17cdfcc3ed5a0e92a3da51853674a9043c8336ea Mon Sep 17 00:00:00 2001
From: James Thomas
Date: Fri, 1 May 2015 15:20:04 +0000
Subject: Revert "configure.ac: remove enable flags for EGL and GBM Gallium
state trackers"
This reverts commit c46c551c56f78c6bf9e63524c89478695fc4f525.
---
configure.ac | 74 ++++++++++++++++++++++++++++++++++++++++++++++---
docs/egl.html | 7 +++++
src/gallium/Makefile.am | 8 ++++++
3 files changed, 85 insertions(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 101cf664ec9..0a78c22ef44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -783,6 +783,20 @@ AC_ARG_ENABLE([xlib-glx],
[make GLX library Xlib-based instead of DRI-based @<:@default=disabled@:>@])],
[enable_xlib_glx="$enableval"],
[enable_xlib_glx=no])
+AC_ARG_ENABLE([gallium-egl],
+ [AS_HELP_STRING([--enable-gallium-egl],
+ [enable optional EGL state tracker (not required
+ for EGL support in Gallium with OpenGL and OpenGL ES)
+ @<:@default=disabled@:>@])],
+ [enable_gallium_egl="$enableval"],
+ [enable_gallium_egl=no])
+AC_ARG_ENABLE([gallium-gbm],
+ [AS_HELP_STRING([--enable-gallium-gbm],
+ [enable optional gbm state tracker (not required for
+ gbm support in Gallium)
+ @<:@default=auto@:>@])],
+ [enable_gallium_gbm="$enableval"],
+ [enable_gallium_gbm=auto])
AC_ARG_ENABLE([r600-llvm-compiler],
[AS_HELP_STRING([--enable-r600-llvm-compiler],
@@ -1386,6 +1400,51 @@ fi
AM_CONDITIONAL(HAVE_EGL, test "x$enable_egl" = xyes)
AC_SUBST([EGL_LIB_DEPS])
+dnl
+dnl EGL Gallium configuration
+dnl
+if test "x$enable_gallium_egl" = xyes; then
+ if test -z "$with_gallium_drivers"; then
+ AC_MSG_ERROR([cannot enable egl_gallium without Gallium])
+ fi
+ if test "x$enable_egl" = xno; then
+ AC_MSG_ERROR([cannot enable egl_gallium without EGL])
+ fi
+ if test "x$have_libdrm" != xyes; then
+ AC_MSG_ERROR([egl_gallium requires libdrm >= $LIBDRM_REQUIRED])
+ fi
+# XXX: Uncomment once converted to use static/shared pipe-drivers
+# enable_gallium_loader=$enable_shared_pipe_drivers
+fi
+AM_CONDITIONAL(HAVE_GALLIUM_EGL, test "x$enable_gallium_egl" = xyes)
+
+dnl
+dnl gbm Gallium configuration
+dnl
+if test "x$enable_gallium_gbm" = xauto; then
+ case "$enable_gbm$enable_gallium_egl$enable_dri$with_egl_platforms" in
+ yesyesyes*drm*)
+ enable_gallium_gbm=yes ;;
+ *)
+ enable_gallium_gbm=no ;;
+ esac
+fi
+if test "x$enable_gallium_gbm" = xyes; then
+ if test -z "$with_gallium_drivers"; then
+ AC_MSG_ERROR([cannot enable gbm_gallium without Gallium])
+ fi
+ if test "x$enable_gbm" = xno; then
+ AC_MSG_ERROR([cannot enable gbm_gallium without gbm])
+ fi
+
+ if test "x$enable_gallium_egl" != xyes; then
+ AC_MSG_ERROR([gbm_gallium is only used by egl_gallium])
+ fi
+
+ enable_gallium_loader=$enable_shared_pipe_drivers
+fi
+AM_CONDITIONAL(HAVE_GALLIUM_GBM, test "x$enable_gallium_gbm" = xyes)
+
dnl
dnl XA configuration
dnl
@@ -1414,9 +1473,9 @@ if test "x$enable_openvg" = xyes; then
if test -z "$with_gallium_drivers"; then
AC_MSG_ERROR([cannot enable OpenVG without Gallium])
fi
-
- AC_MSG_ERROR([Cannot enable OpenVG, because egl_gallium has been removed and
- OpenVG has not been integrated into standard libEGL yet])
+ if test "x$enable_gallium_egl" = xno; then
+ AC_MSG_ERROR([cannot enable OpenVG without egl_gallium])
+ fi
EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)'
VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS $PTHREAD_LIBS"
@@ -2250,6 +2309,8 @@ AC_CONFIG_FILES([Makefile
src/gallium/drivers/vc4/kernel/Makefile
src/gallium/state_trackers/clover/Makefile
src/gallium/state_trackers/dri/Makefile
+ src/gallium/state_trackers/egl/Makefile
+ src/gallium/state_trackers/gbm/Makefile
src/gallium/state_trackers/glx/xlib/Makefile
src/gallium/state_trackers/nine/Makefile
src/gallium/state_trackers/omx/Makefile
@@ -2384,7 +2445,12 @@ if test "$enable_egl" = yes; then
egl_drivers="$egl_drivers builtin:egl_dri2"
fi
- echo " EGL drivers: $egl_drivers"
+ if test "x$enable_gallium_egl" = xyes; then
+ echo " EGL drivers: ${egl_drivers} egl_gallium"
+ echo " EGL Gallium STs:$EGL_CLIENT_APIS"
+ else
+ echo " EGL drivers: $egl_drivers"
+ fi
fi
echo ""
diff --git a/docs/egl.html b/docs/egl.html
index e77c2359dc1..eebb8c73b55 100644
--- a/docs/egl.html
+++ b/docs/egl.html
@@ -77,6 +77,13 @@ drivers will be installed to ${libdir}/egl.
+--enable-gallium-egl
+
+
+Enable the optional egl_gallium driver.
+
+
+
--with-egl-platforms
diff --git a/src/gallium/Makefile.am b/src/gallium/Makefile.am
index 6a2a866549c..506ff6c2d2e 100644
--- a/src/gallium/Makefile.am
+++ b/src/gallium/Makefile.am
@@ -144,6 +144,14 @@ if HAVE_OPENVG
SUBDIRS += state_trackers/vega
endif
+if HAVE_GALLIUM_EGL
+SUBDIRS += state_trackers/egl targets/egl-static
+endif
+
+if HAVE_GALLIUM_GBM
+SUBDIRS += state_trackers/gbm targets/gbm
+endif
+
if HAVE_X11_DRIVER
SUBDIRS += state_trackers/glx/xlib targets/libgl-xlib
endif
--
cgit v1.2.1