[clang] [HLSL][Driver] Make vk1.3 the default. (PR #143384)
Nathan Gauër via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 10 06:50:22 PDT 2025
================
@@ -1596,28 +1596,26 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
A->claim();
if (Args.hasArg(options::OPT_spirv)) {
+ const llvm::StringMap<llvm::Triple::SubArchType> ValidTargets = {
+ {"vulkan1.2", llvm::Triple::SPIRVSubArch_v15},
+ {"vulkan1.3", llvm::Triple::SPIRVSubArch_v16}};
llvm::Triple T(TargetTriple);
- T.setArch(llvm::Triple::spirv);
- T.setOS(llvm::Triple::Vulkan);
- // Set specific Vulkan version if applicable.
+ // Set specific Vulkan version. Default to vulkan1.3.
+ auto TargetInfo = ValidTargets.find("vulkan1.3");
----------------
Keenuts wrote:
```suggestion
auto TargetInfo = ValidTargets.find("vulkan1.3");
assert(TargetInfo != ValidTargets.end());
```
https://github.com/llvm/llvm-project/pull/143384
More information about the cfe-commits
mailing list