summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-04-14 13:04:22 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-04-15 13:29:29 -0700
commit1a100d4f2827cdfed67b563fba7ef2d9ea6a926b (patch)
tree8915b5e3280998f878056b41d75082436f7125c6 /configure.ac
parentce7e82fb6f10c2c812d949cdeeecdbcfb2cbef44 (diff)
downloadexternal_mesa3d-1a100d4f2827cdfed67b563fba7ef2d9ea6a926b.zip
external_mesa3d-1a100d4f2827cdfed67b563fba7ef2d9ea6a926b.tar.gz
external_mesa3d-1a100d4f2827cdfed67b563fba7ef2d9ea6a926b.tar.bz2
configure: Add support for the Intel Vulkan driver
This adds a --with-vulkan-drivers option with one driver, "intel". In the future, we may add more drivers to this list. v2: Don't enable any drivers by default. This should prevent this patch from breaking anyone's build. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac63
1 files changed, 63 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c9086ac..78895a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1545,6 +1545,56 @@ if test -n "$with_dri_drivers"; then
DRI_DIRS=`echo $DRI_DIRS|tr " " "\n"|sort -u|tr "\n" " "`
fi
+
+#
+# Vulkan driver configuration
+#
+
+AC_ARG_WITH([vulkan-drivers],
+ [AS_HELP_STRING([--with-vulkan-drivers@<:@=DIRS...@:>@],
+ [comma delimited Vulkan drivers list, e.g.
+ "intel"
+ @<:@default=no@:>@])],
+ [with_vulkan_drivers="$withval"],
+ [with_vulkan_drivers="no"])
+
+# Doing '--without-vulkan-drivers' will set this variable to 'no'. Clear it
+# here so that the script doesn't choke on an unknown driver name later.
+case "x$with_vulkan_drivers" in
+ xyes) with_vulkan_drivers="$VULKAN_DRIVERS_DEFAULT" ;;
+ xno) with_vulkan_drivers='' ;;
+esac
+
+AC_ARG_WITH([vulkan-icddir],
+ [AS_HELP_STRING([--with-vulkan-icddir=DIR],
+ [directory for the Vulkan driver icd files @<:@${sysconfdir}/vulkan/icd.d@:>@])],
+ [VULKAN_ICD_INSTALL_DIR="$withval"],
+ [VULKAN_ICD_INSTALL_DIR='${sysconfdir}/vulkan/icd.d'])
+AC_SUBST([VULKAN_ICD_INSTALL_DIR])
+
+if test -n "$with_vulkan_drivers"; then
+ VULKAN_DRIVERS=`IFS=', '; echo $with_vulkan_drivers`
+ for driver in $VULKAN_DRIVERS; do
+ case "x$driver" in
+ xintel)
+ if test "x$HAVE_I965_DRI" != xyes; then
+ AC_MSG_ERROR([Intel Vulkan driver requires the i965 dri driver])
+ fi
+ if test "x$with_sha1" == "x"; then
+ AC_MSG_ERROR([Intel Vulkan driver requires SHA1])
+ fi
+ HAVE_INTEL_VULKAN=yes;
+
+ ;;
+ *)
+ AC_MSG_ERROR([Vulkan driver '$driver' does not exist])
+ ;;
+ esac
+ done
+ VULKAN_DRIVERS=`echo $VULKAN_DRIVERS|tr " " "\n"|sort -u|tr "\n" " "`
+fi
+
+
AM_CONDITIONAL(NEED_MEGADRIVER, test -n "$DRI_DIRS")
AM_CONDITIONAL(NEED_LIBMESA, test "x$enable_xlib_glx" = xyes -o \
"x$enable_osmesa" = xyes -o \
@@ -2407,6 +2457,10 @@ 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_INTEL_VULKAN, test "x$HAVE_INTEL_VULKAN" = xyes)
+
+AM_CONDITIONAL(HAVE_INTEL_DRIVERS, test "x$HAVE_INTEL_VULKAN" = xyes)
+
AM_CONDITIONAL(NEED_RADEON_DRM_WINSYS, test "x$HAVE_GALLIUM_R300" = xyes -o \
"x$HAVE_GALLIUM_R600" = xyes -o \
"x$HAVE_GALLIUM_RADEONSI" = xyes)
@@ -2660,6 +2714,15 @@ if test "$enable_egl" = yes; then
echo " EGL drivers: $egl_drivers"
fi
+# Vulkan
+echo ""
+if test "x$VULKAN_DRIVERS" != x; then
+ echo " Vulkan drivers: $VULKAN_DRIVERS"
+ echo " Vulkan ICD dir: $VULKAN_ICD_INSTALL_DIR"
+else
+ echo " Vulkan drivers: no"
+fi
+
echo ""
if test "x$MESA_LLVM" = x1; then
echo " llvm: yes"