commit | 35df626efa2ac803d9a578594914d26dc4f27ab6 | [log] [tgz] |
---|---|---|
author | Takahiro <hogehoge@gachapin.jp> | Mon Feb 27 15:14:13 2023 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Feb 27 15:14:13 2023 +0000 |
tree | 27c6a89e92869f640f9d8787f7dd1b6d9097dde5 | |
parent | f61577078011f8c1221fabe922843354c6aa7ce2 [diff] |
Refcount check in Buffer map async in Wire If buffer is released and the external refcount reaches 0 while buffer map state is pending map in Wire, the map async callback is fired with destroyed-before-callback status from the buffer destructor. It is possible to call another MapAsync in the callback. At that time the pointer is still valid because the internal refcount is not 0 yet. The behavior of MapAsync should be undefined if external refcount is 0. This commit adds an assert to check whether external refcount is 0 in Buffer::MapAsync() in Wire. Ending up with assertion error may be reasonable. This commit also adds protected GetRefcount() method to ObjectBase to allow derived classes to check the refcount. bug: dawn:1624 Change-Id: I95411a7be2093ba7bb2bb45b466f17f1ebac0ca9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119961 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.