#596: GPU Information names the adapter, or why the GPU compositor is off
Settings > Previews > GPU Information was fixed text ("Compositing: CPU, N
threads... Display: egui on wgpu."): it never named a GPU, even while the GPU
compositor was running, so a card looked undetected. The System Report's GPU
line only said whether the compositor started.
sysinfo::gpu_summary builds the graphics lines from the session: the compositor's
adapter, or the reason compositing is on the CPU, and the adapter the window
itself got. The dialog uses it.
This does not explain why a particular card isn't used for compositing; that
needs the reporter's System Report (Help > System Report).
Tests: engine gpu_summary_names_the_adapter_or_says_why_there_is_none and UI
gpu_information_names_the_adapter_and_why_the_gpu_is_off (fails with the old
text). The six engine tests that fail on this Windows machine (relative footage
and render-queue paths) fail on main too.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
9a7d3e7699
commit
a6945de659
@@ -650,3 +650,44 @@ fn render_backend_says_why_it_renders_on_the_cpu() {
|
||||
assert_eq!(why(&mut s), json!("headless: renders on the CPU unless started with --gpu"));
|
||||
assert_eq!(s.execute("render.backend", json!({"backend": "cpu"})).unwrap()["why"], json!("the project's renderer is Mercury Software Only"));
|
||||
}
|
||||
|
||||
/// Settings ▸ GPU Information names what the GPU compositor runs on, or why it is off, and the
|
||||
/// adapter the window got, so a card the compositor couldn't use doesn't look undetected (#596).
|
||||
#[test]
|
||||
fn gpu_summary_names_the_adapter_or_says_why_there_is_none() {
|
||||
use crate::sysinfo::gpu_summary;
|
||||
use effectcraft_render::{Accelerator, FxStep, Renderer};
|
||||
|
||||
struct Named;
|
||||
impl Accelerator for Named {
|
||||
fn name(&self) -> String {
|
||||
"NVIDIA GeForce RTX 4070 (Vulkan)".into()
|
||||
}
|
||||
fn comp_frame(&self, _: &Renderer, _: crate::project::ItemId, _: effectcraft_time::Tick) -> Option<effectcraft_raster::Image> {
|
||||
None
|
||||
}
|
||||
fn supports_effect(&self, _: &str) -> bool {
|
||||
false
|
||||
}
|
||||
fn effects(&self, _: &[FxStep], _: &effectcraft_effects::Buf, _: Option<f32>) -> Option<effectcraft_effects::Buf> {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
let mut s = Session::default();
|
||||
let off = gpu_summary(&s);
|
||||
assert!(off.contains("Compositing: CPU"), "{off}");
|
||||
assert!(off.contains("GPU compositing is off: no reason was recorded"), "{off}");
|
||||
assert!(off.contains("Window graphics: not known yet"), "{off}");
|
||||
|
||||
s.accel_note = Some("GPU compositor unavailable: no compute shaders".into());
|
||||
s.window_adapter = Some("NVIDIA GeForce RTX 4070 (Dx12, DiscreteGpu)".into());
|
||||
let declined = gpu_summary(&s);
|
||||
assert!(declined.contains("GPU compositing is off: GPU compositor unavailable: no compute shaders"), "{declined}");
|
||||
assert!(declined.contains("Window graphics: NVIDIA GeForce RTX 4070 (Dx12, DiscreteGpu)"), "the card the window got is listed: {declined}");
|
||||
|
||||
s.accel = Some(std::sync::Arc::new(Named));
|
||||
let on = gpu_summary(&s);
|
||||
assert!(on.starts_with("Compositing: GPU, NVIDIA GeForce RTX 4070 (Vulkan)."), "{on}");
|
||||
assert!(!on.contains("compositing is off"), "{on}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user