OpenGL backend: implement deferred GL calls If the gl_defer toggle is enabled, defer all GL calls by capturing them in a lambda for later execution, via Quyen's EnqueueGL() infrastructure. For destruction, implement a templated EnqueueDestroyGL(). If called from the destructor, this will get the object's handle immediately and capture that for destruction, or pass the object handle getter to the deferred lambda in case the object creation has also been deferred and the handle is not yet known. The DestroyImpl()'s DestroyReason is used to know which codepath to take. Enable Buffer, Copy, and TextureZeroInit tests with gl_defer on. Enable most Multithread tests with both gl_defer and gl_allow_context_on_multi_threads passes. Multithreaded mapping tests are not enabled on GL, since they are exhibiting some flake and may be exposing a race. Bug: 451928481 Change-Id: I24fa1d8ca885a6bfbb6abefa22dc9cac2733c4e0 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/281095 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Stephen White <senorblanco@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.