[Mesa-dev] [PATCH 2/2] configure.ac: refuse to build r300g without LLVM

Marek Olšák maraeo at gmail.com
Tue Apr 26 16:44:04 PDT 2011


On Wed, Apr 27, 2011 at 12:26 AM, Julien Cristau <jcristau at debian.org>wrote:

> On Sat, Apr 23, 2011 at 10:48:49 +0200, Marek Olšák wrote:
>
> > On Fri, Apr 22, 2011 at 1:29 PM, Jose Fonseca <jfonseca at vmware.com>
> wrote:
> >
> > > The Mesa state tracker uses SWTNL for GL selection/feedback regardless
> of
> > > the driver. Some SPECviewperf viewsets and CAD apps use it. So using
> LLVM
> > > speeds up selection/feedback for all gallium drivers.
> > >
> > > We have only tested LLVM with x86/x86_64. So indeed, using it/requiring
> it
> > > on other platforms is not advisable.
> > >
> >
> > I take the first patch back. Here's an updated r300g patch that requires
> > LLVM on x86 and x86_64 only:
> >
> >
> >     configure.ac: require LLVM to build r300g on x86 and x86_64
> >
> > diff --git a/configure.ac b/configure.ac
> > index d8c50ce..1012ca5 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -1780,9 +1780,16 @@ dnl Gallium Radeon r300g configuration
> >  dnl
> >  AC_ARG_ENABLE([gallium-r300],
> >      [AS_HELP_STRING([--enable-gallium-r300],
> > -        [build gallium r300 @<:@default=DRI-only@:>@])],
> > +        [build gallium r300 @<:@default=build DRI driver only@:>@])],
> >      [enable_gallium_r300="$enableval"],
> >      [enable_gallium_r300=auto])
> > +if test "x$enable_gallium_r300" != xno; then
> > +    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]);;
> > +        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"
> >
> >
> AIUI it's not really required, it'll just be slow if built without llvm?
>

Slow like almost unusable. Note that I am only talking about SWTCL chipsets
and some rarely-used GL features.

How much of that is specific to r300 as opposed to other gallium
> drivers?


None of the LLVM code is driver-specific. I think about a half of all the
Gallium drivers use it for some fallbacks. Some Gallium drivers like i915
really suffer without LLVM.

 Shouldn't this be a warning instead of an error?
>

The thing is if I don't enforce it for r300g, no one besides Redhat will use
it. The TGSI interpreter, which would be used if LLVM was disabled, is maybe
useful for debugging and testing, but totally inappropriate for end-users.

Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20110427/48298194/attachment.html>


More information about the mesa-dev mailing list