Skip to content

Commit

Permalink
Update to latest wgpu revision
Browse files Browse the repository at this point in the history
  • Loading branch information
kelpsyberry committed Jan 20, 2024
1 parent f885b13 commit 019b799
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-release-macos-app-bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

jobs:
build:
name: Build release macOS app bundles
name: Build
runs-on: macos-latest

steps:
Expand Down
17 changes: 12 additions & 5 deletions frontend/desktop/src/ui/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,13 @@ impl GfxState {
backends: wgpu::Backends::all(),
..Default::default()
});
let surface =
unsafe { instance.create_surface_from_raw(window) }.expect("Couldn't create surface");
let surface = unsafe {
instance.create_surface_unsafe(
wgpu::SurfaceTargetUnsafe::from_window(window)
.expect("Couldn't get surface target from window"),
)
}
.expect("Couldn't create surface");

let adapter = match adapter {
AdapterSelection::Auto(power_preference) => {
Expand All @@ -62,9 +67,10 @@ impl GfxState {
})
.await
}
AdapterSelection::Manual(backends, suitable) => {
instance.enumerate_adapters(backends).find(suitable)
}
AdapterSelection::Manual(backends, suitable) => instance
.enumerate_adapters(backends)
.into_iter()
.find(suitable),
}
.expect("Couldn't create graphics adapter");

Expand Down Expand Up @@ -103,6 +109,7 @@ impl GfxState {
present_mode: wgpu::PresentMode::AutoVsync,
alpha_mode: wgpu::CompositeAlphaMode::Auto,
view_formats: Vec::new(),
desired_maximum_frame_latency: 2,
};
surface.configure(&device, &surf_config);

Expand Down

0 comments on commit 019b799

Please sign in to comment.