From f942cbd66d6297886effad6b82f3f8e8a340d1ac Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 23 Jan 2024 13:17:05 +0100 Subject: [PATCH 1/3] Update to wgpu 0.19.1 --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index be93056fcb3..0c85eaa68a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4219,9 +4219,9 @@ checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" [[package]] name = "wgpu" -version = "0.19.0" +version = "0.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b71d2ded29e2161db50ab731d6cb42c037bd7ab94864a98fa66ff36b4721a8" +checksum = "0bfe9a310dcf2e6b85f00c46059aaeaf4184caa8e29a1ecd4b7a704c3482332d" dependencies = [ "arrayvec", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index 9fa472ba679..67f0806ed81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ glow = "0.13" puffin = "0.18" raw-window-handle = "0.6.0" thiserror = "1.0.37" -wgpu = { version = "0.19", features = [ +wgpu = { version = "0.19.1", features = [ # Make the renderer `Sync` even on wasm32, because it makes the code simpler: "fragile-send-sync-non-atomic-wasm", ] } From e9c9951f541ac7b34f9a861be1215fd3f0de464e Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 23 Jan 2024 14:32:03 +0100 Subject: [PATCH 2/3] Remove default features from `wgpu` --- Cargo.lock | 21 --------------------- Cargo.toml | 2 +- crates/egui-wgpu/Cargo.toml | 2 +- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0c85eaa68a9..7cf24278364 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1076,17 +1076,6 @@ dependencies = [ "env_logger", ] -[[package]] -name = "d3d12" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e3d747f100290a1ca24b752186f61f6637e1deffe3bf6320de6fcb29510a307" -dependencies = [ - "bitflags 2.4.0", - "libloading 0.8.0", - "winapi", -] - [[package]] name = "data-url" version = "0.3.1" @@ -2997,12 +2986,6 @@ dependencies = [ "getrandom", ] -[[package]] -name = "range-alloc" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8a99fddc9f0ba0a85884b8d14e3592853e787d581ca1816c91349b10e4eeab" - [[package]] name = "raw-window-handle" version = "0.5.2" @@ -4277,12 +4260,9 @@ dependencies = [ "android_system_properties", "arrayvec", "ash", - "bit-set", "bitflags 2.4.0", - "block", "cfg_aliases", "core-graphics-types", - "d3d12", "glow", "glutin_wgl_sys", "gpu-alloc", @@ -4300,7 +4280,6 @@ dependencies = [ "once_cell", "parking_lot", "profiling", - "range-alloc", "raw-window-handle 0.6.0", "renderdoc-sys", "rustc-hash", diff --git a/Cargo.toml b/Cargo.toml index 67f0806ed81..993751bffdd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,7 +53,7 @@ glow = "0.13" puffin = "0.18" raw-window-handle = "0.6.0" thiserror = "1.0.37" -wgpu = { version = "0.19.1", features = [ +wgpu = { version = "0.19.1", default-features = false, features = [ # Make the renderer `Sync` even on wasm32, because it makes the code simpler: "fragile-send-sync-non-atomic-wasm", ] } diff --git a/crates/egui-wgpu/Cargo.toml b/crates/egui-wgpu/Cargo.toml index 5b86dc09127..c598669eb2a 100644 --- a/crates/egui-wgpu/Cargo.toml +++ b/crates/egui-wgpu/Cargo.toml @@ -45,7 +45,7 @@ bytemuck = "1.7" log = { version = "0.4", features = ["std"] } thiserror.workspace = true type-map = "0.5.0" -wgpu.workspace = true +wgpu = { workspace = true, features = ["wgsl"] } #! ### Optional dependencies ## Enable this when generating docs. From 6602fdc869e599b9793eca05f03c2150cdc121f0 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Tue, 23 Jan 2024 14:35:45 +0100 Subject: [PATCH 3/3] `eframe`: enable some default backends for `wgpu` --- Cargo.lock | 1 + crates/eframe/Cargo.toml | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 7cf24278364..f88634fd456 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4261,6 +4261,7 @@ dependencies = [ "arrayvec", "ash", "bitflags 2.4.0", + "block", "cfg_aliases", "core-graphics-types", "glow", diff --git a/crates/eframe/Cargo.toml b/crates/eframe/Cargo.toml index c3158ee4e10..6b2a6f32bb6 100644 --- a/crates/eframe/Cargo.toml +++ b/crates/eframe/Cargo.toml @@ -168,7 +168,12 @@ pollster = { version = "0.3", optional = true } # needed for wgpu glutin = { version = "0.31", optional = true } glutin-winit = { version = "0.4", optional = true } puffin = { workspace = true, optional = true } -wgpu = { workspace = true, optional = true } +wgpu = { workspace = true, optional = true, features = [ + # Let's enable some backends so that users can use `eframe` out-of-the-box + # without having to explicitly opt-in to backends + "metal", + "webgpu", +] } # mac: [target.'cfg(any(target_os = "macos"))'.dependencies]