[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

Nathan Gauër via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 3 05:16:55 PST 2024


================
@@ -1328,6 +1331,31 @@ VersionTuple Triple::getDriverKitVersion() const {
   }
 }
 
+VersionTuple Triple::getVulkanVersion() const {
+  if (getArch() != spirv || getOS() != Vulkan)
+    llvm_unreachable("invalid Vulkan SPIR-V triple");
+
+  VersionTuple VulkanVersion = getOSVersion();
+  SubArchType SpirvVersion = getSubArch();
+
+  llvm::DenseMap<VersionTuple, SubArchType> ValidVersionMap = {
----------------
Keenuts wrote:

Shall we have a way to differentiate unsupported vulkan version, and unsupported spirv/vulkan mix?
Or have a longer message saying we only support v1.2+spv1.5 and v1.3+spv1.6?)

https://github.com/llvm/llvm-project/pull/76749


More information about the llvm-commits mailing list