summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKristian Høgsberg Kristensen <[email protected]>2016-02-16 23:23:17 -0800
committerKristian Høgsberg Kristensen <[email protected]>2016-02-16 23:23:17 -0800
commitecc67f1aacffd848887a711511772fc3f175279b (patch)
tree624348c7e6b281f5a0a5de0e5a95a2c1fb32737b /src
parent4a2d17f60652f5a57a34d0b099dea95fcda2b362 (diff)
anv: Make driver and icd file installable
Change the name of the .so to libvulkan_intel.so and add an installable icd with the installed paths. Keep the icd file with build-tree paths, but rename to dev_icd.json to make it clear that it's for development purposes.
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/.gitignore3
-rw-r--r--src/vulkan/Makefile.am38
-rw-r--r--src/vulkan/dev_icd.json.in (renamed from src/vulkan/anv_icd.json.in)3
-rw-r--r--src/vulkan/intel_icd.json.in7
4 files changed, 39 insertions, 12 deletions
diff --git a/src/vulkan/.gitignore b/src/vulkan/.gitignore
index 2980dbfece3..40afc2e3989 100644
--- a/src/vulkan/.gitignore
+++ b/src/vulkan/.gitignore
@@ -4,5 +4,6 @@
/anv_entrypoints.h
/wayland-drm-protocol.c
/wayland-drm-client-protocol.h
-/anv_icd.json
+/dev_icd.json
+/intel_icd.json
/gen*_pack.h \ No newline at end of file
diff --git a/src/vulkan/Makefile.am b/src/vulkan/Makefile.am
index 081f6b67682..220bdbf5cec 100644
--- a/src/vulkan/Makefile.am
+++ b/src/vulkan/Makefile.am
@@ -34,7 +34,7 @@ VULKAN_ENTRYPOINT_CPPFLAGS = \
-DVK_USE_PLATFORM_XCB_KHR \
-DVK_USE_PLATFORM_WAYLAND_KHR
-lib_LTLIBRARIES = libvulkan.la
+lib_LTLIBRARIES = libvulkan_intel.la
check_LTLIBRARIES = libvulkan-test.la
@@ -67,7 +67,7 @@ AM_CPPFLAGS = \
-I$(top_builddir)/src/compiler/nir \
-I$(top_builddir)/src/vulkan
-libvulkan_la_CFLAGS = $(CFLAGS) -Wno-override-init
+libvulkan_intel_la_CFLAGS = $(CFLAGS) -Wno-override-init
VULKAN_SOURCES = \
anv_allocator.c \
@@ -111,7 +111,7 @@ libanv_gen7_la_SOURCES = \
gen7_cmd_buffer.c \
gen7_pipeline.c \
gen7_state.c
-libanv_gen7_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=70
+libanv_gen7_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DANV_GENx10=70
libanv_gen75_la_SOURCES = \
genX_cmd_buffer.c \
@@ -119,7 +119,7 @@ libanv_gen75_la_SOURCES = \
gen7_cmd_buffer.c \
gen7_pipeline.c \
gen7_state.c
-libanv_gen75_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=75
+libanv_gen75_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DANV_GENx10=75
libanv_gen8_la_SOURCES = \
genX_cmd_buffer.c \
@@ -127,7 +127,7 @@ libanv_gen8_la_SOURCES = \
gen8_cmd_buffer.c \
gen8_pipeline.c \
gen8_state.c
-libanv_gen8_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=80
+libanv_gen8_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DANV_GENx10=80
libanv_gen9_la_SOURCES = \
genX_cmd_buffer.c \
@@ -135,7 +135,7 @@ libanv_gen9_la_SOURCES = \
gen8_cmd_buffer.c \
gen8_pipeline.c \
gen8_state.c
-libanv_gen9_la_CFLAGS = $(libvulkan_la_CFLAGS) -DANV_GENx10=90
+libanv_gen9_la_CFLAGS = $(libvulkan_intel_la_CFLAGS) -DANV_GENx10=90
if HAVE_EGL_PLATFORM_WAYLAND
BUILT_SOURCES += \
@@ -152,10 +152,10 @@ AM_CPPFLAGS += -I$(top_srcdir)/src/egl/wayland/wayland-drm
VULKAN_SOURCES += \
wayland-drm-protocol.c \
anv_wsi_wayland.c
-libvulkan_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
+libvulkan_intel_la_CFLAGS += -DHAVE_WAYLAND_PLATFORM
endif
-libvulkan_la_SOURCES = \
+libvulkan_intel_la_SOURCES = \
$(VULKAN_SOURCES) \
anv_gem.c
@@ -170,7 +170,7 @@ anv_entrypoints.c : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
CLEANFILES = $(BUILT_SOURCES)
-libvulkan_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \
+libvulkan_intel_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \
$(top_builddir)/src/isl/libisl.la \
$(top_builddir)/src/mesa/drivers/dri/i965/libi965_compiler.la \
../mesa/libmesa.la \
@@ -178,6 +178,26 @@ libvulkan_la_LIBADD = $(WAYLAND_LIBS) -lxcb -lxcb-dri3 \
-lpthread -ldl -lstdc++ \
$(PER_GEN_LIBS)
+libvulkan_intel_la_LDFLAGS = \
+ -module -avoid-version -shared -shrext .so
+
+
+# Generate icd files. It would be nice to just be able to add these to
+# AC_CONFIG_FILES, but @libdir@ typically expands to '${exec_prefix}/lib64',
+# which we can't put in the icd file. When running sed from the Makefile we
+# can use ${libdir}, which expands completely and we avoid putting Makefile
+# variables in the icd file.
+
+icdconfdir=$(sysconfdir)/vulkan/icd.d
+icdconf_DATA = intel_icd.json
+noinst_DATA = dev_icd.json
+
+%.json : %.json.in
+ $(AM_V_GEN) $(SED) \
+ -e "s#@build_libdir@#${abs_top_builddir}/${LIB_DIR}#" \
+ -e "s#@install_libdir@#${libdir}#" < $< > $@
+
+
# Libvulkan with dummy gem. Used for unit tests.
libvulkan_test_la_SOURCES = \
diff --git a/src/vulkan/anv_icd.json.in b/src/vulkan/dev_icd.json.in
index 40de043668b..84920365289 100644
--- a/src/vulkan/anv_icd.json.in
+++ b/src/vulkan/dev_icd.json.in
@@ -1,8 +1,7 @@
{
"file_format_version": "1.0.0",
"ICD": {
- "library_path": "@abs_top_builddir@/@LIB_DIR@/libvulkan.so.0.0.0",
+ "library_path": "@build_libdir@/libvulkan_intel.so",
"abi_versions": "1.0.3"
}
}
-
diff --git a/src/vulkan/intel_icd.json.in b/src/vulkan/intel_icd.json.in
new file mode 100644
index 00000000000..d9b363a9762
--- /dev/null
+++ b/src/vulkan/intel_icd.json.in
@@ -0,0 +1,7 @@
+{
+ "file_format_version": "1.0.0",
+ "ICD": {
+ "library_path": "@install_libdir@/libvulkan_intel.so",
+ "abi_versions": "1.0.3"
+ }
+}