New versions of several crates are introduced to third_party/rust, by
changing the versions requested in `gfx/wgpu_bindings/Cargo.toml` and
running `mach vendor rust`:
- `wgpu-core`, `wgpu-hal`, and `wgpu-types`, as used by `wgpu_bindings`
- `naga`, `ash`, and `metal`, as used by the above
These are all exact copies of the upstream sources, at the git
revisions listed in `.cargo/config.in`.
This brings in fixes for some upstream `wgpu` bugs that were fuzzblockers:
- Compute pipelines never freed at runtime, leaking memory #2564https://github.com/gfx-rs/wgpu/issues/2564
- Device::drop doesn't actually free the device when using backend::direct::Context #2563https://github.com/gfx-rs/wgpu/issues/2563
The Firefox sources also needed some adjustments to catch up with
upstream changes:
- The C type `mozilla::webgpu::ffi::WGPUTextureFormat` is now a struct
containing a tag enum and a union, not just an enum. This is needed
for [gfx-rs/wgpu#2477](https://github.com/gfx-rs/wgpu/pull/2477).
(Note that Firefox's `WebGPU.webidl` is behind the current spec,
so even though the newest ASTC texture formats are supported in `wgpu`,
they're not available in Firefox yet.)
- `wgpu` got a new feature, `id32`, which cbindgen needed to be told
about so that it would generate preprocessor-protected code like
this:
#if defined(WGPU_FEATURE_ID32)
typedef uint32_t WGPUNonZeroId;
#endif
#if !defined(WGPU_FEATURE_ID32)
typedef uint64_t WGPUNonZeroId;
#endif
instead of just spitting out two conflicting definitions of
`WGPUNonZeroId`.
- The `wgpu_core::hub::IdentityHandlerFactory` trait's `spawn` method
no longer takes a `min_index` argument. (Our implementations of that
trait never used that argument anyway, so this was easy to
accommodate.)
Differential Revision: https://phabricator.services.mozilla.com/D142779
New versions of several crates are introduced to third_party/rust, by
changing the versions requested in `gfx/wgpu_bindings/Cargo.toml` and
running `mach vendor rust`:
- `wgpu-core`, `wgpu-hal`, and `wgpu-types`, as used by `wgpu_bindings`
- `naga`, `ash`, and `metal`, as used by the above
These are all exact copies of the upstream sources, at the git
revisions listed in `.cargo/config.in`.
This brings in fixes for some upstream `wgpu` bugs that were fuzzblockers:
- Compute pipelines never freed at runtime, leaking memory #2564https://github.com/gfx-rs/wgpu/issues/2564
- Device::drop doesn't actually free the device when using backend::direct::Context #2563https://github.com/gfx-rs/wgpu/issues/2563
The Firefox sources also needed some adjustments to catch up with
upstream changes:
- The C type `mozilla::webgpu::ffi::WGPUTextureFormat` is now a struct
containing a tag enum and a union, not just an enum. This is needed
for [gfx-rs/wgpu#2477](https://github.com/gfx-rs/wgpu/pull/2477).
(Note that Firefox's `WebGPU.webidl` is behind the current spec,
so even though the newest ASTC texture formats are supported in `wgpu`,
they're not available in Firefox yet.)
- `wgpu` got a new feature, `id32`, which cbindgen needed to be told
about so that it would generate preprocessor-protected code like
this:
#if defined(WGPU_FEATURE_ID32)
typedef uint32_t WGPUNonZeroId;
#endif
#if !defined(WGPU_FEATURE_ID32)
typedef uint64_t WGPUNonZeroId;
#endif
instead of just spitting out two conflicting definitions of
`WGPUNonZeroId`.
- The `wgpu_core::hub::IdentityHandlerFactory` trait's `spawn` method
no longer takes a `min_index` argument. (Our implementations of that
trait never used that argument anyway, so this was easy to
accommodate.)
Differential Revision: https://phabricator.services.mozilla.com/D142779
Brings a few important fixes:
- better WGSL support
- Solaris build (1729751)
- crash in "_MTLCommandEncoder dealloc" (1729648)
Differential Revision: https://phabricator.services.mozilla.com/D125103
This update makes wgpu a vendored dependency instead of having it in gfx/wgpu.
## Notes
It relies on https://phabricator.services.mozilla.com/D123157
It has a quirk related to OpenGL ES backend. Previousy, we manually had to disable GL backend
in order to avoid vendoring WASM dependencies in. This time, manual editing is more complicated,
so instead this change adds a few cargo patch lines to point WASM dependencies to dummy projects.
The update also totally removes SPIRV-Cross, since the latest `wgpu` doesn't depend on it any more.
The compiled binary size for Gecko should improve with this.
Differential Revision: https://phabricator.services.mozilla.com/D123153
This PR updates wgpu to the latest and changes the way we pass object descriptors to the GPU process.
Instead of trying to convert them between DOM-CPP-IPDL-FFI-Rust, we now do DOM-FFI-Rust
and serialize them by serde into ipc::ByteBuf objects.
Differential Revision: https://phabricator.services.mozilla.com/D94908
This PR updates wgpu to the latest and changes the way we pass object descriptors to the GPU process.
Instead of trying to convert them between DOM-CPP-IPDL-FFI-Rust, we now do DOM-FFI-Rust
and serialize them by serde into ipc::ByteBuf objects.
Differential Revision: https://phabricator.services.mozilla.com/D94908
This is the logic of tracing the WebGPU API calls at the level of wgpu-core,
serialized into a folder of choosing on the user drive. Traces are extremely portable,
they can be shared (on BugZilla) and then replayed on the developer machine,
which can have a different architecture from the users machine.
The standalone player is introduced in `gfx/wgpu/player`, similar to WebRender's Wrench.
The output dir is controlled by "dom.webgpu.traceDir" pref. No tracing happens if it's empty.
Differential Revision: https://phabricator.services.mozilla.com/D73333
This is the logic of tracing the WebGPU API calls at the level of wgpu-core,
serialized into a folder of choosing on the user drive. Traces are extremely portable,
they can be shared (on BugZilla) and then replayed on the developer machine,
which can have a different architecture from the users machine.
The standalone player is introduced in `gfx/wgpu/player`, similar to WebRender's Wrench.
The output dir is controlled by "dom.webgpu.traceDir" pref. No tracing happens if it's empty.
Differential Revision: https://phabricator.services.mozilla.com/D73333