summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index d5adae722..5f22f8a23 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -202,6 +202,16 @@ SLANG_NO_THROW void SLANG_MCALL Session::setDownstreamCompilerPrelude(
m_downstreamCompilerPreludes[int(passThrough)] = prelude;
}
+SLANG_NO_THROW void SLANG_MCALL Session::getDownstreamCompilerPrelude(
+ SlangPassThrough inPassThrough,
+ ISlangBlob** outPrelude)
+{
+ PassThroughMode passThrough = PassThroughMode(inPassThrough);
+ SLANG_ASSERT(int(passThrough) > int(PassThroughMode::None) && int(passThrough) < int(PassThroughMode::CountOf));
+
+ *outPrelude = Slang::StringUtil::createStringBlob(m_downstreamCompilerPreludes[int(passThrough)]).detach();
+}
+
SLANG_NO_THROW const char* SLANG_MCALL Session::getBuildTagString()
{
return SLANG_TAG_VERSION;