From 4e2cfc95fb02fb47f02b8702494929e7cca3bec7 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 5 Dec 2019 14:54:21 -0500 Subject: 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. --- source/slang/slang.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang.cpp') 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) -- cgit v1.2.3