Skip to content

Commit 3058a58

Browse files
authored
UseHighestVersion when calling spirv-link (shader-slang#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 shader-slang#6548
1 parent 5673edf commit 3058a58

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/slang-glslang/slang-glslang.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,8 @@ extern "C"
997997
spvtools::Context context(SPV_ENV_UNIVERSAL_1_5);
998998
spvtools::LinkerOptions options = {};
999999

1000+
options.SetUseHighestVersion(true);
1001+
10001002
spvtools::MessageConsumer consumer = [](spv_message_level_t level,
10011003
const char* source,
10021004
const spv_position_t& position,

0 commit comments

Comments
 (0)