From: Thomas Hellstrom Date: Mon, 4 Jul 2011 08:21:35 +0000 (+0200) Subject: Merge branch 'xa_branch' X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=424b1210d951c206e7c2fb8f2778acbd384eb247;p=mesa.git Merge branch 'xa_branch' Conflicts: configure.ac Signed-off-by: Thomas Hellstrom --- 424b1210d951c206e7c2fb8f2778acbd384eb247 diff --cc configure.ac index 7d0f3d8ba5c,a99a4e25f74..f19f6478b6a --- a/configure.ac +++ b/configure.ac @@@ -544,80 -535,20 +544,86 @@@ AC_ARG_ENABLE([openvg] [enable_openvg="$enableval"], [enable_openvg=no]) -dnl smooth the transition; should be removed eventually -if test "x$enable_openvg" = xno; then - case "x$with_state_trackers" in - x*vega*) - AC_MSG_WARN([vega state tracker is enabled without --enable-openvg]) - enable_openvg=yes - ;; - esac -fi +AC_ARG_ENABLE([dri], + [AS_HELP_STRING([--enable-dri], + [enable DRI modules @<:@default=auto@:>@])], + [enable_dri="$enableval"], + [enable_dri=auto]) +AC_ARG_ENABLE([glx], + [AS_HELP_STRING([--enable-glx], + [enable GLX library @<:@default=auto@:>@])], + [enable_glx="$enableval"], + [enable_glx=auto]) +AC_ARG_ENABLE([osmesa], + [AS_HELP_STRING([--enable-osmesa], + [enable OSMesa library @<:@default=auto@:>@])], + [enable_osmesa="$enableval"], + [enable_osmesa=auto]) +AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--disable-egl], + [disable EGL library @<:@default=enabled@:>@])], + [enable_egl="$enableval"], + [enable_egl=yes]) + +AC_ARG_ENABLE([xorg], + [AS_HELP_STRING([--enable-xorg], + [enable support for X.Org DDX API @<:@default=no@:>@])], + [enable_xorg="$enableval"], + [enable_xorg=no]) ++AC_ARG_ENABLE([xa], ++ [AS_HELP_STRING([--enable-xa], ++ [enable build of the XA X Acceleration API @<:@default=no@:>@])], ++ [enable_xa="$enableval"], ++ [enable_xa=no]) +AC_ARG_ENABLE([d3d1x], + [AS_HELP_STRING([--enable-d3d1x], + [enable support for Direct3D 10 & 11 low-level API @<:@default=no@:>@])], + [enable_d3d1x="$enableval"], + [enable_d3d1x=no]) +AC_ARG_ENABLE([gbm], + [AS_HELP_STRING([--enable-gbm], + [enable gbm library @<:@default=auto@:>@])], + [enable_gbm="$enableval"], + [enable_gbm=auto]) + +AC_ARG_ENABLE([xlib_glx], + [AS_HELP_STRING([--enable-xlib-glx], + [make GLX library Xlib-based instead of DRI-based @<:@default=disable@:>@])], + [enable_xlib_glx="$enableval"], + [enable_xlib_glx=auto]) +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=disable@:>@])], + [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]) + +# Option for Gallium drivers +GALLIUM_DRIVERS_DEFAULT="r300,r600,swrast" + +AC_ARG_WITH([gallium-drivers], + [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@], + [comma delimited Gallium drivers list, e.g. + "i915,i965,nouveau,r300,r600,svga,swrast" + @<:@default=r300,r600,swrast@:>@])], + [with_gallium_drivers="$withval"], + [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"]) if test "x$enable_opengl" = xno -a \ "x$enable_gles1" = xno -a \ "x$enable_gles2" = xno -a \ - "x$enable_openvg" = xno; then + "x$enable_openvg" = xno -a \ + "x$enable_xorg" = xno -a \ ++ "x$enable_xa" = xno -a \ + "x$enable_d3d1x" = xno; then AC_MSG_ERROR([at least one API should be enabled]) fi @@@ -1329,134 -1232,6 +1335,142 @@@ f AC_SUBST([EGL_LIB_DEPS]) AC_SUBST([EGL_DRIVERS_DIRS]) +dnl +dnl gbm configuration +dnl +if test "x$enable_gbm" = xauto; then + case "$with_egl_platforms" in + *drm*) + enable_gbm=yes ;; + *) + enable_gbm=no ;; + esac +fi +if test "x$enable_gbm" = xyes; then + SRC_DIRS="$SRC_DIRS gbm" + GBM_BACKEND_DIRS="" + + PKG_CHECK_MODULES([LIBUDEV], [libudev], [], + AC_MSG_ERROR([gbm needs udev])) + GBM_LIB_DEPS="$DLOPEN_LIBS $LIBUDEV_LIBS" + + if test "x$enable_dri" = xyes; then + GBM_BACKEND_DIRS="$GBM_BACKEND_DIRS dri" + if test "$SHARED_GLAPI" -eq 0; then + AC_MSG_ERROR([gbm_dri requires --enable-shared-glapi]) + fi + fi +fi +AC_SUBST([GBM_LIB_DEPS]) +AC_SUBST([GBM_BACKEND_DIRS]) +GBM_PC_REQ_PRIV="libudev" +GBM_PC_LIB_PRIV="$DLOPEN_LIBS" +GBM_PC_CFLAGS= +AC_SUBST([GBM_PC_REQ_PRIV]) +AC_SUBST([GBM_PC_LIB_PRIV]) +AC_SUBST([GBM_PC_CFLAGS]) + +dnl +dnl EGL Gallium configuration +dnl +if test "x$enable_gallium_egl" = xyes; then + if test "x$with_gallium_drivers" = x; 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 + + GALLIUM_STATE_TRACKERS_DIRS="egl $GALLIUM_STATE_TRACKERS_DIRS" + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl-static" + HAVE_ST_EGL="yes" +fi + +dnl +dnl gbm Gallium configuration +dnl +if test "x$enable_gallium_gbm" = xauto; then + case "$enable_gbm$HAVE_ST_EGL$with_egl_platforms" in + yesyes*drm*) + enable_gallium_gbm=yes ;; + *) + enable_gallium_gbm=no ;; + esac +fi +if test "x$enable_gallium_gbm" = xyes; then + if test "x$with_gallium_drivers" = x; 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 + + GALLIUM_STATE_TRACKERS_DIRS="gbm $GALLIUM_STATE_TRACKERS_DIRS" + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS gbm" + HAVE_ST_GBM="yes" +fi + +dnl +dnl X.Org DDX configuration +dnl +if test "x$enable_xorg" = xyes; then + PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0]) + PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED]) + PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED]) + PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], + HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", + HAVE_XEXTPROTO_71="no") + GALLIUM_STATE_TRACKERS_DIRS="xorg $GALLIUM_STATE_TRACKERS_DIRS" + HAVE_ST_XORG=yes +fi + ++dnl ++dnl XA configuration ++dnl ++if test "x$enable_xa" = xyes; then ++ GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS" ++ HAVE_ST_XA=yes ++fi ++ +dnl +dnl OpenVG configuration +dnl +VG_LIB_DEPS="" + +if test "x$enable_openvg" = xyes; then + if test "x$enable_egl" = xno; then + AC_MSG_ERROR([cannot enable OpenVG without EGL]) + fi + if test "x$with_gallium_drivers" = x; then + AC_MSG_ERROR([cannot enable OpenVG without Gallium]) + fi + 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 -lpthread" + CORE_DIRS="$CORE_DIRS mapi/vgapi" + GALLIUM_STATE_TRACKERS_DIRS="vega $GALLIUM_STATE_TRACKERS_DIRS" + HAVE_ST_VEGA=yes +fi + +dnl +dnl D3D1X configuration +dnl + +if test "x$enable_d3d1x" = xyes; then + if test "x$with_gallium_drivers" = x; then + AC_MSG_ERROR([cannot enable D3D1X without Gallium]) + fi + + GALLIUM_STATE_TRACKERS_DIRS="d3d1x $GALLIUM_STATE_TRACKERS_DIRS" + HAVE_ST_D3D1X=yes +fi + dnl dnl GLU configuration dnl @@@ -1810,10 -1733,8 +1824,11 @@@ dn dnl Gallium helper functions dnl gallium_check_st() { - if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes; then + if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes || + test "x$HAVE_ST_XA" = xyes; then + if test "x$have_libdrm" != xyes; then + AC_MSG_ERROR([DRI or Xorg DDX requires libdrm >= $LIBDRM_REQUIRED]) + fi GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1" fi if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then @@@ -1832,46 -1756,107 +1850,46 @@@ gallium_require_llvm() fi } -dnl -dnl Gallium SVGA configuration -dnl -AC_ARG_ENABLE([gallium-svga], - [AS_HELP_STRING([--enable-gallium-svga], - [build gallium SVGA @<:@default=disabled@:>@])], - [enable_gallium_svga="$enableval"], - [enable_gallium_svga=auto]) -if test "x$enable_gallium_svga" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" - gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" "xa-vmwgfx" -elif test "x$enable_gallium_svga" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" -fi - -dnl -dnl Gallium i915 configuration -dnl -AC_ARG_ENABLE([gallium-i915], - [AS_HELP_STRING([--enable-gallium-i915], - [build gallium i915 @<:@default=disabled@:>@])], - [enable_gallium_i915="$enableval"], - [enable_gallium_i915=auto]) -if test "x$enable_gallium_i915" = xyes; then +dnl Gallium drivers +if test "x$with_gallium_drivers" != x; then + # This is for compile-testing + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915 i965 r300 svga" GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" - gallium_check_st "i915/drm" "dri-i915" "xorg-i915" -elif test "x$enable_gallium_i915" = xauto; then - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" -fi -dnl -dnl Gallium i965 configuration -dnl -AC_ARG_ENABLE([gallium-i965], - [AS_HELP_STRING([--enable-gallium-i965], - [build gallium i965 @<:@default=disabled@:>@])], - [enable_gallium_i965="$enableval"], - [enable_gallium_i965=auto]) -if test "x$enable_gallium_i965" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965" - gallium_check_st "i965/drm" "dri-i965" "xorg-i965" -elif test "x$enable_gallium_i965" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965" -fi - -dnl -dnl Gallium Radeon r300g configuration -dnl -AC_ARG_ENABLE([gallium-r300], - [AS_HELP_STRING([--disable-gallium-r300], - [build R300 driver @<:@default=enabled@:>@])], - [enable_gallium_r300="$enableval"], - [enable_gallium_r300=yes]) - -if test "x$enable_gallium_r300" = xyes && test "x$mesa_driver" = xdri; then - gallium_require_llvm "Gallium R300" - - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" - gallium_check_st "radeon/drm" "dri-r300" "xorg-r300" -fi - -dnl -dnl Gallium Radeon r600g configuration -dnl -AC_ARG_ENABLE([gallium-r600], - [AS_HELP_STRING([--enable-gallium-r600], - [build gallium r600 @<:@default=disabled@:>@])], - [enable_gallium_r600="$enableval"], - [enable_gallium_r600=auto]) -if test "x$enable_gallium_r600" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600" - gallium_check_st "r600/drm" "dri-r600" -fi - -dnl -dnl Gallium Nouveau configuration -dnl -AC_ARG_ENABLE([gallium-nouveau], - [AS_HELP_STRING([--enable-gallium-nouveau], - [build gallium nouveau @<:@default=disabled@:>@])], - [enable_gallium_nouveau="$enableval"], - [enable_gallium_nouveau=no]) -if test "x$enable_gallium_nouveau" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0" - gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" -fi - -dnl -dnl Gallium swrast configuration -dnl -AC_ARG_ENABLE([gallium-swrast], - [AS_HELP_STRING([--enable-gallium-swrast], - [build gallium swrast @<:@default=auto@:>@])], - [enable_gallium_swrast="$enableval"], - [enable_gallium_swrast=auto]) -if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xauto; then - if test "x$HAVE_ST_DRI" = xyes; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast" - fi + gallium_drivers=`IFS=', '; echo $with_gallium_drivers` + for driver in $gallium_drivers; do + case "x$driver" in + xsvga) - gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" ++ gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" "xa-vmwgfx" + ;; + xi915) + gallium_check_st "i915/drm" "dri-i915" "xorg-i915" + ;; + xi965) + gallium_check_st "i965/drm" "dri-i965" "xorg-i965" + ;; + xr300) + gallium_require_llvm "Gallium R300" + gallium_check_st "radeon/drm" "dri-r300" "xorg-r300" + ;; + xr600) + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600" + gallium_check_st "r600/drm" "dri-r600" + ;; + xnouveau) + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0" + gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" + ;; + xswrast) + if test "x$HAVE_ST_DRI" = xyes; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast" + fi + ;; + *) + AC_MSG_ERROR([Unknown Gallium driver: $driver]) + ;; + esac + done fi dnl prepend CORE_DIRS to SRC_DIRS