diff --git a/Cargo.lock b/Cargo.lock index b5ad450..57f5859 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,18 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] +version = 4 [[package]] name = "aho-corasick" @@ -23,12 +11,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -38,17 +20,11 @@ dependencies = [ "libc", ] -[[package]] -name = "anes" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" - [[package]] name = "anstream" -version = "0.6.14" +version = "0.6.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" +checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", "anstyle-parse", @@ -61,36 +37,37 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys", + "windows-sys 0.61.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.3" +version = "3.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" +checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", - "windows-sys", + "once_cell_polyfill", + "windows-sys 0.61.2", ] [[package]] @@ -101,22 +78,11 @@ checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "ash" -version = "0.37.3+1.3.251" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e9c3835d686b0a6084ab4234fcd1b07dbf6e4767dce60874b12356a25ecd4a" -dependencies = [ - "libloading 0.7.4", -] - -[[package]] -name = "atty" -version = "0.2.14" +version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "hermit-abi", - "libc", - "winapi", + "libloading", ] [[package]] @@ -127,30 +93,24 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "bit-set" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - -[[package]] -name = "bitflags" -version = "1.3.2" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "block" @@ -166,30 +126,24 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn", ] -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - [[package]] name = "cfg-if" version = "1.0.0" @@ -198,110 +152,32 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - -[[package]] -name = "clap" -version = "3.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" -dependencies = [ - "bitflags 1.3.2", - "clap_lex", - "indexmap 1.9.3", - "textwrap", -] - -[[package]] -name = "clap_lex" -version = "0.2.4" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" -dependencies = [ - "os_str_bytes", -] +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "codespan-reporting" -version = "0.11.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" dependencies = [ + "serde", "termcolor", "unicode-width", ] [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" - -[[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", -] +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "core-foundation" -version = "0.9.4" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" dependencies = [ "core-foundation-sys", "libc", @@ -315,93 +191,21 @@ checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "core-graphics-types" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "libc", ] -[[package]] -name = "criterion" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7c76e09c1aae2bc52b3d2f29e13c6572553b30c4aa1b8a49fd70de6412654cb" -dependencies = [ - "anes", - "atty", - "cast", - "ciborium", - "clap", - "criterion-plot", - "itertools", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" -dependencies = [ - "cast", - "itertools", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - [[package]] name = "crunchy" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" -[[package]] -name = "d3d12" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b28bfe653d79bd16c77f659305b195b82bb5ce0c0eb2a4846b82ddbd77586813" -dependencies = [ - "bitflags 2.6.0", - "libloading 0.8.4", - "winapi", -] - [[package]] name = "document-features" version = "0.2.10" @@ -411,17 +215,11 @@ dependencies = [ "litrs", ] -[[package]] -name = "either" -version = "1.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" - [[package]] name = "env_filter" -version = "0.1.0" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" +checksum = "1bf3c259d255ca70051b30e2e95b5446cdb8949ac4cd22c0d7fd634d89f568e2" dependencies = [ "log", "regex", @@ -429,14 +227,14 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.3" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] @@ -452,6 +250,18 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + +[[package]] +name = "foldhash" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" + [[package]] name = "foreign-types" version = "0.5.0" @@ -470,7 +280,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn", ] [[package]] @@ -479,32 +289,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - [[package]] name = "getrandom" -version = "0.2.15" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", - "wasi", + "r-efi", + "wasip2", ] [[package]] @@ -520,9 +314,9 @@ dependencies = [ [[package]] name = "glow" -version = "0.13.1" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd348e04c43b32574f2de31c8bb397d96c9fcfa1371bd4ca6d8bdc464ab121b1" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -532,9 +326,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8098adac955faa2d31079b65dc48841251f69efd3ac25477903fc424362ead" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" dependencies = [ "gl_generator", ] @@ -545,7 +339,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.6.0", + "bitflags", "gpu-alloc-types", ] @@ -555,31 +349,30 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] name = "gpu-allocator" -version = "0.25.0" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f56f6318968d03c18e1bcf4857ff88c61157e9da8e47c5f29055d60e1228884" +checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", - "thiserror", - "winapi", + "thiserror 1.0.62", "windows", ] [[package]] name = "gpu-descriptor" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" +checksum = "b89c83349105e3732062a895becfc71a8f921bb71ecbbdd8ff99263e3b53a0ca" dependencies = [ - "bitflags 2.6.0", + "bitflags", "gpu-descriptor-types", - "hashbrown 0.14.5", + "hashbrown 0.15.5", ] [[package]] @@ -588,57 +381,37 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] name = "half" -version = "2.4.1" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" +checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b" dependencies = [ "cfg-if", "crunchy", + "num-traits", + "zerocopy", ] [[package]] name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "hassle-rs" -version = "0.11.0" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2a7e73e1f34c48da31fb668a907f250794837e08faa144fd24f0b8b741e890" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ - "bitflags 2.6.0", - "com", - "libc", - "libloading 0.8.4", - "thiserror", - "widestring", - "winapi", + "foldhash 0.1.5", ] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "hashbrown" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100" dependencies = [ - "libc", + "foldhash 0.2.0", ] [[package]] @@ -647,52 +420,45 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfa686283ad6dd069f105e5ab091b04c62850d3e4cf5d67debad1933f55023df" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" -version = "2.2.6" +version = "2.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "0ad4bb2b565bca0645f4d68c5c9af97fba094e9791da685bf83cb5f3ce74acf2" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.16.1", ] [[package]] name = "is_terminal_polyfill" -version = "1.70.0" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] -name = "itertools" -version = "0.10.5" +name = "jiff" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "49cce2b81f2098e7e3efc35bc2e0a6b7abec9d34128283d7a26fa8f32a6dbb35" dependencies = [ - "either", + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde_core", ] [[package]] -name = "itoa" -version = "1.0.11" +name = "jiff-static" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "980af8b43c3ad5d8d349ace167ec8170839f753a42d233ba19e08afe1850fa69" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "jni-sys" @@ -702,10 +468,11 @@ checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -716,7 +483,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading 0.8.4", + "libloading", "pkg-config", ] @@ -726,27 +493,11 @@ version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc" -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - [[package]] name = "libc" -version = "0.2.155" +version = "0.2.177" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libloading" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" -dependencies = [ - "cfg-if", - "winapi", -] +checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libloading" @@ -758,6 +509,12 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "libm" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + [[package]] name = "litrs" version = "0.4.1" @@ -797,11 +554,11 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "metal" -version = "0.28.0" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5637e166ea14be6063a3f8ba5ccb9a4159df7d8f6d61c02fc3d480b1f90dcfcb" +checksum = "00c15a6f673ff72ddcc22394663290f870fb224c1bfce55734a75c414150e605" dependencies = [ - "bitflags 2.6.0", + "bitflags", "block", "core-graphics-types", "foreign-types", @@ -812,30 +569,35 @@ dependencies = [ [[package]] name = "naga" -version = "0.20.0" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e536ae46fcab0876853bd4a632ede5df4b1c2527a58f6c5a4150fe86be858231" +checksum = "066cf25f0e8b11ee0df221219010f213ad429855f57c494f995590c861a9a7d8" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.6.0", + "bitflags", + "cfg-if", + "cfg_aliases", "codespan-reporting", + "half", + "hashbrown 0.16.1", "hexf-parse", - "indexmap 2.2.6", + "indexmap", + "libm", "log", "num-traits", + "once_cell", "rustc-hash", "spirv", - "termcolor", - "thiserror", - "unicode-xid", + "thiserror 2.0.17", + "unicode-ident", ] [[package]] name = "ndk-sys" -version = "0.5.0+25.2.9519653" +version = "0.6.0+11769913" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c196769dd60fd4f363e11d948139556a344e79d451aeb2fa2fd040738ef7691" +checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873" dependencies = [ "jni-sys", ] @@ -847,6 +609,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", + "libm", ] [[package]] @@ -860,21 +623,24 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] -name = "oorandom" -version = "11.1.4" +name = "once_cell_polyfill" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] -name = "os_str_bytes" -version = "6.6.1" +name = "ordered-float" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +checksum = "7f4779c6901a562440c3786d08192c6fbda7c1c2060edd10006b05ee35d10f2d" +dependencies = [ + "num-traits", +] [[package]] name = "parking_lot" @@ -912,51 +678,38 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] -name = "plotters" -version = "0.3.6" +name = "pollster" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15b6eccb8484002195a3e44fe65a4ce8e93a625797a063735536fd59cb01cf3" +checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" dependencies = [ - "num-traits", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", + "pollster-macro", ] [[package]] -name = "plotters-backend" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "414cec62c6634ae900ea1c56128dfe87cf63e7caece0852ec76aba307cebadb7" - -[[package]] -name = "plotters-svg" -version = "0.3.6" +name = "pollster-macro" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81b30686a7d9c3e010b84284bdd26a29f2138574f52f5eb6f794fc0ad924e705" +checksum = "ac5da421106a50887c5b51d20806867db377fbb86bacf478ee0500a912e0c113" dependencies = [ - "plotters-backend", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "pollster" -version = "0.3.0" +name = "portable-atomic" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22686f4785f02a4fcc856d3b3bb19bf6c8160d103f7a99cc258bddd0251dc7f2" -dependencies = [ - "pollster-macro", -] +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" [[package]] -name = "pollster-macro" -version = "0.1.0" +name = "portable-atomic-util" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea78f0ef4193055a4b09814ce6bcb572ad1174d6023e2f00a9ea1a798d18d301" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "portable-atomic", ] [[package]] @@ -973,9 +726,9 @@ checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] @@ -988,29 +741,34 @@ checksum = "43d84d1d7a6ac92673717f9f6d1518374ef257669c24ebc5ac25d5033828be58" [[package]] name = "quote" -version = "1.0.36" +version = "1.0.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f" dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" + [[package]] name = "rand" -version = "0.8.5" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" dependencies = [ - "libc", "rand_chacha", "rand_core", ] [[package]] name = "rand_chacha" -version = "0.3.1" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ "ppv-lite86", "rand_core", @@ -1018,9 +776,9 @@ dependencies = [ [[package]] name = "rand_core" -version = "0.6.4" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ "getrandom", ] @@ -1037,33 +795,13 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539" -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "redox_syscall" version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -1108,19 +846,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "same-file" -version = "1.0.6" +name = "rustversion" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "scopeguard" @@ -1130,33 +859,32 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.204" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" dependencies = [ + "serde_core", "serde_derive", ] [[package]] -name = "serde_derive" -version = "1.0.204" +name = "serde_core" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.71", + "serde_derive", ] [[package]] -name = "serde_json" -version = "1.0.120" +name = "serde_derive" +version = "1.0.228" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ - "itoa", - "ryu", - "serde", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1170,9 +898,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.13.2" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "spirv" @@ -1180,7 +908,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -1191,20 +919,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "syn" -version = "1.0.109" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -1221,18 +938,21 @@ dependencies = [ ] [[package]] -name = "textwrap" -version = "0.16.1" +name = "thiserror" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +dependencies = [ + "thiserror-impl 1.0.62", +] [[package]] name = "thiserror" -version = "1.0.62" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" +checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" dependencies = [ - "thiserror-impl", + "thiserror-impl 2.0.17", ] [[package]] @@ -1243,17 +963,18 @@ checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn", ] [[package]] -name = "tinytemplate" -version = "1.2.1" +name = "thiserror-impl" +version = "2.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" +checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ - "serde", - "serde_json", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1268,12 +989,6 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - [[package]] name = "utf8parse" version = "0.2.2" @@ -1287,63 +1002,45 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "walkdir" -version = "2.5.0" +name = "wasip2" +version = "1.0.1+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" dependencies = [ - "same-file", - "winapi-util", + "wit-bindgen", ] -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" dependencies = [ "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", "once_cell", - "proc-macro2", - "quote", - "syn 2.0.71", + "rustversion", + "wasm-bindgen-macro", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" dependencies = [ "cfg-if", "js-sys", + "once_cell", "wasm-bindgen", "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1351,28 +1048,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" dependencies = [ + "bumpalo", "proc-macro2", "quote", - "syn 2.0.71", - "wasm-bindgen-backend", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" dependencies = [ "js-sys", "wasm-bindgen", @@ -1380,18 +1080,21 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.20.1" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e37c7b9921b75dfd26dd973fdcbce36f13dfa6e2dc82aece584e0ed48c355c" +checksum = "bfe68bac7cde125de7a731c3400723cadaaf1703795ad3f4805f187459cd7a77" dependencies = [ "arrayvec", + "bitflags", "cfg-if", "cfg_aliases", "document-features", + "hashbrown 0.16.1", "js-sys", "log", "naga", "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "smallvec", @@ -1406,84 +1109,123 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.21.1" +version = "27.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50819ab545b867d8a454d1d756b90cd5f15da1f2943334ca314af10583c9d39" +checksum = "27a75de515543b1897b26119f93731b385a19aea165a1ec5f0e3acecc229cae7" dependencies = [ "arrayvec", + "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", + "bytemuck", "cfg_aliases", - "codespan-reporting", "document-features", - "indexmap 2.2.6", + "hashbrown 0.16.1", + "indexmap", "log", "naga", "once_cell", "parking_lot", + "portable-atomic", "profiling", "raw-window-handle", "rustc-hash", "smallvec", - "thiserror", - "web-sys", + "thiserror 2.0.17", + "wgpu-core-deps-apple", + "wgpu-core-deps-emscripten", + "wgpu-core-deps-windows-linux-android", "wgpu-hal", "wgpu-types", ] +[[package]] +name = "wgpu-core-deps-apple" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0772ae958e9be0c729561d5e3fd9a19679bcdfb945b8b1a1969d9bfe8056d233" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-emscripten" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b06ac3444a95b0813ecfd81ddb2774b66220b264b3e2031152a4a29fda4da6b5" +dependencies = [ + "wgpu-hal", +] + +[[package]] +name = "wgpu-core-deps-windows-linux-android" +version = "27.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71197027d61a71748e4120f05a9242b2ad142e3c01f8c1b47707945a879a03c3" +dependencies = [ + "wgpu-hal", +] + [[package]] name = "wgpu-hal" -version = "0.21.1" +version = "27.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "172e490a87295564f3fcc0f165798d87386f6231b04d4548bca458cbbfd63222" +checksum = "5b21cb61c57ee198bc4aff71aeadff4cbb80b927beb912506af9c780d64313ce" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.6.0", + "bitflags", "block", + "bytemuck", + "cfg-if", "cfg_aliases", "core-graphics-types", - "d3d12", "glow", "glutin_wgl_sys", "gpu-alloc", "gpu-allocator", "gpu-descriptor", - "hassle-rs", + "hashbrown 0.16.1", "js-sys", "khronos-egl", "libc", - "libloading 0.8.4", + "libloading", "log", "metal", "naga", "ndk-sys", "objc", "once_cell", + "ordered-float", "parking_lot", + "portable-atomic", + "portable-atomic-util", "profiling", "range-alloc", "raw-window-handle", "renderdoc-sys", - "rustc-hash", "smallvec", - "thiserror", + "thiserror 2.0.17", "wasm-bindgen", "web-sys", "wgpu-types", - "winapi", + "windows", + "windows-core", ] [[package]] name = "wgpu-types" -version = "0.20.0" +version = "27.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1353d9a46bff7f955a680577f34c69122628cc2076e1d6f3a9be6ef00ae793ef" +checksum = "afdcf84c395990db737f2dd91628706cb31e86d72e53482320d368e52b5da5eb" dependencies = [ - "bitflags 2.6.0", + "bitflags", + "bytemuck", "js-sys", + "log", + "thiserror 2.0.17", "web-sys", ] @@ -1492,10 +1234,8 @@ name = "wgpu_sort" version = "0.1.0" dependencies = [ "bytemuck", - "criterion", "env_logger", "float-ord", - "futures-intrusive", "log", "pollster", "rand", @@ -1503,58 +1243,81 @@ dependencies = [ ] [[package]] -name = "widestring" -version = "1.1.0" +name = "winapi-util" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +dependencies = [ + "windows-sys 0.52.0", +] [[package]] -name = "winapi" -version = "0.3.9" +name = "windows" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "windows-core", + "windows-targets", ] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "windows-core" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-result", + "windows-strings", + "windows-targets", +] [[package]] -name = "winapi-util" -version = "0.1.8" +name = "windows-implement" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" dependencies = [ - "windows-sys", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" +name = "windows-interface" +version = "0.58.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "windows" -version = "0.52.0" +name = "windows-link" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e48a53791691ab099e5e2ad123536d0fff50652600abaf43bbf952894110d0be" +checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-core", "windows-targets", ] [[package]] -name = "windows-core" -version = "0.52.0" +name = "windows-strings" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ + "windows-result", "windows-targets", ] @@ -1567,6 +1330,15 @@ dependencies = [ "windows-targets", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -1631,6 +1403,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "wit-bindgen" +version = "0.46.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" + [[package]] name = "xml-rs" version = "0.8.20" @@ -1639,20 +1417,20 @@ checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193" [[package]] name = "zerocopy" -version = "0.7.35" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.35" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.71", + "syn", ] diff --git a/Cargo.toml b/Cargo.toml index 26d4fcd..a6f0e49 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wgpu_sort" version = "0.1.0" -edition = "2021" +edition = "2024" authors = ["Simon Niedermayr", "Josef Stumpfegger"] license = "BSD-2-Clause" description = " WebGPU/wgpu Radix Key-Value Sort " @@ -12,31 +12,24 @@ keywords = ["wgpu", "gpu", "sort","radxi","wgpu"] categories = ["rendering","algorithms"] readme = "README.md" - [package.metadata.docs.rs] all-features = true [dependencies] -wgpu = { version = "0.20" } +wgpu = { version = "27.0" } bytemuck = { version = "1.13.0", features = ["derive"] } -futures-intrusive = "0.5.0" - log = "0.4" -env_logger = "0.11" - [dev-dependencies] -rand = "0.8.5" -pollster = { version = "0.3.0", features = ["macro"] } +env_logger = "0.11" +rand = "0.9" +pollster = { version = "0.4.0", features = ["macro"] } float-ord = "0.3.2" -criterion = { version = "0.4", features = ["html_reports"] } - [[bench]] name = "sort" harness = false - [[example]] name = "sort" diff --git a/benches/sort.rs b/benches/sort.rs index 3e9fbe2..a4f8fa4 100644 --- a/benches/sort.rs +++ b/benches/sort.rs @@ -1,102 +1,116 @@ use std::{num::NonZeroU32, time::Duration}; -use wgpu_sort::{utils::{download_buffer, guess_workgroup_size}, GPUSorter, SortBuffers}; - -struct SortStuff{ - device:wgpu::Device, - queue:wgpu::Queue, - query_set:wgpu::QuerySet, - query_buffer:wgpu::Buffer, +use wgpu_sort::{ + GPUSorter, SortBuffers, + utils::{download_buffer, guess_workgroup_size}, +}; + +struct SortStuff { + device: wgpu::Device, + queue: wgpu::Queue, + query_set: wgpu::QuerySet, + query_buffer: wgpu::Buffer, } -async fn setup()-> SortStuff{ - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor::default()); - - let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None) - .await - .unwrap(); - - let (device, queue) = adapter - .request_device( - &wgpu::DeviceDescriptor { - required_features: wgpu::Features::TIMESTAMP_QUERY, - required_limits: wgpu::Limits{ - max_buffer_size:1<<30, - max_storage_buffer_binding_size:1<<30, - ..Default::default() - }, - label: None, - }, - None, - ) - .await - .unwrap(); - - let capacity = 2; - let query_set = device.create_query_set(&wgpu::QuerySetDescriptor { - label: Some("time stamp query set"), - ty: wgpu::QueryType::Timestamp, - count: capacity, - }); - - - let query_buffer = device.create_buffer(&wgpu::BufferDescriptor { - label: Some("query set buffer"), - size: capacity as u64 * std::mem::size_of::() as u64, - usage: wgpu::BufferUsages::QUERY_RESOLVE | wgpu::BufferUsages::COPY_SRC, - mapped_at_creation: false, - }); - - return SortStuff{device,queue,query_set,query_buffer} - +async fn setup() -> SortStuff { + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor::default()); + + let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None) + .await + .unwrap(); + + let (device, queue) = adapter + .request_device(&wgpu::DeviceDescriptor { + required_features: wgpu::Features::TIMESTAMP_QUERY, + required_limits: wgpu::Limits { + max_buffer_size: 1 << 30, + max_storage_buffer_binding_size: 1 << 30, + ..Default::default() + }, + experimental_features: Default::default(), + memory_hints: Default::default(), + label: None, + trace: Default::default(), + }) + .await + .unwrap(); + + let capacity = 2; + let query_set = device.create_query_set(&wgpu::QuerySetDescriptor { + label: Some("time stamp query set"), + ty: wgpu::QueryType::Timestamp, + count: capacity, + }); + + let query_buffer = device.create_buffer(&wgpu::BufferDescriptor { + label: Some("query set buffer"), + size: capacity as u64 * std::mem::size_of::() as u64, + usage: wgpu::BufferUsages::QUERY_RESOLVE | wgpu::BufferUsages::COPY_SRC, + mapped_at_creation: false, + }); + + SortStuff { + device, + queue, + query_set, + query_buffer, + } } -async fn sort(context:&SortStuff,sorter:&GPUSorter,buffers:&SortBuffers,n:u32,iters:u32) -> Duration { - - let mut encoder = context.device.create_command_encoder(&wgpu::CommandEncoderDescriptor { - label: None, - }); - - encoder.write_timestamp(&context.query_set, 0); - - for _ in 0..iters{ - sorter.sort(&mut encoder,&context.queue,buffers,Some(n)); - } - - encoder.write_timestamp(&context.query_set, 1); - encoder.resolve_query_set( - &context.query_set, - 0..2, - &context.query_buffer, - 0, - ); - let idx = context.queue.submit([encoder.finish()]); - context.device.poll(wgpu::Maintain::WaitForSubmissionIndex(idx)); - - let timestamps : Vec = pollster::block_on(download_buffer(&context.query_buffer, &context.device, &context.queue, ..)); - let diff_ticks = timestamps[1] - timestamps[0]; - let period = context.queue.get_timestamp_period(); - let diff_time = Duration::from_nanos((diff_ticks as f32 * period / iters as f32) as u64); - - return diff_time; +async fn sort( + context: &SortStuff, + sorter: &GPUSorter, + buffers: &SortBuffers, + n: u32, + iters: u32, +) -> Duration { + let mut encoder = context + .device + .create_command_encoder(&wgpu::CommandEncoderDescriptor { label: None }); + + encoder.write_timestamp(&context.query_set, 0); + + for _ in 0..iters { + sorter.sort(&mut encoder, &context.queue, buffers, Some(n)); + } + + encoder.write_timestamp(&context.query_set, 1); + encoder.resolve_query_set(&context.query_set, 0..2, &context.query_buffer, 0); + let idx = context.queue.submit([encoder.finish()]); + context + .device + .poll(wgpu::PollType::Wait { + submission_index: Some(idx), + timeout: None, + }) + .unwrap(); + + let timestamps: Vec = pollster::block_on(download_buffer( + &context.query_buffer, + &context.device, + &context.queue, + .., + )); + let diff_ticks = timestamps[1] - timestamps[0]; + let period = context.queue.get_timestamp_period(); + let diff_time = Duration::from_nanos((diff_ticks as f32 * period / iters as f32) as u64); + + diff_time } - - #[pollster::main] async fn main() { + let context = setup().await; - let context = setup().await; + let subgroup_size = guess_workgroup_size(&context.device, &context.queue) + .await + .expect("could not find a valid subgroup size"); - let subgroup_size = guess_workgroup_size(&context.device, &context.queue).await.expect("could not find a valid subgroup size"); + let sorter = GPUSorter::new(&context.device, subgroup_size); - let sorter = GPUSorter::new(&context.device, subgroup_size); - - - for n in [10_000,100_000,1_000_000,8_000_000,20_000_000]{ - let buffers = sorter.create_sort_buffers(&context.device, NonZeroU32::new(n).unwrap()); - let d = sort(&context,&sorter, &buffers,n,10000).await; - println!("{n}: {d:?}"); - } - } - + for n in [10_000, 100_000, 1_000_000, 8_000_000, 20_000_000] { + let buffers = sorter.create_sort_buffers(&context.device, NonZeroU32::new(n).unwrap()); + let d = sort(&context, &sorter, &buffers, n, 10000).await; + println!("{n}: {d:?}"); + } +} diff --git a/examples/sort.rs b/examples/sort.rs index 3779831..36d9d05 100644 --- a/examples/sort.rs +++ b/examples/sort.rs @@ -6,7 +6,7 @@ use wgpu_sort::{utils::{download_buffer, guess_workgroup_size, upload_to_buffer} #[pollster::main] async fn main(){ - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor::default()); + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor::default()); let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None) .await @@ -17,9 +17,11 @@ async fn main(){ &wgpu::DeviceDescriptor { required_features: wgpu::Features::empty(), required_limits: wgpu::Limits::default(), + experimental_features: Default::default(), + memory_hints: Default::default(), label: None, + trace: Default::default(), }, - None, ) .await .unwrap(); @@ -60,7 +62,7 @@ async fn main(){ // wait for sorter to finish let idx = queue.submit([encoder.finish()]); - device.poll(wgpu::Maintain::WaitForSubmissionIndex(idx)); + device.poll(wgpu::PollType::Wait { submission_index: Some(idx), timeout: None }).unwrap(); // keys buffer has padding at the end // so we only download the "valid" data diff --git a/examples/sort_indirect.rs b/examples/sort_indirect.rs index df6e3e7..4f1a20d 100644 --- a/examples/sort_indirect.rs +++ b/examples/sort_indirect.rs @@ -9,7 +9,7 @@ use wgpu_sort::{utils::{download_buffer, guess_workgroup_size, upload_to_buffer} #[pollster::main] async fn main(){ - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor::default()); + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor::default()); let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None) .await @@ -20,9 +20,11 @@ async fn main(){ &wgpu::DeviceDescriptor { required_features: wgpu::Features::empty(), required_limits: wgpu::Limits::default(), + experimental_features: Default::default(), + memory_hints: Default::default(), label: None, + trace: Default::default(), }, - None, ) .await .unwrap(); @@ -78,7 +80,7 @@ async fn main(){ // wait for sorter to fininsh let idx = queue.submit([encoder.finish()]); - device.poll(wgpu::Maintain::WaitForSubmissionIndex(idx)); + device.poll(wgpu::PollType::Wait { submission_index: Some(idx), timeout: None }).unwrap(); // keys buffer has padding at the end // so we only download the "valid" data diff --git a/src/lib.rs b/src/lib.rs index b195664..d4e6ec4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -137,49 +137,54 @@ impl GPUSorter { label: Some("Zero the histograms"), layout: Some(&pipeline_layout), module: &shader, - entry_point: "zero_histograms", + entry_point: Some("zero_histograms"), compilation_options: Default::default(), + cache: None, }); let histogram_p = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor { label: Some("calculate_histogram"), layout: Some(&pipeline_layout), module: &shader, - entry_point: "calculate_histogram", + entry_point: Some("calculate_histogram"), compilation_options: Default::default(), + cache: None, }); let prefix_p = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor { label: Some("prefix_histogram"), layout: Some(&pipeline_layout), module: &shader, - entry_point: "prefix_histogram", + entry_point: Some("prefix_histogram"), compilation_options: Default::default(), + cache: None, }); let scatter_even_p = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor { label: Some("scatter_even"), layout: Some(&pipeline_layout), module: &shader, - entry_point: "scatter_even", + entry_point: Some("scatter_even"), compilation_options: Default::default(), + cache: None, }); let scatter_odd_p = device.create_compute_pipeline(&wgpu::ComputePipelineDescriptor { label: Some("scatter_odd"), layout: Some(&pipeline_layout), module: &shader, - entry_point: "scatter_odd", + entry_point: Some("scatter_odd"), compilation_options: Default::default(), + cache: None, }); - return Self { + Self { zero_p, histogram_p, prefix_p, scatter_even_p, scatter_odd_p, - }; + } } fn bind_group_layout(device: &wgpu::Device) -> wgpu::BindGroupLayout { - return device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { + device.create_bind_group_layout(&wgpu::BindGroupLayoutDescriptor { label: Some("radix sort bind group layout"), entries: &[ wgpu::BindGroupLayoutEntry { @@ -245,7 +250,7 @@ impl GPUSorter { count: None, }, ], - }); + }) } fn create_keyval_buffers( @@ -289,7 +294,7 @@ impl GPUSorter { usage: wgpu::BufferUsages::STORAGE, mapped_at_creation: false, }); - return (keys, keys_aux, payload, payload_aux); + (keys, keys_aux, payload, payload_aux) } // calculates and allocates a buffer that is sufficient for holding all needed information for @@ -319,7 +324,7 @@ impl GPUSorter { usage: wgpu::BufferUsages::STORAGE, mapped_at_creation: false, }); - return buffer; + buffer } fn general_info_data(length: u32) -> SorterState { @@ -404,7 +409,7 @@ impl GPUSorter { }); pass.set_pipeline(&self.prefix_p); - pass.set_bind_group(0, &bind_group, &[]); + pass.set_bind_group(0, bind_group, &[]); pass.dispatch_workgroups(NUM_PASSES as u32, 1, 1); } @@ -548,7 +553,6 @@ impl GPUSorter { }, ], }); - // return (uniform_buffer, bind_group); SortBuffers { keys_a, keys_b, diff --git a/src/utils.rs b/src/utils.rs index 537178d..50a8edf 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -48,10 +48,8 @@ pub async fn download_buffer( // download buffer let buffer_slice = download_buffer.slice(range); - let (tx, rx) = futures_intrusive::channel::shared::oneshot_channel(); - buffer_slice.map_async(wgpu::MapMode::Read, move |result| tx.send(result).unwrap()); - device.poll(wgpu::Maintain::Wait); - rx.receive().await.unwrap().unwrap(); + buffer_slice.map_async(wgpu::MapMode::Read, |_| {}); + device.poll(wgpu::PollType::Wait { submission_index: None, timeout: None }).unwrap(); let data = buffer_slice.get_mapped_range(); return bytemuck::cast_slice(data.deref()).to_vec(); @@ -77,7 +75,7 @@ async fn test_sort(sorter: &GPUSorter, device: &wgpu::Device, queue: &wgpu::Queu sorter.sort(&mut encoder, queue, &sort_buffers,None); let idx = queue.submit([encoder.finish()]); - device.poll(wgpu::Maintain::WaitForSubmissionIndex(idx)); + device.poll(wgpu::PollType::Wait {submission_index: Some(idx), timeout: None }).unwrap(); let sorted = download_buffer::( &sort_buffers.keys(), diff --git a/tests/sort.rs b/tests/sort.rs index a14ea9a..a622f6b 100644 --- a/tests/sort.rs +++ b/tests/sort.rs @@ -2,210 +2,233 @@ use std::{fmt::Debug, num::NonZeroU32}; use bytemuck::bytes_of; use float_ord::FloatOrd; -use rand::{ - distributions::{Distribution, Standard}, - rngs::StdRng, - Rng, SeedableRng, -}; +use rand::distr::StandardUniform; +use rand::prelude::Distribution; +use rand::{Rng, SeedableRng, rngs::StdRng}; use wgpu::util::DeviceExt; use wgpu_sort::{ - utils::{download_buffer, guess_workgroup_size, upload_to_buffer}, - GPUSorter, SortBuffers, HISTO_BLOCK_KVS, + GPUSorter, HISTO_BLOCK_KVS, SortBuffers, + utils::{download_buffer, guess_workgroup_size, upload_to_buffer}, }; - /// tests sorting of two u32 keys #[pollster::test] async fn sort_u32_small() { - test_sort::(2,&apply_sort,None).await; + test_sort::(2, &apply_sort, None).await; } /// tests sorting of one million pairs with u32 keys #[pollster::test] async fn sort_u32_large() { - test_sort::(1_000_00,&apply_sort,None).await; + test_sort::(1_000_00, &apply_sort, None).await; } /// tests sorting of one million pairs with f32 keys #[pollster::test] async fn sort_f32_large() { - test_sort::(1_000_00,&apply_sort,None).await; + env_logger::builder().is_test(true).try_init().ok(); + test_sort::(1_000_00, &apply_sort, None).await; } /// tests sorting only first half of one million pairs #[pollster::test] async fn sort_half() { - test_sort::(1_000_000,&apply_sort,Some(500_00)).await; + test_sort::(1_000_000, &apply_sort, Some(500_00)).await; } // INDIRECT SORTING - /// tests sorting of two u32 keys /// indirect dispatch #[pollster::test] async fn sort_indirect_small() { - test_sort::(2,&apply_sort_indirect,None).await; + test_sort::(2, &apply_sort_indirect, None).await; } /// tests sorting of one million pairs with u32 keys /// indirect dispatch #[pollster::test] async fn sort_indirect_large() { - test_sort::(1_000_00,&apply_sort,None).await; + test_sort::(1_000_00, &apply_sort, None).await; } - /// tests sorting only first half of one million pairs /// indirect dispatch #[pollster::test] async fn sort_indirect_half() { - test_sort::(1_000_000,&apply_sort_indirect,Some(500_00)).await; + test_sort::(1_000_000, &apply_sort_indirect, Some(500_00)).await; } - - async fn setup() -> (wgpu::Device, wgpu::Queue) { - let instance = wgpu::Instance::new(wgpu::InstanceDescriptor::default()); - - let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None) - .await - .unwrap(); - - let (device, queue) = adapter - .request_device( - &wgpu::DeviceDescriptor { - required_features: wgpu::Features::empty(), - required_limits: wgpu::Limits::default(), - label: None, - }, - None, - ) - .await - .unwrap(); - - return (device, queue); + let instance = wgpu::Instance::new(&wgpu::InstanceDescriptor::default()); + + let adapter = wgpu::util::initialize_adapter_from_env_or_default(&instance, None) + .await + .unwrap(); + + let (device, queue) = adapter + .request_device(&wgpu::DeviceDescriptor { + required_features: wgpu::Features::empty(), + required_limits: wgpu::Limits::default(), + experimental_features: Default::default(), + memory_hints: Default::default(), + label: None, + trace: Default::default(), + }) + .await + .unwrap(); + + (device, queue) } -type SortFn = dyn Fn(&mut wgpu::CommandEncoder,&wgpu::Device,&wgpu::Queue,&GPUSorter,&SortBuffers,Option)->(); - +type SortFn = dyn Fn( + &mut wgpu::CommandEncoder, + &wgpu::Device, + &wgpu::Queue, + &GPUSorter, + &SortBuffers, + Option, +) -> (); /// applies gpu sort with direct dispatch -fn apply_sort(encoder:&mut wgpu::CommandEncoder,_device:&wgpu::Device,queue:&wgpu::Queue,sorter:&GPUSorter,sort_buffers:&SortBuffers,n:Option){ - sorter.sort(encoder, queue,&sort_buffers,n); +fn apply_sort( + encoder: &mut wgpu::CommandEncoder, + _device: &wgpu::Device, + queue: &wgpu::Queue, + sorter: &GPUSorter, + sort_buffers: &SortBuffers, + n: Option, +) { + sorter.sort(encoder, queue, &sort_buffers, n); } - /// applies gpu sort with indirect dispatch -fn apply_sort_indirect(encoder:&mut wgpu::CommandEncoder,device:&wgpu::Device,queue:&wgpu::Queue,sorter:&GPUSorter,sort_buffers:&SortBuffers,n:Option){ - - // round to next larger multiple of HISTO_BLOCK_KVS - let nelm = n.unwrap_or(sort_buffers.len()); - let num_wg = (nelm + HISTO_BLOCK_KVS- 1)/HISTO_BLOCK_KVS; - - let dispatch_indirect = wgpu::util::DispatchIndirectArgs{ - x: num_wg, - y: 1, - z: 1 - }; - - queue.write_buffer(sort_buffers.state_buffer(), 0, bytes_of(&nelm)); - - let dispatch_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor{ - label: Some("dispatch indirect buffer"), - contents: dispatch_indirect.as_bytes(), - usage: wgpu::BufferUsages::INDIRECT, - }); - - sorter.sort_indirect(encoder, &sort_buffers,&dispatch_buffer); +fn apply_sort_indirect( + encoder: &mut wgpu::CommandEncoder, + device: &wgpu::Device, + queue: &wgpu::Queue, + sorter: &GPUSorter, + sort_buffers: &SortBuffers, + n: Option, +) { + // round to next larger multiple of HISTO_BLOCK_KVS + let nelm = n.unwrap_or(sort_buffers.len()); + let num_wg = (nelm + HISTO_BLOCK_KVS - 1) / HISTO_BLOCK_KVS; + + let dispatch_indirect = wgpu::util::DispatchIndirectArgs { + x: num_wg, + y: 1, + z: 1, + }; + + queue.write_buffer(sort_buffers.state_buffer(), 0, bytes_of(&nelm)); + + let dispatch_buffer = device.create_buffer_init(&wgpu::util::BufferInitDescriptor { + label: Some("dispatch indirect buffer"), + contents: dispatch_indirect.as_bytes(), + usage: wgpu::BufferUsages::INDIRECT, + }); + + sorter.sort_indirect(encoder, &sort_buffers, &dispatch_buffer); } -async fn test_sort(n: u32,sort_fn:&SortFn,sort_first_n:Option) +async fn test_sort(n: u32, sort_fn: &SortFn, sort_first_n: Option) where - Standard: Distribution, - T: PartialEq + Clone + Copy + Debug + bytemuck::Pod + Ord + StandardUniform: Distribution, + T: PartialEq + Clone + Copy + Debug + bytemuck::Pod + Ord, { - let (device, queue) = setup().await; - let subgroup_size = guess_workgroup_size(&device, &queue).await; - assert_ne!(subgroup_size, None); - let sorter = GPUSorter::new(&device, subgroup_size.unwrap()); - - let sort_buffers = sorter.create_sort_buffers(&device, NonZeroU32::new(n).unwrap()); - let n_sorted = sort_first_n.unwrap_or(sort_buffers.len()); - - - let mut rng = StdRng::seed_from_u64(0); - let keys_scrambled: Vec = (0..n).map(|_| rng.gen()).collect(); - let mut keys_sorted = keys_scrambled.clone(); - keys_sorted[0..n_sorted as usize].sort(); - - - let values_scrambled = keys_scrambled.clone(); - let values_sorted = keys_sorted.clone(); - - let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { - label: Some("GPURSSorter test_sort"), - }); - - upload_to_buffer( - &mut encoder, - &sort_buffers.keys(), - &device, - keys_scrambled.as_slice(), - ); - upload_to_buffer( - &mut encoder, - &sort_buffers.values(), - &device, - values_scrambled.as_slice(), - ); - - // sorter.sort(&mut encoder, &sort_buffers); - sort_fn(&mut encoder,&device,&queue,&sorter,&sort_buffers,sort_first_n); - - let idx = queue.submit([encoder.finish()]); - device.poll(wgpu::Maintain::WaitForSubmissionIndex(idx)); - - let keys_sorted_gpu = download_buffer::( - &sort_buffers.keys(), - &device, - &queue, - 0..sort_buffers.keys_valid_size(), - ) - .await; - assert_eq!( - keys_sorted_gpu[0..n_sorted as usize], keys_sorted[0..n_sorted as usize], - "GPU keys equal to keys sorted on CPU" - ); - - let values_sorted_gpu = download_buffer::(&sort_buffers.values(), &device, &queue, ..).await; - assert_eq!( - values_sorted_gpu[0..n_sorted as usize], values_sorted[0..n_sorted as usize], - "GPU values equal to values sorted on CPU" - ); + let (device, queue) = setup().await; + let subgroup_size = guess_workgroup_size(&device, &queue).await; + assert_ne!(subgroup_size, None); + let sorter = GPUSorter::new(&device, subgroup_size.unwrap()); + + let sort_buffers = sorter.create_sort_buffers(&device, NonZeroU32::new(n).unwrap()); + let n_sorted = sort_first_n.unwrap_or(sort_buffers.len()); + + let mut rng = StdRng::seed_from_u64(0); + let keys_scrambled: Vec = (0..n).map(|_| rng.random()).collect(); + let mut keys_sorted = keys_scrambled.clone(); + keys_sorted[0..n_sorted as usize].sort(); + + let values_scrambled = keys_scrambled.clone(); + let values_sorted = keys_sorted.clone(); + + let mut encoder = device.create_command_encoder(&wgpu::CommandEncoderDescriptor { + label: Some("GPURSSorter test_sort"), + }); + + upload_to_buffer( + &mut encoder, + &sort_buffers.keys(), + &device, + keys_scrambled.as_slice(), + ); + upload_to_buffer( + &mut encoder, + &sort_buffers.values(), + &device, + values_scrambled.as_slice(), + ); + + // sorter.sort(&mut encoder, &sort_buffers); + sort_fn( + &mut encoder, + &device, + &queue, + &sorter, + &sort_buffers, + sort_first_n, + ); + + let idx = queue.submit([encoder.finish()]); + device + .poll(wgpu::PollType::Wait { + submission_index: Some(idx), + timeout: None, + }) + .unwrap(); + + let keys_sorted_gpu = download_buffer::( + &sort_buffers.keys(), + &device, + &queue, + 0..sort_buffers.keys_valid_size(), + ) + .await; + assert_eq!( + keys_sorted_gpu[0..n_sorted as usize], + keys_sorted[0..n_sorted as usize], + "GPU keys equal to keys sorted on CPU" + ); + + let values_sorted_gpu = download_buffer::(&sort_buffers.values(), &device, &queue, ..).await; + assert_eq!( + values_sorted_gpu[0..n_sorted as usize], + values_sorted[0..n_sorted as usize], + "GPU values equal to values sorted on CPU" + ); } - // ordered float #[repr(C)] -#[derive(PartialEq,Debug,Clone, Copy,bytemuck::Pod,bytemuck::Zeroable)] +#[derive(PartialEq, Debug, Clone, Copy, bytemuck::Pod, bytemuck::Zeroable)] struct Float(f32); -impl Eq for Float{} +impl Eq for Float {} -impl Ord for Float{ - fn cmp(&self, other: &Self) -> std::cmp::Ordering { - FloatOrd(self.0).cmp(&FloatOrd(other.0)) - } +impl Ord for Float { + fn cmp(&self, other: &Self) -> std::cmp::Ordering { + FloatOrd(self.0).cmp(&FloatOrd(other.0)) + } } -impl PartialOrd for Float{ - fn partial_cmp(&self, other: &Self) -> Option { - self.0.partial_cmp(&other.0) - } +impl PartialOrd for Float { + fn partial_cmp(&self, other: &Self) -> Option { + self.0.partial_cmp(&other.0) + } +} +impl Distribution for StandardUniform { + fn sample(&self, rng: &mut R) -> Float { + Float(rng.random()) + } } -impl Distribution for Standard { - fn sample(&self, rng: &mut R) -> Float { - Float(rng.gen()) - } -} \ No newline at end of file