From cc075b76ee25876135584d31ec650776fcb69166 Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 9 Sep 2021 01:39:03 -0700 Subject: Fix `spSetDumpIntermediates`. (#1931) --- source/slang/slang.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index b6359146c..b79d97331 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -3921,6 +3921,13 @@ void EndToEndCompileRequest::setCompileFlags(SlangCompileFlags flags) void EndToEndCompileRequest::setDumpIntermediates(int enable) { getBackEndReq()->shouldDumpIntermediates = (enable != 0); + + // Change all existing targets to use the new setting. + auto linkage = getLinkage(); + for (auto& target : linkage->targets) + { + target->setDumpIntermediates(enable != 0); + } } void EndToEndCompileRequest::setDumpIntermediatePrefix(const char* prefix) -- cgit v1.2.3