From f0f9003247343a045b585fbd263b35fe8faa7089 Mon Sep 17 00:00:00 2001 From: paoda Date: Fri, 21 Oct 2022 00:46:14 -0300 Subject: [PATCH] chore: update wgpu --- Cargo.lock | 211 ++++++++++++++++++++++++++--------------------------- Cargo.toml | 6 +- src/gui.rs | 10 ++- 3 files changed, 113 insertions(+), 114 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7b7f3c1..827aa2f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -390,12 +390,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "copyless" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2df960f5d869b2dd8532793fde43eb5427cceb126c929747a26823ab0eeb536" - [[package]] name = "core-foundation" version = "0.9.3" @@ -470,27 +464,27 @@ dependencies = [ [[package]] name = "cpal" -version = "0.13.5" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74117836a5124f3629e4b474eed03e479abaf98988b4bb317e29f08cfe0e4116" +checksum = "7d466b47cf0ea4100186a7c12d7d0166813dda7cf648553554c9c39c6324841b" dependencies = [ "alsa", "core-foundation-sys", "coreaudio-rs", "jni", "js-sys", - "lazy_static", "libc", "mach", - "ndk 0.6.0", - "ndk-glue 0.6.2", + "ndk 0.7.0", + "ndk-context", "nix 0.23.1", "oboe", - "parking_lot 0.11.2", + "once_cell", + "parking_lot", "stdweb", "thiserror", "web-sys", - "winapi", + "windows", ] [[package]] @@ -646,9 +640,9 @@ dependencies = [ [[package]] name = "egui_wgpu_backend" -version = "0.19.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3c6ad20da012d92ae595f7c160f5f403bb4ac906403b19c2ad69c5537c256" +checksum = "3f9a4a022610dec7cb5ccce43d397727d190ca38b7c988dece516d585c96caa6" dependencies = [ "bytemuck", "egui", @@ -686,7 +680,7 @@ dependencies = [ "bytemuck", "emath", "nohash-hasher", - "parking_lot 0.12.1", + "parking_lot", ] [[package]] @@ -959,12 +953,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "inplace_it" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e567468c50f3d4bc7397702e09b380139f9b9288b4e909b070571007f8b5bf78" - [[package]] name = "instant" version = "0.1.12" @@ -1018,9 +1006,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258451ab10b34f8af53416d1fdab72c22e805f0c92a1136d59470ec0b11138b2" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -1218,9 +1206,9 @@ dependencies = [ [[package]] name = "naga" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f50357e1167a3ab92d6b3c7f4bf5f7fd13fde3f4b28bf0d5ea07b5100fdb6c0" +checksum = "262d2840e72dbe250e8cf2f522d080988dfca624c4112c096238a4845f591707" dependencies = [ "bit-set", "bitflags", @@ -1269,21 +1257,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b" -[[package]] -name = "ndk-glue" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d0c4a7b83860226e6b4183edac21851f05d5a51756e97a1144b7f5a6b63e65f" -dependencies = [ - "lazy_static", - "libc", - "log", - "ndk 0.6.0", - "ndk-context", - "ndk-macro", - "ndk-sys 0.3.0", -] - [[package]] name = "ndk-glue" version = "0.7.0" @@ -1297,7 +1270,7 @@ dependencies = [ "ndk-macro", "ndk-sys 0.4.0", "once_cell", - "parking_lot 0.12.1", + "parking_lot", ] [[package]] @@ -1485,17 +1458,6 @@ dependencies = [ "ttf-parser", ] -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.5", -] - [[package]] name = "parking_lot" version = "0.12.1" @@ -1503,21 +1465,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ "lock_api", - "parking_lot_core 0.9.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall", - "smallvec", - "winapi", + "parking_lot_core", ] [[package]] @@ -1686,9 +1634,9 @@ checksum = "f1382d1f0a252c4bf97dc20d979a2fdd05b024acd7c2ed0f7595d7817666a157" [[package]] name = "rodio" -version = "0.15.0" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0939e9f626e6c6f1989adb6226a039c855ca483053f0ee7c98b90e41cf731e" +checksum = "eb10b653d5ec0e9411a2e7d46e2c7f4046fd87d35b9955bd73ba4108d69072b5" dependencies = [ "claxon", "cpal", @@ -1873,6 +1821,12 @@ dependencies = [ "num-traits", ] +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + [[package]] name = "stdweb" version = "0.1.3" @@ -2118,9 +2072,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2128,9 +2082,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662cd44805586bd52971b9586b1df85cdbbd9112e4ef4d8f41559c334dc6ac3f" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", "log", @@ -2143,9 +2097,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" dependencies = [ "cfg-if", "js-sys", @@ -2155,9 +2109,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b260f13d3012071dfb1512849c033b1925038373aea48ced3012c09df952c602" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2165,9 +2119,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be8e654bdd9b79216c2929ab90721aa82faf65c48cdf08bdc4e7f51357b80da" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -2178,9 +2132,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.82" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wayland-client" @@ -2257,9 +2211,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.59" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" dependencies = [ "js-sys", "wasm-bindgen", @@ -2267,17 +2221,18 @@ dependencies = [ [[package]] name = "wgpu" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "277e967bf8b7820a76852645a6bce8bbd31c32fda2042e82d8e3ea75fda8892d" +checksum = "c2272b17bffc8a0c7d53897435da7c1db587c87d3a14e8dae9cdb8d1d210fc0f" dependencies = [ "arrayvec 0.7.2", "js-sys", "log", "naga", - "parking_lot 0.11.2", - "raw-window-handle 0.4.3", + "parking_lot", + "raw-window-handle 0.5.0", "smallvec", + "static_assertions", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -2288,22 +2243,21 @@ dependencies = [ [[package]] name = "wgpu-core" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b92788dec9d0c1bed849a1b83f01b2ee12819bf04a79c90f68e4173f7b5ba2" +checksum = "73d14cad393054caf992ee02b7da6a372245d39a484f7461c1f44f6f6359bd28" dependencies = [ "arrayvec 0.7.2", "bit-vec", "bitflags", "cfg_aliases", "codespan-reporting", - "copyless", "fxhash", "log", "naga", - "parking_lot 0.11.2", + "parking_lot", "profiling", - "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", "smallvec", "thiserror", "web-sys", @@ -2313,9 +2267,9 @@ dependencies = [ [[package]] name = "wgpu-hal" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cbdfc3d0637dba3d5536b93adef3d26023a0b96f0e1ee5ee9560a401d9f646" +checksum = "cdae6a80dbc725343f02f854b310b37190be946aeea65e9d83afaa7d840ebaac" dependencies = [ "android_system_properties", "arrayvec 0.7.2", @@ -2330,7 +2284,6 @@ dependencies = [ "glow", "gpu-alloc", "gpu-descriptor", - "inplace_it", "js-sys", "khronos-egl", "libloading", @@ -2338,11 +2291,12 @@ dependencies = [ "metal", "naga", "objc", - "parking_lot 0.11.2", + "parking_lot", "profiling", "range-alloc", - "raw-window-handle 0.4.3", + "raw-window-handle 0.5.0", "renderdoc-sys", + "smallvec", "thiserror", "wasm-bindgen", "web-sys", @@ -2352,9 +2306,9 @@ dependencies = [ [[package]] name = "wgpu-types" -version = "0.13.2" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f762cbc08e1a51389859cf9c199c7aef544789cf3510889aab12c607f701604" +checksum = "28fb86c1909233c804aa79b7dd1ad06ebd979b2a465e3e980582db0ea9e69f3f" dependencies = [ "bitflags", ] @@ -2390,17 +2344,30 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57b543186b344cc61c85b5aab0d2e3adf4e0f99bc076eff9aa5927bcc0b8a647" +dependencies = [ + "windows_aarch64_msvc 0.37.0", + "windows_i686_gnu 0.37.0", + "windows_i686_msvc 0.37.0", + "windows_x86_64_gnu 0.37.0", + "windows_x86_64_msvc 0.37.0", +] + [[package]] name = "windows-sys" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] [[package]] @@ -2409,30 +2376,60 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2623277cb2d1c216ba3b578c0f3cf9cdebeddb6e66b1b218bb33596ea7769c3a" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3925fd0b0b804730d44d4b6278c50f9699703ec49bcd628020f46f4ba07d9e1" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce907ac74fe331b524c1298683efbf598bb031bc84d5e274db2083696d07c57c" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2babfba0828f2e6b32457d5341427dcbb577ceef556273229959ac23a10af33d" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4dd6dc7df2d84cf7b33822ed5b86318fb1781948e9663bacd047fc9dd52259d" + [[package]] name = "winit" version = "0.27.3" @@ -2449,10 +2446,10 @@ dependencies = [ "log", "mio", "ndk 0.7.0", - "ndk-glue 0.7.0", + "ndk-glue", "objc", "once_cell", - "parking_lot 0.12.1", + "parking_lot", "percent-encoding", "raw-window-handle 0.4.3", "raw-window-handle 0.5.0", diff --git a/Cargo.toml b/Cargo.toml index 64fe046..14e0429 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,11 +13,11 @@ clap = { version = "3.1", features = ["cargo"] } gilrs = "0.9" winit = "0.27" egui = "0.19" -wgpu = "0.13" -egui_wgpu_backend = "0.19" +wgpu = "0.14" +egui_wgpu_backend = "0.20" egui_winit_platform = "0.16" pollster = "0.2" -rodio = "0.15" +rodio = "0.16" rtrb = "0.2" directories-next = "2.0" tracing = "0.1" diff --git a/src/gui.rs b/src/gui.rs index 84fbe48..f1af17b 100644 --- a/src/gui.rs +++ b/src/gui.rs @@ -4,7 +4,7 @@ use egui_winit_platform::Platform; use wgpu::{ Adapter, Backends, Color, CommandEncoder, Device, Extent3d, FilterMode, Instance, Queue, RequestDeviceError, Surface, SurfaceConfiguration, Texture, TextureFormat, TextureUsages, - TextureView, TextureViewDescriptor, + TextureView, TextureViewDescriptor, CompositeAlphaMode, }; use winit::dpi::PhysicalSize; use winit::error::OsError; @@ -51,7 +51,8 @@ impl Gui { let (device, queue) = request_device(&adapter).expect("request device"); let texture_format = surface.get_supported_formats(&adapter)[0]; // First is preferred - let surface_config = surface_config(&window, texture_format); + let alpha_mode = surface.get_supported_alpha_modes(&adapter)[0]; + let surface_config = surface_config(&window, alpha_mode, texture_format); surface.configure(&device, &surface_config); let platform = platform(&window); let mut render_pass = RenderPass::new(&device, texture_format, 1); @@ -349,7 +350,7 @@ fn request_device(adapter: &Adapter) -> Result<(Device, Queue), RequestDeviceErr )) } -fn surface_config(window: &Window, format: TextureFormat) -> SurfaceConfiguration { +fn surface_config(window: &Window, alpha_mode: CompositeAlphaMode, format: TextureFormat) -> SurfaceConfiguration { use wgpu::PresentMode; let size = window.inner_size(); @@ -358,7 +359,8 @@ fn surface_config(window: &Window, format: TextureFormat) -> SurfaceConfiguratio format, width: size.width as u32, height: size.height as u32, - present_mode: PresentMode::Mailbox, + present_mode: PresentMode::Immediate, + alpha_mode } }