diff --git a/Cargo.lock b/Cargo.lock index 1449514c9..72b8d0be9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -56,7 +56,7 @@ dependencies = [ "arcstr", "arrayvec", "base64 0.22.1", - "bitflags 2.6.0", + "bitflags 2.8.0", "bytemuck", "cfg-if", "criterion", @@ -274,7 +274,7 @@ dependencies = [ "snapbox", "stl_io", "tempfile", - "thiserror", + "thiserror 1.0.69", "tokio", ] @@ -283,7 +283,7 @@ name = "all-is-cubes-render" version = "0.9.0" dependencies = [ "all-is-cubes", - "bitflags 2.6.0", + "bitflags 2.8.0", "criterion", "displaydoc", "embedded-graphics", @@ -352,7 +352,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" dependencies = [ "alsa-sys", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "libc", ] @@ -374,7 +374,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.6.0", + "bitflags 2.8.0", "cc", "cesu8", "jni", @@ -385,7 +385,7 @@ dependencies = [ "ndk-context", "ndk-sys 0.6.0+11769913", "num_enum 0.7.3", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -903,7 +903,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cexpr", "clang-sys", "itertools 0.13.0", @@ -938,9 +938,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] @@ -1048,12 +1048,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "log", "polling", "rustix", "slab", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1110,7 +1110,7 @@ dependencies = [ "semver 1.0.24", "serde", "serde_json", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1177,12 +1177,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" @@ -1234,7 +1228,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "696283b40e1a39d208ee614b92e5f6521d16962edeb47c48372585ec92419943" dependencies = [ - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -1626,7 +1620,7 @@ version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "crossterm_winapi", "mio", "parking_lot", @@ -2314,9 +2308,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -2378,7 +2372,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-alloc-types", ] @@ -2388,7 +2382,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -2399,7 +2393,7 @@ checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", - "thiserror", + "thiserror 1.0.69", "windows 0.58.0", ] @@ -2409,7 +2403,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-descriptor-types", "hashbrown 0.15.2", ] @@ -2420,7 +2414,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -2898,7 +2892,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "inotify-sys", "libc", ] @@ -2994,7 +2988,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -3172,7 +3166,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "redox_syscall 0.5.8", ] @@ -3340,11 +3334,11 @@ dependencies = [ [[package]] name = "metal" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block", "core-graphics-types", "foreign-types", @@ -3437,22 +3431,23 @@ checksum = "bc0287524726960e07b119cebd01678f852f147742ae0d925e6a520dca956126" [[package]] name = "naga" -version = "23.1.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" +checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.6.0", - "cfg_aliases 0.1.1", + "bitflags 2.8.0", + "cfg_aliases", "codespan-reporting", "hexf-parse", "indexmap 2.7.0", "log", "rustc-hash 1.1.0", "spirv", + "strum", "termcolor", - "thiserror", + "thiserror 2.0.11", "unicode-xid", ] @@ -3483,12 +3478,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "jni-sys", "log", "ndk-sys 0.5.0+25.2.9519653", "num_enum 0.7.3", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3497,13 +3492,13 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "jni-sys", "log", "ndk-sys 0.6.0+11769913", "num_enum 0.7.3", "raw-window-handle", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -3536,9 +3531,9 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", - "cfg_aliases 0.2.1", + "cfg_aliases", "libc", ] @@ -3772,7 +3767,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "libc", "objc2", @@ -3788,7 +3783,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-core-location", @@ -3812,7 +3807,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -3854,7 +3849,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "dispatch", "libc", @@ -3879,7 +3874,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -3891,7 +3886,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -3914,7 +3909,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-cloud-kit", @@ -3946,7 +3941,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-core-location", @@ -4372,7 +4367,7 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "memchr", "unicase", ] @@ -4454,7 +4449,7 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eabd94c2f37801c20583fc49dd5cd6b0ba68c716787c2dd6ed18571e1e63117b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cassowary", "compact_str", "crossterm", @@ -4587,7 +4582,7 @@ dependencies = [ "re_tuid", "re_types_core", "similar-asserts", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4649,7 +4644,7 @@ dependencies = [ "re_smart_channel", "re_tracing", "rmp-serde", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4683,7 +4678,7 @@ dependencies = [ "serde", "serde_bytes", "static_assertions", - "thiserror", + "thiserror 1.0.69", "time", "typenum", "uuid", @@ -4720,7 +4715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95f75d9831745a5944ef6a338cc3cc06f8d39a83506f943896eaf602ab1166c4" dependencies = [ "prost", - "thiserror", + "thiserror 1.0.69", "tonic", "tonic-web-wasm-client", ] @@ -4749,7 +4744,7 @@ dependencies = [ "re_memory", "re_sdk_comms", "re_types_core", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4766,7 +4761,7 @@ dependencies = [ "re_log_encoding", "re_log_types", "re_smart_channel", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4850,7 +4845,7 @@ dependencies = [ "re_types_builder", "re_types_core", "smallvec", - "thiserror", + "thiserror 1.0.69", "uuid", ] @@ -4910,7 +4905,7 @@ dependencies = [ "re_tuid", "serde", "smallvec", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -4934,7 +4929,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -4945,7 +4940,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom", "libredox", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -5147,7 +5142,7 @@ version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno", "libc", "linux-raw-sys", @@ -5480,7 +5475,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -5667,7 +5662,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] @@ -5681,6 +5685,17 @@ dependencies = [ "syn 2.0.94", ] +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "time" version = "0.3.37" @@ -5878,7 +5893,7 @@ dependencies = [ "httparse", "js-sys", "pin-project", - "thiserror", + "thiserror 1.0.69", "tonic", "tower-service", "wasm-bindgen", @@ -5929,7 +5944,7 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "bytes", "futures-util", "http", @@ -6288,12 +6303,13 @@ dependencies = [ [[package]] name = "wgpu" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" +checksum = "e41253fc7b660735e2a2d9a58c563f2a047d3cc3445293d8f4095538c9e8afbe" dependencies = [ "arrayvec", - "cfg_aliases 0.1.1", + "bitflags 2.8.0", + "cfg_aliases", "document-features", "js-sys", "log", @@ -6312,14 +6328,14 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" +checksum = "82a39b8842dc9ffcbe34346e3ab6d496b32a47f6497e119d762c97fcaae3cb37" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.6.0", - "cfg_aliases 0.1.1", + "bitflags 2.8.0", + "cfg_aliases", "document-features", "indexmap 2.7.0", "log", @@ -6330,25 +6346,25 @@ dependencies = [ "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 2.0.11", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" +checksum = "5a782e5056b060b0b4010881d1decddd059e44f2ecd01e2db2971b48ad3627e5" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.6.0", + "bitflags 2.8.0", "block", "bytemuck", - "cfg_aliases 0.1.1", + "cfg_aliases", "core-graphics-types", "glow", "glutin_wgl_sys", @@ -6365,6 +6381,7 @@ dependencies = [ "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", + "ordered-float", "parking_lot", "profiling", "range-alloc", @@ -6372,7 +6389,7 @@ dependencies = [ "renderdoc-sys", "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 2.0.11", "wasm-bindgen", "web-sys", "wgpu-types", @@ -6382,12 +6399,13 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" +checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "js-sys", + "log", "web-sys", ] @@ -6758,11 +6776,11 @@ checksum = "dba50bc8ef4b6f1a75c9274fb95aa9a8f63fbc66c56f391bd85cf68d51e7b1a3" dependencies = [ "android-activity", "atomic-waker", - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "bytemuck", "calloop", - "cfg_aliases 0.2.1", + "cfg_aliases", "concurrent-queue", "core-foundation 0.9.4", "core-graphics", @@ -6862,7 +6880,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "dlib", "log", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 96b1d3ab8..b5bf3fd24 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -157,7 +157,7 @@ unicode-width = { version = "0.2", default-features = false } # explicitly enabling "std" needed for wasm-bindgen-futures = { version = "0.4.46", default-features = false, features = ["std"] } web-time = { version = "1.1.0", default-features = false } -wgpu = { version = "23.0.0", default-features = false, features = ["wgsl"] } +wgpu = { version = "24.0.0", default-features = false, features = ["wgsl"] } yield-progress = { version = "0.1.6", default-features = false } # Note: Lints are also necessarily redefined in the workspaces other than this one. diff --git a/all-is-cubes-desktop/src/lib.rs b/all-is-cubes-desktop/src/lib.rs index aff7c32c3..8801197e8 100644 --- a/all-is-cubes-desktop/src/lib.rs +++ b/all-is-cubes-desktop/src/lib.rs @@ -8,6 +8,8 @@ //! so that additional development tools can reuse the same UI code. Use at your own risk. //! Documentation is lacking. +// Increase recursion limit for deeply nested wgpu types +#![recursion_limit = "256"] // Crate-specific lint settings. (General settings can be found in the workspace manifest.) #![forbid(unsafe_code)] diff --git a/all-is-cubes-desktop/src/winit.rs b/all-is-cubes-desktop/src/winit.rs index 0ca5d9abf..bd797af96 100644 --- a/all-is-cubes-desktop/src/winit.rs +++ b/all-is-cubes-desktop/src/winit.rs @@ -203,8 +203,8 @@ pub async fn create_winit_wgpu_desktop_session( window.window.inner_size(), )); - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { - backends: wgpu::util::backend_bits_from_env().unwrap_or_else(wgpu::Backends::all), + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor { + backends: wgpu::Backends::from_env().unwrap_or_else(wgpu::Backends::all), ..Default::default() }); @@ -215,7 +215,7 @@ pub async fn create_winit_wgpu_desktop_session( wgpu::util::initialize_adapter_from_env(&instance, Some(&surface)); if adapter.is_none() { let request_adapter_future = instance.request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::util::power_preference_from_env() + power_preference: wgpu::PowerPreference::from_env() .unwrap_or(wgpu::PowerPreference::HighPerformance), compatible_surface: Some(&surface), force_fallback_adapter: false, diff --git a/all-is-cubes-gpu/src/in_wgpu/bloom.rs b/all-is-cubes-gpu/src/in_wgpu/bloom.rs index fcb5a8b8f..fe6f48108 100644 --- a/all-is-cubes-gpu/src/in_wgpu/bloom.rs +++ b/all-is-cubes-gpu/src/in_wgpu/bloom.rs @@ -292,6 +292,7 @@ fn bloom_mip_view(mip_level: u32, bloom_texture: &wgpu::Texture) -> wgpu::Textur label: Some(&format!("BloomResources bloom[{mip_level}]")), format: None, dimension: None, + usage: None, aspect: wgpu::TextureAspect::default(), base_mip_level: mip_level, mip_level_count: Some(1), diff --git a/all-is-cubes-gpu/src/in_wgpu/frame_texture.rs b/all-is-cubes-gpu/src/in_wgpu/frame_texture.rs index 12e6b8459..6c6e7a303 100644 --- a/all-is-cubes-gpu/src/in_wgpu/frame_texture.rs +++ b/all-is-cubes-gpu/src/in_wgpu/frame_texture.rs @@ -98,7 +98,7 @@ impl DrawableTexture { if let Some(texture) = &self.texture { let full_width = self.local_buffer.size().width; queue.write_texture( - wgpu::ImageCopyTexture { + wgpu::TexelCopyTextureInfo { texture, mip_level: 0, origin: wgpu::Origin3d { @@ -113,7 +113,7 @@ impl DrawableTexture { * dirty_rect.top_left.y as usize + dirty_rect.top_left.x as usize..], ), - wgpu::ImageDataLayout { + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(u32::try_from(size_of::()).unwrap() * full_width), rows_per_image: None, diff --git a/all-is-cubes-gpu/src/in_wgpu/glue.rs b/all-is-cubes-gpu/src/in_wgpu/glue.rs index c52fbb0ff..7335c55a7 100644 --- a/all-is-cubes-gpu/src/in_wgpu/glue.rs +++ b/all-is-cubes-gpu/src/in_wgpu/glue.rs @@ -57,14 +57,14 @@ pub fn write_texture_by_aab( let size = region.size(); queue.write_texture( - wgpu::ImageCopyTexture { + wgpu::TexelCopyTextureInfo { texture, mip_level: 0, origin: point_to_origin(region.min), aspect: wgpu::TextureAspect::All, }, bytemuck::must_cast_slice::(data), - wgpu::ImageDataLayout { + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(size_of::() as u32 * size.width), rows_per_image: Some(size.height), diff --git a/all-is-cubes-gpu/src/in_wgpu/init.rs b/all-is-cubes-gpu/src/in_wgpu/init.rs index 8d2656fd4..f2eefbee0 100644 --- a/all-is-cubes-gpu/src/in_wgpu/init.rs +++ b/all-is-cubes-gpu/src/in_wgpu/init.rs @@ -17,9 +17,9 @@ use all_is_cubes_render::{camera, Flaws, Rendering}; #[doc(hidden)] pub async fn create_instance_for_test_or_exit() -> wgpu::Instance { let stderr = &mut std::io::stderr(); - let backends = wgpu::util::backend_bits_from_env().unwrap_or_else(wgpu::Backends::all); + let backends = wgpu::Backends::from_env().unwrap_or_else(wgpu::Backends::all); - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor { backends, ..Default::default() }); @@ -97,7 +97,7 @@ pub async fn try_create_adapter_for_test( )); adapter = instance .request_adapter(&wgpu::RequestAdapterOptions { - power_preference: wgpu::util::power_preference_from_env() + power_preference: wgpu::PowerPreference::from_env() .unwrap_or(wgpu::PowerPreference::HighPerformance), compatible_surface: surface.as_ref(), force_fallback_adapter: false, @@ -290,9 +290,9 @@ impl TextureCopyParameters { device.create_command_encoder(&wgpu::CommandEncoderDescriptor::default()); encoder.copy_texture_to_buffer( texture.as_image_copy(), - wgpu::ImageCopyBuffer { + wgpu::TexelCopyBufferInfo { buffer: &temp_buffer, - layout: wgpu::ImageDataLayout { + layout: wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(padded_bytes_per_row), rows_per_image: Some(self.size.height), diff --git a/all-is-cubes-gpu/src/in_wgpu/light_texture.rs b/all-is-cubes-gpu/src/in_wgpu/light_texture.rs index 65f351ad8..42684cc6c 100644 --- a/all-is-cubes-gpu/src/in_wgpu/light_texture.rs +++ b/all-is-cubes-gpu/src/in_wgpu/light_texture.rs @@ -460,16 +460,16 @@ impl LightTexture { // TODO: When compute shaders are available, use a compute shader to do these // scattered writes instead of issuing individual commands. encoder.copy_buffer_to_texture( - wgpu::ImageCopyBuffer { + wgpu::TexelCopyBufferInfo { buffer: &self.copy_buffer, - layout: wgpu::ImageDataLayout { + layout: wgpu::TexelCopyBufferLayout { offset: (index_in_batch * (LIGHT_CHUNK_VOLUME * Self::COMPONENTS)) as u64, bytes_per_row: None, rows_per_image: None, }, }, - wgpu::ImageCopyTexture { + wgpu::TexelCopyTextureInfo { texture: &self.texture, mip_level: 0, origin: point_to_origin( diff --git a/all-is-cubes-gpu/src/in_wgpu/skybox.rs b/all-is-cubes-gpu/src/in_wgpu/skybox.rs index a126b3951..6cae10486 100644 --- a/all-is-cubes-gpu/src/in_wgpu/skybox.rs +++ b/all-is-cubes-gpu/src/in_wgpu/skybox.rs @@ -137,7 +137,7 @@ fn compute_skybox(queue: &wgpu::Queue, texture: &wgpu::Texture, sky: &Sky) { queue.write_texture( texture.as_image_copy(), bytemuck::must_cast_slice::<[Component; CHANNELS], u8>(&data[..]), - wgpu::ImageDataLayout { + wgpu::TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(resolution * (size_of::() * CHANNELS) as u32), rows_per_image: Some(resolution), diff --git a/all-is-cubes-wasm/Cargo.lock b/all-is-cubes-wasm/Cargo.lock index 9357aab91..700885589 100644 --- a/all-is-cubes-wasm/Cargo.lock +++ b/all-is-cubes-wasm/Cargo.lock @@ -35,7 +35,7 @@ dependencies = [ "arcstr", "arrayvec", "base64", - "bitflags 2.6.0", + "bitflags 2.8.0", "bytemuck", "cfg-if", "displaydoc", @@ -174,7 +174,7 @@ dependencies = [ "rectangle-pack", "serde_json", "stl_io", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -182,7 +182,7 @@ name = "all-is-cubes-render" version = "0.9.0" dependencies = [ "all-is-cubes", - "bitflags 2.6.0", + "bitflags 2.8.0", "displaydoc", "embedded-graphics", "futures-core", @@ -322,9 +322,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] @@ -402,9 +402,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "codespan-reporting" @@ -768,9 +768,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -817,7 +817,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-alloc-types", ] @@ -827,7 +827,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -836,7 +836,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-descriptor-types", "hashbrown", ] @@ -847,7 +847,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -1059,11 +1059,11 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "metal" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block", "core-graphics-types", "foreign-types", @@ -1128,13 +1128,13 @@ checksum = "bc0287524726960e07b119cebd01678f852f147742ae0d925e6a520dca956126" [[package]] name = "naga" -version = "23.1.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" +checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg_aliases", "codespan-reporting", "hexf-parse", @@ -1142,8 +1142,9 @@ dependencies = [ "log", "rustc-hash", "spirv", + "strum", "termcolor", - "thiserror", + "thiserror 2.0.11", "unicode-xid", ] @@ -1443,7 +1444,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -1589,7 +1590,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -1679,7 +1680,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] @@ -1693,6 +1703,17 @@ dependencies = [ "syn 2.0.94", ] +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.94", +] + [[package]] name = "unicode-ident" version = "1.0.14" @@ -1853,11 +1874,12 @@ dependencies = [ [[package]] name = "wgpu" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" +checksum = "e41253fc7b660735e2a2d9a58c563f2a047d3cc3445293d8f4095538c9e8afbe" dependencies = [ "arrayvec", + "bitflags 2.8.0", "cfg_aliases", "document-features", "js-sys", @@ -1878,13 +1900,13 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" +checksum = "82a39b8842dc9ffcbe34346e3ab6d496b32a47f6497e119d762c97fcaae3cb37" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg_aliases", "document-features", "indexmap", @@ -1896,21 +1918,21 @@ dependencies = [ "raw-window-handle", "rustc-hash", "smallvec", - "thiserror", + "thiserror 2.0.11", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" +checksum = "5a782e5056b060b0b4010881d1decddd059e44f2ecd01e2db2971b48ad3627e5" dependencies = [ "android_system_properties", "arrayvec", "ash", - "bitflags 2.6.0", + "bitflags 2.8.0", "bytemuck", "cfg_aliases", "core-graphics-types", @@ -1928,13 +1950,14 @@ dependencies = [ "ndk-sys", "objc", "once_cell", + "ordered-float", "parking_lot", "profiling", "raw-window-handle", "renderdoc-sys", "rustc-hash", "smallvec", - "thiserror", + "thiserror 2.0.11", "wasm-bindgen", "web-sys", "wgpu-types", @@ -1943,12 +1966,13 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" +checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "js-sys", + "log", "web-sys", ] diff --git a/all-is-cubes-wasm/Cargo.toml b/all-is-cubes-wasm/Cargo.toml index e5914c94d..6322b7bf5 100644 --- a/all-is-cubes-wasm/Cargo.toml +++ b/all-is-cubes-wasm/Cargo.toml @@ -51,7 +51,7 @@ wasm-bindgen = "0.2.96" wasm-bindgen-futures = "0.4.46" web-time = { version = "1.1.0" } # Must be the same version as in the main workspace, i.e. as in all-is-cubes-gpu. -wgpu = { version = "23.0.0", default-features = false, features = ["webgpu", "webgl"] } +wgpu = { version = "24.0.0", default-features = false, features = ["webgpu", "webgl"] } # Feature enabling yield-progress = { version = "0.1.6", features = ["log_hiccups"] } diff --git a/all-is-cubes-wasm/src/init.rs b/all-is-cubes-wasm/src/init.rs index 6fe1e561f..f5c6443bd 100644 --- a/all-is-cubes-wasm/src/init.rs +++ b/all-is-cubes-wasm/src/init.rs @@ -196,7 +196,7 @@ async fn init_wgpu( backends: wgpu::Backends, ) -> Result<(wgpu::Surface<'static>, wgpu::Adapter), Box> { let (surface, request_adapter_future) = { - let wgpu_instance = wgpu::Instance::new(wgpu::InstanceDescriptor { + let wgpu_instance = wgpu::Instance::new(&wgpu::InstanceDescriptor { backends, ..Default::default() }); diff --git a/all-is-cubes-wasm/tests/browser/render.rs b/all-is-cubes-wasm/tests/browser/render.rs index af012e637..bbeb6372b 100644 --- a/all-is-cubes-wasm/tests/browser/render.rs +++ b/all-is-cubes-wasm/tests/browser/render.rs @@ -19,7 +19,7 @@ use all_is_cubes_wasm::AdaptedInstant as Instant; #[wasm_bindgen_test] async fn renderer_test() { - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor::default()); + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor::default()); let adapter = init::try_create_adapter_for_test(&instance, |msg| { web_sys::console::log_1(&JsValue::from_str(&format!("{msg}"))) })