[dawn] ConsumedError: display context on additionalAllowedErrors

additionalAllowedErrors essentially specifies error types that we
surface to the user. Appended context should therefore be shown.

Bug: 42241190
Change-Id: I4828dd28b5a2221e0e65332b2b24080f79c78100
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/230634
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
diff --git a/src/dawn/native/ErrorSink.h b/src/dawn/native/ErrorSink.h
index 54d0ee4..feb34da 100644
--- a/src/dawn/native/ErrorSink.h
+++ b/src/dawn/native/ErrorSink.h
@@ -60,7 +60,7 @@
                                      const Args&... args) {
         if (DAWN_UNLIKELY(maybeError.IsError())) {
             std::unique_ptr<ErrorData> error = maybeError.AcquireError();
-            if (error->GetType() == InternalErrorType::Validation) {
+            if (error->GetType() & (additionalAllowedErrors | InternalErrorType::Validation)) {
                 error->AppendContext(formatStr, args...);
             }
             ConsumeError(std::move(error), additionalAllowedErrors);
@@ -97,7 +97,7 @@
                                      const Args&... args) {
         if (DAWN_UNLIKELY(resultOrError.IsError())) {
             std::unique_ptr<ErrorData> error = resultOrError.AcquireError();
-            if (error->GetType() == InternalErrorType::Validation) {
+            if (error->GetType() & (additionalAllowedErrors | InternalErrorType::Validation)) {
                 error->AppendContext(formatStr, args...);
             }
             ConsumeError(std::move(error), additionalAllowedErrors);