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

Francisco Jerez currojerez at riseup.net
Thu Feb 22 19:04:48 UTC 2018


Pierre Moreau <pierre.morrow at free.fr> writes:

>> do we already have an upstream version of both dependencies we could
>> just use? Or do we still need special branches?
>
> For both we can use the master branch of the upstream version. SPIRV-Tools
> validator is still not perfect, but it does already catch issues in OpenCL
> SPIR-V binaries. And llvm-spirv needs to be “rebased” as some commits went
> missing during the update process, but that is not going to impact the API
> used; we can absolutely wait for that to finish before merging the series.
>

Maybe it would make more sense to make these dependencies optional
(since it may take a while for distros to package them) and expose
cl_khr_il_program conditionally only if they are present?

> Pierre
>
>> On Wed, Feb 21, 2018 at 11:50 PM, Pierre Moreau <pierre.morrow at free.fr> wrote:
>> > 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
>> >
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180222/0d62b865/attachment-0001.sig>


More information about the mesa-dev mailing list