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 <lionel.g.landwerlin@intel.com>
Fixes: db11165c07 ("intel/cl: switch to SPIRV as shader storage")
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33234>
This commit is contained in:
Lionel Landwerlin
2025-01-27 11:59:20 +02:00
committed by Marge Bot
parent cdae225243
commit 74f57d7267

View File

@@ -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']