From 9cebd7faa8c806a781dcf1c97ceceba6fbbaaea0 Mon Sep 17 00:00:00 2001 From: Dzmitry Malyshau Date: Wed, 23 Oct 2024 00:23:23 -0700 Subject: [PATCH] Update to wgpu-0.19 --- Cargo.lock | 1062 ++++++++++++++++++++++------------- Cargo.toml | 19 +- bin/boilerplate.rs | 61 +- bin/level/app.rs | 63 ++- bin/level/main.rs | 6 +- bin/model/app.rs | 38 +- bin/model/main.rs | 6 +- bin/road/game.rs | 69 +-- bin/road/main.rs | 6 +- bin/road/physics/terrain.rs | 1 + lib/ffi/Cargo.toml | 6 +- lib/ffi/src/lib.rs | 31 +- src/config/settings.rs | 15 +- src/render/global.rs | 3 +- src/render/mod.rs | 8 +- src/render/terrain.rs | 2 + 16 files changed, 860 insertions(+), 536 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 101b743..ac0afab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,15 +18,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330223a1aecc308757b9926e9391c9b47f8ef2dbd8aea9df88312aea18c5e8d6" -[[package]] -name = "addr2line" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" -dependencies = [ - "gimli", -] - [[package]] name = "adler" version = "1.0.2" @@ -46,13 +37,15 @@ dependencies = [ [[package]] name = "ahash" -version = "0.8.3" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", + "zerocopy", ] [[package]] @@ -66,20 +59,23 @@ dependencies = [ [[package]] name = "android-activity" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40bc1575e653f158cbdc6ebcd917b9564e66321c5325c232c3591269c257be69" +checksum = "ee91c0c2905bae44f84bfa4e044536541df26b7703fd0888deeb9060fcc44289" dependencies = [ "android-properties", - "bitflags 1.3.2", + "bitflags 2.6.0", "cc", + "cesu8", + "jni", "jni-sys", "libc", "log", "ndk", "ndk-context", "ndk-sys", - "num_enum 0.6.1", + "num_enum", + "thiserror", ] [[package]] @@ -101,7 +97,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fa490e751f3878eb9accb9f18988eca52c2337ce000a8bf31ef50d4c723ca9e" dependencies = [ "android_log-sys", - "env_logger 0.10.0", + "env_logger", "log", "once_cell", ] @@ -145,31 +141,26 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +[[package]] +name = "as-raw-xcb-connection" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b" + [[package]] name = "ash" version = "0.37.3+1.3.251" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" dependencies = [ - "libloading", + "libloading 0.7.3", ] [[package]] -name = "atomic_refcell" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b5e5f48b927f04e952dedc932f31995a65a0bf65ec971c74436e51bf6e970d" - -[[package]] -name = "atty" -version = "0.2.14" +name = "atomic-waker" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi 0.1.19", - "libc", - "winapi", -] +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" @@ -177,21 +168,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backtrace" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide 0.7.1", - "object", - "rustc-demangle", -] - [[package]] name = "base64" version = "0.13.0" @@ -221,9 +197,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.3.3" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block" @@ -233,21 +209,21 @@ checksum = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" [[package]] name = "block-sys" -version = "0.1.0-beta.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa55741ee90902547802152aaf3f8e5248aab7e21468089560d4c8840561146" +checksum = "ae85a0696e7ea3b835a453750bf002770776609115e6d25c6d2ff28a8200f7e7" dependencies = [ "objc-sys", ] [[package]] name = "block2" -version = "0.2.0-alpha.6" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8dd9e63c1744f755c2f60332b88de39d341e5e86239014ad839bd71c106dec42" +checksum = "15b55663a85f33501257357e6421bb33e769d5c9ffb5ba0921c975a123e35e68" dependencies = [ "block-sys", - "objc2-encode", + "objc2", ] [[package]] @@ -273,7 +249,7 @@ checksum = "fdde5c9cd29ebd706ce1b35600920a33550e402fc998a2e53ad3b42c3c47a192" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.82", ] [[package]] @@ -282,17 +258,36 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +[[package]] +name = "bytes" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" + [[package]] name = "calloop" -version = "0.10.1" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22a6a8f622f797120d452c630b0ab12e1331a1a753e2039ce7868d4ac77b4ee" +checksum = "fba7adb4dd5aa98e5553510223000e7148f621165ec5f9acd7113f6ca4995298" dependencies = [ + "bitflags 2.6.0", "log", - "nix", - "slotmap", + "polling", + "rustix", + "slab", "thiserror", - "vec_map", +] + +[[package]] +name = "calloop-wayland-source" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0ea9b9476c7fad82841a8dbb380e2eae480c21910feba80725b46931ed8f02" +dependencies = [ + "calloop", + "rustix", + "wayland-backend", + "wayland-client", ] [[package]] @@ -304,6 +299,12 @@ dependencies = [ "jobserver", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.0" @@ -338,10 +339,54 @@ dependencies = [ ] [[package]] -name = "com-rs" -version = "0.2.1" +name = "com" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e17887fd17353b65b1b2ef1c526c83e26cd72e74f598a8dc1bee13a48f3d9f6" +dependencies = [ + "com_macros", +] + +[[package]] +name = "com_macros" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d375883580a668c7481ea6631fc1a8863e33cc335bf56bfad8d7e6d4b04b13a5" +dependencies = [ + "com_macros_support", + "proc-macro2", + "syn 1.0.99", +] + +[[package]] +name = "com_macros_support" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad899a1087a9296d5644792d7cb72b8e34c1bec8e7d4fbc002230169a6e8710c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.99", +] + +[[package]] +name = "combine" +version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf43edc576402991846b093a7ca18a3477e0ef9c588cde84964b5d3e43016642" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] [[package]] name = "const-random" @@ -383,14 +428,14 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "core-graphics" -version = "0.22.3" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2581bbab3b8ffc6fcbd550bf46c355135d16e9ff2a6ea032ad6b9bf1d7efe4fb" +checksum = "970a29baf4110c26fedbc7f82107d42c23f7e88e404c4577ed73fe99ff85a212" dependencies = [ "bitflags 1.3.2", "core-foundation", "core-graphics-types", - "foreign-types 0.3.2", + "foreign-types 0.5.0", "libc", ] @@ -467,19 +512,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "cty" -version = "0.2.2" +name = "cursor-icon" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" +checksum = "96a6ac251f4a2aca6b3f91340350eab87ae57c3f127ffeb585e92bd336717991" [[package]] name = "d3d12" -version = "0.7.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16e44ab292b1dddfdaf7be62cfd8877df52f2f3fde5858d95bab606be259f20" +checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" dependencies = [ - "bitflags 2.3.3", - "libloading", + "bitflags 2.6.0", + "libloading 0.8.5", "winapi", ] @@ -491,11 +536,11 @@ checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b" [[package]] name = "dlib" -version = "0.5.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1b7517328c04c2aa68422fc60a41b92208182142ed04a25879c26c8f878794" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading", + "libloading 0.8.5", ] [[package]] @@ -515,29 +560,29 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "ecolor" -version = "0.22.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e479a7fa3f23d4e794f8b2f8b3568dd4e47886ad1b12c9c095e141cb591eb63" +checksum = "03cfe80b1890e1a8cdbffc6044d6872e814aaf6011835a2a5e2db0e5c5c4ef4e" dependencies = [ "bytemuck", ] [[package]] name = "egui" -version = "0.22.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3aef8ec3ae1b772f340170c65bf27d5b8c28f543a0116c844d2ac08d01123e7" +checksum = "180f595432a5b615fc6b74afef3955249b86cfea72607b40740a4cd60d5297d0" dependencies = [ - "ahash 0.8.3", + "ahash 0.8.11", "epaint", "nohash-hasher", ] [[package]] name = "egui_wgpu_backend" -version = "0.25.0" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af9e07cadafcbc676fd393d4c5188fc7d34fa8fe90e6632310f9bff1986704d2" +checksum = "99c1c10d42f6f0333982a6255fda984eacfb7722a6283fadff7c5d750373c12b" dependencies = [ "bytemuck", "egui", @@ -546,9 +591,9 @@ dependencies = [ [[package]] name = "egui_winit_platform" -version = "0.19.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427dd615e7c88706ddcefbbafac6bc5fa9d1a45283dc18b9d318cc13f02be8b3" +checksum = "16fdbf3eb35064a8829d799885837ecf38421c83a0e84b3d60028f46f320e9a2" dependencies = [ "egui", "winit", @@ -562,26 +607,13 @@ checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "emath" -version = "0.22.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3857d743a6e0741cdd60b622a74c7a36ea75f5f8f11b793b41d905d2c9721a4b" +checksum = "6916301ecf80448f786cdf3eb51d9dbdd831538732229d49119e2d4312eaaf09" dependencies = [ "bytemuck", ] -[[package]] -name = "env_logger" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2cf0344971ee6c64c31be0d530793fba457d322dfec2810c453d0ef228f9c3" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.10.0" @@ -597,13 +629,12 @@ dependencies = [ [[package]] name = "epaint" -version = "0.22.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09333964d4d57f40a85338ba3ca5ed4716070ab184dcfed966b35491c5c64f3b" +checksum = "77b9fdf617dd7f58b0c8e6e9e4a1281f730cde0831d40547da446b2bb76a47af" dependencies = [ "ab_glyph", - "ahash 0.8.3", - "atomic_refcell", + "ahash 0.8.11", "bytemuck", "ecolor", "emath", @@ -612,24 +643,19 @@ dependencies = [ ] [[package]] -name = "errno" -version = "0.3.1" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" -dependencies = [ - "errno-dragonfly", - "libc", - "windows-sys 0.48.0", -] +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "errno-dragonfly" -version = "0.1.2" +name = "errno" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "cc", "libc", + "windows-sys 0.52.0", ] [[package]] @@ -639,7 +665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ "crc32fast", - "miniz_oxide 0.5.4", + "miniz_oxide", ] [[package]] @@ -792,6 +818,16 @@ dependencies = [ "windows 0.32.0", ] +[[package]] +name = "gethostname" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0176e0459c2e4a1fe232f984bca6890e681076abb9934f6cea7c326f3fc47818" +dependencies = [ + "libc", + "windows-targets 0.48.1", +] + [[package]] name = "getopts" version = "0.2.21" @@ -813,16 +849,21 @@ dependencies = [ ] [[package]] -name = "gimli" -version = "0.27.3" +name = "gl_generator" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d" +dependencies = [ + "khronos_api", + "log", + "xml-rs", +] [[package]] name = "glow" -version = "0.12.3" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca0fe580e4b60a8ab24a868bc08e2f03cbcb20d3d676601fa909386713333728" +checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" dependencies = [ "js-sys", "slotmap", @@ -830,13 +871,22 @@ dependencies = [ "web-sys", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +dependencies = [ + "gl_generator", +] + [[package]] name = "gpu-alloc" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.6.0", "gpu-alloc-types", ] @@ -846,20 +896,20 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.6.0", ] [[package]] name = "gpu-allocator" -version = "0.22.0" +version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce95f9e2e11c2c6fadfce42b5af60005db06576f231f5c92550fdded43c423e8" +checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" dependencies = [ - "backtrace", "log", + "presser", "thiserror", "winapi", - "windows 0.44.0", + "windows 0.52.0", ] [[package]] @@ -897,16 +947,22 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + [[package]] name = "hassle-rs" -version = "0.10.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1397650ee315e8891a0df210707f0fc61771b0cc518c3023896064c5407cb3b0" +checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" dependencies = [ - "bitflags 1.3.2", - "com-rs", + "bitflags 2.6.0", + "com", "libc", - "libloading", + "libloading 0.8.5", "thiserror", "widestring", "winapi", @@ -927,6 +983,12 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "443144c8cdadd93ebf52ddb4056d257f5b52c04d3c804e657d19eb73fc33668b" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "hexf-parse" version = "0.2.1" @@ -940,25 +1002,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] -name = "indexmap" -version = "1.9.3" +name = "icrate" +version = "0.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +checksum = "99d3aaff8a54577104bafdf686ff18565c3b6903ca5782a2026ef06e2c7aa319" dependencies = [ - "autocfg", - "hashbrown 0.12.3", + "block2", + "dispatch", + "objc2", ] [[package]] -name = "instant" -version = "0.1.12" +name = "indexmap" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", + "equivalent", + "hashbrown 0.15.0", ] [[package]] @@ -972,6 +1033,22 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "jni" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" +dependencies = [ + "cesu8", + "cfg-if", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", + "windows-sys 0.45.0", +] + [[package]] name = "jni-sys" version = "0.3.0" @@ -989,24 +1066,30 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] [[package]] name = "khronos-egl" -version = "4.1.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c2352bd1d0bceb871cb9d40f24360c8133c11d7486b68b5381c1dd1a32015e3" +checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading", + "libloading 0.8.5", "pkg-config", ] +[[package]] +name = "khronos_api" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" + [[package]] name = "lazy_static" version = "1.4.0" @@ -1015,9 +1098,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libloading" @@ -1029,11 +1112,21 @@ dependencies = [ "winapi", ] +[[package]] +name = "libloading" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4" +dependencies = [ + "cfg-if", + "windows-targets 0.52.6", +] + [[package]] name = "linux-raw-sys" -version = "0.4.3" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -1113,9 +1206,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memmap2" -version = "0.5.10" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +checksum = "fd3f7eed9d3848f8b98834af67102b720745c4ec028fcd0aa0239277e7de374f" dependencies = [ "libc", ] @@ -1131,11 +1224,11 @@ dependencies = [ [[package]] name = "metal" -version = "0.26.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "623b5e6cefd76e58f774bd3cc0c6f5c7615c58c03a97815245a25c3c9bdee318" +checksum = "c43f73953f8cbe511f021b58f18c3ce1c3d1ae13fe953293e13345bf83217f25" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.6.0", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -1159,35 +1252,14 @@ dependencies = [ "adler", ] -[[package]] -name = "miniz_oxide" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee1c23c7c63b0c9250c339ffdc69255f110b298b901b9f6c82547b7b87caaf" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.36.1", -] - [[package]] name = "naga" -version = "0.13.0" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" +checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" dependencies = [ "bit-set", - "bitflags 2.3.3", + "bitflags 2.6.0", "codespan-reporting", "hexf-parse", "indexmap", @@ -1202,14 +1274,15 @@ dependencies = [ [[package]] name = "ndk" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "451422b7e4718271c8b5b3aadf5adedba43dc76312454b387e98fae0fc951aa0" +checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "jni-sys", + "log", "ndk-sys", - "num_enum 0.5.7", + "num_enum", "raw-window-handle", "thiserror", ] @@ -1222,25 +1295,13 @@ checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" [[package]] name = "ndk-sys" -version = "0.4.0" +version = "0.5.0+25.2.9519653" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21d83ec9c63ec5bf950200a8e508bdad6659972187b625469f58ef8c08e29046" +checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" dependencies = [ "jni-sys", ] -[[package]] -name = "nix" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "195cdbc1741b8134346d515b3a56a1c94b0912758009cfd53f99ea0f57b065fc" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", - "memoffset", -] - [[package]] name = "nohash-hasher" version = "0.2.0" @@ -1278,44 +1339,23 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf5395665662ef45796a4ff5486c5d41d29e0c09640af4c5f17fd94ee2c119c9" -dependencies = [ - "num_enum_derive 0.5.7", -] - -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.7" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0498641e53dd6ac1a4f22547548caa6864cc4933784319cd1775271c5a46ce" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.99", + "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.6.1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.82", ] [[package]] @@ -1336,29 +1376,25 @@ dependencies = [ [[package]] name = "objc-sys" -version = "0.2.0-beta.2" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b9834c1e95694a05a828b59f55fa2afec6288359cda67146126b3f90a55d7" +checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310" [[package]] name = "objc2" -version = "0.3.0-beta.3.patch-leaks.3" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e01640f9f2cb1220bbe80325e179e532cb3379ebcd1bf2279d703c19fe3a468" +checksum = "559c5a40fdd30eb5e344fbceacf7595a81e242529fb4e21cf5f43fb4f11ff98d" dependencies = [ - "block2", "objc-sys", "objc2-encode", ] [[package]] name = "objc2-encode" -version = "2.0.0-pre.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfcac41015b00a120608fdaa6938c44cb983fee294351cc4bac7638b4e50512" -dependencies = [ - "objc-sys", -] +checksum = "d079845b37af429bfe5dfa76e6d087d788031045b25cfc6fd898486fd9847666" [[package]] name = "objc_exception" @@ -1369,20 +1405,11 @@ dependencies = [ "cc", ] -[[package]] -name = "object" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" -version = "1.18.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "orbclient" @@ -1474,7 +1501,22 @@ dependencies = [ "bitflags 1.3.2", "crc32fast", "flate2", - "miniz_oxide 0.5.4", + "miniz_oxide", +] + +[[package]] +name = "polling" +version = "3.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" +dependencies = [ + "cfg-if", + "concurrent-queue", + "hermit-abi 0.4.0", + "pin-project-lite", + "rustix", + "tracing", + "windows-sys 0.59.0", ] [[package]] @@ -1483,6 +1525,12 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" +[[package]] +name = "presser" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" + [[package]] name = "proc-macro-crate" version = "1.2.1" @@ -1502,9 +1550,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -1538,11 +1586,20 @@ dependencies = [ "terminal_size", ] +[[package]] +name = "quick-xml" +version = "0.36.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7649a7b4df05aed9ea7ec6f628c67c9953a43869b8bc50929569b2999d443fe" +dependencies = [ + "memchr", +] + [[package]] name = "quote" -version = "1.0.31" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fe8a65d69dd0808184ebb5f836ab526bb259db23c657efa38711b1072ee47f0" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1585,12 +1642,9 @@ checksum = "63e935c45e09cc6dcf00d2f0b2d630a58f4095320223d47fc68918722f0538b6" [[package]] name = "raw-window-handle" -version = "0.5.0" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed7e3d950b66e19e0c372f3fa3fbbcf85b1746b571f74e0c2af6042a5c93420a" -dependencies = [ - "cty", -] +checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" [[package]] name = "rayon" @@ -1687,12 +1741,6 @@ dependencies = [ "ordered-multimap", ] -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - [[package]] name = "rustc-hash" version = "1.1.0" @@ -1701,15 +1749,15 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustix" -version = "0.38.4" +version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a962918ea88d644592894bc6dc55acc6c0956488adcebbfb6e273506b7fd6e5" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1724,7 +1772,7 @@ version = "0.1.0" dependencies = [ "android_logger", "cgmath", - "env_logger 0.9.0", + "env_logger", "futures", "log", "log-panics", @@ -1736,6 +1784,15 @@ dependencies = [ "wgpu-hal", ] +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "scoped-tls" version = "1.0.0" @@ -1750,9 +1807,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "sctk-adwaita" -version = "0.5.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda4e97be1fd174ccc2aae81c8b694e803fa99b34e8fd0f057a9d70698e3ed09" +checksum = "70b31447ca297092c5a9916fc3b955203157b37c19ca8edde4f52e9843e602c7" dependencies = [ "ab_glyph", "log", @@ -1801,9 +1858,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -1825,31 +1882,45 @@ checksum = "2fd0db749597d91ff862fd1d55ea87f7855a744a8425a64695b6fca237d1dad1" [[package]] name = "smithay-client-toolkit" -version = "0.16.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f307c47d32d2715eb2e0ece5589057820e0e5e70d07c247d1063e844e107f454" +checksum = "922fd3eeab3bd820d76537ce8f582b1cf951eceb5475c28500c7457d9d17f53a" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "calloop", - "dlib", - "lazy_static", + "calloop-wayland-source", + "cursor-icon", + "libc", "log", "memmap2", - "nix", - "pkg-config", + "rustix", + "thiserror", + "wayland-backend", "wayland-client", + "wayland-csd-frame", "wayland-cursor", "wayland-protocols", + "wayland-protocols-wlr", + "wayland-scanner", + "xkeysym", +] + +[[package]] +name = "smol_str" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead" +dependencies = [ + "serde", ] [[package]] name = "spirv" -version = "0.2.0+1.5.4" +version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246bfa38fe3db3f1dfc8ca5a2cdeb7348c78be2112740cc0ec8ef18b6d94f830" +checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 1.3.2", - "num-traits", + "bitflags 2.6.0", ] [[package]] @@ -1884,9 +1955,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.27" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b60f673f44a8255b9c8c657daf66a596d435f2da81a555b06dc644d080ba45e0" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", @@ -1895,9 +1966,9 @@ dependencies = [ [[package]] name = "termcolor" -version = "1.1.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] @@ -1914,22 +1985,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.33" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d0a539a918745651435ac7db7a18761589a94cd7e94cd56999f828bf73c8a57" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.33" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c251e90f708e16c49a16f4917dc2131e75222b72edfa9cb7f7c58ae56aae0c09" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 1.0.99", + "syn 2.0.82", ] [[package]] @@ -1959,23 +2030,23 @@ dependencies = [ [[package]] name = "tiny-skia" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df8493a203431061e901613751931f047d1971337153f96d0e5e363d6dbf6a67" +checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab" dependencies = [ "arrayref", "arrayvec", "bytemuck", "cfg-if", - "png", + "log", "tiny-skia-path", ] [[package]] name = "tiny-skia-path" -version = "0.8.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adbfb5d3f3dd57a0e11d12f4f13d4ebbbc1b5c15b7ab0a156d030b21da5f677c" +checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93" dependencies = [ "arrayref", "bytemuck", @@ -1993,11 +2064,10 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.36" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ - "cfg-if", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -2005,20 +2075,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.22" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.99", + "syn 2.0.82", ] [[package]] name = "tracing-core" -version = "0.1.29" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aeea4303076558a00714b823f9ad67d58a3bbda1df83d8827d21193156e22f7" +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" dependencies = [ "once_cell", "valuable", @@ -2085,6 +2155,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4f5b37a154999a8f3f98cc23a628d850e154479cd94decf3414696e12e31aaf" +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "unicode-width" version = "0.1.9" @@ -2113,7 +2189,7 @@ dependencies = [ "egui", "egui_wgpu_backend", "egui_winit_platform", - "env_logger 0.10.0", + "env_logger", "fnv", "futures", "getopts", @@ -2137,18 +2213,22 @@ dependencies = [ "winit", ] -[[package]] -name = "vec_map" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" - [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -2157,34 +2237,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.82", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -2194,9 +2275,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2204,101 +2285,147 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.27", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] -name = "wayland-client" -version = "0.29.5" +name = "wayland-backend" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f3b068c05a039c9f755f881dc50f01732214f5685e379829759088967c46715" +checksum = "056535ced7a150d45159d3a8dc30f91a2e2d588ca0b23f70e56033622b8016f6" dependencies = [ - "bitflags 1.3.2", + "cc", "downcast-rs", - "libc", - "nix", + "rustix", "scoped-tls", - "wayland-commons", - "wayland-scanner", + "smallvec", "wayland-sys", ] [[package]] -name = "wayland-commons" -version = "0.29.5" +name = "wayland-client" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8691f134d584a33a6606d9d717b95c4fa20065605f798a3f350d78dced02a902" +checksum = "e3f45d1222915ef1fd2057220c1d9d9624b7654443ea35c3877f7a52bd0a5a2d" dependencies = [ - "nix", - "once_cell", - "smallvec", - "wayland-sys", + "bitflags 2.6.0", + "rustix", + "wayland-backend", + "wayland-scanner", +] + +[[package]] +name = "wayland-csd-frame" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" +dependencies = [ + "bitflags 2.6.0", + "cursor-icon", + "wayland-backend", ] [[package]] name = "wayland-cursor" -version = "0.29.5" +version = "0.31.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6865c6b66f13d6257bef1cd40cbfe8ef2f150fb8ebbdb1e8e873455931377661" +checksum = "3a94697e66e76c85923b0d28a0c251e8f0666f58fc47d316c0f4da6da75d37cb" dependencies = [ - "nix", + "rustix", "wayland-client", "xcursor", ] [[package]] name = "wayland-protocols" -version = "0.29.5" +version = "0.31.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b950621f9354b322ee817a23474e479b34be96c2e909c14f7bc0100e9a970bc6" +checksum = "8f81f365b8b4a97f422ac0e8737c438024b5951734506b0e1d775c73030561f4" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-plasma" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23803551115ff9ea9bce586860c5c5a971e360825a0309264102a9495a5ff479" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", "wayland-client", - "wayland-commons", + "wayland-protocols", + "wayland-scanner", +] + +[[package]] +name = "wayland-protocols-wlr" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ad1f61b76b6c2d8742e10f9ba5c3737f6530b4c243132c2a2ccc8aa96fe25cd6" +dependencies = [ + "bitflags 2.6.0", + "wayland-backend", + "wayland-client", + "wayland-protocols", "wayland-scanner", ] [[package]] name = "wayland-scanner" -version = "0.29.5" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f4303d8fa22ab852f789e75a967f0a2cdc430a607751c0499bada3e451cbd53" +checksum = "597f2001b2e5fc1121e3d5b9791d3e78f05ba6bfa4641053846248e3a13661c3" dependencies = [ "proc-macro2", + "quick-xml", "quote", - "xml-rs", ] [[package]] name = "wayland-sys" -version = "0.29.5" +version = "0.31.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be12ce1a3c39ec7dba25594b97b42cb3195d54953ddb9d3d95a7c3902bc6e9d4" +checksum = "efa8ac0d8e8ed3e3b5c9fc92c7881406a268e11555abe36493efabe649a29e09" dependencies = [ "dlib", - "lazy_static", + "log", + "once_cell", "pkg-config", ] [[package]] name = "web-sys" -version = "0.3.64" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "web-time" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa30049b1c872b72c89866d458eae9f20380ab280ffd1b1e18df2d3e2d98cfe0" dependencies = [ "js-sys", "wasm-bindgen", @@ -2306,12 +2433,13 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.17.0" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7472f3b69449a8ae073f6ec41d05b6f846902d92a6c45313c50cb25857b736ce" +checksum = "cbd7311dbd2abcfebaabf1841a2824ed7c8be443a0f29166e5d3c6a53a762c01" dependencies = [ "arrayvec", "cfg-if", + "cfg_aliases", "js-sys", "log", "naga", @@ -2330,16 +2458,19 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.17.0" +version = "0.19.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf7454d9386f602f7399225c92dd2fbdcde52c519bc8fb0bd6fbeb388075dc2" +checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.3.3", + "bitflags 2.6.0", + "cfg_aliases", "codespan-reporting", + "indexmap", "log", "naga", + "once_cell", "parking_lot", "profiling", "raw-window-handle", @@ -2353,19 +2484,21 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.17.0" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6654a13885a17f475e8324efb46dc6986d7aaaa98353330f8de2077b153d0101" +checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.3.3", + "bitflags 2.6.0", "block", + "cfg_aliases", "core-graphics-types", "d3d12", "glow", + "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", @@ -2373,11 +2506,13 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.5", "log", "metal", "naga", + "ndk-sys", "objc", + "once_cell", "parking_lot", "profiling", "range-alloc", @@ -2394,11 +2529,11 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.17.0" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee64d7398d0c2f9ca48922c902ef69c42d000c759f3db41e355f4a570b052b67" +checksum = "b671ff9fb03f78b46ff176494ee1ebe7d603393f42664be55b64dc8d53969805" dependencies = [ - "bitflags 2.3.3", + "bitflags 2.6.0", "js-sys", "web-sys", ] @@ -2455,11 +2590,21 @@ dependencies = [ [[package]] name = "windows" -version = "0.44.0" +version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e745dab35a0c4c77aa3ce42d595e13d2003d6902d6b08c9ef5fc326d08da12b" +checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" dependencies = [ - "windows-targets 0.42.2", + "windows-core", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -2493,6 +2638,24 @@ dependencies = [ "windows-targets 0.48.1", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -2523,6 +2686,22 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -2535,6 +2714,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + [[package]] name = "windows_aarch64_msvc" version = "0.32.0" @@ -2559,6 +2744,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + [[package]] name = "windows_i686_gnu" version = "0.32.0" @@ -2583,6 +2774,18 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + [[package]] name = "windows_i686_msvc" version = "0.32.0" @@ -2607,6 +2810,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + [[package]] name = "windows_x86_64_gnu" version = "0.32.0" @@ -2631,6 +2840,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -2643,6 +2858,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + [[package]] name = "windows_x86_64_msvc" version = "0.32.0" @@ -2667,39 +2888,58 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winit" -version = "0.28.6" +version = "0.29.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866db3f712fffba75d31bf0cdecf357c8aeafd158c5b7ab51dba2a2b2d47f196" +checksum = "0d59ad965a635657faf09c8f062badd885748428933dad8e8bdd64064d92e5ca" dependencies = [ + "ahash 0.8.11", "android-activity", - "bitflags 1.3.2", + "atomic-waker", + "bitflags 2.6.0", + "bytemuck", + "calloop", "cfg_aliases", "core-foundation", "core-graphics", - "dispatch", - "instant", + "cursor-icon", + "icrate", + "js-sys", "libc", "log", - "mio", + "memmap2", "ndk", + "ndk-sys", "objc2", "once_cell", "orbclient", "percent-encoding", "raw-window-handle", "redox_syscall 0.3.5", + "rustix", "sctk-adwaita", "smithay-client-toolkit", + "smol_str", + "unicode-segmentation", "wasm-bindgen", + "wasm-bindgen-futures", + "wayland-backend", "wayland-client", - "wayland-commons", "wayland-protocols", - "wayland-scanner", + "wayland-protocols-plasma", "web-sys", - "windows-sys 0.45.0", + "web-time", + "windows-sys 0.48.0", "x11-dl", + "x11rb", + "xkbcommon-dl", ] [[package]] @@ -2713,6 +2953,27 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d91ffca73ee7f68ce055750bf9f6eca0780b8c85eff9bc046a3b0da41755e12" +dependencies = [ + "as-raw-xcb-connection", + "gethostname", + "libc", + "libloading 0.8.5", + "once_cell", + "rustix", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec107c4503ea0b4a98ef47356329af139c0a4f7750e621cf2973cd3385ebcb3d" + [[package]] name = "xcursor" version = "0.3.4" @@ -2722,8 +2983,47 @@ dependencies = [ "nom", ] +[[package]] +name = "xkbcommon-dl" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" +dependencies = [ + "bitflags 2.6.0", + "dlib", + "log", + "once_cell", + "xkeysym", +] + +[[package]] +name = "xkeysym" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" + [[package]] name = "xml-rs" version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52839dc911083a8ef63efa4d039d1f58b5e409f923e44c80828f206f66e5541c" + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] diff --git a/Cargo.toml b/Cargo.toml index f04f308..e06db35 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,12 +8,7 @@ default-run = "road" publish = false [workspace] -members = [ - "lib/ffi", - "lib/m3d", - "lib/splay", - "lib/tiff", -] +members = ["lib/ffi", "lib/m3d", "lib/splay", "lib/tiff"] [lib] @@ -61,20 +56,20 @@ serde = "1.0" serde_derive = "1.0" serde_scan = "0.4" # keep in sync with `lib/ffi/Cargo.toml` -wgpu = { version = "0.17", features = [] } +wgpu = { version = "0.19", features = [] } # binaries env_logger = "0.10" getopts = "0.2" obj = "0.10" png = "0.17" -winit = "0.28" +winit = "0.29" # gui -egui = "0.22" -egui_winit_platform = "0.19" -egui_wgpu_backend = "0.25" +egui = "0.26" +egui_winit_platform = "0.21" +egui_wgpu_backend = "0.28" [dev-dependencies] -naga = { version = "0.13", features = ["wgsl-in", "validate"] } +naga = { version = "0.19", features = ["wgsl-in"] } [dependencies.profiling] version = "1.0.1" diff --git a/bin/boilerplate.rs b/bin/boilerplate.rs index 3f0e337..af77269 100644 --- a/bin/boilerplate.rs +++ b/bin/boilerplate.rs @@ -1,6 +1,6 @@ #![allow(clippy::single_match)] use vangers::{ - config::{settings::Terrain, Settings}, + config::Settings, render::{GraphicsContext, ScreenTargets, DEPTH_FORMAT}, }; @@ -8,12 +8,12 @@ use futures::executor::LocalPool; use log::info; use winit::{ event, - event_loop::{ControlFlow, EventLoop}, + event_loop::EventLoop, window::{Window, WindowBuilder}, }; pub trait Application { - fn on_key(&mut self, input: event::KeyboardInput) -> bool; + fn on_key(&mut self, input: event::KeyEvent, modifiers: event::Modifiers) -> bool; fn on_mouse_wheel(&mut self, _delta: event::MouseScrollDelta) {} fn on_cursor_move(&mut self, _position: (f64, f64)) {} fn on_mouse_button(&mut self, _state: event::ElementState, _button: event::MouseButton) {} @@ -24,28 +24,27 @@ pub trait Application { fn draw(&mut self, device: &wgpu::Device, targets: ScreenTargets) -> wgpu::CommandBuffer; } -struct WindowContext { +struct WindowContext<'a> { window: Window, task_pool: LocalPool, - surface: wgpu::Surface, + surface: wgpu::Surface<'a>, present_mode: wgpu::PresentMode, reload_on_focus: bool, egui_platform: egui_winit_platform::Platform, depth_target: wgpu::TextureView, } -pub struct Harness { +pub struct Harness<'a> { event_loop: EventLoop<()>, - window_ctx: WindowContext, + window_ctx: WindowContext<'a>, pub graphics_ctx: GraphicsContext, } pub struct HarnessOptions { pub title: &'static str, - pub uses_level: bool, } -impl Harness { +impl Harness<'_> { pub fn init(options: HarnessOptions) -> (Self, Settings) { env_logger::init(); let mut task_pool = LocalPool::new(); @@ -61,17 +60,22 @@ impl Harness { info!("Initializing the window"); let instance = wgpu::Instance::new(wgpu::InstanceDescriptor { backends: settings.backend.to_wgpu(), + gles_minor_version: wgpu::Gles3MinorVersion::Automatic, ..Default::default() }); - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let window = WindowBuilder::new() .with_title(options.title) .with_inner_size(winit::dpi::PhysicalSize::new(extent.width, extent.height)) .with_resizable(true) .build(&event_loop) .unwrap(); - let surface = - unsafe { instance.create_surface(&window) }.expect("Unable to create surface."); + + //TODO: use safe `create_surface`. Problematic given our return type. + let surface = unsafe { + instance.create_surface_unsafe(wgpu::SurfaceTargetUnsafe::from_window(&window).unwrap()) + } + .expect("Unable to create surface."); info!("Initializing the device"); let adapter = task_pool @@ -83,14 +87,16 @@ impl Harness { .expect("Unable to initialize GPU via the selected backend."); let downlevel_caps = adapter.get_downlevel_capabilities(); - let limits = settings.render.get_device_limits(&adapter.limits()); + let required_limits = settings + .render + .get_device_limits(&adapter.limits(), settings.game.geometry.height); let (device, queue) = task_pool .run_until(adapter.request_device( &wgpu::DeviceDescriptor { label: None, - features: wgpu::Features::empty(), - limits, + required_features: wgpu::Features::empty(), + required_limits, }, if settings.render.wgpu_trace_path.is_empty() { None @@ -123,6 +129,7 @@ impl Harness { present_mode, alpha_mode: wgpu::CompositeAlphaMode::Auto, view_formats: Vec::new(), + desired_maximum_frame_latency: 1, }; surface.configure(&device, &config); @@ -177,6 +184,7 @@ impl Harness { let start_time = time::Instant::now(); let mut last_time = time::Instant::now(); let mut needs_reload = false; + let mut modifiers = event::Modifiers::default(); let Harness { event_loop, window_ctx: mut win, @@ -185,9 +193,8 @@ impl Harness { let mut egui_pass = egui_wgpu_backend::RenderPass::new(&gfx.device, gfx.color_format, 1); - event_loop.run(move |event, _, control_flow| { + let _ = event_loop.run(move |event, target_window| { let _ = win.window; - *control_flow = ControlFlow::Poll; win.task_pool.run_until_stalled(); win.egui_platform.handle_event(&event); @@ -214,6 +221,7 @@ impl Harness { present_mode: win.present_mode, alpha_mode: wgpu::CompositeAlphaMode::Auto, view_formats: Vec::new(), + desired_maximum_frame_latency: 1, }; win.surface.configure(&gfx.device, &config); win.depth_target = gfx @@ -241,11 +249,14 @@ impl Harness { needs_reload = false; } event::WindowEvent::CloseRequested => { - *control_flow = ControlFlow::Exit; + target_window.exit(); + } + event::WindowEvent::ModifiersChanged(mods) => { + modifiers = mods; } - event::WindowEvent::KeyboardInput { input, .. } => { - if !app.on_key(input) { - *control_flow = ControlFlow::Exit; + event::WindowEvent::KeyboardInput { event, .. } => { + if !app.on_key(event, modifiers) { + target_window.exit(); } } event::WindowEvent::MouseWheel { delta, .. } => app.on_mouse_wheel(delta), @@ -257,7 +268,7 @@ impl Harness { } _ => {} }, - event::Event::MainEventsCleared => { + event::Event::AboutToWait => { let duration = time::Instant::now() - last_time; last_time += duration; @@ -274,8 +285,10 @@ impl Harness { app.draw_ui(&win.egui_platform.context()); let egui_output = win.egui_platform.end_frame(Some(&win.window)); - let egui_primitives = - win.egui_platform.context().tessellate(egui_output.shapes); + let egui_primitives = win + .egui_platform + .context() + .tessellate(egui_output.shapes, 1.0); let screen_descriptor = egui_wgpu_backend::ScreenDescriptor { physical_width: gfx.screen_size.width, physical_height: gfx.screen_size.height, diff --git a/bin/level/app.rs b/bin/level/app.rs index 911a8b6..55478ef 100644 --- a/bin/level/app.rs +++ b/bin/level/app.rs @@ -191,69 +191,78 @@ impl Application for LevelView { } } - fn on_key(&mut self, input: event::KeyboardInput) -> bool { - use winit::event::{ElementState, KeyboardInput, VirtualKeyCode as Key}; + fn on_key(&mut self, input: event::KeyEvent, modifiers: event::Modifiers) -> bool { + use winit::{ + event::ElementState, + keyboard::{KeyCode, ModifiersKeyState, PhysicalKey}, + }; let i = &mut self.input; + let alt = modifiers.lalt_state() == ModifiersKeyState::Pressed; + let shift = modifiers.lshift_state() == ModifiersKeyState::Pressed; #[allow(deprecated)] match input { - KeyboardInput { + event::KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(key), - ref modifiers, + physical_key: PhysicalKey::Code(key), .. } => match key { - Key::Escape => return false, - Key::W => { + KeyCode::Escape => return false, + KeyCode::KeyW => { *i = Input::Ver { dir: self.cam.scale.y, - alt: modifiers.alt(), - shift: modifiers.shift(), + alt, + shift, } } - Key::S => { + KeyCode::KeyS => { *i = Input::Ver { dir: -self.cam.scale.y, - alt: modifiers.alt(), - shift: modifiers.shift(), + alt, + shift, } } - Key::A => { + KeyCode::KeyA => { *i = Input::Hor { dir: -self.cam.scale.x, - alt: modifiers.alt(), - shift: modifiers.shift(), + alt, + shift, } } - Key::D => { + KeyCode::KeyD => { *i = Input::Hor { dir: self.cam.scale.x, - alt: modifiers.alt(), - shift: modifiers.shift(), + alt, + shift, } } - Key::Z => { + KeyCode::KeyZ => { *i = Input::Dep { dir: -self.cam.scale.z, - alt: modifiers.alt(), + alt, } } - Key::X => { + KeyCode::KeyX => { *i = Input::Dep { dir: self.cam.scale.z, - alt: modifiers.alt(), + alt, } } - Key::LAlt => self.alt_button_pressed = true, + KeyCode::AltLeft => self.alt_button_pressed = true, _ => (), }, - KeyboardInput { + event::KeyEvent { state: ElementState::Released, - virtual_keycode: Some(key), + physical_key: PhysicalKey::Code(key), .. } => match key { - Key::W | Key::S | Key::A | Key::D | Key::Z | Key::X => *i = Input::Empty, - Key::LAlt => self.alt_button_pressed = false, + KeyCode::KeyW + | KeyCode::KeyS + | KeyCode::KeyA + | KeyCode::KeyD + | KeyCode::KeyZ + | KeyCode::KeyX => *i = Input::Empty, + KeyCode::AltLeft => self.alt_button_pressed = false, _ => (), }, /* diff --git a/bin/level/main.rs b/bin/level/main.rs index b790267..0cba792 100644 --- a/bin/level/main.rs +++ b/bin/level/main.rs @@ -5,10 +5,8 @@ mod boilerplate; fn main() { use std::env; - let (harness, settings) = boilerplate::Harness::init(boilerplate::HarnessOptions { - title: "level", - uses_level: true, - }); + let (harness, settings) = + boilerplate::Harness::init(boilerplate::HarnessOptions { title: "level" }); let args: Vec<_> = env::args().collect(); let mut options = getopts::Options::new(); diff --git a/bin/model/app.rs b/bin/model/app.rs index 0e060e7..e50f86f 100644 --- a/bin/model/app.rs +++ b/bin/model/app.rs @@ -116,30 +116,37 @@ impl ResourceView { } impl Application for ResourceView { - fn on_key(&mut self, input: winit::event::KeyboardInput) -> bool { - use winit::event::{ElementState, KeyboardInput, VirtualKeyCode as Key}; + fn on_key( + &mut self, + input: winit::event::KeyEvent, + _modifiers: winit::event::Modifiers, + ) -> bool { + use winit::{ + event::{ElementState, KeyEvent}, + keyboard::{KeyCode, PhysicalKey}, + }; let angle = cgmath::Rad(2.0); match input { - KeyboardInput { + KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(key), + physical_key: PhysicalKey::Code(key), .. } => match key { - Key::Escape => return false, - Key::A => self.rotation.0 = -angle, - Key::D => self.rotation.0 = angle, - Key::W => self.rotation.1 = -angle, - Key::S => self.rotation.1 = angle, + KeyCode::Escape => return false, + KeyCode::KeyA => self.rotation.0 = -angle, + KeyCode::KeyD => self.rotation.0 = angle, + KeyCode::KeyW => self.rotation.1 = -angle, + KeyCode::KeyS => self.rotation.1 = angle, _ => (), }, - KeyboardInput { + KeyEvent { state: ElementState::Released, - virtual_keycode: Some(key), + physical_key: PhysicalKey::Code(key), .. } => match key { - Key::A | Key::D => self.rotation.0 = cgmath::Rad(0.0), - Key::W | Key::S => self.rotation.1 = cgmath::Rad(0.0), + KeyCode::KeyA | KeyCode::KeyD => self.rotation.0 = cgmath::Rad(0.0), + KeyCode::KeyW | KeyCode::KeyS => self.rotation.1 = cgmath::Rad(0.0), _ => (), }, _ => {} @@ -209,17 +216,18 @@ impl Application for ResourceView { b: 0.3, a: 1.0, }), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { view: targets.depth, depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: None, }), + ..Default::default() }); pass.set_pipeline(self.object.pipelines.select(render::PipelineKind::Main)); diff --git a/bin/model/main.rs b/bin/model/main.rs index 7cacfa4..d3535f9 100644 --- a/bin/model/main.rs +++ b/bin/model/main.rs @@ -5,10 +5,8 @@ mod boilerplate; fn main() { use std::env; - let (harness, settings) = boilerplate::Harness::init(boilerplate::HarnessOptions { - title: "model", - uses_level: false, - }); + let (harness, settings) = + boilerplate::Harness::init(boilerplate::HarnessOptions { title: "model" }); let args: Vec<_> = env::args().collect(); let mut options = getopts::Options::new(); diff --git a/bin/road/game.rs b/bin/road/game.rs index d120c7f..2640d90 100644 --- a/bin/road/game.rs +++ b/bin/road/game.rs @@ -484,8 +484,15 @@ impl Game { } impl Application for Game { - fn on_key(&mut self, input: winit::event::KeyboardInput) -> bool { - use winit::event::{ElementState, KeyboardInput, VirtualKeyCode as Key}; + fn on_key( + &mut self, + input: winit::event::KeyEvent, + _modifiers: winit::event::Modifiers, + ) -> bool { + use winit::{ + event::{ElementState, KeyEvent}, + keyboard::{KeyCode, PhysicalKey}, + }; let player = match self.agents.iter_mut().find(|a| a.spirit == Spirit::Player) { Some(agent) => agent, @@ -493,13 +500,13 @@ impl Application for Game { }; match input { - KeyboardInput { + KeyEvent { state: ElementState::Pressed, - virtual_keycode: Some(key), + physical_key: PhysicalKey::Code(key), .. } => match key { - Key::Escape => return false, - Key::P => { + KeyCode::Escape => return false, + KeyCode::KeyP => { let center = match player.physics { Physics::Cpu { ref transform, .. } => *transform, }; @@ -513,13 +520,13 @@ impl Application for Game { self.cam.focus_on(¢er); } } - Key::Comma => self.input.tick = Some(-1.0), - Key::Period => self.input.tick = Some(1.0), - Key::LShift => self.input.turbo = true, - Key::LAlt => self.input.jump = Some(0.0), - Key::W => self.input.spin_ver = self.cam.scale.x, - Key::S => self.input.spin_ver = -self.cam.scale.x, - Key::R => { + KeyCode::Comma => self.input.tick = Some(-1.0), + KeyCode::Period => self.input.tick = Some(1.0), + KeyCode::ShiftLeft => self.input.turbo = true, + KeyCode::AltLeft => self.input.jump = Some(0.0), + KeyCode::KeyW => self.input.spin_ver = self.cam.scale.x, + KeyCode::KeyS => self.input.spin_ver = -self.cam.scale.x, + KeyCode::KeyR => { if let Physics::Cpu { ref mut transform, ref mut dynamo, @@ -530,15 +537,15 @@ impl Application for Game { dynamo.angular_velocity = cgmath::Vector3::zero(); } } - Key::A => self.input.spin_hor = -self.cam.scale.y, - Key::D => self.input.spin_hor = self.cam.scale.y, - Key::Q => { + KeyCode::KeyA => self.input.spin_hor = -self.cam.scale.y, + KeyCode::KeyD => self.input.spin_hor = self.cam.scale.y, + KeyCode::KeyQ => { self.input.roll = Some(Roll { dir: -self.cam.scale.y, time: 0.0, }) } - Key::E => { + KeyCode::KeyE => { self.input.roll = Some(Roll { dir: self.cam.scale.y, time: 0.0, @@ -546,16 +553,16 @@ impl Application for Game { } _ => (), }, - KeyboardInput { + KeyEvent { state: ElementState::Released, - virtual_keycode: Some(key), + physical_key: PhysicalKey::Code(key), .. } => match key { - Key::W | Key::S => self.input.spin_ver = 0.0, - Key::A | Key::D => self.input.spin_hor = 0.0, - Key::Q | Key::E => self.input.roll = None, - Key::LShift => self.input.turbo = false, - Key::LAlt => player.jump = self.input.jump.take(), + KeyCode::KeyW | KeyCode::KeyS => self.input.spin_ver = 0.0, + KeyCode::KeyA | KeyCode::KeyD => self.input.spin_hor = 0.0, + KeyCode::KeyQ | KeyCode::KeyE => self.input.roll = None, + KeyCode::ShiftLeft => self.input.turbo = false, + KeyCode::AltLeft => player.jump = self.input.jump.take(), _ => (), }, /* @@ -732,9 +739,6 @@ impl Application for Game { return; } - let fd_points = egui::plot::PlotPoints::from_ys_f32(&self.stats.frame_deltas); - let fd_line = egui::plot::Line::new(fd_points).name("last"); - let player = self .agents .iter_mut() @@ -823,17 +827,6 @@ impl Application for Game { ui.label("Renderer:"); self.render.draw_ui(ui); }); - egui::plot::Plot::new("Frame time") - .allow_zoom(false) - .allow_scroll(false) - .allow_drag(false) - .show_x(false) - .include_y(0.0) - .show_axes([false, true]) - .show(ui, |plot_ui| { - plot_ui.line(fd_line); - plot_ui.hline(egui::plot::HLine::new(1000.0 / 60.0).name("smooth")); - }); }); if selected_car != &player.car_name { diff --git a/bin/road/main.rs b/bin/road/main.rs index df59e99..df21f03 100644 --- a/bin/road/main.rs +++ b/bin/road/main.rs @@ -10,10 +10,8 @@ mod physics; fn main() { use std::env; - let (harness, settings) = boilerplate::Harness::init(boilerplate::HarnessOptions { - title: "road", - uses_level: true, - }); + let (harness, settings) = + boilerplate::Harness::init(boilerplate::HarnessOptions { title: "road" }); info!("Parsing command line"); let args: Vec<_> = env::args().collect(); diff --git a/bin/road/physics/terrain.rs b/bin/road/physics/terrain.rs index c9b1237..d95fb32 100644 --- a/bin/road/physics/terrain.rs +++ b/bin/road/physics/terrain.rs @@ -11,6 +11,7 @@ pub struct CollisionPoint { #[derive(Debug)] pub struct CollisionData { pub soft: Option, + #[allow(unused)] pub hard_dominant: bool, pub hard: Option, } diff --git a/lib/ffi/Cargo.toml b/lib/ffi/Cargo.toml index 27e9fc2..afa6e5b 100644 --- a/lib/ffi/Cargo.toml +++ b/lib/ffi/Cargo.toml @@ -13,13 +13,13 @@ crate-type = ["staticlib"] vangers = { path = "../.." } m3d = { path = "../m3d" } log = "0.4" -env_logger = { version = "0.9", optional = true } +env_logger = { version = "0.10", optional = true } futures = "0.3" cgmath = "0.18" ron = "0.8" slotmap = "1" -wgpu = { version = "0.17", features = ["angle"] } -hal = { package = "wgpu-hal", version = "0.17", features = ["gles"] } +wgpu = { version = "0.19", features = ["angle"] } +hal = { package = "wgpu-hal", version = "0.19", features = ["gles"] } [target.'cfg(target_os = "android")'.dependencies] android_logger = { version = "0.13", optional = true } diff --git a/lib/ffi/src/lib.rs b/lib/ffi/src/lib.rs index 96b18e2..15d9639 100644 --- a/lib/ffi/src/lib.rs +++ b/lib/ffi/src/lib.rs @@ -245,7 +245,7 @@ pub extern "C" fn rv_init(desc: InitDescriptor) -> Option> let mut task_pool = LocalPool::new(); let exposed = unsafe { - ::Adapter::new_external(|name| { + hal::gles::Adapter::new_external(|name| { let cstr = CString::new(name).unwrap(); (desc.gl_functor)(cstr.as_ptr()) }) @@ -257,18 +257,23 @@ pub extern "C" fn rv_init(desc: InitDescriptor) -> Option> ..Default::default() }); let adapter = unsafe { instance.create_adapter_from_hal(exposed) }; - let limits = render_config.get_device_limits(&adapter.limits()); - - let (device, queue) = task_pool - .run_until(adapter.request_device( - &wgpu::DeviceDescriptor { - label: None, - features: wgpu::Features::empty(), - limits, - }, - None, - )) - .ok()?; + let required_limits = + render_config.get_device_limits(&adapter.limits(), geometry_config.height); + + let (device, queue) = match task_pool.run_until(adapter.request_device( + &wgpu::DeviceDescriptor { + label: None, + required_features: wgpu::Features::empty(), + required_limits, + }, + None, + )) { + Ok(pair) => pair, + Err(e) => { + log::error!("Unable to create device: {}", e); + return None; + } + }; let gfx = vangers::render::GraphicsContext { queue, diff --git a/src/config/settings.rs b/src/config/settings.rs index 8eec154..c2e0bc8 100644 --- a/src/config/settings.rs +++ b/src/config/settings.rs @@ -88,7 +88,6 @@ pub enum Backend { Metal, Vulkan, DX12, - DX11, GL, } @@ -99,7 +98,6 @@ impl Backend { Backend::Metal => wgpu::Backends::METAL, Backend::Vulkan => wgpu::Backends::VULKAN, Backend::DX12 => wgpu::Backends::DX12, - Backend::DX11 => wgpu::Backends::DX11, Backend::GL => wgpu::Backends::GL, } } @@ -174,8 +172,8 @@ pub struct Render { } impl Render { - pub fn get_device_limits(&self, adapter_limits: &wgpu::Limits) -> wgpu::Limits { - let terrain_buffer_size = 1 << 26; // 2048 (X) * 16384 (Y) * 2 (height+meta) + pub fn get_device_limits(&self, adapter_limits: &wgpu::Limits, height: u32) -> wgpu::Limits { + let terrain_area = 2048 * 16384; match self.terrain { Terrain::RayTraced { .. } | Terrain::Sliced { .. } | Terrain::Painted { .. } => { wgpu::Limits { @@ -184,16 +182,19 @@ impl Render { } } Terrain::RayVoxelTraced { voxel_size, .. } => { - let max_3d_points = (terrain_buffer_size as usize / 2) * 256; let voxel_points = voxel_size[0] * voxel_size[1] * voxel_size[2]; - // Note: 5/32 is roughly the number of bytes per voxel if we include the LOD chain - let voxel_storage_size = (max_3d_points / voxel_points as usize * 5) / 32; + let max_voxels = terrain_area * height as usize / voxel_points as usize; + // Note: 1/7 is roughly the sum size of all the mips + // Division by 8 is because we have 8 bits per byte. + // The extra space is for rounding and such. + let voxel_storage_size = (max_voxels * 8 / 7) / 8 + 1500; info!( "Estimating {} MB for voxel storage", voxel_storage_size >> 20 ); wgpu::Limits { max_storage_buffer_binding_size: voxel_storage_size as u32, + max_texture_dimension_2d: 1 << 14, ..wgpu::Limits::downlevel_defaults() } } diff --git a/src/render/global.rs b/src/render/global.rs index c075056..765d132 100644 --- a/src/render/global.rs +++ b/src/render/global.rs @@ -141,10 +141,11 @@ impl Context { view: &view, depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: None, }), + ..Default::default() }); gfx.queue.submit(Some(cmd_encoder.finish())); view diff --git a/src/render/mod.rs b/src/render/mod.rs index 23db4ea..6c4cebf 100644 --- a/src/render/mod.rs +++ b/src/render/mod.rs @@ -483,10 +483,11 @@ impl Render { view: &shadow.view, depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: None, }), + ..Default::default() }); pass.set_bind_group(0, &self.global.shadow_bind_group, &[]); @@ -552,17 +553,18 @@ impl Render { a: 1.0, } }), - store: true, + store: wgpu::StoreOp::Store, }, })], depth_stencil_attachment: Some(wgpu::RenderPassDepthStencilAttachment { view: targets.depth, depth_ops: Some(wgpu::Operations { load: wgpu::LoadOp::Clear(1.0), - store: true, + store: wgpu::StoreOp::Store, }), stencil_ops: None, }), + ..Default::default() }); if let Some(ref r) = viewport { diff --git a/src/render/terrain.rs b/src/render/terrain.rs index 742ea0f..f88a14f 100644 --- a/src/render/terrain.rs +++ b/src/render/terrain.rs @@ -1720,6 +1720,7 @@ impl Context { let mut pass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: Some("Voxel bake"), + ..Default::default() }); pass.set_pipeline(init_pipeline); pass.set_bind_group(1, &self.bind_group, &[]); @@ -1914,6 +1915,7 @@ impl Context { } => { let mut pass = encoder.begin_compute_pass(&wgpu::ComputePassDescriptor { label: Some("scatter"), + ..Default::default() }); pass.set_bind_group(0, &global.bind_group, &[]); pass.set_bind_group(1, &self.bind_group, &[]);