WIP: perf(vk): late readbacks on by default on the Steam Deck and handhelds #1725

Closed
HumanBean wants to merge 1 commit from HumanBean/Longshot:perf/readback-late-handhelds into main
Owner

Type: perf · Risk: low · Tested on: CachyOS Linux, RTX 3090 (unchanged there) · Needs: Steam Deck (the gain and the white-flash count), Intel and AMD integrated GPUs (whether they should get it too)

TL;DR

On a Steam Deck the game's reads of GPU results each waited for the GPU to finish the work that writes them, 2.4 to 4.9 ms a wait. #238 added a rule that reads the newest of them a frame late without waiting, as the console does when its GPU runs behind (24.3 → 30.1 fps on a Deck OLED), but left it off. This turns that rule on by default on the Steam Deck and the handhelds Steam runs as one. Desktop GPUs are unchanged: on an RTX 3090 those waits are 0.04-0.2 ms and the rule changed nothing measurable.

Breakdown

  • Who it helps: Steam Deck players (and handhelds in Steam's SteamDeck mode): about +20% by #238's measurements.
  • What was wrong: the rule that gives the Deck that gain was opt-in (RX_VK_READBACK_LATE=newest in longshot_env.txt), so players only had it if they found the playbook.
  • What changes: with the switch unset, a handheld (DeviceFacts::handheld(): the Deck's own APU, or an integrated GPU with SteamDeck=1) gets newest; every other PC gets no rule, as before.
  • What does not change: desktop GPUs; the switch itself (set, it replaces the default; 0 is no rule).
  • How it was checked: on an RTX 3090 (Linux) the policy line says readback_late_newest=0 and no rule is logged; a 2-round A/B of the rule forced on there gave mixed ±4-7% by area, within the PC's noise. The Deck's numbers are #238's.
  • What is still open: a Test Farm run on a Steam Deck (fps and the frame log's flash count: a late read is what the white flashes of the exposure meter were), and whether integrated GPUs that are not handhelds should get it.
  • Risk: low: one rule already measured on the Deck, on one class of device; RX_VK_READBACK_LATE=0 turns it off.

Why

The game reads some GPU results back each frame (nvnMemoryPoolInvalidateMappedRange), and a job thread waits for their write-back while the game's other threads poll. On the Deck that wait is milliseconds; #238 measured it and the rule that removes most of it, and the Steam Deck playbook tells players to set it. A default that is right for the device beats a line in a playbook.

What changed

  • policy: readback_late_newest in gpu/vk/device_policy.h, f.handheld(), in the policy's log line; the device policy test's field lists (tests/test_device_policy.py: the Steam Deck fixture has it on).
  • readbacks: readback_late_wanted in gpu/vk/vk_replay.cpp takes the device's default when RX_VK_READBACK_LATE is unset, and logs where its rule came from.
  • docs: gpu/vk/readback_late.h, gpu/vk/switches.def's row, docs/development.md, docs/steam-deck-playbook.md (the line is no longer needed there).

Measurements

Verdict: No change on an RTX 3090 (the rule stays off; forced on, within noise). The Deck's gain is #238's; the Test Farm's Deck run will confirm it on this build.

Hardware: CachyOS Linux (kernel 7.3.3), RTX 3090 24 GB, NVIDIA 620.70.06, Ryzen 9 7900X, 32 GB
Scene: Kokiri Forest, Hyrule Field (teleport), Castle Town Market (teleport): each 15 s standing, 5 s walking, 20 s walking with the camera turning; 2560x1440 DLSS Quality, Reflex on, uncapped; a private headless sway
Method: the rule forced on (RX_VK_READBACK_LATE=newest) against none on one game folder (main 09cbdd97 with #1702's commits), a warm-up and 2 interleaved sessions each on the timing queue, RX_VK_LOG_READBACK_RANGES=1 on both; fps from the vk: <n> presents, <fps> fps lines
How to reproduce: RX_VK_READBACK_LATE=newest against RX_VK_READBACK_LATE=0; the log's vk: readbacks of GPU results: <n> of 3000 waited for their write-back, <ms> ms each lines.

RTX 3090, fps (2 sessions each, mean) no rule newest
Kokiri Forest standing / walking / turning 66.4 / 70.7 / 74.5 70.6 / 74.8 / 75.9
Hyrule Field standing / walking / turning 95.3 / 96.4 / 95.9 98.8 / 97.5 / 95.4
the Market standing / walking / turning 79.2 / 75.8 / 91.4 80.3 / 70.7 / 89.9
a readback that waited (log) 0.04-0.20 ms 0.04-0.20 ms

Flags and settings

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
RX_VK_READBACK_LATE Readbacks a rule names read a frame late, without their wait unset: none unset: newest on the Steam Deck and handhelds, none elsewhere the Deck's job threads stop waiting for the GPU helps on the Deck (#238); no effect on an RTX 3090; untested on other integrated GPUs leave unset

Testing

Tested: CachyOS Linux, RTX 3090, NVIDIA 620.70.06: one session of this build over Kokiri Forest, Hyrule Field and the Market: readback_late_newest=0 in the policy line, no rule logged, no device loss; the A/B above. The renderer compiles (scripts/dev_build.py vk).

Not tested: a Steam Deck on this build; integrated GPUs that are not handhelds. mise run test: not run on this PC.

Must be tested:

  • steamdeck: this PR against main in Kokiri Forest, Hyrule Field and the Market, fps and p99, and the frame log (RX_VK_FRAMELOG) for one-frame white or dark pictures, expecting about +20% and no more flashes than main (Test Farm: @Beanstalk)

Risks

What could break: a value the game reads a frame late where it needed this frame's (the exposure meter read late was the white flashes; #238's newest rule was measured on the Deck without them).

Turning it off: RX_VK_READBACK_LATE=0.

Compatibility: Nothing changes: no option, cache or API.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named). Not run on this PC.
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • A check under tests/ that reads changed source updated in this PR, not weakened (tests/test_device_policy.py's field lists).
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • Docs updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_016o1k1PazAdTJxQQWQBksW2

**Type:** perf · **Risk:** low · **Tested on:** CachyOS Linux, RTX 3090 (unchanged there) · **Needs:** Steam Deck (the gain and the white-flash count), Intel and AMD integrated GPUs (whether they should get it too) ## TL;DR On a Steam Deck the game's reads of GPU results each waited for the GPU to finish the work that writes them, 2.4 to 4.9 ms a wait. [#238](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/238) added a rule that reads the newest of them a frame late without waiting, as the console does when its GPU runs behind (24.3 → 30.1 fps on a Deck OLED), but left it off. This turns that rule on by default on the Steam Deck and the handhelds Steam runs as one. Desktop GPUs are unchanged: on an RTX 3090 those waits are 0.04-0.2 ms and the rule changed nothing measurable. ## Breakdown - **Who it helps:** Steam Deck players (and handhelds in Steam's SteamDeck mode): about +20% by #238's measurements. - **What was wrong:** the rule that gives the Deck that gain was opt-in (`RX_VK_READBACK_LATE=newest` in `longshot_env.txt`), so players only had it if they found the playbook. - **What changes:** with the switch unset, a handheld (`DeviceFacts::handheld()`: the Deck's own APU, or an integrated GPU with `SteamDeck=1`) gets `newest`; every other PC gets no rule, as before. - **What does not change:** desktop GPUs; the switch itself (set, it replaces the default; `0` is no rule). - **How it was checked:** on an RTX 3090 (Linux) the policy line says `readback_late_newest=0` and no rule is logged; a 2-round A/B of the rule forced on there gave mixed ±4-7% by area, within the PC's noise. The Deck's numbers are #238's. - **What is still open:** a Test Farm run on a Steam Deck (fps and the frame log's flash count: a late read is what the white flashes of the exposure meter were), and whether integrated GPUs that are not handhelds should get it. - **Risk:** low: one rule already measured on the Deck, on one class of device; `RX_VK_READBACK_LATE=0` turns it off. ## Why The game reads some GPU results back each frame (`nvnMemoryPoolInvalidateMappedRange`), and a job thread waits for their write-back while the game's other threads poll. On the Deck that wait is milliseconds; #238 measured it and the rule that removes most of it, and the Steam Deck playbook tells players to set it. A default that is right for the device beats a line in a playbook. ## What changed - policy: `readback_late_newest` in `gpu/vk/device_policy.h`, `f.handheld()`, in the policy's log line; the device policy test's field lists (`tests/test_device_policy.py`: the Steam Deck fixture has it on). - readbacks: `readback_late_wanted` in `gpu/vk/vk_replay.cpp` takes the device's default when `RX_VK_READBACK_LATE` is unset, and logs where its rule came from. - docs: `gpu/vk/readback_late.h`, `gpu/vk/switches.def`'s row, `docs/development.md`, `docs/steam-deck-playbook.md` (the line is no longer needed there). ## Measurements **Verdict:** No change on an RTX 3090 (the rule stays off; forced on, within noise). The Deck's gain is #238's; the Test Farm's Deck run will confirm it on this build. Hardware: CachyOS Linux (kernel 7.3.3), RTX 3090 24 GB, NVIDIA 620.70.06, Ryzen 9 7900X, 32 GB Scene: Kokiri Forest, Hyrule Field (teleport), Castle Town Market (teleport): each 15 s standing, 5 s walking, 20 s walking with the camera turning; 2560x1440 DLSS Quality, Reflex on, uncapped; a private headless sway Method: the rule forced on (`RX_VK_READBACK_LATE=newest`) against none on one game folder (main 09cbdd97 with [#1702](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1702)'s commits), a warm-up and 2 interleaved sessions each on the timing queue, `RX_VK_LOG_READBACK_RANGES=1` on both; fps from the `vk: <n> presents, <fps> fps` lines How to reproduce: `RX_VK_READBACK_LATE=newest` against `RX_VK_READBACK_LATE=0`; the log's `vk: readbacks of GPU results: <n> of 3000 waited for their write-back, <ms> ms each` lines. | RTX 3090, fps (2 sessions each, mean) | no rule | `newest` | |---|---|---| | Kokiri Forest standing / walking / turning | 66.4 / 70.7 / 74.5 | 70.6 / 74.8 / 75.9 | | Hyrule Field standing / walking / turning | 95.3 / 96.4 / 95.9 | 98.8 / 97.5 / 95.4 | | the Market standing / walking / turning | 79.2 / 75.8 / 91.4 | 80.3 / 70.7 / 89.9 | | a readback that waited (log) | 0.04-0.20 ms | 0.04-0.20 ms | ### Flags and settings | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `RX_VK_READBACK_LATE` | Readbacks a rule names read a frame late, without their wait | unset: none | unset: `newest` on the Steam Deck and handhelds, none elsewhere | the Deck's job threads stop waiting for the GPU | helps on the Deck (#238); no effect on an RTX 3090; untested on other integrated GPUs | leave unset | ## Testing **Tested:** CachyOS Linux, RTX 3090, NVIDIA 620.70.06: one session of this build over Kokiri Forest, Hyrule Field and the Market: `readback_late_newest=0` in the policy line, no rule logged, no device loss; the A/B above. The renderer compiles (`scripts/dev_build.py vk`). **Not tested:** a Steam Deck on this build; integrated GPUs that are not handhelds. `mise run test`: not run on this PC. **Must be tested:** - steamdeck: this PR against main in Kokiri Forest, Hyrule Field and the Market, fps and p99, and the frame log (`RX_VK_FRAMELOG`) for one-frame white or dark pictures, expecting about +20% and no more flashes than main (Test Farm: @Beanstalk) ## Risks **What could break:** a value the game reads a frame late where it needed this frame's (the exposure meter read late was the white flashes; #238's `newest` rule was measured on the Deck without them). **Turning it off:** `RX_VK_READBACK_LATE=0`. **Compatibility:** Nothing changes: no option, cache or API. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [ ] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). Not run on this PC. - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened (`tests/test_device_policy.py`'s field lists). - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] Docs updated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016o1k1PazAdTJxQQWQBksW2
perf(vk): late readbacks (RX_VK_READBACK_LATE=newest) on by default on the Steam Deck and handhelds
Some checks failed
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/steamdeck 1/1 fail
beanstalk/windows+intel 0/1 pass, 0 running, 0 queued
beanstalk/linux+intel 0/1 pass, 0 running, 0 queued
beanstalk/amd+igpu 1/1 fail
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
PR description / Description follows the template (pull_request_target) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped
fec53338d1
A CPU read of GPU results whose writer is the newest submission handed
out is read without its wait on the Steam Deck and the handhelds Steam
runs as one (device_policy.h readback_late_newest, f.handheld()): #238
measured 24.3 -> 30.1 fps on a Steam Deck OLED's heavy view and 21.9 ->
26.4 in the main outdoor area. Elsewhere nothing changes: on an RTX 3090
(Linux) the waits are 0.04-0.2 ms and the rule changed nothing measurable.
RX_VK_READBACK_LATE, set, replaces the default (0: none).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1PazAdTJxQQWQBksW2
Author
Owner

Tested in game: RTX 3090, NVIDIA 620.70.06, CachyOS Linux (headless sway), 2560x1440 DLSS Quality: one session of this build over Kokiri Forest, Hyrule Field and the Market: readback_late_newest=0 in the policy line (unchanged on a desktop GPU), no rule logged, no device loss; and a 2-round A/B of the rule forced on there, within noise. The Steam Deck, where it turns on, is for the Test Farm

Tested in game: RTX 3090, NVIDIA 620.70.06, CachyOS Linux (headless sway), 2560x1440 DLSS Quality: one session of this build over Kokiri Forest, Hyrule Field and the Market: readback_late_newest=0 in the policy line (unchanged on a desktop GPU), no rule logged, no device loss; and a 2-round A/B of the rule forced on there, within noise. The Steam Deck, where it turns on, is for the Test Farm
Author
Owner

@Beanstalk compare this PR with main on steamdeck (where the PR turns the rule on), and on windows+intel, linux+intel and an AMD integrated GPU with RX_VK_READBACK_LATE=newest forced against RX_VK_READBACK_LATE=0 (whether integrated GPUs other than handhelds should get it): Kokiri Forest, Hyrule Field and the Market, standing and walking with the camera turning, the frame rate uncapped; fps, p99 frame time, the pictures against main, and the frame log (RX_VK_FRAMELOG) for one-frame white or dark pictures

@Beanstalk compare this PR with main on steamdeck (where the PR turns the rule on), and on windows+intel, linux+intel and an AMD integrated GPU with `RX_VK_READBACK_LATE=newest` forced against `RX_VK_READBACK_LATE=0` (whether integrated GPUs other than handhelds should get it): Kokiri Forest, Hyrule Field and the Market, standing and walking with the camera turning, the frame rate uncapped; fps, p99 frame time, the pictures against main, and the frame log (`RX_VK_FRAMELOG`) for one-frame white or dark pictures
Member

Beanstalk test farm

Commit fec5333 · tier reviewed · approved by HumanBean · dashboard

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

The plan compares the PR with main on Steam Deck, Windows Intel, Linux Intel and an AMD integrated GPU; the Intel targets will wait for matching testers. It exercises standing and walking with camera movement in Kokiri Forest, Hyrule Field and the Market at an uncapped frame rate, measuring FPS and p99 frame time and comparing sampled pictures. It also compares forced newest and disabled readback rules on the PR; crashes, significant performance regressions or picture differences fail the plan. The requested frame log is unavailable to plans, so sampled pictures cannot reliably detect one-frame flashes. Each target takes roughly 35 minutes. No tester online now matches windows+intel, linux+intel: those targets wait for one.

  • Where: steamdeck (1-2 reports), windows+intel (1-2 reports), linux+intel (1-2 reports), amd+igpu (1-2 reports).
  • Matrix: 2 cells, each on main and the PR: RX_VK_READBACK_LATE 0 or newest.
  • default-policy: from the repository's save kokiri-start (settings frame_rate_cap=6), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest-standing for 15 s (after 5 s warm-up), move the stick, take the picture forest-turned to compare with main, measure forest-turned for 10 s (after 0 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field-standing for 15 s (after 5 s warm-up), take the picture field-turned to compare with main, measure field-turned for 10 s (after 0 s warm-up), teleport to Market, take the picture market to compare with main, measure market-standing for 15 s (after 5 s warm-up), take the picture market-turned to compare with main, measure market-turned for 10 s (after 0 s warm-up); 1 run on each side.
  • forced-rules: from the repository's save kokiri-start (settings frame_rate_cap=6), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest-standing for 15 s (after 5 s warm-up), move the stick, take the picture forest-turned to compare with main, measure forest-turned for 10 s (after 0 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field-standing for 15 s (after 5 s warm-up), take the picture field-turned to compare with main, measure field-turned for 10 s (after 0 s warm-up), teleport to Market, take the picture market to compare with main, measure market-standing for 15 s (after 5 s warm-up), take the picture market-turned to compare with main, measure market-turned for 10 s (after 0 s warm-up); 1 run on each side for each of 2 cells (2 game starts a run).
  • Measured: crashes, frame times, stutters and hitches, draws and frame rate, screenshots against main.
  • The PR fails if: it crashes; or the PR's frame time (p99) with RX_VK_READBACK_LATE=newest is more than 15% above RX_VK_READBACK_LATE=0; or the PR's frame rate with RX_VK_READBACK_LATE=newest is more than 10% below RX_VK_READBACK_LATE=0; or frame rate is more than 10% below main; or a picture differs from main by more than 5%; or frame time (p99) is more than 15% above main.
  • Time: about 39 min of game runs per tester (6 game starts), plus the two builds.

Done (started 2026-11-19 08:43 UTC, last report 2026-11-19 14:58 UTC). Comment @Beanstalk to run it again.

Target Reports Crash Frame p99 (ms) vs main VRAM peak (MB) vs main Result
steamdeck · 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 1/1 1 none 44.8 vs 43.1 (+4%) — fail
windows+intel 0/1 — — — queued
linux+intel 0/1 — — — queued
amd+igpu · 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99; 2: windows+amd+amd-proprietary+igpu AMD Radeon(TM) 880M Graphics, 2.0.416 2/1 1 2 none 47.5 vs 48.4 (−2%) — fail

Run by hand on PCs that don't match their target (not counted toward it):

Target Ran on Result
linux+intel off target (ran on linux+nvidia+nvidia-proprietary+dgpu NVIDIA GeForce RTX 5070, 620.70.6) fail
Scenario · matrix cell Target Frame p99 (ms) vs main Result
forced-rules · RX_VK_READBACK_LATE=0 steamdeck 58.8 vs 45.6 (+29%) fail
forced-rules · RX_VK_READBACK_LATE=0 windows+intel — —
forced-rules · RX_VK_READBACK_LATE=0 linux+intel — —
forced-rules · RX_VK_READBACK_LATE=0 amd+igpu 63.1 vs 47.8 (+32%) fail
forced-rules · RX_VK_READBACK_LATE=newest steamdeck 48.1 vs 44.9 (+7%) fail
forced-rules · RX_VK_READBACK_LATE=newest windows+intel — —
forced-rules · RX_VK_READBACK_LATE=newest linux+intel — —
forced-rules · RX_VK_READBACK_LATE=newest amd+igpu 53.3 vs 83.9 (−36%) fail

Measurements · steamdeck

Verdict: fail on steamdeck (1/1 report): default-policy screenshot.max_diff; forced-rules screenshot.max_diff; forced-rules field-turned.frametime_p99_ms.max_delta_pct (+28.8%) failed.

Hardware: 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 12 GB RAM
Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ c4e8e2e After: this PR @ fec5333
default-policy · field-turned · frame rate 27.0 26.5 (−2%)
default-policy · forest-turned · frame rate 21.1 21.1 (+0%)
default-policy · market-turned · frame rate 18.7 19.1 (+2%)
default-policy · field-standing · frame rate 21.0 21.9 (+4%)
default-policy · forest-standing · frame rate 22.5 23.0 (+2%)
default-policy · market-standing · frame rate 16.6 17.8 (+7%)
default-policy · field-turned · frame time (p99) (ms) 43.1 44.8 (+4%)
default-policy · forest-turned · frame time (p99) (ms) 57.2 63.6 (+11%)
default-policy · market-turned · frame time (p99) (ms) 85.5 79.8 (−7%)
default-policy · field-standing · frame time (p99) (ms) 55.9 56.0 (+0%)
default-policy · forest-standing · frame time (p99) (ms) 54.8 54.3 (−1%)
default-policy · market-standing · frame time (p99) (ms) 110.3 99.4 (−10%)
forced-rules · RX_VK_READBACK_LATE=0 · field-turned · frame rate 27.0 24.5 (−9%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-turned · frame rate 20.8 21.0 (+1%)
forced-rules · RX_VK_READBACK_LATE=0 · market-turned · frame rate 18.1 18.3 (+1%)
forced-rules · RX_VK_READBACK_LATE=0 · field-standing · frame rate 21.0 20.7 (−1%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-standing · frame rate 22.7 22.7 (+0%)
forced-rules · RX_VK_READBACK_LATE=0 · market-standing · frame rate 16.2 16.9 (+5%)
forced-rules · RX_VK_READBACK_LATE=0 · field-turned · frame time (p99) (ms) 45.6 58.8 (+29%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-turned · frame time (p99) (ms) 55.5 51.9 (−6%)
forced-rules · RX_VK_READBACK_LATE=0 · market-turned · frame time (p99) (ms) 101.4 81.0 (−20%)
forced-rules · RX_VK_READBACK_LATE=0 · field-standing · frame time (p99) (ms) 59.5 63.8 (+7%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-standing · frame time (p99) (ms) 51.6 54.0 (+5%)
forced-rules · RX_VK_READBACK_LATE=0 · market-standing · frame time (p99) (ms) 174.0 107.7 (−38%)
forced-rules · RX_VK_READBACK_LATE=newest · field-turned · frame rate 26.5 26.1 (−2%)
forced-rules · RX_VK_READBACK_LATE=newest · forest-turned · frame rate 21.0 21.0 (+0%)
forced-rules · RX_VK_READBACK_LATE=newest · market-turned · frame rate 18.2 18.9 (+4%)
forced-rules · RX_VK_READBACK_LATE=newest · field-standing · frame rate 22.0 21.9 (−0%)
forced-rules · RX_VK_READBACK_LATE=newest · forest-standing · frame rate 22.5 22.6 (+0%)
forced-rules · RX_VK_READBACK_LATE=newest · market-standing · frame rate 17.8 17.0 (−4%)

(6 more rows on the dashboard)

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame rate) Helps / doesn't help / untested
RX_VK_READBACK_LATE switch 0, newest main's default the PR's default forced-rules, the PR at 0 → at newest: 24.5 → 26.1 (+6%) helps
Markdown for the PR description
## Measurements

**Verdict:** fail on steamdeck (1/1 report): `default-policy screenshot.max_diff`; `forced-rules screenshot.max_diff`; `forced-rules field-turned.frametime_p99_ms.max_delta_pct (+28.8%)` failed.

Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`  
Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 1 report  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ c4e8e2e | After: this PR @ fec5333 |
|---|---|---|
| default-policy · field-turned · frame rate | 27.0 | 26.5 (−2%) |
| default-policy · forest-turned · frame rate | 21.1 | 21.1 (+0%) |
| default-policy · market-turned · frame rate | 18.7 | 19.1 (+2%) |
| default-policy · field-standing · frame rate | 21.0 | 21.9 (+4%) |
| default-policy · forest-standing · frame rate | 22.5 | 23.0 (+2%) |
| default-policy · market-standing · frame rate | 16.6 | 17.8 (+7%) |
| default-policy · field-turned · frame time (p99) (ms) | 43.1 | 44.8 (+4%) |
| default-policy · forest-turned · frame time (p99) (ms) | 57.2 | 63.6 (+11%) |
| default-policy · market-turned · frame time (p99) (ms) | 85.5 | 79.8 (−7%) |
| default-policy · field-standing · frame time (p99) (ms) | 55.9 | 56.0 (+0%) |
| default-policy · forest-standing · frame time (p99) (ms) | 54.8 | 54.3 (−1%) |
| default-policy · market-standing · frame time (p99) (ms) | 110.3 | 99.4 (−10%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame rate | 27.0 | 24.5 (−9%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame rate | 20.8 | 21.0 (+1%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame rate | 18.1 | 18.3 (+1%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame rate | 21.0 | 20.7 (−1%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame rate | 22.7 | 22.7 (+0%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame rate | 16.2 | 16.9 (+5%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame time (p99) (ms) | 45.6 | 58.8 (+29%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame time (p99) (ms) | 55.5 | 51.9 (−6%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame time (p99) (ms) | 101.4 | 81.0 (−20%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame time (p99) (ms) | 59.5 | 63.8 (+7%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame time (p99) (ms) | 51.6 | 54.0 (+5%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame time (p99) (ms) | 174.0 | 107.7 (−38%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · field-turned · frame rate | 26.5 | 26.1 (−2%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · forest-turned · frame rate | 21.0 | 21.0 (+0%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · market-turned · frame rate | 18.2 | 18.9 (+4%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · field-standing · frame rate | 22.0 | 21.9 (−0%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · forest-standing · frame rate | 22.5 | 22.6 (+0%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · market-standing · frame rate | 17.8 | 17.0 (−4%) |

(6 more rows on the dashboard)

### Flags and settings

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_READBACK_LATE` | switch | `0`, `newest` | main's default | the PR's default | forced-rules, the PR at 0 → at newest: 24.5 → 26.1 (+6%) | helps |

Measurements · amd+igpu

Verdict: fail on amd+igpu (2/1 report): default-policy screenshot.max_diff; forced-rules screenshot.max_diff; forced-rules forest-standing.frametime_p99_ms.max_delta_pct (+15.8%) failed.

Hardware: 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 12 GB RAM; 2: windows+amd+amd-proprietary+igpu AMD Radeon(TM) 880M Graphics, 2.0.416 AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAM
Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ c4e8e2e After: this PR @ fec5333
default-policy · field-turned · frame rate 25.1 27.1 (+8%)
default-policy · forest-turned · frame rate 21.1 21.4 (+1%)
default-policy · market-turned · frame rate 18.2 18.9 (+4%)
default-policy · field-standing · frame rate 20.9 21.9 (+5%)
default-policy · forest-standing · frame rate 22.6 22.9 (+1%)
default-policy · market-standing · frame rate 16.2 16.5 (+2%)
default-policy · field-turned · frame time (p99) (ms) 48.4 47.5 (−2%)
default-policy · forest-turned · frame time (p99) (ms) 52.5 53.6 (+2%)
default-policy · market-turned · frame time (p99) (ms) 93.4 103.4 (+11%)
default-policy · field-standing · frame time (p99) (ms) 56.9 57.2 (+1%)
default-policy · forest-standing · frame time (p99) (ms) 55.2 52.6 (−5%)
default-policy · market-standing · frame time (p99) (ms) 117.6 111.8 (−5%)
forced-rules · RX_VK_READBACK_LATE=0 · field-turned · frame rate 25.5 23.8 (−6%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-turned · frame rate 20.8 21.0 (+1%)
forced-rules · RX_VK_READBACK_LATE=0 · market-turned · frame rate 17.0 19.2 (+12%)
forced-rules · RX_VK_READBACK_LATE=0 · field-standing · frame rate 20.8 20.7 (−1%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-standing · frame rate 22.6 22.5 (−0%)
forced-rules · RX_VK_READBACK_LATE=0 · market-standing · frame rate 16.6 17.6 (+6%)
forced-rules · RX_VK_READBACK_LATE=0 · field-turned · frame time (p99) (ms) 47.8 63.1 (+32%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-turned · frame time (p99) (ms) 53.3 60.0 (+12%)
forced-rules · RX_VK_READBACK_LATE=0 · market-turned · frame time (p99) (ms) 110.4 83.8 (−24%)
forced-rules · RX_VK_READBACK_LATE=0 · field-standing · frame time (p99) (ms) 63.6 64.8 (+2%)
forced-rules · RX_VK_READBACK_LATE=0 · forest-standing · frame time (p99) (ms) 52.5 60.8 (+16%)
forced-rules · RX_VK_READBACK_LATE=0 · market-standing · frame time (p99) (ms) 108.1 92.7 (−14%)
forced-rules · RX_VK_READBACK_LATE=newest · forest-turned · frame rate 22.5 21.2 (−6%)
forced-rules · RX_VK_READBACK_LATE=newest · forest-standing · frame rate 21.4 22.9 (+7%)
forced-rules · RX_VK_READBACK_LATE=newest · field-turned · frame rate — 27.5
forced-rules · RX_VK_READBACK_LATE=newest · market-turned · frame rate — 18.5
forced-rules · RX_VK_READBACK_LATE=newest · field-standing · frame rate — 21.9
forced-rules · RX_VK_READBACK_LATE=newest · market-standing · frame rate — 16.2

(6 more rows on the dashboard)

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame rate) Helps / doesn't help / untested
RX_VK_READBACK_LATE switch 0, newest main's default the PR's default forced-rules, the PR at 0 → at newest: 23.8 → 21.2 (−11%) doesn't help
Markdown for the PR description
## Measurements

**Verdict:** fail on amd+igpu (2/1 report): `default-policy screenshot.max_diff`; `forced-rules screenshot.max_diff`; `forced-rules forest-standing.frametime_p99_ms.max_delta_pct (+15.8%)` failed.

Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`; 2: windows+amd+amd-proprietary+igpu `AMD Radeon(TM) 880M Graphics, 2.0.416` `AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAM`  
Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ c4e8e2e | After: this PR @ fec5333 |
|---|---|---|
| default-policy · field-turned · frame rate | 25.1 | 27.1 (+8%) |
| default-policy · forest-turned · frame rate | 21.1 | 21.4 (+1%) |
| default-policy · market-turned · frame rate | 18.2 | 18.9 (+4%) |
| default-policy · field-standing · frame rate | 20.9 | 21.9 (+5%) |
| default-policy · forest-standing · frame rate | 22.6 | 22.9 (+1%) |
| default-policy · market-standing · frame rate | 16.2 | 16.5 (+2%) |
| default-policy · field-turned · frame time (p99) (ms) | 48.4 | 47.5 (−2%) |
| default-policy · forest-turned · frame time (p99) (ms) | 52.5 | 53.6 (+2%) |
| default-policy · market-turned · frame time (p99) (ms) | 93.4 | 103.4 (+11%) |
| default-policy · field-standing · frame time (p99) (ms) | 56.9 | 57.2 (+1%) |
| default-policy · forest-standing · frame time (p99) (ms) | 55.2 | 52.6 (−5%) |
| default-policy · market-standing · frame time (p99) (ms) | 117.6 | 111.8 (−5%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame rate | 25.5 | 23.8 (−6%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame rate | 20.8 | 21.0 (+1%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame rate | 17.0 | 19.2 (+12%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame rate | 20.8 | 20.7 (−1%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame rate | 22.6 | 22.5 (−0%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame rate | 16.6 | 17.6 (+6%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame time (p99) (ms) | 47.8 | 63.1 (+32%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame time (p99) (ms) | 53.3 | 60.0 (+12%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame time (p99) (ms) | 110.4 | 83.8 (−24%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame time (p99) (ms) | 63.6 | 64.8 (+2%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame time (p99) (ms) | 52.5 | 60.8 (+16%) |
| forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame time (p99) (ms) | 108.1 | 92.7 (−14%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · forest-turned · frame rate | 22.5 | 21.2 (−6%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · forest-standing · frame rate | 21.4 | 22.9 (+7%) |
| forced-rules · `RX_VK_READBACK_LATE=newest` · field-turned · frame rate | — | 27.5 |
| forced-rules · `RX_VK_READBACK_LATE=newest` · market-turned · frame rate | — | 18.5 |
| forced-rules · `RX_VK_READBACK_LATE=newest` · field-standing · frame rate | — | 21.9 |
| forced-rules · `RX_VK_READBACK_LATE=newest` · market-standing · frame rate | — | 16.2 |

(6 more rows on the dashboard)

### Flags and settings

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_READBACK_LATE` | switch | `0`, `newest` | main's default | the PR's default | forced-rules, the PR at 0 → at newest: 23.8 → 21.2 (−11%) | doesn't help |
<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `fec5333` · tier **reviewed** · approved by HumanBean · [dashboard](https://beanstalk.magicbean.dev/prs/1725) **What will be tested** · AI plan (`gpt-6.1-terra`) The plan compares the PR with main on Steam Deck, Windows Intel, Linux Intel and an AMD integrated GPU; the Intel targets will wait for matching testers. It exercises standing and walking with camera movement in Kokiri Forest, Hyrule Field and the Market at an uncapped frame rate, measuring FPS and p99 frame time and comparing sampled pictures. It also compares forced newest and disabled readback rules on the PR; crashes, significant performance regressions or picture differences fail the plan. The requested frame log is unavailable to plans, so sampled pictures cannot reliably detect one-frame flashes. Each target takes roughly 35 minutes. No tester online now matches windows+intel, linux+intel: those targets wait for one. - **Where:** steamdeck (1-2 reports), windows+intel (1-2 reports), linux+intel (1-2 reports), amd+igpu (1-2 reports). - **Matrix:** 2 cells, each on main and the PR: RX_VK_READBACK_LATE `0` or `newest`. - **default-policy:** from the repository's save `kokiri-start` (settings frame_rate_cap=6), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest-standing for 15 s (after 5 s warm-up), move the stick, take the picture forest-turned to compare with main, measure forest-turned for 10 s (after 0 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field-standing for 15 s (after 5 s warm-up), take the picture field-turned to compare with main, measure field-turned for 10 s (after 0 s warm-up), teleport to Market, take the picture market to compare with main, measure market-standing for 15 s (after 5 s warm-up), take the picture market-turned to compare with main, measure market-turned for 10 s (after 0 s warm-up); 1 run on each side. - **forced-rules:** from the repository's save `kokiri-start` (settings frame_rate_cap=6), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest-standing for 15 s (after 5 s warm-up), move the stick, take the picture forest-turned to compare with main, measure forest-turned for 10 s (after 0 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field-standing for 15 s (after 5 s warm-up), take the picture field-turned to compare with main, measure field-turned for 10 s (after 0 s warm-up), teleport to Market, take the picture market to compare with main, measure market-standing for 15 s (after 5 s warm-up), take the picture market-turned to compare with main, measure market-turned for 10 s (after 0 s warm-up); 1 run on each side for each of 2 cells (2 game starts a run). - **Measured:** crashes, frame times, stutters and hitches, draws and frame rate, screenshots against main. - **The PR fails if:** it crashes; or the PR's frame time (p99) with RX_VK_READBACK_LATE=newest is more than 15% above RX_VK_READBACK_LATE=0; or the PR's frame rate with RX_VK_READBACK_LATE=newest is more than 10% below RX_VK_READBACK_LATE=0; or frame rate is more than 10% below main; or a picture differs from main by more than 5%; or frame time (p99) is more than 15% above main. - **Time:** about 39 min of game runs per tester (6 game starts), plus the two builds. Done (started 2026-11-19 08:43 UTC, last report 2026-11-19 14:58 UTC). Comment `@Beanstalk` to run it again. | Target | Reports | Crash | Frame p99 (ms) vs main | VRAM peak (MB) vs main | Result | | --- | --- | --- | --- | --- | --- | | steamdeck · 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` | 1/1 [1](https://beanstalk.magicbean.dev/reports/rp_96b6a50ed721a2b8) | none | 44.8 vs 43.1 (+4%) | — | fail | | windows+intel | 0/1 | — | — | — | queued | | linux+intel | 0/1 | — | — | — | queued | | amd+igpu · 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99`; 2: windows+amd+amd-proprietary+igpu `AMD Radeon(TM) 880M Graphics, 2.0.416` | 2/1 [1](https://beanstalk.magicbean.dev/reports/rp_eeadeb2a0abe079b) [2](https://beanstalk.magicbean.dev/reports/rp_962ec51d7be42244) | none | 47.5 vs 48.4 (−2%) | — | fail | Run by hand on PCs that don't match their target (not counted toward it): | Target | Ran on | Result | | --- | --- | --- | | linux+intel | off target (ran on linux+nvidia+nvidia-proprietary+dgpu `NVIDIA GeForce RTX 5070, 620.70.6`) | [fail](https://beanstalk.magicbean.dev/reports/rp_fa69d489698e4331) | | Scenario · matrix cell | Target | Frame p99 (ms) vs main | Result | | --- | --- | --- | --- | | forced-rules · `RX_VK_READBACK_LATE=0` | steamdeck | 58.8 vs 45.6 (+29%) | fail | | forced-rules · `RX_VK_READBACK_LATE=0` | windows+intel | — | — | | forced-rules · `RX_VK_READBACK_LATE=0` | linux+intel | — | — | | forced-rules · `RX_VK_READBACK_LATE=0` | amd+igpu | 63.1 vs 47.8 (+32%) | fail | | forced-rules · `RX_VK_READBACK_LATE=newest` | steamdeck | 48.1 vs 44.9 (+7%) | fail | | forced-rules · `RX_VK_READBACK_LATE=newest` | windows+intel | — | — | | forced-rules · `RX_VK_READBACK_LATE=newest` | linux+intel | — | — | | forced-rules · `RX_VK_READBACK_LATE=newest` | amd+igpu | 53.3 vs 83.9 (−36%) | fail | #### Measurements · steamdeck **Verdict:** fail on steamdeck (1/1 report): `default-policy screenshot.max_diff`; `forced-rules screenshot.max_diff`; `forced-rules field-turned.frametime_p99_ms.max_delta_pct (+28.8%)` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM` Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ c4e8e2e | After: this PR @ fec5333 | |---|---|---| | default-policy · field-turned · frame rate | 27.0 | 26.5 (−2%) | | default-policy · forest-turned · frame rate | 21.1 | 21.1 (+0%) | | default-policy · market-turned · frame rate | 18.7 | 19.1 (+2%) | | default-policy · field-standing · frame rate | 21.0 | 21.9 (+4%) | | default-policy · forest-standing · frame rate | 22.5 | 23.0 (+2%) | | default-policy · market-standing · frame rate | 16.6 | 17.8 (+7%) | | default-policy · field-turned · frame time (p99) (ms) | 43.1 | 44.8 (+4%) | | default-policy · forest-turned · frame time (p99) (ms) | 57.2 | 63.6 (+11%) | | default-policy · market-turned · frame time (p99) (ms) | 85.5 | 79.8 (−7%) | | default-policy · field-standing · frame time (p99) (ms) | 55.9 | 56.0 (+0%) | | default-policy · forest-standing · frame time (p99) (ms) | 54.8 | 54.3 (−1%) | | default-policy · market-standing · frame time (p99) (ms) | 110.3 | 99.4 (−10%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame rate | 27.0 | 24.5 (−9%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame rate | 20.8 | 21.0 (+1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame rate | 18.1 | 18.3 (+1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame rate | 21.0 | 20.7 (−1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame rate | 22.7 | 22.7 (+0%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame rate | 16.2 | 16.9 (+5%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame time (p99) (ms) | 45.6 | 58.8 (+29%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame time (p99) (ms) | 55.5 | 51.9 (−6%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame time (p99) (ms) | 101.4 | 81.0 (−20%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame time (p99) (ms) | 59.5 | 63.8 (+7%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame time (p99) (ms) | 51.6 | 54.0 (+5%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame time (p99) (ms) | 174.0 | 107.7 (−38%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-turned · frame rate | 26.5 | 26.1 (−2%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-turned · frame rate | 21.0 | 21.0 (+0%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-turned · frame rate | 18.2 | 18.9 (+4%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-standing · frame rate | 22.0 | 21.9 (−0%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-standing · frame rate | 22.5 | 22.6 (+0%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-standing · frame rate | 17.8 | 17.0 (−4%) | (6 more rows on the dashboard) ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_READBACK_LATE` | switch | `0`, `newest` | main's default | the PR's default | forced-rules, the PR at 0 → at newest: 24.5 → 26.1 (+6%) | helps | <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** fail on steamdeck (1/1 report): `default-policy screenshot.max_diff`; `forced-rules screenshot.max_diff`; `forced-rules field-turned.frametime_p99_ms.max_delta_pct (+28.8%)` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM` Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 1 report How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ c4e8e2e | After: this PR @ fec5333 | |---|---|---| | default-policy · field-turned · frame rate | 27.0 | 26.5 (−2%) | | default-policy · forest-turned · frame rate | 21.1 | 21.1 (+0%) | | default-policy · market-turned · frame rate | 18.7 | 19.1 (+2%) | | default-policy · field-standing · frame rate | 21.0 | 21.9 (+4%) | | default-policy · forest-standing · frame rate | 22.5 | 23.0 (+2%) | | default-policy · market-standing · frame rate | 16.6 | 17.8 (+7%) | | default-policy · field-turned · frame time (p99) (ms) | 43.1 | 44.8 (+4%) | | default-policy · forest-turned · frame time (p99) (ms) | 57.2 | 63.6 (+11%) | | default-policy · market-turned · frame time (p99) (ms) | 85.5 | 79.8 (−7%) | | default-policy · field-standing · frame time (p99) (ms) | 55.9 | 56.0 (+0%) | | default-policy · forest-standing · frame time (p99) (ms) | 54.8 | 54.3 (−1%) | | default-policy · market-standing · frame time (p99) (ms) | 110.3 | 99.4 (−10%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame rate | 27.0 | 24.5 (−9%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame rate | 20.8 | 21.0 (+1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame rate | 18.1 | 18.3 (+1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame rate | 21.0 | 20.7 (−1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame rate | 22.7 | 22.7 (+0%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame rate | 16.2 | 16.9 (+5%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame time (p99) (ms) | 45.6 | 58.8 (+29%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame time (p99) (ms) | 55.5 | 51.9 (−6%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame time (p99) (ms) | 101.4 | 81.0 (−20%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame time (p99) (ms) | 59.5 | 63.8 (+7%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame time (p99) (ms) | 51.6 | 54.0 (+5%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame time (p99) (ms) | 174.0 | 107.7 (−38%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-turned · frame rate | 26.5 | 26.1 (−2%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-turned · frame rate | 21.0 | 21.0 (+0%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-turned · frame rate | 18.2 | 18.9 (+4%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-standing · frame rate | 22.0 | 21.9 (−0%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-standing · frame rate | 22.5 | 22.6 (+0%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-standing · frame rate | 17.8 | 17.0 (−4%) | (6 more rows on the dashboard) ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_READBACK_LATE` | switch | `0`, `newest` | main's default | the PR's default | forced-rules, the PR at 0 → at newest: 24.5 → 26.1 (+6%) | helps | ``` </details> #### Measurements · amd+igpu **Verdict:** fail on amd+igpu (2/1 report): `default-policy screenshot.max_diff`; `forced-rules screenshot.max_diff`; `forced-rules forest-standing.frametime_p99_ms.max_delta_pct (+15.8%)` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`; 2: windows+amd+amd-proprietary+igpu `AMD Radeon(TM) 880M Graphics, 2.0.416` `AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAM` Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ c4e8e2e | After: this PR @ fec5333 | |---|---|---| | default-policy · field-turned · frame rate | 25.1 | 27.1 (+8%) | | default-policy · forest-turned · frame rate | 21.1 | 21.4 (+1%) | | default-policy · market-turned · frame rate | 18.2 | 18.9 (+4%) | | default-policy · field-standing · frame rate | 20.9 | 21.9 (+5%) | | default-policy · forest-standing · frame rate | 22.6 | 22.9 (+1%) | | default-policy · market-standing · frame rate | 16.2 | 16.5 (+2%) | | default-policy · field-turned · frame time (p99) (ms) | 48.4 | 47.5 (−2%) | | default-policy · forest-turned · frame time (p99) (ms) | 52.5 | 53.6 (+2%) | | default-policy · market-turned · frame time (p99) (ms) | 93.4 | 103.4 (+11%) | | default-policy · field-standing · frame time (p99) (ms) | 56.9 | 57.2 (+1%) | | default-policy · forest-standing · frame time (p99) (ms) | 55.2 | 52.6 (−5%) | | default-policy · market-standing · frame time (p99) (ms) | 117.6 | 111.8 (−5%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame rate | 25.5 | 23.8 (−6%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame rate | 20.8 | 21.0 (+1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame rate | 17.0 | 19.2 (+12%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame rate | 20.8 | 20.7 (−1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame rate | 22.6 | 22.5 (−0%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame rate | 16.6 | 17.6 (+6%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame time (p99) (ms) | 47.8 | 63.1 (+32%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame time (p99) (ms) | 53.3 | 60.0 (+12%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame time (p99) (ms) | 110.4 | 83.8 (−24%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame time (p99) (ms) | 63.6 | 64.8 (+2%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame time (p99) (ms) | 52.5 | 60.8 (+16%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame time (p99) (ms) | 108.1 | 92.7 (−14%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-turned · frame rate | 22.5 | 21.2 (−6%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-standing · frame rate | 21.4 | 22.9 (+7%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-turned · frame rate | — | 27.5 | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-turned · frame rate | — | 18.5 | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-standing · frame rate | — | 21.9 | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-standing · frame rate | — | 16.2 | (6 more rows on the dashboard) ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_READBACK_LATE` | switch | `0`, `newest` | main's default | the PR's default | forced-rules, the PR at 0 → at newest: 23.8 → 21.2 (−11%) | doesn't help | <details><summary>Markdown for the PR description</summary> ```markdown ## Measurements **Verdict:** fail on amd+igpu (2/1 report): `default-policy screenshot.max_diff`; `forced-rules screenshot.max_diff`; `forced-rules forest-standing.frametime_p99_ms.max_delta_pct (+15.8%)` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 12 GB RAM`; 2: windows+amd+amd-proprietary+igpu `AMD Radeon(TM) 880M Graphics, 2.0.416` `AMD Ryzen AI 9 365 w/ Radeon 880M, 32 GB RAM` Scene: default-policy, from the repository's save kokiri-start (frame_rate_cap=6); forced-rules, from the repository's save kokiri-start (frame_rate_cap=6); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-policy: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; forced-rules: 1 game start a side, forest-standing 15 s after 5 s warm-up, forest-turned 10 s after 0 s warm-up, field-standing 15 s after 5 s warm-up, field-turned 10 s after 0 s warm-up, market-standing 15 s after 5 s warm-up, market-turned 10 s after 0 s warm-up; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ c4e8e2e | After: this PR @ fec5333 | |---|---|---| | default-policy · field-turned · frame rate | 25.1 | 27.1 (+8%) | | default-policy · forest-turned · frame rate | 21.1 | 21.4 (+1%) | | default-policy · market-turned · frame rate | 18.2 | 18.9 (+4%) | | default-policy · field-standing · frame rate | 20.9 | 21.9 (+5%) | | default-policy · forest-standing · frame rate | 22.6 | 22.9 (+1%) | | default-policy · market-standing · frame rate | 16.2 | 16.5 (+2%) | | default-policy · field-turned · frame time (p99) (ms) | 48.4 | 47.5 (−2%) | | default-policy · forest-turned · frame time (p99) (ms) | 52.5 | 53.6 (+2%) | | default-policy · market-turned · frame time (p99) (ms) | 93.4 | 103.4 (+11%) | | default-policy · field-standing · frame time (p99) (ms) | 56.9 | 57.2 (+1%) | | default-policy · forest-standing · frame time (p99) (ms) | 55.2 | 52.6 (−5%) | | default-policy · market-standing · frame time (p99) (ms) | 117.6 | 111.8 (−5%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame rate | 25.5 | 23.8 (−6%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame rate | 20.8 | 21.0 (+1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame rate | 17.0 | 19.2 (+12%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame rate | 20.8 | 20.7 (−1%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame rate | 22.6 | 22.5 (−0%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame rate | 16.6 | 17.6 (+6%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-turned · frame time (p99) (ms) | 47.8 | 63.1 (+32%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-turned · frame time (p99) (ms) | 53.3 | 60.0 (+12%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-turned · frame time (p99) (ms) | 110.4 | 83.8 (−24%) | | forced-rules · `RX_VK_READBACK_LATE=0` · field-standing · frame time (p99) (ms) | 63.6 | 64.8 (+2%) | | forced-rules · `RX_VK_READBACK_LATE=0` · forest-standing · frame time (p99) (ms) | 52.5 | 60.8 (+16%) | | forced-rules · `RX_VK_READBACK_LATE=0` · market-standing · frame time (p99) (ms) | 108.1 | 92.7 (−14%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-turned · frame rate | 22.5 | 21.2 (−6%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · forest-standing · frame rate | 21.4 | 22.9 (+7%) | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-turned · frame rate | — | 27.5 | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-turned · frame rate | — | 18.5 | | forced-rules · `RX_VK_READBACK_LATE=newest` · field-standing · frame rate | — | 21.9 | | forced-rules · `RX_VK_READBACK_LATE=newest` · market-standing · frame rate | — | 16.2 | (6 more rows on the dashboard) ### Flags and settings | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame rate) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_READBACK_LATE` | switch | `0`, `newest` | main's default | the PR's default | forced-rules, the PR at 0 → at newest: 23.8 → 21.2 (−11%) | doesn't help | ``` </details>
Contributor

I think turning it on for desktops would help as well: you won't see it much in mean fps, but in fewer hitches and long frames, so fewer frame dips.

Measured here: frames over 25 ms fell from 46-70 to 16-19 a Market visit. A mean fps or a mean wait cannot show that. Suggested check before leaving desktops out: the frames over 20 and 25 ms on the 3090, with and without the rule.

Setup: Windows 11, Ryzen 9 9900X, RTX 4070 SUPER, 3840x2160 output, DLSS Quality, 60 fps cap, Castle Town Market route (rc.7 with faster lifted code, 2026-11-17). With no rule, the job threads' reads of the 0x3980, 0x9b040, 0x8b040, 0x44b040 and 0x1b580 ranges came 8-11 ms into the frame and waited 2-11 ms in invalidate() for the GPU; that wait was in about 80 % of the frames over 22 ms. With RX_VK_READBACK_LATE=3980,9b040,8b040,44b040,1b580 (everything else the same, RX_VK_FRAME_GATE=0 on both sides), two runs against the base runs:

no rule the five sizes
frames > 25 ms 46-70 19 / 16
frames > 20 ms 273-341 173 / 108
frames > 33 ms unchanged (area entries) unchanged

It has been on in my everyday game since (with RX_VK_FRAME_GATE=0), at least two hours of play: no flash or pop-in seen. 3980 alone changed nothing here (the wait moved to the next read). newest was not tried on this PC.

Why the mean hides it: this PC is not GPU-bound in that scene (the GPU needs about 11 ms a frame, the game's threads 12-14). A normal frame has 0.4 ms of readback wait in all, a long one 5.5-8 ms. The wait appears in the single frames where the render thread or the GPU is late (texture uploads, a heavy view) and the game's read comes before the write-back; the frame then has no time left to take it and runs over. Faster game code moves the read earlier in the frame, so the waits grow with it: the game's frame-end GPU wait was 0.3 ms a frame here before the lifted code got faster and 2.0 ms after.

The rule costs nothing in a frame without a wait, so the default could be wider than handhelds. The ranges the CPU reads and resets, like the exposure meter, keep their wait, as readback_late.h already says.

**I think turning it on for desktops would help as well: you won't see it much in mean fps, but in fewer hitches and long frames, so fewer frame dips.** **Measured here: frames over 25 ms fell from 46-70 to 16-19 a Market visit.** A mean fps or a mean wait cannot show that. **Suggested check before leaving desktops out: the frames over 20 and 25 ms on the 3090, with and without the rule.** Setup: Windows 11, Ryzen 9 9900X, RTX 4070 SUPER, 3840x2160 output, DLSS Quality, 60 fps cap, Castle Town Market route (rc.7 with faster lifted code, 2026-11-17). With no rule, the job threads' reads of the 0x3980, 0x9b040, 0x8b040, 0x44b040 and 0x1b580 ranges came 8-11 ms into the frame and waited 2-11 ms in `invalidate()` for the GPU; that wait was in about 80 % of the frames over 22 ms. With `RX_VK_READBACK_LATE=3980,9b040,8b040,44b040,1b580` (everything else the same, `RX_VK_FRAME_GATE=0` on both sides), two runs against the base runs: | | no rule | the five sizes | |---|---|---| | **frames > 25 ms** | **46-70** | **19 / 16** | | frames > 20 ms | 273-341 | 173 / 108 | | frames > 33 ms | unchanged (area entries) | unchanged | It has been on in my everyday game since (with `RX_VK_FRAME_GATE=0`), at least two hours of play: **no flash or pop-in seen**. `3980` alone changed nothing here (the wait moved to the next read). `newest` was not tried on this PC. **Why the mean hides it:** this PC is not GPU-bound in that scene (the GPU needs about 11 ms a frame, the game's threads 12-14). A normal frame has 0.4 ms of readback wait in all, a long one 5.5-8 ms. The wait appears in the single frames where the render thread or the GPU is late (texture uploads, a heavy view) and the game's read comes before the write-back; the frame then has no time left to take it and runs over. Faster game code moves the read earlier in the frame, so the waits grow with it: the game's frame-end GPU wait was 0.3 ms a frame here before the lifted code got faster and 2.0 ms after. **The rule costs nothing in a frame without a wait, so the default could be wider than handhelds.** The ranges the CPU reads and resets, like the exposure meter, keep their wait, as readback_late.h already says.
Contributor

Follow-up: on this desktop it is the five sizes that help, not newest. With newest as many readbacks wait as with no rule at all.

Measured today on v3.0.0 as shipped (source 87cb36aa), same PC (Windows 11, Ryzen 9 9900X, RTX 4070 SUPER), 3840x2160 output, DLSS Quality, 90 fps cap, the Castle Town Market walking route (the second visit, 60 s), RX_VK_FRAME_GATE=0 in all three, one run each:

RX_VK_READBACK_LATE fps frames > 20 ms frames > 25 ms readbacks that waited (the log's line)
unset 69.8 158 36 54,338 of 288,000, 0.04 ms each
newest 69.1 176 40 54,730 of 300,000, 0.04 ms each
3980,9b040,8b040,44b040,1b580 69.7 90 29 0

A fourth run with the five sizes and the frame gate on: 67.0 fps, 96 frames over 20 ms, 20 over 25 ms, 0 readbacks waited. So two runs with the sizes (90, 96 frames over 20 ms) against two without an effective rule (158, 176).

Why newest finds nothing here: it lets a read go only when the range's writer is the newest submission handed out (v >= f0 in invalidate). The count says the reads that wait on this PC have an earlier submission as their writer, one the GPU has not finished yet. The mean wait is 0.04 ms with or without it, as on the 3090, and the frames over 20 ms still nearly halve once those reads stop waiting.

So newest as a desktop default would change nothing here; a desktop default would need these ranges, or a rule that knows which ranges are plain results. The five sizes' safety on this PC rests on play only: over two hours in my everyday game, no flash or pop-in.

**Follow-up: on this desktop it is the five sizes that help, not `newest`. With `newest` as many readbacks wait as with no rule at all.** Measured today on v3.0.0 as shipped (source 87cb36aa), same PC (Windows 11, Ryzen 9 9900X, RTX 4070 SUPER), 3840x2160 output, DLSS Quality, 90 fps cap, the Castle Town Market walking route (the second visit, 60 s), `RX_VK_FRAME_GATE=0` in all three, one run each: | `RX_VK_READBACK_LATE` | fps | frames > 20 ms | frames > 25 ms | readbacks that waited (the log's line) | |---|---|---|---|---| | unset | 69.8 | 158 | 36 | 54,338 of 288,000, 0.04 ms each | | `newest` | 69.1 | 176 | 40 | 54,730 of 300,000, 0.04 ms each | | **`3980,9b040,8b040,44b040,1b580`** | 69.7 | **90** | 29 | **0** | A fourth run with the five sizes and the frame gate on: 67.0 fps, 96 frames over 20 ms, 20 over 25 ms, 0 readbacks waited. So two runs with the sizes (90, 96 frames over 20 ms) against two without an effective rule (158, 176). Why `newest` finds nothing here: it lets a read go only when the range's writer is the newest submission handed out (`v >= f0` in `invalidate`). The count says the reads that wait on this PC have an earlier submission as their writer, one the GPU has not finished yet. The mean wait is 0.04 ms with or without it, as on the 3090, and the frames over 20 ms still nearly halve once those reads stop waiting. **So `newest` as a desktop default would change nothing here; a desktop default would need these ranges, or a rule that knows which ranges are plain results.** The five sizes' safety on this PC rests on play only: over two hours in my everyday game, no flash or pop-in.
Author
Owner

Folded into #1763 (head 21b606e): on the Steam Deck and handhelds the unset default reads the newest submission's results late, on top of the culling camera block every PC reads late (device_policy.h readback_late_newest). The Deck's flash check this PR still needed is in #1763's Still to test. Closing this one so there is a single PR.

Folded into [#1763](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1763) (head 21b606e): on the Steam Deck and handhelds the unset default reads the newest submission's results late, on top of the culling camera block every PC reads late (`device_policy.h` `readback_late_newest`). The Deck's flash check this PR still needed is in #1763's Still to test. Closing this one so there is a single PR.
HumanBean closed this pull request 2026-11-20 00:42:16 +00:00
Some checks failed
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/steamdeck 1/1 fail
beanstalk/windows+intel 0/1 pass, 0 running, 0 queued
beanstalk/linux+intel 0/1 pass, 0 running, 0 queued
beanstalk/amd+igpu 1/1 fail
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
PR description / Description follows the template (pull_request_target) Successful in 9s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 10s
Third-party parts / As their notes say (pull_request) Successful in 11s
Website / Website on Cloudflare (pull_request_target) Has been skipped

Pull request closed

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!1725
No description provided.