Update wgpu for supporting TextureView.usage (#34721)

* Update wgpu and add support for TextureView.usage

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

* Update expect

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

* Disable wgpu logging

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

* remove unused wgpu features

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

* new expect

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

* re

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

* Update deny.toml

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 2024-12-21 06:18:27 +01:00 committed by GitHub
parent 1d5aac8875
commit 626ef037f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 102 additions and 1901 deletions

View file

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

29
Cargo.lock generated
View file

@ -798,12 +798,6 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
[[package]]
name = "cfg_aliases"
version = "0.2.1"
@ -3633,7 +3627,6 @@ checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5"
dependencies = [
"equivalent",
"hashbrown",
"serde",
]
[[package]]
@ -4491,18 +4484,17 @@ checksum = "956787520e75e9bd233246045d19f42fb73242759cc57fba9611d940ae96d4b0"
[[package]]
name = "naga"
version = "23.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=4da7c263ed075e5d1ac7ee5640712542830e6330#4da7c263ed075e5d1ac7ee5640712542830e6330"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d"
dependencies = [
"arrayvec",
"bit-set",
"bitflags 2.6.0",
"cfg_aliases 0.1.1",
"cfg_aliases",
"codespan-reporting",
"hexf-parse",
"indexmap",
"log",
"rustc-hash 1.1.0",
"serde",
"spirv",
"termcolor",
"thiserror",
@ -4701,7 +4693,7 @@ checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
dependencies = [
"bitflags 2.6.0",
"cfg-if",
"cfg_aliases 0.2.1",
"cfg_aliases",
"libc",
]
@ -7039,7 +7031,7 @@ version = "0.9.8"
source = "git+https://github.com/servo/surfman?rev=c8d6b4b65aeab739ee7651602e29c8d58ceee123#c8d6b4b65aeab739ee7651602e29c8d58ceee123"
dependencies = [
"bitflags 2.6.0",
"cfg_aliases 0.2.1",
"cfg_aliases",
"cgl",
"cocoa",
"core-foundation 0.9.4",
@ -8323,12 +8315,12 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]]
name = "wgpu-core"
version = "23.0.1"
source = "git+https://github.com/gfx-rs/wgpu?rev=4da7c263ed075e5d1ac7ee5640712542830e6330#4da7c263ed075e5d1ac7ee5640712542830e6330"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d"
dependencies = [
"arrayvec",
"bit-vec",
"bitflags 2.6.0",
"cfg_aliases 0.1.1",
"cfg_aliases",
"document-features",
"indexmap",
"log",
@ -8336,7 +8328,6 @@ dependencies = [
"once_cell",
"parking_lot",
"profiling",
"ron",
"rustc-hash 1.1.0",
"serde",
"smallvec",
@ -8348,7 +8339,7 @@ dependencies = [
[[package]]
name = "wgpu-hal"
version = "23.0.1"
source = "git+https://github.com/gfx-rs/wgpu?rev=4da7c263ed075e5d1ac7ee5640712542830e6330#4da7c263ed075e5d1ac7ee5640712542830e6330"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d"
dependencies = [
"android_system_properties",
"arrayvec",
@ -8357,7 +8348,7 @@ dependencies = [
"bitflags 2.6.0",
"block",
"bytemuck",
"cfg_aliases 0.1.1",
"cfg_aliases",
"core-graphics-types",
"glow",
"glutin_wgl_sys",
@ -8391,7 +8382,7 @@ dependencies = [
[[package]]
name = "wgpu-types"
version = "23.0.0"
source = "git+https://github.com/gfx-rs/wgpu?rev=4da7c263ed075e5d1ac7ee5640712542830e6330#4da7c263ed075e5d1ac7ee5640712542830e6330"
source = "git+https://github.com/gfx-rs/wgpu?rev=53f40794f275329a48efc7d1c637c91b8e51327d#53f40794f275329a48efc7d1c637c91b8e51327d"
dependencies = [
"bitflags 2.6.0",
"js-sys",
@ -8730,7 +8721,7 @@ dependencies = [
"block2",
"bytemuck",
"calloop",
"cfg_aliases 0.2.1",
"cfg_aliases",
"concurrent-queue",
"core-foundation 0.9.4",
"core-graphics",

View file

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

View file

@ -158,13 +158,13 @@ impl GPUCommandEncoderMethods<crate::DomTypeHolder> for GPUCommandEncoder {
depth: wgpu_com::PassChannel {
load_op: ds.depthLoadOp.as_ref().map(Convert::convert),
store_op: ds.depthStoreOp.as_ref().map(Convert::convert),
clear_value: *ds.depthClearValue.unwrap_or_default(),
clear_value: ds.depthClearValue.map(|v| *v),
read_only: ds.depthReadOnly,
},
stencil: wgpu_com::PassChannel {
load_op: ds.stencilLoadOp.as_ref().map(Convert::convert),
store_op: ds.stencilStoreOp.as_ref().map(Convert::convert),
clear_value: ds.stencilClearValue,
clear_value: Some(ds.stencilClearValue),
read_only: ds.stencilReadOnly,
},
view: ds.view.id().0,

View file

@ -189,6 +189,7 @@ impl GPUTextureMethods<crate::DomTypeHolder> for GPUTexture {
.map(|f| self.device.validate_texture_format_required_features(&f))
.transpose()?,
dimension: descriptor.dimension.map(|dimension| dimension.convert()),
usage: Some(wgt::TextureUsages::from_bits_retain(descriptor.usage)),
range: wgt::ImageSubresourceRange {
aspect: match descriptor.aspect {
GPUTextureAspect::All => wgt::TextureAspect::All,

View file

@ -268,6 +268,7 @@ GPUTextureView includes GPUObjectBase;
dictionary GPUTextureViewDescriptor : GPUObjectDescriptorBase {
GPUTextureFormat format;
GPUTextureViewDimension dimension;
GPUTextureUsageFlags usage = 0;
GPUTextureAspect aspect = "all";
GPUIntegerCoordinate baseMipLevel = 0;
GPUIntegerCoordinate mipLevelCount;

View file

@ -23,7 +23,7 @@ servo_config = { path = "../config" }
webrender = { workspace = true }
webrender_api = { workspace = true }
webrender_traits = { workspace = true }
wgpu-core = { workspace = true, features = ["replay", "trace", "wgsl"] }
wgpu-core = { workspace = true, features = ["serde", "wgsl"] }
wgpu-types = { workspace = true }
# We want the wgpu-core Metal backend on macOS and iOS.

View file

@ -94,7 +94,6 @@ deny = [
# List of crates to skip for the duplicate check:
skip = [
"cfg_aliases",
"bitflags",
"cookie",
"futures",

File diff suppressed because it is too large Load diff