Help: the System Compatibility Report says why there is no GPU and names the window's adapter (#596)
With no GPU compositor the report only said "GPU: none", though the host had recorded the reason (`Session::accel_note`: the compositor's setup error, a retired GPU preview, a headless start) and the window's wgpu adapter was known. Users with a capable GPU (#596, an RTX 4070) couldn't tell why it wasn't used. The report now carries `gpuNote` (the reason, when there is no compositor) and `windowGraphics` (the adapter, backend, device type and driver the window draws with, which the desktop app records when it sets up the GPU), and the text shows "GPU: none (CPU compositing): <reason>" and "Window graphics: …"; the issue line names the reason too. Test: the compatibility report test sets a reason and an adapter and checks the JSON and text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f
This commit is contained in:
@@ -455,6 +455,15 @@ fn compatibility_report_and_logging() {
|
||||
}
|
||||
let text = crate::commands::report_text_for_tests(&r);
|
||||
assert!(text.contains("Operating system") && text.contains("Import:"));
|
||||
// #596: without a GPU compositor the report says why, and names the window's adapter.
|
||||
s.accel_note = Some("GPU compositor unavailable: no storage textures".into());
|
||||
s.window_adapter = Some("NVIDIA GeForce RTX 4070 (Gl, DiscreteGpu)".into());
|
||||
let r = s.execute("help.systemReport", json!({"quiet": true})).unwrap();
|
||||
assert_eq!(r["gpuNote"], "GPU compositor unavailable: no storage textures");
|
||||
let text = crate::commands::report_text_for_tests(&r);
|
||||
assert!(text.contains("GPU: none (CPU compositing): GPU compositor unavailable: no storage textures"), "{text}");
|
||||
assert!(text.contains("Window graphics: NVIDIA GeForce RTX 4070 (Gl, DiscreteGpu)"), "{text}");
|
||||
assert!(r["issues"][0].as_str().is_some_and(|i| i.contains("no storage textures")), "{r}");
|
||||
s.drain_events();
|
||||
s.execute("help.systemReport", json!({})).unwrap();
|
||||
assert!(s.drain_events().iter().any(|e| matches!(e, crate::Event::Frontend { command, .. } if command == "app.showReport")));
|
||||
|
||||
Reference in New Issue
Block a user