summaryrefslogtreecommitdiffstats
path: root/source/compiler-core
diff options
context:
space:
mode:
authorAlexey Panteleev <alpanteleev@nvidia.com>2022-05-16 06:57:49 -0700
committerGitHub <noreply@github.com>2022-05-16 09:57:49 -0400
commit21c3cc8a0a32f277df95be45abcc46642b906207 (patch)
tree572508b0d8a02443b5cd88b030cdd4bfe8caedf8 /source/compiler-core
parent765061a77bcf4fe6300721263cc9e0f25595488d (diff)
Fixed the false successful compile result when the FXC downstream compiler is called with invalid arguments, such as unsupported profile. (#2235)
Diffstat (limited to 'source/compiler-core')
-rw-r--r--source/compiler-core/slang-fxc-compiler.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/compiler-core/slang-fxc-compiler.cpp b/source/compiler-core/slang-fxc-compiler.cpp
index 62113a629..2e78f8aa4 100644
--- a/source/compiler-core/slang-fxc-compiler.cpp
+++ b/source/compiler-core/slang-fxc-compiler.cpp
@@ -299,6 +299,12 @@ SlangResult FXCDownstreamCompiler::compile(const CompileOptions& options, RefPtr
SLANG_ASSERT(SLANG_SUCCEEDED(diagnosticParseRes));
}
+ // If FXC failed, make sure we have an error in the diagnostics
+ if (FAILED(hr))
+ {
+ diagnostics.requireErrorDiagnostic();
+ }
+
// ID3DBlob is compatible with ISlangBlob, so just cast away...
ISlangBlob* slangCodeBlob = (ISlangBlob*)codeBlob.get();