Upgrade wgpu from version 23 to 25

This commit is contained in:
Matthew Gordon 2025-05-10 09:57:23 -03:00
parent 513c7b575e
commit 5d7159c490
3 changed files with 96 additions and 81 deletions

169
Cargo.lock generated
View File

@ -197,6 +197,9 @@ name = "bitflags"
version = "2.9.0" version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "block" name = "block"
@ -294,28 +297,12 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "cfg_aliases"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e"
[[package]] [[package]]
name = "cfg_aliases" name = "cfg_aliases"
version = "0.2.1" version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
[[package]]
name = "codespan-reporting"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e"
dependencies = [
"termcolor",
"unicode-width 0.1.14",
]
[[package]] [[package]]
name = "codespan-reporting" name = "codespan-reporting"
version = "0.12.0" version = "0.12.0"
@ -324,7 +311,7 @@ checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81"
dependencies = [ dependencies = [
"serde", "serde",
"termcolor", "termcolor",
"unicode-width 0.2.0", "unicode-width",
] ]
[[package]] [[package]]
@ -710,9 +697,9 @@ checksum = "8babf46d4c1c9d92deac9f7be466f76dfc4482b6452fc5024b5e8daf6ffeb3ee"
[[package]] [[package]]
name = "glow" name = "glow"
version = "0.14.2" version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08"
dependencies = [ dependencies = [
"js-sys", "js-sys",
"slotmap", "slotmap",
@ -1022,9 +1009,9 @@ dependencies = [
[[package]] [[package]]
name = "metal" name = "metal"
version = "0.29.0" version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e"
dependencies = [ dependencies = [
"bitflags 2.9.0", "bitflags 2.9.0",
"block", "block",
@ -1054,27 +1041,6 @@ dependencies = [
"adler2", "adler2",
] ]
[[package]]
name = "naga"
version = "23.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f"
dependencies = [
"arrayvec",
"bit-set",
"bitflags 2.9.0",
"cfg_aliases 0.1.1",
"codespan-reporting 0.11.1",
"hexf-parse",
"indexmap",
"log",
"rustc-hash",
"spirv",
"termcolor",
"thiserror 1.0.69",
"unicode-xid",
]
[[package]] [[package]]
name = "naga" name = "naga"
version = "25.0.1" version = "25.0.1"
@ -1084,8 +1050,8 @@ dependencies = [
"arrayvec", "arrayvec",
"bit-set", "bit-set",
"bitflags 2.9.0", "bitflags 2.9.0",
"cfg_aliases 0.2.1", "cfg_aliases",
"codespan-reporting 0.12.0", "codespan-reporting",
"half", "half",
"hashbrown", "hashbrown",
"hexf-parse", "hexf-parse",
@ -1094,6 +1060,7 @@ dependencies = [
"num-traits", "num-traits",
"once_cell", "once_cell",
"rustc-hash", "rustc-hash",
"spirv",
"strum", "strum",
"thiserror 2.0.12", "thiserror 2.0.12",
"unicode-ident", "unicode-ident",
@ -1396,6 +1363,15 @@ dependencies = [
"libredox", "libredox",
] ]
[[package]]
name = "ordered-float"
version = "4.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951"
dependencies = [
"num-traits",
]
[[package]] [[package]]
name = "owned_ttf_parser" name = "owned_ttf_parser"
version = "0.25.0" version = "0.25.0"
@ -2100,24 +2076,12 @@ version = "1.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
[[package]]
name = "unicode-width"
version = "0.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
[[package]] [[package]]
name = "unicode-width" name = "unicode-width"
version = "0.2.0" version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd"
[[package]]
name = "unicode-xid"
version = "0.2.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
[[package]] [[package]]
name = "utf8parse" name = "utf8parse"
version = "0.2.2" version = "0.2.2"
@ -2396,17 +2360,20 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"
[[package]] [[package]]
name = "wgpu" name = "wgpu"
version = "23.0.1" version = "25.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" checksum = "ca6049eb2014a0e0d8689f9b787605dd71d5bbfdc74095ead499f3cff705c229"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"cfg_aliases 0.1.1", "bitflags 2.9.0",
"cfg_aliases",
"document-features", "document-features",
"hashbrown",
"js-sys", "js-sys",
"log", "log",
"naga 23.1.0", "naga",
"parking_lot", "parking_lot",
"portable-atomic",
"profiling", "profiling",
"raw-window-handle", "raw-window-handle",
"smallvec", "smallvec",
@ -2421,34 +2388,77 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-core" name = "wgpu-core"
version = "23.0.1" version = "25.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" checksum = "a19813e647da7aa3cdaa84f5846e2c64114970ea7c86b1e6aae8be08091f4bdc"
dependencies = [ dependencies = [
"arrayvec", "arrayvec",
"bit-set",
"bit-vec", "bit-vec",
"bitflags 2.9.0", "bitflags 2.9.0",
"cfg_aliases 0.1.1", "cfg_aliases",
"document-features", "document-features",
"hashbrown",
"indexmap", "indexmap",
"log", "log",
"naga 23.1.0", "naga",
"once_cell", "once_cell",
"parking_lot", "parking_lot",
"portable-atomic",
"profiling", "profiling",
"raw-window-handle", "raw-window-handle",
"rustc-hash", "rustc-hash",
"smallvec", "smallvec",
"thiserror 1.0.69", "thiserror 2.0.12",
"wgpu-core-deps-apple",
"wgpu-core-deps-emscripten",
"wgpu-core-deps-wasm",
"wgpu-core-deps-windows-linux-android",
"wgpu-hal", "wgpu-hal",
"wgpu-types", "wgpu-types",
] ]
[[package]] [[package]]
name = "wgpu-hal" name = "wgpu-core-deps-apple"
version = "23.0.1" version = "25.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" checksum = "cfd488b3239b6b7b185c3b045c39ca6bf8af34467a4c5de4e0b1a564135d093d"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-core-deps-emscripten"
version = "25.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f09ad7aceb3818e52539acc679f049d3475775586f3f4e311c30165cf2c00445"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-core-deps-wasm"
version = "25.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eca8809ad123f6c7f2c5e01a2c7117c4fdfd02f70bd422ee2533f69dfa98756c"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-core-deps-windows-linux-android"
version = "25.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cba5fb5f7f9c98baa7c889d444f63ace25574833df56f5b817985f641af58e46"
dependencies = [
"wgpu-hal",
]
[[package]]
name = "wgpu-hal"
version = "25.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fb7c4a1dc42ff14c23c9b11ebf1ee85cde661a9b1cf0392f79c1faca5bc559fb"
dependencies = [ dependencies = [
"android_system_properties", "android_system_properties",
"arrayvec", "arrayvec",
@ -2457,31 +2467,33 @@ dependencies = [
"bitflags 2.9.0", "bitflags 2.9.0",
"block", "block",
"bytemuck", "bytemuck",
"cfg_aliases 0.1.1", "cfg-if",
"cfg_aliases",
"core-graphics-types", "core-graphics-types",
"glow", "glow",
"glutin_wgl_sys", "glutin_wgl_sys",
"gpu-alloc", "gpu-alloc",
"gpu-allocator", "gpu-allocator",
"gpu-descriptor", "gpu-descriptor",
"hashbrown",
"js-sys", "js-sys",
"khronos-egl", "khronos-egl",
"libc", "libc",
"libloading", "libloading",
"log", "log",
"metal", "metal",
"naga 23.1.0", "naga",
"ndk-sys 0.5.0+25.2.9519653", "ndk-sys 0.5.0+25.2.9519653",
"objc", "objc",
"once_cell", "ordered-float",
"parking_lot", "parking_lot",
"portable-atomic",
"profiling", "profiling",
"range-alloc", "range-alloc",
"raw-window-handle", "raw-window-handle",
"renderdoc-sys", "renderdoc-sys",
"rustc-hash",
"smallvec", "smallvec",
"thiserror 1.0.69", "thiserror 2.0.12",
"wasm-bindgen", "wasm-bindgen",
"web-sys", "web-sys",
"wgpu-types", "wgpu-types",
@ -2491,12 +2503,15 @@ dependencies = [
[[package]] [[package]]
name = "wgpu-types" name = "wgpu-types"
version = "23.0.0" version = "25.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" checksum = "2aa49460c2a8ee8edba3fca54325540d904dd85b2e086ada762767e17d06e8bc"
dependencies = [ dependencies = [
"bitflags 2.9.0", "bitflags 2.9.0",
"bytemuck",
"js-sys", "js-sys",
"log",
"thiserror 2.0.12",
"web-sys", "web-sys",
] ]
@ -2505,7 +2520,7 @@ name = "wgsl-shader-assembler"
version = "0.1.0" version = "0.1.0"
source = "git+https://git.gordon.earth/matthew/wgsl-shader-assembler.git#262aa6364d0b429bd6e99254a974186a2f1d2dc1" source = "git+https://git.gordon.earth/matthew/wgsl-shader-assembler.git#262aa6364d0b429bd6e99254a974186a2f1d2dc1"
dependencies = [ dependencies = [
"naga 25.0.1", "naga",
"quote", "quote",
"regex", "regex",
"syn", "syn",
@ -2802,7 +2817,7 @@ dependencies = [
"block2", "block2",
"bytemuck", "bytemuck",
"calloop", "calloop",
"cfg_aliases 0.2.1", "cfg_aliases",
"concurrent-queue", "concurrent-queue",
"core-foundation", "core-foundation",
"core-graphics", "core-graphics",

View File

@ -15,12 +15,12 @@ wgsl-shader-assembler = { git = "https://git.gordon.earth/matthew/wgsl-shader-as
[target.'cfg(target_arch = "x86_64")'.dependencies] [target.'cfg(target_arch = "x86_64")'.dependencies]
winit = { version = "0.30.3", features = ["rwh_06"] } winit = { version = "0.30.3", features = ["rwh_06"] }
wgpu = "23.0.0" wgpu = "25.0.0"
env_logger = "0.11.3" env_logger = "0.11.3"
futures = { version = "0.3.30", features = ["executor"] } futures = { version = "0.3.30", features = ["executor"] }
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]
wgpu = { version = "23.0.0", features = ["webgl"]} wgpu = { version = "25.0.0", features = ["webgl"]}
wasm-bindgen = "0.2.84" wasm-bindgen = "0.2.84"
wasm-bindgen-futures = "0.4.42" wasm-bindgen-futures = "0.4.42"
console_log = "1.0" console_log = "1.0"

View File

@ -4,7 +4,7 @@ use crate::mvu::{Event, MvuApp, Size2i};
use { use {
log::info, log::info,
std::{borrow::Cow, path::PathBuf}, std::{borrow::Cow, path::PathBuf},
wgpu::{Device, Instance, Queue, RenderPipeline, Surface, SurfaceConfiguration}, wgpu::{Device, Instance, Queue, RenderPipeline, Surface, SurfaceConfiguration, Trace},
}; };
mod dem_renderer; mod dem_renderer;
@ -62,8 +62,8 @@ impl MvuApp<Model> for App {
required_limits: wgpu::Limits::downlevel_webgl2_defaults() required_limits: wgpu::Limits::downlevel_webgl2_defaults()
.using_resolution(adapter.limits()), .using_resolution(adapter.limits()),
memory_hints: wgpu::MemoryHints::MemoryUsage, memory_hints: wgpu::MemoryHints::MemoryUsage,
trace: Trace::Off,
}, },
None,
) )
.await .await
.expect("Failed to create device"); .expect("Failed to create device");