Commit Graph

203 Commits

Author SHA1 Message Date
Sylvestre Ledru
98949ee751 Bug 1754767 - Remove duplicate includes r=media-playback-reviewers,padenot
Differential Revision: https://phabricator.services.mozilla.com/D138441
2022-02-11 10:01:15 +00:00
Andrew Osmond
5e0eefe182 Bug 1754556 - Update WebGPU external image resource only after present is complete. r=kvark
This patch ensures that we only update the external image resource for
WebGPU when there has been an actual change for the resource. In order
to guarantee this, we wait for the present to complete, and only then
issue the update. WebRenderBridgeChild::SendResourceUpdates will also
trigger a frame generation if any resources were changed, which means we
don't need to trigger a paint on the frame itself anymore.

Note that we still have a race condition when we write into the
MemoryTextureHost while in PresentCallback, and the renderer thread may
be accessing the pixel data to upload to the GPU.

Differential Revision: https://phabricator.services.mozilla.com/D138349
2022-02-11 01:26:42 +00:00
Andrew Osmond
8170056817 Bug 1754302 - WebGPU should consistently use GetCurrentSerialEventTarget instead of GetMainThreadSerialEventTarget. r=kvark
This is necessary for when WebGPU objects are accessed from a worker
thread instead of the main thread. It should be otherwise a
non-functional change.

Differential Revision: https://phabricator.services.mozilla.com/D138206
2022-02-09 22:01:48 +00:00
Nika Layzell
dabb46c84d Bug 1736371 - Default new actors to be refcounted, r=alwu,media-playback-reviewers,mccr8
The changes to ipdl actors were mechanical, and largely automated using
a script.

Differential Revision: https://phabricator.services.mozilla.com/D137237
2022-02-09 17:29:47 +00:00
Andrew Osmond
8f1c963ed3 Bug 1746538 - Make PWebGPU managed by PCanvasManager. r=kvark
Similar to PWebGL, we want PCanvasManager to manage the PWebGPU
protocol. This will allow us to reuse the machinery that works for both
the main thread, and arbitrary worker threads to create PWebGPU
protocols.

For now, the only owner is still the main thread, so it should work very
similarly as to how it does with PCompositorBridge.

This patch also introduces some quality of life changes, such as making
the protocol ref-counted, and avoiding respinning the wheel for
CanSend() for IPDL actors.

Differential Revision: https://phabricator.services.mozilla.com/D134097
2022-02-02 20:49:23 +00:00
Dzmitry Malyshau
e7c5d38a9a Bug 1751718 - Reject WebGPU device promise on wrong features and limits r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D136770
2022-01-28 00:08:53 +00:00
Dzmitry Malyshau
41f4223223 Bug 1750817 - Fix WebGPU device cleanup r=jimb,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D136502
2022-01-25 05:41:40 +00:00
Andreas Pehrson
077549e08e Bug 1344524 - Change ContextCleanForFrameCapture flag to a Watchable FrameCaptureState. r=jgilbert
This allows the canvas element to be notified when a draw that would trigger
a captureStream-frame to be captured.

Differential Revision: https://phabricator.services.mozilla.com/D136003
2022-01-24 15:31:14 +00:00
Dzmitry Malyshau
00b844026c Bug 1710680 - WebGPU createXxxPipelineAsync implementation r=jimb,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D136521
2022-01-22 15:53:47 +00:00
Dzmitry Malyshau
95579c6443 Bug 1750866 - Omit WebGPU writeTexture checks on the client side r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D136279
2022-01-20 15:17:08 +00:00
Marian-Vasile Laza
5a163a3f13 Backed out changeset 6fb758e73dd9 (bug 1750866) for causing build bustages on Queue.cpp. CLOSED TREE 2022-01-20 06:47:42 +02:00
Dzmitry Malyshau
b756d76e96 Bug 1750866 - Omit WebGPU writeTexture checks on the client side r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D136279
2022-01-20 00:58:39 +00:00
Dzmitry Malyshau
71dcb0b551 WIP: Bug 1747750 - Return null WebGPU adapter r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D135645
2022-01-12 15:34:55 +00:00
Dzmitry Malyshau
a892c28812 Bug 1746312 - Return WebGPU errors from RenderBundle creation r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D134986
2022-01-04 23:04:08 +00:00
Joel Maher
4ace0f4715 Bug 1743907 - remove remaining webrender references in manifests. r=MasterWayZ
Differential Revision: https://phabricator.services.mozilla.com/D134634
2021-12-24 14:06:25 +00:00
Dzmitry Malyshau
870e917d28 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
Randell Jesup
70ee979e37 Bug 1746410: WebGPU cleanup r=kvark
Differential Revision: https://phabricator.services.mozilla.com/D134020
2021-12-16 16:30:37 +00:00
Dzmitry Malyshau
3e51a513a1 Bug 1743667 - Fix GPUSupportedFeatures on WebGPU device r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D133907
2021-12-15 20:31:34 +00:00
Andrew Osmond
8298ac607c Bug 1736177 - Part 6. Refactor WebRender display list building integration. r=kvark,jgilbert
This patch separates out new helper methods that are shared with the
OffscreenCanvas display integration in a later part in this series.
It also standardizes on SupportsWeakPtr/WeakPtr instead of mixing in C++
standard library versions.

Differential Revision: https://phabricator.services.mozilla.com/D130782
2021-12-10 02:57:53 +00:00
Dzmitry Malyshau
0b48a2d1e1 Bug 1743667 - Hook up WebGPU device limits and features r=jgilbert,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D133280
2021-12-10 01:09:04 +00:00
Csoregi Natalia
1c7cae16d7 Backed out 17 changesets (bug 1738971, bug 1736177) for bp-hybrid failures and others. CLOSED TREE
Backed out changeset 828633114de2 (bug 1736177)
Backed out changeset 5be8557c4721 (bug 1736177)
Backed out changeset 49f8b4205a46 (bug 1736177)
Backed out changeset 2610d4464ad5 (bug 1736177)
Backed out changeset 6d6c78c31c28 (bug 1736177)
Backed out changeset d55f1ee88bb9 (bug 1736177)
Backed out changeset bf588f8ffcf1 (bug 1736177)
Backed out changeset 86f6f6d86c6c (bug 1736177)
Backed out changeset f400c75c5829 (bug 1736177)
Backed out changeset 4a34124d5f4e (bug 1736177)
Backed out changeset 70aff7fcd001 (bug 1736177)
Backed out changeset db2347ee8147 (bug 1736177)
Backed out changeset 3dde5ddb65e5 (bug 1738971)
Backed out changeset 894ba6b7b68f (bug 1738971)
Backed out changeset dc4503052cf1 (bug 1738971)
Backed out changeset d9aef3e9797e (bug 1738971)
Backed out changeset 562a1e8e5ac3 (bug 1738971)
2021-12-10 01:13:23 +02:00
Andrew Osmond
01bdbad6ac Bug 1736177 - Part 6. Refactor WebRender display list building integration. r=kvark,jgilbert
This patch separates out new helper methods that are shared with the
OffscreenCanvas display integration in a later part in this series.
It also standardizes on SupportsWeakPtr/WeakPtr instead of mixing in C++
standard library versions.

Differential Revision: https://phabricator.services.mozilla.com/D130782
2021-12-09 19:25:26 +00:00
Dzmitry Malyshau
c4c52fc4b6 WIP: Bug 1622846 - Support WebGPU adapter isFallbackAdapter r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133208
2021-12-08 15:54:26 +00:00
Dzmitry Malyshau
7f7df83147 Bug 1743847 - Throw an exception in WebGPU GetCurrentTexture r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D133143
2021-12-08 15:06:54 +00:00
Dzmitry Malyshau
caaffc3a03 Bug 1622846 - Update wgpu to 28ba9d8 r=jimb,emilio
Update GPUTextureUsage bit names to match upstream.

Differential Revision: https://phabricator.services.mozilla.com/D132058
2021-11-29 21:57:04 +00:00
Csoregi Natalia
9c8715f550 Backed out changeset 9e97159bb402 (bug 1622846) for causing bp-hybrid bustages on WebGPUChild.cpp CLOSED TREE 2021-11-29 21:30:42 +02:00
Dzmitry Malyshau
35ccd380fa Bug 1622846 - Update wgpu to 5f6c067 r=jimb,emilio
Update GPUTextureUsage bit names to match upstream.

Differential Revision: https://phabricator.services.mozilla.com/D132058
2021-11-29 18:37:21 +00:00
sotaro
d184dc0218 Bug 1742739 - Remove HasIntermediateBuffer r=gfx-reviewers,jnicol
HasIntermediateBuffer is always false. It could be removed.

Differential Revision: https://phabricator.services.mozilla.com/D131996
2021-11-28 11:40:16 +00:00
Dzmitry Malyshau
32bd65943c Bug 1740284 - WebGPU: unlock presentation buffers on error r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D131501
2021-11-18 22:13:35 +00:00
Andrew Osmond
3a98545701 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-18 11:44:51 +00:00
Dzmitry Malyshau
56f4d4bdc1 Bug 1730014 - Avoid ASCII intermediate for WGSL shader code r=jgilbert,webidl,emilio
we were doing UTF16 -> ASCII null term -> UTF8, and we were losing information on the way.
Now we go UTF16 -> UTF8 -> UTF8 null term
Also, we no longer accept SPIR-V

Differential Revision: https://phabricator.services.mozilla.com/D125123
2021-09-10 17:19:41 +00:00
Dzmitry Malyshau
5695f517a5 Bug 1726626 - Move gfx/wgpu into a 3rd party dependency r=jgilbert,bholley
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
2021-09-03 16:52:08 +00:00
Iulian Moraru
d7a06601a0 Backed out changeset 089962073382 (bug 1728903) for causing Bp-hybrid bustages on ImageBitmapRenderingContext.cpp. CLOSED TREE 2021-09-03 18:49:32 +03:00
Andrew Osmond
472ab1dfc3 Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-03 12:52:05 +00:00
Noemi Erli
e5f5e8d032 Backed out changeset f12c6a6cd1a5 (bug 1728903) for causing build bustage in TestTextures.cpp CLOSED TREE 2021-09-03 05:16:59 +03:00
Andrew Osmond
4219d92daf Bug 1728903 - Remove plumbing for CanvasLayer and ImageLayer. r=mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D124406
2021-09-03 01:48:17 +00:00
Dzmitry Malyshau
1da5651ba2 Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio
This *mostly* gets us the latest WebIDL API of WebGPU. There is a few limits we are missing, and maybe some things I didn't notice.
But it gets us the new `GPUCanvasContext`, `GPUSupportedLimits`, and `GPUVertexStepMode`.

Differential Revision: https://phabricator.services.mozilla.com/D120764
2021-08-18 14:11:21 +00:00
Brindusan Cristian
1cdd46e3ba Backed out changeset e34f15d5e74d (bug 1622846) for causing linux toolchain build bustages.
CLOSED TREE
2021-08-18 07:58:38 +03:00
Dzmitry Malyshau
6d7cfc6c90 Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio
This *mostly* gets us the latest WebIDL API of WebGPU. There is a few limits we are missing, and maybe some things I didn't notice.
But it gets us the new `GPUCanvasContext`, `GPUSupportedLimits`, and `GPUVertexStepMode`.

Differential Revision: https://phabricator.services.mozilla.com/D120764
2021-08-17 15:22:45 +00:00
Dzmitry Malyshau
cb02e6a3d5 Bug 1723077 - Don't release WebGPU shmem if the channel is closed r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D122658
2021-08-14 06:11:58 +00:00
Kagami Sascha Rosylight
fc9e75a985 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
Noemi Erli
a523fe1ad1 Backed out changeset 3cb3442efede (bug 1622846) for causing Bug 1722702 CLOSED TREE 2021-07-29 20:14:46 +03:00
Dzmitry Malyshau
9963bd1ee1 Bug 1622846 - Update WebGPU API to latest and wgpu-core to 0.9 r=webidl,jgilbert,jimb,emilio
This *mostly* gets us the latest WebIDL API of WebGPU. There is a few limits we are missing, and maybe some things I didn't notice.
But it gets us the new `GPUCanvasContext`, `GPUSupportedLimits`, and `GPUVertexStepMode`.

Differential Revision: https://phabricator.services.mozilla.com/D120764
2021-07-27 22:37:46 +00:00
Dzmitry Malyshau
504ad98a7b Bug 1680377 - Follow-up fixes to WebGPU error scope
addressing post-landing review notes of
https://phabricator.services.mozilla.com/D118741

Differential Revision: https://phabricator.services.mozilla.com/D119654
2021-07-13 01:26:46 +00:00
Dzmitry Malyshau
fd414128b4 Bug 1680377 - WebGPU error scopes r=webidl,emilio
Implements the error scopes - primary way of getting the errors back from WebGPU.
Currently we ignore the filter.

Differential Revision: https://phabricator.services.mozilla.com/D118741
2021-07-08 20:24:12 +00:00
Dzmitry Malyshau
179d3960ce Bug 1713162 - Detect copies into WebGPU swapchain for presentation r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D116132
2021-05-27 17:20:28 +00:00
Dzmitry Malyshau
e827c89a98 Bug 1681765 - Fix accessing implicit WebGPU layouts r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D116033
2021-05-27 15:08:02 +00:00
Dzmitry Malyshau
cee0219fda 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
Dzmitry Malyshau
f1987ffe07 Bug 1711926 - Spew WebGPU validation errors to the console r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D115503
2021-05-22 01:03:00 +00:00
Noemi Erli
f14d163f31 Backed out changeset 5efc966ba9a4 (bug 1711926) for causing assertions in nsContentUtils.cpp 2021-05-21 02:46:09 +03:00