perf(vk): +18.0% 1% low / +5.6% FPS in Market on 6+ core non-mirrored / integrated GPUs via Auto recorder thread #2334

Merged
HumanBean merged 2 commits from Jer9/Longshot:perf/vk-auto-recorder-nomirror into main 2026-11-23 16:14:22 +00:00
Contributor

Summary

What a player notices: On 6+ core PCs and handhelds without buffer-pool VRAM mirrors — integrated GPUs (!f.discrete(), such as AMD Radeon 780M/860M/890M/8060S, Ryzen Z1E/Z2E/AI 300, Intel Core Ultra Arc iGPU) or RX_VK_MIRROR=0 — Threaded rendering: Auto (threaded_rendering=0, the default) runs smoother with fewer CPU hitches in draw-heavy towns and fields (+18.0% 1% low FPS, +5.6% mean FPS in Market_Child at 67% render scale) without changing visual output.

  • Helps: CPU-bound and command-submission-heavy scenes (Market_Child, Hyrule Field, Kokiri Forest) on 6+ core non-mirrored / integrated GPUs under Threaded rendering: Auto, by offloading vkCmd* recording and vkQueueSubmit2 off the game's presentation thread (queue submit 0.94 -> 0.00 ms, cmds_ms -48.3%, render_ms -21.2%).
  • No measurable impact: 4–5 core non-mirrored systems (including 4c/8t Steam Deck), < 4-core CPUs, mirrored discrete GPUs (already enabled on main via #2232's kAutoCores = 4), purely GPU-bound scenes, and runs with Threaded rendering: Off (threaded_rendering=2), RX_VK_RECORDER=off, RX_VK_CAPTURE=0, RX_VK_LOW_SPEC, RX_VK_DUMP, or RX_VK_BENCH.

Previously, when pools_mirrored() returned false, vk_menu.cpp forced both the render thread (RX_VK_ASYNC=1) and the recorder thread (RX_VK_RECORDER=thread) off, even though only the render thread runs the game a frame ahead of replay and depends on buffer-pool mirrors. The recorder thread (RX_VK_RECORDER=thread with RX_VK_RECORDER_PARTS=1) replays synchronously under replay_mu (DrainingMutex), preserves readback_early_on() for non-mirrored iGPUs, and offloads only Vulkan command recording and queue submission.

This change adds kAutoRecorderOnlyCores (6), Why::AutoRecorderOnly, and without_mirrors() in gpu/vk/threaded_rendering.h / gpu/vk/vk_menu.cpp:

  • Why kAutoRecorderOnlyCores = 6 post-#2232: #2232 (964599d2) lowered kAutoCores from 6 to 4 for mirrored GPUs, leaving non-mirrored GPUs off. Holding the non-mirrored recorder-only tier at kAutoRecorderOnlyCores = 6 leaves #2232's kAutoCores = 4 for mirrored GPUs untouched while deliberately keeping 4-core/8-thread handhelds such as the Steam Deck unchanged (Auto: off) until explicitly A/B tested on that tier, matching the existing 4-core vs. 6-core frame-pacing measurements in gpu/vk/threaded_rendering.h.
  • Updates tests/test_threaded_rendering.py, gpu/vk/menu/threads.cpp, gpu/vk/vk_menu.h, gpu/vk/vk_recorder.h, gpu/vk/vk_replay.cpp, gpu/vk/device_policy.h, gpu/vk/switches.def, and docs (docs/user/graphics-and-controls.md, docs/dev/reference/architecture.md, docs/dev/reference/switches.md, docs/dev/reference/threads.md).

Files to read first:

  • gpu/vk/threaded_rendering.h: kAutoRecorderOnlyCores, Why::AutoRecorderOnly, without_mirrors(), describe()
  • gpu/vk/vk_menu.cpp: threaded_choice()
  • gpu/vk/vk_menu.h, gpu/vk/menu/threads.cpp, gpu/vk/vk_recorder.h, gpu/vk/vk_replay.cpp
  • tests/test_threaded_rendering.py

Prior work / neighbours: Builds cleanly on merged #2232 (964599d2, which lowered mirrored kAutoCores to 4 while leaving non-mirrored GPUs off); non-overlapping with WIP #1407 (low-core threshold).

Testing

Tested:

  • Hardware / OS: Windows 11 (build 26200), AMD Ryzen AI 7 350 (8 cores / 16 threads), AMD Radeon 860M (RDNA 3.5 iGPU, 6 GB VGM, 32 GB RAM), AMD Adrenalin 26.10.1 (LLPC).
  • How to test: Launch Market_Child (market-entrance repo save) with default Threaded rendering: Auto (threaded_rendering=0), 1600x1000, handheld_profile=1, 67% render scale, sharpness=80, vsync=0, amd_anti-lag_2=1, RX_VK_PRECOMPILE=1, zero env overrides (HOS_ENV_FILE empty), settle >= 12.5 s, then walk forward 5 s (0:LUP/5000) to the Market fountain and pan around the plaza. Reset <rt>\cache from an immutable golden warm cache (cache_golden) before every run.
  • In-game benchmark (3 interleaved rounds on 0e32bc10, golden-cache-reset per run): Verified main @ 0e32bc10 logs vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) and this PR @ b2f252d8 logs vk: Threaded rendering: Auto: the recorder thread only (8 cores of 16 logical processors; the render thread off: the buffer pools have no mirrors) with queue submit 0.00 ms, 0 direct ring fallbacks, and 0.04 ms/frame replay-lock wait. Beat main @ 0e32bc10 in all 3 rounds with strictly non-overlapping wins on Mean FPS (+5.6%), Median FPS (+5.4%), 1% low FPS (+18.0%), p95 (-7.1%), p99 (-15.3%), p99.9 (-10.8%), render_ms (-21.2%), draw_ms (-17.4%), and cmds_ms (-48.3%); 0 VK_ERROR_DEVICE_LOST, exit code 0, 0 API-version mismatch warnings (MKWVK_API_VERSION 45).
  • Matched stationary visual parity (RX_VK_SHOT_FX=1, sharpness=80, 67% render scale, golden-cache-reset, settled 120 frames post-in-play with zero camera movement): main_1 vs main_2 animated-scene noise floor (MAE 3.40/255, PSNR 28.68 dB) vs main_1 vs PR 2 (MAE 5.42/255, PSNR 26.20 dB); visually inspected side-by-side with zero rendering artifacts.
  • 3-zone stability tour (Market_Child -> Hyrule Field -> Kokiri Forest, golden-cache-reset): Exit code 0, 0 VK_ERROR_DEVICE_LOST; Market_Child 32.58 -> 36.99 FPS (1% low 19.36 -> 21.20 FPS, >= 33.3 ms 74 -> 26), Hyrule Field 55.63 -> 69.63 FPS (1% low 14.33 -> 23.92 FPS, >= 33.3 ms 49 -> 14), Kokiri Forest 40.55 -> 51.92 FPS (1% low 20.05 -> 26.28 FPS, >= 33.3 ms 55 -> 13).
  • Game-free checks (Windows, llvm-mingw, on 0e32bc10):
    • Red-to-green: tests/test_threaded_rendering.py --strict FAILED on commit 1 (a1912c48 on 0e32bc10, rc=1, no kAutoRecorderOnlyCores) and PASSED on HEAD (b2f252d8, rc=0, all rules + 45 broken-copy mutations caught).
    • Targeted --strict suite (8/8 PASSED, 0 failed, 0 skipped): test_threaded_rendering.py, test_device_policy.py, test_switch_table.py, test_settings_table.py, test_doc_anchors.py, test_utf8_paths.py, test_vk_braces.py, test_menu_i18n.py.
    • Full python -I -B tests/run_all.py: 877 passed, 21 failed, 59 skipped in 322 s (test_job_queue.py passed safely; 0 PR regressions — all 21 pre-existing main failures [test_sampler_admission, test_auto_handheld, test_build_long_paths, test_crash_dialog, test_dev_build, test_dev_migrate, test_dev_ab, test_dev_packs, test_discover, test_game_menu_mouse_buttons, test_input_movie, test_lift_lookups, test_linux_preflight, test_make_game_cache, test_pads_after_menu, test_pipeline_state_computes, test_perf_report, test_saveload_warm_cache, test_sdiv_overflow, test_srccut, test_walk] reproduced 21/21 identically on clean main @ 0e32bc10).

Still to test:

  • Linux 6+ core AMD iGPU / handheld APU (RADV, e.g. Ryzen 780M/890M/Z1E/Z2E): run Market_Child with threaded_rendering=0 (Auto, empty HOS_ENV_FILE), verifying longshot_log.txt prints vk: Threaded rendering: Auto: the recorder thread only, queue submit 0.00, and vk: recorder: with lower replay CPU and 0 VK_ERROR_DEVICE_LOST (@Beanstalk Linux RADV iGPU run, or by hand).
  • Steam Deck (4c/8t, RADV): run with threaded_rendering=0 (Auto, empty HOS_ENV_FILE) and confirm longshot_log.txt prints vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) (@Beanstalk Steam Deck run).
  • Intel Core Ultra Arc iGPU (6+ physical cores, Windows): run Market_Child with threaded_rendering=0 (Auto, empty HOS_ENV_FILE), verifying vk: Threaded rendering: Auto: the recorder thread only, queue submit 0.00, clean visual parity, and 0 VK_ERROR_DEVICE_LOST (@Beanstalk Intel iGPU run, or by hand).

Measurements

Verdict: Lifted Market_Child (at 67% render scale) 1% low FPS by +5.66 FPS (+18.0%, non-overlapping) (31.44 -> 37.10 FPS), Mean FPS by +2.73 FPS (+5.6%, non-overlapping) (48.66 -> 51.39 FPS), and Median FPS by +2.69 FPS (+5.4%, non-overlapping) (49.50 -> 52.19 FPS), while cutting p99 frame time by -4.85 ms (-15.3%, non-overlapping) (31.80 -> 26.95 ms), replay thread CPU time (render_ms) by -2.43 ms (-21.2%, non-overlapping) (11.43 -> 9.01 ms), command recording (cmds_ms) by -1.21 ms (-48.3%, non-overlapping) (2.50 -> 1.29 ms), and draw_ms by -1.11 ms (-17.4%, non-overlapping) (6.39 -> 5.28 ms).

Setup: Windows 11 (26200), Ryzen AI 7 350 (8c/16t), Radeon 860M (RDNA 3.5 iGPU, 6 GB VGM), Adrenalin 26.10.1 (LLPC); immutable cache_golden warm shader/pipeline cache reset before every run, Market_Child (market-entrance save, >= 12.5 s post-load settle, fountain-first 0:LUP/5000 approach + 3 plaza pans, n = 1,471–1,472 frames/run), 1600x1000, handheld_profile=1, 67% render scale, sharpness=80, vsync=0, amd_anti-lag_2=1, threaded_rendering=0 (Auto, empty HOS_ENV_FILE), RX_VK_PRECOMPILE=1, RX_VK_FRAME_TRACE=1, 3 interleaved A/B rounds reported as median [min, max].

Where it makes a difference (strictly non-overlapping across all 3 rounds):

Metric Before: main @ 0e32bc10 After: this PR @ b2f252d8 Delta
Mean FPS 48.66 [46.91, 49.75] 51.39 [50.56, 53.53] +2.73 (+5.6%)
Median FPS (1000/med_ms) 49.50 [47.94, 50.71] 52.19 [51.10, 54.50] +2.69 (+5.4%)
Median frame time (ms) 20.20 [19.72, 20.86] 19.16 [18.35, 19.57] -1.04 (-5.1%)
p95 frame time (ms) 25.41 [25.02, 27.54] 23.61 [22.93, 23.77] -1.81 (-7.1%)
p99 frame time (ms) 31.80 [29.79, 32.63] 26.95 [26.57, 27.81] -4.85 (-15.3%)
1% low FPS 31.44 [30.64, 33.57] 37.10 [35.96, 37.64] +5.66 (+18.0%)
p99.9 frame time (ms) 41.84 [41.41, 47.62] 37.31 [36.61, 39.17] -4.53 (-10.8%)
render_ms (mean) 11.43 [11.38, 12.53] 9.01 [8.28, 9.10] -2.43 (-21.2%)
draw_ms (mean) 6.39 [6.26, 7.05] 5.28 [4.85, 5.43] -1.11 (-17.4%)
cmds_ms (mean) 2.50 [2.40, 2.73] 1.29 [1.20, 1.34] -1.21 (-48.3%)

Tail-hitch counts & worst frame (improved median, ranges touch/overlap across 3 rounds):

Metric Before: main @ 0e32bc10 After: this PR @ b2f252d8 Delta
Max frame time (ms) 52.62 [42.73, 53.23] 39.97 [37.64, 46.71] -12.65 (-24.0%, ranges overlap)
Frames >= 33.3 ms 11 [6, 11] 5 [3, 6] -6 (-54.5%, ranges touch at 6)
Frames >= 50.0 ms 1 [0, 1] 0 [0, 0] -1 (-100.0%, ranges touch at 0)

Where it does NOT make a difference (within run-to-run variance / unchanged workload):

Metric Before: main @ 0e32bc10 After: this PR @ b2f252d8 Delta
desc_ms (mean) 2.06 [1.98, 2.33] 2.09 [1.91, 2.17] No measurable difference (within run-to-run variance)
gpu_wait_ms (mean) 0.76 [0.64, 1.02] 0.98 [0.50, 1.00] No measurable difference (within run-to-run variance)
astc_flush_ms (mean) 0.008 [0.005, 0.011] 0.014 [0.010, 0.020] No measurable difference (within run-to-run variance)
GPU time (ms, log) 13.43 [12.57, 13.53] 13.09 [11.91, 13.56] No measurable difference (within run-to-run variance)
Passes / frame 130.5 [129.7, 135.5] 130.8 [129.5, 131.9] No measurable difference (unchanged workload)
Full barriers / frame 339.3 [338.1, 351.8] 338.6 [336.7, 341.7] No measurable difference (unchanged workload)
Steady VRAM (MB) 3149 [3149, 3309] 3213 [3181, 3245] No measurable difference (within run-to-run variance)
VK_ERROR_DEVICE_LOST 0 0 0

Per-round values (R1 / R2 / R3):

  • Mean FPS: main @ 0e32bc10 46.91 / 48.66 / 49.75 vs this PR @ b2f252d8 50.56 / 51.39 / 53.53
  • Median FPS (1000/med_ms): main @ 0e32bc10 47.94 / 49.50 / 50.71 vs this PR @ b2f252d8 51.10 / 52.19 / 54.50
  • 1% low FPS: main @ 0e32bc10 30.64 / 33.57 / 31.44 vs this PR @ b2f252d8 37.64 / 35.96 / 37.10
  • >= 33.3 ms / >= 50.0 ms: main @ 0e32bc10 11/6/11 (1/1/0) vs this PR @ b2f252d8 5/6/3 (0/0/0)
  • render_ms: main @ 0e32bc10 12.53 / 11.43 / 11.38 vs this PR @ b2f252d8 9.10 / 9.01 / 8.28
  • cmds_ms: main @ 0e32bc10 2.73 / 2.50 / 2.40 vs this PR @ b2f252d8 1.34 / 1.29 / 1.20
  • Graphics / compute pipelines loaded (program loads at create): 9681–10110 graphics (0 not in cache), 556 compute (24 not in cache) across all 6 runs (9688 / 9681 / 9681 on pr2, 10110 / 9681 / 9681 on main).

Raw longshot_log.txt Evidence (Round 2 Median Pair)

Before (main @ 0e32bc10, round 2):

[hos host] vk: driver: AMD proprietary driver 26.10.1 (LLPC)
[hos host] vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)
[hos Presentation Thread] vk: a frame's replay time (ms): submit 10.72, present 0.36, draw 6.33, descriptors 2.11, texture lookups 0.45, uploads 0.00, pipelines 0.26, programs 1.11, commands 2.41, dispatch 0.93, memory sync 0.26, queue submit 0.94, slot wait 0.06
[hos Presentation Thread] vk: 4320 presents, 49.9 fps; a frame: 1710 draws (0 skipped), 121 dispatches, 129 passes, 160 barriers, 6 submits, 0.0 uploads (0.0 MB), 82 ub updates (57 overlays), GPU-bound wait 0.0 ms (recording slots only); 9873 pipelines (2807 ms), 0 programs (0 failed), 2243 textures (2521 MB)
[hos Presentation Thread] vk: VRAM: 3149 MB used of 12212 MB allowed (238 MB of it free in the blocks); textures 2549 MB (budget 4096 MB), 2251 textures

After (this PR @ b2f252d8, round 2):

[hos host] vk: driver: AMD proprietary driver 26.10.1 (LLPC)
[hos host] vk: Threaded rendering: Auto: the recorder thread only (8 cores of 16 logical processors; the render thread off: the buffer pools have no mirrors)
[hos host] vk: RX_VK_RECORDER=thread: vkCmd* packed on the replay thread and run in order by a recorder thread, handed over by part (RX_VK_RECORDER_PARTS): a part's packets at its end, and its end and submit made by the recorder; the replay waits for it at a reset, begin, destruction or direct recording, and for a part's submit where a wait, a fence or the queue needs it; ring 8192 KB, the recorder waits on the ring after 10 us
[hos Presentation Thread] vk: a frame's replay time (ms): submit 8.38, present 0.36, draw 5.26, descriptors 2.12, texture lookups 0.53, uploads 0.00, pipelines 0.26, programs 1.14, commands 1.30, dispatch 0.81, memory sync 0.27, queue submit 0.00, slot wait 0.06
[hos Presentation Thread] vk: 4200 presents, 52.0 fps; a frame: 1664 draws (0 skipped), 124 dispatches, 131 passes, 160 barriers, 6 submits, 0.0 uploads (0.0 MB), 82 ub updates (57 overlays), GPU-bound wait 0.1 ms (recording slots only); 9880 pipelines (2755 ms), 0 programs (0 failed), 2267 textures (2549 MB)
[hos host] vk: recorder: 4634791 packets run in 10.0 s (busy 1.75 s, spun idle 0.12 s, slept 10892 times, 3489 of them under 200 us), 0 calls made directly (no room); 16460 batches over 531 frames (31.0 a frame, 282 packets a batch), 8349 parts ended and submitted by it; the render thread (the replay lock's holder) waited for it 115 times, 21.39 ms (0.2 times, 0.04 ms a frame); every thread 655 times, 49.39 ms in all, the longest 0.54 ms; vkWaitForFences 503/24.73 ms (max 0.49), vkDestroyImageView 127/22.59 ms (max 0.54), vmaDestroyBuffer 9/1.14 ms (max 0.29), the queue's lock 4/0.65 ms (max 0.39), vkDestroyBuffer 11/0.27 ms (max 0.15), vmaDestroyImage 1/0.01 ms (max 0.01)
[hos host] vk: recorder: of its busy 1.75 s, 0.64 s in parts' ends and submits (the longest 1.31 ms), 0.08 s of that blocked on the queue's lock (261 times, the longest 1.17 ms), so 0.56 s in the ends, submits and holds; 1.11 s running the other packets; 8728 packets a frame
[hos Presentation Thread] vk: VRAM: 3213 MB used of 12212 MB allowed (208 MB of it free in the blocks); textures 2549 MB (budget 4096 MB), 2267 textures

Visual Parity & 3-Zone Stability Tour

  • Matched stationary visual parity (RX_VK_SHOT_FX=1, sharpness=80, 67% render scale, 120 frames after in_play_frame, zero camera movement, golden-cache-reset): main_1 vs main_2 noise floor (MAE 3.40/255, PSNR 28.68 dB) vs main_1 vs PR 2 (MAE 5.42/255, PSNR 26.20 dB); visually verified side-by-side with zero rendering artifacts.
  • 3-zone stability tour (Market_Child -> Hyrule Field -> Kokiri Forest, golden-cache-reset, 0 VK_ERROR_DEVICE_LOST, exit code 0):
    • Market_Child (n = 301/301): 32.58 -> 36.99 FPS (+13.5%), 1% low 19.36 -> 21.20 FPS (+9.5%), >= 33.3 ms: 74 -> 26.
    • Hyrule Field (n = 582/637): 55.63 -> 69.63 FPS (+25.2%), 1% low 14.33 -> 23.92 FPS (+66.9%), >= 33.3 ms: 49 -> 14.
    • Kokiri Forest (n = 613/668): 40.55 -> 51.92 FPS (+28.0%), 1% low 20.05 -> 26.28 FPS (+31.1%), >= 33.3 ms: 55 -> 13.

Risks

  • Scope & CPU/RAM cost: Adds one mkw_vk recorder thread and an 8 MB ring buffer in system RAM (not VRAM) on 6+ physical-core systems without buffer-pool mirrors under Threaded rendering: Auto. Because render_thread stays off (!async_on()), readback_early_on() stays enabled, zero frame-ahead memory hazards are introduced, and 4–5 core non-mirrored handhelds (such as the Steam Deck) remain unchanged.
  • Linux thread affinity (rec_thread_hook / ReplayPin): On Linux, pthread_create inherits the calling thread's CPU affinity mask — which during serial replay (!async_on()) is pinned to reserved_cpus by ReplayPin. rec_thread_hook (gpu/vk/vk_replay.cpp) calls SetThreadDescription(GetCurrentThread(), L"mkw_vk recorder") on recorder thread startup, and host/posix/win32_posix.c's GetCurrentThread() / thread_self() resets process_affinity so mkw_vk recorder does not stay pinned to the reserved replay core (verified by source audit; live Linux RADV run is listed in Still to test).
  • How to turn it off: Players can set Threaded rendering to Off (threaded_rendering=2) in the Insert menu (Debug tab) or set RX_VK_RECORDER=off in longshot_env.txt. Setting threaded::kAutoEnabled = false or reverting the PR restores the old Auto behavior globally.
  • Player impact after updating: 6+ core integrated / non-mirrored GPU players with Threaded rendering: Auto automatically gain recorder-thread offloading on next start; no changes to saves, longshot_options.ini keys, or shader/pipeline caches.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary **What a player notices:** On 6+ core PCs and handhelds without buffer-pool VRAM mirrors — integrated GPUs (`!f.discrete()`, such as AMD Radeon 780M/860M/890M/8060S, Ryzen Z1E/Z2E/AI 300, Intel Core Ultra Arc iGPU) or `RX_VK_MIRROR=0` — `Threaded rendering: Auto` (`threaded_rendering=0`, the default) runs smoother with fewer CPU hitches in draw-heavy towns and fields (+18.0% 1% low FPS, +5.6% mean FPS in `Market_Child` at 67% render scale) without changing visual output. - **Helps:** CPU-bound and command-submission-heavy scenes (`Market_Child`, `Hyrule Field`, `Kokiri Forest`) on 6+ core non-mirrored / integrated GPUs under `Threaded rendering: Auto`, by offloading `vkCmd*` recording and `vkQueueSubmit2` off the game's presentation thread (`queue submit 0.94 -> 0.00 ms`, `cmds_ms -48.3%`, `render_ms -21.2%`). - **No measurable impact:** 4–5 core non-mirrored systems (including 4c/8t Steam Deck), `< 4`-core CPUs, mirrored discrete GPUs (already enabled on `main` via `#2232`'s `kAutoCores = 4`), purely GPU-bound scenes, and runs with `Threaded rendering: Off` (`threaded_rendering=2`), `RX_VK_RECORDER=off`, `RX_VK_CAPTURE=0`, `RX_VK_LOW_SPEC`, `RX_VK_DUMP`, or `RX_VK_BENCH`. Previously, when `pools_mirrored()` returned false, `vk_menu.cpp` forced **both** the render thread (`RX_VK_ASYNC=1`) and the recorder thread (`RX_VK_RECORDER=thread`) off, even though only the render thread runs the game a frame ahead of replay and depends on buffer-pool mirrors. The recorder thread (`RX_VK_RECORDER=thread` with `RX_VK_RECORDER_PARTS=1`) replays synchronously under `replay_mu` (`DrainingMutex`), preserves `readback_early_on()` for non-mirrored iGPUs, and offloads only Vulkan command recording and queue submission. This change adds `kAutoRecorderOnlyCores` (`6`), `Why::AutoRecorderOnly`, and `without_mirrors()` in `gpu/vk/threaded_rendering.h` / `gpu/vk/vk_menu.cpp`: - **Why `kAutoRecorderOnlyCores = 6` post-`#2232`:** `#2232` (`964599d2`) lowered `kAutoCores` from `6` to `4` for mirrored GPUs, leaving non-mirrored GPUs off. Holding the non-mirrored recorder-only tier at `kAutoRecorderOnlyCores = 6` leaves `#2232`'s `kAutoCores = 4` for mirrored GPUs untouched while deliberately keeping 4-core/8-thread handhelds such as the Steam Deck unchanged (`Auto: off`) until explicitly A/B tested on that tier, matching the existing 4-core vs. 6-core frame-pacing measurements in `gpu/vk/threaded_rendering.h`. - Updates `tests/test_threaded_rendering.py`, `gpu/vk/menu/threads.cpp`, `gpu/vk/vk_menu.h`, `gpu/vk/vk_recorder.h`, `gpu/vk/vk_replay.cpp`, `gpu/vk/device_policy.h`, `gpu/vk/switches.def`, and docs (`docs/user/graphics-and-controls.md`, `docs/dev/reference/architecture.md`, `docs/dev/reference/switches.md`, `docs/dev/reference/threads.md`). **Files to read first:** - `gpu/vk/threaded_rendering.h`: `kAutoRecorderOnlyCores`, `Why::AutoRecorderOnly`, `without_mirrors()`, `describe()` - `gpu/vk/vk_menu.cpp`: `threaded_choice()` - `gpu/vk/vk_menu.h`, `gpu/vk/menu/threads.cpp`, `gpu/vk/vk_recorder.h`, `gpu/vk/vk_replay.cpp` - `tests/test_threaded_rendering.py` **Prior work / neighbours:** Builds cleanly on merged `#2232` (`964599d2`, which lowered mirrored `kAutoCores` to `4` while leaving non-mirrored GPUs off); non-overlapping with WIP `#1407` (low-core threshold). ## Testing **Tested:** - **Hardware / OS:** Windows 11 (build 26200), AMD Ryzen AI 7 350 (8 cores / 16 threads), AMD Radeon 860M (RDNA 3.5 iGPU, 6 GB VGM, 32 GB RAM), AMD Adrenalin 26.10.1 (`LLPC`). - **How to test:** Launch `Market_Child` (`market-entrance` repo save) with default `Threaded rendering: Auto` (`threaded_rendering=0`), `1600x1000`, `handheld_profile=1`, `67% render scale`, `sharpness=80`, `vsync=0`, `amd_anti-lag_2=1`, `RX_VK_PRECOMPILE=1`, zero env overrides (`HOS_ENV_FILE` empty), settle `>= 12.5 s`, then walk forward 5 s (`0:LUP/5000`) to the Market fountain and pan around the plaza. Reset `<rt>\cache` from an immutable golden warm cache (`cache_golden`) before every run. - **In-game benchmark (3 interleaved rounds on `0e32bc10`, golden-cache-reset per run):** Verified `main @ 0e32bc10` logs `vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)` and `this PR @ b2f252d8` logs `vk: Threaded rendering: Auto: the recorder thread only (8 cores of 16 logical processors; the render thread off: the buffer pools have no mirrors)` with `queue submit 0.00` ms, `0` direct ring fallbacks, and `0.04 ms/frame` replay-lock wait. Beat `main @ 0e32bc10` in all 3 rounds with strictly non-overlapping wins on Mean FPS (`+5.6%`), Median FPS (`+5.4%`), 1% low FPS (`+18.0%`), `p95` (`-7.1%`), `p99` (`-15.3%`), `p99.9` (`-10.8%`), `render_ms` (`-21.2%`), `draw_ms` (`-17.4%`), and `cmds_ms` (`-48.3%`); `0` `VK_ERROR_DEVICE_LOST`, exit code `0`, `0` API-version mismatch warnings (`MKWVK_API_VERSION 45`). - **Matched stationary visual parity (`RX_VK_SHOT_FX=1`, `sharpness=80`, `67% render scale`, golden-cache-reset, settled 120 frames post-in-play with zero camera movement):** `main_1` vs `main_2` animated-scene noise floor (`MAE 3.40/255`, `PSNR 28.68 dB`) vs `main_1` vs `PR 2` (`MAE 5.42/255`, `PSNR 26.20 dB`); visually inspected side-by-side with zero rendering artifacts. - **3-zone stability tour (`Market_Child` -> `Hyrule Field` -> `Kokiri Forest`, golden-cache-reset):** Exit code `0`, `0` `VK_ERROR_DEVICE_LOST`; `Market_Child` `32.58 -> 36.99 FPS` (1% low `19.36 -> 21.20 FPS`, `>= 33.3 ms` `74 -> 26`), `Hyrule Field` `55.63 -> 69.63 FPS` (1% low `14.33 -> 23.92 FPS`, `>= 33.3 ms` `49 -> 14`), `Kokiri Forest` `40.55 -> 51.92 FPS` (1% low `20.05 -> 26.28 FPS`, `>= 33.3 ms` `55 -> 13`). - **Game-free checks (Windows, llvm-mingw, on `0e32bc10`):** - Red-to-green: `tests/test_threaded_rendering.py --strict` **FAILED** on commit 1 (`a1912c48` on `0e32bc10`, `rc=1`, `no kAutoRecorderOnlyCores`) and **PASSED** on `HEAD` (`b2f252d8`, `rc=0`, all rules + 45 broken-copy mutations caught). - Targeted `--strict` suite (**8/8 PASSED**, `0 failed, 0 skipped`): `test_threaded_rendering.py`, `test_device_policy.py`, `test_switch_table.py`, `test_settings_table.py`, `test_doc_anchors.py`, `test_utf8_paths.py`, `test_vk_braces.py`, `test_menu_i18n.py`. - Full `python -I -B tests/run_all.py`: **`877 passed, 21 failed, 59 skipped`** in 322 s (`test_job_queue.py` passed safely; `0` PR regressions — all 21 pre-existing `main` failures [`test_sampler_admission`, `test_auto_handheld`, `test_build_long_paths`, `test_crash_dialog`, `test_dev_build`, `test_dev_migrate`, `test_dev_ab`, `test_dev_packs`, `test_discover`, `test_game_menu_mouse_buttons`, `test_input_movie`, `test_lift_lookups`, `test_linux_preflight`, `test_make_game_cache`, `test_pads_after_menu`, `test_pipeline_state_computes`, `test_perf_report`, `test_saveload_warm_cache`, `test_sdiv_overflow`, `test_srccut`, `test_walk`] reproduced 21/21 identically on clean `main @ 0e32bc10`). **Still to test:** - Linux 6+ core AMD iGPU / handheld APU (RADV, e.g. Ryzen 780M/890M/Z1E/Z2E): run `Market_Child` with `threaded_rendering=0` (Auto, empty `HOS_ENV_FILE`), verifying `longshot_log.txt` prints `vk: Threaded rendering: Auto: the recorder thread only`, `queue submit 0.00`, and `vk: recorder:` with lower replay CPU and `0` `VK_ERROR_DEVICE_LOST` (`@Beanstalk` Linux RADV iGPU run, or by hand). - Steam Deck (4c/8t, RADV): run with `threaded_rendering=0` (Auto, empty `HOS_ENV_FILE`) and confirm `longshot_log.txt` prints `vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)` (`@Beanstalk` Steam Deck run). - Intel Core Ultra Arc iGPU (6+ physical cores, Windows): run `Market_Child` with `threaded_rendering=0` (Auto, empty `HOS_ENV_FILE`), verifying `vk: Threaded rendering: Auto: the recorder thread only`, `queue submit 0.00`, clean visual parity, and `0` `VK_ERROR_DEVICE_LOST` (`@Beanstalk` Intel iGPU run, or by hand). ## Measurements **Verdict:** Lifted `Market_Child` (at `67% render scale`) 1% low FPS by **+5.66 FPS (+18.0%, non-overlapping)** (`31.44 -> 37.10 FPS`), Mean FPS by **+2.73 FPS (+5.6%, non-overlapping)** (`48.66 -> 51.39 FPS`), and Median FPS by **+2.69 FPS (+5.4%, non-overlapping)** (`49.50 -> 52.19 FPS`), while cutting `p99` frame time by **-4.85 ms (-15.3%, non-overlapping)** (`31.80 -> 26.95 ms`), replay thread CPU time (`render_ms`) by **-2.43 ms (-21.2%, non-overlapping)** (`11.43 -> 9.01 ms`), command recording (`cmds_ms`) by **-1.21 ms (-48.3%, non-overlapping)** (`2.50 -> 1.29 ms`), and `draw_ms` by **-1.11 ms (-17.4%, non-overlapping)** (`6.39 -> 5.28 ms`). Setup: Windows 11 (26200), Ryzen AI 7 350 (8c/16t), Radeon 860M (RDNA 3.5 iGPU, 6 GB VGM), Adrenalin 26.10.1 (`LLPC`); immutable `cache_golden` warm shader/pipeline cache reset before every run, `Market_Child` (`market-entrance` save, `>= 12.5 s` post-load settle, fountain-first `0:LUP/5000` approach + 3 plaza pans, `n = 1,471–1,472` frames/run), `1600x1000`, `handheld_profile=1`, `67% render scale`, `sharpness=80`, `vsync=0`, `amd_anti-lag_2=1`, `threaded_rendering=0` (Auto, empty `HOS_ENV_FILE`), `RX_VK_PRECOMPILE=1`, `RX_VK_FRAME_TRACE=1`, 3 interleaved A/B rounds reported as `median [min, max]`. **Where it makes a difference (strictly non-overlapping across all 3 rounds):** | Metric | Before: main @ 0e32bc10 | After: this PR @ b2f252d8 | Delta | |---|---|---|---| | **Mean FPS** | 48.66 [46.91, 49.75] | **51.39 [50.56, 53.53]** | **+2.73 (+5.6%)** | | **Median FPS (`1000/med_ms`)** | 49.50 [47.94, 50.71] | **52.19 [51.10, 54.50]** | **+2.69 (+5.4%)** | | **Median frame time (ms)** | 20.20 [19.72, 20.86] | **19.16 [18.35, 19.57]** | **-1.04 (-5.1%)** | | **p95 frame time (ms)** | 25.41 [25.02, 27.54] | **23.61 [22.93, 23.77]** | **-1.81 (-7.1%)** | | **p99 frame time (ms)** | 31.80 [29.79, 32.63] | **26.95 [26.57, 27.81]** | **-4.85 (-15.3%)** | | **1% low FPS** | 31.44 [30.64, 33.57] | **37.10 [35.96, 37.64]** | **+5.66 (+18.0%)** | | **p99.9 frame time (ms)** | 41.84 [41.41, 47.62] | **37.31 [36.61, 39.17]** | **-4.53 (-10.8%)** | | **`render_ms` (mean)** | 11.43 [11.38, 12.53] | **9.01 [8.28, 9.10]** | **-2.43 (-21.2%)** | | **`draw_ms` (mean)** | 6.39 [6.26, 7.05] | **5.28 [4.85, 5.43]** | **-1.11 (-17.4%)** | | **`cmds_ms` (mean)** | 2.50 [2.40, 2.73] | **1.29 [1.20, 1.34]** | **-1.21 (-48.3%)** | **Tail-hitch counts & worst frame (improved median, ranges touch/overlap across 3 rounds):** | Metric | Before: main @ 0e32bc10 | After: this PR @ b2f252d8 | Delta | |---|---|---|---| | Max frame time (ms) | 52.62 [42.73, 53.23] | 39.97 [37.64, 46.71] | -12.65 (-24.0%, ranges overlap) | | Frames >= 33.3 ms | 11 [6, 11] | 5 [3, 6] | -6 (-54.5%, ranges touch at 6) | | Frames >= 50.0 ms | 1 [0, 1] | 0 [0, 0] | -1 (-100.0%, ranges touch at 0) | **Where it does NOT make a difference (within run-to-run variance / unchanged workload):** | Metric | Before: main @ 0e32bc10 | After: this PR @ b2f252d8 | Delta | |---|---|---|---| | `desc_ms` (mean) | 2.06 [1.98, 2.33] | 2.09 [1.91, 2.17] | No measurable difference (within run-to-run variance) | | `gpu_wait_ms` (mean) | 0.76 [0.64, 1.02] | 0.98 [0.50, 1.00] | No measurable difference (within run-to-run variance) | | `astc_flush_ms` (mean) | 0.008 [0.005, 0.011] | 0.014 [0.010, 0.020] | No measurable difference (within run-to-run variance) | | GPU time (ms, log) | 13.43 [12.57, 13.53] | 13.09 [11.91, 13.56] | No measurable difference (within run-to-run variance) | | Passes / frame | 130.5 [129.7, 135.5] | 130.8 [129.5, 131.9] | No measurable difference (unchanged workload) | | Full barriers / frame | 339.3 [338.1, 351.8] | 338.6 [336.7, 341.7] | No measurable difference (unchanged workload) | | Steady VRAM (MB) | 3149 [3149, 3309] | 3213 [3181, 3245] | No measurable difference (within run-to-run variance) | | `VK_ERROR_DEVICE_LOST` | 0 | 0 | 0 | Per-round values (R1 / R2 / R3): - Mean FPS: `main @ 0e32bc10` `46.91 / 48.66 / 49.75` vs `this PR @ b2f252d8` `50.56 / 51.39 / 53.53` - Median FPS (`1000/med_ms`): `main @ 0e32bc10` `47.94 / 49.50 / 50.71` vs `this PR @ b2f252d8` `51.10 / 52.19 / 54.50` - 1% low FPS: `main @ 0e32bc10` `30.64 / 33.57 / 31.44` vs `this PR @ b2f252d8` `37.64 / 35.96 / 37.10` - `>= 33.3 ms` / `>= 50.0 ms`: `main @ 0e32bc10` `11/6/11` (`1/1/0`) vs `this PR @ b2f252d8` `5/6/3` (`0/0/0`) - `render_ms`: `main @ 0e32bc10` `12.53 / 11.43 / 11.38` vs `this PR @ b2f252d8` `9.10 / 9.01 / 8.28` - `cmds_ms`: `main @ 0e32bc10` `2.73 / 2.50 / 2.40` vs `this PR @ b2f252d8` `1.34 / 1.29 / 1.20` - Graphics / compute pipelines loaded (`program loads at create`): `9681–10110` graphics (`0` not in cache), `556` compute (`24` not in cache) across all 6 runs (`9688` / `9681` / `9681` on `pr2`, `10110` / `9681` / `9681` on `main`). ### Raw `longshot_log.txt` Evidence (Round 2 Median Pair) **Before (`main @ 0e32bc10`, round 2):** ```text [hos host] vk: driver: AMD proprietary driver 26.10.1 (LLPC) [hos host] vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) [hos Presentation Thread] vk: a frame's replay time (ms): submit 10.72, present 0.36, draw 6.33, descriptors 2.11, texture lookups 0.45, uploads 0.00, pipelines 0.26, programs 1.11, commands 2.41, dispatch 0.93, memory sync 0.26, queue submit 0.94, slot wait 0.06 [hos Presentation Thread] vk: 4320 presents, 49.9 fps; a frame: 1710 draws (0 skipped), 121 dispatches, 129 passes, 160 barriers, 6 submits, 0.0 uploads (0.0 MB), 82 ub updates (57 overlays), GPU-bound wait 0.0 ms (recording slots only); 9873 pipelines (2807 ms), 0 programs (0 failed), 2243 textures (2521 MB) [hos Presentation Thread] vk: VRAM: 3149 MB used of 12212 MB allowed (238 MB of it free in the blocks); textures 2549 MB (budget 4096 MB), 2251 textures ``` **After (`this PR @ b2f252d8`, round 2):** ```text [hos host] vk: driver: AMD proprietary driver 26.10.1 (LLPC) [hos host] vk: Threaded rendering: Auto: the recorder thread only (8 cores of 16 logical processors; the render thread off: the buffer pools have no mirrors) [hos host] vk: RX_VK_RECORDER=thread: vkCmd* packed on the replay thread and run in order by a recorder thread, handed over by part (RX_VK_RECORDER_PARTS): a part's packets at its end, and its end and submit made by the recorder; the replay waits for it at a reset, begin, destruction or direct recording, and for a part's submit where a wait, a fence or the queue needs it; ring 8192 KB, the recorder waits on the ring after 10 us [hos Presentation Thread] vk: a frame's replay time (ms): submit 8.38, present 0.36, draw 5.26, descriptors 2.12, texture lookups 0.53, uploads 0.00, pipelines 0.26, programs 1.14, commands 1.30, dispatch 0.81, memory sync 0.27, queue submit 0.00, slot wait 0.06 [hos Presentation Thread] vk: 4200 presents, 52.0 fps; a frame: 1664 draws (0 skipped), 124 dispatches, 131 passes, 160 barriers, 6 submits, 0.0 uploads (0.0 MB), 82 ub updates (57 overlays), GPU-bound wait 0.1 ms (recording slots only); 9880 pipelines (2755 ms), 0 programs (0 failed), 2267 textures (2549 MB) [hos host] vk: recorder: 4634791 packets run in 10.0 s (busy 1.75 s, spun idle 0.12 s, slept 10892 times, 3489 of them under 200 us), 0 calls made directly (no room); 16460 batches over 531 frames (31.0 a frame, 282 packets a batch), 8349 parts ended and submitted by it; the render thread (the replay lock's holder) waited for it 115 times, 21.39 ms (0.2 times, 0.04 ms a frame); every thread 655 times, 49.39 ms in all, the longest 0.54 ms; vkWaitForFences 503/24.73 ms (max 0.49), vkDestroyImageView 127/22.59 ms (max 0.54), vmaDestroyBuffer 9/1.14 ms (max 0.29), the queue's lock 4/0.65 ms (max 0.39), vkDestroyBuffer 11/0.27 ms (max 0.15), vmaDestroyImage 1/0.01 ms (max 0.01) [hos host] vk: recorder: of its busy 1.75 s, 0.64 s in parts' ends and submits (the longest 1.31 ms), 0.08 s of that blocked on the queue's lock (261 times, the longest 1.17 ms), so 0.56 s in the ends, submits and holds; 1.11 s running the other packets; 8728 packets a frame [hos Presentation Thread] vk: VRAM: 3213 MB used of 12212 MB allowed (208 MB of it free in the blocks); textures 2549 MB (budget 4096 MB), 2267 textures ``` ### Visual Parity & 3-Zone Stability Tour - **Matched stationary visual parity (`RX_VK_SHOT_FX=1`, `sharpness=80`, `67% render scale`, `120` frames after `in_play_frame`, zero camera movement, golden-cache-reset):** `main_1` vs `main_2` noise floor (`MAE 3.40/255`, `PSNR 28.68 dB`) vs `main_1` vs `PR 2` (`MAE 5.42/255`, `PSNR 26.20 dB`); visually verified side-by-side with zero rendering artifacts. - **3-zone stability tour (`Market_Child` -> `Hyrule Field` -> `Kokiri Forest`, golden-cache-reset, `0` `VK_ERROR_DEVICE_LOST`, exit code `0`):** - `Market_Child` (`n = 301/301`): `32.58 -> 36.99 FPS` (`+13.5%`), 1% low `19.36 -> 21.20 FPS` (`+9.5%`), `>= 33.3 ms`: `74 -> 26`. - `Hyrule Field` (`n = 582/637`): `55.63 -> 69.63 FPS` (`+25.2%`), **1% low `14.33 -> 23.92 FPS` (`+66.9%`)**, `>= 33.3 ms`: `49 -> 14`. - `Kokiri Forest` (`n = 613/668`): `40.55 -> 51.92 FPS` (`+28.0%`), **1% low `20.05 -> 26.28 FPS` (`+31.1%`)**, `>= 33.3 ms`: `55 -> 13`. ## Risks - **Scope & CPU/RAM cost:** Adds one `mkw_vk recorder` thread and an 8 MB ring buffer in system RAM (not VRAM) on 6+ physical-core systems without buffer-pool mirrors under `Threaded rendering: Auto`. Because `render_thread` stays off (`!async_on()`), `readback_early_on()` stays enabled, zero frame-ahead memory hazards are introduced, and 4–5 core non-mirrored handhelds (such as the Steam Deck) remain unchanged. - **Linux thread affinity (`rec_thread_hook` / `ReplayPin`):** On Linux, `pthread_create` inherits the calling thread's CPU affinity mask — which during serial replay (`!async_on()`) is pinned to `reserved_cpus` by `ReplayPin`. `rec_thread_hook` (`gpu/vk/vk_replay.cpp`) calls `SetThreadDescription(GetCurrentThread(), L"mkw_vk recorder")` on recorder thread startup, and `host/posix/win32_posix.c`'s `GetCurrentThread()` / `thread_self()` resets `process_affinity` so `mkw_vk recorder` does not stay pinned to the reserved replay core (verified by source audit; live Linux RADV run is listed in Still to test). - **How to turn it off:** Players can set `Threaded rendering` to `Off` (`threaded_rendering=2`) in the Insert menu (Debug tab) or set `RX_VK_RECORDER=off` in `longshot_env.txt`. Setting `threaded::kAutoEnabled = false` or reverting the PR restores the old Auto behavior globally. - **Player impact after updating:** 6+ core integrated / non-mirrored GPU players with `Threaded rendering: Auto` automatically gain recorder-thread offloading on next start; no changes to saves, `longshot_options.ini` keys, or shader/pipeline caches. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
Verify threaded::kAutoRecorderOnlyCores (6) and threaded::without_mirrors(c, cores) across 0..16 cores, describe() formatting, reader/env overrides, threaded_choice() safety gates, and mutation controls while keeping 4-5 core non-mirrored systems off.

Assisted-by: Antigravity
perf(vk): run recorder thread under Auto on 6+ core GPUs without mirrors
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
beanstalk/approval not approved yet
b2f252d846
Only the render thread (RX_VK_ASYNC=1) runs a frame ahead of replay and requires buffer-pool mirrors. The recorder thread (RX_VK_RECORDER=thread with RX_VK_RECORDER_PARTS) replays synchronously under replay_mu and offloads only Vulkan command recording and submits. Add threaded::kAutoRecorderOnlyCores (6), Why::AutoRecorderOnly, and threaded::without_mirrors(c, cores) so Auto keeps the render thread off when !pools_mirrored() (integrated GPUs where !f.discrete(), or RX_VK_MIRROR=0) while running the recorder thread alone on 6+ physical-core systems and leaving 4-5 core non-mirrored handhelds such as the Steam Deck unchanged. Update all companion menu, switch, recorder, replay, policy, and reference/user docs in lockstep and remove the stale GCN unmirrored-GPU note from vk_menu.cpp.

Assisted-by: Antigravity
Author
Contributor

Tested in game: Windows 11 (26200), AMD Ryzen AI 7 350 (8c/16t), AMD Radeon 860M (Adrenalin 26.10.1 LLPC), 1600x1000, handheld_profile=1, 67% render scale, sharpness=80, Threaded rendering Auto (empty env). Golden-cache 3-round interleaved fountain-first Market_Child: 1% low 31.44 -> 37.10 FPS (+18.0%), Mean 48.66 -> 51.39 FPS (+5.6%), render_ms 11.43 -> 9.01 ms (-21.2%), cmds_ms 2.50 -> 1.29 ms (-48.3%), queue submit 0.00 ms; stationary visual parity + 3-zone tour (Market, Hyrule Field, Kokiri Forest) passed with 0 VK_ERROR_DEVICE_LOST.

Tested in game: Windows 11 (26200), AMD Ryzen AI 7 350 (8c/16t), AMD Radeon 860M (Adrenalin 26.10.1 LLPC), 1600x1000, handheld_profile=1, 67% render scale, sharpness=80, Threaded rendering Auto (empty env). Golden-cache 3-round interleaved fountain-first Market_Child: 1% low 31.44 -> 37.10 FPS (+18.0%), Mean 48.66 -> 51.39 FPS (+5.6%), render_ms 11.43 -> 9.01 ms (-21.2%), cmds_ms 2.50 -> 1.29 ms (-48.3%), queue submit 0.00 ms; stationary visual parity + 3-zone tour (Market, Hyrule Field, Kokiri Forest) passed with 0 VK_ERROR_DEVICE_LOST.
Author
Contributor

Side-by-Side Dev FPS Counter Comparison (Market_Child, Steady Plaza View)

Note on playback rate: This clip is intentionally trimmed to 5 fps (2.71 MiB, 1080x724, 12 s) so the live Dev FPS telemetry numbers and frame-time graph are easy to read while staying compact — it is meant for viewing the numbers rather than judging playback smoothness.

Both runs start from the same immutable warm shader/pipeline cache (Pipelines: 9869, Shaders built: 0, Draws left out: 0, Uploads: 0.0 MB/s) on the same Market plaza view (~2,180–2,206 draws):

  • Submits: 1.08 ms -> 0.00 ms on the replay thread
  • Renderer: 15.6–16.7 ms -> 11.6–11.9 ms
  • Live counter: 32–38 FPS -> 43 FPS, 1% low 61.2 ms -> 49.2 ms, graph ceiling 100 ms -> 64 ms

Before vs After Market Dev FPS counter (5 fps for reading numbers)


@Beanstalk Please test Threaded rendering: Auto (threaded_rendering=0, empty env) on:

  1. Linux 6+ core AMD iGPU (RADV) in Market_Child — verify vk: Threaded rendering: Auto: the recorder thread only, queue submit 0.00, lower replay CPU, and 0 VK_ERROR_DEVICE_LOST.
  2. Steam Deck (4c/8t, RADV) — verify vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) (behavior unchanged).
  3. Windows Intel Core Ultra Arc iGPU (6+ physical cores) in Market_Child — verify vk: Threaded rendering: Auto: the recorder thread only, queue submit 0.00, visual parity, and 0 VK_ERROR_DEVICE_LOST.
### Side-by-Side Dev FPS Counter Comparison (`Market_Child`, Steady Plaza View) > **Note on playback rate:** This clip is intentionally trimmed to **5 fps** (`2.71 MiB`, `1080x724`, `12 s`) so the live Dev FPS telemetry numbers and frame-time graph are easy to read while staying compact — it is meant for viewing the numbers rather than judging playback smoothness. Both runs start from the same immutable warm shader/pipeline cache (`Pipelines: 9869`, `Shaders built: 0`, `Draws left out: 0`, `Uploads: 0.0 MB/s`) on the same Market plaza view (`~2,180–2,206` draws): - **`Submits`:** `1.08 ms -> 0.00 ms` on the replay thread - **`Renderer`:** `15.6–16.7 ms -> 11.6–11.9 ms` - **Live counter:** `32–38 FPS -> 43 FPS`, `1% low 61.2 ms -> 49.2 ms`, graph ceiling `100 ms -> 64 ms` ![Before vs After Market Dev FPS counter (5 fps for reading numbers)](https://git.magicbean.dev/attachments/c15e6526-9802-4d2c-9574-c4ae464c6236) --- @Beanstalk Please test `Threaded rendering: Auto` (`threaded_rendering=0`, empty env) on: 1. **Linux 6+ core AMD iGPU (RADV)** in `Market_Child` — verify `vk: Threaded rendering: Auto: the recorder thread only`, `queue submit 0.00`, lower replay CPU, and `0` `VK_ERROR_DEVICE_LOST`. 2. **Steam Deck (4c/8t, RADV)** — verify `vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)` (behavior unchanged). 3. **Windows Intel Core Ultra Arc iGPU (6+ physical cores)** in `Market_Child` — verify `vk: Threaded rendering: Auto: the recorder thread only`, `queue submit 0.00`, visual parity, and `0` `VK_ERROR_DEVICE_LOST`.
Member

@Jer9 only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@Jer9 only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
@ -116,0 +131,4 @@
/// 4- and 5-core non-mirrored handhelds such as the Steam Deck unchanged)
constexpr Choice without_mirrors(const Choice& c, unsigned cores) {
if (c.why != Why::AutoBothThreads) return c;
if (cores >= kAutoRecorderOnlyCores) return {false, true, Why::AutoRecorderOnly};
Contributor

did you test this on a 6-core igpu on linux? im curious if the recorder still helps right at the cutoff. did u repeate the hyrule field & kokiri run the same way you did market?

did you test this on a 6-core igpu on linux? im curious if the recorder still helps right at the cutoff. did u repeate the hyrule field & kokiri run the same way you did market?
Author
Contributor

Not yet on either of those!

On the 6-core Linux iGPU side, I only have an 8c/16t Windows laptop (Ryzen AI 7 350 / Radeon 860M) locally, so 6+ core Linux RADV is still in Still to test / waiting on @Beanstalk. We kept kAutoRecorderOnlyCores = 6 conservatively (instead of matching #2232's kAutoCores = 4 for mirrored GPUs) specifically to leave 4c/8t non-mirrored handhelds like the Steam Deck untouched (Auto: off) until measured directly on that hardware. If you happen to have a 6-core Linux iGPU to try it on, I'd be curious too whether 6 is the right cutoff.

For Hyrule Field and Kokiri Forest, we focused the 3-round interleaved A/B runs on Market because its high draw count was where 1% lows were roughest on the iGPU. The Hyrule Field and Kokiri Forest numbers came from a single 3-zone stability tour (Market -> Hyrule Field -> Kokiri Forest), where the offload happened to show solid gains too.

Not yet on either of those! On the 6-core Linux iGPU side, I only have an 8c/16t Windows laptop (Ryzen AI 7 350 / Radeon 860M) locally, so 6+ core Linux RADV is still in **Still to test** / waiting on `@Beanstalk`. We kept `kAutoRecorderOnlyCores = 6` conservatively (instead of matching `#2232`'s `kAutoCores = 4` for mirrored GPUs) specifically to leave 4c/8t non-mirrored handhelds like the Steam Deck untouched (`Auto: off`) until measured directly on that hardware. If you happen to have a 6-core Linux iGPU to try it on, I'd be curious too whether 6 is the right cutoff. For Hyrule Field and Kokiri Forest, we focused the 3-round interleaved A/B runs on Market because its high draw count was where 1% lows were roughest on the iGPU. The Hyrule Field and Kokiri Forest numbers came from a single 3-zone stability tour (`Market -> Hyrule Field -> Kokiri Forest`), where the offload happened to show solid gains too.
Member

@Jer9 only members of BigBeans can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.

@Jer9 only members of `BigBeans` can start the farm. One of them can approve this request by reacting 👍 to it or to this comment.
Contributor

Steam Deck data for the "Still to test" item, from a player (not a maintainer). Not a run of this PR's head yet; these are builds from before it.

Setup: Steam Deck LCD (APU 0932, RADV VANGOGH, Mesa 26.2.0-devel git-5c65d4fc31), SteamOS 3.9.5, Game Mode. Default settings, empty longshot_env.txt unless noted. Same save (Market entrance), free walking, 3-4 min per run. Builds from source: nightly-680 (9dd41326) and nightly-745 (a2dc5385). Both carry a local no-egress change and a bubblewrap launcher, neither of which touches threads. These are single runs unless noted, so treat differences under 5 % as noise.

1. The Auto line on the Deck. Every default run (11 of them, 680 and 745) logs:

vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)

That's the line you expect to stay unchanged. Please re-check it on this PR's head before ticking the box.

2. Where a Deck frame goes (HOS_CHAIN + scripts/perf.py chain, 680, serial replay, gameplay). This explains why offloading the renderer doesn't pay on 4 cores:

37.7 ms a frame =
  game job graph ~18.5 (sead::MainThread 4.3, ModuleSystemWorker1-5 ~9.6, BaseProcExecutor0-5 ~4.6)
  + Presentation_Thread (translate + replay) 16.9
  + waits ~2.3, one after the other
GPU ~15 ms, in parallel (not the limit)

3. Moving renderer work off the frame on the Deck. This uses forced mirrors, not this PR's recorder-only mode. Numbers are longshot_frames.csv busy-frame medians on 680:

run avg fps render_ms game_ms main_blocked_ms
default (Auto: off) 35.7 13.87 7.11 21.44
RX_VK_MIRROR=1 RX_VK_ASYNC=1, and the same + RX_VK_RECORDER=thread 32.1 / 32.0 0.20-0.33 18.85-19.28 23.13-23.45

Translation leaves the presentation thread, but sead::MainThread stays blocked the same ~21-23 ms, and the game threads' stretch grows by the same amount. With 4 cores and 8 threads, the extra thread competes with ModuleSystemWorker / BaseProcExecutor. No visual problems were seen.

4. Offloading queue submits on the Deck. This is close to what the recorder does for vkQueueSubmit2. I used Mesa's submit thread (MESA_VK_ENABLE_SUBMIT_THREAD=1, one ~75 s run each on 745, RX_VK_BATCH=0 in both):

off on
queue submit on the render thread (slow-frame median) 4.7 ms 0.2 ms
render_ms (median) 16.1 14.5
game_ms (median) 4.9 11.0
frame (median) 28.3 29.2
avg fps 28.7 25.9

Submit time leaves the render thread, and the game threads lose about the same amount. There's no net gain on 4C/8T.

5. Desktop masked to 4C/8T. i7-8700K, taskset to cores 0-3 + SMT siblings, RTX 3060 Ti (mirrored, so a different tier), Linux, 745, 2 interleaved 60 s runs each:

arm avg fps p99 ms
serial (Auto here) 40.59 / 40.64 32.3 / 31.8
recorder (MIRROR=1 ASYNC=1 RECORDER=thread) 40.88 / 41.31 29.5 / 29.4
render thread alone (ASYNC=1) 39.59 / 39.59 31.3 / 31.5

main_blocked_ms was 19.8-20.9 ms in every arm. Roughly 60-66 % of it is sead::MainThread waiting for the game's own jobs (guest events, the OoT job barrier). One trap for Linux mask tests: under taskset, Auto logged 3 cores of 6 logical processors. The reserved core is taken off the mask, so a 4-core mask lands one tier lower.

Takeaway for this PR: keeping the Deck at Auto: off (kAutoRecorderOnlyCores = 6) looks right on this data. Both ways of taking work off the Deck's presentation thread cost the game threads about as much as they saved. The one thing not measured here is this PR's exact mode on the Deck: recorder thread only, without mirrors. If useful, I can build this PR's head for the Deck and run Auto vs RX_VK_RECORDER=thread (same save, interleaved).

Logs (no game data):

Related: HOS_CORES=4 crashes on the Deck, #2351. The chain.py fix I needed to read the Deck recordings is #2352.

Assisted-by: Claude

Steam Deck data for the "Still to test" item, from a player (not a maintainer). Not a run of this PR's head yet; these are builds from before it. **Setup:** Steam Deck LCD (APU 0932, RADV VANGOGH, Mesa 26.2.0-devel git-5c65d4fc31), SteamOS 3.9.5, Game Mode. Default settings, empty `longshot_env.txt` unless noted. Same save (Market entrance), free walking, 3-4 min per run. Builds from source: nightly-680 (`9dd41326`) and nightly-745 (`a2dc5385`). Both carry a local no-egress change and a bubblewrap launcher, neither of which touches threads. These are single runs unless noted, so treat differences under 5 % as noise. **1. The Auto line on the Deck.** Every default run (11 of them, 680 and 745) logs: ``` vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) ``` That's the line you expect to stay unchanged. Please re-check it on this PR's head before ticking the box. **2. Where a Deck frame goes** (HOS_CHAIN + `scripts/perf.py chain`, 680, serial replay, gameplay). This explains why offloading the renderer doesn't pay on 4 cores: ``` 37.7 ms a frame = game job graph ~18.5 (sead::MainThread 4.3, ModuleSystemWorker1-5 ~9.6, BaseProcExecutor0-5 ~4.6) + Presentation_Thread (translate + replay) 16.9 + waits ~2.3, one after the other GPU ~15 ms, in parallel (not the limit) ``` **3. Moving renderer work off the frame on the Deck.** This uses *forced mirrors*, not this PR's recorder-only mode. Numbers are `longshot_frames.csv` busy-frame medians on 680: | run | avg fps | render_ms | game_ms | main_blocked_ms | |---|---|---|---|---| | default (Auto: off) | 35.7 | 13.87 | 7.11 | 21.44 | | `RX_VK_MIRROR=1 RX_VK_ASYNC=1`, and the same `+ RX_VK_RECORDER=thread` | 32.1 / 32.0 | 0.20-0.33 | 18.85-19.28 | 23.13-23.45 | Translation leaves the presentation thread, but sead::MainThread stays blocked the same ~21-23 ms, and the game threads' stretch grows by the same amount. With 4 cores and 8 threads, the extra thread competes with ModuleSystemWorker / BaseProcExecutor. No visual problems were seen. **4. Offloading queue submits on the Deck.** This is close to what the recorder does for `vkQueueSubmit2`. I used Mesa's submit thread (`MESA_VK_ENABLE_SUBMIT_THREAD=1`, one ~75 s run each on 745, `RX_VK_BATCH=0` in both): | | off | on | |---|---|---| | queue submit on the render thread (slow-frame median) | 4.7 ms | 0.2 ms | | render_ms (median) | 16.1 | 14.5 | | game_ms (median) | 4.9 | 11.0 | | frame (median) | 28.3 | 29.2 | | avg fps | 28.7 | 25.9 | Submit time leaves the render thread, and the game threads lose about the same amount. There's no net gain on 4C/8T. **5. Desktop masked to 4C/8T.** i7-8700K, `taskset` to cores 0-3 + SMT siblings, RTX 3060 Ti (mirrored, so a different tier), Linux, 745, 2 interleaved 60 s runs each: | arm | avg fps | p99 ms | |---|---|---| | serial (Auto here) | 40.59 / 40.64 | 32.3 / 31.8 | | recorder (`MIRROR=1 ASYNC=1 RECORDER=thread`) | 40.88 / 41.31 | 29.5 / 29.4 | | render thread alone (`ASYNC=1`) | 39.59 / 39.59 | 31.3 / 31.5 | main_blocked_ms was 19.8-20.9 ms in every arm. Roughly 60-66 % of it is sead::MainThread waiting for the game's own jobs (guest events, the OoT job barrier). One trap for Linux mask tests: under `taskset`, Auto logged `3 cores of 6 logical processors`. The reserved core is taken off the mask, so a 4-core mask lands one tier lower. **Takeaway for this PR:** keeping the Deck at `Auto: off` (`kAutoRecorderOnlyCores = 6`) looks right on this data. Both ways of taking work off the Deck's presentation thread cost the game threads about as much as they saved. The one thing not measured here is this PR's exact mode on the Deck: recorder thread only, without mirrors. If useful, I can build this PR's head for the Deck and run Auto vs `RX_VK_RECORDER=thread` (same save, interleaved). Logs (no game data): - [deck-745-default-longshot_log.txt](https://git.magicbean.dev/attachments/ac94e97c-6160-43c8-ba34-4da02bd09992) (745 default (Auto: off)) - [deck-680-forced-mirrors-longshot_log.txt](https://git.magicbean.dev/attachments/cc23126d-36ce-4557-bf90-75d2b781bede) (680, forced mirrors + render thread) - [deck-745-submit-thread-off-longshot_log.txt](https://git.magicbean.dev/attachments/dbc97306-dc71-4607-a763-37a27696d5f7) (745, submit thread off) - [deck-745-submit-thread-on-longshot_log.txt](https://git.magicbean.dev/attachments/bed6dd1b-93aa-4b33-ad9a-38d89ad2985c) (745, submit thread on) Related: HOS_CORES=4 crashes on the Deck, #2351. The chain.py fix I needed to read the Deck recordings is #2352. Assisted-by: Claude
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The recorder-only default improves the measured Windows AMD iGPU workload, but its effect at the six-core cutoff and on Linux RADV and Intel iGPUs remains unmeasured. The requested hardware runs and CI are still pending. Recommend approval; not approved on the forge.

Auto enables the existing recorder thread on systems with at least six usable cores and no buffer-pool mirrors, while leaving the frame-ahead render thread off. It trades an additional thread and an 8 MiB system-memory ring for lower replay and submission time; the Windows AMD results show a gain, but the wider default needs validation.

Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)

  • L1 gpu/vk/threaded_rendering.h:134: The new default reaches Linux RADV systems at six usable cores, but the reported gain is from an eight-core Windows machine. (more on the line) Do: Run interleaved base versus head gameplay on a six-core Linux RADV iGPU, measuring mean and 1% low FPS and frame times, and check visuals and stability.
  • L2 gpu/vk/threaded_rendering.h:134: The same default enables the recorder on Intel iGPUs without a reported Intel run. (more on the line) Do: Run interleaved base versus head gameplay on a qualifying Intel iGPU, measuring mean and 1% low FPS and frame times, with visual and stability checks.

Questions (2) (not confirmed from the code; they don't hold the recommendation)

  • Can the Hyrule Field and Kokiri Forest comparisons be repeated in interleaved rounds before treating their single-tour gains as representative?
  • Can the recorder mode's first-use initialization be entered concurrently from a recording call outside replay_mu and a replay-lock entrant? Its non-atomic configuration writes precede the mode compare-exchange.

Checks: Still running: 10 checks.

More: does it help, other systems, switches, what was read

Does it help: Yes on the tested Windows Ryzen AI 7 350 / Radeon 860M: three interleaved Market runs report median mean FPS 48.66 to 51.39 (+5.6%) and 1% low 31.44 to 37.10 (+18.0%), with non-overlapping ranges. The Hyrule Field and Kokiri Forest results are single tours; results at the six-core cutoff and on the other affected platforms are unproven.

Other systems: Linux RADV and Windows Intel iGPUs with six or more usable cores take the new path and have no reported runs. Discrete GPUs remain on their existing default unless mirrors are disabled. The four-core Steam Deck remains off by the rule; the player's older-build runs support that choice but do not test this head. Recorder-only mode retains serial replay and early readback; the existing recorder and queue synchronization paths are reused.

Switches: No switch is added or removed. With RX_VK_RECORDER unset, the default Threaded rendering Auto now selects the recorder alone at six or more usable cores when mirrors are absent; the switch table and documentation are updated. RX_VK_RECORDER and RX_VK_ASYNC still override their respective halves. The six-core and platform-wide default needs the pending measurements.

Reviewed: b2f252d846 against 0e32bc100d: Read AGENTS.md, CONTRIBUTING.md, the pull request template and standards, the diff, commit messages, threaded_rendering.h, menu/threads.cpp, the changed selection and recorder paths, relevant synchronization and affinity code, and the supplied comments and review. Skimmed the longer changed files, test fixtures and documentation around their changes rather than reading every affected file in full. docs/review-checklist.md and the adjacent Tooling checkout are absent; recorded attachments were unavailable.; nothing run (a code review).

Checked and fine:

  • The mirror fallback is applied only after Auto passes the other safety gates; explicit On and Off retain their existing behavior.
  • The commit messages include AI-assistance trailers, and the diff contains no game-derived files, generated shaders or API interface change.
  • The added tests exercise the threshold, safety gates and overrides, and include mutations of the new selection.

Testing: No code or tests were run, as requested. The author reports a Windows in-game run and targeted checks; CI is still running.

Overlaps and merge order: The description identifies WIP #1407 as a non-overlapping low-core threshold change; its current diff was unavailable for independent comparison.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Approve.** The code is ready: only testing is left. The recorder-only default improves the measured Windows AMD iGPU workload, but its effect at the six-core cutoff and on Linux RADV and Intel iGPUs remains unmeasured. The requested hardware runs and CI are still pending. Recommend approval; not approved on the forge. Auto enables the existing recorder thread on systems with at least six usable cores and no buffer-pool mirrors, while leaving the frame-ahead render thread off. It trades an additional thread and an 8 MiB system-memory ring for lower replay and submission time; the Windows AMD results show a gain, but the wider default needs validation. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/threaded_rendering.h:134`: The new default reaches Linux RADV systems at six usable cores, but the reported gain is from an eight-core Windows machine. (more on the line) **Do:** Run interleaved base versus head gameplay on a six-core Linux RADV iGPU, measuring mean and 1% low FPS and frame times, and check visuals and stability. - **L2** `gpu/vk/threaded_rendering.h:134`: The same default enables the recorder on Intel iGPUs without a reported Intel run. (more on the line) **Do:** Run interleaved base versus head gameplay on a qualifying Intel iGPU, measuring mean and 1% low FPS and frame times, with visual and stability checks. **Questions (2)** (not confirmed from the code; they don't hold the recommendation) - Can the Hyrule Field and Kokiri Forest comparisons be repeated in interleaved rounds before treating their single-tour gains as representative? - Can the recorder mode's first-use initialization be entered concurrently from a recording call outside replay_mu and a replay-lock entrant? Its non-atomic configuration writes precede the mode compare-exchange. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes on the tested Windows Ryzen AI 7 350 / Radeon 860M: three interleaved Market runs report median mean FPS 48.66 to 51.39 (+5.6%) and 1% low 31.44 to 37.10 (+18.0%), with non-overlapping ranges. The Hyrule Field and Kokiri Forest results are single tours; results at the six-core cutoff and on the other affected platforms are unproven. **Other systems:** Linux RADV and Windows Intel iGPUs with six or more usable cores take the new path and have no reported runs. Discrete GPUs remain on their existing default unless mirrors are disabled. The four-core Steam Deck remains off by the rule; the player's older-build runs support that choice but do not test this head. Recorder-only mode retains serial replay and early readback; the existing recorder and queue synchronization paths are reused. **Switches:** No switch is added or removed. With RX_VK_RECORDER unset, the default Threaded rendering Auto now selects the recorder alone at six or more usable cores when mirrors are absent; the switch table and documentation are updated. RX_VK_RECORDER and RX_VK_ASYNC still override their respective halves. The six-core and platform-wide default needs the pending measurements. **Reviewed:** b2f252d846b5 against 0e32bc100dbe: Read AGENTS.md, CONTRIBUTING.md, the pull request template and standards, the diff, commit messages, threaded_rendering.h, menu/threads.cpp, the changed selection and recorder paths, relevant synchronization and affinity code, and the supplied comments and review. Skimmed the longer changed files, test fixtures and documentation around their changes rather than reading every affected file in full. docs/review-checklist.md and the adjacent Tooling checkout are absent; recorded attachments were unavailable.; nothing run (a code review). **Checked and fine:** - The mirror fallback is applied only after Auto passes the other safety gates; explicit On and Off retain their existing behavior. - The commit messages include AI-assistance trailers, and the diff contains no game-derived files, generated shaders or API interface change. - The added tests exercise the threshold, safety gates and overrides, and include mutations of the new selection. **Testing:** No code or tests were run, as requested. The author reports a Windows in-game run and targeted checks; CI is still running. **Overlaps and merge order:** The description identifies WIP #1407 as a non-overlapping low-core threshold change; its current diff was unavailable for independent comparison. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
@ -116,0 +131,4 @@
/// 4- and 5-core non-mirrored handhelds such as the Steam Deck unchanged)
constexpr Choice without_mirrors(const Choice& c, unsigned cores) {
if (c.why != Why::AutoBothThreads) return c;
if (cores >= kAutoRecorderOnlyCores) return {false, true, Why::AutoRecorderOnly};
Member

L1 (should fix): The new default reaches Linux RADV systems at six usable cores, but the reported gain is from an eight-core Windows machine.

When: A six-core Linux iGPU enables the recorder alongside the game workers; its scheduling and frame pacing can differ from the tested Windows system, and neither the cutoff nor Linux behavior has been measured.

Do: Run interleaved base versus head gameplay on a six-core Linux RADV iGPU, measuring mean and 1% low FPS and frame times, and check visuals and stability.

**L1** (should fix): The new default reaches Linux RADV systems at six usable cores, but the reported gain is from an eight-core Windows machine. *When:* A six-core Linux iGPU enables the recorder alongside the game workers; its scheduling and frame pacing can differ from the tested Windows system, and neither the cutoff nor Linux behavior has been measured. **Do:** Run interleaved base versus head gameplay on a six-core Linux RADV iGPU, measuring mean and 1% low FPS and frame times, and check visuals and stability.
Member

L2 (should fix): The same default enables the recorder on Intel iGPUs without a reported Intel run.

When: A Windows Intel iGPU with six or more usable cores takes the recorder-only path, whose driver submission behavior, visuals and frame pacing have only been reported for AMD.

Do: Run interleaved base versus head gameplay on a qualifying Intel iGPU, measuring mean and 1% low FPS and frame times, with visual and stability checks.

**L2** (should fix): The same default enables the recorder on Intel iGPUs without a reported Intel run. *When:* A Windows Intel iGPU with six or more usable cores takes the recorder-only path, whose driver submission behavior, visuals and frame pacing have only been reported for AMD. **Do:** Run interleaved base versus head gameplay on a qualifying Intel iGPU, measuring mean and 1% low FPS and frame times, with visual and stability checks.
HumanBean deleted branch perf/vk-auto-recorder-nomirror 2026-11-23 16:14:28 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Blocked by required conditions
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Blocked by required conditions
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Blocked by required conditions
CI / Workflow lint (actionlint) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
Guide screenshots / Guide images and local UI source review (pull_request) Blocked by required conditions
Third-party parts / As their notes say (pull_request) Blocked by required conditions
Third-party parts / The same as upstream (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request) Blocked by required conditions
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 4s
beanstalk/approval not approved yet
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
6 participants
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
MagicBeanDev/Longshot!2334
No description provided.