From 781d71f01cbd8a1c6111b9a63afebd4e5b10904d Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Fri, 26 Jan 2024 17:55:46 +0100 Subject: [PATCH] improved commentary --- crates/eframe/src/web/web_painter_wgpu.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/eframe/src/web/web_painter_wgpu.rs b/crates/eframe/src/web/web_painter_wgpu.rs index 63e7e3ae20b..0ec0f8239d1 100644 --- a/crates/eframe/src/web/web_painter_wgpu.rs +++ b/crates/eframe/src/web/web_painter_wgpu.rs @@ -127,12 +127,9 @@ impl WebPainterWgpu { // Therefore, we have to first check if it's possible to create a WebGPU adapter, // and if it is not, start over with a WebGL instance. // - // Note that we also might end up here if wgpu didn't detect WebGPU support, - // moved on to create a wgpu-core instance and then failed to create a WebGL adapter. - // To detect this we'd need to check what kind of instance wgpu created, - // but this is currently not easily possible. See https://github.com/gfx-rs/wgpu/issues/5142 - // In that case we'd be trying the same thing again which isn't ideal, but we're in a - // pretty bad situation anyway. + // Note that we also might needlessly try this here if wgpu already determined that there's no + // WebGPU support in the first place. This is not a huge problem since it fails very fast, but + // it would be nice to avoid this. See https://github.com/gfx-rs/wgpu/issues/5142 if backends.contains(wgpu::Backends::BROWSER_WEBGPU) { log::debug!("Attempting to create WebGPU adapter to check for support."); if let Some(adapter) = instance