From fe8a0d35485c77efdb3c4cb6f176f2b3cbe4c65d Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Wed, 29 Jan 2025 16:34:34 +0100 Subject: [PATCH] clc: use SetUseHighestVersion when linking spirvs This allows us to link spirvs with different versions. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Jesse Natalie Part-of: --- meson.build | 2 +- src/compiler/clc/clc_helpers.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 597a32e9c98..27847afb706 100644 --- a/meson.build +++ b/meson.build @@ -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' diff --git a/src/compiler/clc/clc_helpers.cpp b/src/compiler/clc/clc_helpers.cpp index fb2f2fdeb91..62817bbc682 100644 --- a/src/compiler/clc/clc_helpers.cpp +++ b/src/compiler/clc/clc_helpers.cpp @@ -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