Commit Graph
36 Commits
Author SHA1 Message Date
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
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
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
Dzmitry Malyshau 03ac646a6e Bug 1743668 - WebGPU debug groups r=jimb,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D134018
2021-12-21 14:51:16 +00:00
Kagami Sascha Rosylight 1ace379439 Bug 1723050 - Part 32: Replace typedef by using in dom/webgpu/ r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D121330
2021-08-05 00:11:58 +00:00
Dzmitry Malyshau 2d5c98a492 Bug 1710679 - Implement WebGPU render bundles r=webidl,jgilbert,smaug
Differential Revision: https://phabricator.services.mozilla.com/D114878
2021-05-26 20:30:45 +00:00
Simon Giesecke d4e2af5588 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Dzmitry Malyshau ca64d31330 Bug 1675849 - Use Scoped to wrap WebGPU compute and render passes r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D96300
2020-11-07 14:42:28 +00:00
Dzmitry Malyshau 8e91b80c2b Bug 1622846 - Serialize WebGPU descriptors via Serde for IPC r=jgilbert,webidl,smaug
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
2020-11-07 02:43:09 +00:00
Csoregi Natalia 3d12e4746f Backed out changeset bdd3d7eb5927 (bug 1622846) for linux bustage on gfx/wgpu/wgpu-types/src/lib.rs. CLOSED TREE 2020-11-07 00:48:50 +02:00
Dzmitry Malyshau 16116bbed5 Bug 1622846 - Serialize WebGPU descriptors via Serde for IPC r=jgilbert,webidl,smaug
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
2020-11-06 18:59:27 +00:00
Dzmitry Malyshau 6c4ac4b05b Bug 1654244 - Expose indirect draws and dispatches r=webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D84339
2020-07-21 13:20:18 +00:00
Dzmitry Malyshau a029a663e6 Bug 1617086 - Include WebGPU pass dependencies into CC r=jgilbert
follow-up to D65319

Differential Revision: https://phabricator.services.mozilla.com/D67212
2020-03-18 17:29:51 +00:00
Dzmitry Malyshau 8ecc015f02 Bug 1617086 - Keep WebGPU pass dependencies alive while recording r=jgilbert
Since we switched to "software" pass recording,
`wgpu` no longer keeps references to the objects used when recording a pass.
This means Gecko needs to keep them alive up until the encoding is done.

Differential Revision: https://phabricator.services.mozilla.com/D65319
2020-03-05 03:30:41 +00:00
Dzmitry Malyshau f85b99fbce Bug 1611024 - Turn WebGPU programmable passes into interface mixins r=jgilbert,webidl,bzbarsky
this makes us closer to the upstream spec and removes a bunch of useless code

Differential Revision: https://phabricator.services.mozilla.com/D62377
2020-02-11 03:03:47 +00:00
Dzmitry Malyshau b90ea4e243 Bug 1609175 - WebGPU bind groups and compute pipelines r=jgilbert,webidl,smaug,bzbarsky
Adds support for bind groups and compute pipelines
The end goal of this PR is to run the compute example.

Differential Revision: https://phabricator.services.mozilla.com/D60746
2020-01-24 16:27:09 +00:00
Noemi Erli 496ea2ef0b Backed out changeset 136b3044f6a6 (bug 1609175) for causing build bustages in WebGPUChild.cpp CLOSED TREE 2020-01-24 17:20:31 +02:00
Dzmitry Malyshau a091f4bc8b Bug 1609175 - WebGPU bind groups and compute pipelines r=jgilbert,webidl,smaug,bzbarsky
Adds support for bind groups and compute pipelines
The end goal of this PR is to run the compute example.

Differential Revision: https://phabricator.services.mozilla.com/D60746
2020-01-24 05:05:34 +00:00
Dzmitry Malyshau 71c5646998 Bug 1596128 - WebGPU compute passes r=jgilbert,webidl,bzbarsky
Update third party dependencies
WebGPU command encoder creation
WebGPU CommandBuffer creation and submission
WebGPU Compute pass recording

Differential Revision: https://phabricator.services.mozilla.com/D59896
2020-01-22 07:31:51 +00:00
Dzmitry Malyshau fc2a18d9dc Bug 1581710 - Update WebGPU IDL bindings r=jgilbert,bzbarsky
This mostly updates the bindings to the current state.
No actual logic backing them yet.

*Note*: the IDL does *not* need to be checked for matching the upstream spec precisely at this stage. The upstream is evolving, we just need to update in order to start integrating the implementation. What needs to be checked is - how C++ represents the IDL, esp with regards to derived classes, events, and hierarchies.

The trickiest points, arguably, are:
  - WebGPU -> GPU prefix change
  - the goop for interfaces that are not final

Differential Revision: https://phabricator.services.mozilla.com/D46166
2019-10-02 16:46:03 +00:00
Brindusan Cristian b881db6bb7 Backed out changeset 1ca9b7056c58 (bug 1581710) for mochitest failures at test_enabled.html. CLOSED TREE 2019-10-02 06:04:25 +03:00
Dzmitry Malyshau 312a9f7330 Bug 1581710 - Update WebGPU IDL bindings r=jgilbert,bzbarsky
This mostly updates the bindings to the current state.
No actual logic backing them yet.

*Note*: the IDL does *not* need to be checked for matching the upstream spec precisely at this stage. The upstream is evolving, we just need to update in order to start integrating the implementation. What needs to be checked is - how C++ represents the IDL, esp with regards to derived classes, events, and hierarchies.

The trickiest points, arguably, are:
  - WebGPU -> GPU prefix change
  - the goop for interfaces that are not final

Differential Revision: https://phabricator.services.mozilla.com/D46166
2019-10-02 01:42:07 +00:00