clc: use SetUseHighestVersion when linking spirvs

This allows us to link spirvs with different versions.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Jesse Natalie <None>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33286>
This commit is contained in:
Karol Herbst
2025-01-29 16:34:34 +01:00
committed by Marge Bot
parent 6d306f7415
commit fe8a0d3548
2 changed files with 2 additions and 1 deletions

View File

@@ -1883,7 +1883,7 @@ endif
dep_spirv_tools = dependency(
'SPIRV-Tools',
required : with_clc,
version : '>= 2022.1'
version : '>= 2024.1'
)
if dep_spirv_tools.found()
pre_args += '-DHAVE_SPIRV_TOOLS'

View File

@@ -1289,6 +1289,7 @@ clc_link_spirv_binaries(const struct clc_linker_args *args,
context.SetMessageConsumer(msgconsumer);
spvtools::LinkerOptions options;
options.SetAllowPartialLinkage(args->create_library);
options.SetUseHighestVersion(true);
#if defined(HAS_SPIRV_LINK_LLVM_WORKAROUND) && LLVM_VERSION_MAJOR >= 17
options.SetAllowPtrTypeMismatch(true);
#endif