Skip to content

Commit

Permalink
Warn once instead of debug
Browse files Browse the repository at this point in the history
  • Loading branch information
eero-lehtinen committed Mar 24, 2024
1 parent 21e9013 commit ec10fe7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/bevy_render/src/view/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ use crate::{
};
use bevy_app::{App, Plugin};
use bevy_ecs::{entity::EntityHashMap, prelude::*};
#[cfg(target_os = "linux")]
use bevy_utils::warn_once;
use bevy_utils::{default, tracing::debug, HashSet};
use bevy_window::{
CompositeAlphaMode, PresentMode, PrimaryWindow, RawHandleWrapper, Window, WindowClosed,
Expand Down Expand Up @@ -320,7 +322,7 @@ pub fn prepare_windows(
Ok(frame) => window.set_swapchain_texture(frame),
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Outdated) if is_nvidia() => {
bevy_utils::tracing::debug!(
warn_once!(
"Couldn't get swap chain texture. This often happens with \
the Nvidia 550 driver. It can be safely ignored."
);
Expand All @@ -334,6 +336,10 @@ pub fn prepare_windows(
}
#[cfg(target_os = "linux")]
Err(wgpu::SurfaceError::Outdated) if is_nvidia() => {
warn_once!(
"Couldn't get swap chain texture. This often happens with \
the Nvidia 550 driver. It can be safely ignored."
);
bevy_utils::tracing::debug!(
"Couldn't get swap chain texture. This often happens with \
the Nvidia 550 driver. It can be safely ignored."
Expand Down

0 comments on commit ec10fe7

Please sign in to comment.