Update wgpu to 0.11

This commit is contained in:
Poly 2021-10-13 19:40:29 +02:00
parent 3aae45c191
commit 65f690b075
3 changed files with 9 additions and 6 deletions

View file

@ -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: &<Self::Renderer as iced_native::Renderer>::Output,
overlay: &[T],
) -> Result<mouse::Interaction, iced_graphics::window::SurfaceError> {
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