Skip to content

Commit

Permalink
Update to wgpu 22.1 (emilk#4964)
Browse files Browse the repository at this point in the history
Updates to wgpu 22.1, removing a workaround that was needed for wgpu
22.0
  • Loading branch information
Wumpf authored Aug 16, 2024
1 parent 1f6ae49 commit 9a1e358
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4432,9 +4432,9 @@ checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082"

[[package]]
name = "wgpu"
version = "22.0.0"
version = "22.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c87e07e87a179614940ad845397e03201847453a37b43a31a3b54eee2e6e32ce"
checksum = "e1d1c4ba43f80542cf63a0a6ed3134629ae73e8ab51e4b765a67f3aa062eb433"
dependencies = [
"arrayvec",
"cfg_aliases 0.1.1",
Expand All @@ -4457,9 +4457,9 @@ dependencies = [

[[package]]
name = "wgpu-core"
version = "22.0.0"
version = "22.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0f191908a21968991463fcf3b42cb6c9648c0fb7fa301b8fc733bc21a9ed9bd"
checksum = "0348c840d1051b8e86c3bcd31206080c5e71e5933dabd79be1ce732b0b2f089a"
dependencies = [
"arrayvec",
"bit-vec 0.7.0",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ web-time = "1.1.0" # Timekeeping for native and web
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = "0.3.58"
wgpu = { version = "22.0.0", default-features = false, features = [
wgpu = { version = "22.1.0", default-features = false, features = [
# Make the renderer `Sync` even on wasm32, because it makes the code simpler:
"fragile-send-sync-non-atomic-wasm",
] }
Expand Down
11 changes: 0 additions & 11 deletions crates/egui-wgpu/src/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,6 @@ pub struct Painter {
surfaces: ViewportIdMap<SurfaceState>,
}

impl Drop for Painter {
fn drop(&mut self) {
// Drop surfaces before dropping the render state.
//
// This is a workaround for a bug in wgpu 22.0.0.
// Fixed in https://github.com/gfx-rs/wgpu/pull/6052
// Remove with wgpu 22.1.0 update!
self.surfaces.clear();
}
}

impl Painter {
/// Manages [`wgpu`] state, including surface state, required to render egui.
///
Expand Down

0 comments on commit 9a1e358

Please sign in to comment.