Backports //just// the changes made in [wgpu#7810](https://github.com/gfx-rs/wgpu/pull/7810), but on the current base for WGPU being consumed by ESR 140. The commit hash is anchored forever to the official WGPU repository via [wgpu#7896](https://github.com/gfx-rs/wgpu/pull/7896). This WGPU change was introduced into Nightly with bug 1974058, among others. Differential Revision: https://phabricator.services.mozilla.com/D256450