summaryrefslogtreecommitdiffstats
path: root/source/slang/slang.cpp
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-12-05 14:54:21 -0500
committerGitHub <noreply@github.com>2019-12-05 14:54:21 -0500
commit4e2cfc95fb02fb47f02b8702494929e7cca3bec7 (patch)
tree305a5efb0decc8248bf04832c4a3f527311be607 /source/slang/slang.cpp
parent138a0c90d7a2d04c58569e1a8f6afa114d3e77e1 (diff)
Added -dump-intermediate-prefix option (#1146)
* * Added ability to name the prefix for intermediates * Allowed paramters after -load-repro - as pretty useful if somewhat risky thing to do (depending on parameters) * Fix issue around setting arbitrary state outside of load-repro.
Diffstat (limited to 'source/slang/slang.cpp')
-rw-r--r--source/slang/slang.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp
index 72014ef77..28e0a358d 100644
--- a/source/slang/slang.cpp
+++ b/source/slang/slang.cpp
@@ -1265,6 +1265,7 @@ BackEndCompileRequest::BackEndCompileRequest(
ComponentType* program)
: CompileRequestBase(linkage, sink)
, m_program(program)
+ , m_dumpIntermediatePrefix("slang-dump-")
{}
EndToEndCompileRequest::EndToEndCompileRequest(
@@ -2880,6 +2881,13 @@ SLANG_API void spSetDumpIntermediates(
Slang::asInternal(request)->getBackEndReq()->shouldDumpIntermediates = enable != 0;
}
+SLANG_API void spSetDumpIntermediatePrefix(
+ SlangCompileRequest* request,
+ const char* prefix)
+{
+ Slang::asInternal(request)->getBackEndReq()->m_dumpIntermediatePrefix = prefix;
+}
+
SLANG_API void spSetLineDirectiveMode(
SlangCompileRequest* request,
SlangLineDirectiveMode mode)