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,9 +3,9 @@
use super::{BladeAtlas, PATH_TEXTURE_FORMAT};
use crate::{
AtlasTextureKind, AtlasTile, Bounds, ContentMask, DevicePixels, Hsla, MonochromeSprite, Path,
PathId, PathVertex, PolychromeSprite, PrimitiveBatch, Quad, ScaledPixels, Scene, Shadow, Size,
Underline,
AtlasTextureKind, AtlasTile, Bounds, ContentMask, DevicePixels, GPUSpecs, Hsla,
MonochromeSprite, Path, PathId, PathVertex, PolychromeSprite, PrimitiveBatch, Quad,
ScaledPixels, Scene, Shadow, Size, Underline,
};
use bytemuck::{Pod, Zeroable};
use collections::HashMap;
@ -451,6 +451,18 @@ impl BladeRenderer {
&self.atlas
}
#[cfg_attr(target_os = "macos", allow(dead_code))]
pub fn gpu_specs(&self) -> GPUSpecs {
let info = self.gpu.device_information();
GPUSpecs {
is_software_emulated: info.is_software_emulated,
device_name: info.device_name.clone(),
driver_name: info.driver_name.clone(),
driver_info: info.driver_info.clone(),
}
}
#[cfg(target_os = "macos")]
pub fn layer(&self) -> metal::MetalLayer {
self.gpu.metal_layer().unwrap()