Skip to content

Commit

Permalink
Fix incorrect instance creation in egui_kittest wgpu renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jan 2, 2025
1 parent 53964cc commit d28dd8b
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/egui_kittest/src/wgpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d28dd8b

Please sign in to comment.