Skip to content

Commit

Permalink
Add logging for the ignored error
Browse files Browse the repository at this point in the history
  • Loading branch information
eero-lehtinen committed Mar 24, 2024
1 parent 3eef57d commit 21e9013
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions crates/bevy_render/src/view/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,12 @@ pub fn prepare_windows(
match surface.get_current_texture() {
Ok(frame) => window.set_swapchain_texture(frame),
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Outdated) if is_nvidia() => {}
Err(wgpu::SurfaceError::Outdated) if is_nvidia() => {
bevy_utils::tracing::debug!(
"Couldn't get swap chain texture. This often happens with \
the Nvidia 550 driver. It can be safely ignored."
);
}
Err(err) => panic!("Error configuring surface: {err}"),
};
} else {
Expand All @@ -328,7 +333,12 @@ pub fn prepare_windows(
window.set_swapchain_texture(frame);
}
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Outdated) if is_nvidia() => {}
Err(wgpu::SurfaceError::Outdated) if is_nvidia() => {
bevy_utils::tracing::debug!(
"Couldn't get swap chain texture. This often happens with \
the Nvidia 550 driver. It can be safely ignored."
);
}
Err(wgpu::SurfaceError::Outdated) => {
render_device.configure_surface(surface, &surface_data.configuration);
let frame = surface
Expand Down

0 comments on commit 21e9013

Please sign in to comment.