From 9f0b3531b33c9822a34e4717f0aee25e3badbf94 Mon Sep 17 00:00:00 2001 From: clearlysid Date: Tue, 8 Oct 2024 22:56:23 +0530 Subject: [PATCH] feat: upgrade wgpu to 22.0 --- Cargo.lock | 246 ++++++++++++++++++++++++++++++++++++++++++++--- Cargo.toml | 2 +- src/renderers.rs | 3 + 3 files changed, 237 insertions(+), 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 030252f4..c1bbd418 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -160,6 +160,15 @@ dependencies = [ "libloading 0.7.4", ] +[[package]] +name = "ash" +version = "0.38.0+1.3.281" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f" +dependencies = [ + "libloading 0.8.5", +] + [[package]] name = "async-broadcast" version = "0.5.1" @@ -391,7 +400,16 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "bit-vec", + "bit-vec 0.6.3", +] + +[[package]] +name = "bit-set" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0481a0e032742109b1133a095184ee93d88f3dc9e0d28a5d033dc77a073f44f" +dependencies = [ + "bit-vec 0.7.0", ] [[package]] @@ -400,6 +418,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bit-vec" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2c54ff287cfc0a34f38a6b832ea1bd8e448a330b3e40a50859e6488bee07f22" + [[package]] name = "bitflags" version = "1.3.2" @@ -978,6 +1002,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "d3d12" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdbd1f579714e3c809ebd822c81ef148b1ceaeb3d535352afc73fd0c4c6a0017" +dependencies = [ + "bitflags 2.6.0", + "libloading 0.8.5", + "winapi", +] + [[package]] name = "darling" version = "0.13.4" @@ -1828,6 +1863,15 @@ dependencies = [ "gl_generator", ] +[[package]] +name = "glutin_wgl_sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a4e1951bbd9434a81aa496fe59ccc2235af3820d27b85f9314e279609211e2c" +dependencies = [ + "gl_generator", +] + [[package]] name = "gobject-sys" version = "0.18.0" @@ -1884,6 +1928,19 @@ dependencies = [ "windows 0.52.0", ] +[[package]] +name = "gpu-allocator" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdd4240fc91d3433d5e5b0fc5b67672d771850dc19bbee03c1381e19322803d7" +dependencies = [ + "log", + "presser", + "thiserror", + "winapi", + "windows 0.52.0", +] + [[package]] name = "gpu-descriptor" version = "0.2.4" @@ -1891,7 +1948,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc11df1ace8e7e564511f53af41f3e42ddc95b56fd07b3f4445d2a6048bc682c" dependencies = [ "bitflags 2.6.0", - "gpu-descriptor-types", + "gpu-descriptor-types 0.1.2", + "hashbrown 0.14.5", +] + +[[package]] +name = "gpu-descriptor" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c08c1f623a8d0b722b8b99f821eb0ba672a1618f0d3b16ddbee1cedd2dd8557" +dependencies = [ + "bitflags 2.6.0", + "gpu-descriptor-types 0.2.0", "hashbrown 0.14.5", ] @@ -1904,6 +1972,15 @@ dependencies = [ "bitflags 2.6.0", ] +[[package]] +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags 2.6.0", +] + [[package]] name = "gtk" version = "0.18.1" @@ -2556,6 +2633,21 @@ dependencies = [ "paste", ] +[[package]] +name = "metal" +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ecfd3296f8c56b7c1f6fbac3c71cefa9d78ce009850c45000015f206dc7fa21" +dependencies = [ + "bitflags 2.6.0", + "block", + "core-graphics-types", + "foreign-types 0.5.0", + "log", + "objc", + "paste", +] + [[package]] name = "minimal-egui" version = "0.1.0" @@ -2677,7 +2769,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ceaaa4eedaece7e4ec08c55c640ba03dbb73fb812a6570a59bcf1930d0f70e" dependencies = [ - "bit-set", + "bit-set 0.5.3", "bitflags 2.6.0", "codespan-reporting", "hexf-parse", @@ -2697,7 +2789,7 @@ version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50e3524642f53d9af419ab5e8dd29d3ba155708267667c2f3f06c88c9e130843" dependencies = [ - "bit-set", + "bit-set 0.5.3", "bitflags 2.6.0", "codespan-reporting", "hexf-parse", @@ -2711,6 +2803,27 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "naga" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8bd5a652b6faf21496f2cfd88fc49989c8db0825d1f6746b1a71a6ede24a63ad" +dependencies = [ + "arrayvec 0.7.6", + "bit-set 0.6.0", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "codespan-reporting", + "hexf-parse", + "indexmap 2.5.0", + "log", + "rustc-hash", + "spirv 0.3.0+sdk-1.3.268.0", + "termcolor", + "thiserror", + "unicode-xid", +] + [[package]] name = "ndk" version = "0.7.0" @@ -3099,6 +3212,7 @@ dependencies = [ "thiserror", "ultraviolet", "wgpu 0.19.4", + "wgpu 22.1.0", "winit 0.29.15", ] @@ -4714,6 +4828,31 @@ dependencies = [ "wgpu-types 0.19.2", ] +[[package]] +name = "wgpu" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433" +dependencies = [ + "arrayvec 0.7.6", + "cfg_aliases 0.1.1", + "document-features", + "js-sys", + "log", + "naga 22.1.0", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "smallvec", + "static_assertions", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "wgpu-core 22.1.0", + "wgpu-hal 22.0.0", + "wgpu-types 22.0.0", +] + [[package]] name = "wgpu-core" version = "0.17.1" @@ -4721,7 +4860,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f8a44dd301a30ceeed3c27d8c0090433d3da04d7b2a4042738095a424d12ae7" dependencies = [ "arrayvec 0.7.6", - "bit-vec", + "bit-vec 0.6.3", "bitflags 2.6.0", "codespan-reporting", "log", @@ -4744,7 +4883,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28b94525fc99ba9e5c9a9e24764f2bc29bad0911a7446c12f446a8277369bf3a" dependencies = [ "arrayvec 0.7.6", - "bit-vec", + "bit-vec 0.6.3", "bitflags 2.6.0", "cfg_aliases 0.1.1", "codespan-reporting", @@ -4763,6 +4902,31 @@ dependencies = [ "wgpu-types 0.19.2", ] +[[package]] +name = "wgpu-core" +version = "22.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a" +dependencies = [ + "arrayvec 0.7.6", + "bit-vec 0.7.0", + "bitflags 2.6.0", + "cfg_aliases 0.1.1", + "document-features", + "indexmap 2.5.0", + "log", + "naga 22.1.0", + "once_cell", + "parking_lot", + "profiling", + "raw-window-handle 0.6.2", + "rustc-hash", + "smallvec", + "thiserror", + "wgpu-hal 22.0.0", + "wgpu-types 22.0.0", +] + [[package]] name = "wgpu-hal" version = "0.17.2" @@ -4771,8 +4935,8 @@ checksum = "9a80bf0e3c77399bb52850cb0830af9bad073d5cfcb9dd8253bef8125c42db17" dependencies = [ "android_system_properties", "arrayvec 0.7.6", - "ash", - "bit-set", + "ash 0.37.3+1.3.251", + "bit-set 0.5.3", "bitflags 2.6.0", "block", "core-graphics-types", @@ -4780,7 +4944,7 @@ dependencies = [ "glow 0.12.3", "gpu-alloc", "gpu-allocator 0.22.0", - "gpu-descriptor", + "gpu-descriptor 0.2.4", "hassle-rs 0.10.0", "js-sys", "khronos-egl 4.1.0", @@ -4812,18 +4976,18 @@ checksum = "bfabcfc55fd86611a855816326b2d54c3b2fd7972c27ce414291562650552703" dependencies = [ "android_system_properties", "arrayvec 0.7.6", - "ash", - "bit-set", + "ash 0.37.3+1.3.251", + "bit-set 0.5.3", "bitflags 2.6.0", "block", "cfg_aliases 0.1.1", "core-graphics-types", "d3d12 0.19.0", "glow 0.13.1", - "glutin_wgl_sys", + "glutin_wgl_sys 0.5.0", "gpu-alloc", "gpu-allocator 0.25.0", - "gpu-descriptor", + "gpu-descriptor 0.2.4", "hassle-rs 0.11.0", "js-sys", "khronos-egl 6.0.0", @@ -4849,6 +5013,51 @@ dependencies = [ "winapi", ] +[[package]] +name = "wgpu-hal" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6bbf4b4de8b2a83c0401d9e5ae0080a2792055f25859a02bf9be97952bbed4f" +dependencies = [ + "android_system_properties", + "arrayvec 0.7.6", + "ash 0.38.0+1.3.281", + "bit-set 0.6.0", + "bitflags 2.6.0", + "block", + "cfg_aliases 0.1.1", + "core-graphics-types", + "d3d12 22.0.0", + "glow 0.13.1", + "glutin_wgl_sys 0.6.0", + "gpu-alloc", + "gpu-allocator 0.26.0", + "gpu-descriptor 0.3.0", + "hassle-rs 0.11.0", + "js-sys", + "khronos-egl 6.0.0", + "libc", + "libloading 0.8.5", + "log", + "metal 0.29.0", + "naga 22.1.0", + "ndk-sys 0.5.0+25.2.9519653", + "objc", + "once_cell", + "parking_lot", + "profiling", + "range-alloc", + "raw-window-handle 0.6.2", + "renderdoc-sys", + "rustc-hash", + "smallvec", + "thiserror", + "wasm-bindgen", + "web-sys", + "wgpu-types 22.0.0", + "winapi", +] + [[package]] name = "wgpu-types" version = "0.17.0" @@ -4871,6 +5080,17 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wgpu-types" +version = "22.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc9d91f0e2c4b51434dfa6db77846f2793149d8e73f800fa2e41f52b8eac3c5d" +dependencies = [ + "bitflags 2.6.0", + "js-sys", + "web-sys", +] + [[package]] name = "wide" version = "0.7.28" diff --git a/Cargo.toml b/Cargo.toml index 7a85df0a..84174f77 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ bytemuck = "1.12" raw-window-handle = "0.6" thiserror = "1.0" ultraviolet = "0.9" -wgpu = "0.19" +wgpu = "22.0" [target.'cfg(target_arch = "wasm32")'.dependencies] wgpu = { version = "0.19", features = ["webgl"] } diff --git a/src/renderers.rs b/src/renderers.rs index 00df39a1..56e17336 100644 --- a/src/renderers.rs +++ b/src/renderers.rs @@ -138,12 +138,14 @@ impl ScalingRenderer { push_constant_ranges: &[], }); let render_pipeline = device.create_render_pipeline(&wgpu::RenderPipelineDescriptor { + cache: None, label: Some("pixels_scaling_renderer_pipeline"), layout: Some(&pipeline_layout), vertex: wgpu::VertexState { module: &module, entry_point: "vs_main", buffers: &[vertex_buffer_layout], + compilation_options: wgpu::PipelineCompilationOptions::default(), }, primitive: wgpu::PrimitiveState::default(), depth_stencil: None, @@ -151,6 +153,7 @@ impl ScalingRenderer { fragment: Some(wgpu::FragmentState { module: &module, entry_point: "fs_main", + compilation_options: wgpu::PipelineCompilationOptions::default(), targets: &[Some(wgpu::ColorTargetState { format: render_texture_format, blend: Some(blend_state),