Skip to content

Commit

Permalink
general wgpu updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Oct 8, 2023
1 parent b5e3502 commit 13a7bf3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions crates/egui-wgpu/src/winit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Painter {
) -> Self {
let instance = wgpu::Instance::new(wgpu::InstanceDescriptor {
backends: configuration.supported_backends,
dx12_shader_compiler: Default::default(),
..Default::default()
});

Self {
Expand Down Expand Up @@ -528,6 +528,7 @@ impl Painter {
});

let mut render_pass = encoder.begin_render_pass(&wgpu::RenderPassDescriptor {
label: Some("egui_render"),
color_attachments: &[Some(wgpu::RenderPassColorAttachment {
view,
resolve_target,
Expand All @@ -538,20 +539,21 @@ impl Painter {
b: clear_color[2] as f64,
a: clear_color[3] as f64,
}),
store: true,
store: wgpu::StoreOp::Store,
},
})],
depth_stencil_attachment: self.depth_texture_view.as_ref().map(|view| {
wgpu::RenderPassDepthStencilAttachment {
view,
depth_ops: Some(wgpu::Operations {
load: wgpu::LoadOp::Clear(1.0),
store: true,
store: wgpu::StoreOp::Discard,
}),
stencil_ops: None,
}
}),
label: Some("egui_render"),
timestamp_writes: None,
occlusion_query_set: None,
});

renderer.render(&mut render_pass, clipped_primitives, &screen_descriptor);
Expand Down

0 comments on commit 13a7bf3

Please sign in to comment.