summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-compiler.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2020-03-30 19:23:09 -0400
committerGitHub <noreply@github.com>2020-03-30 23:23:09 +0000
commitea7690558bca71ce3a9453adff4e0135352a352f (patch)
tree3eb983d3f8e6b1c215f6d2818a0f3e793ecb4485 /source/slang/slang-compiler.cpp
parentad5b60c8b5868c69a979779f201748fb7837fdc9 (diff)
CUDA version handling (#1301)
* render feature for CUDA compute model. * Use SemanticVersion type. * Enable CUDA wave tests that require CUDA SM 7.0. Provide mechanism for DownstreamCompiler to specify version numbers. * Enabled wave-equality.slang * Make CUDA SM version major version not just a single digit. * Fix assert. * DownstreamCompiler::Version -> CapabilityVersion
Diffstat (limited to 'source/slang/slang-compiler.cpp')
-rw-r--r--source/slang/slang-compiler.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/slang-compiler.cpp b/source/slang/slang-compiler.cpp
index 7eb5f145b..53a028483 100644
--- a/source/slang/slang-compiler.cpp
+++ b/source/slang/slang-compiler.cpp
@@ -22,6 +22,7 @@
#include "slang-emit.h"
#include "slang-glsl-extension-tracker.h"
+#include "slang-emit-cuda.h"
#include "slang-ir-serialize.h"
@@ -1292,6 +1293,19 @@ SlangResult dissassembleDXILUsingDXC(
SourceResult source;
SLANG_RETURN_ON_FAIL(emitEntryPointSource(slangRequest, entryPointIndex, targetReq, sourceTarget, endToEndReq, source));
+ // Look for the version
+ if (auto cudaTracker = as<CUDAExtensionTracker>(source.extensionTracker))
+ {
+ if (cudaTracker->m_smVersion.isSet())
+ {
+ DownstreamCompiler::CapabilityVersion version;
+ version.kind = DownstreamCompiler::CapabilityVersion::Kind::CUDASM;
+ version.version = cudaTracker->m_smVersion;
+
+ options.requiredCapabilityVersions.add(version);
+ }
+ }
+
options.sourceContents = source.source;
maybeDumpIntermediate(slangRequest, options.sourceContents.getBuffer(), sourceTarget);