On 2018-05-23 — 15:51, Dylan Baker wrote: > Quoting Pierre Moreau (2018-05-23 14:43:10) > > Signed-off-by: Pierre Moreau <pierre.mor...@free.fr> > > --- > > Changes in: > > - v7: Replace the llvm-spirv repository by the new official > > SPIRV-LLVM-Translator > > > > configure.ac | 18 ++++++++++++++++++ > > meson.build | 8 ++++++++ > > 2 files changed, 26 insertions(+) > > > > diff --git a/configure.ac b/configure.ac > > index 62063c1c8a7..2cb28c283ac 100644 > > --- a/configure.ac > > +++ b/configure.ac > > @@ -2439,6 +2439,24 @@ 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], > > + [have_spirv_tools=yes], [have_spirv_tools=no])]) > > +AC_SUBST([SPIRV_TOOLS_CFLAGS]) > > +AC_SUBST([SPIRV_TOOLS_LIBS]) > > + > > +# LLVMSPIRVLib is available at > > https://github.com/KhronosGroup/SPIRV-LLVM-Translator > > +AS_IF([test "x$enable_opencl" = xyes], [ > > + PKG_CHECK_MODULES([LLVMSPIRVLIB], [LLVMSPIRVLib >= 0.2.1], > > + [have_llvmspirvlib=yes], [have_llvmspirvlib=no])]) > > +AC_SUBST([LLVMSPIRVLIB_CFLAGS]) > > +AC_SUBST([LLVMSPIRVLIB_LIBS]) > > + > > +if test "x$have_spirv_tools" = xyes -o \ > > + "x$have_llvmspirvlib" = xyes; then > > + DEFINES="$DEFINES -DCLOVER_ALLOW_SPIRV" > > +fi > > + > > dnl > > dnl Gallium configuration > > dnl > > diff --git a/meson.build b/meson.build > > index d0cb8961638..3fa24a64676 100644 > > --- a/meson.build > > +++ b/meson.build > > @@ -639,10 +639,18 @@ if _opencl != 'disabled' > > > > # TODO: alitvec? > > dep_clc = dependency('libclc') > > + dep_spirv_tools = dependency('SPIRV-Tools', required : false, version : > > '>= 2018.0') > > +# LLVMSPIRVLib is available at > > https://github.com/KhronosGroup/SPIRV-LLVM-Translator > > The # should line up with the d in dep, I know that vim does the wrong thing > here, I just haven't fixed it yet. > > Also, thank you so much for adding pkg-config support for this. LLVM is a > huge headache > as a dependency because of llvm-config.
The goal for this new version of the project was to have it as an LLVM consumer, so that in can be easily be built against system LLVM or a custom one, and distributed. So pkg-config made sense, especially since I had added not too long before pkg-config support to SPIRV-Tools. > > With that fixed, this patch is: > Reviewed-by: Dylan Baker <dy...@pnwbakers.com> Fixed locally and pushed to a v8 branch (https://github.com/pierremoreau/mesa/tree/clover_spirv_series_v8); thanks for the review. > > > + dep_llvmspirvlib = dependency('LLVMSPIRVLib', required : false, version > > : '>= 0.2.1') > > + if dep_spirv_tools.found() and dep_llvmspirvlib.found() > > + pre_args += '-DCLOVER_ALLOW_SPIRV' > > + endif > > with_gallium_opencl = true > > with_opencl_icd = _opencl == 'icd' > > else > > dep_clc = null_dep > > + dep_spirv_tools = null_dep > > + dep_llvmspirvlib = null_dep > > with_gallium_opencl = false > > with_gallium_icd = false > > endif > > -- > > 2.17.0 > > > > _______________________________________________ > > mesa-dev mailing list > > mesa-dev@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev