Commit Graph
121 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
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
Erich Gubler 143710e672 Bug 1983820 - fix(webgpu): coerce GPUTextures in GPURenderPassDescriptor.depthStencilAttachment to views properly r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D261679
2025-08-23 03:27:01 +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
Teodor Tanasoaia c36d86d390 Bug 1979701 - Update wgpu to revision 36ae215e9cfb0defb94f889f55edc18c5b87f150. r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D258950
2025-08-06 15:05:38 +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 2ed25cea01 Bug 1975714 - Move remaining ID creation/destruction into resource creation/destruction functions. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D258240
2025-07-25 16:34:44 +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 122e1a6529 Bug 1975714 - Move remaining ID creation/destruction into resource creation/destruction functions. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D258240
2025-07-24 17:05:41 +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
Erich Gubler 85db05c3a7 Bug 1976960 - refactor(webgpu): work with copy of aDesc in CommandEncoder::BeginRenderPass r=webgpu-reviewers,nical
In preparation for remainder of the patch stack, clone `aDesc` so we have a mutable copy. We'll actually mutate it once we start accepting `Texture`s and not just `TextureView`s, which we'll convert in-place to views.

Differential Revision: https://phabricator.services.mozilla.com/D257053
2025-07-17 04:12:50 +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
Teodor Tanasoaia 85589a3719 Bug 1968122 - Move QueueWriteAction into our Message enum. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253960
2025-06-23 15:16:29 +00:00
Teodor Tanasoaia a1ae8babfa Bug 1968122 - Move pass messages into our Message enum. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253959
2025-06-23 15:16:26 +00:00
Teodor Tanasoaia 9d7951a61b Bug 1968122 - Store the device ID inside ErrorBuffer. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253958
2025-06-23 15:16:23 +00:00
Teodor Tanasoaia 1a3d6ceabd Bug 1968122 - Move CommandEncoderFinish into our Message enum. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253957
2025-06-23 15:16:20 +00:00
Teodor Tanasoaia 6bc38dde02 Bug 1968122 - Wrap command encoder actions in Message::CommandEncoder. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253956
2025-06-23 15:16:17 +00:00
Teodor Tanasoaia 34fda53f53 Bug 1968122 - Replace individual Drop/Destroy IPDL messages with our own Message enum. r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D253953
2025-06-23 15:16:09 +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
Andy Leiserson 25dc093f14 Bug 1969027 - Update wgpu to upstream f34dfd9 (2025-05-28) r=webgpu-reviewers,supply-chain-reviewers,webidl,smaug,ErichDonGubler
Includes fix for bug 1959728, add `GPUQueue.copyBufferToBuffer`
overload with optional size and no offsets.

Differential Revision: https://phabricator.services.mozilla.com/D251629
2025-05-29 18:34:03 +00:00
Andy Leiserson 6e3b396e8d Bug 1956004 - Part 1: Fixes for WebGPU CTS image_copy tests r=ErichDonGubler,webgpu-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D244412
2025-04-11 21:54:23 +00:00
Nicolas Silva 95f7f24088 Bug 1923784 - Set the object labels where it was missing. r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D243449
2025-03-31 14:09:45 +00:00
sotaro c30e0f7b83 Bug 1936734 - Fix WebGPU OffscreenCanvas handling r=gfx-reviewers,lsalzman
How to push remote texture was changed several times. OffscreenCanvasDisplayData::mOwnerId is not used anymore.

And OffscreenCanvasDisplayData::mOwnerId blocks WebGPU OffscreenCanvas rendering.

Differential Revision: https://phabricator.services.mozilla.com/D231903
2024-12-12 11:47:57 +00:00
teoxoyandErich Gubler 9111bf40ea Bug 1933492 - Update wgpu to revision 66d51b6059127b81c7385ec3f2d49c3e81f76f0e. r=webgpu-reviewers,supply-chain-reviewers,nical
Co-authored-by: Erich Gubler <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D230946
2024-12-05 11:39:10 +00:00
Goloman Adrian d2a39124c7 Backed out changeset 9b662ae8100d (bug 1933492) for causing build bustages. CLOSED TREE 2024-12-04 13:09:07 +02:00
teoxoyandErich Gubler 5698dd07fe Bug 1933492 - Update wgpu to revision 66d51b6059127b81c7385ec3f2d49c3e81f76f0e. r=webgpu-reviewers,supply-chain-reviewers,nical
Co-authored-by: Erich Gubler <[email protected]>

Differential Revision: https://phabricator.services.mozilla.com/D230946
2024-12-04 10:16:19 +00:00
Erich Gubler d8054006cd Bug 1933328 - refactor(webgpu): handle 2024-08 image copy renames from upstream IDL r=webgpu-reviewers,webidl,teoxoy,emilio
Driven by [gpuweb#4838](https://github.com/gpuweb/gpuweb/pull/4838).

The vast majority of this script was implemented with a Nushell script,
using the `nu` binary and the wonderful `fastmod` tool

```
# Copy-pasted from the OP in [`gpuweb`#4838](https://github.com/gpuweb/gpuweb/pull/4838).
let renames_table = '
Type 	Old 	New 	Used in
dict 	GPUImageDataLayout 	GPUTexelCopyBufferLayout 	"writeTexture,
parent type of ↙"
dict 	GPUImageCopyBuffer 	"GPUTexelCopyBufferInfo
extends ↑" 	T2B, B2T
dict 	GPUImageCopyTexture 	GPUTexelCopyTextureInfo 	T2B, B2T, T2T, writeTexture
dict 	GPUImageCopyTextureTagged 	"GPUCopyExternalImageDestInfo
extends ↑" 	copyExternalImageToTexture
dict 	GPUImageCopyExternalImage 	GPUCopyExternalImageSourceInfo 	copyExternalImageToTexture
union 	GPUImageCopyExternalImageSource 	GPUCopyExternalImageSource 	member of ↖
'

let renames_table = $renames_table
  | from tsv
  | select 'Old ' 'New '
  | rename old new
  | update new { $in | lines | get 0 } # only the first line has the renamed symbol identifier
  | update new { str trim }
  | update old { str trim }
  | sort-by old | reverse # Replace most specific symbol names first (some have the same "word segments" but with fewer segments)

# Rename image APIs.
let rename_paths = [
  ...("dom/webgpu/*.{cpp,h}" | str expand)
  "dom/webidl/WebGPU.webidl"
] | each { glob $in } | flatten

for entry in $renames_table {
  print $'replacing ($entry.old | to nuon) with ($entry.new | to nuon)'
  fastmod --accept-all $'\b($entry.old)' $entry.new ...$rename_paths
}
```

Differential Revision: https://phabricator.services.mozilla.com/D230193
2024-11-27 13:02:13 +00:00
Goloman Adrian 3516520f47 Backed out changeset 08a24ec85517 (bug 1933328) for causing build bustages @ WebGpu. CLOSED TREE 2024-11-27 07:53:52 +02:00
Erich Gubler ff1f5d5729 Bug 1933328 - refactor(webgpu): handle 2024-08 image copy renames from upstream IDL r=webgpu-reviewers,webidl,teoxoy,emilio
Driven by [gpuweb#4838](https://github.com/gpuweb/gpuweb/pull/4838).

The vast majority of this script was implemented with a Nushell script,
using the `nu` binary and the wonderful `fastmod` tool

```
# Copy-pasted from the OP in [`gpuweb`#4838](https://github.com/gpuweb/gpuweb/pull/4838).
let renames_table = '
Type 	Old 	New 	Used in
dict 	GPUImageDataLayout 	GPUTexelCopyBufferLayout 	"writeTexture,
parent type of ↙"
dict 	GPUImageCopyBuffer 	"GPUTexelCopyBufferInfo
extends ↑" 	T2B, B2T
dict 	GPUImageCopyTexture 	GPUTexelCopyTextureInfo 	T2B, B2T, T2T, writeTexture
dict 	GPUImageCopyTextureTagged 	"GPUCopyExternalImageDestInfo
extends ↑" 	copyExternalImageToTexture
dict 	GPUImageCopyExternalImage 	GPUCopyExternalImageSourceInfo 	copyExternalImageToTexture
union 	GPUImageCopyExternalImageSource 	GPUCopyExternalImageSource 	member of ↖
'

let renames_table = $renames_table
  | from tsv
  | select 'Old ' 'New '
  | rename old new
  | update new { $in | lines | get 0 } # only the first line has the renamed symbol identifier
  | update new { str trim }
  | update old { str trim }
  | sort-by old | reverse # Replace most specific symbol names first (some have the same "word segments" but with fewer segments)

# Rename image APIs.
let rename_paths = [
  ...("dom/webgpu/*.{cpp,h}" | str expand)
  "dom/webidl/WebGPU.webidl"
] | each { glob $in } | flatten

for entry in $renames_table {
  print $'replacing ($entry.old | to nuon) with ($entry.new | to nuon)'
  fastmod --accept-all $'\b($entry.old)' $entry.new ...$rename_paths
}
```

Differential Revision: https://phabricator.services.mozilla.com/D230193
2024-11-27 05:14:14 +00:00
Erich Gubler 16daa04f78 Bug 1838729, part 1 - feat(webgpu): add GPUQuerySet APIs r=webgpu-reviewers,webidl,nical,saschanaz
Expected outcomes from CTS have been adjusted in part 4: D227734

Differential Revision: https://phabricator.services.mozilla.com/D223787
2024-11-06 06:31:13 +00:00
Erich Gubler 161f872176 Bug 1847671 - refactor(webgpu): default GPUImageCopyTexture.origin to {} r=webgpu-reviewers,webidl,nical,saschanaz
Differential Revision: https://phabricator.services.mozilla.com/D223898
2024-09-27 13:58:25 +00:00
Brad Werth 277a9ef0bb Bug 1896195: Make CommandEncoder check for bridge existence when ending compute passes and render passes. r=webgpu-reviewers,nical
Because EndComputePass and EndRenderPass are called during cleanup, it's
necessary for the CommandEncoder to check for a non-null bridge. This is
noted as being necessary in dom/webgpu/ObjectModel.h.

Differential Revision: https://phabricator.services.mozilla.com/D210244
2024-05-14 15:03:27 +00:00
Nicolas Silva e411bce9ed Bug 1889873 - Remove IsOpen in favor of CanSend. r=webgpu-reviewers,teoxoy
They are the same and the latter is more self explanatory.
The patch also addresses a couple of Cleanup methods where I forgot to check the bridge pointer.

Differential Revision: https://phabricator.services.mozilla.com/D206785
2024-04-05 15:59:38 +00:00
Nicolas Silva ad4468dee8 Bug 1881518 - Recycle indices again. r=webgpu-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D202433
2024-04-05 07:42:05 +00:00
Erich Gubler 389f35dcff Bug 1883810: fix(webgpu): don't enqueue OffscreenCanvases for presentation
Differential Revision: https://phabricator.services.mozilla.com/D203960
2024-03-13 16:03:11 +00:00
Erich Gubler 5719e0f8a7 Bug 1883810: refactor(webgpu): subvert/targetContext/presentationContext for CommandEncoders r=webgpu-reviewers,jimb
Differential Revision: https://phabricator.services.mozilla.com/D203959
2024-03-13 16:03:11 +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
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