File tree 3 files changed +15
-0
lines changed
3 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2049,6 +2049,7 @@ namespace Slang
2049
2049
m_program);
2050
2050
backEndRequest->shouldDumpIR =
2051
2051
(m_targetReq->getTargetFlags () & SLANG_TARGET_FLAG_DUMP_IR) != 0 ;
2052
+ backEndRequest->shouldDumpIntermediates = m_targetReq->shouldDumpIntermediates ();
2052
2053
2053
2054
return _createEntryPointResult (
2054
2055
entryPointIndex,
Original file line number Diff line number Diff line change @@ -1301,6 +1301,10 @@ namespace Slang
1301
1301
{
1302
1302
lineDirectiveMode = mode;
1303
1303
}
1304
+ void setDumpIntermediates (bool value)
1305
+ {
1306
+ dumpIntermediates = value;
1307
+ }
1304
1308
void addCapability (CapabilityAtom capability);
1305
1309
1306
1310
bool shouldEmitSPIRVDirectly ()
@@ -1313,6 +1317,8 @@ namespace Slang
1313
1317
return (targetFlags & SLANG_TARGET_FLAG_GENERATE_WHOLE_PROGRAM) != 0 ;
1314
1318
}
1315
1319
1320
+ bool shouldDumpIntermediates () { return dumpIntermediates; }
1321
+
1316
1322
Linkage* getLinkage () { return linkage; }
1317
1323
CodeGenTarget getTarget () { return format; }
1318
1324
Profile getTargetProfile () { return targetProfile; }
@@ -1340,6 +1346,7 @@ namespace Slang
1340
1346
List<CapabilityAtom> rawCapabilities;
1341
1347
CapabilitySet cookedCapabilities;
1342
1348
LineDirectiveMode lineDirectiveMode = LineDirectiveMode::Default;
1349
+ bool dumpIntermediates = false ;
1343
1350
};
1344
1351
1345
1352
// / Are we generating code for a D3D API?
Original file line number Diff line number Diff line change @@ -3921,6 +3921,13 @@ void EndToEndCompileRequest::setCompileFlags(SlangCompileFlags flags)
3921
3921
void EndToEndCompileRequest::setDumpIntermediates (int enable)
3922
3922
{
3923
3923
getBackEndReq ()->shouldDumpIntermediates = (enable != 0 );
3924
+
3925
+ // Change all existing targets to use the new setting.
3926
+ auto linkage = getLinkage ();
3927
+ for (auto & target : linkage->targets )
3928
+ {
3929
+ target->setDumpIntermediates (enable != 0 );
3930
+ }
3924
3931
}
3925
3932
3926
3933
void EndToEndCompileRequest::setDumpIntermediatePrefix (const char * prefix)
You can’t perform that action at this time.
0 commit comments