perf(vk): the recorder thread alone from 4 cores on non-mirrored systems #3157

Merged
HumanBean merged 2 commits from omgitsgela/Longshot:perf/recorder-thread-from-4-cores into main 2026-12-04 06:07:37 +00:00
Member

Summary

On a Steam Deck, Auto leaves the recorder thread off: it starts at 6 physical cores, and the Deck reports 4 (8 threads). The recorder thread alone is a measured CPU win there, and this makes Auto pick it from 4 cores on systems whose buffer pools have no mirrors, so Deck players get it without an environment switch.

Files a reviewer should read first: gpu/vk/threaded_rendering.h (the constant and without_mirrors()), tests/test_threaded_rendering.py (the cases that move with it), gpu/vk/switches.def (RX_VK_RECORDER's row).

See #2480: this addresses its recorder-thread half. Its load-mode half (RX_VK_LOAD) is separate and unchanged here.

Testing

Tested: Steam Deck LCD, SteamOS, RADV (VANGOGH), 1280x800, Render resolution 100%, the game's own upscaler: Hyrule Field (child save, slot 02) and the Market entrance, 15 s settling and 60 s standing and walking, auto profile. On the change's commit (9d4e7997, the same working branch and build configuration as its base 93aa8539) the start line reads "Auto: the recorder thread only (4 cores of 8 logical processors; the render thread off: the buffer pools have no mirrors)"; both scenes are faster and their screenshots are clean. Statistics below are filtered steady gameplay (frames of 20 ms or more, the first 45% for load and first-use pipelines and the last 2% for quit dropped), not whole-run fps.

Linux, python3 -I -B tests/test_threaded_rendering.py: passes, 44 broken copies caught. python3 -I -B tests/run_all.py: 725 passed, 16 failed, 157 skipped. The same 16 fail on clean main at ca830e89 with the same names, so they are inherited: test_builtin_spv, test_cloth_kernels, test_cloth_loops, test_cloth_step8, test_colour_vision, test_crt_shaders, test_drawn_page_map, test_gfx_world, test_hdr_encode, test_rgba16f_scene_dlss, test_rgba16f_scene_taau, test_taau_fxaa, test_target_retention, test_tex_desc_memo, test_thinlto_tls, test_vk_tex_btree_get_fast.

Still to test:

  • Current main with this PR applied, in the game on the Deck (the numbers above are the change's original commit, not the rebased head 9d24ffae5): by hand. This Deck cannot build current main's builder (shaderc-sys needs cmake, which it does not have), so that build is still outstanding.
  • A machine with 4 or 5 usable physical cores and buffer pools without mirrors (a 4/5-core integrated GPU, or any GPU with buffer_mirrors=Off), main against this PR in the Market, expecting no regression and the startup line to change from off to "the recorder thread only" (@Beanstalk)
  • Windows with 4 or 5 usable physical cores and no mirrors, the same startup-line and Market check (@Beanstalk)

Measurements

Verdict: On the Deck the recorder thread is 3.4 ms a frame faster in Hyrule Field at the median (9.6%) and 5.8 ms in the Market (14.3%), with GPU time flat. The 1% low rises 22.8 to 26.5 fps in Field (16%) and 20.4 to 20.9 in the Market (2.5%, where the forced-switch arm reached 23.2, so treat that one as within the runs' spread); p99 falls 16% and 4.7%.

Baseline: the Before column is the change's parent commit on the Deck's working branch (main plus that tree's own commits, 93aa8539); current main ca830e89 has the same threading code and the change is one constant, so the comparison isolates kAutoRecorderOnlyCores. The After commit is the change as measured (9d4e7997); 9d24ffae5 is the same change rebased onto current main, not yet run. The forced RX_VK_RECORDER=thread arms are shown separately, not counted as repeats of the default.

Setup: Steam Deck LCD, SteamOS, RADV VANGOGH, 1280x800, Render resolution 100% (the run's pinned options file, not the game's Auto preset), no frame cap, sound off; each run 15 s settling then 60 s standing and walking; numbers from the run's longshot_frames.csv.

Before: the branch base @ 93aa8539 After: this PR's change @ 9d4e7997
Hyrule Field, fps (3 runs interleaved) 29.8 / 30.0 / 30.0 31.6 (Auto); 32.0-32.2 with RX_VK_RECORDER=thread
Hyrule Field, frame p50 / p99, ms 35.07 / 42.11 31.71 / 35.37
Hyrule Field, 1% low, fps 22.8 26.5
Hyrule Field, GPU time, ms 23.3-23.5 23.7
Market, fps (4 runs interleaved) 24.5 / 24.8 / 25.1 28.1 (Auto); 29.8-29.9 with RX_VK_RECORDER=thread
Market, frame p50 / p99, ms 40.63 / 48.22 34.84 / 45.97
Market, 1% low, fps 20.4 20.9
Market, GPU time, ms 23.0-23.1 23.2
Field: [hos host] longshot v3.2.0-37-g9d4e7997 (source 928998f3)
[hvw] vk: Threaded rendering: Auto: the recorder thread only (4 cores of 8 logical processors; the render thread off: the buffer pools have no mirrors)

Risks

4- and 5-core systems whose pools have no mirrors newly run the recorder thread. That includes integrated GPUs and discrete cards with buffer_mirrors=Off: the menu asks the pools, not the GPU type. On the Deck that is faster with the same GPU time and the same pictures; other hardware could differ, which is why the 4/5-core and Windows checks are listed under Still to test. The render thread still stays off without mirrors, so the mirrored-path risk is unchanged. Turn it off per run with RX_VK_RECORDER=off, or the Debug tab's Threaded rendering row set to Off; a revert restores the old threshold. Nothing changes for players after updating: no saves, settings or caches move.

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 switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • 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 On a Steam Deck, Auto leaves the recorder thread off: it starts at 6 physical cores, and the Deck reports 4 (8 threads). The recorder thread alone is a measured CPU win there, and this makes Auto pick it from 4 cores on systems whose buffer pools have no mirrors, so Deck players get it without an environment switch. Files a reviewer should read first: `gpu/vk/threaded_rendering.h` (the constant and `without_mirrors()`), `tests/test_threaded_rendering.py` (the cases that move with it), `gpu/vk/switches.def` (`RX_VK_RECORDER`'s row). See https://git.magicbean.dev/MagicBeanDev/Longshot/issues/2480: this addresses its recorder-thread half. Its load-mode half (`RX_VK_LOAD`) is separate and unchanged here. ## Testing **Tested:** Steam Deck LCD, SteamOS, RADV (VANGOGH), 1280x800, Render resolution 100%, the game's own upscaler: Hyrule Field (child save, slot 02) and the Market entrance, 15 s settling and 60 s standing and walking, auto profile. On the change's commit (9d4e7997, the same working branch and build configuration as its base 93aa8539) the start line reads "Auto: the recorder thread only (4 cores of 8 logical processors; the render thread off: the buffer pools have no mirrors)"; both scenes are faster and their screenshots are clean. Statistics below are filtered steady gameplay (frames of 20 ms or more, the first 45% for load and first-use pipelines and the last 2% for quit dropped), not whole-run fps. Linux, `python3 -I -B tests/test_threaded_rendering.py`: passes, 44 broken copies caught. `python3 -I -B tests/run_all.py`: 725 passed, 16 failed, 157 skipped. The same 16 fail on clean main at ca830e89 with the same names, so they are inherited: test_builtin_spv, test_cloth_kernels, test_cloth_loops, test_cloth_step8, test_colour_vision, test_crt_shaders, test_drawn_page_map, test_gfx_world, test_hdr_encode, test_rgba16f_scene_dlss, test_rgba16f_scene_taau, test_taau_fxaa, test_target_retention, test_tex_desc_memo, test_thinlto_tls, test_vk_tex_btree_get_fast. **Still to test:** - Current main with this PR applied, in the game on the Deck (the numbers above are the change's original commit, not the rebased head 9d24ffae5): by hand. This Deck cannot build current main's builder (shaderc-sys needs cmake, which it does not have), so that build is still outstanding. - A machine with 4 or 5 usable physical cores and buffer pools without mirrors (a 4/5-core integrated GPU, or any GPU with `buffer_mirrors=Off`), main against this PR in the Market, expecting no regression and the startup line to change from off to "the recorder thread only" (@Beanstalk) - Windows with 4 or 5 usable physical cores and no mirrors, the same startup-line and Market check (@Beanstalk) ## Measurements **Verdict:** On the Deck the recorder thread is 3.4 ms a frame faster in Hyrule Field at the median (9.6%) and 5.8 ms in the Market (14.3%), with GPU time flat. The 1% low rises 22.8 to 26.5 fps in Field (16%) and 20.4 to 20.9 in the Market (2.5%, where the forced-switch arm reached 23.2, so treat that one as within the runs' spread); p99 falls 16% and 4.7%. Baseline: the Before column is the change's parent commit on the Deck's working branch (main plus that tree's own commits, 93aa8539); current main ca830e89 has the same threading code and the change is one constant, so the comparison isolates `kAutoRecorderOnlyCores`. The After commit is the change as measured (9d4e7997); 9d24ffae5 is the same change rebased onto current main, not yet run. The forced `RX_VK_RECORDER=thread` arms are shown separately, not counted as repeats of the default. Setup: Steam Deck LCD, SteamOS, RADV VANGOGH, 1280x800, Render resolution 100% (the run's pinned options file, not the game's Auto preset), no frame cap, sound off; each run 15 s settling then 60 s standing and walking; numbers from the run's `longshot_frames.csv`. | | Before: the branch base @ 93aa8539 | After: this PR's change @ 9d4e7997 | |---|---|---| | Hyrule Field, fps (3 runs interleaved) | 29.8 / 30.0 / 30.0 | 31.6 (Auto); 32.0-32.2 with `RX_VK_RECORDER=thread` | | Hyrule Field, frame p50 / p99, ms | 35.07 / 42.11 | 31.71 / 35.37 | | Hyrule Field, 1% low, fps | 22.8 | 26.5 | | Hyrule Field, GPU time, ms | 23.3-23.5 | 23.7 | | Market, fps (4 runs interleaved) | 24.5 / 24.8 / 25.1 | 28.1 (Auto); 29.8-29.9 with `RX_VK_RECORDER=thread` | | Market, frame p50 / p99, ms | 40.63 / 48.22 | 34.84 / 45.97 | | Market, 1% low, fps | 20.4 | 20.9 | | Market, GPU time, ms | 23.0-23.1 | 23.2 | ``` Field: [hos host] longshot v3.2.0-37-g9d4e7997 (source 928998f3) [hvw] vk: Threaded rendering: Auto: the recorder thread only (4 cores of 8 logical processors; the render thread off: the buffer pools have no mirrors) ``` ## Risks 4- and 5-core systems whose pools have no mirrors newly run the recorder thread. That includes integrated GPUs and discrete cards with `buffer_mirrors=Off`: the menu asks the pools, not the GPU type. On the Deck that is faster with the same GPU time and the same pictures; other hardware could differ, which is why the 4/5-core and Windows checks are listed under Still to test. The render thread still stays off without mirrors, so the mirrored-path risk is unchanged. Turn it off per run with `RX_VK_RECORDER=off`, or the Debug tab's Threaded rendering row set to Off; a revert restores the old threshold. Nothing changes for players after updating: no saves, settings or caches move. ## 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 - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] 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. - [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.
perf(vk): the recorder thread alone from 4 cores on non-mirrored systems
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
9d24ffae56
Auto keeps the render thread off where buffer pools have no mirrors (integrated
GPUs, RX_VK_MIRROR=0) and runs the recorder thread alone with serial replay from
kAutoRecorderOnlyCores physical cores. That threshold was 6, which left the
4-core Steam Deck on serial replay; measured there (Field and Market, 100%
render, interleaved A/B/B/A) the recorder thread is 2.2-6.4 ms a frame faster
at the same GPU time, and issue #2480 reports +13% fps.

Set it to 4. The tests, the row's help, switches.def and the documents move
with it.

Assisted-by: Hermes
Author
Member

Tested in game: Steam Deck LCD, SteamOS, RADV VANGOGH, 1280x800, Render resolution 100%: Hyrule Field and the Market entrance, 15 s settling and 60 s standing and walking. Auto picked the recorder thread and the frame time fell from p50 35.07/40.63 ms to 31.71/34.84 ms (p99 42.11/48.22 to 35.37/45.97), GPU time unchanged, screenshots clean, no errors. The rebased head on current main has not been run yet.

Tested in game: Steam Deck LCD, SteamOS, RADV VANGOGH, 1280x800, Render resolution 100%: Hyrule Field and the Market entrance, 15 s settling and 60 s standing and walking. Auto picked the recorder thread and the frame time fell from p50 35.07/40.63 ms to 31.71/34.84 ms (p99 42.11/48.22 to 35.37/45.97), GPU time unchanged, screenshots clean, no errors. The rebased head on current main has not been run yet.
Member

Possibly related, for context:

  • PR #1407 WIP: perf(vk): derive Auto threaded rendering's threshold from the game's cores — Open Auto threaded-rendering threshold work overlaps same policy/header
  • issue #2480 Game: Steam Deck (v3.2.0): RX_VK_LOAD=start and RX_VK_RECORDER=thread are clear wins that Auto leaves off — Issue this PR explicitly fixes; Deck recorder Auto gain
  • PR #2232 perf(vk): Threaded rendering's Auto runs the recorder thread from 4 cores, not 6 — Merged prior 4-core Auto policy, discrete/mirrored GPUs only
  • PR #2334 perf(vk): +18.0% 1% low / +5.6% FPS in Market on 6+ core non-mirrored / integrated GPUs via Auto recorder thread — Merged prior recorder-only non-mirrored Auto policy, currently 6-core cutoff
Possibly related, for context: - PR #1407 WIP: perf(vk): derive Auto threaded rendering's threshold from the game's cores — Open Auto threaded-rendering threshold work overlaps same policy/header - issue #2480 Game: Steam Deck (v3.2.0): RX_VK_LOAD=start and RX_VK_RECORDER=thread are clear wins that Auto leaves off — Issue this PR explicitly fixes; Deck recorder Auto gain - PR #2232 perf(vk): Threaded rendering's Auto runs the recorder thread from 4 cores, not 6 — Merged prior 4-core Auto policy, discrete/mirrored GPUs only - PR #2334 perf(vk): +18.0% 1% low / +5.6% FPS in Market on 6+ core non-mirrored / integrated GPUs via Auto recorder thread — Merged prior recorder-only non-mirrored Auto policy, currently 6-core cutoff
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The Deck results indicate a promising frame-time improvement, but the measured Auto result is a single run per scene on an earlier tree. The new default also reaches other four- and five-core systems that have not been measured. Recommend approval; not approved on the forge.

Auto enables the recorder thread without the render thread on non-mirrored systems with four or five usable physical cores. This can improve Deck frame times, at the cost of another active thread and its scheduling overhead on newly affected systems.

Nits (1): optional.

  • L3 gpu/vk/threaded_rendering.h:87: The preceding comment still says the threshold is held at six and leaves four- and five-core handhelds unchanged. (more on the line) Do: Update the comment to describe the new threshold and the Deck measurement.

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

  • L1 gpu/vk/threaded_rendering.h:87: The reported Deck Auto result has only one run per scene and was taken on an earlier tree, so it does not establish the gain on this head. (more on the line) Do: Run interleaved baseline and head Auto comparisons on the Deck in both scenes, with at least two runs per side and fps, median and p99 frame times.
  • L2 gpu/vk/threaded_rendering.h:87: The new default also enables the recorder on four- and five-core non-mirrored PCs beyond the tested Deck, with no comparison on those systems. (more on the line) Do: Compare baseline and head in representative gameplay on the listed Windows integrated GPU and another affected Linux integrated system, including frame-time tails and correctness. (@fix does its part first: Restrict the four-core default to the measured hardware until the broader default is validated.)

@fix can do L2 and L3.

Checks: Still running: 11 checks.

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

Does it help: Unproven for the rebased head: the reported earlier-tree Deck Auto runs reduced p50 from 35.07 to 31.71 ms in Hyrule Field and from 40.63 to 34.84 ms in the Market, with p99 also lower. There is only one reported Auto run per scene, and the head has not been run.

Other systems: The default also changes on Windows and Linux integrated GPUs and on discrete systems with mirrors disabled, when four or five physical cores are usable. Mirrored systems, fewer-core systems, explicit overrides, and unsafe Auto paths retain their existing selection; performance and correctness on the newly affected non-Deck systems remain unmeasured.

Switches: RX_VK_RECORDER is unchanged as an override; its unset default follows Threaded rendering Auto, which now selects the recorder alone from four rather than six physical cores without mirrors. The table and user documentation were updated; the wider default still needs hardware measurements.

Reviewed: 9d24ffae56 against ca830e8959: Read the repository instructions, contribution rules, pull request template, full diff, commit message, threaded_rendering.h, and the affected selection and recorder paths; examined the changed tests and recorded run. Skimmed the remaining large changed renderer files and reference documents around the edits; did not read those files in full. docs/review-checklist.md is absent.; nothing run (a code review).

Checked and fine:

  • The changed selection keeps the render thread off without mirrors and preserves explicit recorder overrides and the existing unsafe gates.
  • The tests exercise the four- and five-core choices and assert the new threshold; undoing the threshold change fails the assertion.
  • The commit includes an AI-assistance trailer, and the added run record contains summary numbers rather than game output.

Testing: Read-only review; no project code, builds or tests were run. The author reports the threaded-rendering test passed on Linux; CI is still running.

Overlaps and merge order: Not checked; network unavailable.


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

**Recommendation: Approve.** The code is ready: only testing is left. The Deck results indicate a promising frame-time improvement, but the measured Auto result is a single run per scene on an earlier tree. The new default also reaches other four- and five-core systems that have not been measured. Recommend approval; not approved on the forge. Auto enables the recorder thread without the render thread on non-mirrored systems with four or five usable physical cores. This can improve Deck frame times, at the cost of another active thread and its scheduling overhead on newly affected systems. **Nits (1)**: optional. - **L3** `gpu/vk/threaded_rendering.h:87`: The preceding comment still says the threshold is held at six and leaves four- and five-core handhelds unchanged. (more on the line) **Do:** Update the comment to describe the new threshold and the Deck measurement. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/threaded_rendering.h:87`: The reported Deck Auto result has only one run per scene and was taken on an earlier tree, so it does not establish the gain on this head. (more on the line) **Do:** Run interleaved baseline and head Auto comparisons on the Deck in both scenes, with at least two runs per side and fps, median and p99 frame times. - **L2** `gpu/vk/threaded_rendering.h:87`: The new default also enables the recorder on four- and five-core non-mirrored PCs beyond the tested Deck, with no comparison on those systems. (more on the line) **Do:** Compare baseline and head in representative gameplay on the listed Windows integrated GPU and another affected Linux integrated system, including frame-time tails and correctness. *(`@fix` does its part first: Restrict the four-core default to the measured hardware until the broader default is validated.)* `@fix` can do L2 and L3. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for the rebased head: the reported earlier-tree Deck Auto runs reduced p50 from 35.07 to 31.71 ms in Hyrule Field and from 40.63 to 34.84 ms in the Market, with p99 also lower. There is only one reported Auto run per scene, and the head has not been run. **Other systems:** The default also changes on Windows and Linux integrated GPUs and on discrete systems with mirrors disabled, when four or five physical cores are usable. Mirrored systems, fewer-core systems, explicit overrides, and unsafe Auto paths retain their existing selection; performance and correctness on the newly affected non-Deck systems remain unmeasured. **Switches:** RX_VK_RECORDER is unchanged as an override; its unset default follows Threaded rendering Auto, which now selects the recorder alone from four rather than six physical cores without mirrors. The table and user documentation were updated; the wider default still needs hardware measurements. **Reviewed:** 9d24ffae569e against ca830e895926: Read the repository instructions, contribution rules, pull request template, full diff, commit message, threaded_rendering.h, and the affected selection and recorder paths; examined the changed tests and recorded run. Skimmed the remaining large changed renderer files and reference documents around the edits; did not read those files in full. docs/review-checklist.md is absent.; nothing run (a code review). **Checked and fine:** - The changed selection keeps the render thread off without mirrors and preserves explicit recorder overrides and the existing unsafe gates. - The tests exercise the four- and five-core choices and assert the new threshold; undoing the threshold change fails the assertion. - The commit includes an AI-assistance trailer, and the added run record contains summary numbers rather than game output. **Testing:** Read-only review; no project code, builds or tests were run. The author reports the threaded-rendering test passed on Linux; CI is still running. **Overlaps and merge order:** Not checked; network unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -85,3 +85,3 @@
/// recording and submits (RX_VK_RECORDER_PARTS). Holding this tier at 6 physical cores leaves 4- and 5-core non-mirrored
/// handhelds (such as the Steam Deck) unchanged until tested on that hardware
inline constexpr unsigned kAutoRecorderOnlyCores = 6;
inline constexpr unsigned kAutoRecorderOnlyCores = 4;
Member

L1 (should fix): The reported Deck Auto result has only one run per scene and was taken on an earlier tree, so it does not establish the gain on this head.

When: The default selects the recorder on a four-core Deck; run-to-run variation or changes on current main may change the reported improvement and frame pacing.

Do: Run interleaved baseline and head Auto comparisons on the Deck in both scenes, with at least two runs per side and fps, median and p99 frame times.

**L1** (should fix): The reported Deck Auto result has only one run per scene and was taken on an earlier tree, so it does not establish the gain on this head. *When:* The default selects the recorder on a four-core Deck; run-to-run variation or changes on current main may change the reported improvement and frame pacing. **Do:** Run interleaved baseline and head Auto comparisons on the Deck in both scenes, with at least two runs per side and fps, median and p99 frame times.
Member

L2 (should fix): The new default also enables the recorder on four- and five-core non-mirrored PCs beyond the tested Deck, with no comparison on those systems.

When: An integrated GPU on Windows or another Linux PC now runs an additional recorder thread; its scheduling and driver costs may affect frame time or pacing differently from the Deck.

Do: Compare baseline and head in representative gameplay on the listed Windows integrated GPU and another affected Linux integrated system, including frame-time tails and correctness.

**L2** (should fix): The new default also enables the recorder on four- and five-core non-mirrored PCs beyond the tested Deck, with no comparison on those systems. *When:* An integrated GPU on Windows or another Linux PC now runs an additional recorder thread; its scheduling and driver costs may affect frame time or pacing differently from the Deck. **Do:** Compare baseline and head in representative gameplay on the listed Windows integrated GPU and another affected Linux integrated system, including frame-time tails and correctness.
Member

L3 (nit): The preceding comment still says the threshold is held at six and leaves four- and five-core handhelds unchanged.

Do: Update the comment to describe the new threshold and the Deck measurement.

**L3** (nit): The preceding comment still says the threshold is held at six and leaves four- and five-core handhelds unchanged. **Do:** Update the comment to describe the new threshold and the Deck measurement.
test(vk): the no-mirror recorder tier's hints, table and checks follow 4 cores
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Third-party parts and guide screenshots (pull_request) Successful in 13s
PR description / Title and description (pull_request_target) Failing after 7s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 19s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m30s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 21m13s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 15m0s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 15m1s
CI / Website build and checks (pull_request) Failing after 41s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m5s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 54m46s
f90e3a7138
The Auto hint and the developer thread table still said six, the settings-page
check matched any '4 or more' rather than the recorder-only clause, and the
constant's broken copy no longer proved the behaviour it named. Tighten the
check, add the two clause mutations, and drop an assertion that became
unreachable once both thresholds are 4.

Assisted-by: Hermes
Author
Member

Review fixes in f90e3a713: the Auto hint and the thread table now say 4. The settings and switches checks require the recorder-only clause itself, because they could pass on the mirrored clause before; the constant mutation now proves the behaviour (4 -> 6 fails at 4 cores); an unreachable assertion is gone. The description labels the filtered statistics, adds 1% lows, per-scene GPU time, the discrete buffer_mirrors=Off case and the Windows build box. Tests: 44 broken copies caught. The exact-head Deck run is still outstanding: current main's builder needs cmake for shaderc-sys, absent here.

Review fixes in f90e3a713: the Auto hint and the thread table now say 4. The settings and switches checks require the recorder-only clause itself, because they could pass on the mirrored clause before; the constant mutation now proves the behaviour (4 -> 6 fails at 4 cores); an unreachable assertion is gone. The description labels the filtered statistics, adds 1% lows, per-scene GPU time, the discrete buffer_mirrors=Off case and the Windows build box. Tests: 44 broken copies caught. The exact-head Deck run is still outstanding: current main's builder needs cmake for shaderc-sys, absent here.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The Deck measurements indicate a gain, but they include only one Auto run per scene on an earlier tree. The broader four- and five-core default also needs comparison on affected PCs. Recommend approval; not approved on the forge.

Auto enables the recorder thread on non-mirrored systems with four or five usable cores, including the Steam Deck. This can reduce frame time, at the cost of enabling threaded recording by default on other hardware that has not yet been measured.

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

  • L1 gpu/vk/threaded_rendering.h:87: The reported Deck Auto result has only one run per scene and was taken on an earlier tree, so it does not establish the gain on this head. When: The default selects the recorder on a four-core Deck; run-to-run variation or changes on current main may change the reported improvement and frame pacing. Do: Run interleaved baseline and head Auto comparisons on the Deck in both scenes, with at least two runs per side and fps, median and p99 frame times.
  • L2 gpu/vk/threaded_rendering.h:87: The new default also enables the recorder on four- and five-core non-mirrored PCs beyond the tested Deck, with no comparison on those systems. When: An integrated GPU on Windows or another Linux PC now runs an additional recorder thread; its scheduling and driver costs may affect frame time or pacing differently from the Deck. Do: Compare baseline and head in representative gameplay on the listed Windows integrated GPU and another affected Linux integrated system, including frame-time tails and correctness. (@fix does its part first: Restrict the four-core default to the measured hardware until the broader default is validated.)

@fix can do L2.

Since the last review (on 9d24ffae56)
Resolved: L3 (The preceding comment still says the threshold is held at six and leaves four- and five-co…)
Still open: L1 (The reported Deck Auto result has only one run per scene and was taken on an earlier tree,…); L2 (The new default also enables the recorder on four- and five-core non-mirrored PCs beyond t…)

Checks: Still running: 11 checks.

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

Does it help: Unproven on this head. On the earlier Deck tree, one Auto run per scene reduced median frame time from 35.07 to 31.71 ms in Hyrule Field and from 40.63 to 34.84 ms in the Market; the recorded baseline had three and four runs respectively.

Other systems: The new default also affects four- and five-core integrated GPUs and discrete GPUs with buffer mirrors off, on Linux and Windows. Comparisons on those systems and an in-game run of the rebased head remain outstanding.

Switches: RX_VK_RECORDER remains unset by default, taking its choice from Threaded rendering Auto. Its effective Auto default changes to the recorder thread alone at four cores without mirrors; the broader default remains unvalidated.

Reviewed: f90e3a7138 against ca830e8959: Read threaded_rendering.h and the recorded Deck run in full; inspected the changes since the ledger and the relevant renderer diff. Other changed files, repository rules, and surrounding code were not read in full.; nothing run (a code review).

Checked and fine:

  • The updated hint and thread table state the four-core recorder-only threshold.
  • The threshold mutation check now covers leaving four-core systems off.

Testing: No commands from the project were run. The author reports the targeted check passing, with 16 suite failures also present on main; CI is still running.

Overlaps and merge order: Not checked.


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

**Recommendation: Approve.** The code is ready: only testing is left. The Deck measurements indicate a gain, but they include only one Auto run per scene on an earlier tree. The broader four- and five-core default also needs comparison on affected PCs. Recommend approval; not approved on the forge. Auto enables the recorder thread on non-mirrored systems with four or five usable cores, including the Steam Deck. This can reduce frame time, at the cost of enabling threaded recording by default on other hardware that has not yet been measured. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L1** `gpu/vk/threaded_rendering.h:87`: The reported Deck Auto result has only one run per scene and was taken on an earlier tree, so it does not establish the gain on this head. *When:* The default selects the recorder on a four-core Deck; run-to-run variation or changes on current main may change the reported improvement and frame pacing. **Do:** Run interleaved baseline and head Auto comparisons on the Deck in both scenes, with at least two runs per side and fps, median and p99 frame times. - **L2** `gpu/vk/threaded_rendering.h:87`: The new default also enables the recorder on four- and five-core non-mirrored PCs beyond the tested Deck, with no comparison on those systems. *When:* An integrated GPU on Windows or another Linux PC now runs an additional recorder thread; its scheduling and driver costs may affect frame time or pacing differently from the Deck. **Do:** Compare baseline and head in representative gameplay on the listed Windows integrated GPU and another affected Linux integrated system, including frame-time tails and correctness. *(`@fix` does its part first: Restrict the four-core default to the measured hardware until the broader default is validated.)* `@fix` can do L2. **Since the last review** (on 9d24ffae569e) Resolved: L3 (The preceding comment still says the threshold is held at six and leaves four- and five-co…) Still open: L1 (The reported Deck Auto result has only one run per scene and was taken on an earlier tree,…); L2 (The new default also enables the recorder on four- and five-core non-mirrored PCs beyond t…) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven on this head. On the earlier Deck tree, one Auto run per scene reduced median frame time from 35.07 to 31.71 ms in Hyrule Field and from 40.63 to 34.84 ms in the Market; the recorded baseline had three and four runs respectively. **Other systems:** The new default also affects four- and five-core integrated GPUs and discrete GPUs with buffer mirrors off, on Linux and Windows. Comparisons on those systems and an in-game run of the rebased head remain outstanding. **Switches:** RX_VK_RECORDER remains unset by default, taking its choice from Threaded rendering Auto. Its effective Auto default changes to the recorder thread alone at four cores without mirrors; the broader default remains unvalidated. **Reviewed:** f90e3a71381c against ca830e895926: Read threaded_rendering.h and the recorded Deck run in full; inspected the changes since the ledger and the relevant renderer diff. Other changed files, repository rules, and surrounding code were not read in full.; nothing run (a code review). **Checked and fine:** - The updated hint and thread table state the four-core recorder-only threshold. - The threshold mutation check now covers leaving four-core systems off. **Testing:** No commands from the project were run. The author reports the targeted check passing, with 16 suite failures also present on main; CI is still running. **Overlaps and merge order:** Not checked. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.</sub>
Author
Member
@fix
Member

I didn't fix this pull request: the change I made would take out 16 of the 23 lines this pull request adds outside its tests, which undoes it rather than fixing it. So L2 is the author's now. Nothing was pushed.


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

I didn't fix this pull request: the change I made would take out 16 of the 23 lines this pull request adds outside its tests, which undoes it rather than fixing it. So L2 is the author's now. Nothing was pushed. --- <sub>Automated fix by BeanBot (gpt-6.1-terra), asked for by omgitsgela. Nothing was run; a maintainer decides.</sub>
HumanBean changed title from WIP: perf(vk): the recorder thread alone from 4 cores on non-mirrored systems to perf(vk): the recorder thread alone from 4 cores on non-mirrored systems 2026-12-04 06:07:32 +00:00
HumanBean deleted branch perf/recorder-thread-from-4-cores 2026-12-04 06:07:38 +00:00
Owner

@ask is there a reason not to have recorder thread on for all? basically everyone has 4+ cores already

@ask is there a reason not to have recorder thread on for all? basically everyone has 4+ cores already
Member

is there a reason not to have recorder thread on for all? basically everyone has 4+ cores already

In reply to this comment

I didn't answer: this pull request isn't open.


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

> is there a reason not to have recorder thread on for all? basically everyone has 4+ cores already [In reply to this comment](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3157#issuecomment-101943) I didn't answer: this pull request isn't open. --- <sub>Automated answer by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
4 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!3157
No description provided.