commit | 0666b24ec8c7972401f744791d6deebce0db9559 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Wed Nov 13 15:59:25 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Nov 13 15:59:25 2024 +0000 |
tree | 6c98403be9040b67458dcfba59ebbe57cb718ef2 | |
parent | 25aab4d67ae2a26a2e2ab3f7e4b4dc95ceef5615 [diff] |
[dawn] Make EncodingContext::TryEncode fail early on previous errors All encoder calls go through TryEncode that first checks the status of the command encoder before calling the code to actually validate/encode commands. TryEncode did not early-out when an error previously happened. This appeared to work because any error would cause the encoder.Finish() to return an error object, so we would just be encoding useless commands, which is harmless. However RenderPass.End() performs some validation steps and closing the render pass involves multiple steps. If validation failures happened in the middle of them, it would be possible to stay in a partially open state, causing issues where CommandBufferStateTracker is used while partially working. This CL adds a new Status to EncodingContext for ErrorInRecording, such that all future calls to TryEncode early-out. There is some slight complexity because we need to promote ErrorInRecording to Finished to preserve the WebGPU semantics of doing device-errors when encoders are finished. A regression test is added, and two tests updated that fail because they expected errors on invalid encoders to become device errors, which is no longer the case, and more in line with the WebGPU spec. Bug: 377530684 Change-Id: I3a31c6de636ba7cdc63d54a074671bb19a55c9fb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/214195 Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h
that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h
version that Dawn implements.webgpu.h
.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.