[Mesa-dev] [PATCH v3 13/21] configure.ac, meson: Check for SPIRV-Tools and llvm-spirv

Pierre Moreau pierre.morrow at free.fr
Wed Feb 21 22:50:38 UTC 2018


Signed-off-by: Pierre Moreau <pierre.morrow at free.fr>
---

Notes:
    v3:
    * Bump the required version of SPIRV-Tools to the latest release;
    * Add a dependency on llvm-spirv.

 configure.ac | 10 ++++++++++
 meson.build  |  4 ++++
 2 files changed, 14 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8a9172690a..1d393a5234 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2386,6 +2386,16 @@ AM_CONDITIONAL(HAVE_CLOVER_ICD, test "x$enable_opencl_icd" = xyes)
 AC_SUBST([OPENCL_LIBNAME])
 AC_SUBST([CLANG_RESOURCE_DIR])
 
+AS_IF([test "x$enable_opencl" = xyes], [
+    PKG_CHECK_MODULES([SPIRV_TOOLS], [SPIRV-Tools >= 2018.0])])
+AC_SUBST([SPIRV_TOOLS_CFLAGS])
+AC_SUBST([SPIRV_TOOLS_LIBS])
+
+AS_IF([test "x$enable_opencl" = xyes], [
+    PKG_CHECK_MODULES([LLVM_SPIRV], [llvm-spirv])])
+AC_SUBST([LLVM_SPIRV_CFLAGS])
+AC_SUBST([LLVM_SPIRV_LIBS])
+
 dnl
 dnl Gallium configuration
 dnl
diff --git a/meson.build b/meson.build
index 8cf67b8171..c67bd32d0f 100644
--- a/meson.build
+++ b/meson.build
@@ -596,10 +596,14 @@ if _opencl != 'disabled'
 
   # TODO: alitvec?
   dep_clc = dependency('libclc')
+  dep_spirv_tools = dependency('SPIRV-Tools', version : '>= 2018.0')
+  dep_llvm_spirv = dependency('llvm-spirv')
   with_gallium_opencl = true
   with_opencl_icd = _opencl == 'icd'
 else
   dep_clc = []
+  dep_spirv_tools = []
+  dep_llvm_spirv = []
   with_gallium_opencl = false
   with_gallium_icd = false
 endif
-- 
2.16.2



More information about the mesa-dev mailing list