From d28dd8b5edae121315e44b9fd4065fde43fdd0ce Mon Sep 17 00:00:00 2001 From: Andreas Reich Date: Thu, 2 Jan 2025 18:38:17 +0100 Subject: [PATCH] Fix incorrect instance creation in egui_kittest wgpu renderer --- crates/egui_kittest/src/wgpu.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/egui_kittest/src/wgpu.rs b/crates/egui_kittest/src/wgpu.rs index 1eba6981252..024a655354b 100644 --- a/crates/egui_kittest/src/wgpu.rs +++ b/crates/egui_kittest/src/wgpu.rs @@ -56,7 +56,14 @@ pub fn default_wgpu_setup() -> egui_wgpu::WgpuSetup { pub fn create_render_state(setup: WgpuSetup) -> egui_wgpu::RenderState { let instance = match &setup { WgpuSetup::Existing { instance, .. } => instance.clone(), - WgpuSetup::CreateNew { .. } => Default::default(), + WgpuSetup::CreateNew(egui_wgpu::WgpuSetupCreateNew { + supported_backends, .. + }) => Arc::new(wgpu::Instance::new(wgpu::InstanceDescriptor { + backends: *supported_backends, + flags: wgpu::InstanceFlags::default(), + dx12_shader_compiler: wgpu::Dx12Compiler::Fxc, + gles_minor_version: wgpu::Gles3MinorVersion::Automatic, + })), }; pollster::block_on(egui_wgpu::RenderState::create(