radv: Suffix the radeon_icd file with the host CPU
authorEmil Velikov <emil.velikov@collabora.com>
Wed, 9 Nov 2016 18:11:27 +0000 (18:11 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 9 Nov 2016 21:36:45 +0000 (21:36 +0000)
Port of the anv commit d96345de989 ("anv: Suffix the intel_icd file with
the host CPU").

v2: s/intel_icd/radeon_icd/ in commit summary (GraÅžvydas)

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com> (IRC)
src/amd/vulkan/.gitignore
src/amd/vulkan/Makefile.am
src/amd/vulkan/radeon_icd.json [deleted file]
src/amd/vulkan/radeon_icd.json.in [new file with mode: 0644]

index e55e353d8fb1e5620eadc711af08048c380fa4cc..2a42d7fda8eafa40c2221164a69d137c154d93d4 100644 (file)
@@ -4,3 +4,4 @@
 /radv_timestamp.h
 /dev_icd.json
 /vk_format_table.c
+/radeon_icd.*.json
index 44d2a6660bce9f516bebd71d7e74357b26902189..190be8d000cecd9c1ba84a336d222534ac7a3042 100644 (file)
@@ -131,7 +131,7 @@ vk_format_table.c: vk_format_table.py \
        $(PYTHON2) $(srcdir)/vk_format_table.py $(srcdir)/vk_format_layout.csv > $@
 
 BUILT_SOURCES = $(VULKAN_GENERATED_FILES)
-CLEANFILES = $(BUILT_SOURCES) dev_icd.json radv_timestamp.h
+CLEANFILES = $(BUILT_SOURCES) dev_icd.json radeon_icd.@host_cpu@.json
 EXTRA_DIST = \
        $(top_srcdir)/include/vulkan/vk_icd.h \
        dev_icd.json.in \
@@ -155,7 +155,7 @@ libvulkan_radeon_la_LDFLAGS = \
 
 
 icdconfdir = @VULKAN_ICD_INSTALL_DIR@
-icdconf_DATA = radeon_icd.json
+icdconf_DATA = radeon_icd.@host_cpu@.json
 # The following is used for development purposes, by setting VK_ICD_FILENAMES.
 noinst_DATA = dev_icd.json
 
@@ -164,4 +164,9 @@ dev_icd.json : dev_icd.json.in
                -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
                < $(srcdir)/dev_icd.json.in > $@
 
+radeon_icd.@host_cpu@.json : radeon_icd.json.in
+       $(AM_V_GEN) $(SED) \
+               -e "s#@install_libdir@#${libdir}#" \
+               < $(srcdir)/radeon_icd.json.in > $@
+
 include $(top_srcdir)/install-lib-links.mk
diff --git a/src/amd/vulkan/radeon_icd.json b/src/amd/vulkan/radeon_icd.json
deleted file mode 100644 (file)
index cbb4aab..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-{
-    "file_format_version": "1.0.0",
-    "ICD": {
-        "library_path": "libvulkan_radeon.so",
-        "api_version": "1.0.3"
-    }
-}
diff --git a/src/amd/vulkan/radeon_icd.json.in b/src/amd/vulkan/radeon_icd.json.in
new file mode 100644 (file)
index 0000000..a8b441d
--- /dev/null
@@ -0,0 +1,7 @@
+{
+    "file_format_version": "1.0.0",
+    "ICD": {
+        "library_path": "@install_libdir@/libvulkan_radeon.so",
+        "api_version": "1.0.3"
+    }
+}