[Mesa-dev] [PATCH 13/14] swrast: Build the driver into the shared mesa_dri_drivers.so.

Emil Velikov emil.l.velikov at gmail.com
Tue Oct 1 14:14:05 PDT 2013


On 30/09/13 21:44, Eric Anholt wrote:
> ---
>  configure.ac                                 | 26 +++++++++++---------------
>  src/mesa/drivers/dri/Makefile.am             |  2 ++
>  src/mesa/drivers/dri/swrast/Makefile.am      | 18 +++---------------
>  src/mesa/drivers/dri/swrast/Makefile.sources |  6 ------
>  src/mesa/drivers/dri/swrast/swrast.c         | 17 ++++++++++++++---
>  5 files changed, 30 insertions(+), 39 deletions(-)
> 

Hi Eric,

AFAICS this patch causes clashes with gallium dri drivers, as one can
have a swrast only classic dri and a range of gallium dri targets.
To make thing funnier, the first patch of the "makefile.sources" series
makes things even worse, as it reuses the already build libdricommon.la.

The easiest way to handle is to build separate classic and/or gallium
libdricommon, appending DRISWCOMMON_CFLAGS to the CFLAGS of the classic
one and GALLIM_DRISWCOMMON_CFLAGS for gallium as it gets megadrivers
support.

> diff --git a/configure.ac b/configure.ac
> index 5649aec..81abdf9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1016,10 +1016,14 @@ if test "x$enable_dri" = xyes; then
>      LIBS="$save_LIBS"
>  
>      # If we are building any DRI driver other than swrast.
> -    if test -n "$DRI_DIRS" -a x"$DRI_DIRS" != xswrast; then
> -        # ... libdrm is required
> -        if test "x$have_libdrm" != xyes; then
> -            AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
> +    if test -n "$DRI_DIRS"; then
> +        if test -a x"$DRI_DIRS" != xswrast; then
> +            # ... libdrm is required
> +            if test "x$have_libdrm" != xyes; then
> +                AC_MSG_ERROR([DRI drivers requires libdrm >= $LIBDRM_REQUIRED])
> +            fi
> +        else
> +            CFLAGS="$CFLAGS -DSWRAST_NO_DRM"

+              DRISWCOMMON_CFLAGS="-DSWRAST_NO_DRM -D_NOT_HAVE_DRM_H"
+              AC_SUBST([DRISWCOMMON_CFLAGS])

Cheers
Emil


More information about the mesa-dev mailing list