linux: Better GPU debugging (#14706)

Release Notes:

- linux: Added GPU information to `editor: Copy System Specs to
Clipboard`
- linux: Show a prominant warning before running under llvmpipe and
similar.
This commit is contained in:
Conrad Irwin 2024-07-23 09:56:45 -06:00 committed by GitHub
parent c262c81e52
commit bdf1d4edea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 136 additions and 48 deletions

View file

@ -3,7 +3,7 @@ use crate::{
AnyView, AppContext, Arena, Asset, AsyncWindowContext, AvailableSpace, Bounds, BoxShadow,
Context, Corners, CursorStyle, Decorations, DevicePixels, DispatchActionListener,
DispatchNodeId, DispatchTree, DisplayId, Edges, Effect, Entity, EntityId, EventEmitter,
FileDropEvent, Flatten, FontId, Global, GlobalElementId, GlyphId, Hsla, ImageData,
FileDropEvent, Flatten, FontId, GPUSpecs, Global, GlobalElementId, GlyphId, Hsla, ImageData,
InputHandler, IsZero, KeyBinding, KeyContext, KeyDownEvent, KeyEvent, Keystroke,
KeystrokeEvent, LayoutId, LineLayoutIndex, Model, ModelContext, Modifiers,
ModifiersChangedEvent, MonochromeSprite, MouseButton, MouseEvent, MouseMoveEvent, MouseUpEvent,
@ -3733,6 +3733,12 @@ impl<'a> WindowContext<'a> {
.dispatch_tree
.on_action(action_type, Rc::new(listener));
}
/// Read information about the GPU backing this window.
/// Currently returns None on Mac and Windows.
pub fn gpu_specs(&self) -> Option<GPUSpecs> {
self.window.platform_window.gpu_specs()
}
}
#[cfg(target_os = "windows")]