summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 15f22630c..d6659e707 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -1418,6 +1418,39 @@ SlangResult CodeGenContext::emitWithDownstreamForEntryPoints(ComPtr<IArtifact>&
}
}
+ CapabilitySet targetCaps = getTargetCaps();
+ for (auto atomSets : targetCaps.getAtomSets())
+ {
+ for (auto atomVal : atomSets)
+ {
+ auto atom = CapabilityAtom(atomVal);
+ switch (atom)
+ {
+ default:
+ break;
+
+#define CASE(KIND, NAME, VERSION) \
+ case CapabilityAtom::NAME: \
+ requiredCapabilityVersions.add(DownstreamCompileOptions::CapabilityVersion{ \
+ DownstreamCompileOptions::CapabilityVersion::Kind::KIND, \
+ VERSION}); \
+ break
+
+ CASE(CUDASM, _cuda_sm_1_0, SemanticVersion(1, 0));
+ CASE(CUDASM, _cuda_sm_2_0, SemanticVersion(2, 0));
+ CASE(CUDASM, _cuda_sm_3_0, SemanticVersion(3, 0));
+ CASE(CUDASM, _cuda_sm_4_0, SemanticVersion(4, 0));
+ CASE(CUDASM, _cuda_sm_5_0, SemanticVersion(5, 0));
+ CASE(CUDASM, _cuda_sm_6_0, SemanticVersion(6, 0));
+ CASE(CUDASM, _cuda_sm_7_0, SemanticVersion(7, 0));
+ CASE(CUDASM, _cuda_sm_8_0, SemanticVersion(8, 0));
+ CASE(CUDASM, _cuda_sm_9_0, SemanticVersion(9, 0));
+
+#undef CASE
+ }
+ }
+ }
+
// Set the file sytem and source manager, as *may* be used by downstream compiler
options.fileSystemExt = getFileSystemExt();
options.sourceManager = getSourceManager();