[//gpu] Require WEBGPU_WRITE when passing WEBGPU_MAILBOX_DISCARD This CL enforces the requirement that passing WEBGPU_MAILBOX_DISCARD in AssociateMailbox() requires that the SharedImage being associated has WEBGPU_WRITE usage. The reason is that passing WEBGPU_MAILBOX_DISCARD is a request to lazily clear the texture, which is a write operation. The only callsite that passes WEBGPU_MAILBOX_DISCARD is from the WebGPU swapchain [1], which indeed creates SharedImages with WEBGPU_WRITE usage [2]. [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc;l=221?q=WEBGPU_MAILBOX_DISCARD&sq=&ss=chromium [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/graphics/gpu/webgpu_swap_buffer_provider.cc;l=143-160;drc=41d53a863ef269e6d53fea38cc1d3feda6c3df78;bpv=1;bpt=1 Bug: 339171225 Change-Id: Ieeefbb37f38eb5bcf70c22f9ff4bd29293cb1524 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5526447 Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/main@{#1307325}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.