Skip to content

Commit 5e10f1b

Browse files
Tim Foleycsyonghe
Tim Foley
andauthored
Fix a crashing issue for non-end-to-end compilation (shader-slang#1532)
The refactorings that added support for multiple entry points in an output file seemingly introduced a regression such that we crash on compilation that is not "end-to-end." Unfortunately, all of our testing only covers end-to-end compilation, and many users only use that mode. I've added a fix for the issue I ran into, but I haven't addressed the testing gap in this change. Without adding testing for non-end-to-end compilation, I expect further regressions to slip in over time. Co-authored-by: Yong He <yonghe@outlook.com>
1 parent 5534b0d commit 5e10f1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/slang/slang-compiler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ SlangResult dissassembleDXILUsingDXC(
12261226
CodeGenTarget sourceTarget = CodeGenTarget::None;
12271227
SourceLanguage sourceLanguage = SourceLanguage::Unknown;
12281228

1229-
PassThroughMode downstreamCompiler = endToEndReq->passThrough;
1229+
PassThroughMode downstreamCompiler = endToEndReq ? endToEndReq->passThrough : PassThroughMode::None;
12301230

12311231
// If we are not in pass through, lookup the default compiler for the emitted source type
12321232
if (downstreamCompiler == PassThroughMode::None)

0 commit comments

Comments
 (0)