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

Emil Velikov emil.l.velikov at gmail.com
Thu Feb 27 12:39:23 PST 2014


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


-Emil


More information about the mesa-dev mailing list