From 74f57d7267d358b31b6646a1e9c847743e79d25a Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Mon, 27 Jan 2025 11:59:20 +0200 Subject: [PATCH] meson: required SPIRV-Tools LLVM workaround on LLVM17+ Otherwise, compiling some of the shaders in src/intel/shaders, we can hit the following message from our internal CLC glue code : "SPIRV-Tools doesn't contain https://github.com/KhronosGroup/SPIRV-Tools/pull/5534" Signed-off-by: Lionel Landwerlin Fixes: db11165c07 ("intel/cl: switch to SPIRV as shader storage") Reviewed-by: Karol Herbst Part-of: --- src/compiler/clc/meson.build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build index c11b707d4ff..743cd236bb5 100644 --- a/src/compiler/clc/meson.build +++ b/src/compiler/clc/meson.build @@ -90,6 +90,9 @@ has_spirv_link_workaround = cpp.has_member( ], dependencies : dep_spirv_tools, ) +if dep_llvm.version().version_compare('>= 17.0') and not has_spirv_link_workaround + error('SPIRV-Tools doesn\'t contain https://github.com/KhronosGroup/SPIRV-Tools/pull/5534\n') +endif if has_spirv_link_workaround _libmesaclc_c_args += ['-DHAS_SPIRV_LINK_LLVM_WORKAROUND=1']