diff --git a/crates/xenia-app/src/main.rs b/crates/xenia-app/src/main.rs index ba79147..ff7e297 100644 --- a/crates/xenia-app/src/main.rs +++ b/crates/xenia-app/src/main.rs @@ -966,19 +966,23 @@ fn cmd_exec_inner( let v = v.trim().to_ascii_lowercase(); v == "1" || v == "true" || v == "yes" }); - // A.5 — opt-in threaded GPU under `--ui`. Off by default: `--ui` still - // forces the inline backend (the safe, milestone-verified path). When - // `XENIA_UI_GPU_THREAD=1` is set alongside `--ui`, the GPU command - // processing + per-swap UI publish move to the worker thread, freeing the - // emulation thread from the ~12 ms/frame inline PM4 drain. See - // `run_with_ui` (hook install) and `GpuSystem::run_ui_publish`. - let env_ui_thread = std::env::var("XENIA_UI_GPU_THREAD") + // A.5 — threaded GPU under `--ui`, now the DEFAULT. The GPU command + // processing + per-swap UI publish run on the worker thread, freeing the + // emulation thread from the ~12 ms/frame inline PM4 drain — measured ~5× + // faster boot under `--ui` (~12 → ~63 MIPS), visuals confirmed identical to + // the inline path. See `run_with_ui` (hook install) and + // `GpuSystem::run_ui_publish`. Opt back to the inline backend with + // `--gpu-inline` or `XENIA_UI_GPU_INLINE=1` (the deterministic golden path + // already uses `--gpu-inline`, so goldens are unaffected). `XENIA_UI_GPU_THREAD` + // is retained as a no-op alias for back-compat. + let env_ui_inline = std::env::var("XENIA_UI_GPU_INLINE") .ok() .is_some_and(|v| { let v = v.trim().to_ascii_lowercase(); v == "1" || v == "true" || v == "yes" }); - let ui_threaded = ui && env_ui_thread; + let ui_inline_optout = gpu_inline || env_inline || env_ui_inline; + let ui_threaded = ui && !ui_inline_optout; let force_inline = gpu_inline || env_inline || (ui && !ui_threaded); let force_thread = gpu_thread || env_thread || ui_threaded; let use_threaded = if force_inline {