chore: Update wgpu (#34795)

* Update wgpu

0f5f0580e4

Most notable change is https://github.com/gfx-rs/wgpu/pull/6785

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Remove silencing of wgpu logs

I fixed this in upstream: https://github.com/gfx-rs/wgpu/pull/6817

Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: Samson <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Samson 2025-01-02 15:25:33 +01:00 committed by GitHub
parent 3c40a48db5
commit 9e7ab3f8de
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 69 additions and 41 deletions

View file

@ -79,7 +79,6 @@ jobs:
${{ inputs.wpt-args }} ${{ inputs.wpt-args }}
env: env:
GITHUB_CONTEXT: ${{ toJson(github) }} GITHUB_CONTEXT: ${{ toJson(github) }}
RUST_LOG: wgpu_core=off,naga=off
- name: Archive results (filtered) - name: Archive results (filtered)
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
if: ${{ always() }} if: ${{ always() }}

62
Cargo.lock generated
View file

@ -141,7 +141,7 @@ dependencies = [
"ndk-context", "ndk-context",
"ndk-sys 0.6.0+11769913", "ndk-sys 0.6.0+11769913",
"num_enum", "num_enum",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -224,7 +224,7 @@ dependencies = [
"objc-foundation", "objc-foundation",
"objc_id", "objc_id",
"parking_lot", "parking_lot",
"thiserror", "thiserror 1.0.69",
"windows-sys 0.48.0", "windows-sys 0.48.0",
"x11rb", "x11rb",
] ]
@ -665,7 +665,7 @@ dependencies = [
"polling", "polling",
"rustix", "rustix",
"slab", "slab",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -2438,7 +2438,7 @@ dependencies = [
"libc", "libc",
"memchr", "memchr",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -2538,7 +2538,7 @@ checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd"
dependencies = [ dependencies = [
"log", "log",
"presser", "presser",
"thiserror", "thiserror 1.0.69",
"windows", "windows",
] ]
@ -2590,7 +2590,7 @@ dependencies = [
"paste", "paste",
"pin-project-lite", "pin-project-lite",
"smallvec", "smallvec",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -2834,7 +2834,7 @@ dependencies = [
"gstreamer-video-sys", "gstreamer-video-sys",
"libc", "libc",
"once_cell", "once_cell",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -3745,7 +3745,7 @@ dependencies = [
"combine", "combine",
"jni-sys", "jni-sys",
"log", "log",
"thiserror", "thiserror 1.0.69",
"walkdir", "walkdir",
"windows-sys 0.45.0", "windows-sys 0.45.0",
] ]
@ -4483,7 +4483,7 @@ checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0"
[[package]] [[package]]
name = "naga" name = "naga"
version = "23.0.0" version = "23.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d" source = "git+https://github.com/gfx-rs/wgpu?rev=0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93#0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bit-set", "bit-set",
@ -4496,7 +4496,7 @@ dependencies = [
"rustc-hash 1.1.0", "rustc-hash 1.1.0",
"spirv", "spirv",
"termcolor", "termcolor",
"thiserror", "thiserror 2.0.9",
"unicode-xid", "unicode-xid",
] ]
@ -4559,7 +4559,7 @@ dependencies = [
"ndk-sys 0.6.0+11769913", "ndk-sys 0.6.0+11769913",
"num_enum", "num_enum",
"raw-window-handle", "raw-window-handle",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -5763,7 +5763,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43"
dependencies = [ dependencies = [
"getrandom", "getrandom",
"libredox", "libredox",
"thiserror", "thiserror 1.0.69",
] ]
[[package]] [[package]]
@ -6279,7 +6279,7 @@ dependencies = [
"foreign-types 0.3.2", "foreign-types 0.3.2",
"objc", "objc",
"objc-foundation", "objc-foundation",
"thiserror", "thiserror 1.0.69",
"time-point", "time-point",
] ]
@ -6768,7 +6768,7 @@ dependencies = [
"log", "log",
"memmap2", "memmap2",
"rustix", "rustix",
"thiserror", "thiserror 1.0.69",
"wayland-backend", "wayland-backend",
"wayland-client", "wayland-client",
"wayland-csd-frame", "wayland-csd-frame",
@ -7189,7 +7189,16 @@ version = "1.0.69"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
dependencies = [ dependencies = [
"thiserror-impl", "thiserror-impl 1.0.69",
]
[[package]]
name = "thiserror"
version = "2.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc"
dependencies = [
"thiserror-impl 2.0.9",
] ]
[[package]] [[package]]
@ -7203,6 +7212,17 @@ dependencies = [
"syn", "syn",
] ]
[[package]]
name = "thiserror-impl"
version = "2.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]] [[package]]
name = "thread-id" name = "thread-id"
version = "4.2.2" version = "4.2.2"
@ -7645,7 +7665,7 @@ dependencies = [
"rand", "rand",
"rustls", "rustls",
"sha1", "sha1",
"thiserror", "thiserror 1.0.69",
"url", "url",
"utf-8", "utf-8",
] ]
@ -8326,7 +8346,7 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "23.0.1" version = "23.0.1"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d" source = "git+https://github.com/gfx-rs/wgpu?rev=0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93#0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bit-vec", "bit-vec",
@ -8342,7 +8362,7 @@ dependencies = [
"rustc-hash 1.1.0", "rustc-hash 1.1.0",
"serde", "serde",
"smallvec", "smallvec",
"thiserror", "thiserror 2.0.9",
"wgpu-hal", "wgpu-hal",
"wgpu-types", "wgpu-types",
] ]
@ -8350,7 +8370,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-hal" name = "wgpu-hal"
version = "23.0.1" version = "23.0.1"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d" source = "git+https://github.com/gfx-rs/wgpu?rev=0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93#0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93"
dependencies = [ dependencies = [
"android_system_properties", "android_system_properties",
"arrayvec", "arrayvec",
@ -8382,7 +8402,7 @@ dependencies = [
"raw-window-handle", "raw-window-handle",
"rustc-hash 1.1.0", "rustc-hash 1.1.0",
"smallvec", "smallvec",
"thiserror", "thiserror 2.0.9",
"wasm-bindgen", "wasm-bindgen",
"web-sys", "web-sys",
"wgpu-types", "wgpu-types",
@ -8393,7 +8413,7 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "23.0.0" version = "23.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d" source = "git+https://github.com/gfx-rs/wgpu?rev=0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93#0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93"
dependencies = [ dependencies = [
"bitflags 2.6.0", "bitflags 2.6.0",
"js-sys", "js-sys",

View file

@ -155,8 +155,8 @@ webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65" }
webrender_traits = { path = "components/shared/webrender" } webrender_traits = { path = "components/shared/webrender" }
webxr = { git = "https://github.com/servo/webxr" } webxr = { git = "https://github.com/servo/webxr" }
webxr-api = { git = "https://github.com/servo/webxr" } webxr-api = { git = "https://github.com/servo/webxr" }
wgpu-core = { git = "https://github.com/gfx-rs/wgpu", rev = "53f40794f275329a48efc7d1c637c91b8e51327d" } wgpu-core = { git = "https://github.com/gfx-rs/wgpu", rev = "0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93" }
wgpu-types = { git = "https://github.com/gfx-rs/wgpu", rev = "53f40794f275329a48efc7d1c637c91b8e51327d" } wgpu-types = { git = "https://github.com/gfx-rs/wgpu", rev = "0f5f0580e4cb2fd2feac0e8ed7e8d3050e4d9c93" }
windows-sys = "0.59" windows-sys = "0.59"
wr_malloc_size_of = { git = "https://github.com/servo/webrender", branch = "0.65" } wr_malloc_size_of = { git = "https://github.com/servo/webrender", branch = "0.65" }
xi-unicode = "0.3.0" xi-unicode = "0.3.0"

View file

@ -21,6 +21,7 @@ use crate::dom::bindings::reflector::{reflect_dom_object, DomObject, Reflector};
use crate::dom::bindings::root::{Dom, DomRoot}; use crate::dom::bindings::root::{Dom, DomRoot};
use crate::dom::bindings::str::USVString; use crate::dom::bindings::str::USVString;
use crate::dom::globalscope::GlobalScope; use crate::dom::globalscope::GlobalScope;
use crate::dom::gpuconvert::convert_load_op;
use crate::dom::webgpu::gpubuffer::GPUBuffer; use crate::dom::webgpu::gpubuffer::GPUBuffer;
use crate::dom::webgpu::gpucommandbuffer::GPUCommandBuffer; use crate::dom::webgpu::gpucommandbuffer::GPUCommandBuffer;
use crate::dom::webgpu::gpucomputepassencoder::GPUComputePassEncoder; use crate::dom::webgpu::gpucomputepassencoder::GPUComputePassEncoder;
@ -156,15 +157,19 @@ impl GPUCommandEncoderMethods<crate::DomTypeHolder> for GPUCommandEncoder {
let depth_stencil_attachment = descriptor.depthStencilAttachment.as_ref().map(|ds| { let depth_stencil_attachment = descriptor.depthStencilAttachment.as_ref().map(|ds| {
wgpu_com::RenderPassDepthStencilAttachment { wgpu_com::RenderPassDepthStencilAttachment {
depth: wgpu_com::PassChannel { depth: wgpu_com::PassChannel {
load_op: ds.depthLoadOp.as_ref().map(Convert::convert), load_op: ds
.depthLoadOp
.as_ref()
.map(|l| convert_load_op(l, ds.depthClearValue.map(|v| *v))),
store_op: ds.depthStoreOp.as_ref().map(Convert::convert), store_op: ds.depthStoreOp.as_ref().map(Convert::convert),
clear_value: ds.depthClearValue.map(|v| *v),
read_only: ds.depthReadOnly, read_only: ds.depthReadOnly,
}, },
stencil: wgpu_com::PassChannel { stencil: wgpu_com::PassChannel {
load_op: ds.stencilLoadOp.as_ref().map(Convert::convert), load_op: ds
.stencilLoadOp
.as_ref()
.map(|l| convert_load_op(l, Some(ds.stencilClearValue))),
store_op: ds.stencilStoreOp.as_ref().map(Convert::convert), store_op: ds.stencilStoreOp.as_ref().map(Convert::convert),
clear_value: Some(ds.stencilClearValue),
read_only: ds.stencilReadOnly, read_only: ds.stencilReadOnly,
}, },
view: ds.view.id().0, view: ds.view.id().0,
@ -177,14 +182,16 @@ impl GPUCommandEncoderMethods<crate::DomTypeHolder> for GPUCommandEncoder {
.map(|color| -> Fallible<_> { .map(|color| -> Fallible<_> {
Ok(Some(wgpu_com::RenderPassColorAttachment { Ok(Some(wgpu_com::RenderPassColorAttachment {
resolve_target: color.resolveTarget.as_ref().map(|t| t.id().0), resolve_target: color.resolveTarget.as_ref().map(|t| t.id().0),
load_op: color.loadOp.convert(), load_op: convert_load_op(
store_op: color.storeOp.convert(), &color.loadOp,
clear_value: color color
.clearValue .clearValue
.as_ref() .as_ref()
.map(|color| (color).try_convert()) .map(|color| (color).try_convert())
.transpose()? .transpose()?
.unwrap_or_default(), .unwrap_or_default(),
),
store_op: color.storeOp.convert(),
view: color.view.id().0, view: color.view.id().0,
})) }))
}) })

View file

@ -406,12 +406,10 @@ impl Convert<wgt::BlendComponent> for &GPUBlendComponent {
} }
} }
impl Convert<wgpu_com::LoadOp> for &GPULoadOp { pub(crate) fn convert_load_op<T>(load: &GPULoadOp, clear: T) -> wgpu_com::LoadOp<T> {
fn convert(self) -> wgpu_com::LoadOp { match load {
match self {
GPULoadOp::Load => wgpu_com::LoadOp::Load, GPULoadOp::Load => wgpu_com::LoadOp::Load,
GPULoadOp::Clear => wgpu_com::LoadOp::Clear, GPULoadOp::Clear => wgpu_com::LoadOp::Clear(clear),
}
} }
} }

View file

@ -153,6 +153,10 @@ skip = [
# wgpu crates still depend on 1.1.0 # wgpu crates still depend on 1.1.0
"rustc-hash", "rustc-hash",
# wgpu depends on thiserror 2, while rest is still on 1
"thiserror",
"thiserror-impl",
] ]
# github.com organizations to allow git sources for # github.com organizations to allow git sources for