412 Commits

Author SHA1 Message Date
Erich Gubler
c12adce63b Bug 1972160 - fix(webgpu): backport wgpu_hal::vulkan::drm OpenBSD fix for ESR140 a=pascalc
Backports //just// the changes made in [wgpu#7810](https://github.com/gfx-rs/wgpu/pull/7810), but on the current base for WGPU being consumed by ESR 140. The commit hash is anchored forever to the official WGPU repository via [wgpu#7896](https://github.com/gfx-rs/wgpu/pull/7896).

This WGPU change was introduced into Nightly with bug 1974058, among others.

Differential Revision: https://phabricator.services.mozilla.com/D256450
2025-07-09 09:01:52 +00:00
Jim Blandy
e3f0d4317a Bug 1967621: Rename and document wgpu_bindings::server::Global::owner. r=webgpu-reviewers,nical
In `wgpu_bindings::server::Global`, rename the field `owner` to
`webgpu_parent`, and document its type and use.

Differential Revision: https://phabricator.services.mozilla.com/D250362
2025-05-23 00:27:37 +00:00
Jim Blandy
8b7cbf248d Bug 1966553: Update wgpu to upstream 85001b24 (2025-05-13) r=webgpu-reviewers,supply-chain-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D249499
2025-05-18 05:25:23 +00:00
teoxoy
8b6ccc14d7 Bug 1962738 - increase descriptor heap size to 500k r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D248661
2025-05-09 20:37:26 +00:00
Erich Gubler
a5dc51ef94 Bug 1964776 - build(webgpu): update WGPU to 2694b323c89eb2273e1ed879d6b51fe91cde8071 r=webgpu-reviewers,supply-chain-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D248172
2025-05-08 05:55:00 +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
teoxoy
59b80dce34 Bug 1962706 - Change memory budget for_device_loss threshold to 99. r=webgpu-reviewers,ErichDonGubler
We are first dividing the current usage by 100 then multiplying by the threshold. So we could run into a situation where current usage = budget but because we divided by 100 then multiplied by 100, current usage and budget might no longer be equal.

Differential Revision: https://phabricator.services.mozilla.com/D246758
2025-04-28 13:14:26 +00:00
Jim Blandy
42e2d2ba30 Bug 1962269 - Update wgpu to upstream 35f131ff (2025-04-23) r=webgpu-reviewers,glandium,supply-chain-reviewers,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D246498
2025-04-24 02:38:56 +00:00
Erich Gubler
09e57a07b3 Bug 1961411 - build(webgpu): update WGPU to 5304c3ca4a43e78d6a8e3b45d8d3f76216f2c1a6 r=webgpu-reviewers,supply-chain-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D246054
2025-04-24 02:38:55 +00:00
Erich Gubler
a7ba6b3d7e Bug 1959868 - fix(webgpu): re-vendor WGPU to f1c496523ff0aa10c162fd01ad606960e925a5a4 r=webgpu-reviewers,supply-chain-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D245312
2025-04-14 13:01:48 +00:00
Andy Leiserson
5209057988 Bug 1956004 - Part 2: Reduce the amount of data copied by writeTexture r=webgpu-reviewers,perftest-reviewers,nical,sparky
Differential Revision: https://phabricator.services.mozilla.com/D244449
2025-04-11 21:54:24 +00:00
Jim Blandy
47e0e0c8d9 Bug 1958061: Update wgpu to upstream a0dbe5eb (2025-04-09) r=webgpu-reviewers,supply-chain-reviewers,nical,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D245022
2025-04-10 20:39:12 +00:00
Erich Gubler
6f3b669604 Bug 1956123 - build(webgpu): update WGPU to c7c79a0dc9356081a884b5518d1c08ce7a09c7c5 r=webgpu-reviewers,supply-chain-reviewers,nical
Notable WebGPU CTS changes:

- Demotions from tier 2 to tier 3:
	- `webgpu:shader,execution,expression,unary,{i32,u32}_conversion:f32:*` started regressing on Windows.
- Promotions to tier 2 from tier 3:
	- Across all platforms:
		- `webgpu:shader,execution,expression,call,builtin,cross:f32:*`
		- `webgpu:shader,execution,expression,unary,i32_conversion:abstract_float:*`
		- `webgpu:shader,execution,expression,unary,u32_conversion:abstract_float:*`
		- `webgpu:shader,execution,limits:nesting_depth_braces:*`
		- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_copy:*`
		- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_elementwise:*`
		- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_mixed:*`
	- `webgpu:shader,validation,expression,call,builtin,value_constructor:scalar_zero_value:*` was promoted on Linux and Windows, but stays in macOS on account of failing `f16` functionality. My guess is that these failures are also present on the other platforms, but we don't see the because `shader-f16` is not aviailable on our other CI platforms yet.
	- From macOS, completing the set of all platforms passing:
		- `f16` functionality, which, again, was likely not visible on our other CI platforms before:
			- `webgpu:shader,execution,expression,call,builtin,cross:f16:*`
			- `webgpu:shader,validation,decl,override:type:*`
	- `webgpu:api,validation,capability_checks,limits,maxUniformBufferBindingSize:createBindGroup,at_over:*`
	  was promoted on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D243593
2025-04-02 00:36:43 +00:00
Goloman Adrian
12e301b8de Backed out 4 changesets (bug 1956123) for causing build bustages @rust.mk. CLOSED TREE
Backed out changeset ec616284b457 (bug 1956123)
Backed out changeset e8ff5130dbeb (bug 1956123)
Backed out changeset 5d87a43ec676 (bug 1956123)
Backed out changeset c19f3478c904 (bug 1956123)
2025-04-01 05:36:43 +03:00
Erich Gubler
cd9c43ad68 Bug 1956123 - build(webgpu): update WGPU to fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81 r=webgpu-reviewers,supply-chain-reviewers,nical
Notable WebGPU CTS changes:

- Demotions from tier 2 to tier 3:
	- `webgpu:shader,execution,expression,unary,{i32,u32}_conversion:f32:*` started regressing on Windows.
- Promotions to tier 2 from tier 3:
	- Across all platforms:
		- `webgpu:shader,execution,expression,call,builtin,cross:f32:*`
		- `webgpu:shader,execution,expression,unary,i32_conversion:abstract_float:*`
		- `webgpu:shader,execution,expression,unary,u32_conversion:abstract_float:*`
		- `webgpu:shader,execution,limits:nesting_depth_braces:*`
		- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_copy:*`
		- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_elementwise:*`
		- `webgpu:shader,validation,expression,call,builtin,value_constructor:vector_mixed:*`
	- `webgpu:shader,validation,expression,call,builtin,value_constructor:scalar_zero_value:*` was promoted on Linux and Windows, but stays in macOS on account of failing `f16` functionality. My guess is that these failures are also present on the other platforms, but we don't see the because `shader-f16` is not aviailable on our other CI platforms yet.
	- From macOS, completing the set of all platforms passing:
		- `f16` functionality, which, again, was likely not visible on our other CI platforms before:
			- `webgpu:shader,execution,expression,call,builtin,cross:f16:*`
			- `webgpu:shader,validation,decl,override:type:*`
	- `webgpu:api,validation,capability_checks,limits,maxUniformBufferBindingSize:createBindGroup,at_over:*`
	  was promoted on Windows.

Differential Revision: https://phabricator.services.mozilla.com/D243593
2025-04-01 02:13:55 +00:00
Erich Gubler
cb41658e5f Bug 1956403 - style(webgpu): format wgpu_bindings/Cargo.toml with taplo r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D243594
2025-03-31 14:16:01 +00:00
Erich Gubler
3fbaf41140 Bug 1957236 - chore(webgpu): refresh updatebot configuration for wgpu_bindings r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D243589
2025-03-31 13:53:25 +00:00
Erich Gubler
d70e4a92b0 Bug 1956402 - chore(webgpu): remove onboarding commentary in wgpu_bindings/moz.yaml r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D243045
2025-03-26 17:54:22 +00:00
Erich Gubler
d89428603c Bug 1955085 - build(webgpu): update WGPU to c6286791febc64cf8ef054b5356c2669327ef51c r=webgpu-reviewers,supply-chain-reviewers,nical
WRT WebGPU CTS, we have some interesting changes:

- Promotions from tier 3 to tier 2:
	- `webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds:*`
	- All of `webgpu:shader,execution,expression,binary,ai_arithmetic:*` on Windows and Linux.
	- Some of `webgpu:shader,execution,expression,binary,bitwise:*` on Windows and Linux:
		- `…:bitwise_and:*`
		- `…:bitwise_exclusive_or:*`
		- `…:bitwise_or:*`
	- `webgpu:shader,execution,expression,call,builtin,textureStore:out_of_bounds:*`
	- Some of `webgpu:shader,execution,expression,unary,*` on Windows and Linux:
		- `…,ai_assignment:abstract:*`
		- `…,ai_assignment:abstract:*`
		- `…,ai_complement:complement:*`
	- `webgpu:shader,execution,limits:switch_case_selectors:*` on Windows and macOS.
	- `webgpu:shader,execution,limits:workgroup_array_byte_size_override:*` on all but Windows debug.
	- `webgpu:shader,execution,zero_init:compute,zero_init:*` on macOS.
	- `webgpu:shader,validation,expression,access,vector:abstract:*`
	- `webgpu:shader,validation,expression,call,builtin,textureGather:offset_argument,non_const:*` on all but Windows debug.
	- `webgpu:shader,validation,expression,call,builtin,textureSample:offset_argument,non_const:*`
	- `webgpu:shader,validation,expression,call,builtin,textureSampleGrad:offset_argument,non_const:*`
	- Most of `webgpu:shader,validation,statement,switch:*`:
		- `…:case_types_match:*`
		- `…:condition_type_match_case_type:*`
		- `…:parse:*`

- Demotions from tier 2 to tier 3:
	- `webgpu:api,validation,capability_checks,limits,maxColorAttachmentBytesPerSample:beginRenderPass,at_over:*`

- Otherwise notable potential regressions:
	- `webgpu:shader,validation,expression,matrix,mul:overflow_scalar_abstract:*`

Differential Revision: https://phabricator.services.mozilla.com/D242218
2025-03-21 17:32:17 +00:00
Erich Gubler
ab39bc2281 Bug 1955085 - refactor(webgpu): use shorthand field init. in wgpu_bindings::server r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D242214
2025-03-20 18:17:35 +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
Jamie Nicol
8abc58c71f Bug 1948576 - Allow zero-sized webgpu canvases, but emit validation error when attempting to create zero-sized textures. r=webgpu-reviewers,ErichDonGubler
Previously we were enforcing a minimum webgpu canvas size of 1x1. This
was causing the following conformance tests to fail:

  - webgpu:web_platform,canvas,configure:size_zero_after_configure:*
  - webgpu:web_platform,canvas,readbackFromWebGPUCanvas:transferToImageBitmap_zero_size:configure=true

These tests expect a validation error to occur when calling configure()
with a zero-sized canvas, and the readbackFromWebGPUCanvas test
additionally expects transferToImageBitmap() to throw. Neither of these
were occuring.

By allowing the canvas size to be 0x0, we ensure that the snapshotting
code will fail and throw an error. Additionally, we will attempt to
create a 0x0 texture for the swapchain, which the newly added validation
code will prevent and instead raise a validation error.

Differential Revision: https://phabricator.services.mozilla.com/D240748
2025-03-19 08:44:47 +00:00
Erich Gubler
226b121d8d Bug 1953913 - chore(wgpu_bindings): use c string literals r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D241484
2025-03-14 19:48:12 +00:00
Erich Gubler
e5a3946a8a Bug 1953913 - chore(wgpu_bindings): use Rust 2021 edition r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D241483
2025-03-14 19:48:11 +00:00
Erich Gubler
bd3d5b924a Bug 1952126 - chore(webgpu): update WGPU to dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c r=webgpu-reviewers,supply-chain-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D240571
2025-03-12 18:12:03 +00:00
Goloman Adrian
0f121256bd Backed out 3 changesets (bug 1952126) for causing build bustages @rust.mk. CLOSED TREE
Backed out changeset 3ca834a153d2 (bug 1952126)
Backed out changeset ae3227909433 (bug 1952126)
Backed out changeset a5fb79875818 (bug 1952126)
2025-03-07 06:43:51 +02:00
Erich Gubler
fc0670fba5 Bug 1952126 - chore(webgpu): update WGPU to dc02f91ffe1feab8c35d3fdf41f61a62a5004d2c r=webgpu-reviewers,supply-chain-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D240571
2025-03-07 04:11:03 +00:00
sotaro
a3b1c3345a Bug 1951428 - Limit ExternalTextureDMABuf only to Linux r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D240573
2025-03-06 23:51:37 +00:00
Goloman Adrian
98cb43095f Backed out 3 changesets (bug 1952126) for causing build bustages @rust.mk. CLOSED TREE
Backed out changeset fbdd03d1d3f9 (bug 1952126)
Backed out changeset 3d5dd1dc4785 (bug 1952126)
Backed out changeset 7329ea9d5b5b (bug 1952126)
2025-03-07 00:36:08 +02:00
Erich Gubler
d99fc7d8c7 Bug 1952126 - chore(webgpu): update WGPU to cc1e26a7998a371d89fd50edbb015fd6a70c2347 r=webgpu-reviewers,supply-chain-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D240571
2025-03-06 21:10:50 +00:00
Alex Franchuk
ce069a465c Bug 1942129 pt4b - Remove use of RawShmem r=ipc-reviewers,nika,webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D236749
2025-03-04 22:11:11 +00:00
sotaro
1690845843 Bug 1920763 - Add VK_KHR_external_semaphore_fd handling for WebGPU r=gfx-reviewers,webgpu-reviewers,ErichDonGubler
It is necessary to wait external semaphore before consuming WebGPU output without readback.

Differential Revision: https://phabricator.services.mozilla.com/D227329
2025-03-04 00:58:03 +00:00
Butkovits Atila
2406ce261c Backed out 8 changesets (bug 1942129) for causing bustages at SharedMemoryMapping.h. CLOSED TREE
Backed out changeset 8d9053f1c203 (bug 1942129)
Backed out changeset 393e3c507c27 (bug 1942129)
Backed out changeset 8240d353d224 (bug 1942129)
Backed out changeset 8c4cd026b720 (bug 1942129)
Backed out changeset 742634b0d6e9 (bug 1942129)
Backed out changeset d16857f9812f (bug 1942129)
Backed out changeset 7ff7af041ee7 (bug 1942129)
Backed out changeset ef41d9e4c7de (bug 1942129)
2025-03-04 00:43:23 +02:00
Alex Franchuk
57e4ff560c Bug 1942129 pt4b - Remove use of RawShmem r=ipc-reviewers,nika,webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D236749
2025-03-03 19:53:19 +00:00
teoxoy
69ff673feb Bug 1950655 - Update wgpu to revision 93f64dc847a0e6788b17b292ae4d7d59361e3be0. r=webgpu-reviewers,ErichDonGubler,supply-chain-reviewers
WebGPU CTS run: https://treeherder.mozilla.org/jobs?repo=try&revision=02e0b7243aedb87972250504dd6bf64d74ff3f96

I updated the patch with the expectations from that run.

There were some regressions in tier 2:

- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/execution/expression/call/builtin/textureStore/cts.https.html.ini`

  - test path: `webgpu:shader,execution,expression,call,builtin,textureStore:bgra8unorm_swizzle:*`
  - with error: "Error: Unexpected validation error occurred: Shader module creation failed: Parsing error"
  - see: https://treeherder.mozilla.org/logviewer?job_id=496834446&repo=try&lineNumber=3089

- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/call/builtin/value_constructor/cts.https.html.ini`

  - new failures related to vector/matrix constructors with abstract types
  - see: https://treeherder.mozilla.org/logviewer?job_id=496835790&repo=try&lineNumber=2094

There were also a new failures in tier 3 related to abstract types:
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/and_or_xor/cts.https.html.ini`
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/bitwise_shift/cts.https.html.ini`
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/comparison/cts.https.html.ini`
- `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/shader/validation/expression/binary/div_rem/cts.https.html.ini`

Overall, there were lots of new passes related to abstract types and I suspect those new failures were actually false positives previously.

Limit tests at `testing/web-platform/mozilla/meta/webgpu/cts/webgpu/api/validation/capability_checks/limits/` are as noisy as always...

One more try push with all the changes: https://treeherder.mozilla.org/jobs?repo=try&revision=e3b4d3b039ca9e84aa2f4ec0b824c4530f41695d

Differential Revision: https://phabricator.services.mozilla.com/D239942
2025-02-28 08:57:37 +00:00
Erich Gubler
efb4e36af4 Bug 1921084 - feat(webgpu): wire up WGPU's WGSL lang. features to DOM r=webgpu-reviewers,teoxoy
Differential Revision: https://phabricator.services.mozilla.com/D237088
2025-02-19 02:41:39 +00:00
Erich Gubler
a06dab1f5d Bug 1947780 - build(webgpu): update WGPU to 723abcb1d3d182f9a4bf973f02c6da39a4090f23 r=webgpu-reviewers,supply-chain-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D238138
2025-02-18 21:28:29 +00:00
Erich Gubler
3011758fe5 Bug 1943149 - build(webgpu): update WGPU to db896a86d0db0637149d7012bd865059f8783ec3 r=supply-chain-reviewers,webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D236030
2025-02-11 16:05:29 +00:00
sotaro
27f295f394 Bug 1945044 - Call VkImageHandle::destroy() only when its device is active r=webgpu-reviewers,gfx-reviewers,lsalzman,ErichDonGubler
When device is not valid, Global::device_as_hal() causes crash.

Differential Revision: https://phabricator.services.mozilla.com/D236507
2025-02-05 00:01:24 +00:00
sotaro
14e5d5dc22 Bug 1940374 - Readback snapshot when last submitted TextureId is valid r=gfx-reviewers,lsalzman
Store last submitted TextureId in PresentationData for getting front buffer snapshot.

WebGPUParent::RecvQueueSubmit() stores the latest TextureId in the swap chain in PresentationData::LastSubmittedTextureId. To do so, it retrieves the OwnerId from ExternalTexture. Next, get PresentationData from OwnerId.

If readback is required, it is performed synchronously. Its implementation is borrowed from WebGPUParent::RecvSwapChainPresent().

Differential Revision: https://phabricator.services.mozilla.com/D233473
2025-01-23 01:34:30 +00:00
teoxoy
af754ac852 Bug 1941540 - Update wgpu to revision aa7bec65b90028e4db6ec8def8589b52097d92f9. r=webgpu-reviewers,glandium,supply-chain-reviewers,ErichDonGubler,nical
Differential Revision: https://phabricator.services.mozilla.com/D234312
2025-01-20 16:09:05 +00:00
Erich Gubler
f69ca3ad78 Bug 1939731 - fix(webgpu): populate texture resource registry on external texture validation failure r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D234587
2025-01-17 20:25:41 +00:00
sotaro
e26ad3bd5c Bug 1941485 - Change VkImageHandle::destroy() as to use Global and id::DeviceId r=webgpu-reviewers,gfx-reviewers,nical
To destroy vk::Image and vk::DeviceMemory, VkImageHandle::destroy() uses function pointers that were stored during allocating vk::Image and vk::DeviceMemory. But it caused crashes when they were destroyed after destroying Global.

The change stops to store the function pointers.

Differential Revision: https://phabricator.services.mozilla.com/D234133
2025-01-16 00:57:36 +00:00
Erich Gubler
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 <jimb@red-bean.com>

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
sotaro
6ee6dc9f85 Bug 1938849 - Enable ExternalTexture in SwapChain support only when MTLSharedEvent is supported r=webgpu-reviewers,gfx-reviewers,lsalzman,ErichDonGubler
Differential Revision: https://phabricator.services.mozilla.com/D232812
2025-01-09 00:15:22 +00:00
Erich Gubler
22fbcbc9bb Bug 1939787 - refactor(webgpu): wgpu_bindings: migrate typedef to using r=webgpu-reviewers,nical
Differential Revision: https://phabricator.services.mozilla.com/D233210
2025-01-06 16:26:52 +00:00
sotaro
51214a5199 Bug 1937718 - Add TextureUsages::STORAGE_BINDING check before allocating ExternalTexture r=gfx-reviewers,lsalzman
It is invalid to configure a GPUCanvasContext to 'GPUStorageBinding' usage with 'bgra8unorm' format on a GPUDevice with 'bgra8unorm-storage' disabled. When ExternalTexture is used, it is not checked.

Differential Revision: https://phabricator.services.mozilla.com/D232316
2025-01-06 16:18:14 +00:00
sotaro
650e5995d7 Bug 1939213 - Call Global::device_poll() in WebGPUParent::GetFrontBufferSnapshot() when WebGPUParent::RecvSwapChainPresent() does readback r=gfx-reviewers,lsalzman
When WebGPUParent::RecvSwapChainPresent() does readback, there is still pending ReadbackPresentCallback() exists. Since the callback is going to be called by next wgpu_server_queue_submit() or next wgpu_server_poll_all_devices().

Global::device_poll() triggers the ReadbackPresentCallback() if the callback is pending state.

Differential Revision: https://phabricator.services.mozilla.com/D232915
2024-12-27 09:52:15 +00:00