mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Update wgpu to 28.0.0 (#7853)
Co-authored-by: lucasmerlin <hi@lucasmerlin.me>
This commit is contained in:
committed by
GitHub
parent
5031c47cb2
commit
41b8f5f4e7
@@ -47,7 +47,7 @@ impl CaptureState {
|
||||
},
|
||||
depth_stencil: None,
|
||||
multisample: MultisampleState::default(),
|
||||
multiview: None,
|
||||
multiview_mask: None,
|
||||
cache: None,
|
||||
});
|
||||
|
||||
@@ -165,6 +165,7 @@ impl CaptureState {
|
||||
depth_stencil_attachment: None,
|
||||
occlusion_query_set: None,
|
||||
timestamp_writes: None,
|
||||
multiview_mask: None,
|
||||
});
|
||||
|
||||
pass.set_pipeline(&self.pipeline);
|
||||
|
||||
@@ -185,7 +185,7 @@ impl RenderState {
|
||||
wgpu::Backends::all()
|
||||
};
|
||||
|
||||
instance.enumerate_adapters(backends)
|
||||
instance.enumerate_adapters(backends).await
|
||||
};
|
||||
|
||||
let (adapter, device, queue) = match config.wgpu_setup.clone() {
|
||||
@@ -395,6 +395,10 @@ pub fn adapter_info_summary(info: &wgpu::AdapterInfo) -> String {
|
||||
driver,
|
||||
driver_info,
|
||||
backend,
|
||||
device_pci_bus_id,
|
||||
subgroup_min_size,
|
||||
subgroup_max_size,
|
||||
transient_saves_memory,
|
||||
} = &info;
|
||||
|
||||
// Example values:
|
||||
@@ -426,6 +430,13 @@ pub fn adapter_info_summary(info: &wgpu::AdapterInfo) -> String {
|
||||
if *device != 0 {
|
||||
summary += &format!(", device: 0x{device:02X}");
|
||||
}
|
||||
if !device_pci_bus_id.is_empty() {
|
||||
summary += &format!(", pci_bus_id: {device_pci_bus_id:?}");
|
||||
}
|
||||
if *subgroup_min_size != 0 || *subgroup_max_size != 0 {
|
||||
summary += &format!(", subgroup_size: {subgroup_min_size}..={subgroup_max_size}");
|
||||
}
|
||||
summary += &format!(", transient_saves_memory: {transient_saves_memory}");
|
||||
|
||||
summary
|
||||
}
|
||||
|
||||
@@ -353,7 +353,7 @@ impl Renderer {
|
||||
let pipeline_layout = device.create_pipeline_layout(&wgpu::PipelineLayoutDescriptor {
|
||||
label: Some("egui_pipeline_layout"),
|
||||
bind_group_layouts: &[&uniform_bind_group_layout, &texture_bind_group_layout],
|
||||
push_constant_ranges: &[],
|
||||
immediate_size: 0,
|
||||
});
|
||||
|
||||
let depth_stencil = options
|
||||
@@ -426,7 +426,7 @@ impl Renderer {
|
||||
})],
|
||||
compilation_options: wgpu::PipelineCompilationOptions::default()
|
||||
}),
|
||||
multiview: None,
|
||||
multiview_mask: None,
|
||||
cache: None,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -362,14 +362,13 @@ impl Painter {
|
||||
#[cfg(all(target_os = "macos", feature = "macos-window-resize-jitter-fix"))]
|
||||
{
|
||||
// SAFETY: The cast is checked with if condition. If the used backend is not metal
|
||||
// it gracefully fails. The pointer casts are valid as it's 1-to-1 type mapping.
|
||||
// This is how wgpu currently exposes this backend-specific flag.
|
||||
// it gracefully fails.
|
||||
unsafe {
|
||||
if let Some(hal_surface) = state.surface.as_hal::<wgpu::hal::api::Metal>() {
|
||||
let raw =
|
||||
std::ptr::from_ref::<wgpu::hal::metal::Surface>(&*hal_surface).cast_mut();
|
||||
|
||||
(*raw).present_with_transaction = resizing;
|
||||
hal_surface
|
||||
.render_layer()
|
||||
.lock()
|
||||
.set_presents_with_transaction(resizing);
|
||||
|
||||
Self::configure_surface(
|
||||
state,
|
||||
@@ -582,6 +581,7 @@ impl Painter {
|
||||
}),
|
||||
timestamp_writes: None,
|
||||
occlusion_query_set: None,
|
||||
multiview_mask: None,
|
||||
});
|
||||
|
||||
// Forgetting the pass' lifetime means that we are no longer compile-time protected from
|
||||
|
||||
Reference in New Issue
Block a user