Mesa (master): anv: Add a --disable-vulkan-icd-full-driver-path option

Dave Airlie airlied at kemper.freedesktop.org
Thu Aug 25 00:32:40 UTC 2016


Module: Mesa
Branch: master
Commit: 05f36435ef117e48f457b44877d04dd6249b3bb7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=05f36435ef117e48f457b44877d04dd6249b3bb7

Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Aug 22 18:11:41 2016 -0700

anv: Add a --disable-vulkan-icd-full-driver-path option

This option makes installed Vulkan ICD files contain only a driver library
name and not a path.  This is intended for distros to help them work around
multi-arch issues.

Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 configure.ac                       | 7 +++++++
 src/intel/vulkan/Makefile.am       | 8 +++++++-
 src/intel/vulkan/intel_icd.json.in | 2 +-
 3 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 3aa15c7..5a35599 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1645,6 +1645,13 @@ AC_ARG_WITH([vulkan-icddir],
     [VULKAN_ICD_INSTALL_DIR='${datarootdir}/vulkan/icd.d'])
 AC_SUBST([VULKAN_ICD_INSTALL_DIR])
 
+AC_ARG_ENABLE([vulkan-icd-full-driver-path],
+   [AS_HELP_STRING([--disable-vulkan-icd-full-driver-path],
+                   [create Vulkan ICD files with just a .so name and no path])],
+   [vulkan_icd_driver_path="$enableval"],
+   [vulkan_icd_driver_path="yes"])
+AM_CONDITIONAL(VULKAN_ICD_DRIVER_PATH, test "x$vulkan_icd_driver_path" = xyes)
+
 if test -n "$with_vulkan_drivers"; then
     VULKAN_DRIVERS=`IFS=', '; echo $with_vulkan_drivers`
     for driver in $VULKAN_DRIVERS; do
diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
index 9fef960..5491a16 100644
--- a/src/intel/vulkan/Makefile.am
+++ b/src/intel/vulkan/Makefile.am
@@ -170,9 +170,15 @@ dev_icd.json : dev_icd.json.in
 		-e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
 		< $(srcdir)/dev_icd.json.in > $@
 
+if VULKAN_ICD_DRIVER_PATH
+ICD_DRIVER_PATH="${libdir}/libvulkan_intel.so"
+else
+ICD_DRIVER_PATH="libvulkan_intel.so"
+endif
+
 intel_icd.json : intel_icd.json.in
 	$(AM_V_GEN) $(SED) \
-		-e "s#@install_libdir@#${libdir}#" \
+		-e "s#@ICD_DRIVER_PATH@#${ICD_DRIVER_PATH}#" \
 		< $(srcdir)/intel_icd.json.in > $@
 
 # Libvulkan with dummy gem. Used for unit tests.
diff --git a/src/intel/vulkan/intel_icd.json.in b/src/intel/vulkan/intel_icd.json.in
index d9b363a..4f50866 100644
--- a/src/intel/vulkan/intel_icd.json.in
+++ b/src/intel/vulkan/intel_icd.json.in
@@ -1,7 +1,7 @@
 {
     "file_format_version": "1.0.0",
     "ICD": {
-        "library_path": "@install_libdir@/libvulkan_intel.so",
+        "library_path": "@ICD_DRIVER_PATH@",
         "abi_versions": "1.0.3"
     }
 }




More information about the mesa-commit mailing list