Skip to content

Commit

Permalink
Improve logging in the case of only one adaptor
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk committed Dec 1, 2023
1 parent d69aec9 commit 7660beb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/egui-wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ impl RenderState {
instance.enumerate_adapters(wgpu::Backends::all()).collect();
if adaptors.is_empty() {
log::info!("No wgpu adaptors found");
} else if adaptors.len() == 1 {
log::info!(
"The only available wgpu adaptor was not suitable: {}",
adapter_info_summary(&adaptors[0].get_info())
);
} else {
log::info!(
"No suitable wgpu adapter found out of the {} available ones: {}",
Expand Down

0 comments on commit 7660beb

Please sign in to comment.