From 65f690b07559a36fe8bfcba31edd851c5c286704 Mon Sep 17 00:00:00 2001 From: Poly Date: Wed, 13 Oct 2021 19:40:29 +0200 Subject: Update wgpu to 0.11 --- wgpu/Cargo.toml | 4 ++-- wgpu/src/window/compositor.rs | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'wgpu') diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index 71da889f..ed74b804 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -27,8 +27,8 @@ default_system_font = ["iced_graphics/font-source"] spirv = ["wgpu/spirv"] [dependencies] -wgpu = "0.10" -wgpu_glyph = "0.14" +wgpu = "0.11" +wgpu_glyph = "0.15" glyph_brush = "0.7" raw-window-handle = "0.3" log = "0.4" diff --git a/wgpu/src/window/compositor.rs b/wgpu/src/window/compositor.rs index eca54b6f..bd8e1f89 100644 --- a/wgpu/src/window/compositor.rs +++ b/wgpu/src/window/compositor.rs @@ -40,6 +40,7 @@ impl Compositor { wgpu::PowerPreference::HighPerformance }, compatible_surface: compatible_surface.as_ref(), + force_fallback_adapter: false, }) .await?; @@ -141,7 +142,7 @@ impl iced_graphics::window::Compositor for Compositor { output: &::Output, overlay: &[T], ) -> Result { - match surface.get_current_frame() { + match surface.get_current_texture() { Ok(frame) => { let mut encoder = self.device.create_command_encoder( &wgpu::CommandEncoderDescriptor { @@ -150,7 +151,6 @@ impl iced_graphics::window::Compositor for Compositor { ); let view = &frame - .output .texture .create_view(&wgpu::TextureViewDescriptor::default()); @@ -193,6 +193,7 @@ impl iced_graphics::window::Compositor for Compositor { // Submit work self.staging_belt.finish(); self.queue.submit(Some(encoder.finish())); + frame.present(); // Recall staging buffers self.local_pool -- cgit