dawn/native: Hook tint ICE up to Dawn assertions
Scream and shout if we ICE in a debug build. Fixed: tint:597 Change-Id: Ie349d314a2ddf518f54df81469e4e14aa16cacda Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114540 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
parent
4cef4362b0
commit
b70d610bae
|
@ -31,6 +31,15 @@ thread_local DeviceBase* tlDevice = nullptr;
|
|||
void TintICEReporter(const tint::diag::List& diagnostics) {
|
||||
if (tlDevice) {
|
||||
tlDevice->HandleError(InternalErrorType::Internal, diagnostics.str().c_str());
|
||||
#if DAWN_ENABLE_ASSERTS
|
||||
for (const tint::diag::Diagnostic& diag : diagnostics) {
|
||||
if (diag.severity >= tint::diag::Severity::InternalCompilerError) {
|
||||
HandleAssertionFailure(
|
||||
diag.source.file ? diag.source.file->path.c_str() : "<unknown>", "",
|
||||
diag.source.range.begin.line, diag.message.c_str());
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue