From 3058a5881aa9393573847229f77442d244655292 Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Mon, 10 Mar 2025 15:57:49 -0400 Subject: UseHighestVersion when calling spirv-link (#6559) Precompiled SPIR-V bits can independently resolve to different versions of SPIR-V. To avoid a linker error about mismatched versions, use a linker feature to automatically use the highest version listed in the modules. Fixes #6548 --- source/slang-glslang/slang-glslang.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source') diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp index b3370d803..3dc9b1bd4 100644 --- a/source/slang-glslang/slang-glslang.cpp +++ b/source/slang-glslang/slang-glslang.cpp @@ -997,6 +997,8 @@ extern "C" spvtools::Context context(SPV_ENV_UNIVERSAL_1_5); spvtools::LinkerOptions options = {}; + options.SetUseHighestVersion(true); + spvtools::MessageConsumer consumer = [](spv_message_level_t level, const char* source, const spv_position_t& position, -- cgit v1.2.3