[dawn][frontend] Add pipeline label to context on internal errors
Pipeline compilation is one of the few places where WebGPU is allowed to
have "internal" errors. Make sure we add the pipeline's label to the
context otherwise it can be difficult to know which pipeline caused a
backend compiler error.
Bug: 365378969
Change-Id: I2ec72a0d1af9efd848d1b238e2b34ad8c225fc54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/212897
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/dawn/native/Pipeline.cpp b/src/dawn/native/Pipeline.cpp
index 25a94dd..a5e56a1 100644
--- a/src/dawn/native/Pipeline.cpp
+++ b/src/dawn/native/Pipeline.cpp
@@ -377,7 +377,8 @@
if (!scopedUsePrograms) {
scopedUsePrograms = UseShaderPrograms();
}
- return InitializeImpl();
+ DAWN_TRY_CONTEXT(InitializeImpl(), "initializing %s", this);
+ return {};
}
} // namespace dawn::native