[dawn][native] Add dynamic array mutator validation against GPU races This CL adds the validation that prevents updating a binding while it may still be in use by the GPU. - Keep the pointer to the device in DynamicArrayState as it is used to query ExecutionSerials. - Add a `availableAfter` member to DynamicArrayState::BindingState following the logic in the bindless WebGPU proposal. - Allow passing an "empty" binding to DynamicArrayState::Update() that will mark the slot as used but not put anything in it. - Complete the implementation of BindGroup::Update / RemoveBinding that will call DynamicArrayState. - Add tests for all of the new validation. Some tests have to be end2end tests to make sure queue submission don't complete instantly. Bug: 435317394 Change-Id: Ib0f66e69d0e4caac31cb0ce4e610a12941cd2756 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/274335 Reviewed-by: dan sinclair <dsinclair@chromium.org> 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.