diff --git a/Cargo.lock b/Cargo.lock index 3f23f96..0cdbae6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -178,6 +178,12 @@ dependencies = [ "libc", ] +[[package]] +name = "anyhow" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e0fee31ef5ed1ba1316088939cea399010ed7731dba877ed44aeb407a75ea" + [[package]] name = "approx" version = "0.5.1" @@ -220,7 +226,7 @@ version = "0.38.0+1.3.281" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" dependencies = [ - "libloading", + "libloading 0.8.9", ] [[package]] @@ -392,7 +398,7 @@ dependencies = [ "ron", "serde", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "thread_local", "tracing", "uuid", @@ -448,7 +454,7 @@ dependencies = [ "ctrlc", "downcast-rs 2.0.2", "log", - "thiserror 2.0.17", + "thiserror 2.0.18", "variadics_please", "wasm-bindgen", "web-sys", @@ -488,7 +494,7 @@ dependencies = [ "ron", "serde", "stackfuture", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "uuid", "wasm-bindgen", @@ -548,7 +554,7 @@ dependencies = [ "downcast-rs 2.0.2", "serde", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-types", ] @@ -564,7 +570,7 @@ dependencies = [ "derive_more", "encase", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-types", ] @@ -594,7 +600,7 @@ dependencies = [ "nonmax", "radsort", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -680,7 +686,7 @@ dependencies = [ "serde", "slotmap", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "variadics_please", ] @@ -718,7 +724,7 @@ dependencies = [ "bevy_platform", "bevy_time", "gilrs", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -810,7 +816,7 @@ dependencies = [ "serde", "serde_json", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -838,7 +844,7 @@ dependencies = [ "rectangle-pack", "ruzstd", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] @@ -857,7 +863,7 @@ dependencies = [ "derive_more", "log", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -874,7 +880,7 @@ dependencies = [ "bevy_reflect", "bevy_window", "log", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -998,7 +1004,7 @@ dependencies = [ "rand", "rand_distr", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "variadics_please", ] @@ -1022,7 +1028,7 @@ dependencies = [ "bytemuck", "derive_more", "hexasphere", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] @@ -1056,7 +1062,7 @@ dependencies = [ "jni 0.20.0", "ndk-context", "openxr", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu", "wgpu-hal", "winapi", @@ -1067,7 +1073,7 @@ name = "bevy_mod_webxr" version = "0.0.0" dependencies = [ "bevy_mod_xr", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu", "wgpu-hal", ] @@ -1134,7 +1140,7 @@ dependencies = [ "offset-allocator", "smallvec", "static_assertions", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -1208,7 +1214,7 @@ dependencies = [ "nonmax", "radsort", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", ] @@ -1241,7 +1247,7 @@ dependencies = [ "serde", "smallvec", "smol_str", - "thiserror 2.0.17", + "thiserror 2.0.18", "uuid", "variadics_please", "wgpu-types", @@ -1303,7 +1309,7 @@ dependencies = [ "offset-allocator", "send_wrapper", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "variadics_please", "wasm-bindgen", @@ -1341,7 +1347,7 @@ dependencies = [ "derive_more", "ron", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "uuid", ] @@ -1357,7 +1363,7 @@ dependencies = [ "naga", "naga_oil", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] @@ -1486,7 +1492,7 @@ dependencies = [ "serde", "smallvec", "sys-locale", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "wgpu-types", ] @@ -1521,7 +1527,7 @@ dependencies = [ "bevy_utils", "derive_more", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -1553,7 +1559,7 @@ dependencies = [ "derive_more", "smallvec", "taffy", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "uuid", ] @@ -1789,9 +1795,9 @@ checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510" [[package]] name = "bytemuck" -version = "1.24.0" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" +checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" dependencies = [ "bytemuck_derive", ] @@ -1821,9 +1827,9 @@ checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" [[package]] name = "bytes" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "bzip2" @@ -1872,9 +1878,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.52" +version = "1.2.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4932aefd12402b36c60956a4fe0035421f544799057659ff86f923657aada3" +checksum = "47b26a0954ae34af09b50f0de26458fa95369a0d478d8236d3f93082b219bd29" dependencies = [ "find-msvc-tools", "jobserver", @@ -1927,7 +1933,7 @@ checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" dependencies = [ "glob", "libc", - "libloading", + "libloading 0.8.9", ] [[package]] @@ -2249,12 +2255,12 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.5.1" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73736a89c4aff73035ba2ed2e565061954da00d4970fc9ac25dcc85a2a20d790" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ "dispatch2", - "nix", + "nix 0.31.1", "windows-sys 0.61.2", ] @@ -2284,9 +2290,9 @@ checksum = "26bf8fc351c5ed29b5c2f0cbbac1b209b74f60ecd62e675a998df72c49af5204" [[package]] name = "deranged" -version = "0.5.5" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" +checksum = "cc3dc5ad92c2e2d1c193bbbbdf2ea477cb81331de4f3103f267ca18368b988c4" dependencies = [ "powerfmt", ] @@ -2377,7 +2383,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" dependencies = [ - "libloading", + "libloading 0.8.9", ] [[package]] @@ -2421,7 +2427,7 @@ checksum = "6e3e0ff2ee0b7aa97428308dd9e1e42369cb22f5fb8dc1c55546637443a60f1e" dependencies = [ "const_panic", "encase_derive", - "thiserror 2.0.17", + "thiserror 2.0.18", ] [[package]] @@ -2482,9 +2488,9 @@ dependencies = [ [[package]] name = "euclid" -version = "0.22.11" +version = "0.22.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9cdb4b747e485a12abb0e6566612956c7a1bafa3bdb8d682c5b6d403589e48" +checksum = "df61bf483e837f88d5c2291dcf55c67be7e676b3a51acc48db3a7b163b91ed63" dependencies = [ "num-traits", ] @@ -2527,9 +2533,9 @@ dependencies = [ [[package]] name = "find-msvc-tools" -version = "0.1.7" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f449e6c6c08c865631d4890cfacf252b3d396c9bcc83adb6623cdb02a8336c41" +checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" [[package]] name = "fixedbitset" @@ -2539,9 +2545,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" [[package]] name = "flate2" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369" +checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" dependencies = [ "crc32fast", "miniz_oxide", @@ -2768,6 +2774,19 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "getrandom" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasip2", + "wasip3", +] + [[package]] name = "gilrs" version = "0.11.1" @@ -2792,7 +2811,7 @@ dependencies = [ "libc", "libudev-sys", "log", - "nix", + "nix 0.30.1", "objc2-core-foundation", "objc2-io-kit", "uuid", @@ -3041,6 +3060,12 @@ dependencies = [ "stable_deref_trait", ] +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.5.2" @@ -3168,14 +3193,13 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" +checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ "base64", "bytes", "futures-channel", - "futures-core", "futures-util", "http", "http-body", @@ -3273,6 +3297,12 @@ dependencies = [ "zerovec", ] +[[package]] +name = "id-arena" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" + [[package]] name = "idna" version = "1.1.0" @@ -3451,9 +3481,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" +checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3" dependencies = [ "once_cell", "wasm-bindgen", @@ -3466,7 +3496,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76" dependencies = [ "libc", - "libloading", + "libloading 0.8.9", "pkg-config", ] @@ -3491,6 +3521,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +[[package]] +name = "leb128fmt" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" + [[package]] name = "lewton" version = "0.10.2" @@ -3519,10 +3555,20 @@ dependencies = [ ] [[package]] -name = "libm" -version = "0.2.15" +name = "libloading" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60" +dependencies = [ + "cfg-if", + "windows-link 0.2.1", +] + +[[package]] +name = "libm" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" @@ -3532,7 +3578,7 @@ checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616" dependencies = [ "bitflags 2.10.0", "libc", - "redox_syscall 0.7.0", + "redox_syscall 0.7.1", ] [[package]] @@ -3640,9 +3686,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.6" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273" +checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79" [[package]] name = "memmap2" @@ -3740,7 +3786,7 @@ dependencies = [ "pp-rs", "rustc-hash 1.1.0", "spirv", - "thiserror 2.0.17", + "thiserror 2.0.18", "unicode-ident", ] @@ -3756,7 +3802,7 @@ dependencies = [ "naga", "regex", "rustc-hash 1.1.0", - "thiserror 2.0.17", + "thiserror 2.0.18", "tracing", "unicode-ident", ] @@ -3843,6 +3889,18 @@ dependencies = [ "libc", ] +[[package]] +name = "nix" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225e7cfe711e0ba79a68baeddb2982723e4235247aefce1482f2f16c27865b66" +dependencies = [ + "bitflags 2.10.0", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -3861,9 +3919,9 @@ checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" [[package]] name = "ntapi" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70f219e21142367c70c0b30c6a9e3a14d55b4d12a204d897fbec83a0363f081" +checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" dependencies = [ "winapi", ] @@ -3879,9 +3937,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" +checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" [[package]] name = "num-derive" @@ -4261,21 +4319,21 @@ dependencies = [ [[package]] name = "openxr" -version = "0.19.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a2d6934d2508f94fd4cbda6c2a326f111f60ce59fd9136df6d478564397dd40" +checksum = "2c2f814a47d257c79c762bc64042859661b6aa2f57cfa1f0ad4d778f419aeb0e" dependencies = [ "libc", - "libloading", + "libloading 0.9.0", "ndk-context", "openxr-sys", ] [[package]] name = "openxr-sys" -version = "0.11.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f10e7e38c47f2175fc39363713b656db899fa0b4a14341029702cbdfa6f44d05" +checksum = "4b8d66081de28c2fa40216182a37292fe38aeea20bc184612504d5e64daf5359" dependencies = [ "cmake", "libc", @@ -4284,9 +4342,9 @@ dependencies = [ [[package]] name = "openxr_mndx_xdev_space" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc03c3948dceb287224eaa9079a5d4f690e91b43a2385da6c686edf0f850408a" +checksum = "b1b0e85e7ff61dcce98c9e1981f9181bc935242cb3239bd6ec6cad83aa0c2897" dependencies = [ "openxr", ] @@ -4461,15 +4519,15 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f89776e4d69bb58bc6993e99ffa1d11f228b839984854c7daeb5d37f87cbe950" +checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +checksum = "7a9db96d7fa8782dd8c15ce32ffe8680bbd1e978a43bf51a34d39483540495f5" dependencies = [ "portable-atomic", ] @@ -4513,6 +4571,16 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa" +[[package]] +name = "prettyplease" +version = "0.2.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" +dependencies = [ + "proc-macro2", + "syn", +] + [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -4524,9 +4592,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.105" +version = "1.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7" +checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" dependencies = [ "unicode-ident", ] @@ -4557,9 +4625,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.43" +version = "1.0.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a" +checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" dependencies = [ "proc-macro2", ] @@ -4680,18 +4748,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.7.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f3fe0889e69e2ae9e41f4d6c4c0181701d00e4697b356fb1f74173a5e0ee27" +checksum = "35985aa610addc02e24fc232012c86fd11f14111180f902b67e2d5331f8ebf2b" dependencies = [ "bitflags 2.10.0", ] [[package]] name = "regex" -version = "1.12.2" +version = "1.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" +checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" dependencies = [ "aho-corasick", "memchr", @@ -4701,9 +4769,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -4712,9 +4780,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" +checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" [[package]] name = "renderdoc-sys" @@ -4870,18 +4938,18 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.2" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21e6f2ab2928ca4291b86736a8bd920a277a399bba1589409d72154ff87c1282" +checksum = "be040f8b0a225e40375822a563fa9524378b9d63112f53e19ffff34df5d33fdd" dependencies = [ "zeroize", ] [[package]] name = "rustls-webpki" -version = "0.103.8" +version = "0.103.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" +checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" dependencies = [ "ring", "rustls-pki-types", @@ -4905,9 +4973,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a50f4cf475b65d88e057964e0e9bb1f0aa9bbb2036dc65c64596b42932536984" +checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" [[package]] name = "same-file" @@ -5102,9 +5170,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" +checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "slotmap" @@ -5157,9 +5225,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.6.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17129e116933cf371d018bb80ae557e889637989d8638274fb25622827b03881" +checksum = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0" dependencies = [ "libc", "windows-sys 0.60.2", @@ -5235,9 +5303,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.114" +version = "2.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a" +checksum = "6e614ed320ac28113fa64972c4262d5dbc89deacdfd00c34a3e4cea073243c12" dependencies = [ "proc-macro2", "quote", @@ -5289,9 +5357,9 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +checksum = "a13f3d0daba03132c0aa9767f98351b3488edc2c100cda2d2ec2b04f3d8d3c8b" dependencies = [ "bitflags 2.10.0", "core-foundation 0.9.4", @@ -5322,12 +5390,12 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.24.0" +version = "3.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "655da9c7eb6305c55742045d5a8d2037996d61d8de95806335c7c86ce0f82e9c" +checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1" dependencies = [ "fastrand", - "getrandom 0.3.4", + "getrandom 0.4.1", "once_cell", "rustix 1.1.3", "windows-sys 0.61.2", @@ -5353,11 +5421,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" +checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" dependencies = [ - "thiserror-impl 2.0.17", + "thiserror-impl 2.0.18", ] [[package]] @@ -5373,9 +5441,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.17" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" +checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", @@ -5393,9 +5461,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.45" +version = "0.3.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd" +checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" dependencies = [ "deranged", "num-conv", @@ -5406,9 +5474,9 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca" +checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" [[package]] name = "tiny-skia" @@ -5530,9 +5598,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.6+spec-1.1.0" +version = "1.0.7+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3198b4b0a8e11f09dd03e133c0280504d0801269e9afa46362ffde1cbeebf44" +checksum = "247eaa3197818b831697600aadf81514e577e0cba5eab10f7e064e78ae154df1" dependencies = [ "winnow", ] @@ -5713,9 +5781,9 @@ checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" +checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e" [[package]] name = "unicode-linebreak" @@ -5773,9 +5841,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" +checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f" dependencies = [ "getrandom 0.3.4", "js-sys", @@ -5845,18 +5913,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +dependencies = [ + "wit-bindgen", +] + +[[package]] +name = "wasip3" +version = "0.4.0+wasi-0.3.0-rc-2026-01-06" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" +checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566" dependencies = [ "cfg-if", "once_cell", @@ -5867,11 +5944,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.56" +version = "0.4.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" +checksum = "70a6e77fd0ae8029c9ea0063f87c46fde723e7d887703d74ad2616d792e51e6f" dependencies = [ "cfg-if", + "futures-util", "js-sys", "once_cell", "wasm-bindgen", @@ -5880,9 +5958,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" +checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5890,9 +5968,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" +checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55" dependencies = [ "bumpalo", "proc-macro2", @@ -5903,13 +5981,47 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.106" +version = "0.2.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" +checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12" dependencies = [ "unicode-ident", ] +[[package]] +name = "wasm-encoder" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" +dependencies = [ + "leb128fmt", + "wasmparser", +] + +[[package]] +name = "wasm-metadata" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" +dependencies = [ + "anyhow", + "indexmap", + "wasm-encoder", + "wasmparser", +] + +[[package]] +name = "wasmparser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" +dependencies = [ + "bitflags 2.10.0", + "hashbrown 0.15.5", + "indexmap", + "semver", +] + [[package]] name = "wayland-backend" version = "0.3.12" @@ -6020,9 +6132,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.83" +version = "0.3.85" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" +checksum = "312e32e551d92129218ea9a2452120f4aabc03529ef03e4d0d82fb2780608598" dependencies = [ "js-sys", "wasm-bindgen", @@ -6091,7 +6203,7 @@ dependencies = [ "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wgpu-core-deps-apple", "wgpu-core-deps-emscripten", "wgpu-core-deps-wasm", @@ -6161,7 +6273,7 @@ dependencies = [ "js-sys", "khronos-egl", "libc", - "libloading", + "libloading 0.8.9", "log", "metal", "naga", @@ -6177,7 +6289,7 @@ dependencies = [ "raw-window-handle", "renderdoc-sys", "smallvec", - "thiserror 2.0.17", + "thiserror 2.0.18", "wasm-bindgen", "web-sys", "wgpu-types", @@ -6196,7 +6308,7 @@ dependencies = [ "js-sys", "log", "serde", - "thiserror 2.0.17", + "thiserror 2.0.18", "web-sys", ] @@ -6828,9 +6940,91 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.46.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +dependencies = [ + "wit-bindgen-rust-macro", +] + +[[package]] +name = "wit-bindgen-core" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" +dependencies = [ + "anyhow", + "heck", + "wit-parser", +] + +[[package]] +name = "wit-bindgen-rust" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" +dependencies = [ + "anyhow", + "heck", + "indexmap", + "prettyplease", + "syn", + "wasm-metadata", + "wit-bindgen-core", + "wit-component", +] + +[[package]] +name = "wit-bindgen-rust-macro" +version = "0.51.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" +dependencies = [ + "anyhow", + "prettyplease", + "proc-macro2", + "quote", + "syn", + "wit-bindgen-core", + "wit-bindgen-rust", +] + +[[package]] +name = "wit-component" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" +dependencies = [ + "anyhow", + "bitflags 2.10.0", + "indexmap", + "log", + "serde", + "serde_derive", + "serde_json", + "wasm-encoder", + "wasm-metadata", + "wasmparser", + "wit-parser", +] + +[[package]] +name = "wit-parser" +version = "0.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" +dependencies = [ + "anyhow", + "id-arena", + "indexmap", + "log", + "semver", + "serde", + "serde_derive", + "serde_json", + "unicode-xid", + "wasmparser", +] [[package]] name = "writeable" @@ -6858,7 +7052,7 @@ dependencies = [ "as-raw-xcb-connection", "gethostname", "libc", - "libloading", + "libloading 0.8.9", "once_cell", "rustix 1.1.3", "x11rb-protocol", @@ -6947,18 +7141,18 @@ checksum = "6df3dc4292935e51816d896edcd52aa30bc297907c26167fec31e2b0c6a32524" [[package]] name = "zerocopy" -version = "0.8.33" +version = "0.8.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" +checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.33" +version = "0.8.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" +checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517" dependencies = [ "proc-macro2", "quote", @@ -7061,7 +7255,7 @@ dependencies = [ "memchr", "pbkdf2", "sha1", - "thiserror 2.0.17", + "thiserror 2.0.18", "time", "xz2", "zeroize", @@ -7071,9 +7265,9 @@ dependencies = [ [[package]] name = "zmij" -version = "1.0.14" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd8f3f50b848df28f887acb68e41201b5aea6bc8a8dacc00fb40635ff9a72fea" +checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" [[package]] name = "zopfli" diff --git a/Cargo.toml b/Cargo.toml index a3bd366..b92de91 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ bevy_platform = { version = "0.18", default-features = false } bevy_mod_xr = { path = "crates/bevy_xr", version = "0.4.0" } bevy_mod_openxr = { path = "crates/bevy_openxr", version = "0.4.0" } bevy_xr_utils = { path = "crates/bevy_xr_utils", version = "0.4.0" } -openxr = "0.19.0" +openxr = "0.21.1" thiserror = "2.0.3" wgpu = "27" wgpu-hal = "27" diff --git a/crates/bevy_openxr/src/openxr/exts.rs b/crates/bevy_openxr/src/openxr/exts.rs index 30250b9..4319dfa 100644 --- a/crates/bevy_openxr/src/openxr/exts.rs +++ b/crates/bevy_openxr/src/openxr/exts.rs @@ -1,5 +1,11 @@ +use std::{ + ffi::CStr, + ops::{BitAnd, BitOr}, +}; + use bevy_derive::{Deref, DerefMut}; use bevy_ecs::resource::Resource; +use bevy_log::error; use openxr::ExtensionSet; #[derive(Clone, Debug, Eq, PartialEq, Deref, DerefMut, Resource)] @@ -36,7 +42,47 @@ impl OxrExtensions { } /// returns true if all of the extensions enabled are also available in `available_exts` pub fn is_available(&self, available_exts: &OxrExtensions) -> bool { - self.clone() & available_exts.clone() == *self + self.0.intersection(&available_exts) == self.0 + } + /// Returns any extensions needed by `required_exts` that aren't available in `self` + pub fn unavailable_exts(&self, required_exts: &Self) -> Vec { + required_exts + .difference(&self) + .names() + .into_iter() + .filter_map(|v| { + CStr::from_bytes_with_nul(v) + .inspect_err(|err| error!("failed to convert openxr ext name to CStr: {err}")) + .ok() + }) + .filter_map(|v| { + v.to_str() + .inspect_err(|err| error!("openxr ext name is not valid utf8: {err}")) + .ok() + }) + .map(|v| v.to_string()) + .collect() + } +} +impl BitOr for OxrExtensions { + type Output = Self; + + // this is horribly slow, but doesn't require a bunch of code duplication + fn bitor(self, rhs: Self) -> Self::Output { + Self( + self.0 + .names() + .into_iter() + .chain(rhs.names().into_iter()) + .collect(), + ) + } +} +impl BitAnd for OxrExtensions { + type Output = Self; + + fn bitand(self, rhs: Self) -> Self::Output { + Self(self.intersection(&rhs)) } } impl From for OxrExtensions { @@ -56,293 +102,3 @@ impl Default for OxrExtensions { Self(exts) } } - -macro_rules! unavailable_exts { - ( - $exts:ty; - $( - $( - #[$meta:meta] - )* - $ident:ident - ),* - $(,)? - ) => { - impl $exts { - /// Returns any extensions needed by `required_exts` that aren't available in `self` - pub fn unavailable_exts(&self, required_exts: &Self) -> Vec> { - let mut exts = vec![]; - $( - $( - #[$meta] - )* - if required_exts.0.$ident && !self.0.$ident { - exts.push(std::borrow::Cow::Borrowed(stringify!($ident))) - } - )* - for ext in required_exts.0.other.iter() { - if !self.0.other.contains(ext) { - exts.push(std::borrow::Cow::Owned(ext.clone())) - } - } - exts - } - } - }; -} - -macro_rules! bitor { - ( - $exts:ty; - $( - $( - #[$meta:meta] - )* - $ident:ident - ),* - $(,)? - ) => { - impl std::ops::BitOr for $exts { - type Output = Self; - - fn bitor(self, rhs: Self) -> Self::Output { - let mut out = ExtensionSet::default(); - $( - $( - #[$meta] - )* - { - out.$ident = self.0.$ident || rhs.0.$ident; - } - - )* - out.other = self.0.other; - for ext in rhs.0.other { - if !out.other.contains(&ext) { - out.other.push(ext); - } - } - Self(out) - } - } - }; -} - -macro_rules! bitand { - ( - $exts:ty; - $( - $( - #[$meta:meta] - )* - $ident:ident - ),* - $(,)? - ) => { - impl std::ops::BitAnd for $exts { - type Output = Self; - - fn bitand(self, rhs: Self) -> Self::Output { - let mut out = ExtensionSet::default(); - $( - $( - #[$meta] - )* - { - out.$ident = self.0.$ident && rhs.0.$ident; - } - - )* - for ext in self.0.other { - if rhs.0.other.contains(&ext) { - out.other.push(ext); - } - } - Self(out) - } - } - }; -} - -macro_rules! impl_ext { - ( - $( - $macro:ident - ),* - - ) => { - $( - $macro! { - OxrExtensions; - almalence_digital_lens_control, - bd_controller_interaction, - epic_view_configuration_fov, - ext_performance_settings, - ext_thermal_query, - ext_debug_utils, - ext_eye_gaze_interaction, - ext_view_configuration_depth_range, - ext_conformance_automation, - ext_hand_tracking, - #[cfg(windows)] - ext_win32_appcontainer_compatible, - ext_dpad_binding, - ext_hand_joints_motion_range, - ext_samsung_odyssey_controller, - ext_hp_mixed_reality_controller, - ext_palm_pose, - ext_uuid, - ext_hand_interaction, - ext_active_action_set_priority, - ext_local_floor, - ext_hand_tracking_data_source, - ext_plane_detection, - ext_future, - ext_user_presence, - fb_composition_layer_image_layout, - fb_composition_layer_alpha_blend, - #[cfg(target_os = "android")] - fb_android_surface_swapchain_create, - fb_swapchain_update_state, - fb_composition_layer_secure_content, - fb_body_tracking, - fb_display_refresh_rate, - fb_color_space, - fb_hand_tracking_mesh, - fb_hand_tracking_aim, - fb_hand_tracking_capsules, - fb_spatial_entity, - fb_foveation, - fb_foveation_configuration, - fb_keyboard_tracking, - fb_triangle_mesh, - fb_passthrough, - fb_render_model, - fb_spatial_entity_query, - fb_spatial_entity_storage, - fb_foveation_vulkan, - #[cfg(target_os = "android")] - fb_swapchain_update_state_android_surface, - fb_swapchain_update_state_opengl_es, - fb_swapchain_update_state_vulkan, - fb_touch_controller_pro, - fb_spatial_entity_sharing, - fb_space_warp, - fb_haptic_amplitude_envelope, - fb_scene, - fb_scene_capture, - fb_spatial_entity_container, - fb_face_tracking, - fb_eye_tracking_social, - fb_passthrough_keyboard_hands, - fb_composition_layer_settings, - fb_touch_controller_proximity, - fb_haptic_pcm, - fb_composition_layer_depth_test, - fb_spatial_entity_storage_batch, - fb_spatial_entity_user, - fb_face_tracking2, - htc_vive_cosmos_controller_interaction, - htc_facial_tracking, - htc_vive_focus3_controller_interaction, - htc_hand_interaction, - htc_vive_wrist_tracker_interaction, - htc_passthrough, - htc_foveation, - htc_anchor, - huawei_controller_interaction, - #[cfg(target_os = "android")] - khr_android_thread_settings, - #[cfg(target_os = "android")] - khr_android_surface_swapchain, - khr_composition_layer_cube, - #[cfg(target_os = "android")] - khr_android_create_instance, - khr_composition_layer_depth, - khr_vulkan_swapchain_format_list, - khr_composition_layer_cylinder, - khr_composition_layer_equirect, - khr_opengl_enable, - khr_opengl_es_enable, - khr_vulkan_enable, - #[cfg(windows)] - khr_d3d11_enable, - #[cfg(windows)] - khr_d3d12_enable, - khr_visibility_mask, - khr_composition_layer_color_scale_bias, - #[cfg(windows)] - khr_win32_convert_performance_counter_time, - khr_convert_timespec_time, - khr_loader_init, - #[cfg(target_os = "android")] - khr_loader_init_android, - khr_vulkan_enable2, - khr_composition_layer_equirect2, - khr_binding_modification, - khr_swapchain_usage_input_attachment_bit, - khr_locate_spaces, - khr_maintenance1, - meta_foveation_eye_tracked, - meta_local_dimming, - meta_passthrough_preferences, - meta_virtual_keyboard, - meta_vulkan_swapchain_create_info, - meta_performance_metrics, - meta_headset_id, - meta_recommended_layer_resolution, - meta_passthrough_color_lut, - meta_spatial_entity_mesh, - meta_automatic_layer_filter, - meta_touch_controller_plus, - meta_environment_depth, - ml_ml2_controller_interaction, - ml_frame_end_info, - ml_global_dimmer, - ml_compat, - ml_marker_understanding, - ml_localization_map, - ml_user_calibration, - mnd_headless, - mnd_swapchain_usage_input_attachment_bit, - msft_unbounded_reference_space, - msft_spatial_anchor, - msft_spatial_graph_bridge, - msft_hand_interaction, - msft_hand_tracking_mesh, - msft_secondary_view_configuration, - msft_first_person_observer, - msft_controller_model, - #[cfg(windows)] - msft_perception_anchor_interop, - #[cfg(windows)] - msft_holographic_window_attachment, - msft_composition_layer_reprojection, - msft_spatial_anchor_persistence, - #[cfg(target_os = "android")] - oculus_android_session_state_enable, - oculus_audio_device_guid, - oculus_external_camera, - oppo_controller_interaction, - qcom_tracking_optimization_settings, - ultraleap_hand_tracking_forearm, - valve_analog_threshold, - varjo_quad_views, - varjo_foveated_rendering, - varjo_composition_layer_depth_test, - varjo_environment_depth_estimation, - varjo_marker_tracking, - varjo_view_offset, - varjo_xr4_controller_interaction, - yvr_controller_interaction, - extx_overlay, - mndx_egl_enable, - mndx_force_feedback_curl, - htcx_vive_tracker_interaction, - } - )* - - }; -} - -impl_ext!(bitor, bitand, unavailable_exts); diff --git a/crates/bevy_openxr/src/openxr/features/fb_passthrough.rs b/crates/bevy_openxr/src/openxr/features/fb_passthrough.rs index ae4fe2d..ca80b55 100644 --- a/crates/bevy_openxr/src/openxr/features/fb_passthrough.rs +++ b/crates/bevy_openxr/src/openxr/features/fb_passthrough.rs @@ -69,7 +69,7 @@ pub fn insert_passthrough(world: &mut World) { pub fn resume_passthrough( passthrough: Res, - passthrough_layer: Res, + passthrough_layer: Res, ) { passthrough.start().unwrap(); passthrough_layer.resume().unwrap(); @@ -77,7 +77,7 @@ pub fn resume_passthrough( pub fn pause_passthrough( passthrough: Res, - passthrough_layer: Res, + passthrough_layer: Res, ) { passthrough_layer.pause().unwrap(); passthrough.pause().unwrap(); @@ -87,7 +87,7 @@ pub fn create_passthrough( session: &OxrSession, flags: openxr::PassthroughFlagsFB, purpose: openxr::PassthroughLayerPurposeFB, -) -> OxrResult<(OxrPassthrough, OxrPassthroughLayer)> { +) -> OxrResult<(OxrPassthrough, OxrPassthroughLayerFB)> { let passthrough = session.create_passthrough(flags)?; let passthrough_layer = session.create_passthrough_layer(&passthrough, purpose)?; diff --git a/crates/bevy_openxr/src/openxr/graphics/vulkan.rs b/crates/bevy_openxr/src/openxr/graphics/vulkan.rs index df38133..b81e078 100644 --- a/crates/bevy_openxr/src/openxr/graphics/vulkan.rs +++ b/crates/bevy_openxr/src/openxr/graphics/vulkan.rs @@ -4,6 +4,7 @@ use std::str::FromStr; use ash::vk::{self, Handle}; use bevy_log::{debug, error}; use bevy_math::UVec2; +use openxr::sys::Handle as _; use openxr::{Version, sys}; use wgpu::TextureUses; use wgpu::{ExperimentalFeatures, InstanceFlags, MemoryBudgetThresholds}; diff --git a/crates/bevy_openxr/src/openxr/layer_builder.rs b/crates/bevy_openxr/src/openxr/layer_builder.rs index d4eb6c3..a6f2abc 100644 --- a/crates/bevy_openxr/src/openxr/layer_builder.rs +++ b/crates/bevy_openxr/src/openxr/layer_builder.rs @@ -65,8 +65,8 @@ impl LayerProvider for ProjectionLayer { impl LayerProvider for PassthroughLayer { fn get(&self, world: &World) -> Option>> { Some(Box::new( - CompositionLayerPassthrough::new() - .layer_handle(world.get_resource::()?) + CompositionLayerPassthroughFB::new() + .layer_handle(world.get_resource::()?) .layer_flags(CompositionLayerFlags::BLEND_TEXTURE_SOURCE_ALPHA), )) } @@ -236,16 +236,16 @@ impl Default for CompositionLayerProjection<'_> { Self::new() } } -pub struct CompositionLayerPassthrough { +pub struct CompositionLayerPassthroughFB { inner: sys::CompositionLayerPassthroughFB, } -impl Default for CompositionLayerPassthrough { +impl Default for CompositionLayerPassthroughFB { fn default() -> Self { Self::new() } } -impl CompositionLayerPassthrough { +impl CompositionLayerPassthroughFB { #[inline] pub const fn new() -> Self { Self { @@ -256,7 +256,7 @@ impl CompositionLayerPassthrough { } } #[inline] - pub fn layer_handle(mut self, layer_handle: &OxrPassthroughLayer) -> Self { + pub fn layer_handle(mut self, layer_handle: &OxrPassthroughLayerFB) -> Self { self.inner.layer_handle = *layer_handle.inner(); self } @@ -266,7 +266,7 @@ impl CompositionLayerPassthrough { self } } -unsafe impl<'a> CompositionLayer<'a> for CompositionLayerPassthrough { +unsafe impl<'a> CompositionLayer<'a> for CompositionLayerPassthroughFB { fn swapchain(&self) -> Option<&'a OxrSwapchain> { None } diff --git a/crates/bevy_openxr/src/openxr/resources.rs b/crates/bevy_openxr/src/openxr/resources.rs index 6adc956..f151cd6 100644 --- a/crates/bevy_openxr/src/openxr/resources.rs +++ b/crates/bevy_openxr/src/openxr/resources.rs @@ -322,11 +322,11 @@ impl OxrPassthrough { /// Wrapper around [`openxr::Passthrough`]. /// -/// Used to create a [`CompositionLayerPassthrough`](crate::layer_builder::CompositionLayerPassthrough), and to [`pause`](openxr::PassthroughLayer::pause) or [`resume`](openxr::PassthroughLayer::resume) rendering of the passthrough layer. +/// Used to create a [`CompositionLayerPassthrough`](crate::layer_builder::CompositionLayerPassthrough), and to [`pause`](openxr::PassthroughLayerFB::pause) or [`resume`](openxr::PassthroughLayerFB::resume) rendering of the passthrough layer. /// -/// See [`openxr::PassthroughLayer`] for available methods. +/// See [`openxr::PassthroughLayerFB`] for available methods. #[derive(Resource, Deref, DerefMut)] -pub struct OxrPassthroughLayer(pub openxr::PassthroughLayer); +pub struct OxrPassthroughLayerFB(pub openxr::PassthroughLayerFB); #[derive(Resource, Deref, DerefMut, Default)] pub struct OxrRenderLayers(pub Vec>); diff --git a/crates/bevy_openxr/src/openxr/session.rs b/crates/bevy_openxr/src/openxr/session.rs index 8f47ac2..e7e262d 100644 --- a/crates/bevy_openxr/src/openxr/session.rs +++ b/crates/bevy_openxr/src/openxr/session.rs @@ -1,7 +1,7 @@ use std::ffi::c_void; use crate::next_chain::{OxrNextChain, OxrNextChainStructBase, OxrNextChainStructProvider}; -use crate::resources::{OxrPassthrough, OxrPassthroughLayer, OxrSwapchain}; +use crate::resources::{OxrPassthrough, OxrPassthroughLayerFB, OxrSwapchain}; use crate::types::{Result, SwapchainCreateInfo}; use bevy_derive::Deref; use bevy_ecs::resource::Resource; @@ -91,8 +91,8 @@ impl OxrSession { &self, passthrough: &OxrPassthrough, purpose: openxr::PassthroughLayerPurposeFB, - ) -> Result { - Ok(OxrPassthroughLayer(graphics_match! { + ) -> Result { + Ok(OxrPassthroughLayerFB(graphics_match! { &self.1; session => session.create_passthrough_layer(&passthrough.0, passthrough.1, purpose)? })) diff --git a/crates/bevy_openxr/src/openxr/spaces.rs b/crates/bevy_openxr/src/openxr/spaces.rs index f385a3d..3233198 100644 --- a/crates/bevy_openxr/src/openxr/spaces.rs +++ b/crates/bevy_openxr/src/openxr/spaces.rs @@ -19,7 +19,7 @@ use bevy_platform::collections::hash_set::HashSet; use bevy_transform::components::Transform; use openxr::{ HAND_JOINT_COUNT, HandJointLocation, HandJointLocations, HandJointVelocities, - HandJointVelocity, ReferenceSpaceType, SpaceLocationFlags, SpaceVelocityFlags, sys, + HandJointVelocity, ReferenceSpaceType, SpaceLocationFlags, SpaceVelocityFlags, sys::{self, Handle as _}, }; use std::{mem::MaybeUninit, ptr, sync::Mutex}; diff --git a/crates/bevy_xr_utils/Cargo.toml b/crates/bevy_xr_utils/Cargo.toml index e02fcd6..510ac9e 100644 --- a/crates/bevy_xr_utils/Cargo.toml +++ b/crates/bevy_xr_utils/Cargo.toml @@ -26,7 +26,7 @@ bevy.workspace = true [target.'cfg(not(target_family = "wasm"))'.dependencies] openxr.workspace = true -openxr_mndx_xdev_space = "0.1.0" +openxr_mndx_xdev_space = "0.2.0" [lints.clippy] too_many_arguments = "allow"