Add the "internal" error type

Currently only raised if Tint produces an Internal Compiler Error
(ICE). These were previously surfaced as validation errors.

Bug: dawn:1531
Change-Id: I9a10549b3e0bc2cbf962c99d157aa6dbe8032a3c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101500
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This commit is contained in:
Brandon Jones
2022-09-07 14:14:14 +00:00
committed by Dawn LUCI CQ
parent d137757a63
commit 567f06849b
3 changed files with 8 additions and 4 deletions

View File

@@ -28,6 +28,8 @@ wgpu::ErrorType ErrorFilterToErrorType(wgpu::ErrorFilter filter) {
return wgpu::ErrorType::Validation;
case wgpu::ErrorFilter::OutOfMemory:
return wgpu::ErrorType::OutOfMemory;
case wgpu::ErrorFilter::Internal:
return wgpu::ErrorType::Internal;
}
UNREACHABLE();
}

View File

@@ -29,7 +29,7 @@ thread_local DeviceBase* tlDevice = nullptr;
void TintICEReporter(const tint::diag::List& diagnostics) {
if (tlDevice) {
tlDevice->HandleError(InternalErrorType::Validation, diagnostics.str().c_str());
tlDevice->HandleError(InternalErrorType::Internal, diagnostics.str().c_str());
}
}