commit | 67ca77db121ffdfe2372ed94d52194702b1d8861 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Tue Aug 20 08:09:38 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Tue Aug 20 08:09:38 2024 +0000 |
tree | 4b32575c073f2096fe151102793e3a672da89768 | |
parent | ae5dd592666efd521c46d400a9f5f533fa6953b7 [diff] |
EncodingContext: Use a Status enum to handle the various states. Following the logic of what's happening in EncodingContext was difficult as there was a mix of booleans, mTopLevelEncoder != nullptr and implicit handling of when EncodingContext was used for an error encoder. Introduce a status enum with the invariant that (mStatus == Open) == (mToplevelEncoder != nullptr) to keep the fast check for ValidateCanEncodeOn (renamed from CheckCurrentEncoder). Adds a constructor for EncodingContext with the ErrorTag that's used in the error constructors of CommandEncoder and RenderBundleEncoder. Removes dawn_unittests expliclty calling EncodingContext::Destroy at random times which forced more complex handling than necessary (Destroy is called only in the top level encoder's DestroyImpl or in ~EncodingContext). Slightly simplify the handling of the acquisition of the CommandIterator as it can only be done once, and can always go through AcquireCommands. Fixup a couple tests for the functional change that now starting a pass on an error CommandEncoder will emit a device error instead of silently failing. Bug: 355308275 Change-Id: I5536f17da10b157c2924372ff499387743e0a485 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/200135 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> 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.