diff options
| author | cheneym2 <acheney@nvidia.com> | 2025-03-10 15:57:49 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-10 19:57:49 +0000 |
| commit | 3058a5881aa9393573847229f77442d244655292 (patch) | |
| tree | 0b1acccc7613d3f53601793c7ad0e346e543928e | |
| parent | 5673edfe3602a6585a925dfc555b90f0b68e328d (diff) | |
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
| -rw-r--r-- | source/slang-glslang/slang-glslang.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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, |
