WIP: perf(vk): Threaded rendering's Auto runs the recorder thread from 4 cores, not 6 #2232

Draft
klimovich008 wants to merge 7 commits from klimovich008/Longshot:perf/auto-recorder-4-cores into main
Member

Summary

On a PC whose CPU has 4 or 5 physical cores, Threaded rendering's Auto runs the render thread alone today, so that one
thread makes every one of the driver's calls itself. This PR makes Auto run the recorder thread beside it from 4 cores,
as it already does from 6. WIP until the Test Farm and players have run it on real 4-core PCs: the numbers below
come from one 8-core PC held to 4 cores by an affinity mask. They are a diagnostic, not the claim.

Who changes and who doesn't. Only PCs where all of these hold change:

  • 4 or 5 physical cores for the game, with or without SMT (4C/4T, 4C/8T, 5C);
  • a discrete GPU of any maker (its buffer pools have mirrors; device_policy.h p.mirrors = f.discrete());
  • the Threaded rendering row on Auto (the default).

Nothing changes on:

  • the Steam Deck and every PC that runs the game on an integrated GPU. There the pools have no mirrors, and the
    menu's threaded_choice turns Auto off for that reason, on main and here alike. The start line says
    vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) on both builds;
  • 2- and 3-core PCs: Auto is off on both builds;
  • 6 cores and more: both threads on both builds, as before.

The rule (gpu/vk/threaded_rendering.h, from #1664): kAutoCores = 4 gives both threads from 4 cores and off below.
The "render thread alone" tier is gone (Why::AutoRenderThread, its describe case, its half of auto_picked).
The header keeps the 18 Nov table as the record and puts the 22 Nov masked numbers beside it, labelled as masks of an
8-core CPU.

Neighbours: #1407 (riqmarmes, WIP) asks the same header's question for low-core CPUs, for the mode's own threshold,
before #1664's tiers. #1763 and #1866 rewrote the threads and the recorder after #1664's table was measured. That is
why the 4-core tier is being looked at again.

Read first: gpu/vk/threaded_rendering.h (auto_picks), then tests/test_threaded_rendering.py.

Other files: the words that named the tiers (gpu/vk/menu/threads.cpp, vk_menu.h, vk_menu.cpp, device_policy.h,
vk_replay.cpp, vk_recorder.h, switches.def, docs/dev/reference/threads.md, architecture.md, switches.md,
docs/user/graphics-and-controls.md), and tests/test_device_policy.py's five 4-core PCs.

Testing

Tested: Windows 11, Ryzen 7 5700X3D (8 cores, 16 threads), RX 9070 XT, AMD 26.11.2.

  • In the game: Hyrule Field turning, 3 alternating pairs held to 4 cores by the process's affinity mask (0xff: 4
    cores with their SMT siblings), and one pair unmasked. Every masked run logged the line its build should:

    • main: Auto: the render thread only (4 cores of 8 logical processors; the recorder thread too from 6 cores);
    • this PR: Auto: on, the render thread and the recorder thread (4 cores of 8 logical processors).

    Unmasked, both builds log the same line (Auto: on, the render thread and the recorder thread (8 cores of 16 logical processors)). The clock read 0.999-1.001 in every run. There were no new error lines in the PR's logs against main's.
    Every run passed the harness's screen check.

  • tests/test_threaded_rendering.py, with g++ and clang++: the rule, the readers and the menu's threaded_choice are
    run whole, in 15 environments, with 39 broken copies, each caught. The menu's cases include:

    • both threads at 4 and 5 cores, off at 3;
    • off with no mirrors (the Deck's case);
    • off with RX_VK_CAPTURE=0, RX_VK_LOW_SPEC, RX_VK_DUMP or RX_VK_BENCH.

    This branch's test fails on main's code.

  • tests/test_device_policy.py, with both compilers: it passes after merging main a2dc5385.

  • Failures that main has too:

    • tests/test_switch_table.py fails on RX_VK_GRASS_DISTANCE's order in switches.def, a line this PR doesn't touch.
    • In the full suite, run_all.py, run on dd5ffe6a, the branch has no failure that main lacks.
    • mise run lint's only failure is main's own (shellcheck on .forgejo/workflows/build-windows.yml).
    • The guide-screenshot source review lists menu/threads.cpp, threaded_rendering.h and vk_recorder.h beside the
      files it already lists on main (main a2dc5385 fails it with 10). Threaded rendering is on the Debug tab, not the
      pictured Graphics view, and vk_recorder.h's change is a comment.
  • linux_syntax.sh (clang 21): ok on menu/threads.cpp, vk_menu.cpp, vk_replay.cpp and vk_progcache.cpp.

Still to test:

  • PCs with 4 physical cores and a discrete GPU (4C/8T and 4C/4T; Intel and AMD CPUs; NVIDIA and AMD cards; Windows and
    Linux): main against this PR, both on Auto with no switch, uncapped, in Hyrule Field and the Market. Expected: fps up
    and p99 down or level, with no more frames over 50 or 100 ms. The start line should read as under Tested
    (@Beanstalk, request below).
  • A 4-core laptop CPU on a power-saving plan, where the recorder's short sleeps could slow the CPU's clock (an
    i7-9700K's did before #1866): the same comparison (@Beanstalk if the farm has one, else by hand).
  • Steam Deck: nothing to compare. This PR changes nothing there, and Auto against Auto runs the same mode on both
    builds. A separate, data-only question for Deck players (forced recorder thread against Auto, both on this PR's
    build) is in a comment below. It informs a possible later Deck change and is not this PR's claim (by hand).

Measurements

Verdict: on this PC held to 4 cores with SMT (--affinity 0xff), +21.0 % fps in Hyrule Field, p99 4.3 ms lower.
This is a mask of an 8-core CPU (its 96 MB cache is kept, and the driver's and Windows' threads run on the other 4
cores), a diagnostic, not the claim: real 4-core CPUs are for the farm. Unmasked (8 cores), both builds run the same
mode.

Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2. Hyrule Field turning. HOS_FPS_MAX=240 with the options
file's frame_rate_cap=0, vsync=0, frame_generation=0, a fixed light GPU load beside the game, and RX_VK_ASYNC=1
in both arms. Three alternating pairs, no warm-ups, no run rejected, medians. The PR's side is a pack built from
43280cfa; every later gpu/ change on the branch is a comment. Both sides used the same exe.

These were measured on main dd5ffe6a, and the PR is now on main a2dc5385. Main's 7 commits since then don't touch the
Threaded rendering rule, the recorder or the replay's submit. #2174 changes Hyrule Field's simulated turf on the way in,
so the absolute numbers may move. Not re-measured here: the farm runs the head.

--affinity 0xff (4 cores, 8 logical; a mask of an 8-core CPU) Before: main @ dd5ffe6a After: this PR @ 43280cfa
Auto's pick (start line) the render thread alone the render thread and the recorder thread
fps, median (runs) 64.69 (64.69, 63.79, 64.94) 78.29 (78.54, 78.29, 77.04)
CPU ms 51.5 50.0
p99 frame time, ms 23.04 18.74
worst frame, ms 61.1 59.2
frames over 50 / 100 / 250 ms, per run 1/0/0, 1/0/0, 1/0/0 1/0/0, 1/0/0, 0/0/0
clock 1.001, 1.001, 0.999 1.000, 1.000, 1.001
the replay's submit, ms a frame (draw) 12.68-13.00 (8.1-8.5) 9.79-10.00 (6.5-6.7)
the render thread's jobs, ms a frame 13.17-13.35 10.20-10.33
the main thread's GPU waits, ms in 5 s 1173-1303 (about 3.7 ms a frame) 298-509 (about 1 ms a frame)

The GPU clock was 3001 MHz on main's side and 3208 MHz on this PR's. The game is CPU-bound here, and AMD's clock rises
with GPU work.

On the unmasked pair (one run each, 8 cores, the same mode on both builds), the gap was 86.29 → 92.34 fps. The code
path is the same there, so that gap is one pair's noise, not this change. It shows that a few % in any single pair can
be noise.

Risks

  • #1664's finding: on the code of 18 Nov, on a 9950X3D held to 4 cores without SMT in Castle Town's market, the
    recorder beside the render thread was the slowest of the three modes, with a third of the frames long. On today's
    code, masked, this PC shows no more frames over 50 or 100 ms. The farm's Market run on real 4-core CPUs is the check.
  • The recorder's known costs (the header): it wakes 20-25 times a frame. Its short sleeps let an i7-9700K's clock
    control slow every core before #1866. A power-saving 4-core laptop is where that could come back.
  • On 4C/8T the recorder shares the game's cores or the render thread's sibling. The reserved core and the game's
    virtual cores follow the render thread, unchanged (no host file changes).
  • One Linux edge case: where /sys's CPU topology can't be read, usable_cores falls back to the logical count, so
    a 2-core, 4-thread PC there now gets both threads (it got the render thread alone).
  • To turn it off: the Threaded rendering row's Off, or RX_VK_RECORDER=0 for the recorder alone. A revert is enough.
    Nothing changes in saves, longshot_options.ini or the caches (no shader-cache stamp file touched).

Follow-ups, older than this change, not in it:

  • vk_recorder.h:8 says unset RX_VK_RECORDER is off. The row decides.
  • threads.md:44 calls the hand-off by part unmeasured.
  • vk_menu.cpp's comment lists GCN among unmirrored GPUs, but an RX 580 has mirrors.
  • steam-deck-playbook.md:107 puts "measured the same or worse" under Auto, but Auto is Off on a stock Deck. It should
    say On.

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 check under tests/ that reads changed source is updated, not weakened.
  • 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.

🤖 Generated with Claude Code

## Summary On a PC whose CPU has 4 or 5 physical cores, Threaded rendering's Auto runs the render thread alone today, so that one thread makes every one of the driver's calls itself. This PR makes Auto run the recorder thread beside it from 4 cores, as it already does from 6. **WIP until the Test Farm and players have run it on real 4-core PCs:** the numbers below come from one 8-core PC held to 4 cores by an affinity mask. They are a diagnostic, not the claim. **Who changes and who doesn't.** Only PCs where all of these hold change: - 4 or 5 physical cores for the game, with or without SMT (4C/4T, 4C/8T, 5C); - a discrete GPU of any maker (its buffer pools have mirrors; `device_policy.h` `p.mirrors = f.discrete()`); - the Threaded rendering row on Auto (the default). Nothing changes on: - **the Steam Deck and every PC that runs the game on an integrated GPU.** There the pools have no mirrors, and the menu's `threaded_choice` turns Auto off for that reason, on main and here alike. The start line says `vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)` on both builds; - **2- and 3-core PCs:** Auto is off on both builds; - **6 cores and more:** both threads on both builds, as before. The rule (`gpu/vk/threaded_rendering.h`, from #1664): `kAutoCores` = 4 gives both threads from 4 cores and off below. The "render thread alone" tier is gone (`Why::AutoRenderThread`, its `describe` case, its half of `auto_picked`). The header keeps the 18 Nov table as the record and puts the 22 Nov masked numbers beside it, labelled as masks of an 8-core CPU. Neighbours: #1407 (riqmarmes, WIP) asks the same header's question for low-core CPUs, for the mode's own threshold, before #1664's tiers. #1763 and #1866 rewrote the threads and the recorder after #1664's table was measured. That is why the 4-core tier is being looked at again. Read first: `gpu/vk/threaded_rendering.h` (`auto_picks`), then `tests/test_threaded_rendering.py`. Other files: the words that named the tiers (`gpu/vk/menu/threads.cpp`, `vk_menu.h`, `vk_menu.cpp`, `device_policy.h`, `vk_replay.cpp`, `vk_recorder.h`, `switches.def`, `docs/dev/reference/threads.md`, `architecture.md`, `switches.md`, `docs/user/graphics-and-controls.md`), and `tests/test_device_policy.py`'s five 4-core PCs. ## Testing **Tested:** Windows 11, Ryzen 7 5700X3D (8 cores, 16 threads), RX 9070 XT, AMD 26.11.2. - **In the game:** Hyrule Field turning, 3 alternating pairs held to 4 cores by the process's affinity mask (`0xff`: 4 cores with their SMT siblings), and one pair unmasked. Every masked run logged the line its build should: - main: `Auto: the render thread only (4 cores of 8 logical processors; the recorder thread too from 6 cores)`; - this PR: `Auto: on, the render thread and the recorder thread (4 cores of 8 logical processors)`. Unmasked, both builds log the same line (`Auto: on, the render thread and the recorder thread (8 cores of 16 logical processors)`). The clock read 0.999-1.001 in every run. There were no new error lines in the PR's logs against main's. Every run passed the harness's screen check. - **`tests/test_threaded_rendering.py`**, with g++ and clang++: the rule, the readers and the menu's `threaded_choice` are run whole, in 15 environments, with 39 broken copies, each caught. The menu's cases include: - both threads at 4 and 5 cores, off at 3; - off with no mirrors (the Deck's case); - off with `RX_VK_CAPTURE=0`, `RX_VK_LOW_SPEC`, `RX_VK_DUMP` or `RX_VK_BENCH`. This branch's test fails on main's code. - **`tests/test_device_policy.py`**, with both compilers: it passes after merging main a2dc5385. - **Failures that main has too:** - `tests/test_switch_table.py` fails on `RX_VK_GRASS_DISTANCE`'s order in `switches.def`, a line this PR doesn't touch. - In the full suite, `run_all.py`, run on dd5ffe6a, the branch has no failure that main lacks. - `mise run lint`'s only failure is main's own (shellcheck on `.forgejo/workflows/build-windows.yml`). - The guide-screenshot source review lists `menu/threads.cpp`, `threaded_rendering.h` and `vk_recorder.h` beside the files it already lists on main (main a2dc5385 fails it with 10). Threaded rendering is on the Debug tab, not the pictured Graphics view, and `vk_recorder.h`'s change is a comment. - **`linux_syntax.sh`** (clang 21): ok on `menu/threads.cpp`, `vk_menu.cpp`, `vk_replay.cpp` and `vk_progcache.cpp`. **Still to test:** - PCs with 4 physical cores and a discrete GPU (4C/8T and 4C/4T; Intel and AMD CPUs; NVIDIA and AMD cards; Windows and Linux): main against this PR, both on Auto with no switch, uncapped, in Hyrule Field and the Market. Expected: fps up and p99 down or level, with no more frames over 50 or 100 ms. The start line should read as under Tested (`@Beanstalk`, request below). - A 4-core laptop CPU on a power-saving plan, where the recorder's short sleeps could slow the CPU's clock (an i7-9700K's did before #1866): the same comparison (`@Beanstalk` if the farm has one, else by hand). - Steam Deck: nothing to compare. This PR changes nothing there, and Auto against Auto runs the same mode on both builds. A separate, data-only question for Deck players (forced recorder thread against Auto, both on this PR's build) is in a comment below. It informs a possible later Deck change and is not this PR's claim (by hand). ## Measurements **Verdict:** on this PC held to 4 cores with SMT (`--affinity 0xff`), +21.0 % fps in Hyrule Field, p99 4.3 ms lower. **This is a mask of an 8-core CPU** (its 96 MB cache is kept, and the driver's and Windows' threads run on the other 4 cores), **a diagnostic, not the claim**: real 4-core CPUs are for the farm. Unmasked (8 cores), both builds run the same mode. Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2. Hyrule Field turning. `HOS_FPS_MAX=240` with the options file's `frame_rate_cap=0`, `vsync=0`, `frame_generation=0`, a fixed light GPU load beside the game, and `RX_VK_ASYNC=1` in both arms. Three alternating pairs, no warm-ups, no run rejected, medians. The PR's side is a pack built from 43280cfa; every later gpu/ change on the branch is a comment. Both sides used the same exe. These were measured on main dd5ffe6a, and the PR is now on main a2dc5385. Main's 7 commits since then don't touch the Threaded rendering rule, the recorder or the replay's submit. #2174 changes Hyrule Field's simulated turf on the way in, so the absolute numbers may move. Not re-measured here: the farm runs the head. | `--affinity 0xff` (4 cores, 8 logical; a mask of an 8-core CPU) | Before: main @ dd5ffe6a | After: this PR @ 43280cfa | |---|---|---| | Auto's pick (start line) | the render thread alone | the render thread and the recorder thread | | fps, median (runs) | 64.69 (64.69, 63.79, 64.94) | 78.29 (78.54, 78.29, 77.04) | | CPU ms | 51.5 | 50.0 | | p99 frame time, ms | 23.04 | 18.74 | | worst frame, ms | 61.1 | 59.2 | | frames over 50 / 100 / 250 ms, per run | 1/0/0, 1/0/0, 1/0/0 | 1/0/0, 1/0/0, 0/0/0 | | clock | 1.001, 1.001, 0.999 | 1.000, 1.000, 1.001 | | the replay's submit, ms a frame (draw) | 12.68-13.00 (8.1-8.5) | 9.79-10.00 (6.5-6.7) | | the render thread's jobs, ms a frame | 13.17-13.35 | 10.20-10.33 | | the main thread's GPU waits, ms in 5 s | 1173-1303 (about 3.7 ms a frame) | 298-509 (about 1 ms a frame) | The GPU clock was 3001 MHz on main's side and 3208 MHz on this PR's. The game is CPU-bound here, and AMD's clock rises with GPU work. On the unmasked pair (one run each, 8 cores, the same mode on both builds), the gap was 86.29 → 92.34 fps. The code path is the same there, so that gap is one pair's noise, not this change. It shows that a few % in any single pair can be noise. ## Risks - **#1664's finding:** on the code of 18 Nov, on a 9950X3D held to 4 cores without SMT in Castle Town's market, the recorder beside the render thread was the slowest of the three modes, with a third of the frames long. On today's code, masked, this PC shows no more frames over 50 or 100 ms. The farm's Market run on real 4-core CPUs is the check. - **The recorder's known costs** (the header): it wakes 20-25 times a frame. Its short sleeps let an i7-9700K's clock control slow every core before #1866. A power-saving 4-core laptop is where that could come back. - **On 4C/8T** the recorder shares the game's cores or the render thread's sibling. The reserved core and the game's virtual cores follow the render thread, unchanged (no host file changes). - **One Linux edge case:** where `/sys`'s CPU topology can't be read, `usable_cores` falls back to the logical count, so a 2-core, 4-thread PC there now gets both threads (it got the render thread alone). - **To turn it off:** the Threaded rendering row's Off, or `RX_VK_RECORDER=0` for the recorder alone. A revert is enough. Nothing changes in saves, `longshot_options.ini` or the caches (no shader-cache stamp file touched). Follow-ups, older than this change, not in it: - `vk_recorder.h:8` says unset `RX_VK_RECORDER` is off. The row decides. - `threads.md:44` calls the hand-off by part unmeasured. - `vk_menu.cpp`'s comment lists GCN among unmirrored GPUs, but an RX 580 has mirrors. - `steam-deck-playbook.md:107` puts "measured the same or worse" under Auto, but Auto is Off on a stock Deck. It should say On. ## 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 check under `tests/` that reads changed source is updated, not weakened. - [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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Auto's tiers were three (#1664, measured 18 Nov on a 9950X3D with SMT off): both threads from 6 cores, the render
thread alone on 4 or 5, off below. That was before #1763 rewrote the threads and #1866 had the recorder take whole
parts and sleep. On today's code, held to 4 cores of an 8-core Ryzen 7 5700X3D by its affinity mask, the recorder
thread beside the render thread was the faster with and without the cores' SMT siblings, so Auto now gives both
threads from 4 cores (threaded::kAutoCores) and the render thread's tier is gone (Why::AutoRenderThread, its line,
auto_picked's half). On, Off, the gate, the unsafe cases and 6 cores and more are unchanged. RX_VK_RECORDER=0 keeps
the recorder off over Auto.

The header keeps 18 Nov's table as its record, with the 22 Nov numbers beside it (masks of an 8-core CPU, not
4-core CPUs). The row's help, the settings page, the switch table, switches.def and the reference pages say the one
tier. tests/test_threaded_rendering.py: both threads at 4 and 5 cores (the Deck's masks too), a row with its halves
apart for the readers, and broken copies that break the new rule (the recorder left off at 4 and 5 or on below 4,
the tier from 3, 6 or 12, the old words back); tests/test_device_policy.py: the 4-core PCs get both flags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- tests/test_threaded_rendering.py: the broken copy "the recorder thread on below 4 cores" sets the recorder's bit
  alone (both bits is its own copy now); the capture's test is held to its text, with a broken copy that inverts it.
- device_policy.h: the threaded_auto_* flags are the rule's pick by cores alone; the menu still turns Auto off where
  the mode is not safe, which they do not say.
- The settings page's row says "or where it is not safe"; threads.md shows the start's line Auto gives now; the header
  says #1866's recorder sleeps after a short spin; vk_replay.cpp's hook comment says the halves are alike today.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- tests/test_threaded_rendering.py: the capture's switch must be read (getenv("RX_VK_CAPTURE")), with a broken copy that
  reads nothing.
- threaded_rendering.h: the 22 Nov runs had the frame rate held only by HOS_FPS_MAX=240 and the standard test's light GPU
  load beside the game; #1866's recorder waits on its ring after a 10 us spin where it spun 20-200 us.
- The settings paragraph, threads.md's "Who records" and architecture.md's threads line say Auto's threads come only
  where its mode is safe (an integrated GPU's pools have no mirrors: Auto stays off there); threads.md's start line
  has no counts on an unsafe run.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The checker's broken copies showed that dropping the RX_VK_LOW_SPEC, RX_VK_DUMP or RX_VK_BENCH condition (its string
kept), or the capture's, passed every check: the source checks look for the text and the compiled fixtures take
"unsafe" as an input. threaded_choice is now cut from vk_menu.cpp whole and run on stand-ins (the row, the cores, the
pools' mirrors) in 15 environments: both threads at 4 and 5 cores, off under 4, off with the capture off,
RX_VK_LOW_SPEC, RX_VK_DUMP, RX_VK_BENCH or no mirrors (asked only where Auto picked the threads), On unchecked, and the
start's line for each. Seven broken copies of those gates must fail. Test only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge origin/main (a2dc5385) into perf/auto-recorder-4-cores
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 12s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by klimovich008 (reviewed)
beanstalk/dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k 0/1 pass, 0 running, 2 queued
beanstalk/dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200 0/1 pass, 0 running, 2 queued
CI / Website build and checks (pull_request) Failing after 54s
PR description / Description follows the template (pull_request_target) Successful in 5s
f5544516b2
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, Ryzen 7 5700X3D (8C/16T), RX 9070 XT, AMD 26.11.2: Hyrule Field turning, uncapped (HOS_FPS_MAX=240), 3 alternating pairs held to 4 cores by the affinity mask 0xff (a mask of an 8-core CPU: a diagnostic, not the claim) and one unmasked pair. Each run's 'vk: Threaded rendering:' start line was the one its build should log (main: the render thread only; this PR: the render thread and the recorder thread; unmasked: both threads on both). Game clock 0.999-1.001, no new error lines against main, the picture shown in every run. Not run on a real 4-core CPU, on NVIDIA or Intel, on Linux in the game, or on a Steam Deck (where this PR changes nothing).

Tested in game: Windows 11, Ryzen 7 5700X3D (8C/16T), RX 9070 XT, AMD 26.11.2: Hyrule Field turning, uncapped (HOS_FPS_MAX=240), 3 alternating pairs held to 4 cores by the affinity mask 0xff (a mask of an 8-core CPU: a diagnostic, not the claim) and one unmasked pair. Each run's 'vk: Threaded rendering:' start line was the one its build should log (main: the render thread only; this PR: the render thread and the recorder thread; unmasked: both threads on both). Game clock 0.999-1.001, no new error lines against main, the picture shown in every run. Not run on a real 4-core CPU, on NVIDIA or Intel, on Linux in the game, or on a Steam Deck (where this PR changes nothing).
Author
Member

@Beanstalk main against this PR, both on Threaded rendering Auto, no switch on either side: this PR changes what Auto picks on CPUs with 4 or 5 physical cores and a discrete GPU, so only those PCs can show a difference.

Targets: PCs with a discrete GPU (the dgpu tag) and a CPU of 4 physical cores or fewer, by model. With SMT (4C/8T): i7-6700K, i7-7700K, i7-6700, i7-7700, i3-10100, i3-12100, i3-13100, Ryzen 3 3300X. Without SMT (4C/4T): i5-6500, i5-6600K, i5-7400, i5-7500, i5-7600K, Ryzen 3 1200, 1300X, 3100. An NVIDIA and an AMD card if the testers have them, Windows and Linux both. 2- and 3-core PCs log the same "Auto: off" line on both builds, and 6-core and bigger PCs run both threads on both builds: those compare the same mode. No Steam Deck target here (Auto is off there on both builds: no mirrors).

Settings, both sides: frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0. Headless is fine (the change is in the replay, not the present path); no window scenario.

Scenario: Hyrule Field (HyruleField_Child) measured 30 s, then the Market (Market_Child) measured 30 s in the same start; 3 game starts a side (2 at least). Rules, PR vs main: fps_mean.min_delta_pct = 5 and frametime_p99_ms.max_delta_pct = 10 on each segment, crash = false. Hitch counts (run_hitch_count, run_frametime_max_ms) report-only.

Log check on the PR side: "vk: Threaded rendering: Auto: on, the render thread and the recorder thread (4 cores" expected, and main's "Auto: the render thread only (4 cores" shown, so we can see the tester's PC was in the tier that changes.

@Beanstalk main against this PR, both on Threaded rendering Auto, no switch on either side: this PR changes what Auto picks on CPUs with 4 or 5 physical cores and a discrete GPU, so only those PCs can show a difference. Targets: PCs with a discrete GPU (the dgpu tag) and a CPU of 4 physical cores or fewer, by model. With SMT (4C/8T): i7-6700K, i7-7700K, i7-6700, i7-7700, i3-10100, i3-12100, i3-13100, Ryzen 3 3300X. Without SMT (4C/4T): i5-6500, i5-6600K, i5-7400, i5-7500, i5-7600K, Ryzen 3 1200, 1300X, 3100. An NVIDIA and an AMD card if the testers have them, Windows and Linux both. 2- and 3-core PCs log the same "Auto: off" line on both builds, and 6-core and bigger PCs run both threads on both builds: those compare the same mode. No Steam Deck target here (Auto is off there on both builds: no mirrors). Settings, both sides: frame_rate_cap = 6 (Uncapped), vsync = 2 (Off), frame_generation = 0. Headless is fine (the change is in the replay, not the present path); no window scenario. Scenario: Hyrule Field (HyruleField_Child) measured 30 s, then the Market (Market_Child) measured 30 s in the same start; 3 game starts a side (2 at least). Rules, PR vs main: fps_mean.min_delta_pct = 5 and frametime_p99_ms.max_delta_pct = 10 on each segment, crash = false. Hitch counts (run_hitch_count, run_frametime_max_ms) report-only. Log check on the PR side: "vk: Threaded rendering: Auto: on, the render thread and the recorder thread (4 cores" expected, and main's "Auto: the render thread only (4 cores" shown, so we can see the tester's PC was in the tier that changes.
Member

Beanstalk test farm · 🔄 testing (0 of 2 reports so far)

Commit f554451 · approved by klimovich008 (reviewed) · dashboard

⚠️ Note: The model groups permit either operating system and GPU maker, but do not guarantee coverage of both; none of the listed CPUs appears in the current online inventory.
⚠️ Note: Threaded rendering uses its default Auto value because it is not an exposed plan setting; the main-side Auto line is available in its log but cannot be separately enforced by a PR-only expected-log rule.
⚠️ Note: The farm cannot select a power-saving plan or target an unspecified four-core laptop.

Started.

⚠ No tester has a PC for dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200 (none seen in 14 days): it waits until one signs in.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k (CPU "3300x" or "i3 10100" or "i3 12100" or "i3 13100" or "i7 6700" or "i7 6700k" or "i7 7700" or "i7 7700k") ⏳ queued 0 of 1 — — —
dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200 (CPU "1300x" or "3100" or "i5 6500" or "i5 6600k" or "i5 7400" or "i5 7500" or "i5 7600k" or "ryzen 3 1200") ⏳ queued 0 of 1 — — —
What was tested

What will be tested · AI plan (gpt-6.1-terra)

Compare main and the PR on discrete-GPU PCs with the requested four-core CPU models, using Threaded rendering Auto with no switches. Three starts per build measure 30 seconds each in Hyrule Field and the Market, taking roughly 32 minutes per tester; no matching CPU is currently online, so the targets will wait. The PR fails on a crash, a missing expected Auto-mode log line, a 5% FPS loss, a 10% p99 frame-time increase, or a substantial screenshot difference. Whole-run hitch counts and maximum frame times are reported without limits. No tester online now matches dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k, dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200: those targets wait for one.

  • Where: dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k (CPU "3300x" or "i3 10100" or "i3 12100" or "i3 13100" or "i7 6700" or "i7 6700k" or "i7 7700" or "i7 7700k", 1-2 reports), dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200 (CPU "1300x" or "3100" or "i5 6500" or "i5 6600k" or "i5 7400" or "i5 7500" or "i5 7600k" or "ryzen 3 1200", 1-2 reports).
  • field-market: from the repository's save castle-gate (settings vsync=2, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, measure field for 30 s (after 10 s warm-up), take the picture field to compare with main, teleport to Market, measure market for 30 s (after 10 s warm-up), take the picture market to compare with main; 3 runs on each side.
  • Measured: crashes, frame times, stutters and hitches, draws and frame rate, the game's log.
  • The PR fails if: it crashes; or frame rate is more than 5% below main; or a picture differs from main by more than 10%; or frame time (p99) is more than 10% above main; or expected log lines missing is above 0.
  • Time: about 38 min of game runs per tester (6 game starts), plus the two builds.
<!-- beanstalk:sticky --> ### Beanstalk test farm · 🔄 testing (0 of 2 reports so far) Commit `f554451` · approved by klimovich008 (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2232) ⚠️ **Note:** The model groups permit either operating system and GPU maker, but do not guarantee coverage of both; none of the listed CPUs appears in the current online inventory. ⚠️ **Note:** Threaded rendering uses its default Auto value because it is not an exposed plan setting; the main-side Auto line is available in its log but cannot be separately enforced by a PR-only expected-log rule. ⚠️ **Note:** The farm cannot select a power-saving plan or target an unspecified four-core laptop. Started. ⚠ No tester has a PC for `dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200` (none seen in 14 days): it waits until one signs in. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k` (CPU "3300x" or "i3 10100" or "i3 12100" or "i3 13100" or "i7 6700" or "i7 6700k" or "i7 7700" or "i7 7700k") | ⏳ queued | 0 of 1 | — | — | — | | `dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200` (CPU "1300x" or "3100" or "i5 6500" or "i5 6600k" or "i5 7400" or "i5 7500" or "i5 7600k" or "ryzen 3 1200") | ⏳ queued | 0 of 1 | — | — | — | <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) Compare main and the PR on discrete-GPU PCs with the requested four-core CPU models, using Threaded rendering Auto with no switches. Three starts per build measure 30 seconds each in Hyrule Field and the Market, taking roughly 32 minutes per tester; no matching CPU is currently online, so the targets will wait. The PR fails on a crash, a missing expected Auto-mode log line, a 5% FPS loss, a 10% p99 frame-time increase, or a substantial screenshot difference. Whole-run hitch counts and maximum frame times are reported without limits. No tester online now matches dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k, dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200: those targets wait for one. - **Where:** dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k (CPU "3300x" or "i3 10100" or "i3 12100" or "i3 13100" or "i7 6700" or "i7 6700k" or "i7 7700" or "i7 7700k", 1-2 reports), dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200 (CPU "1300x" or "3100" or "i5 6500" or "i5 6600k" or "i5 7400" or "i5 7500" or "i5 7600k" or "ryzen 3 1200", 1-2 reports). - **field-market:** from the repository's save `castle-gate` (settings vsync=2, frame_rate_cap=6, frame_generation=0), then teleport to Hyrule Field, measure field for 30 s (after 10 s warm-up), take the picture field to compare with main, teleport to Market, measure market for 30 s (after 10 s warm-up), take the picture market to compare with main; 3 runs on each side. - **Measured:** crashes, frame times, stutters and hitches, draws and frame rate, the game's log. - **The PR fails if:** it crashes; or frame rate is more than 5% below main; or a picture differs from main by more than 10%; or frame time (p99) is more than 10% above main; or expected log lines missing is above 0. - **Time:** about 38 min of game runs per tester (6 game starts), plus the two builds. </details>
Author
Member

Steam Deck: data only, not this PR's claim.

This PR changes nothing on the Deck. The Deck's GPU is integrated, so the buffer pools have no mirrors, and Auto stays off for that reason on main and on this PR alike. The start line reads vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors) on both. A run of main against this PR on Auto would compare the same mode on both sides.

Deck players who'd like to help with a possible later Deck change can answer a separate question. It is about the recorder thread alone, with the render thread left off. Both runs use this PR's build:

  • A: no switch (Auto: off);
  • B: RX_VK_RECORDER=thread as the only line in longshot_env.txt.

Play the same spot uncapped (Frame rate cap Uncapped, V-Sync Off, no frame generation), Hyrule Field and the Market if you can, 2-3 times each, alternating A and B. Please report:

  • the fps;
  • any long frames;
  • anything that looks wrong;
  • from longshot_log.txt, the vk: Threaded rendering: line and the vk: RX_VK_RECORDER=thread line (B only).

Please don't set RX_VK_ASYNC=1 on the Deck for this. The render thread replays a frame behind the game. Without mirrors it would read the game's memory while the game writes the next frame. That is the reason Auto turns it off there.

The result won't decide this PR. It would only show whether a recorder-alone mode is worth a Deck change of its own.

**Steam Deck: data only, not this PR's claim.** This PR changes nothing on the Deck. The Deck's GPU is integrated, so the buffer pools have no mirrors, and Auto stays off for that reason on main and on this PR alike. The start line reads `vk: Threaded rendering: Auto: off (not safe on this run: the buffer pools have no mirrors)` on both. A run of main against this PR on Auto would compare the same mode on both sides. Deck players who'd like to help with a possible later Deck change can answer a separate question. It is about the recorder thread alone, with the render thread left off. Both runs use this PR's build: - **A:** no switch (Auto: off); - **B:** `RX_VK_RECORDER=thread` as the only line in `longshot_env.txt`. Play the same spot uncapped (Frame rate cap Uncapped, V-Sync Off, no frame generation), Hyrule Field and the Market if you can, 2-3 times each, alternating A and B. Please report: - the fps; - any long frames; - anything that looks wrong; - from `longshot_log.txt`, the `vk: Threaded rendering:` line and the `vk: RX_VK_RECORDER=thread` line (B only). **Please don't set `RX_VK_ASYNC=1` on the Deck for this.** The render thread replays a frame behind the game. Without mirrors it would read the game's memory while the game writes the next frame. That is the reason Auto turns it off there. The result won't decide this PR. It would only show whether a recorder-alone mode is worth a Deck change of its own.
Author
Member

Steam Deck: the data we have so far (context for the Deck question above, not this PR's claim).

Nobody has run this PR's build on a Deck yet. The only Deck numbers are omgitsgela's field data from main, posted in #agent-updates on 2026-11-21 and on #402 (#402 (comment)):

  • 105 sessions, 39.5 h of play (LCD and OLED), from the team Grafana;
  • 29.0 fps in play on average, 30.6 fps at the 60 cap, 935 hitches an hour;
  • 73.7 % of those hitches are game_cpu, against 54.1 % on Windows 11 at the same cap;
  • at the 60 cap a Deck frame takes 32.7 ms, of which 15.9 ms is GPU time.

So on the Deck the CPU, not the GPU, is most of the frame. That's why the recorder-thread-alone question above (no switch against RX_VK_RECORDER=thread, both on this PR's build, RX_VK_ASYNC=1 not set) is worth answering. This PR doesn't change the Deck: Auto stays off there because the buffer pools have no mirrors. Deck results for this PR will be posted here when they come in.

**Steam Deck: the data we have so far (context for the Deck question above, not this PR's claim).** Nobody has run this PR's build on a Deck yet. The only Deck numbers are omgitsgela's field data from main, posted in #agent-updates on 2026-11-21 and on #402 (https://git.magicbean.dev/MagicBeanDev/Longshot/issues/402#issuecomment-61961): - 105 sessions, 39.5 h of play (LCD and OLED), from the team Grafana; - 29.0 fps in play on average, 30.6 fps at the 60 cap, 935 hitches an hour; - 73.7 % of those hitches are `game_cpu`, against 54.1 % on Windows 11 at the same cap; - at the 60 cap a Deck frame takes 32.7 ms, of which 15.9 ms is GPU time. So on the Deck the CPU, not the GPU, is most of the frame. That's why the recorder-thread-alone question above (no switch against `RX_VK_RECORDER=thread`, both on this PR's build, `RX_VK_ASYNC=1` not set) is worth answering. This PR doesn't change the Deck: Auto stays off there because the buffer pools have no mirrors. Deck results for this PR will be posted here when they come in.
dazemc left a comment

Read of the head f5544516 (a merge of current main a2dc5385; base a2dc5385). The rule, the count and the off path are consistent, and the test is real. The one thing it cannot settle from code is whether the new default is right on a real 4-core PC — the evidence is a mask of an 8-core CPU — so I stop at the code finding.

1. The decision needs a real 4-core run. The measured After is a Ryzen 7 5700X3D (8 cores/16 threads) held to 4 cores by --affinity 0xff: it keeps the 96 MB cache, and the driver's and Windows' threads run on the other 4 cores. The only real 4-core data in the header is the 18 Nov table (a 9950X3D with SMT off, 4 cores/4 threads): there the render thread and the recorder thread were the worst of the three (60.9 / 62.1 fps, 34.7 / 31.5 % of frames ≥ 16.7 ms, against 67.6 / 67.9 fps render-only). The PR reverses that on the strength of #1763/#1866's rewrite plus the mask, and the masked 4c/4t row (89.2 vs 78.7 fps) is not a 4-core CPU. The riskiest case is therefore 4c/4t, where the recorder's 20-25 wakeups a frame and its short sleeps are the documented cost (the header's own i7-9700K note: Kokiri Forest 15 fps against 48). 4c/8t has the SMT headroom to make the change plausible; 4c/4t is the farm run that decides it. Still to test lists both, which is right; 5-core PCs (which the rule also flips) are not in the list and are rare enough to ignore. Until one real 4c/4t and one 4c/8t run exist, this is a default change with a diagnostic, not a measured claim — and the body says exactly that.

2. What "4 cores" means, and the count. threaded::cores_of (threaded_rendering.h:119-123) counts a physical core once when any of its logical processors is in the process's affinity mask, and usable_cores (vk_progcache.cpp:1321-1340, with the Linux shim) feeds it. So 4c/8t → 4, 4c/4t → 4, 5c → 5, 6c/12t → 6, 2c/4t → 2; an 8c/16t pinned to 0xff → 4 (the masked measurement's case); a launcher pinning a 4c/8t to 4 logical processors that are 2 cores × 2 siblings → 2 → Auto off. That last detail is worth keeping in the row's words: the count follows the affinity mask, not the PC's cores. The test covers the Deck's 4c/8t (one mask per core, both numbering schemes), the one-sibling masks and 0xFF/0x55/0x0F boundaries. One fallback remains: when the core masks cannot be read, usable_cores returns the logical count, so a 2c/4t on such a PC would count 4 and run both threads where the real 2 cores would leave Auto off; that is pre-existing, and rare, but the row/comment could say the fallback counts logical processors.

3. Default and off path. Only 4-5 physical cores with a discrete GPU (mirrors) and the row on Auto change. The Deck and every iGPU PC still turn Auto off (pools_mirrored() false, asked only where Auto picked the threads, vk_menu.cpp:4398-4408); 2-3 cores off; 6+ both, as before; explicit On/Off unchanged; RX_VK_ASYNC/RX_VK_RECORDER still override their halves; kAutoEnabled is the single gate. The RX_VK_RECORDER row's 6 → 4 matches the code, and the RX_VK_ASYNC row already said 4 on main, so the PR resolves a pre-existing mismatch rather than creating one. The device_policy flags (auto_picks(f.cores_usable)) now agree with the rule; they do not include the unsafe gate, which is the menu's, as intended.

4. The measurement is not at this head and not against current main. Before is main @ dd5ffe6a (seven commits before a2dc5385, including #2174, which changes Hyrule Field on the way in — the measured scene), and After is 43280cfa, older than the head; the body says every later gpu/ change is a comment and that the farm runs the head. That is a fair description, and the numbers are labelled a mask, so the only gap is that +21.0 % / p99 23.04 → 18.74 ms are not a current-main comparison. The farm run will produce the head's own numbers.

5. The test is the strongest part: the rule at every core count to 256, the gate and the unsafe gate, On/Off whatever the CPU, cores_of on Deck/Linux/Windows sibling numbering, usable_cores on the affinity masks, the start line for each answer (so the removed render-only tier's words are gone), the menu's threaded_choice compiled and run in the capture/low-spec/dump/bench/no-mirrors environments, and 39 broken copies each caught; it fails on main's code. It cannot measure, and that is the point of 1.

One comment nit: the kAutoCores note (threaded_rendering.h:72-75) says "on 4 cores 67.6 / 67.9 fps with the render thread alone against 65.5 / 65.0 serial, 18 Nov", but 67.6 / 67.9 is the render-only row; the both-threads row on 4 cores on 18 Nov was 60.9 / 62.1 (the table just above). As written a reader can take 67.6 as the old both-threads number; worth rewording to "the render thread alone was 67.6 / 67.9 against 60.9 / 62.1 for both".

No approval (WIP), no claim, and no machine run from me.

**Read of the head `f5544516` (a merge of current main `a2dc5385`; base `a2dc5385`).** The rule, the count and the off path are consistent, and the test is real. The one thing it cannot settle from code is whether the new default is right on a real 4-core PC — the evidence is a mask of an 8-core CPU — so I stop at the code finding. **1. The decision needs a real 4-core run.** The measured After is a Ryzen 7 5700X3D (8 cores/16 threads) held to 4 cores by `--affinity 0xff`: it keeps the 96 MB cache, and the driver's and Windows' threads run on the other 4 cores. The only *real* 4-core data in the header is the 18 Nov table (a 9950X3D with SMT off, 4 cores/4 threads): there the render thread and the recorder thread were the **worst** of the three (60.9 / 62.1 fps, 34.7 / 31.5 % of frames ≥ 16.7 ms, against 67.6 / 67.9 fps render-only). The PR reverses that on the strength of #1763/#1866's rewrite plus the mask, and the masked 4c/4t row (89.2 vs 78.7 fps) is not a 4-core CPU. The riskiest case is therefore **4c/4t**, where the recorder's 20-25 wakeups a frame and its short sleeps are the documented cost (the header's own i7-9700K note: Kokiri Forest 15 fps against 48). 4c/8t has the SMT headroom to make the change plausible; 4c/4t is the farm run that decides it. Still to test lists both, which is right; 5-core PCs (which the rule also flips) are not in the list and are rare enough to ignore. Until one real 4c/4t and one 4c/8t run exist, this is a default change with a diagnostic, not a measured claim — and the body says exactly that. **2. What "4 cores" means, and the count.** `threaded::cores_of` (`threaded_rendering.h:119-123`) counts a physical core once when any of its logical processors is in the process's affinity mask, and `usable_cores` (`vk_progcache.cpp:1321-1340`, with the Linux shim) feeds it. So 4c/8t → 4, 4c/4t → 4, 5c → 5, 6c/12t → 6, 2c/4t → 2; an 8c/16t pinned to `0xff` → 4 (the masked measurement's case); a launcher pinning a 4c/8t to 4 logical processors that are 2 cores × 2 siblings → 2 → Auto off. That last detail is worth keeping in the row's words: the count follows the affinity mask, not the PC's cores. The test covers the Deck's 4c/8t (one mask per core, both numbering schemes), the one-sibling masks and `0xFF`/`0x55`/`0x0F` boundaries. One fallback remains: when the core masks cannot be read, `usable_cores` returns the logical count, so a 2c/4t on such a PC would count 4 and run both threads where the real 2 cores would leave Auto off; that is pre-existing, and rare, but the row/comment could say the fallback counts logical processors. **3. Default and off path.** Only 4-5 physical cores with a discrete GPU (mirrors) and the row on Auto change. The Deck and every iGPU PC still turn Auto off (`pools_mirrored()` false, asked only where Auto picked the threads, `vk_menu.cpp:4398-4408`); 2-3 cores off; 6+ both, as before; explicit On/Off unchanged; `RX_VK_ASYNC`/`RX_VK_RECORDER` still override their halves; `kAutoEnabled` is the single gate. The `RX_VK_RECORDER` row's 6 → 4 matches the code, and the `RX_VK_ASYNC` row already said 4 on main, so the PR resolves a pre-existing mismatch rather than creating one. The `device_policy` flags (`auto_picks(f.cores_usable)`) now agree with the rule; they do not include the unsafe gate, which is the menu's, as intended. **4. The measurement is not at this head and not against current main.** Before is `main @ dd5ffe6a` (seven commits before `a2dc5385`, including #2174, which changes Hyrule Field on the way in — the measured scene), and After is `43280cfa`, older than the head; the body says every later `gpu/` change is a comment and that the farm runs the head. That is a fair description, and the numbers are labelled a mask, so the only gap is that `+21.0 %` / p99 `23.04 → 18.74 ms` are not a current-main comparison. The farm run will produce the head's own numbers. **5. The test** is the strongest part: the rule at every core count to 256, the gate and the unsafe gate, `On`/`Off` whatever the CPU, `cores_of` on Deck/Linux/Windows sibling numbering, `usable_cores` on the affinity masks, the start line for each answer (so the removed render-only tier's words are gone), the menu's `threaded_choice` compiled and run in the capture/low-spec/dump/bench/no-mirrors environments, and 39 broken copies each caught; it fails on main's code. It cannot measure, and that is the point of 1. **One comment nit:** the `kAutoCores` note (`threaded_rendering.h:72-75`) says "on 4 cores 67.6 / 67.9 fps with the render thread alone against 65.5 / 65.0 serial, 18 Nov", but 67.6 / 67.9 is the *render-only* row; the both-threads row on 4 cores on 18 Nov was 60.9 / 62.1 (the table just above). As written a reader can take 67.6 as the old both-threads number; worth rewording to "the render thread alone was 67.6 / 67.9 against 60.9 / 62.1 for both". No approval (WIP), no claim, and no machine run from me.
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 12s
Third-party parts / As their notes say (pull_request) Successful in 13s
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval approved by klimovich008 (reviewed)
beanstalk/dgpu+cpu-3300x_i3-10100_i3-12100_i3-13100_i7-6700_i7-6700k_i7-7700_i7-7700k 0/1 pass, 0 running, 2 queued
beanstalk/dgpu+cpu-1300x_3100_i5-6500_i5-6600k_i5-7400_i5-7500_i5-7600k_ryzen-3-1200 0/1 pass, 0 running, 2 queued
CI / Website build and checks (pull_request) Failing after 54s
PR description / Description follows the template (pull_request_target) Successful in 5s
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/auto-recorder-4-cores:klimovich008-perf/auto-recorder-4-cores'
git switch 'klimovich008-perf/auto-recorder-4-cores'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 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!2232
No description provided.