Commit Graph
69 Commits
Author SHA1 Message Date
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
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 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 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
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 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
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 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
Nicolas Silva 10f2d9133a Bug 1878308 - Move the compute pass remoting logic into wgpu bindings. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D200460
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 00db3ed84a Bug 1878308 - Move the compute pass remoting logic into wgpu bindings. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D200460
2024-02-13 04:59:05 +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 9d1e33142f Bug 1878308 - Move the compute pass remoting logic into wgpu bindings. r=webgpu-reviewers,ErichDonGubler
Depends on D200444

Differential Revision: https://phabricator.services.mozilla.com/D200460
2024-02-07 15:53:26 +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
Natalia Csoregi 5ea22ebe90 Backed out 4 changesets (bug 1861985, bug 1860958, bug 1865364) for causing bustage due to CommandEncoder. CLOSED TREE
Backed out changeset 3d6b04449863 (bug 1865364)
Backed out changeset 1e35eb31a789 (bug 1861985)
Backed out changeset e3f53b794c1d (bug 1861985)
Backed out changeset d676e8a3a515 (bug 1860958)
2023-11-22 13:52:44 +02:00
Brad Werth 3861222f6b 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 10:57:57 +00:00
Cristian Tuns 7ecd49983c Backed out 3 changesets (bug 1861985, bug 1860958) for causing build bustages in RefPtr.h CLOSED TREE
Backed out changeset 13f07117425f (bug 1861985)
Backed out changeset 0bdc4c60018e (bug 1861985)
Backed out changeset 5e6f2b2e19c6 (bug 1860958)
2023-11-21 14:07:35 -05:00
Brad Werth a551810dd5 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-21 18:16:25 +00:00
Nicolas Silva 13a39dd541 Bug 1856306 - Crash when an object is created with an invalid ID. r=webgpu-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D189941
2023-10-27 13:06:18 +00:00
Erich Gubler 037c586404 Bug 1828123: refactor(webidl): align args. naming for GPUComputePassEncoder.dispatchWorkgroups with spec. r=webgpu-reviewers,webidl,peterv,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D185097
2023-08-02 13:52:38 +00:00
Jim Blandy acef0c0e7f Bug 1824871: Rename endPass -> end on GPURenderPassEncoder, GPUComputePassEncoder. r=webidl,webgpu-reviewers,teoxoy,smaug
These were renamed in [gpuweb#2560](https://github.com/gpuweb/gpuweb/pull/2560).

Differential Revision: https://phabricator.services.mozilla.com/D173785
2023-04-12 17:52:07 +00:00
Nicolas Silva 711966e43e Bug 1750576 - Avoid passing raw strings in a couple of wgpu bindings entry points. r=emilio
Inspired by emilio's suggestion in the shader module API patch. This tries to be the most straightforward way to go from the strings coming from IPC to the ones consumed by wgpu.

Differential Revision: https://phabricator.services.mozilla.com/D151024
2022-07-08 08:11:39 +00:00
Cristian Tuns 86c321ca45 Backed out 2 changesets (bug 1750576) for causing lint failures and build bustages. CLOSED TREE
Backed out changeset 21ede22c4113 (bug 1750576)
Backed out changeset be7493c6f3cb (bug 1750576)
2022-07-07 10:51:38 -04:00
Nicolas Silva 8b6ccb9427 Bug 1750576 - Avoid passing raw strings in a couple of wgpu bindings entry points. r=emilio
Inspired by emilio's suggestion in the shader module API patch. This tries to be the most straightforward way to go from the strings coming from IPC to the ones consumed by wgpu.

Differential Revision: https://phabricator.services.mozilla.com/D151024
2022-07-07 14:35:29 +00:00
Jim Blandy 6db0be2f20 Bug 1769633: Update wgpu to b51fd851. r=jgilbert
Fix Firefox for compute_pass_dispatch functions renamed upstream.

Remove set_index_buffer ffi functions; they're now in wgpu.

Differential Revision: https://phabricator.services.mozilla.com/D146509
2022-05-17 03:09:07 +00:00
Molnar Sandor 4516f67959 Backed out 2 changesets (bug 1769633) for causing build bustages in jimb/rust/wgpu/wgpu-core. CLOSED TREE
Backed out changeset d7b9bac2ace5 (bug 1769633)
Backed out changeset 82d7d8a51cdd (bug 1769633)
2022-05-17 03:39:06 +03:00
Jim Blandy 869d096dd0 Bug 1769633: Update wgpu to b51fd851. r=jgilbert
Fix Firefox for compute_pass_dispatch functions renamed upstream.

Remove set_index_buffer ffi functions; they're now in wgpu.

Differential Revision: https://phabricator.services.mozilla.com/D146509
2022-05-17 00:26:01 +00:00
Andrew Osmond f6a9d67356 Bug 1768848 - Update GPUComputePassEncoder method names to follow WebGPU spec. r=gfx-reviewers,lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D146072
2022-05-13 10:37:08 +00:00
Norisz Fay 7b92930460 Backed out changeset fcf35978c791 (bug 1768848) for causing build bustages on WebGPUBinding.cpp CLOSED TREE 2022-05-12 18:01:56 +03:00
Andrew Osmond fbdb162b09 Bug 1768848 - Update GPUComputePassEncoder method names to follow WebGPU spec. r=gfx-reviewers,lsalzman,emilio
Differential Revision: https://phabricator.services.mozilla.com/D146072
2022-05-12 14:45:27 +00:00
Kagami Sascha Rosylight 0d99b8af53 Bug 1768189 - Part 41: Apply modernize-concat-nested-namespaces to dom/webgpu/BindGroup.h ... r=andi
Depends on D145776

Differential Revision: https://phabricator.services.mozilla.com/D145777
2022-05-09 20:41:19 +00:00