Skip to content

Commit

Permalink
Remove configure that breaks iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
eero-lehtinen committed Mar 17, 2024
1 parent 08eb5d9 commit 193cf30
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions crates/bevy_render/src/view/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,30 +320,25 @@ pub fn prepare_windows(
})
};

let not_already_configured = window_surfaces.configured_windows.insert(window.entity);

let surface = &surface_data.surface;
if not_already_configured || window.size_changed || window.present_mode_changed {
render_device.configure_surface(surface, &surface_data.configuration);
}
match surface.get_current_texture() {
Ok(frame) => {
window.set_swapchain_texture(frame);
}
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Outdated) if ignore_outdated() => {}
Err(wgpu::SurfaceError::Outdated) => {
render_device.configure_surface(surface, &surface_data.configuration);
let frame = surface
.get_current_texture()
.expect("Error reconfiguring surface");
window.set_swapchain_texture(frame);
match surface.get_current_texture() {
Ok(frame) => window.set_swapchain_texture(frame),
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Outdated) if ignore_outdated() => {}
Err(err) => panic!("Error reconfiguring surface: {err}"),
}
}
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Timeout) if may_erroneously_timeout() => {
bevy_utils::tracing::trace!(
"Couldn't get swap chain texture. This is probably a quirk \
of your Linux GPU driver, so it can be safely ignored."
of your Linux GPU driver, so it can be safely ignored."
);
}
Err(err) => {
Expand Down

0 comments on commit 193cf30

Please sign in to comment.