[Mesa-dev] [PATCH 4/4] radv: toplevel configure/make changes required to build

Edward O'Callaghan funfunctor at folklore1984.net
Tue Oct 4 03:11:05 UTC 2016


Reviewed-by: Edward O'Callaghan <funfunctor at folklore1984.net>

On 10/04/2016 12:48 PM, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
> 
> This moves some of the llvm checks around to allow them
> to be used for non-gallium drivers as well.
> 
> radv requires llvm 3.9.0 as vulkan requires compute shaders.
> 
> Authors: Bas Nieuwenhuizen and Dave Airlie
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  configure.ac    | 33 ++++++++++++++++++++++++++-------
>  src/Makefile.am |  7 ++++++-
>  2 files changed, 32 insertions(+), 8 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 1bfac3b..634f3c3 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1704,6 +1704,10 @@ if test -n "$with_vulkan_drivers"; then
>              HAVE_INTEL_VULKAN=yes;
>  
>              ;;
> +        xradeon)
> +            PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
> +            HAVE_RADEON_VULKAN=yes;
> +	    ;;
>          *)
>              AC_MSG_ERROR([Vulkan driver '$driver' does not exist])
>              ;;
> @@ -2187,7 +2191,7 @@ if test "x$enable_gallium_llvm" = xauto; then
>      i*86|x86_64|amd64) enable_gallium_llvm=yes;;
>      esac
>  fi
> -if test "x$enable_gallium_llvm" = xyes; then
> +if test "x$enable_gallium_llvm" = xyes || test "x$HAVE_RADEON_VULKAN" = xyes; then
>      if test -n "$llvm_prefix"; then
>          AC_PATH_TOOL([LLVM_CONFIG], [llvm-config], [no], ["$llvm_prefix/bin"])
>      else
> @@ -2357,10 +2361,7 @@ radeon_llvm_check() {
>      else
>          amdgpu_llvm_target_name='amdgpu'
>      fi
> -    if test "x$enable_gallium_llvm" != "xyes"; then
> -        AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
> -    fi
> -    llvm_check_version_for "3" "6" "0" $1
> +    llvm_check_version_for $2 $3 $4 $1
>      if test true && $LLVM_CONFIG --targets-built | grep -iqvw $amdgpu_llvm_target_name ; then
>          AC_MSG_ERROR([LLVM $amdgpu_llvm_target_name not enabled in your LLVM build.])
>      fi
> @@ -2371,6 +2372,13 @@ radeon_llvm_check() {
>      fi
>  }
>  
> +radeon_gallium_llvm_check() {
> +    if test "x$enable_gallium_llvm" != "xyes"; then
> +        AC_MSG_ERROR([--enable-gallium-llvm is required when building $1])
> +    fi
> +    radeon_llvm_check $*
> +}
> +
>  swr_llvm_check() {
>      gallium_require_llvm $1
>      if test ${LLVM_VERSION_INT} -lt 306; then
> @@ -2455,7 +2463,7 @@ if test -n "$with_gallium_drivers"; then
>              gallium_require_drm "Gallium R600"
>              gallium_require_drm_loader
>              if test "x$enable_opencl" = xyes; then
> -                radeon_llvm_check "r600g"
> +                radeon_gallium_llvm_check "r600g" "3" "6" "0"
>                  LLVM_COMPONENTS="${LLVM_COMPONENTS} bitreader asmparser"
>              fi
>              ;;
> @@ -2465,7 +2473,7 @@ if test -n "$with_gallium_drivers"; then
>              PKG_CHECK_MODULES([AMDGPU], [libdrm_amdgpu >= $LIBDRM_AMDGPU_REQUIRED])
>              gallium_require_drm "radeonsi"
>              gallium_require_drm_loader
> -            radeon_llvm_check "radeonsi"
> +            radeon_gallium_llvm_check "radeonsi" "3" "6" "0"
>              require_egl_drm "radeonsi"
>              ;;
>          xnouveau)
> @@ -2584,6 +2592,10 @@ if test "x$MESA_LLVM" != x0; then
>      fi
>  fi
>  
> +if test "x$HAVE_RADEON_VULKAN" != "x0"; then
> +    radeon_llvm_check "radv" "3" "9" "0"
> +fi
> +
>  AM_CONDITIONAL(HAVE_GALLIUM_SVGA, test "x$HAVE_GALLIUM_SVGA" = xyes)
>  AM_CONDITIONAL(HAVE_GALLIUM_I915, test "x$HAVE_GALLIUM_I915" = xyes)
>  AM_CONDITIONAL(HAVE_GALLIUM_ILO, test "x$HAVE_GALLIUM_ILO" = xyes)
> @@ -2621,8 +2633,13 @@ AM_CONDITIONAL(HAVE_R200_DRI, test x$HAVE_R200_DRI = xyes)
>  AM_CONDITIONAL(HAVE_RADEON_DRI, test x$HAVE_RADEON_DRI = xyes)
>  AM_CONDITIONAL(HAVE_SWRAST_DRI, test x$HAVE_SWRAST_DRI = xyes)
>  
> +AM_CONDITIONAL(HAVE_RADEON_VULKAN, test "x$HAVE_RADEON_VULKAN" = xyes)
>  AM_CONDITIONAL(HAVE_INTEL_VULKAN, test "x$HAVE_INTEL_VULKAN" = xyes)
>  
> +AM_CONDITIONAL(HAVE_AMD_DRIVERS, test "x$HAVE_GALLIUM_R600" = xyes -o \
> +                                      "x$HAVE_GALLIUM_RADEONSI" = xyes -o \
> +                                      "x$HAVE_RADEON_VULKAN" = xyes)
> +
>  AM_CONDITIONAL(HAVE_INTEL_DRIVERS, test "x$HAVE_INTEL_VULKAN" = xyes -o \
>                                          "x$HAVE_I965_DRI" = xyes)
>  
> @@ -2713,6 +2730,8 @@ dnl Substitute the config
>  AC_CONFIG_FILES([Makefile
>  		src/Makefile
>  		src/amd/Makefile
> +		src/amd/common/Makefile
> +		src/amd/vulkan/Makefile
>  		src/compiler/Makefile
>  		src/egl/Makefile
>  		src/egl/main/egl.pc
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 551f431..6a35f19 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -50,7 +50,7 @@ SUBDIRS = . gtest util mapi/glapi/gen mapi
>  # include only conditionally ?
>  SUBDIRS += compiler
>  
> -if HAVE_GALLIUM_RADEON_COMMON
> +if HAVE_AMD_DRIVERS
>  SUBDIRS += amd
>  endif
>  
> @@ -96,6 +96,11 @@ if HAVE_INTEL_VULKAN
>  SUBDIRS += intel/vulkan
>  endif
>  
> +if HAVE_RADEON_VULKAN
> +SUBDIRS += amd/common
> +SUBDIRS += amd/vulkan
> +endif
> +
>  if HAVE_GALLIUM
>  SUBDIRS += gallium
>  endif
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161004/aab69acd/attachment.sig>


More information about the mesa-dev mailing list