diff --git a/Cargo.lock b/Cargo.lock index 3464cb84..4b851089 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -74,7 +74,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed7572b7ba83a31e20d1b48970ee402d2e3e0537dcfe0a3ff4d6eb7508617d43" dependencies = [ "alsa-sys", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "libc", ] @@ -96,7 +96,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef6978589202a00cd7e118380c448a08b6ed394c3a8df3a430d0898e3a42d046" dependencies = [ "android-properties", - "bitflags 2.6.0", + "bitflags 2.8.0", "cc", "cesu8", "jni", @@ -107,7 +107,7 @@ dependencies = [ "ndk-context", "ndk-sys 0.6.0+11769913", "num_enum", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -264,7 +264,7 @@ version = "0.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f49d8fed880d473ea71efb9bf597651e77201bdd4893efe54c9e5d65ae04ce6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cexpr", "clang-sys", "itertools 0.13.0", @@ -299,9 +299,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] @@ -393,12 +393,12 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "log", "polling", "rustix", "slab", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -415,9 +415,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.7" +version = "1.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7" +checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" dependencies = [ "jobserver", "libc", @@ -455,12 +455,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "cfg_aliases" version = "0.2.1" @@ -599,7 +593,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59fd57d82eb4bfe7ffa9b1cec0c05e2fd378155b47f255a67983cb4afe0e80c2" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "fontdb", "log", "rangemap", @@ -1036,9 +1030,9 @@ checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "glow" -version = "0.14.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51fa363f025f5c111e03f13eda21162faeacb6911fe8caa0c0349f9cf0c4483" +checksum = "c5e5ea60d70410161c8bf5da3fdfeaa1c72ed2c15f8bbb9d19fe3a4fad085f08" dependencies = [ "js-sys", "slotmap", @@ -1048,9 +1042,9 @@ dependencies = [ [[package]] name = "glutin_wgl_sys" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" +checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e" dependencies = [ "gl_generator", ] @@ -1061,7 +1055,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fbcd2dba93594b227a1f57ee09b8b9da8892c34d55aa332e034a228d0fe6a171" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-alloc-types", ] @@ -1071,7 +1065,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "98ff03b468aa837d70984d55f5d3f846f6ec31fe34bbb97c4f85219caeee1ca4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -1082,7 +1076,7 @@ checksum = "c151a2a5ef800297b4e79efa4f4bec035c5f51d5ae587287c9b952bdf734cacd" dependencies = [ "log", "presser", - "thiserror", + "thiserror 1.0.69", "windows 0.58.0", ] @@ -1092,7 +1086,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf29e94d6d243368b7a56caa16bc213e4f9f8ed38c4d9557069527b5d5281ca" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "gpu-descriptor-types", "hashbrown", ] @@ -1103,7 +1097,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -1530,7 +1524,7 @@ dependencies = [ "combine", "jni-sys", "log", - "thiserror", + "thiserror 1.0.69", "walkdir", "windows-sys 0.45.0", ] @@ -1552,9 +1546,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ "once_cell", "wasm-bindgen", @@ -1660,7 +1654,7 @@ dependencies = [ name = "korangar_interface" version = "0.1.0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cgmath", "interface_procedural", "korangar_debug", @@ -1737,7 +1731,7 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "libc", "redox_syscall 0.5.8", ] @@ -1781,9 +1775,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "loop9" @@ -1819,6 +1813,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af319e973195cc1edc87c21c8c206af77611176b0c62e94add116d40a765aaed" +[[package]] +name = "mach-dxcompiler-rs" +version = "0.1.4+2024.11.22-df583a3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e3cd67e8ea2ba061339150970542cf1c60ba44c6d17e31279cbc133a4b018f8" + [[package]] name = "mach2" version = "0.4.2" @@ -1864,11 +1864,11 @@ dependencies = [ [[package]] name = "metal" -version = "0.29.0" +version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +checksum = "f569fb946490b5743ad69813cb19629130ce9374034abe31614a36402d18f99e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block", "core-graphics-types", "foreign-types 0.5.0", @@ -1891,9 +1891,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" dependencies = [ "adler2", "simd-adler32", @@ -1945,22 +1945,23 @@ dependencies = [ [[package]] name = "naga" -version = "23.1.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "364f94bc34f61332abebe8cad6f6cd82a5b65cff22c828d05d0968911462ca4f" +checksum = "e380993072e52eef724eddfcde0ed013b0c023c3f0417336ed041aa9f076994e" dependencies = [ "arrayvec", "bit-set", - "bitflags 2.6.0", - "cfg_aliases 0.1.1", + "bitflags 2.8.0", + "cfg_aliases", "codespan-reporting", "hexf-parse", "indexmap", "log", "rustc-hash 1.1.0", "spirv", + "strum", "termcolor", - "thiserror", + "thiserror 2.0.11", "unicode-xid", ] @@ -1987,12 +1988,12 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2076a31b7010b17a38c01907c45b945e8f11495ee4dd588309718901b1f7a5b7" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "jni-sys", "log", "ndk-sys 0.5.0+25.2.9519653", "num_enum", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2001,13 +2002,13 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "jni-sys", "log", "ndk-sys 0.6.0+11769913", "num_enum", "raw-window-handle", - "thiserror", + "thiserror 1.0.69", ] [[package]] @@ -2192,7 +2193,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "libc", "objc2", @@ -2208,7 +2209,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-core-location", @@ -2232,7 +2233,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -2274,7 +2275,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "dispatch", "libc", @@ -2299,7 +2300,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -2311,7 +2312,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-foundation", @@ -2334,7 +2335,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-cloud-kit", @@ -2366,7 +2367,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "objc2", "objc2-core-location", @@ -2417,7 +2418,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "foreign-types 0.3.2", "libc", @@ -2470,6 +2471,15 @@ dependencies = [ "libredox", ] +[[package]] +name = "ordered-float" +version = "4.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bb71e1b3fa6ca1c61f383464aaf2bb0e2f8e772a1f01d486832464de363b951" +dependencies = [ + "num-traits", +] + [[package]] name = "owned_ttf_parser" version = "0.25.0" @@ -2627,9 +2637,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.92" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -2700,7 +2710,7 @@ dependencies = [ name = "ragnarok_formats" version = "0.1.0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cgmath", "korangar_interface", "ragnarok_bytes", @@ -2710,7 +2720,7 @@ dependencies = [ name = "ragnarok_packets" version = "0.1.0" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "etherparse", "korangar_debug", "korangar_interface", @@ -2809,7 +2819,7 @@ dependencies = [ "rand_chacha", "simd_helpers", "system-deps", - "thiserror", + "thiserror 1.0.69", "v_frame", "wasm-bindgen", ] @@ -2870,7 +2880,7 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -2980,7 +2990,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ "base64 0.21.7", - "bitflags 2.6.0", + "bitflags 2.8.0", "serde", "serde_derive", ] @@ -3021,7 +3031,7 @@ version = "0.38.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "errno 0.3.10", "libc", "linux-raw-sys", @@ -3030,9 +3040,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.20" +version = "0.23.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" dependencies = [ "once_cell", "rustls-pki-types", @@ -3067,13 +3077,19 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "rustybuzz" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfb9cf8877777222e4a3bc7eb247e398b56baba500c38c1c46842431adc8b55c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "bytemuck", "libm", "smallvec", @@ -3139,7 +3155,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation", "core-foundation-sys", "libc", @@ -3272,7 +3288,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "calloop", "calloop-wayland-source", "cursor-icon", @@ -3280,7 +3296,7 @@ dependencies = [ "log", "memmap2", "rustix", - "thiserror", + "thiserror 1.0.69", "wayland-backend", "wayland-client", "wayland-csd-frame", @@ -3331,7 +3347,7 @@ version = "0.3.0+sdk-1.3.268.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eda41003dc44290527a59b13432d4a0379379fa074b70174882adfbdfd917844" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", ] [[package]] @@ -3352,6 +3368,28 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731" +[[package]] +name = "strum" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn", +] + [[package]] name = "subtle" version = "2.6.1" @@ -3456,9 +3494,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.95" +version = "2.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46f71c0377baf4ef1cc3e3402ded576dccc315800fbc62dfc7fe04b009773b4a" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" dependencies = [ "proc-macro2", "quote", @@ -3500,7 +3538,7 @@ version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "core-foundation", "system-configuration-sys", ] @@ -3563,7 +3601,16 @@ version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.69", +] + +[[package]] +name = "thiserror" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d452f284b73e6d76dd36758a0c8684b1d5be31f92b89d07fd5822175732206fc" +dependencies = [ + "thiserror-impl 2.0.11", ] [[package]] @@ -3577,6 +3624,17 @@ dependencies = [ "syn", ] +[[package]] +name = "thiserror-impl" +version = "2.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "tiny-skia" version = "0.11.4" @@ -3629,9 +3687,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.42.0" +version = "1.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cec9b21b0450273377fc97bd4c33a8acffc8c996c987a7c5b319a0083707551" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" dependencies = [ "backtrace", "bytes", @@ -3645,9 +3703,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", @@ -3945,20 +4003,21 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", @@ -3970,9 +4029,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.49" +version = "0.4.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" dependencies = [ "cfg-if", "js-sys", @@ -3983,9 +4042,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3993,9 +4052,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -4006,9 +4065,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.99" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wayland-backend" @@ -4030,7 +4092,7 @@ version = "0.31.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b66249d3fc69f76fd74c82cc319300faa554e9d865dab1f7cd66cc20db10b280" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "rustix", "wayland-backend", "wayland-scanner", @@ -4042,7 +4104,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cursor-icon", "wayland-backend", ] @@ -4064,7 +4126,7 @@ version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd0ade57c4e6e9a8952741325c30bf82f4246885dca8bf561898b86d0c1f58e" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-scanner", @@ -4076,7 +4138,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b31cab548ee68c7eb155517f2212049dc151f7cd7910c2b66abfd31c3ee12bd" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4089,7 +4151,7 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "782e12f6cd923c3c316130d56205ebab53f55d6666b7faddfad36cecaeeb4022" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "wayland-backend", "wayland-client", "wayland-protocols", @@ -4121,9 +4183,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.76" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" dependencies = [ "js-sys", "wasm-bindgen", @@ -4141,12 +4203,13 @@ dependencies = [ [[package]] name = "wgpu" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f70000db37c469ea9d67defdc13024ddf9a5f1b89cb2941b812ad7cde1735a" +checksum = "e41253fc7b660735e2a2d9a58c563f2a047d3cc3445293d8f4095538c9e8afbe" dependencies = [ "arrayvec", - "cfg_aliases 0.1.1", + "bitflags 2.8.0", + "cfg_aliases", "document-features", "js-sys", "log", @@ -4166,14 +4229,14 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d63c3c478de8e7e01786479919c8769f62a22eec16788d8c2ac77ce2c132778a" +checksum = "82a39b8842dc9ffcbe34346e3ab6d496b32a47f6497e119d762c97fcaae3cb37" dependencies = [ "arrayvec", "bit-vec", - "bitflags 2.6.0", - "cfg_aliases 0.1.1", + "bitflags 2.8.0", + "cfg_aliases", "document-features", "indexmap", "log", @@ -4184,25 +4247,25 @@ dependencies = [ "raw-window-handle", "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 2.0.11", "wgpu-hal", "wgpu-types", ] [[package]] name = "wgpu-hal" -version = "23.0.1" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89364b8a0b211adc7b16aeaf1bd5ad4a919c1154b44c9ce27838213ba05fd821" +checksum = "5a782e5056b060b0b4010881d1decddd059e44f2ecd01e2db2971b48ad3627e5" dependencies = [ "android_system_properties", "arrayvec", "ash", "bit-set", - "bitflags 2.6.0", + "bitflags 2.8.0", "block", "bytemuck", - "cfg_aliases 0.1.1", + "cfg_aliases", "core-graphics-types", "glow", "glutin_wgl_sys", @@ -4214,11 +4277,13 @@ dependencies = [ "libc", "libloading", "log", + "mach-dxcompiler-rs", "metal", "naga", "ndk-sys 0.5.0+25.2.9519653", "objc", "once_cell", + "ordered-float", "parking_lot", "profiling", "range-alloc", @@ -4226,7 +4291,7 @@ dependencies = [ "renderdoc-sys", "rustc-hash 1.1.0", "smallvec", - "thiserror", + "thiserror 2.0.11", "wasm-bindgen", "web-sys", "wgpu-types", @@ -4236,12 +4301,13 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "23.0.0" +version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "610f6ff27778148c31093f3b03abc4840f9636d58d597ca2f5977433acfe0068" +checksum = "50ac044c0e76c03a0378e7786ac505d010a873665e2d51383dcff8dd227dc69c" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "js-sys", + "log", "web-sys", ] @@ -4658,11 +4724,11 @@ dependencies = [ "ahash", "android-activity", "atomic-waker", - "bitflags 2.6.0", + "bitflags 2.8.0", "block2", "bytemuck", "calloop", - "cfg_aliases 0.2.1", + "cfg_aliases", "concurrent-queue", "core-foundation", "core-graphics", @@ -4703,9 +4769,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.22" +version = "0.6.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980" +checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" dependencies = [ "memchr", ] @@ -4772,7 +4838,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "dlib", "log", "once_cell", diff --git a/Cargo.toml b/Cargo.toml index 22cf4e04..2acc28bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,7 +49,7 @@ syn = "2.0" sys-locale = "0.3" tokio = { version = "1.42", default-features = false } walkdir = "2.5" -wgpu = "23.0" +wgpu = "24" winit = "0.30" [profile.dev.build-override] diff --git a/korangar/Cargo.toml b/korangar/Cargo.toml index e200621b..38606214 100644 --- a/korangar/Cargo.toml +++ b/korangar/Cargo.toml @@ -38,7 +38,7 @@ serde = { workspace = true } spin_sleep = { workspace = true } sys-locale = { workspace = true } walkdir = { workspace = true } -wgpu = { workspace = true } +wgpu = { workspace = true, features = ["static-dxc"] } winit = { workspace = true } [features] diff --git a/korangar/src/graphics/engine.rs b/korangar/src/graphics/engine.rs index 5533d1ca..1250d12f 100644 --- a/korangar/src/graphics/engine.rs +++ b/korangar/src/graphics/engine.rs @@ -9,8 +9,8 @@ use korangar_debug::logging::{print_debug, Colorize}; use korangar_debug::profile_block; use wgpu::util::StagingBelt; use wgpu::{ - Adapter, CommandBuffer, CommandEncoder, CommandEncoderDescriptor, Device, Extent3d, ImageCopyBuffer, ImageCopyTexture, ImageDataLayout, - Instance, Maintain, Origin3d, Queue, SurfaceTexture, TextureAspect, TextureFormat, TextureViewDescriptor, + Adapter, CommandBuffer, CommandEncoder, CommandEncoderDescriptor, Device, Extent3d, Instance, Maintain, Origin3d, Queue, + SurfaceTexture, TexelCopyBufferInfo, TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect, TextureFormat, TextureViewDescriptor, }; use winit::dpi::PhysicalSize; use winit::window::Window; @@ -882,15 +882,15 @@ impl GraphicsEngine { let y = (unpadded_texture_size.height - 1).min(instruction.picker_position.top as u32); picker_encoder.copy_texture_to_buffer( - ImageCopyTexture { + TexelCopyTextureInfo { texture: engine_context.global_context.picker_buffer_texture.get_texture(), mip_level: 0, origin: Origin3d { x, y, z: 0 }, aspect: TextureAspect::All, }, - ImageCopyBuffer { + TexelCopyBufferInfo { buffer: engine_context.global_context.picker_value_buffer.get_buffer(), - layout: ImageDataLayout { + layout: TexelCopyBufferLayout { offset: 0, bytes_per_row, rows_per_image: None, diff --git a/korangar/src/graphics/passes/interface/rectangle.rs b/korangar/src/graphics/passes/interface/rectangle.rs index 86aa7fb7..5233e0b0 100644 --- a/korangar/src/graphics/passes/interface/rectangle.rs +++ b/korangar/src/graphics/passes/interface/rectangle.rs @@ -96,7 +96,7 @@ impl Drawer<{ BindGroupCount::One }, { ColorAttachmentCount::One }, { DepthAttac view_dimension: TextureViewDimension::D2, multisampled: false, }, - count: capabilities.get_max_texture_binding_array_count(), + count: None, }, BindGroupLayoutEntry { binding: 2, @@ -106,7 +106,7 @@ impl Drawer<{ BindGroupCount::One }, { ColorAttachmentCount::One }, { DepthAttac view_dimension: TextureViewDimension::D2, multisampled: false, }, - count: None, + count: capabilities.get_max_texture_binding_array_count(), }, ], }) @@ -143,8 +143,8 @@ impl Drawer<{ BindGroupCount::One }, { ColorAttachmentCount::One }, { DepthAttac device, &bind_group_layout, &instance_data_buffer, - &[global_context.solid_pixel_texture.get_texture_view()], global_context.solid_pixel_texture.get_texture_view(), + &[global_context.solid_pixel_texture.get_texture_view()], ) } else { Self::create_bind_group( @@ -384,8 +384,8 @@ impl Prepare for InterfaceRectangleDrawer { device, &self.bind_group_layout, &self.instance_data_buffer, - &texture_views, font_map_texture.get_texture_view(), + &texture_views, ); } else { for instruction in instructions.interface.iter() { @@ -501,8 +501,9 @@ impl InterfaceRectangleDrawer { device: &Device, bind_group_layout: &BindGroupLayout, instance_data_buffer: &Buffer, - texture_views: &[&TextureView], + msdf_font_map: &TextureView, + texture_views: &[&TextureView], ) -> BindGroup { device.create_bind_group(&BindGroupDescriptor { label: Some(DRAWER_NAME), @@ -514,11 +515,11 @@ impl InterfaceRectangleDrawer { }, BindGroupEntry { binding: 1, - resource: BindingResource::TextureViewArray(texture_views), + resource: BindingResource::TextureView(msdf_font_map), }, BindGroupEntry { binding: 2, - resource: BindingResource::TextureView(msdf_font_map), + resource: BindingResource::TextureViewArray(texture_views), }, ], }) diff --git a/korangar/src/graphics/passes/interface/shader/rectangle_bindless.wgsl b/korangar/src/graphics/passes/interface/shader/rectangle_bindless.wgsl index f379ff82..c45df499 100644 --- a/korangar/src/graphics/passes/interface/shader/rectangle_bindless.wgsl +++ b/korangar/src/graphics/passes/interface/shader/rectangle_bindless.wgsl @@ -41,8 +41,8 @@ struct VertexOutput { @group(0) @binding(1) var nearest_sampler: sampler; @group(0) @binding(2) var linear_sampler: sampler; @group(1) @binding(0) var instance_data: array; -@group(1) @binding(1) var textures: binding_array>; -@group(1) @binding(2) var msdf_font_map: texture_2d; +@group(1) @binding(1) var msdf_font_map: texture_2d; +@group(1) @binding(2) var textures: binding_array>; const BREATHING_ROOM = 0.5; const BORDER_THRESHOLD = 2.0; diff --git a/korangar/src/graphics/passes/postprocessing/rectangle.rs b/korangar/src/graphics/passes/postprocessing/rectangle.rs index f78a7c92..f5134356 100644 --- a/korangar/src/graphics/passes/postprocessing/rectangle.rs +++ b/korangar/src/graphics/passes/postprocessing/rectangle.rs @@ -113,7 +113,7 @@ impl Drawer<{ BindGroupCount::One }, { ColorAttachmentCount::One }, { DepthAttac view_dimension: TextureViewDimension::D2, multisampled: false, }, - count: capabilities.get_max_texture_binding_array_count(), + count: None, }, BindGroupLayoutEntry { binding: 2, @@ -123,7 +123,7 @@ impl Drawer<{ BindGroupCount::One }, { ColorAttachmentCount::One }, { DepthAttac view_dimension: TextureViewDimension::D2, multisampled: false, }, - count: None, + count: capabilities.get_max_texture_binding_array_count(), }, ], }) @@ -160,8 +160,8 @@ impl Drawer<{ BindGroupCount::One }, { ColorAttachmentCount::One }, { DepthAttac device, &bind_group_layout, &instance_data_buffer, - &[global_context.solid_pixel_texture.get_texture_view()], global_context.solid_pixel_texture.get_texture_view(), + &[global_context.solid_pixel_texture.get_texture_view()], ) } else { Self::create_bind_group( @@ -412,8 +412,8 @@ impl Prepare for PostProcessingRectangleDrawer { device, &self.bind_group_layout, &self.instance_data_buffer, - &texture_views, font_map_texture.get_texture_view(), + &texture_views, ); } else { let mut offset = 0; @@ -531,8 +531,8 @@ impl PostProcessingRectangleDrawer { device: &Device, bind_group_layout: &BindGroupLayout, instance_data_buffer: &Buffer, - texture_views: &[&TextureView], msdf_font_map_view: &TextureView, + texture_views: &[&TextureView], ) -> BindGroup { device.create_bind_group(&BindGroupDescriptor { label: Some(DRAWER_NAME), @@ -544,11 +544,11 @@ impl PostProcessingRectangleDrawer { }, BindGroupEntry { binding: 1, - resource: BindingResource::TextureViewArray(texture_views), + resource: BindingResource::TextureView(msdf_font_map_view), }, BindGroupEntry { binding: 2, - resource: BindingResource::TextureView(msdf_font_map_view), + resource: BindingResource::TextureViewArray(texture_views), }, ], }) diff --git a/korangar/src/graphics/passes/postprocessing/shader/rectangle_bindless.wgsl b/korangar/src/graphics/passes/postprocessing/shader/rectangle_bindless.wgsl index 95fd234f..fbae6f8b 100644 --- a/korangar/src/graphics/passes/postprocessing/shader/rectangle_bindless.wgsl +++ b/korangar/src/graphics/passes/postprocessing/shader/rectangle_bindless.wgsl @@ -17,9 +17,8 @@ struct VertexOutput { @group(0) @binding(1) var nearest_sampler: sampler; @group(0) @binding(2) var linear_sampler: sampler; @group(1) @binding(0) var instance_data: array; -@group(1) @binding(1) var textures: binding_array>; -@group(1) @binding(2) var msdf_font_map: texture_2d; - +@group(1) @binding(1) var msdf_font_map: texture_2d; +@group(1) @binding(2) var textures: binding_array>; @vertex fn vs_main( diff --git a/korangar/src/graphics/sampler.rs b/korangar/src/graphics/sampler.rs index 424d5272..0fbc42ee 100644 --- a/korangar/src/graphics/sampler.rs +++ b/korangar/src/graphics/sampler.rs @@ -11,34 +11,60 @@ pub(crate) fn create_new_sampler( match sampler_type.into() { SamplerType::TextureNearest => device.create_sampler(&SamplerDescriptor { label: Some(label), + address_mode_u: AddressMode::default(), + address_mode_v: AddressMode::default(), + address_mode_w: AddressMode::default(), mag_filter: FilterMode::Nearest, min_filter: FilterMode::Nearest, mipmap_filter: FilterMode::Nearest, - ..Default::default() + lod_min_clamp: 0.0, + lod_max_clamp: 32.0, + compare: None, + anisotropy_clamp: 1, + border_color: None, }), SamplerType::TextureLinear => device.create_sampler(&SamplerDescriptor { label: Some(label), + address_mode_u: AddressMode::default(), + address_mode_v: AddressMode::default(), + address_mode_w: AddressMode::default(), mag_filter: FilterMode::Linear, min_filter: FilterMode::Linear, mipmap_filter: FilterMode::Linear, - ..Default::default() + lod_min_clamp: 0.0, + lod_max_clamp: 32.0, + compare: None, + anisotropy_clamp: 1, + border_color: None, }), SamplerType::TextureAnisotropic(anisotropy_clamp) => device.create_sampler(&SamplerDescriptor { label: Some(label), + address_mode_u: AddressMode::default(), + address_mode_v: AddressMode::default(), + address_mode_w: AddressMode::default(), mag_filter: FilterMode::Linear, min_filter: FilterMode::Linear, mipmap_filter: FilterMode::Linear, + lod_min_clamp: 0.0, + lod_max_clamp: 32.0, + compare: None, anisotropy_clamp, - ..Default::default() + border_color: None, }), SamplerType::DepthCompare => { let mut descriptor = SamplerDescriptor { label: Some(label), + address_mode_u: AddressMode::default(), + address_mode_v: AddressMode::default(), + address_mode_w: AddressMode::default(), mag_filter: FilterMode::Linear, min_filter: FilterMode::Linear, mipmap_filter: FilterMode::Linear, + lod_min_clamp: 0.0, + lod_max_clamp: 32.0, compare: Some(CompareFunction::Greater), - ..Default::default() + anisotropy_clamp: 1, + border_color: None, }; if capabilities.supports_clamp_to_border() { diff --git a/korangar/src/graphics/surface.rs b/korangar/src/graphics/surface.rs index 5e794916..a1d10d9e 100644 --- a/korangar/src/graphics/surface.rs +++ b/korangar/src/graphics/surface.rs @@ -108,11 +108,12 @@ impl Surface { .get_current_texture() .expect("Failed to acquire next surface texture!"), Err( - // If the surface is outdated, or was lost, reconfigure it. - wgpu::SurfaceError::Outdated - | wgpu::SurfaceError::Lost + wgpu::SurfaceError::Lost + | wgpu::SurfaceError::Other // If OutOfMemory happens, reconfiguring may not help, but we might as well try. - | wgpu::SurfaceError::OutOfMemory, + | wgpu::SurfaceError::OutOfMemory + // If the surface is outdated, or was lost, reconfigure it. + | wgpu::SurfaceError::Outdated ) => { self.surface.configure(&self.device, &self.config); self.surface diff --git a/korangar/src/graphics/texture.rs b/korangar/src/graphics/texture.rs index 8a15e37c..b0ee8fdf 100644 --- a/korangar/src/graphics/texture.rs +++ b/korangar/src/graphics/texture.rs @@ -7,8 +7,8 @@ use hashbrown::HashMap; use korangar_util::container::Cacheable; use wgpu::{ BindGroup, BindGroupDescriptor, BindGroupEntry, BindGroupLayout, BindGroupLayoutDescriptor, BindGroupLayoutEntry, BindingResource, - BindingType, Device, Extent3d, ImageDataLayout, Queue, ShaderStages, TextureAspect, TextureDescriptor, TextureDimension, TextureFormat, - TextureSampleType, TextureUsages, TextureView, TextureViewDescriptor, TextureViewDimension, + BindingType, Device, Extent3d, Queue, ShaderStages, TexelCopyBufferLayout, TextureAspect, TextureDescriptor, TextureDimension, + TextureFormat, TextureSampleType, TextureUsages, TextureView, TextureViewDescriptor, TextureViewDimension, }; use crate::interface::layout::ScreenSize; @@ -47,7 +47,14 @@ impl Texture { let texture = device.create_texture(descriptor); let texture_view = texture.create_view(&TextureViewDescriptor { label: descriptor.label, - ..Default::default() + format: None, + dimension: None, + usage: None, + aspect: TextureAspect::default(), + base_mip_level: 0, + mip_level_count: None, + base_array_layer: 0, + array_layer_count: None, }); let bind_group = device.create_bind_group(&BindGroupDescriptor { @@ -84,7 +91,7 @@ impl Texture { queue.write_texture( texture.as_image_copy(), image_data, - ImageDataLayout { + TexelCopyBufferLayout { offset: 0, bytes_per_row: Some(descriptor.size.width * block_size), rows_per_image: Some(descriptor.size.height), @@ -94,7 +101,14 @@ impl Texture { let texture_view = texture.create_view(&TextureViewDescriptor { label: descriptor.label, - ..Default::default() + format: None, + dimension: None, + usage: None, + aspect: TextureAspect::default(), + base_mip_level: 0, + mip_level_count: None, + base_array_layer: 0, + array_layer_count: None, }); let bind_group = device.create_bind_group(&BindGroupDescriptor { @@ -223,7 +237,8 @@ impl CubeArrayTexture { label: Some("cube array face view"), format: None, dimension: Some(TextureViewDimension::D2), - aspect: wgpu::TextureAspect::All, + usage: None, + aspect: TextureAspect::All, base_mip_level: 0, mip_level_count: None, base_array_layer: cube_index * 6 + face_index, @@ -248,7 +263,8 @@ impl CubeArrayTexture { label: Some("cube array view"), format: None, dimension: Some(TextureViewDimension::CubeArray), - aspect: wgpu::TextureAspect::All, + usage: None, + aspect: TextureAspect::All, base_mip_level: 0, mip_level_count: None, base_array_layer: 0, @@ -326,7 +342,14 @@ impl AttachmentTexture { let texture = device.create_texture(&descriptor); let texture_view = texture.create_view(&TextureViewDescriptor { label: descriptor.label, - ..Default::default() + format: None, + dimension: None, + usage: None, + aspect: TextureAspect::default(), + base_mip_level: 0, + mip_level_count: None, + base_array_layer: 0, + array_layer_count: None, }); let sample_type = descriptor.format.sample_type(Some(TextureAspect::All), None).unwrap(); @@ -481,7 +504,14 @@ impl StorageTexture { }); let texture_view = texture.create_view(&TextureViewDescriptor { label: Some(label), - ..Default::default() + format: None, + dimension: None, + usage: None, + aspect: TextureAspect::default(), + base_mip_level: 0, + mip_level_count: None, + base_array_layer: 0, + array_layer_count: None, }); Self { diff --git a/korangar/src/loaders/texture/mod.rs b/korangar/src/loaders/texture/mod.rs index 54b1680c..e15d5676 100644 --- a/korangar/src/loaders/texture/mod.rs +++ b/korangar/src/loaders/texture/mod.rs @@ -157,6 +157,7 @@ impl TextureLoader { label: Some(&format!("mip map level {level}")), format: None, dimension: Some(TextureViewDimension::D2), + usage: None, aspect: TextureAspect::All, base_mip_level: level, mip_level_count: Some(1), diff --git a/korangar/src/main.rs b/korangar/src/main.rs index 54e582c6..1f82623b 100644 --- a/korangar/src/main.rs +++ b/korangar/src/main.rs @@ -71,9 +71,13 @@ use ragnarok_packets::{ }; use renderer::InterfaceRenderer; use settings::AudioSettings; +use wgpu::util::initialize_adapter_from_env_or_default; +use wgpu::{ + BackendOptions, Backends, DeviceDescriptor, Dx12BackendOptions, Dx12Compiler, GlBackendOptions, Gles3MinorVersion, Instance, + InstanceDescriptor, InstanceFlags, MemoryHints, +}; #[cfg(feature = "debug")] use wgpu::{Device, Queue}; -use wgpu::{Dx12Compiler, Instance, InstanceFlags, MemoryHints}; use winit::application::ApplicationHandler; use winit::dpi::{LogicalSize, PhysicalSize}; use winit::event::WindowEvent; @@ -297,23 +301,20 @@ impl Client { }); time_phase!("create adapter", { - let trace_dir = std::env::var("WGPU_TRACE"); - let backends = wgpu::util::backend_bits_from_env().unwrap_or_default(); - let dx12_shader_compiler = wgpu::util::dx12_shader_compiler_from_env().unwrap_or(Dx12Compiler::Dxc { - dxil_path: None, - dxc_path: None, - }); - let gles_minor_version = wgpu::util::gles_minor_version_from_env().unwrap_or_default(); - let flags = InstanceFlags::from_build_config().with_env(); - - let instance = Instance::new(wgpu::InstanceDescriptor { - backends, - flags, - dx12_shader_compiler, - gles_minor_version, + let instance = Instance::new(&InstanceDescriptor { + backends: Backends::all().with_env(), + flags: InstanceFlags::from_build_config().with_env(), + backend_options: BackendOptions { + gl: GlBackendOptions { + gles_minor_version: Gles3MinorVersion::Automatic.with_env(), + }, + dx12: Dx12BackendOptions { + shader_compiler: Dx12Compiler::StaticDxc.with_env(), + }, + }, }); - let adapter = pollster::block_on(async { wgpu::util::initialize_adapter_from_env_or_default(&instance, None).await.unwrap() }); + let adapter = pollster::block_on(async { initialize_adapter_from_env_or_default(&instance, None).await.unwrap() }); let adapter = Arc::new(adapter); #[cfg(feature = "debug")] @@ -331,13 +332,13 @@ impl Client { let (device, queue) = pollster::block_on(async { adapter .request_device( - &wgpu::DeviceDescriptor { + &DeviceDescriptor { label: None, required_features: capabilities.get_required_features(), required_limits: capabilities.get_required_limits(), memory_hints: MemoryHints::Performance, }, - trace_dir.ok().as_ref().map(std::path::Path::new), + std::env::var("WGPU_TRACE").ok().as_ref().map(std::path::Path::new), ) .await .unwrap()