From f6fe3bff180d8f93ebd4ccf7c29201cf2fb8894d Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 3 Oct 2025 13:05:50 +0200 Subject: [PATCH] Increate wgpu kittest wait timeout (#7585) --- crates/egui_kittest/src/wgpu.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/egui_kittest/src/wgpu.rs b/crates/egui_kittest/src/wgpu.rs index c64e2f68..a71a69d7 100644 --- a/crates/egui_kittest/src/wgpu.rs +++ b/crates/egui_kittest/src/wgpu.rs @@ -8,7 +8,12 @@ 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); +/// +/// Windows will reset native drivers after 2 seconds of being stuck (known was TDR - timeout detection & recovery). +/// However, software rasterizers like lavapipe may not do that and take longer if there's a lot of work in flight. +/// In the end, what we really want to protect here against is undetected errors that lead to device loss +/// and therefore infinite waits it happens occasionally on MacOS/Metal as of writing. +pub(crate) const WAIT_TIMEOUT: Duration = Duration::from_secs(10); /// Default wgpu setup used for the wgpu renderer. pub fn default_wgpu_setup() -> egui_wgpu::WgpuSetup {