diff options
author | Dave Airlie <[email protected]> | 2016-10-07 09:16:09 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-10-07 09:16:09 +1000 |
commit | f4e499ec79147f4172f3669ae9dafd941aaeeb65 (patch) | |
tree | 4e082d4d950ffd0a676a8131179ca0e7ce94d99f /configure.ac | |
parent | 28ecd3eac24ce41b8a855a50f366f1985d1dc934 (diff) |
radv: add initial non-conformant radv vulkan driver
This squashes all the radv development up until now into
one for merging.
History can be found:
https://github.com/airlied/mesa/tree/semi-interesting
This requires llvm 3.9 and is in no way considered
a conformant vulkan implementation. It can run a number
of vulkan applications, and supports all GPUs using
the amdgpu kernel driver.
Thanks to Intel for providing anv and spirv->nir,
and Emil Velikov for reviewing build integration.
Parts of this are:
Reviewed-by: Nicolai Hähnle <[email protected]>
Acked-by: Edward O'Callaghan <[email protected]>
Authors: Bas Nieuwenhuizen and Dave Airlie
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 99abcd7a5fe..c8aa829a8ca 100644 --- a/configure.ac +++ b/configure.ac @@ -1715,6 +1715,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]) ;; @@ -2198,7 +2202,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 @@ -2368,10 +2372,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 @@ -2382,6 +2383,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 @@ -2466,7 +2474,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 ;; @@ -2476,7 +2484,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) @@ -2541,6 +2549,10 @@ if test -n "$with_gallium_drivers"; then done fi +if test "x$HAVE_RADEON_VULKAN" != "x0"; then + radeon_llvm_check "radv" "3" "9" "0" +fi + dnl Set LLVM_LIBS - This is done after the driver configuration so dnl that drivers can add additional components to LLVM_COMPONENTS. dnl Previously, gallium drivers were updating LLVM_LIBS directly @@ -2632,8 +2644,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) @@ -2726,6 +2743,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 |