From 9f844ceb9b5f555c2aa3da14f1bbb628eec3bdbb Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Tue, 19 Nov 2024 17:27:11 +0100 Subject: [PATCH 1/2] update egui & wgpu --- Cargo.lock | 255 ++++++------------ Cargo.toml | 26 +- .../src/error_handling/wgpu_core_error.rs | 2 - .../src/wgpu_resources/bind_group_pool.rs | 6 + .../wgpu_resources/render_pipeline_pool.rs | 4 +- crates/viewer/re_ui/src/design_tokens.rs | 4 +- crates/viewer/re_viewer/Cargo.toml | 4 +- crates/viewer/re_viewer/src/lib.rs | 8 +- 8 files changed, 114 insertions(+), 195 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0aa92a804eea..375336036025 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -942,11 +942,11 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec", + "bit-vec 0.8.0", ] [[package]] @@ -955,6 +955,12 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bitflags" version = "1.3.2" @@ -1383,37 +1389,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" -[[package]] -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.109", -] - -[[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.109", -] - [[package]] name = "combine" version = "4.6.7" @@ -1904,8 +1879,7 @@ checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" [[package]] name = "ecolor" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "775cfde491852059e386c4e1deb4aef381c617dc364184c6f6afee99b87c402b" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "bytemuck", "emath", @@ -1921,8 +1895,7 @@ checksum = "18aade80d5e09429040243ce1143ddc08a92d7a22820ac512610410a4dd5214f" [[package]] name = "eframe" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac2645a9bf4826eb4e91488b1f17b8eaddeef09396706b2f14066461338e24f" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "ahash", "bytemuck", @@ -1940,7 +1913,7 @@ dependencies = [ "objc2-foundation", "parking_lot", "percent-encoding", - "pollster", + "pollster 0.4.0", "puffin", "raw-window-handle", "ron", @@ -1952,15 +1925,14 @@ dependencies = [ "web-time", "wgpu", "winapi", - "windows-sys 0.52.0", + "windows-sys 0.59.0", "winit", ] [[package]] name = "egui" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53eafabcce0cb2325a59a98736efe0bf060585b437763f8c476957fb274bb974" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "accesskit", "ahash", @@ -1977,8 +1949,7 @@ dependencies = [ [[package]] name = "egui-wgpu" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d00fd5d06d8405397e64a928fa0ef3934b3c30273ea7603e3dc4627b1f7a1a82" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "ahash", "bytemuck", @@ -1997,8 +1968,7 @@ dependencies = [ [[package]] name = "egui-winit" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a9c430f4f816340e8e8c1b20eec274186b1be6bc4c7dfc467ed50d57abc36c6" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "accesskit_winit", "ahash", @@ -2040,8 +2010,7 @@ dependencies = [ [[package]] name = "egui_extras" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf3c1f5cd8dfe2ade470a218696c66cf556fcfd701e7830fa2e9f4428292a2a1" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "ahash", "egui", @@ -2058,14 +2027,13 @@ dependencies = [ [[package]] name = "egui_glow" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e39bccc683cd43adab530d8f21a13eb91e80de10bcc38c3f1c16601b6f62b26" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "ahash", "bytemuck", "egui", "egui-winit", - "glow 0.14.2", + "glow", "log", "memoffset", "puffin", @@ -2099,8 +2067,7 @@ dependencies = [ [[package]] name = "egui_tiles" version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e95b957b2db66175ea36f73cb09a1c40e5f2455692347ccfbe79fd3c84907b5b" +source = "git+https://github.com/rerun-io/egui_tiles?rev=48e0ef566479000a23d8dabf84badced98f1b9a6#48e0ef566479000a23d8dabf84badced98f1b9a6" dependencies = [ "ahash", "egui", @@ -2134,8 +2101,7 @@ checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "emath" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1fe0049ce51d0fb414d029e668dd72eb30bc2b739bf34296ed97bd33df544f3" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "bytemuck", "serde", @@ -2251,8 +2217,7 @@ dependencies = [ [[package]] name = "epaint" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a32af8da821bd4f43f2c137e295459ee2e1661d87ca8779dfa0eaf45d870e20f" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" dependencies = [ "ab_glyph", "ahash", @@ -2271,8 +2236,7 @@ dependencies = [ [[package]] name = "epaint_default_fonts" version = "0.29.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "483440db0b7993cf77a20314f08311dbe95675092405518c0677aa08c151a3ea" +source = "git+https://github.com/emilk/egui.git?rev=83a30064f4812d0029532675a5f2bf38c257ad0e#83a30064f4812d0029532675a5f2bf38c257ad0e" [[package]] name = "equivalent" @@ -2697,18 +2661,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "glow" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" -dependencies = [ - "js-sys", - "slotmap", - "wasm-bindgen", - "web-sys", -] - [[package]] name = "glow" version = "0.14.2" @@ -2788,19 +2740,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "gpu-allocator" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" -dependencies = [ - "log", - "presser", - "thiserror", - "winapi", - "windows 0.52.0", -] - [[package]] name = "gpu-descriptor" version = "0.3.0" @@ -2905,30 +2844,6 @@ dependencies = [ "foldhash", ] -[[package]] -name = "hassle-rs" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" -dependencies = [ - "bitflags 2.6.0", - "com", - "libc", - "libloading", - "thiserror", - "widestring", - "winapi", -] - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "heck" version = "0.4.1" @@ -3496,9 +3411,9 @@ checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -3973,9 +3888,9 @@ checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" [[package]] name = "naga" -version = "22.1.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +checksum = "3d5941e45a15b53aad4375eedf02033adb7a28931eedc31117faffa52e6a857e" dependencies = [ "arrayvec", "bit-set", @@ -4843,6 +4758,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" +[[package]] +name = "pollster" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" + [[package]] name = "portable-atomic" version = "1.9.0" @@ -4873,12 +4794,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "presser" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" - [[package]] name = "prettyplease" version = "0.2.25" @@ -5975,7 +5890,7 @@ dependencies = [ "glam", "image", "itertools 0.13.0", - "pollster", + "pollster 0.3.0", "rand", "re_log", "re_math", @@ -6479,7 +6394,7 @@ dependencies = [ name = "re_video" version = "0.20.1-alpha.2" dependencies = [ - "bit-vec", + "bit-vec 0.7.0", "cfg_aliases 0.2.1", "criterion", "crossbeam", @@ -6586,7 +6501,7 @@ dependencies = [ "ahash", "anyhow", "arboard", - "bit-vec", + "bit-vec 0.7.0", "bitflags 2.6.0", "bytemuck", "directories", @@ -7036,7 +6951,7 @@ dependencies = [ "objc2", "objc2-app-kit", "objc2-foundation", - "pollster", + "pollster 0.3.0", "raw-window-handle", "urlencoding", "wasm-bindgen", @@ -8914,9 +8829,9 @@ dependencies = [ [[package]] name = "walrus" -version = "0.21.3" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501ace8ec3492754a9b3c4b59eac7159ceff8414f9e43a05029fe8ef43b9218f" +checksum = "d68aa3c7b80be75c8458fc087453e5a31a226cfffede2e9b932393b2ea1c624a" dependencies = [ "anyhow", "gimli 0.26.2", @@ -8930,14 +8845,14 @@ dependencies = [ [[package]] name = "walrus-macro" -version = "0.19.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e5bd22c71e77d60140b0bd5be56155a37e5bd14e24f5f87298040d0cc40d7" +checksum = "439ad39ff894c43c9649fa724cdde9a6fc50b855d517ef071a93e5df82fe51d3" dependencies = [ - "heck 0.3.3", + "heck 0.5.0", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.85", ] [[package]] @@ -8957,9 +8872,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -8968,9 +8883,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", @@ -8983,14 +8898,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-cli-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7f49ca6e7da74d53d6d716b868828a47d1c3808a8f676e2104fadd3b9874bb" +checksum = "d6b21cf9e89b196d78ff95c442a8076cc417171001e75dc062fe2c421cd2a0f9" dependencies = [ "anyhow", "base64 0.22.1", "log", "rustc-demangle", + "serde", "serde_json", "tempfile", "unicode-ident", @@ -9005,9 +8921,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-externref-xform" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1f37f2705f4177cc87e5b2763115d078d39e4843e351438b34b085d53a8930" +checksum = "c9f5eaefdb356e4266ca53d76526f5500e1e3b0961da8ee932193f08ada25ec7" dependencies = [ "anyhow", "walrus", @@ -9016,9 +8932,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -9028,9 +8944,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -9038,9 +8954,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", @@ -9051,9 +8967,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-multi-value-xform" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2864e3f221fef3869992b541b238e55f53f99b43c4ce220422a6e1ec9458dc21" +checksum = "c22689c6bbdc7f3a9110f1aa21873398a7ab2c50474ba9a45595c9ffde49c0cd" dependencies = [ "anyhow", "walrus", @@ -9062,15 +8978,15 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-bindgen-threads-xform" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9ca60ee029d64cf6f63a630050935360c3877844f6de38e8287afb8f1d2715" +checksum = "17d3c6389a7c8fa49ee4f55847d01b74c640a60387598952cdf3211b8499520c" dependencies = [ "anyhow", "walrus", @@ -9079,9 +8995,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-conventions" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e429e00149de60ffc768e6e1f0563778a237e7c11cc01801edf9734bff8161f" +checksum = "f7b4d6bf2704173b57d7f319316593a35f2102e18bc92251d96909f89e7d4595" dependencies = [ "anyhow", "leb128", @@ -9092,9 +9008,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-wasm-interpreter" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771c49db324f195f221796bf3868247dd91cca4a85604dcb3729213e439abe59" +checksum = "b123244c6bf9e7abbb6ad9aa98ed86f927b55ee9d95b5552dd9346910341d5e2" dependencies = [ "anyhow", "log", @@ -9249,9 +9165,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -9308,9 +9224,9 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" [[package]] name = "wgpu" -version = "22.1.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +checksum = "76ab52f2d3d18b70d5ab8dd270a1cff3ebe6dbe4a7d13c1cc2557138a9777fdc" dependencies = [ "arrayvec", "cfg_aliases 0.1.1", @@ -9333,12 +9249,12 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "22.1.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +checksum = "0e0c68e7b6322a03ee5b83fcd92caeac5c2a932f6457818179f4652ad2a9c065" dependencies = [ "arrayvec", - "bit-vec", + "bit-vec 0.8.0", "bitflags 2.6.0", "cfg_aliases 0.1.1", "document-features", @@ -9358,23 +9274,22 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +checksum = "de6e7266b869de56c7e3ed72a954899f71d14fec6cc81c102b7530b92947601b" dependencies = [ "android_system_properties", "arrayvec", "ash", "bitflags 2.6.0", "block", + "bytemuck", "cfg_aliases 0.1.1", "core-graphics-types", - "glow 0.13.1", + "glow", "glutin_wgl_sys", "gpu-alloc", - "gpu-allocator", "gpu-descriptor", - "hassle-rs", "js-sys", "khronos-egl", "libc", @@ -9395,26 +9310,20 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "windows 0.58.0", ] [[package]] name = "wgpu-types" -version = "22.0.0" +version = "23.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" dependencies = [ "bitflags 2.6.0", "js-sys", "web-sys", ] -[[package]] -name = "widestring" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" - [[package]] name = "winapi" version = "0.3.9" diff --git a/Cargo.toml b/Cargo.toml index 7a78be6e29ce..0920fa6c0c73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -300,8 +300,8 @@ walkers = "0.29" # `crates/viewer/re_viewer/Cargo.toml`, and make sure that the build script still works. # Do not make this an `=` dependency, because that may break Rust users’ builds when a newer # version is released, even if they are not building the web viewer. -wasm-bindgen = "0.2.93" -wasm-bindgen-cli-support = "=0.2.93" +wasm-bindgen = "0.2.95" +wasm-bindgen-cli-support = "=0.2.95" wasm-bindgen-futures = "0.4.33" wayland-sys = "0.31.5" web-sys = "0.3" @@ -310,7 +310,7 @@ webbrowser = "1.0" winit = { version = "0.30.5", default-features = false } # TODO(andreas): Try to get rid of `fragile-send-sync-non-atomic-wasm`. This requires re_renderer being aware of single-thread restriction on resources. # See also https://gpuweb.github.io/gpuweb/explainer/#multithreading-transfer (unsolved part of the Spec as of writing!) -wgpu = { version = "22.1", default-features = false, features = [ +wgpu = { version = "23.0", default-features = false, features = [ # Backends (see https://docs.rs/wgpu/latest/wgpu/#feature-flags) "webgl", "metal", @@ -324,8 +324,8 @@ wgpu = { version = "22.1", default-features = false, features = [ # Other: "fragile-send-sync-non-atomic-wasm", ] } -wgpu-core = "22.1" -wgpu-types = "22.0" +wgpu-core = "23.0" +wgpu-types = "23.0" xshell = "0.2" zip = { version = "0.6", default-features = false } # We're stuck on 0.6 because https://crates.io/crates/protoc-prebuilt is still using 0.6 @@ -555,12 +555,12 @@ significant_drop_tightening = "allow" # An update of parking_lot made this trigg # As a last resport, patch with a commit to our own repository. # ALWAYS document what PR the commit hash is part of, or when it was merged into the upstream trunk. -# ecolor = { git = "https://github.com/emilk/egui.git", rev = "f97f85089df5e936999d5b7280e2e93e2958fac8" } # egui master 2024-09-25 -# eframe = { git = "https://github.com/emilk/egui.git", rev = "f97f85089df5e936999d5b7280e2e93e2958fac8" } # egui master 2024-09-25 -# egui = { git = "https://github.com/emilk/egui.git", rev = "f97f85089df5e936999d5b7280e2e93e2958fac8" } # egui master 2024-09-25 -# egui_extras = { git = "https://github.com/emilk/egui.git", rev = "f97f85089df5e936999d5b7280e2e93e2958fac8" } # egui master 2024-09-25 -# egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "f97f85089df5e936999d5b7280e2e93e2958fac8" } # egui master 2024-09-25 -# emath = { git = "https://github.com/emilk/egui.git", rev = "f97f85089df5e936999d5b7280e2e93e2958fac8" } # egui master 2024-09-25 +ecolor = { git = "https://github.com/emilk/egui.git", rev = "83a30064f4812d0029532675a5f2bf38c257ad0e" } # egui master 2024-11-19 +eframe = { git = "https://github.com/emilk/egui.git", rev = "83a30064f4812d0029532675a5f2bf38c257ad0e" } # egui master 2024-11-19 +egui = { git = "https://github.com/emilk/egui.git", rev = "83a30064f4812d0029532675a5f2bf38c257ad0e" } # egui master 2024-11-19 +egui_extras = { git = "https://github.com/emilk/egui.git", rev = "83a30064f4812d0029532675a5f2bf38c257ad0e" } # egui master 2024-11-19 +egui-wgpu = { git = "https://github.com/emilk/egui.git", rev = "83a30064f4812d0029532675a5f2bf38c257ad0e" } # egui master 2024-11-19 +emath = { git = "https://github.com/emilk/egui.git", rev = "83a30064f4812d0029532675a5f2bf38c257ad0e" } # egui master 2024-11-19 # Useful while developing: # ecolor = { path = "../../egui/crates/ecolor" } @@ -573,8 +573,8 @@ significant_drop_tightening = "allow" # An update of parking_lot made this trigg # egui_plot = { git = "https://github.com/emilk/egui_plot.git", rev = "1f6ae49a5f6bf43a869c215dea0d3028be8d742a" } # egui_plot = { path = "../../egui_plot/egui_plot" } -# egui_tiles = { git = "https://github.com/rerun-io/egui_tiles", rev = "b2f5e232524deed983bcad01c05f27d0e8b89d98" } # https://github.com/rerun-io/egui_tiles/pull/78 2024-08-28 -# egui_tiles = { path = "../egui_tiles" } +egui_tiles = { git = "https://github.com/rerun-io/egui_tiles", rev = "48e0ef566479000a23d8dabf84badced98f1b9a6" } # https://github.com/rerun-io/egui_tiles/pull/89 2024-11-19 +#egui_tiles = { path = "../egui_tiles" } # egui_commonmark = { git = "https://github.com/rerun-io/egui_commonmark", rev = "7a9dc755bfa351a3796274cb8ca87129b051c084" } # https://github.com/lampsitter/egui_commonmark/pull/65 diff --git a/crates/viewer/re_renderer/src/error_handling/wgpu_core_error.rs b/crates/viewer/re_renderer/src/error_handling/wgpu_core_error.rs index 810439a7a672..6194945990bd 100644 --- a/crates/viewer/re_renderer/src/error_handling/wgpu_core_error.rs +++ b/crates/viewer/re_renderer/src/error_handling/wgpu_core_error.rs @@ -44,7 +44,6 @@ macro_rules! try_downcast { wgpu_core::binding_model::CreatePipelineLayoutError, wgpu_core::binding_model::GetBindGroupLayoutError, wgpu_core::binding_model::PushConstantUploadError, - wgpu_core::device::resource::CreateDeviceError, wgpu_core::device::DeviceError, wgpu_core::device::RenderPassCompatibilityError, wgpu_core::pipeline::ColorStateError, @@ -116,7 +115,6 @@ impl_trait![ wgpu_core::binding_model::CreatePipelineLayoutError, wgpu_core::binding_model::GetBindGroupLayoutError, wgpu_core::binding_model::PushConstantUploadError, - wgpu_core::device::resource::CreateDeviceError, wgpu_core::device::DeviceError, wgpu_core::device::RenderPassCompatibilityError, wgpu_core::pipeline::ColorStateError, diff --git a/crates/viewer/re_renderer/src/wgpu_resources/bind_group_pool.rs b/crates/viewer/re_renderer/src/wgpu_resources/bind_group_pool.rs index 39be695e14bc..892989e17cd9 100644 --- a/crates/viewer/re_renderer/src/wgpu_resources/bind_group_pool.rs +++ b/crates/viewer/re_renderer/src/wgpu_resources/bind_group_pool.rs @@ -35,6 +35,12 @@ impl std::ops::Deref for GpuBindGroup { } } +impl<'a> From<&'a GpuBindGroup> for Option<&'a wgpu::BindGroup> { + fn from(bind_group: &'a GpuBindGroup) -> Self { + Some(&bind_group.resource.inner) + } +} + #[derive(Clone, Hash, PartialEq, Eq, Debug)] pub enum BindGroupEntry { DefaultTextureView(GpuTextureHandle), // TODO(andreas) what about non-default views? diff --git a/crates/viewer/re_renderer/src/wgpu_resources/render_pipeline_pool.rs b/crates/viewer/re_renderer/src/wgpu_resources/render_pipeline_pool.rs index aba5852989ac..c6d54475c91e 100644 --- a/crates/viewer/re_renderer/src/wgpu_resources/render_pipeline_pool.rs +++ b/crates/viewer/re_renderer/src/wgpu_resources/render_pipeline_pool.rs @@ -146,13 +146,13 @@ impl RenderPipelineDesc { layout: Some(pipeline_layout), vertex: wgpu::VertexState { module: vertex_shader_module, - entry_point: &self.vertex_entrypoint, + entry_point: Some(&self.vertex_entrypoint), buffers: &buffers, compilation_options: wgpu::PipelineCompilationOptions::default(), }, fragment: wgpu::FragmentState { module: fragment_shader_module, - entry_point: &self.fragment_entrypoint, + entry_point: Some(&self.fragment_entrypoint), targets: &self.render_targets, compilation_options: wgpu::PipelineCompilationOptions::default(), } diff --git a/crates/viewer/re_ui/src/design_tokens.rs b/crates/viewer/re_ui/src/design_tokens.rs index 274d20f0c567..b2952cdd9401 100644 --- a/crates/viewer/re_ui/src/design_tokens.rs +++ b/crates/viewer/re_ui/src/design_tokens.rs @@ -65,7 +65,9 @@ impl DesignTokens { let mut font_definitions = egui::FontDefinitions::default(); font_definitions.font_data.insert( "Inter-Medium".into(), - egui::FontData::from_static(include_bytes!("../data/Inter-Medium.otf")), + std::sync::Arc::new(egui::FontData::from_static(include_bytes!( + "../data/Inter-Medium.otf" + ))), ); font_definitions .families diff --git a/crates/viewer/re_viewer/Cargo.toml b/crates/viewer/re_viewer/Cargo.toml index 76b9b0363abf..d8d317ac024d 100644 --- a/crates/viewer/re_viewer/Cargo.toml +++ b/crates/viewer/re_viewer/Cargo.toml @@ -133,8 +133,8 @@ strum_macros.workspace = true wasm-bindgen-futures.workspace = true # NOTE: `rerun_js/web-viewer/build-wasm.mjs` is HIGHLY sensitive to changes in `wasm-bindgen`. # Whenever updating `wasm-bindgen`, update this and the broader dependency specifications in -# the root `/Cargo.toml`, and make sure that the build script still works. -wasm-bindgen = "=0.2.93" +# the root `/Cargo.toml`, and make sure that the the output of `pixi run js-build-base` still works. +wasm-bindgen = "=0.2.95" web-sys = { workspace = true, features = [ "History", "Location", diff --git a/crates/viewer/re_viewer/src/lib.rs b/crates/viewer/re_viewer/src/lib.rs index df62dd942441..60fef300f387 100644 --- a/crates/viewer/re_viewer/src/lib.rs +++ b/crates/viewer/re_viewer/src/lib.rs @@ -193,8 +193,12 @@ pub(crate) fn wgpu_options(force_wgpu_backend: Option) -> egui_wgpu::Wgp egui_wgpu::SurfaceErrorAction::SkipFrame } }), - supported_backends: supported_graphics_backends(force_wgpu_backend), - device_descriptor: std::sync::Arc::new(|adapter| re_renderer::config::DeviceCaps::from_adapter(adapter).device_descriptor()), + wgpu_setup: egui_wgpu::WgpuSetup::CreateNew { + device_descriptor: std::sync::Arc::new(|adapter| re_renderer::config::DeviceCaps::from_adapter(adapter).device_descriptor()), + supported_backends: supported_graphics_backends(force_wgpu_backend), + // TODO(andreas): Use ..Default::default(), please patch egui to have this + power_preference: wgpu::util::power_preference_from_env().unwrap_or(wgpu::PowerPreference::HighPerformance), + }, ..Default::default() } } From 131548e255deff789e46c4b2fa44d0c853191370 Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Tue, 19 Nov 2024 17:47:45 +0100 Subject: [PATCH 2/2] rust lints, update pollster, update bit-vec --- Cargo.lock | 16 +++++----------- Cargo.toml | 4 ++-- crates/viewer/re_viewer/Cargo.toml | 2 +- deny.toml | 1 + 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 375336036025..c666a2712426 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -946,15 +946,9 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.8.0", + "bit-vec", ] -[[package]] -name = "bit-vec" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" - [[package]] name = "bit-vec" version = "0.8.0" @@ -5890,7 +5884,7 @@ dependencies = [ "glam", "image", "itertools 0.13.0", - "pollster 0.3.0", + "pollster 0.4.0", "rand", "re_log", "re_math", @@ -6394,7 +6388,7 @@ dependencies = [ name = "re_video" version = "0.20.1-alpha.2" dependencies = [ - "bit-vec 0.7.0", + "bit-vec", "cfg_aliases 0.2.1", "criterion", "crossbeam", @@ -6501,7 +6495,7 @@ dependencies = [ "ahash", "anyhow", "arboard", - "bit-vec 0.7.0", + "bit-vec", "bitflags 2.6.0", "bytemuck", "directories", @@ -9254,7 +9248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e0c68e7b6322a03ee5b83fcd92caeac5c2a932f6457818179f4652ad2a9c065" dependencies = [ "arrayvec", - "bit-vec 0.8.0", + "bit-vec", "bitflags 2.6.0", "cfg_aliases 0.1.1", "document-features", diff --git a/Cargo.toml b/Cargo.toml index 0920fa6c0c73..9268a860779e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -161,7 +161,7 @@ arrow2 = { package = "re_arrow2", version = "0.17" } async-executor = "1.0" backtrace = "0.3" bincode = "1.3" -bit-vec = "0.7" +bit-vec = "0.8" bitflags = { version = "2.4", features = ["bytemuck"] } blackbox = "0.2.0" bytemuck = { version = "1.18", features = ["extern_crate_alloc"] } @@ -232,7 +232,7 @@ pico-args = "0.5" ply-rs = { version = "0.1", default-features = false } poll-promise = "0.3" polling = "3.7.3" -pollster = "0.3" +pollster = "0.4" prettyplease = "0.2" proc-macro2 = { version = "1.0", default-features = false } profiling = { version = "1.0.12", default-features = false } diff --git a/crates/viewer/re_viewer/Cargo.toml b/crates/viewer/re_viewer/Cargo.toml index d8d317ac024d..9e9f10fa5253 100644 --- a/crates/viewer/re_viewer/Cargo.toml +++ b/crates/viewer/re_viewer/Cargo.toml @@ -133,7 +133,7 @@ strum_macros.workspace = true wasm-bindgen-futures.workspace = true # NOTE: `rerun_js/web-viewer/build-wasm.mjs` is HIGHLY sensitive to changes in `wasm-bindgen`. # Whenever updating `wasm-bindgen`, update this and the broader dependency specifications in -# the root `/Cargo.toml`, and make sure that the the output of `pixi run js-build-base` still works. +# the root `/Cargo.toml`, and make sure that the output of `pixi run js-build-base` still works. wasm-bindgen = "=0.2.95" web-sys = { workspace = true, features = [ "History", diff --git a/deny.toml b/deny.toml index a4594b408459..65dfc71c8d8e 100644 --- a/deny.toml +++ b/deny.toml @@ -58,6 +58,7 @@ skip = [ { name = "pulldown-cmark" }, # Build-dependency via `ply-rs` (!). TODO(emilk): use a better crate for .ply parsing { name = "raw-window-handle" }, # Pretty small crate; some crates still on old version { name = "redox_syscall" }, # Plenty of versions in the wild + { name = "pollster" }, # rfd is still on 0.3, but ] skip-tree = [ { name = "cargo-run-wasm" }, # Dev-tool