[Mesa-dev] [PATCH] Don't set defaults for gallium and dri drivers

Jakob Bornecrantz jakob at vmware.com
Mon Jan 23 06:28:02 PST 2012


----- Original Message -----
> If you're building mesa, you know what drivers you want.

NACK, the default should be build as much as possible.

The proper fix here is to merge --with-dri-drivers and
--with-gallium-drivers, and have it figure with gallium/dri
drivers to turn based on that list, so:

--with-awesome-new-option=dri-vmwgfx,dri-i965

would build gallium, st/mesa, svga, mesa-core and i965 while:

--with-awesome-new-option=dri-i965

would only build mesa-core and i965.


Cheers, Jakob.

> ---
> I mentioned this on IRC and a couple of people agreed, we'd rather
> not have to specify an empty list of drivers to not build either
> gallium or dri drivers.
> 
>  configure.ac |   77
>  +++++++---------------------------------------------------
>  1 files changed, 9 insertions(+), 68 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 9599568..656a8d9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -160,7 +160,7 @@ AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11
> headers])
>  AC_SUBST([X11_INCLUDES])
>  
>  dnl Compiler macros
> -DEFINES=""
> +DEFINES="-DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
>  AC_SUBST([DEFINES])
>  case "$host_os" in
>  linux*|*-gnu*|gnu*)
> @@ -662,23 +662,17 @@ AC_ARG_ENABLE([gallium_gbm],
>      [enable_gallium_gbm="$enableval"],
>      [enable_gallium_gbm=auto])
>  
> -# Option for Gallium drivers
> -GALLIUM_DRIVERS_DEFAULT="r300,r600,svga,swrast"
> -
>  AC_ARG_WITH([gallium-drivers],
>      [AS_HELP_STRING([--with-gallium-drivers@<:@=DIRS...@:>@],
>          [comma delimited Gallium drivers list, e.g.
>          "i915,nouveau,r300,r600,svga,swrast"
> -        @<:@default=r300,r600,swrast@:>@])],
> +        @<:@default=none@:>@])],
>      [with_gallium_drivers="$withval"],
> -    [with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT"])
> +    [with_gallium_drivers=''])
>  
>  # Doing '--without-gallium-drivers' will set this variable to 'no'.
>   Clear it
>  # here so that the script doesn't choke on an unknown driver name
>  later.
> -case "$with_gallium_drivers" in
> -    yes) with_gallium_drivers="$GALLIUM_DRIVERS_DEFAULT" ;;
> -    no) with_gallium_drivers='' ;;
> -esac
> +test "x$with_gallium_drivers" = xno && with_gallium_drivers='';
>  
>  if test "x$enable_opengl" = xno -a \
>          "x$enable_gles1" = xno -a \
> @@ -1128,30 +1122,20 @@ dnl Which drivers to build - default is
> chosen by platform
>  AC_ARG_WITH([dri-drivers],
>      [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
>          [comma delimited DRI drivers list, e.g.
> -        "swrast,i965,radeon" @<:@default=auto@:>@])],
> +        "swrast,i965,radeon" @<:@default=none@:>@])],
>      [with_dri_drivers="$withval"],
> -    [with_dri_drivers=yes])
> -if test "x$with_dri_drivers" = x; then
> -    with_dri_drivers=no
> -fi
> +    [with_dri_drivers='no'])
> +test "x$with_dri_drivers" = x && with_dri_drivers='no';
>  
> -dnl If $with_dri_drivers is yes, directories will be added through
> -dnl platform checks
>  DRI_DIRS=""
>  case "$with_dri_drivers" in
>  no) ;;
> -yes)
> -    # classic DRI drivers require FEATURE_GL to build
> -    if test "x$enable_opengl" = xyes; then
> -        DRI_DIRS="yes"
> -    fi
> -    ;;
>  *)
>      # verify the requested driver directories exist
>      dri_drivers=`IFS=', '; echo $with_dri_drivers`
>      for driver in $dri_drivers; do
>          test -d "$srcdir/src/mesa/drivers/dri/$driver" || \
> -            AC_MSG_ERROR([DRI driver directory '$driver' doesn't
> exist])
> +            AC_MSG_ERROR([DRI driver directory '$driver' does not
> exist])
>      done
>      DRI_DIRS="$dri_drivers"
>      if test -n "$DRI_DIRS" -a "x$enable_opengl" != xyes; then
> @@ -1165,59 +1149,16 @@ if test "x$enable_dri" = xyes; then
>      # Platform specific settings and drivers to build
>      case "$host_os" in
>      linux*)
> -        DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
>          DEFINES="$DEFINES -DHAVE_ALIAS"
> -
> -        case "$host_cpu" in
> -        x86_64)
> -            if test "x$DRI_DIRS" = "xyes"; then
> -                DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
> -            fi
> -            ;;
> -        powerpc*)
> -            # Build only the drivers for cards that exist on
> PowerPC.
> -            if test "x$DRI_DIRS" = "xyes"; then
> -                DRI_DIRS="r200 radeon swrast"
> -            fi
> -            ;;
> -        sparc*)
> -            # Build only the drivers for cards that exist on sparc
> -            if test "x$DRI_DIRS" = "xyes"; then
> -                DRI_DIRS="r200 radeon swrast"
> -            fi
> -            ;;
> -        esac
>          ;;
>      freebsd* | dragonfly* | *netbsd*)
> -        DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1"
> -        DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS"
> -
> -        if test "x$DRI_DIRS" = "xyes"; then
> -            DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
> -        fi
> +        DEFINES="$DEFINES -DPTHREADS -DHAVE_ALIAS"
>          ;;
>      gnu*)
> -        DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
>          DEFINES="$DEFINES -DHAVE_ALIAS"
>  	;;
> -    solaris*)
> -        DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
> -        ;;
> -    cygwin*)
> -        DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER"
> -        if test "x$DRI_DIRS" = "xyes"; then
> -            DRI_DIRS="swrast"
> -        fi
> -        ;;
>      esac
>  
> -    # default drivers
> -    if test "x$DRI_DIRS" = "xyes"; then
> -        DRI_DIRS="i915 i965 nouveau r200 radeon swrast"
> -    fi
> -
> -    DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/  */ /g'`
> -
>      # Check for expat
>      if test "x$enable_dri" = xyes; then
>          EXPAT_INCLUDES=""
> --
> 1.7.3.4
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list