From: Christian König Date: Mon, 4 Jul 2011 13:04:41 +0000 (+0200) Subject: Merge remote-tracking branch 'origin/master' into pipe-video X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c3b2230b71cb3a00a7f4c0987197d397bada650b;p=mesa.git Merge remote-tracking branch 'origin/master' into pipe-video Conflicts: configure.ac src/gallium/drivers/r600/r600_state_inlines.h src/gallium/tests/trivial/Makefile src/gallium/winsys/g3dvl/dri/XF86dri.c src/gallium/winsys/g3dvl/dri/driclient.c src/gallium/winsys/g3dvl/dri/driclient.h src/gallium/winsys/g3dvl/dri/xf86dri.h src/gallium/winsys/g3dvl/dri/xf86dristr.h src/gallium/winsys/r600/drm/r600_bo.c --- c3b2230b71cb3a00a7f4c0987197d397bada650b diff --cc configure.ac index f758f05544a,f19f6478b6a..f470d871e4b --- a/configure.ac +++ b/configure.ac @@@ -535,20 -544,86 +544,105 @@@ 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([xvmc], ++ [AS_HELP_STRING([--enable-xvmc], ++ [enable xvmc library @<:@default=auto@:>@])], ++ [enable_xvmc="$enableval"], ++ [enable_xvmc=auto]) ++AC_ARG_ENABLE([vdpau], ++ [AS_HELP_STRING([--enable-vdpau], ++ [enable vdpau library @<:@default=auto@:>@])], ++ [enable_vdpau="$enableval"], ++ [enable_vdpau=auto]) ++AC_ARG_ENABLE([va], ++ [AS_HELP_STRING([--enable-va], ++ [enable va library @<:@default=auto@:>@])], ++ [enable_va="$enableval"], ++ [enable_va=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 ++ "x$enable_d3d1x" = xno -a \ ++ "x$enable_xvmc" = xno -a \ ++ "x$enable_vdpau" = xno -a \ ++ "x$enable_va" = xno; then AC_MSG_ERROR([at least one API should be enabled]) fi @@@ -1232,6 -1335,142 +1354,192 @@@ 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 Gallium G3DVL configuration ++dnl ++AC_ARG_ENABLE([gallium-g3dvl], ++ [AS_HELP_STRING([--enable-gallium-g3dvl], ++ [build gallium g3dvl @<:@default=disabled@:>@])], ++ [enable_gallium_g3dvl="$enableval"], ++ [enable_gallium_g3dvl=no]) ++if test "x$enable_gallium_g3dvl" = xyes; then ++ if test "x$with_gallium_drivers" = x; then ++ AC_MSG_ERROR([cannot enable G3DVL without Gallium]) ++ fi ++ ++ if test "x$enable_xvmc" = xauto; then ++ enable_xvmc=yes ++ fi ++ ++ if test "x$enable_vdpau" = xauto; then ++ enable_vdpau=yes ++ fi ++ ++ if test "x$enable_va" = xauto; then ++ enable_va=no ++ fi ++fi ++ ++#TODO: Check for xvmc libs/headers ++if test "x$enable_xvmc" = xyes; then ++ GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg/xvmc" ++ HAVE_ST_XVMC="yes" ++fi ++ ++#TODO: Check for vdpau libs/headers ++if test "x$enable_vdpau" = xyes; then ++ GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vdpau" ++ HAVE_ST_VDPAU="yes" ++fi ++ ++#TODO: Check for va libs/headers ++if test "x$enable_va" = xyes; then ++ GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS va" ++ HAVE_ST_VA="yes" ++fi ++ ++if test "x$enable_xvmc" = xyes || ++ test "x$enable_vdpau" = xyes || ++ test "x$enable_va" = xyes; then ++ GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri" ++fi ++ dnl dnl GLU configuration dnl @@@ -1466,148 -1690,8 +1759,6 @@@ AC_SUBST([LLVM_LIBS] AC_SUBST([LLVM_LDFLAGS]) AC_SUBST([LLVM_VERSION]) - dnl - dnl Gallium state trackers configuration - dnl - - AC_ARG_ENABLE([gallium-egl], - [AS_HELP_STRING([--enable-gallium-egl], - [enable gallium EGL state tracker @<:@default=auto@:>@])], - [enable_gallium_egl="$enableval"], - [enable_gallium_egl=auto]) - if test "x$enable_gallium_egl" = xauto; then - case "$mesa_driver" in - dri|no) - enable_gallium_egl=$enable_egl - ;; - *) - enable_gallium_egl=$enable_openvg - ;; - esac - fi - case "x$enable_egl$enable_gallium_egl" in - xnoyes) - AC_MSG_ERROR([cannot build Gallium EGL state tracker without EGL]) - esac - - AC_ARG_WITH([state-trackers], - [AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@], - [comma delimited state_trackers list, e.g. - "egl,glx" @<:@default=auto@:>@])], - [with_state_trackers="$withval"], - [with_state_trackers=yes]) - - case "$with_state_trackers" in - no) - GALLIUM_STATE_TRACKERS_DIRS="" - ;; - yes) - # look at what else is built - case "$mesa_driver" in - xlib) - GALLIUM_STATE_TRACKERS_DIRS=glx - ;; - dri) - GALLIUM_STATE_TRACKERS_DIRS="dri" - HAVE_ST_DRI="yes" - # Have only tested st/xorg on 1.6.0 servers - PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED], - HAVE_ST_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg", - HAVE_ST_XORG="no") - ;; - esac - - if test "x$enable_egl" = xyes; then - if test "$enable_openvg" = yes; then - GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vega" - st_egl="yes" - fi - - if test "$enable_gallium_egl" = yes; then - GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl" - HAVE_ST_EGL="yes" - fi - fi - ;; - *) - # verify the requested state tracker exist - state_trackers="" - _state_trackers=`IFS=', '; echo $with_state_trackers` - for tracker in $_state_trackers; do - case "$tracker" in - dri) - if test "x$mesa_driver" != xdri; then - AC_MSG_ERROR([cannot build dri state tracker without mesa driver set to dri]) - fi - HAVE_ST_DRI="yes" - ;; - egl) - if test "x$enable_egl" != xyes; then - AC_MSG_ERROR([cannot build egl state tracker without EGL library]) - fi - HAVE_ST_EGL="yes" - ;; - xorg) - 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]) - HAVE_ST_XORG="yes" - ;; - vega) - if test "x$enable_openvg" != xyes; then - AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg]) - fi - have_st_vega="yes" - ;; - xorg/xvmc) - # Check for xvmc? - if test "x$enable_gallium_g3dvl" != xyes; then - AC_MSG_ERROR([cannot build XvMC state tracker without --enable-gallium-g3dvl]) - fi - HAVE_ST_XVMC="yes" - ;; - vdpau) - # Check for libvdpau? - if test "x$enable_gallium_g3dvl" != xyes; then - AC_MSG_ERROR([cannot build vdpau state tracker without --enable-gallium-g3dvl]) - fi - HAVE_ST_VDPAU="yes" - ;; - va) - # Check for libva? - if test "x$enable_gallium_g3dvl" != xyes; then - AC_MSG_ERROR([cannot build va state tracker without --enable-gallium-g3dvl]) - fi - HAVE_ST_VA="yes" - ;; - esac - - if test -n "$tracker"; then - test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ - AC_MSG_ERROR([state tracker '$tracker' doesn't exist]) - if test -n "$state_trackers"; then - state_trackers="$state_trackers $tracker" - else - state_trackers="$tracker" - fi - fi - done - GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" - - # append --enable-openvg/--enable-gallium-egl to --with-state-trackers - if test "x$have_st_vega" != xyes -a "x$enable_openvg" = xyes; then - AC_MSG_ERROR([--with-state-trackers specified but vega is missing]) - fi - if test "x$HAVE_ST_EGL" != xyes -a "x$enable_gallium_egl" = xyes; then - AC_MSG_ERROR([--with-state-trackers specified but egl is missing]) - fi - ;; - esac - -- - EGL_CLIENT_APIS="" - VG_LIB_DEPS="" -- case "x$enable_opengl$enable_gles1$enable_gles2" in x*yes*) EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)' @@@ -1747,11 -1820,15 +1887,32 @@@ els MESA_LLVM=0 fi ++dnl Directory for VDPAU libs ++AC_ARG_WITH([vdpau-libdir], ++ [AS_HELP_STRING([--with-vdpau-libdir=DIR], ++ [directory for the VDPAU libraries @<:@default=${libdir}/vdpau@:>@])], ++ [VDPAU_LIB_INSTALL_DIR="$withval"], ++ [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau']) ++AC_SUBST([VDPAU_LIB_INSTALL_DIR]) ++ ++dnl Directory for VA libs ++AC_ARG_WITH([va-libdir], ++ [AS_HELP_STRING([--with-va-libdir=DIR], ++ [directory for the VA libraries @<:@default=${libdir}/va@:>@])], ++ [VA_LIB_INSTALL_DIR="$withval"], ++ [VA_LIB_INSTALL_DIR='${libdir}/va']) ++AC_SUBST([VA_LIB_INSTALL_DIR]) ++ dnl dnl Gallium helper functions dnl gallium_check_st() { - if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes || test "x$HAVE_ST_XVMC" = xyes || test "x$HAVE_ST_VDPAU" = xyes || test "x$HAVE_ST_VA" = xyes; then + if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes || - test "x$HAVE_ST_XA" = xyes; then ++ test "x$HAVE_ST_XA" = xyes || test "x$HAVE_ST_XVMC" = xyes || ++ test "x$HAVE_ST_VDPAU" = xyes || test "x$HAVE_ST_VA" = 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 @@@ -1760,175 -1837,59 +1921,77 @@@ if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3" fi - if test "x$HAVE_ST_XVMC" = xyes && test "x$4" != x; then + if test "x$HAVE_ST_XA" = xyes && test "x$4" != x; then GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $4" fi - if test "x$HAVE_ST_VDPAU" = xyes && test "x$5" != x; then ++ if test "x$HAVE_ST_XVMC" = xyes && test "x$5" != x; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $5" + fi - if test "x$HAVE_ST_VA" = xyes && test "x$6" != x; then ++ if test "x$HAVE_ST_VDPAU" = xyes && test "x$6" != x; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $6" + 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" - 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 - 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([--enable-gallium-r300], - [build gallium r300 @<:@default=build DRI driver only@:>@])], - [enable_gallium_r300="$enableval"], - [enable_gallium_r300=auto]) - - if test "$mesa_driver" != dri ; then - if test "x$enable_gallium_r300" = xauto; then - enable_gallium_r300=no ++ if test "x$HAVE_ST_VA" = xyes && test "x$7" != x; then ++ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $7" + fi - fi + } - if test "x$enable_gallium_r300" != xno; then + gallium_require_llvm() { if test "x$MESA_LLVM" = x0; then case "$host_cpu" in - i*86|x86_64) AC_MSG_ERROR([LLVM is required to build Gallium R300 on x86 and x86_64]);; + i*86|x86_64) AC_MSG_ERROR([LLVM is required to build $1 on x86 and x86_64]);; esac fi - fi - if test "x$enable_gallium_r300" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" - gallium_check_st "radeon/drm" "dri-r300" - elif test "x$enable_gallium_r300" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" - gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon" "xvmc-r300" "vdpau-r300" "va-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" "" "xvmc-r600" "vdpau-r600" "va-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" "xvmc-nouveau" - fi - - dnl - dnl Gallium G3DVL configuration - dnl - AC_ARG_ENABLE([gallium-g3dvl], - [AS_HELP_STRING([--enable-gallium-g3dvl], - [build gallium g3dvl @<:@default=disabled@:>@])], - [enable_gallium_g3dvl="$enableval"], - [enable_gallium_g3dvl=no]) - if test "x$enable_gallium_g3dvl" = xyes; then - case "$mesa_driver" in - xlib) - if test "x$HAVE_ST_VDPAU" = xyes; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe" - fi - if test "x$HAVE_ST_XVMC" = xyes; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe" - fi - if test "x$HAVE_ST_VA" = xyes; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS va-softpipe" - fi - ;; - dri) - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS g3dvl/dri" - ;; - esac - fi - dnl Directory for VDPAU libs - AC_ARG_WITH([vdpau-libdir], - [AS_HELP_STRING([--with-vdpau-libdir=DIR], - [directory for the VDPAU libraries @<:@default=${libdir}/vdpau@:>@])], - [VDPAU_LIB_INSTALL_DIR="$withval"], - [VDPAU_LIB_INSTALL_DIR='${libdir}/vdpau']) - AC_SUBST([VDPAU_LIB_INSTALL_DIR]) + } - dnl Directory for VA libs - AC_ARG_WITH([va-libdir], - [AS_HELP_STRING([--with-va-libdir=DIR], - [directory for the VA libraries @<:@default=${libdir}/va@:>@])], - [VA_LIB_INSTALL_DIR="$withval"], - [VA_LIB_INSTALL_DIR='${libdir}/va']) - AC_SUBST([VA_LIB_INSTALL_DIR]) + 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" - 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" "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" ++ gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon" "" "xvmc-r300" "vdpau-r300" "va-r300" + ;; + xr600) + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600" - gallium_check_st "r600/drm" "dri-r600" ++ gallium_check_st "r600/drm" "dri-r600" "" "" "xvmc-r600" "vdpau-r600" "va-r600" + ;; + xnouveau) + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0" - gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" ++ gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" "" "xvmc-nouveau" + ;; + xswrast) + if test "x$HAVE_ST_DRI" = xyes; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast" + fi ++ if test "x$HAVE_ST_VDPAU" = xyes; then ++ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS vdpau-softpipe" ++ fi ++ if test "x$HAVE_ST_XVMC" = xyes; then ++ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS xvmc-softpipe" ++ fi ++ if test "x$HAVE_ST_VA" = xyes; then ++ GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS va-softpipe" ++ fi + ;; + *) + AC_MSG_ERROR([Unknown Gallium driver: $driver]) + ;; + esac + done fi dnl prepend CORE_DIRS to SRC_DIRS diff --cc src/gallium/drivers/nvfx/nvfx_screen.c index 78212029534,7a013a916b9..0140470d576 --- a/src/gallium/drivers/nvfx/nvfx_screen.c +++ b/src/gallium/drivers/nvfx/nvfx_screen.c @@@ -468,8 -468,13 +469,14 @@@ nvfx_screen_create(struct pipe_winsys * pscreen->get_paramf = nvfx_screen_get_paramf; pscreen->is_format_supported = nvfx_screen_is_format_supported; pscreen->context_create = nvfx_create; + pscreen->video_context_create = nvfx_video_create; + ret = nouveau_bo_new(dev, NOUVEAU_BO_VRAM, 0, 4096, &screen->fence); + if (ret) { + nvfx_screen_destroy(pscreen); + return NULL; + } + switch (dev->chipset & 0xf0) { case 0x30: if (NV30_3D_CHIPSET_3X_MASK & (1 << (dev->chipset & 0x0f))) diff --cc src/gallium/drivers/r600/r600_state_inlines.h index acd41a21214,eb6fb6594b2..8711dbf1720 --- a/src/gallium/drivers/r600/r600_state_inlines.h +++ b/src/gallium/drivers/r600/r600_state_inlines.h @@@ -319,10 -319,10 +319,11 @@@ static inline uint32_t r600_translate_c return V_0280A0_SWAP_STD; case PIPE_FORMAT_R16_UNORM: + case PIPE_FORMAT_R16_SNORM: + case PIPE_FORMAT_R16_FLOAT: return V_0280A0_SWAP_STD; - /* 32-bit buffers. */ + /* 32-bit buffers. */ case PIPE_FORMAT_A8B8G8R8_SRGB: return V_0280A0_SWAP_STD_REV; @@@ -422,10 -422,12 +423,13 @@@ static INLINE uint32_t r600_translate_c return V_0280A0_COLOR_8_8; case PIPE_FORMAT_R16_UNORM: + case PIPE_FORMAT_R16_SNORM: return V_0280A0_COLOR_16; - /* 32-bit buffers. */ + case PIPE_FORMAT_R16_FLOAT: + return V_0280A0_COLOR_16_FLOAT; + + /* 32-bit buffers. */ case PIPE_FORMAT_A8B8G8R8_SRGB: case PIPE_FORMAT_A8B8G8R8_UNORM: case PIPE_FORMAT_A8R8G8B8_UNORM: