"Improve graphics speed" under Vulkan: our own auto-tuner (one-shot with Undo + optional keep-my-FPS mode) #422

Closed
opened 2026-10-05 11:03:23 +00:00 by sky_line · 2 comments
Owner

Preferences > Graphics > "Improve graphics speed" (the performance floater, floater_performance.xml, including the Automatic adjustments panel panel_performance_autoadjustments.xml) comes from LL and is built on LL's LLPerfStats autotune (llperfstats.cpp), which was designed around the GL renderer's costs (avatar render time, CPU-side draw, etc.). Under Vulkan it's unclear what, if anything, it does; the wiki currently only says which window opens.

Goal

Make this window genuinely useful under Vulkan, with our own auto-tuner: given a target frame rate, the viewer adjusts its settings to reach it, using measurements of our renderer.

Design notes

  • Measure what matters in VK:
    • GPU frame time per pass (the clean renderer's GPU timers: shadows, probes, RT, lighting, post, FSR) and CPU frame time (main-thread work, ingest, avatars);
    • avatar costs (rigged/animated counts, complexity);
    • VRAM headroom (#405 budget).
  • Know what each setting costs: a table of tunables with an expected cost and a visual-quality weight. Examples: render scale / FSR quality, shadow resolution and distance, RT on/off, probe detail/count/resolution, mirrors, draw distance, LOD factors, avatar max non-impostors / complexity, SSAO, glow, texture resolution cap. Prefer the cheapest-for-the-least-visual-loss changes first (like the VRAM ladder's ordering).
  • Algorithm:
    • Measure for a few seconds.
    • If GPU-bound, step down the GPU-heavy settings with the best cost/quality ratio. If CPU-bound, step down the CPU-heavy ones (avatar counts, draw distance, LOD).
    • Re-measure, and repeat until the target is met with a little headroom.
    • Optionally step back up when there's headroom.
    • Include hysteresis so it doesn't flap.
  • Two modes:
    • "Tune once": the user clicks, it adjusts and writes real settings (an explicit user action, so changing settings is fine), and shows a summary of what changed, with Undo.
    • "Keep my FPS" (continuous): behaves like the VRAM ladder — temporary effective caps, never writing settings — per the soft-pressure rule.
  • Scenes: measurements should be robust to the camera moving. Sample over time, or offer "tune for this place".
  • The existing UI:
    • keep the useful parts (avatar complexity lists, the "your avatar" cost);
    • fix or remove anything that doesn't map to VK;
    • make the window show our frame breakdown (GPU vs CPU, per-pass) so users can see what's expensive.

Done when

  • The Improve graphics speed window works under Vulkan, with a one-shot tuner (with summary + Undo) and an optional continuous "keep my FPS" mode.
  • It's driven by VK GPU/CPU timings, with documented tunables and an ordering.
  • The wiki page is updated.
**Preferences > Graphics > "Improve graphics speed"** (the performance floater, `floater_performance.xml`, including the **Automatic adjustments** panel `panel_performance_autoadjustments.xml`) comes from LL and is built on LL's `LLPerfStats` autotune (`llperfstats.cpp`), which was designed around the GL renderer's costs (avatar render time, CPU-side draw, etc.). Under Vulkan it's unclear what, if anything, it does; the wiki currently only says which window opens. ## Goal Make this window genuinely useful under Vulkan, with **our own auto-tuner**: given a target frame rate, the viewer adjusts its settings to reach it, using measurements of *our* renderer. ## Design notes - **Measure what matters in VK:** - GPU frame time per pass (the clean renderer's GPU timers: shadows, probes, RT, lighting, post, FSR) and CPU frame time (main-thread work, ingest, avatars); - avatar costs (rigged/animated counts, complexity); - VRAM headroom (#405 budget). - **Know what each setting costs:** a table of tunables with an expected cost and a visual-quality weight. Examples: render scale / FSR quality, shadow resolution and distance, RT on/off, probe detail/count/resolution, mirrors, draw distance, LOD factors, avatar max non-impostors / complexity, SSAO, glow, texture resolution cap. Prefer the cheapest-for-the-least-visual-loss changes first (like the VRAM ladder's ordering). - **Algorithm:** - Measure for a few seconds. - If GPU-bound, step down the GPU-heavy settings with the best cost/quality ratio. If CPU-bound, step down the CPU-heavy ones (avatar counts, draw distance, LOD). - Re-measure, and repeat until the target is met with a little headroom. - Optionally step back up when there's headroom. - Include hysteresis so it doesn't flap. - **Two modes:** - **"Tune once":** the user clicks, it adjusts and **writes real settings** (an explicit user action, so changing settings is fine), and shows a summary of what changed, with Undo. - **"Keep my FPS" (continuous):** behaves like the VRAM ladder — temporary effective caps, never writing settings — per the soft-pressure rule. - **Scenes:** measurements should be robust to the camera moving. Sample over time, or offer "tune for this place". - **The existing UI:** - keep the useful parts (avatar complexity lists, the "your avatar" cost); - fix or remove anything that doesn't map to VK; - make the window show *our* frame breakdown (GPU vs CPU, per-pass) so users can see what's expensive. ## Done when - [ ] The Improve graphics speed window works under Vulkan, with a one-shot tuner (with summary + Undo) and an optional continuous "keep my FPS" mode. - [ ] It's driven by VK GPU/CPU timings, with documented tunables and an ordering. - [ ] The wiki page is updated.
sky_line added this to the Slipstream project 2026-10-06 15:04:13 +00:00
Author
Owner

Starting this. Known issue to fix along the way: the current auto-tune targets 0 FPS. Every existing setting in the performance window gets wired up under Vulkan; any that cannot work under Vulkan is removed.

Starting this. Known issue to fix along the way: the current auto-tune targets 0 FPS. Every existing setting in the performance window gets wired up under Vulkan; any that cannot work under Vulkan is removed.
Author
Owner

Shipped in 1.3.0 Beta 7: the FPS auto-tuner (Tune once with measured keep or revert, probing then bisecting, A/B testing; Keep my FPS) and refresh-rate detection.

Shipped in 1.3.0 Beta 7: the FPS auto-tuner (Tune once with measured keep or revert, probing then bisecting, A/B testing; Keep my FPS) and refresh-rate detection.
sky_line 2026-10-12 15:12:22 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#422
No description provided.