fix(m188): r1 复审 P2-1——后端启动失败的具名原因进 launcher.log
复审结论 p2-1/1 item + fix-then-merge:主线成立,但「启动器自己因 GPU / 渲染后端起不来」的 事故原因仍只进 stderr —— 双击启动没有 stderr,那条路径上等于没有日志。 - renderer/mod.rs::report_failure 的两行(`[gpu] <backend> 初始化失败(具名)` / `[gpu] 失败详情(具名)`)改走 diag!; - renderer/log_bridge.rs 转出的 wgpu 日志(含 `…Selected: AdapterInfo…`,GPU 真生效的唯一证据 行)改走 diag!; - renderer/preflight.rs 的 `[gpu-preflight]`(ULL_PREFLIGHT=1)改走 diag!; - probe.rs::apply_with_preflight 的三行 `[probe]` 改走 diag!。 - app/diag.rs 模块文档 + docs/logs-location.md §3 的判据改准: 「逐帧度量不接;显式取证开关与一次性事故行可接」,并修掉 `[corner]` 两处自相矛盾 (唯一打印点在 app/update/appearance.rs,走 diag! ⇒ 进日志;corner.rs 只 format_line)。 - 新守门 renderer::tests::a_backend_startup_failure_lands_in_the_launcher_log: 断言那两行真的落进 launcher.log;变异(改回纯 eprintln)→ 红。 - README 两语的 launcher.log 行补上「渲染后端起不来的具名原因」。
This commit is contained in:
1 parent
5fd5cd47dc
commit
8c5bebf3e3
9 files changed
+87
-27
No files matched your search
@@ -76,10 +76,14 @@ pub fn run_if_requested() -> Option<Result<Verdict, Failure>> {
|
||||
let started = std::time::Instant::now();
|
||||
let verdict = run();
|
||||
let took = started.elapsed().as_secs_f64() * 1000.0;
|
||||
// M188:显式开关(`ULL_PREFLIGHT=1`)下的一次性行,按 `app::diag` 的判据可以进
|
||||
// `launcher.log`——用户开这个开关就是为了拿到「为什么起不来」的证据。
|
||||
match &verdict {
|
||||
Ok(ok) => eprintln!("[gpu-preflight] {} took={took:.0}ms", ok.describe()),
|
||||
Ok(ok) => {
|
||||
crate::app::diag::diag!("[gpu-preflight] {} took={took:.0}ms", ok.describe());
|
||||
}
|
||||
Err(failure) => {
|
||||
eprintln!("[gpu-preflight] {} took={took:.0}ms", failure.describe());
|
||||
crate::app::diag::diag!("[gpu-preflight] {} took={took:.0}ms", failure.describe());
|
||||
}
|
||||
}
|
||||
Some(verdict)
|
||||
|
||||
Reference in new issue
Block a user