Commit Graph
112 Commits
Author SHA1 Message Date
Teodor Tanasoaia 902def3633 Bug 2031993 - Update wgpu to revision 0b4bdaf9cea213ce614405a834ff049b9dfba103. r=webgpu-reviewers,supply-chain-reviewers,webidl,smaug,aleiserson
Differential Revision: https://phabricator.services.mozilla.com/D294416
2026-04-17 11:12:13 +00:00
Sylvestre Ledru 9eb1a31a98 Bug 2023419 - Remove Emacs/Vim modelines from dom/ r=emilio,media-playback-reviewers,webidl,padenot
replaced by .editorconfig
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D287843
2026-03-16 21:02:32 +00:00
Erich Gubler 0e264516e3 Bug 1998691 - fix(webgpu): actually track GPURenderPassDescriptor.colorAttachments[].resolveTargets r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D282054
2026-02-07 14:07:31 +00:00
Andy Leiserson 2fdfd6c735 Bug 1980891 - Color attachments should be nullable r=webgpu-reviewers,webidl,smaug,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D280125
2026-01-23 22:57:10 +00:00
Teodor Tanasoaia 03a627fbce Bug 1981225 - Consolidate ID-related logic in ObjectBase. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D261942
2025-08-27 11:22:00 +00:00
agoloman db150f25f2 Revert (Bug 1981187, Bug 1981225) - for causing build bustages RenderBundle.cpp.
This reverts commit cb3f1a84bb.

Revert "Bug 1981225 - Consolidate ID-related logic in `ObjectBase`. r=webgpu-reviewers,ErichDonGubler"

This reverts commit 793a7e81db.
2025-08-26 14:12:22 +00:00
Teodor Tanasoaia 793a7e81db Bug 1981225 - Consolidate ID-related logic in ObjectBase. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D261942
2025-08-26 13:23:27 +00:00
agoloman 167b30ae21 Revert (Bug 1981187, Bug 1981225)- for causing build bustages @RefPtr.h.
This reverts commit 5fb5283ac4.

Revert "Bug 1981225 - Consolidate ID-related logic in `ObjectBase`. r=webgpu-reviewers,ErichDonGubler"

This reverts commit 2d0cd2975f.
2025-08-26 11:18:12 +00:00
Teodor Tanasoaia 2d0cd2975f Bug 1981225 - Consolidate ID-related logic in ObjectBase. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D261942
2025-08-26 10:07:28 +00:00
Jamie Nicol fb77729315 Bug 1979108 - Implement ExternalTexture expiration. r=webgpu-reviewers,media-playback-reviewers,teoxoy,alwu
ExternalTextures imported from HTMLVideoElements get "expired" in the
"automatic expiry task source", which is implemented by scheduling a
stable state task. ExternalTextures imported from VideoFrames get
expired when the VideoFrame is closed.

Keep track of each external texture used by any used bind group when
encoding compute and render passes. When submitting, if any passes
contain expired external textures then raise a validation error.

Currently we always create a new ExternalTexture when
importExternalTexture() is called. When support for reusing previously
imported textures is added, we must ensure they are correctly
"unexpired".

Differential Revision: https://phabricator.services.mozilla.com/D260295
2025-08-12 08:49:36 +00:00
Emilio Cobos Álvarez 791917d8af Bug 1976665 - Sort headers in dom/. r=dom-core,media-playback-reviewers,webrtc-reviewers,dom-storage-reviewers,padenot,janv,smaug,jesup,jib
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
2025-08-05 11:47:34 +00:00
Teodor Tanasoaia c10f7dd0fc Bug 1975714 - Replace uses of make_slice with FfiSlice. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D257749
2025-07-25 16:34:40 +00:00
Teodor Tanasoaia 1dbaf92aec Bug 1975714 - Use FfiSlice in remaining places. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D257748
2025-07-25 16:34:37 +00:00
Sandor Molnar 752f8e9d7d Revert "Bug 1975714 - Promote tests out of backlog. r=webgpu-reviewers,nical" for causing build bustages @ ComputePassEncoder.cpp
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.
2025-07-24 18:02:12 +00:00
Teodor Tanasoaia 62add844bf Bug 1975714 - Replace uses of make_slice with FfiSlice. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D257749
2025-07-24 17:05:38 +00:00
Teodor Tanasoaia 3812af72dd Bug 1975714 - Use FfiSlice in remaining places. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D257748
2025-07-24 17:05:34 +00:00
Erich Gubler f635aecec2 Bug 1976960 - feat(webgpu): allow GPUTextures where GPUTextureViews are allowed r=webgpu-reviewers,webidl,smaug,nical
Changed in spec. upstream by [gpuweb#5228](https://github.com/gpuweb/gpuweb/pull/5228), tested by CTS in [gpuweb/cts#4407](https://github.com/gpuweb/cts/pull/4407) (which is what caused the `FAIL`s removed here to be introduced with bug 1976874).

Differential Revision: https://phabricator.services.mozilla.com/D257054
2025-07-17 04:12:53 +00:00
Andy Leiserson b8dc666d50 Bug 1972921 - Track canvas textures used in bind groups r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D255033
2025-07-02 23:32:43 +00:00
Serban Stanca 5fa41eb1d3 Revert "Bug 1972921 - Track canvas textures used in bind groups r=webgpu-reviewers,nical" for causing reftests failures.
This reverts commit f1ebe8385b.
2025-06-27 23:13:30 +00:00
Andy Leiserson f1ebe8385b Bug 1972921 - Track canvas textures used in bind groups r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D255033
2025-06-27 18:32:44 +00:00
Teodor Tanasoaia 045d762e13 Bug 1968122 - Queue messages in WebGPUChild. r=webgpu-reviewers,profiler-reviewers,canaltinova,nical
Differential Revision: https://phabricator.services.mozilla.com/D253977
2025-06-23 15:17:19 +00:00
Teodor Tanasoaia fffdb292be Bug 1968122 - Remove ReportError message. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253976
2025-06-23 15:17:16 +00:00
Andy Leiserson 97cbee47b1 Bug 1848857 - Track command encoder state and raise some relevant errors r=webgpu-reviewers,ErichDonGubler,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D253591
2025-06-15 00:24:45 +00:00
pstanciu 76e1a396a1 Revert "Bug 1848857 - Track command encoder state and raise some relevant errors r=webgpu-reviewers,ErichDonGubler,teoxoy" for causing non-unified build bustages @ComputePassEncoder.cpp
This reverts commit 8ccb49a491.
2025-06-13 19:37:20 +00:00
Andy Leiserson 8ccb49a491 Bug 1848857 - Track command encoder state and raise some relevant errors r=webgpu-reviewers,ErichDonGubler,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D253591
2025-06-13 18:56:38 +00:00
Teodor Tanasoaia 520c17964f Bug 1970670 - remove GenerateError, only the GPU process should generate errors r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D252688
2025-06-06 19:58:01 +00:00
Teodor Tanasoaia bbd511a722 Bug 1969286 - Mark indirect buffers as used by encoders r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D252158
2025-06-04 09:57:07 +00:00
teoxoy c02d99f385 Bug 1963329 - Update wgpu to revision 9fccdf5cf370fcd104e37a4dc87c5db82cfd0e2b. r=webgpu-reviewers,supply-chain-reviewers,webidl,saschanaz,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D247125
2025-04-30 09:21:24 +00:00
Andy Leiserson 645026db0e Bug 1878804 - Implement the 5-argument overload of setBindGroup r=webgpu-reviewers,ErichDonGubler,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D242961
2025-03-26 23:08:13 +00:00
Erich Gubler e600107e7f Bug 1954725 - remove default value for GPURenderCommandsMixin.set{Index,Vertex}Buffer's size argument r=webgpu-reviewers,webidl,smaug,nical
Differential Revision: https://phabricator.services.mozilla.com/D241987
2025-03-19 20:51:19 +00:00
Erich GublerandJim Blandy fc9ac9cdaf Bug 1939787 - build(webgpu): update WGPU to 5543961a71cc8e5399b696fae3f6aae82c019717 r=glandium,webgpu-reviewers,supply-chain-reviewers,jimb
This migration was non-trivial!

On the WebGPU side, a change in how load and store operations in render
attachments were represented meant that we needed to re-work FFI for
`RenderPassDepthStencilAttachment` and `RenderPassColorAttachment`, with
most of the effort going towards the former. These types, along with
`Option`, needed FFI-friendly replacements for `Option` and the related
types in `wgpu-core`.

There was also some housekeeping done to avoid duplicate dependencies:

* Create `thiserror` shim that downgrades v2 → v1. Otherwise, v2 would
  be brought in by the new WGPU. We can't go in the opposite direction
  yet, because `bitsclient` has code that breaks on upgrade. The next
  patch in this series addresses this, and reverses the direction of the
  shim.
* Also remove the now-unused shim adapting from `cfg_aliases` 0.1 to
  0.2.

Co-Authored-By: Jim Blandy <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D233192
2025-01-10 22:29:56 +00:00
Alexandru Marc 7bd67e126f Backed out 2 changesets (bug 1939787) for causing BR bustages @ rust.mk CLOSED TREE
Backed out changeset 8d3e2a8a98d3 (bug 1939787)
Backed out changeset d2074191b678 (bug 1939787)
2025-01-10 23:47:52 +02:00
Erich Gubler c7b29db5f0 Bug 1939787 - build(webgpu): update WGPU to 5543961a71cc8e5399b696fae3f6aae82c019717 r=glandium,webgpu-reviewers,supply-chain-reviewers,jimb
This migration was non-trivial!

On the WebGPU side, a change in how load and store operations in render
attachments were represented meant that we needed to re-work FFI for
`RenderPassDepthStencilAttachment` and `RenderPassColorAttachment`, with
most of the effort going towards the former. These types, along with
`Option`, needed FFI-friendly replacements for `Option` and the related
types in `wgpu-core`.

There was also some housekeeping done to avoid duplicate dependencies:

* Create `thiserror` shim that downgrades v2 → v1. Otherwise, v2 would
  be brought in by the new WGPU. We can't go in the opposite direction
  yet, because `bitsclient` has code that breaks on upgrade. The next
  patch in this series addresses this, and reverses the direction of the
  shim.
* Also remove the now-unused shim adapting from `cfg_aliases` 0.1 to
  0.2.

Differential Revision: https://phabricator.services.mozilla.com/D233192
2025-01-10 20:15:30 +00:00
Erich Gubler 54430fa96f Bug 1939787 - refactor(webgpu): use struct. init. in ConvertColor r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D233211
2025-01-06 16:26:52 +00:00
Erich Gubler c95bfae1ca Bug 1838729, part 3 - feat(webgpu): add occlusion queries r=webgpu-reviewers,webidl,nical,saschanaz
Expected outcomes from CTS have been adjusted in part 4: D227734

Differential Revision: https://phabricator.services.mozilla.com/D223789
2024-11-06 06:31:13 +00:00
Erich Gubler 4a4147af65 Bug 1838729, part 2 - feat(webgpu): add timestamp queries r=webgpu-reviewers,webidl,nical,saschanaz
Expected outcomes from CTS have been adjusted in part 4: D227734

Differential Revision: https://phabricator.services.mozilla.com/D223788
2024-11-06 06:31:13 +00:00
Brad Werth f3e24d843c Bug 1925398 Part 1: Restore WebGPU encoder cycle collection, fix Cleanup(). r=teoxoy
Cleanup() should not call End(), because doing so exposes us to timing
dependencies on the cycle collection. Specifically, as noted in the
patches for Bug 1907457, cycle collection of encoders and their
resources could result in the resource getting destructed before the
encoder. Bug 1907457 "fixed" that by allowing cycles. This patch instead
fixes it by changing encoder Cleanup() to just tidy up resources and not
attempt to complete the work of the encoder by passing it to wgpu.

This also removes mUsedTextureViews from the RenderBundleEncoder, as it
is unused. RenderBundleEncoders have no reliance on TextureViews.

Differential Revision: https://phabricator.services.mozilla.com/D226200
2024-10-23 22:15:23 +00:00
Brad Werth 9fd4c45a90 Bug 1905383: Make WebGPU encoders not cycle check their subresources. r=webgpu-reviewers,teoxoy
The encoder classes already have strong references to the resources they
rely upon. That is enough to prevent those resources from being
released before the encoder. That's all we need! Including the resources
in cycle checking is just making it possible for the resource and the
encoder to be unlinked in the same cycle, in arbitrary order. That's
dangerous because it's the same outcome as if the encoder didn't have a
strong reference to the resource at all.

Differential Revision: https://phabricator.services.mozilla.com/D225914
2024-10-17 13:43:49 +00:00
Brad Werth 0f23ffb689 Bug 1896843: Make webgpu setBindGroup take an optional bind group, matching spec. r=webidl,webgpu-reviewers,nical,saschanaz,ErichDonGubler
This includes a test that checks that setBindGroup can be passed a null
bindGroup.

Differential Revision: https://phabricator.services.mozilla.com/D223884
2024-09-30 15:08:02 +00:00
Brad Werth b1a7f826f6 Bug 1712963: Simplify mValid handling in some WebGPU classes. r=webgpu-reviewers,nical
Primarily this standardizes ComputePassEncoder, RenderBundleEncoder and
RenderPassEncoder on the "if (!mValid)" pattern for early exits for ffi
functions. It also attempts to make each class have at most two ways to
become invalid:

1) RenderBundleEncoder and RenderPassEncoder can become invalid at
construction time.
2) Those classes and ComputePassEncoder all now have an implementation
of their ::Cleanup method, which is called from the destructor, and the
Cleanup method is responsible for making the object invalid and
releasing internal resources (possibly by calling another method).

Together these changes make it easier to reason about what mValid means
for these classes, and what is the state of their internal resources.

Differential Revision: https://phabricator.services.mozilla.com/D208183
2024-04-23 15:28:22 +00:00
Peter Van der Beken 9e9199880e Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-02 07:50:25 +00:00
Natalia Csoregi 10b9ceb789 Backed out 13 changesets (bug 1640839) for causing bustage on Element.cpp CLOSED TREE
Backed out changeset 179ceb82c9e5 (bug 1640839)
Backed out changeset 73f498a821f0 (bug 1640839)
Backed out changeset dc2d3d0e0365 (bug 1640839)
Backed out changeset ddc989ac0509 (bug 1640839)
Backed out changeset e595bb3feea8 (bug 1640839)
Backed out changeset c85aca04e27f (bug 1640839)
Backed out changeset 98e8e3a4047a (bug 1640839)
Backed out changeset 59ef180517db (bug 1640839)
Backed out changeset af2f5e293662 (bug 1640839)
Backed out changeset 89aa6d9dc598 (bug 1640839)
Backed out changeset 67b722a722f9 (bug 1640839)
Backed out changeset 24a9665c6ced (bug 1640839)
Backed out changeset d93f199385e9 (bug 1640839)
2024-03-01 18:23:08 +02:00
Peter Van der Beken e0fa109cb0 Bug 1640839 - Stop generating a sentinel value at the end of WebIDL enums. r=mccr8,jgilbert,media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D201344
2024-03-01 14:31:15 +00:00
Nicolas Silva 8fe46ddc7b Bug 1878308 - Move the render pass remoting logic into wgpu's bindings. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D200444
2024-02-26 08:31:37 +00:00
Sandor Molnar 04383665ae Backed out 3 changesets (bug 1878308) for causing webgpu failures. CLOSED TREE
Backed out changeset 2887e360adb9 (bug 1878308)
Backed out changeset c5f276e2774d (bug 1878308)
Backed out changeset b3fb55591aa7 (bug 1878308)
2024-02-13 09:00:38 +02:00
Nicolas Silva 29b0e724c2 Bug 1878308 - Move the render pass remoting logic into wgpu's bindings. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D200444
2024-02-13 04:59:04 +00:00
Noemi Erli 4848bd032d Backed out 3 changesets (bug 1878308) for causing wgpu_bindings related build bustages CLOSED TREE
Backed out changeset 330e9b1f94c2 (bug 1878308)
Backed out changeset c4a9d3751619 (bug 1878308)
Backed out changeset 36b086dfbd13 (bug 1878308)
2024-02-07 18:19:30 +02:00
Nicolas Silva 0330f8afca Bug 1878308 - Move the render pass remoting logic into wgpu's bindings. r=webgpu-reviewers,ErichDonGubler
Depends on D200359

Differential Revision: https://phabricator.services.mozilla.com/D200444
2024-02-07 15:53:25 +00:00
Kelsey Gilbert efb53a90f9 Bug 1873503 - Replace Scoped with std::unique_ptr in dom/webgpu. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D198088
2024-01-17 19:19:05 +00:00
Brad Werth 477b5fb8b0 Bug 1861985 - Let the parent process handle validating command encoders. r=webgpu-reviewers,webidl,saschanaz,jimb
This makes sure we never create an invalid (zero) ID after incorrect usage of a command encoder.
It also simplifies the code. The JS object should not do any validaion (per spec) and simply forward the commands to the parent process where all of the validation is done.

Differential Revision: https://phabricator.services.mozilla.com/D192839
2023-11-22 14:15:35 +00:00