1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 14:20:04 -04:00

Update wgpu to 27.0.0 (#7580)

This commit is contained in:
Andreas Reich
2025-10-03 09:54:46 +02:00
committed by GitHub
parent 096ed1c0cb
commit 427c0766fd
6 changed files with 78 additions and 51 deletions

View File

@@ -1,5 +1,5 @@
use std::iter::once;
use std::sync::Arc;
use std::{iter::once, time::Duration};
use egui::TexturesDelta;
use egui_wgpu::{RenderState, ScreenDescriptor, WgpuSetup, wgpu};
@@ -7,6 +7,9 @@ use image::RgbaImage;
use crate::texture_to_image::texture_to_image;
/// Timeout for waiting on the GPU to finish rendering.
pub(crate) const WAIT_TIMEOUT: Duration = Duration::from_secs(1);
/// Default wgpu setup used for the wgpu renderer.
pub fn default_wgpu_setup() -> egui_wgpu::WgpuSetup {
let mut setup = egui_wgpu::WgpuSetupCreateNew::default();
@@ -205,7 +208,10 @@ impl crate::TestRenderer for WgpuTestRenderer {
self.render_state
.device
.poll(wgpu::PollType::Wait)
.poll(wgpu::PollType::Wait {
submission_index: None,
timeout: Some(WAIT_TIMEOUT),
})
.map_err(|err| format!("PollError: {err}"))?;
Ok(texture_to_image(