diff options
| author | Yong He <yonghe@outlook.com> | 2023-09-07 16:37:55 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-07 16:37:55 -0700 |
| commit | 818f07558c44c3b7f5618460d20c1374df2f1262 (patch) | |
| tree | 8c0f5ce483428db17c493b351883464a64d49295 /source/slang/slang.cpp | |
| parent | 6804680b7da2133f04513293836f70ff61d03b77 (diff) | |
Fix GLSL output for `gl_ClipDistance` input builtin. (#3193)
* Fix GLSL output for `gl_ClipDistance` input builtin.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index ae008cebb..38ebcccd6 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -5287,11 +5287,17 @@ SlangResult EndToEndCompileRequest::EndToEndCompileRequest::compile() { res = executeActions(); } - catch (const AbortCompilationException&) + catch (const AbortCompilationException& e) { // This situation indicates a fatal (but not necessarily internal) error // that forced compilation to terminate. There should already have been // a diagnostic produced, so we don't need to add one here. + if (getSink()->getErrorCount() == 0) + { + // If for some reason we didn't output any diagnostic, something is + // going wrong, but we want to make sure we at least output something. + getSink()->diagnose(SourceLoc(), Diagnostics::compilationAbortedDueToException, typeid(e).name(), e.Message); + } } catch (const Exception& e) { |
