diff options
Diffstat (limited to 'client/src/interfaces')
-rw-r--r-- | client/src/interfaces/mod.rs | 2 | ||||
-rw-r--r-- | client/src/interfaces/profiler.rs | 26 |
2 files changed, 26 insertions, 2 deletions
diff --git a/client/src/interfaces/mod.rs b/client/src/interfaces/mod.rs index eb0eb86..9dfce63 100644 --- a/client/src/interfaces/mod.rs +++ b/client/src/interfaces/mod.rs @@ -23,6 +23,7 @@ use prefabindex::PrefabIndexInterface; use profiler::{Profiler, TimingProfiler}; use std::sync::{Arc, Mutex}; use weareshared::resources::PrefabIndex; +use wgpu::AdapterInfo; enum Interface { Selector, @@ -36,6 +37,7 @@ pub struct InterfaceData { pub downloader: Arc<Downloader>, pub prefab_index: Arc<PrefabIndex>, pub render_timing: Arc<Mutex<TimingProfiler>>, + pub adapter_info: Arc<AdapterInfo>, } pub fn ui_selector(idata: Arc<InterfaceData>) -> impl Fn(&egui::Context) -> bool { diff --git a/client/src/interfaces/profiler.rs b/client/src/interfaces/profiler.rs index c6256b6..b6c4698 100644 --- a/client/src/interfaces/profiler.rs +++ b/client/src/interfaces/profiler.rs @@ -28,10 +28,32 @@ impl Widget for &mut Profiler { self.idata.scene_prepare.ui(ui); }); ui.collapsing("Download", |ui| { - ui.add(&*self.idata.downloader); + self.idata.downloader.ui(ui); }); ui.collapsing("Render", |ui| { - ui.add(&*self.idata.render_timing.lock().unwrap()); + self.idata.render_timing.lock().unwrap().ui(ui); + }); + ui.collapsing("Adapter Info", |ui| { + Grid::new("ai") + .num_columns(2) + .show(ui, |ui| { + ui.label("Backend"); + ui.label(&self.idata.adapter_info.backend.to_string()); + ui.end_row(); + ui.label("Name"); + ui.label(&self.idata.adapter_info.name); + ui.end_row(); + ui.label("Device Type"); + ui.label(format!("{:?}", self.idata.adapter_info.device_type)); + ui.end_row(); + ui.label("Driver"); + ui.label(&self.idata.adapter_info.driver); + ui.end_row(); + ui.label("Driver Info"); + ui.label(&self.idata.adapter_info.driver_info); + ui.end_row(); + }) + .response }); ui.response() } |