Remove unnecessary explicit `mfbt::RefPtr` construction from
initializer lists in `dom/webgpu` code. Use `std::move` where
appropriate.
Differential Revision: https://phabricator.services.mozilla.com/D281895
This reverts commit 14b4c8f711.
Revert "Bug 2008734 - fix(webgpu): make early WebGPU feature gating resolve the promise with `null`, instead of rejecting r=webgpu-reviewers,aleiserson"
This reverts commit 0add216197.
This reverts commit bdc2ccc69b.
Revert "Bug 2008734 - fix(webgpu): make early WebGPU feature gating resolve the promise with `null`, instead of rejecting r=webgpu-reviewers,aleiserson"
This reverts commit cdb944ea0d.
This reverts commit da8dbdb93b.
Revert "Bug 1942430 - test(webgpu): re-enable generic workers context test r=webgpu-reviewers,teoxoy"
This reverts commit ebed06c785.
Revert "Bug 1942430 - test(webgpu): work around broken service worker script URLs r=webgpu-reviewers,teoxoy"
This reverts commit 558b5eee30.
Revert "Bug 1942430 - chore(webgpu): hoist and refine patch file justification commentary in CTS `moz.yaml` r=webgpu-reviewers,teoxoy"
This reverts commit 1d9941da4f.
Revert "Bug 1942431 - chore(webgpu): enable in service workers on Nightly and other released platforms r=webgpu-reviewers,dom-worker-reviewers,aleiserson,edenchuang"
This reverts commit 7dcf806634.
Let `mozilla::webgpu::Instance` inherit from `GlobalTeardownObserver`, and
override `DisconnectFromOwner` to zero out references in `WebGPUChild` to
resources parented by the JS global that is being torn down.
Adjust the code that consumes that state to be prepared to find zeroed-out
state.
Since `GlobalTeardownObserver` implements `nsISupports`, replace `Instance`'s
reference counting with a cycle-collection-friendly "native" implementation, and
add a cycle-collection-friendly `QueryInterface`.
Differential Revision: https://phabricator.services.mozilla.com/D263973
Change `mozilla::webgpu::Instance::RequestAdapter` to no longer refuse
to create an adapter in late beta and release builds.
Change `gfxPlatform::InitWebGPUConfig` to no longer force-disable
`mozilla::gfx::Feature::WEBGPU` in late beta and release on all
platforms other than Windows. This means WebGPU no longer appears to
be blocklisted.
This change only means that setting the pref works in late beta and
release builds on Mac, Android, and Linux. The other conditions for
creating an adapter still apply:
- The blocklist must approve (via `gfxVars::AllowWebGPU`).
- The `dom.webgpu.enabled` pref must be true.
- The page's domain must not be listed in the
`dom.webpu.blocked_domains` pref.
In `dom/webgpu/tests/mochitest`:
- Delete `mochitest-disabled.toml` and its sole test
`test_adapter_disabled.html` altogether, as that test exists to
verify the behavior this patch removes.
- Adjust the conditions under which the other mochitests run.
In `testing/web-platform/mozilla/meta/webgpu/__dir__.ini`, don't force
`dom.webgpu.enabled` to be true. The `disabled` key's conditional
already ensures that the webgpu tests will not be run when the pref is
false.
Differential Revision: https://phabricator.services.mozilla.com/D264153
Define a new pref, `dom.webgpu.blocked-domains`, which contains a list
of domain names for which `navigator.gpu.requestAdapter` should always
reject, as if WebGPU were blocklisted.
Use this to block WebGPU on `easyeda.com` and all subdomains, since
Firefox does not yet implement some aspects of WGSL that `easyeda.com`
depends on.
In the pref definition, note the upstream bugs that must be fixed in
order to remove each domain from in the default value.
Differential Revision: https://phabricator.services.mozilla.com/D262053
Define a new pref, `dom.webgpu.blocked-domains`, which contains a list
of domain names for which `navigator.gpu.requestAdapter` should always
reject, as if WebGPU were blocklisted.
Use this to block WebGPU on `easyeda.com` and all subdomains, since
Firefox does not yet implement some aspects of WGSL that `easyeda.com`
depends on.
The following upstream bug tracks the work needed to re-enable WebGPU
for `easyeda.com`: https://github.com/gfx-rs/wgpu/issues/4406
Differential Revision: https://phabricator.services.mozilla.com/D262053
To determine whether this function is enabled we use the annotation
`[Func="mozilla::webgpu::Instance::ExternalTextureEnabled"]`. This
function currently checks the value of a gfxVar, which itself is
determined via a combination of a pref and blocklist status.
Unfortuntely using a gfxVar is problematic in certain tests which may
not have initialized gfxPlatform by the time we generate these bindings.
To avoid this, make this function only check the value of the pref
rather than the gfxVar. As a consequence, in cases where the pref is
enabled but the feature is blocklisted, the function will unfortunately
still be enabled. However, the C++ implementation does still check the
gfxVar value and will throw an error if the feature is blocklisted.
Differential Revision: https://phabricator.services.mozilla.com/D261704
Adds pref dom.webgpu.external-texture.enabled, which is false by
default, to control whether external texture support is enabled.
Additionally, adds a gfx blocklist entry which can override the pref to
disable on platforms with known issues. Block on non-Windows for now.
When support is disabled, either via the pref or blocklist, ensure the
Device.importExternalTexture() function is hidden. Add an additional
check to the C++ implementation as a precaution.
When support is enabled, enable the required wgpu feature.
Differential Revision: https://phabricator.services.mozilla.com/D260991
Adds pref dom.webgpu.external-texture.enabled, which is false by
default, to control whether external texture support is enabled.
Additionally, adds a gfx blocklist entry which can override the pref to
disable on platforms with known issues. Block on non-Windows for now.
When support is disabled, either via the pref or blocklist, ensure the
Device.importExternalTexture() function is hidden. Add an additional
check to the C++ implementation as a precaution.
When support is enabled, enable the required wgpu feature.
Differential Revision: https://phabricator.services.mozilla.com/D260991
Adds pref dom.webgpu.external-texture.enabled, which is false by
default, to control whether external texture support is enabled.
Additionally, adds a gfx blocklist entry which can override the pref to
disable on platforms with known issues. Block on non-Windows for now.
When support is disabled, either via the pref or blocklist, ensure the
Device.importExternalTexture() function is hidden. Add an additional
check to the C++ implementation as a precaution.
When support is enabled, enable the required wgpu feature.
Differential Revision: https://phabricator.services.mozilla.com/D260991
Most changes are automated. Relevant bit is dom/.clang-format. I had to
manually disable clang-format in a few places where importing external
files and so on that aren't self-contained, and fix a couple includes /
forward declarations.
Differential Revision: https://phabricator.services.mozilla.com/D256800
This reverts commit 22fb6f2691.
Revert "Bug 1975714 - Update backlog expectations. r=webgpu-reviewers,nical"
This reverts commit 72b4644a09.
Revert "Bug 1975714 - Use `MOZ_CAN_RUN_SCRIPT_BOUNDARY` for `reportCompilationMessagesToConsole`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit 4394625f93.
Revert "Bug 1975714 - Assert that the IDs in server messages are the same as the ones the `WebGPUChild` actor expects. r=webgpu-reviewers,nical"
This reverts commit 5ce8cf9b12.
Revert "Bug 1978369 - Stop leaking queues. r=webgpu-reviewers,nical"
This reverts commit 32ab875eab.
Revert "Bug 1975714 - Move remaining ID creation/destruction into resource creation/destruction functions. r=webgpu-reviewers,nical"
This reverts commit 122e1a6529.
Revert "Bug 1975714 - Replace uses of `make_slice` with `FfiSlice`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit 62add844bf.
Revert "Bug 1975714 - Use `FfiSlice` in remaining places. r=webgpu-reviewers,ErichDonGubler"
This reverts commit 3812af72dd.
Revert "Bug 1975714 - Use an opaque pointer for `WebGPUParent`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit bf83ea6553.
Revert "Bug 1975714 - Remove unneeded `#[allow(dead_code)]`. r=webgpu-reviewers,ErichDonGubler"
This reverts commit a84b40d4b8.
Revert "Bug 1977861 - Stop leaking BGLs returned by GPUPipelineBase.getBindGroupLayout(). r=webgpu-reviewers,ErichDonGubler"
This reverts commit b5ec027bf9.
Revert "Bug 1975714 - Turn function pointers into extern fns. r=webgpu-reviewers,nical"
This reverts commit d3681b7012.
Revert "Bug 1975714 - Make sure to resolve/reject all pending promises in `ClearActorState`. r=webgpu-reviewers,nical"
This reverts commit 2f607174ce.
Revert "Bug 1975714 - Do not immediately resolve the lost promise on `device.destroy()`. r=webgpu-reviewers,nical"
This reverts commit 1c10e1f698.
Revert "Bug 1960399 - Reject async pipeline creation with `GPUPipelineError`. r=webgpu-reviewers,nical"
This reverts commit ee47165e63.
Revert "Bug 1975714 - Correct comments. r=webgpu-reviewers,nical"
This reverts commit 9e0aabda0e.
Make IDL available in all contexts. Limit adapters to content, dedicated
workers, and shared workers; basically everything but service workers,
which is blocked on bug 1942431.
Differential Revision: https://phabricator.services.mozilla.com/D253924