[Mesa-dev] [PATCH 3/4] configure: error out when building xa only with swrast

Emil Velikov emil.l.velikov at gmail.com
Fri Feb 28 13:38:24 PST 2014


On 27/02/14 20:39, Emil Velikov wrote:
> On 25/02/14 08:24, Matt Turner wrote:
>> On Mon, Feb 24, 2014 at 3:05 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>> Building to provide accelration using swrast does not make
>>> sense.
>>>
>>> Note: update your build script to explicitly mention svga
>>> in the gallium drivers list, if you are building the vmwgfx
>>> xa library.
>>>
>>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>>> ---
>>>  configure.ac | 3 +++
>>>  1 file changed, 3 insertions(+)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 6db3c1d..d98dca9 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -1234,6 +1234,9 @@ dnl
>>>  dnl XA configuration
>>>  dnl
>>>  if test "x$enable_xa" = xyes; then
>>> +    if test "x$gallium_drivers" = xswrast; then
>>> +       AC_MSG_ERROR([Building xa requires at least one non swrast gallium driver])
>>> +    fi
>>>      GALLIUM_STATE_TRACKERS_DIRS="xa $GALLIUM_STATE_TRACKERS_DIRS"
>>>      enable_gallium_loader=yes
>>>      enable_gallium_drm_loader=yes
>>> --
>>> 1.9.0
>>
>> It's a never ending battle if we try to catch all kinds of nonsensical
>> build configurations. I don't think it's worth it, except in a few
>> cases.
>>
>> In fact, doesn't xf86-video-vmware just link against libxatracker? I
>> don't think preventing xatracker from building without a vmwgfx target
>> is even correct.
>>
> [ Pardon for the rant ]
> 
> Currently gallium gbm and opencl use the so called pipe-drivers. They
> can be considered as "raw" drivers that different state-trackers (ST)
> can load at runtime.
> 
> Recently Rob, added pipe-loader support to the xatracker so that one
> could use different hardware drivers with it.
> 
> Atm if one builds swrast only, the xatracker.so library is build but one
> could not actually use it, as it does not load pipe-swrast.so.
> 
> True one can link against it, but they will have bigger problems as it
> would fail to find/load a hw driver at runtime. Thus causing bigger
> problems to unaware packagers/users. IMHO it's better to error at
> configure than dying at runtime.
> 
> This patch will only affect people that explicitly set --enable-xa
> --with-gallium-drivers=swrast and prevents them from doing a silly thing.
> 
> Perhaps changing the message to the following would make more sense
> 
>  Building xa requires at least one non swrast gallium driver.
>  If you are looking to use libxatracker.so with vmware's virtual gpu,
> make sure to include svga in the gallium drivers list
>  eg. --with-gallium-drivers=svga
> 
Here is a very nice example of what I'm trying to prevent:

Jon Turney has a tinderbox setup [1] at fd.org.

For his needs he builds gallium swrast+llvm on top of a indirect
rendered libGL. For unknown reason he has --enable-xa, which was causing
build problems which he got around with a very gross hack[2].

I believe with the updated message [3] builders will get a clear picture
what is happening and minimise such lovely experiences.


-Emil

P.S. Jon I hope you don't mind that I've Cc'd you on the discussion.

[1] http://tinderbox.x.org/builds/machines/jturney-byron/
[2]
http://cgit.freedesktop.org/~jturney/mesa/commit/?id=d34b00fe5e17581f74d4aeb17b3358953d1e09fa
The dri2 hunk of the patch covers another issue which I'll be sending a
patch for soon.

[3]
  Building xa requires at least one non swrast gallium driver.
  If you are looking to use libxatracker.so with vmware's virtual gpu,
  make sure to include svga in the gallium drivers list, apart from
  enabling XA.
  Example: ./configure --enable-xa --with-gallium-drivers=svga...



> 
> -Emil
> 



More information about the mesa-dev mailing list