WIP: perf(vk): with the render thread, a readback over a texture's storage waits for its place in the queue, not the whole queue (RX_VK_ASYNC_PARTS) #2211

Closed
siantm wants to merge 5 commits from siantm/Longshot:perf/vk-async-parts into main
Contributor

Summary

With the replay on the render thread (RX_VK_ASYNC=1, the Threaded rendering row), a readback over a texture's storage
(invalidate, textures the GPU wrote there) waits for the whole hand-over queue to be replayed (wait_queue_empty) and
then takes replay_mu to write the texels back, which the render thread holds for each submission's whole replay.

RX_VK_ASYNC_PARTS=1 takes the other order there: the readback waits for the submits handed over before it to be replayed
(async_catch_up: the jobs after the last submit are not waited for unless a queue is stopped; nothing is forced past a
wait), and the texture's texels go to guest memory by a job in its place among the jobs (async_texels_to_guest,
JOB_TEXELS_TO_GUEST), so the reading thread no longer takes replay_mu. enqueue now numbers the jobs and notes the last
submit; a job done tells the waiters. A buffer readback is main's, the switch on or off. Not used with
RX_VK_PER_QUEUE_FENCES=0 or without the render thread. The result expected: shorter waits for the readbacks over a
texture's storage with the render thread on.

The switch: RX_VK_ASYNC_PARTS (new, kind attempt, bool, its row in gpu/vk/switches.def), off by default: unset is
main's code. It follows dazemc's reviews of #2212 (72465) and of this one (72494): it stays off until its own in-game
comparison exists. 1 (any value but empty, 0, false, off or no) turns it on; the log says so.

Since the first push, the buffer readback's catch-up is gone (dazemc, 72494 point 1). The branch (bd3ea307) put
async_catch_up there while the render thread's buffer readback still waited for the whole queue, forced, then the main
timeline (its note: Kokiri Forest, i7-9700, 54-58 ms of readback waits a frame), so it was the shorter wait there. Main has
since taken that wait out (the comment above it in invalidate): on main the catch-up only added waits, the replay of every
submit handed over before the read, then the part of the newest work it had just recorded. Gone with it: the readbacks'
RX_VK_ASYNC_PARTS line every 3000 calls (async_rb), the counters async_queue_waits and async_real_waits, and
async_present_value with q_present_value; tests/test_readback_part.py is main's again.

From bd3ea307 and 4eed88f7 on exp/x86-asm-sync, without the branch's general render-thread wait statistics and without
its buffer readback catch-up.

Read first: async_catch_up, async_texels_to_guest, the texture-storage end of invalidate and enqueue in
gpu/vk/vk_replay.cpp, then tests/test_async_parts.py.

Testing

Tested: Windows 11, i7-9700, RTX 4060, the builder's llvm-mingw clang 23. One build job of this PC's job queue (batch fx2212-r1, summary b-fx2212.log), the checks in a hidden console with tests/run_all.py --strict --exact --jobs 2 --timeout 1200. Head 756da265 on main a2dc5385: its own checks pass (log fx2212-11-head.log): tests/test_async_parts.py (the switch's read in fresh processes included, off when unset), tests/test_readback_part.py and nx2/test_timeline_modes.py. The failing test first: tests/test_async_parts.py at 78652994 fails (the switch on caught up on the buffer readback, log fx2212-11-buftest.log) and passes at 756da265; at a8d87dcd (the test's gaps closed, on the first push's code) it passes. Mutants (log fx2212-mut2211.log; the files taken from git, one edit each): the buffer catch-up put back, the texels' return moved after replay_mu is taken, the texels' wait without its condition, its early return gone, the guest-memory fallback taken under q_mu, and the switch on when unset each fail the test at the head; the four that apply to 9751e510 pass its test there. Every check --changed a2dc5385 picks (log fx2212-11-changed.log): 156 checks, 145 passed, 11 failed, 5 skipped (Windows: they run on Linux or need a Vulkan device). The 11 fail on main a2dc5385 too (batch fx2212-r1m, log fx2212-main11.log): tests/test_crash_dialog.py, tests/test_dev_ab.py, tests/test_dev_packs.py, tests/test_draw_stream_visibility.py, tests/test_fsr_uniform_ownership.py, tests/test_input_movie.py, tests/test_menu_keys.py, tests/test_perf_report.py, tests/test_sim_turf_pools.py, tests/test_switch_table.py, tests/test_vibration_menu.py. The game build's renderer alone in the same job, RX_VK_ONLY=1 python -I nx2/build.py --standalone --jobs 2 at this head (every gpu/vk/*.cpp; no game, nothing run): compiled with 0 failed and linked longshot_vk.dll (log fx2212-vk-async-parts-vkbuild.log).

Its path has not run in the game on this PC: the scripted pause and save starts in Measurements ran on main 9dd41326,
whose readbacks this change would change, and none reached that path.

Still to test:

  • Windows 11, i7-9700, RTX 4060 (this PC): first a census on main with Threaded rendering on, 180 s in each of Kokiri Forest, Link's house, Hyrule Field (by day, by night and as adult), the Market, Kakariko, Lake Hylia, the Deku Tree and the Fire Temple, counting the readbacks over a texture's storage from the lines named in Measurements. Then, in the scene with the most of them, this branch unset (off) against RX_VK_ASYNC_PARTS=1, RX_VK_ASYNC_FENCES unset in every run, 120 s runs, a warm-up a side then 8 interleaved a side, expecting the same picture, no FATAL or hang, the invalidate ... textures there; the catch-ups waited ... ms each line lower with =1, and draw time and game time a frame the same or lower. If no scene has such readbacks, that is said here, and the switch has nothing to show on this PC (by hand)
  • Linux NVIDIA and AMD, Windows AMD and Intel, Steam Deck: Kokiri Forest with Threaded rendering on, play three minutes: main @ a2dc5385, this branch unset and this branch with RX_VK_ASYNC_PARTS=1, warmed up, ABBA, expecting the same picture, no FATAL and no hang, and a median frame time with =1 the same as unset and main; whether Kokiri Forest reaches the readback this changes at all is not known (Measurements) (Test Farm: linux+nvidia, linux+amd, windows+amd, windows+intel, steamdeck: Kokiri Forest three minutes, Threaded rendering on: main @ a2dc5385, this branch unset and this branch with RX_VK_ASYNC_PARTS=1, warmed up, ABBA, the log, frame times and a screenshot)
  • Linux: build the renderer and run python3 -I -B tests/test_async_parts.py, expecting PASS (by hand)
  • Any A/B of the present or texture stalls (the #1988 line): RX_VK_ASYNC_PARTS and #2212's RX_VK_ASYNC_FENCES on the same side in both arms (unset, main's paths, unless the A/B is of them). Both move when the game's threads and the render thread wait for each other: the texels' job runs on the render thread under replay_mu between its jobs, and with the fences a fence's wait ends earlier, so frames are handed over earlier (by hand)

Measurements

Verdict: not made to act by any means tried; withdrawn. This change's one path is a readback inside a GPU-written
texture's storage, and no run has produced one. On this PC, on main 9dd41326 with Threaded rendering at its default (the
render thread on), a scripted start opened and closed the pause menu six times, and scripted starts saved through the pause
menu's System page (held job reach2211): the fourth made a real save (the save slot's caption.sav written again, with a
new thumbnail of the scene), after three that did not (the first pressed B, which closes the menu; the second turned the
pages too fast; the third took the confirmation's default, Cancel). Every render-thread line read 0 in one (30 lines in
the pause start, 26 in the start that saved), and no run logged a readback in a live texture's storage. The 492 runs on
disk (10,491 render-thread lines) and an outside tester's 36 runs on a Radeon 860M read the same zero. RX_VK_ASYNC_PARTS
ships off (attempt); its on side, what this proposes, has never run in play, so nothing is measured, and the change is
withdrawn: closed by the author together with #2212, which is built on it; the branch stays on the fork.

Where the switch acts, read from this PC's logs (492 game runs on disk with the render thread's line, builds of main and of
other pull requests, Threaded rendering on: Kokiri Forest, the Market, Hyrule Field, Link's house and others): the render
thread's line every 600 presents (readbacks: N next to a texture's storage (no catch-up), M in one) read M = 0 in all
10,491 of its lines. No run logged a readback in a live texture's storage, and no run reached the invalidate ... textures there; the catch-ups waited line, which comes once per 300 readbacks over a texture the GPU wrote. The readbacks next to a
texture's storage, which this does not change, were about 25,000 a run in Kokiri Forest. So standing in these scenes does
not reach the change. What might reach it is an interaction. A save writes a thumbnail of the scene into caption.sav
(a JPEG the file select shows, host/control.c), and making it is likely to read a rendered picture back. Our code cannot
tell whether that read lands in a texture's storage the GPU wrote, or whether the pause menu makes such a read: the game
decides that. The scripted pause menus and the save in the Verdict counted it: none.

A third party's run (Jer9, 2026-11-23, comment on this pull request), as he reported it: Windows 11, Radeon 860M iGPU
(Ryzen AI 7 350, RDNA 3.5, Adrenalin 26.10.1), built from #2212's head c314a21e with RX_VK_ASYNC_FENCES=0 (#2211's
path), dev.py ab --separate --runs 3 --seconds 45, RX_VK_ASYNC_PARTS=0 against =1, the Market and Kokiri Forest.

  • Every render-thread line read 0 in one and 0 catch-ups, in these 12 runs and in 24 more of #2212 in four scenes. So,
    as he says, his figures are a stability and no-regression check on Windows AMD, not a speed-up.
  • 0 FATAL, VK_ERROR, device-lost or validation lines, and RX_VK_ASYNC_PARTS=1 logged on every =1 run.
  • Market, three a side: fps median 30.0 against 32.2, p99 39.45 against 36.28 ms: run-to-run spread with nothing to change.
    In Kokiri Forest one =1 run is left out: it landed at the lighter spot (the early teleport after loading kokiri-start
    sometimes lands in one of two places).
  • Its limits, his: standing dev.py ab scenes, GPU-bound at a 67 % render scale on an 8-CU iGPU, three runs a side, and
    RX_VK_ASYNC=1 forced where main's Auto leaves Threaded rendering off on that GPU.

Risks

What could break with RX_VK_ASYNC_PARTS=1: a readback over a texture's storage that does not wait for the work that writes
it would read old texels (a wrong value or picture for a frame); one that waits for work stopped behind it would hang. Two
bounded stalls are kept, both from main's wait_queue_empty (dazemc, 72494): with a queue stopped, the readback waits for
every job handed over before it, which can be a held present, so up to the replay's hold_ms; and with a queue stopped at
an event stored in guest memory (ev_wait_in_memory) it is main's whole-queue wait, which has no bound. A buffer readback
reads what it reads on main: nothing it depends on moves (memory_writeback_value's pages are noted at the replay's part
ends, its part wait is the recordings' timeline's, memory_rb_refresh is the recording's; the texels' job writes only
textures' texels into guest memory and their own state). The tests run the real async_catch_up and
async_texels_to_guest against a stand-in hand-over queue, a replay thread that runs on its own and the render thread's
wait_queue_empty, and the real texture-storage end and buffer catch-up of invalidate. Off by default: unset is main's
code. Renderer code: the runtime is rebuilt; nothing changes for players' saves, options or caches.

Checklist

Ready for review

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

When it applies

  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
## Summary With the replay on the render thread (`RX_VK_ASYNC=1`, the Threaded rendering row), a readback over a texture's storage (`invalidate`, textures the GPU wrote there) waits for the whole hand-over queue to be replayed (`wait_queue_empty`) and then takes `replay_mu` to write the texels back, which the render thread holds for each submission's whole replay. `RX_VK_ASYNC_PARTS=1` takes the other order there: the readback waits for the submits handed over before it to be replayed (`async_catch_up`: the jobs after the last submit are not waited for unless a queue is stopped; nothing is forced past a wait), and the texture's texels go to guest memory by a job in its place among the jobs (`async_texels_to_guest`, `JOB_TEXELS_TO_GUEST`), so the reading thread no longer takes `replay_mu`. `enqueue` now numbers the jobs and notes the last submit; a job done tells the waiters. A buffer readback is main's, the switch on or off. Not used with `RX_VK_PER_QUEUE_FENCES=0` or without the render thread. The result expected: shorter waits for the readbacks over a texture's storage with the render thread on. The switch: `RX_VK_ASYNC_PARTS` (new, kind `attempt`, bool, its row in `gpu/vk/switches.def`), off by default: unset is main's code. It follows dazemc's reviews of #2212 (72465) and of this one (72494): it stays off until its own in-game comparison exists. `1` (any value but empty, `0`, `false`, `off` or `no`) turns it on; the log says so. Since the first push, the buffer readback's catch-up is gone (dazemc, 72494 point 1). The branch (bd3ea307) put `async_catch_up` there while the render thread's buffer readback still waited for the whole queue, forced, then the main timeline (its note: Kokiri Forest, i7-9700, 54-58 ms of readback waits a frame), so it was the shorter wait there. Main has since taken that wait out (the comment above it in `invalidate`): on main the catch-up only added waits, the replay of every submit handed over before the read, then the part of the newest work it had just recorded. Gone with it: the readbacks' `RX_VK_ASYNC_PARTS` line every 3000 calls (`async_rb`), the counters `async_queue_waits` and `async_real_waits`, and `async_present_value` with `q_present_value`; `tests/test_readback_part.py` is main's again. From bd3ea307 and 4eed88f7 on `exp/x86-asm-sync`, without the branch's general render-thread wait statistics and without its buffer readback catch-up. Read first: `async_catch_up`, `async_texels_to_guest`, the texture-storage end of `invalidate` and `enqueue` in `gpu/vk/vk_replay.cpp`, then `tests/test_async_parts.py`. ## Testing **Tested:** Windows 11, i7-9700, RTX 4060, the builder's llvm-mingw clang 23. One build job of this PC's job queue (batch `fx2212-r1`, summary `b-fx2212.log`), the checks in a hidden console with `tests/run_all.py --strict --exact --jobs 2 --timeout 1200`. Head `756da265` on main `a2dc5385`: its own checks pass (log `fx2212-11-head.log`): `tests/test_async_parts.py` (the switch's read in fresh processes included, off when unset), `tests/test_readback_part.py` and `nx2/test_timeline_modes.py`. The failing test first: `tests/test_async_parts.py` at `78652994` fails (the switch on caught up on the buffer readback, log `fx2212-11-buftest.log`) and passes at `756da265`; at `a8d87dcd` (the test's gaps closed, on the first push's code) it passes. Mutants (log `fx2212-mut2211.log`; the files taken from git, one edit each): the buffer catch-up put back, the texels' return moved after `replay_mu` is taken, the texels' wait without its condition, its early return gone, the guest-memory fallback taken under `q_mu`, and the switch on when unset each fail the test at the head; the four that apply to `9751e510` pass its test there. Every check `--changed a2dc5385` picks (log `fx2212-11-changed.log`): 156 checks, 145 passed, 11 failed, 5 skipped (Windows: they run on Linux or need a Vulkan device). The 11 fail on main `a2dc5385` too (batch `fx2212-r1m`, log `fx2212-main11.log`): `tests/test_crash_dialog.py`, `tests/test_dev_ab.py`, `tests/test_dev_packs.py`, `tests/test_draw_stream_visibility.py`, `tests/test_fsr_uniform_ownership.py`, `tests/test_input_movie.py`, `tests/test_menu_keys.py`, `tests/test_perf_report.py`, `tests/test_sim_turf_pools.py`, `tests/test_switch_table.py`, `tests/test_vibration_menu.py`. The game build's renderer alone in the same job, `RX_VK_ONLY=1 python -I nx2/build.py --standalone --jobs 2` at this head (every `gpu/vk/*.cpp`; no game, nothing run): compiled with 0 failed and linked `longshot_vk.dll` (log `fx2212-vk-async-parts-vkbuild.log`). Its path has not run in the game on this PC: the scripted pause and save starts in Measurements ran on main 9dd41326, whose readbacks this change would change, and none reached that path. **Still to test:** - Windows 11, i7-9700, RTX 4060 (this PC): first a census on main with Threaded rendering on, 180 s in each of Kokiri Forest, Link's house, Hyrule Field (by day, by night and as adult), the Market, Kakariko, Lake Hylia, the Deku Tree and the Fire Temple, counting the readbacks over a texture's storage from the lines named in Measurements. Then, in the scene with the most of them, this branch unset (off) against `RX_VK_ASYNC_PARTS=1`, `RX_VK_ASYNC_FENCES` unset in every run, 120 s runs, a warm-up a side then 8 interleaved a side, expecting the same picture, no FATAL or hang, the `invalidate ... textures there; the catch-ups waited ... ms each` line lower with `=1`, and draw time and game time a frame the same or lower. If no scene has such readbacks, that is said here, and the switch has nothing to show on this PC (by hand) - Linux NVIDIA and AMD, Windows AMD and Intel, Steam Deck: Kokiri Forest with Threaded rendering on, play three minutes: main @ a2dc5385, this branch unset and this branch with `RX_VK_ASYNC_PARTS=1`, warmed up, ABBA, expecting the same picture, no FATAL and no hang, and a median frame time with `=1` the same as unset and main; whether Kokiri Forest reaches the readback this changes at all is not known (Measurements) (Test Farm: linux+nvidia, linux+amd, windows+amd, windows+intel, steamdeck: Kokiri Forest three minutes, Threaded rendering on: main @ a2dc5385, this branch unset and this branch with RX_VK_ASYNC_PARTS=1, warmed up, ABBA, the log, frame times and a screenshot) - Linux: build the renderer and run `python3 -I -B tests/test_async_parts.py`, expecting PASS (by hand) - Any A/B of the present or texture stalls (the #1988 line): `RX_VK_ASYNC_PARTS` and #2212's `RX_VK_ASYNC_FENCES` on the same side in both arms (unset, main's paths, unless the A/B is of them). Both move when the game's threads and the render thread wait for each other: the texels' job runs on the render thread under `replay_mu` between its jobs, and with the fences a fence's wait ends earlier, so frames are handed over earlier (by hand) ## Measurements **Verdict:** not made to act by any means tried; withdrawn. This change's one path is a readback inside a GPU-written texture's storage, and no run has produced one. On this PC, on main 9dd41326 with Threaded rendering at its default (the render thread on), a scripted start opened and closed the pause menu six times, and scripted starts saved through the pause menu's System page (held job `reach2211`): the fourth made a real save (the save slot's `caption.sav` written again, with a new thumbnail of the scene), after three that did not (the first pressed B, which closes the menu; the second turned the pages too fast; the third took the confirmation's default, Cancel). Every render-thread line read `0 in one` (30 lines in the pause start, 26 in the start that saved), and no run logged a readback in a live texture's storage. The 492 runs on disk (10,491 render-thread lines) and an outside tester's 36 runs on a Radeon 860M read the same zero. `RX_VK_ASYNC_PARTS` ships off (`attempt`); its on side, what this proposes, has never run in play, so nothing is measured, and the change is withdrawn: closed by the author together with #2212, which is built on it; the branch stays on the fork. Where the switch acts, read from this PC's logs (492 game runs on disk with the render thread's line, builds of main and of other pull requests, Threaded rendering on: Kokiri Forest, the Market, Hyrule Field, Link's house and others): the render thread's line every 600 presents (`readbacks: N next to a texture's storage (no catch-up), M in one`) read M = 0 in all 10,491 of its lines. No run logged `a readback in a live texture's storage`, and no run reached the `invalidate ... textures there; the catch-ups waited` line, which comes once per 300 readbacks over a texture the GPU wrote. The readbacks next to a texture's storage, which this does not change, were about 25,000 a run in Kokiri Forest. So standing in these scenes does not reach the change. What might reach it is an interaction. A save writes a thumbnail of the scene into `caption.sav` (a JPEG the file select shows, `host/control.c`), and making it is likely to read a rendered picture back. Our code cannot tell whether that read lands in a texture's storage the GPU wrote, or whether the pause menu makes such a read: the game decides that. The scripted pause menus and the save in the Verdict counted it: none. A third party's run (Jer9, 2026-11-23, comment on this pull request), as he reported it: Windows 11, Radeon 860M iGPU (Ryzen AI 7 350, RDNA 3.5, Adrenalin 26.10.1), built from #2212's head c314a21e with `RX_VK_ASYNC_FENCES=0` (#2211's path), `dev.py ab --separate --runs 3 --seconds 45`, `RX_VK_ASYNC_PARTS=0` against `=1`, the Market and Kokiri Forest. - Every render-thread line read `0 in one` and 0 catch-ups, in these 12 runs and in 24 more of #2212 in four scenes. So, as he says, his figures are a stability and no-regression check on Windows AMD, not a speed-up. - 0 FATAL, VK_ERROR, device-lost or validation lines, and `RX_VK_ASYNC_PARTS=1` logged on every `=1` run. - Market, three a side: fps median 30.0 against 32.2, p99 39.45 against 36.28 ms: run-to-run spread with nothing to change. In Kokiri Forest one `=1` run is left out: it landed at the lighter spot (the early teleport after loading `kokiri-start` sometimes lands in one of two places). - Its limits, his: standing `dev.py ab` scenes, GPU-bound at a 67 % render scale on an 8-CU iGPU, three runs a side, and `RX_VK_ASYNC=1` forced where main's Auto leaves Threaded rendering off on that GPU. ## Risks What could break with `RX_VK_ASYNC_PARTS=1`: a readback over a texture's storage that does not wait for the work that writes it would read old texels (a wrong value or picture for a frame); one that waits for work stopped behind it would hang. Two bounded stalls are kept, both from main's `wait_queue_empty` (dazemc, 72494): with a queue stopped, the readback waits for every job handed over before it, which can be a held present, so up to the replay's `hold_ms`; and with a queue stopped at an event stored in guest memory (`ev_wait_in_memory`) it is main's whole-queue wait, which has no bound. A buffer readback reads what it reads on main: nothing it depends on moves (`memory_writeback_value`'s pages are noted at the replay's part ends, its part wait is the recordings' timeline's, `memory_rb_refresh` is the recording's; the texels' job writes only textures' texels into guest memory and their own state). The tests run the real `async_catch_up` and `async_texels_to_guest` against a stand-in hand-over queue, a replay thread that runs on its own and the render thread's `wait_queue_empty`, and the real texture-storage end and buffer catch-up of `invalidate`. Off by default: unset is main's code. Renderer code: the runtime is rebuilt; nothing changes for players' saves, options or caches. ## Checklist ### Ready for review - [x] 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. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [ ] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
perf(vk): with the render thread, a readback can wait for its place in the queue and its write-back's part (RX_VK_ASYNC_PARTS)
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 14s
beanstalk/approval waiting for a BigBean's 👍 on the request
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
9751e5108a
With the replay on the render thread (RX_VK_ASYNC=1), a readback of GPU results reads what the work recorded so far has
written back (invalidate), and a readback over a texture's storage waits for the whole hand-over queue to be replayed
(wait_queue_empty) and then takes replay_mu to write the texels back, which the render thread holds for each
submission's whole replay.

RX_VK_ASYNC_PARTS (kill, on unless =0) takes the other order: a readback waits for the submits handed over before it to be
replayed (async_catch_up: the jobs after the last submit are not waited for unless a queue is stopped, then every job
before the read is, since its signal or present may let it on; nothing is forced past a wait), then for the part that
writes its range back, as the submitting thread's replay does. A texture's texels go to guest memory by a job in its
place among the jobs (JOB_TEXELS_TO_GUEST, async_texels_to_guest), so the readback no longer takes replay_mu. enqueue now
numbers the jobs and notes the last submit; a job done tells the waiters. The readbacks' 3000-call log line says what they
waited for with the switch on. Not used with RX_VK_PER_QUEUE_FENCES=0 or without the render thread (said in the log when
the switch is set).

From bd3ea307 and 4eed88f7 on exp/x86-asm-sync, without the branch's general render-thread wait statistics. Not measured,
neither on the branch nor in play.

Test: tests/test_async_parts.py runs the real async_catch_up and async_texels_to_guest against a stand-in hand-over
queue and replay thread (no wait when nothing is pending, the submits but not the jobs after them, every earlier job with a
queue stopped, the whole queue with an event in guest memory, the texels' job in its place with the frame gate opened up
to it), and reads invalidate, replay_thread_main, enqueue and the switch for their parts.

Switch: RX_VK_ASYNC_PARTS (kill), on (unset); empty, 0, off, false or no: the render thread's readbacks as before.

Switch reads: the test also runs RX_VK_ASYNC_PARTS as the source reads it, in fresh processes (unset, 0, 1, 2, off, each twice, the variable flipped after the first read: read once). It is read as a bool that is on when unset (env_on_or(..., 1)): empty, 0, off, false or no off, any other value on.

Assisted-by: Claude Code
Member

Possibly related, for context:

  • PR #303 WIP: perf(vk): RX_VK_READBACK_EARLY, a read of GPU results written in place waits for its writer's part, not the whole submission — Earlier readback-part optimization; closed after missed-write correctness issues
  • PR #1763 perf(vk): the renderer's threads rewritten: one render thread, the presenter on every PC, parts that end at the game's own pass ends — Merged render-thread/parts foundation this change builds on
Possibly related, for context: - PR #303 WIP: perf(vk): RX_VK_READBACK_EARLY, a read of GPU results written in place waits for its writer's part, not the whole submission — Earlier readback-part optimization; closed after missed-write correctness issues - PR #1763 perf(vk): the renderer's threads rewritten: one render thread, the presenter on every PC, parts that end at the game's own pass ends — Merged render-thread/parts foundation this change builds on
Author
Contributor

@Beanstalk This changes readbacks of GPU results with Threaded rendering on, the default (gpu/vk): a readback waits for the part of the submission that writes it back; RX_VK_ASYNC_PARTS=0 turns it off. Please start from the kokiri-start save and take the picture 5 s (300 frames at 60 fps) after the first frame whose picture is not a single uniform colour, with no input in between (a picture during the load's fade-in from black is not comparable), with a main-against-itself picture on the same PC from the same point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, on) and with RX_VK_ASYNC_PARTS=0 (off), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. The same picture as main within main's own difference from itself; with it unset, frame time p99 equal to main's or better, within the run-to-run spread, and equal to RX_VK_ASYNC_PARTS=0 or better. The log must have no FATAL, device lost or validation error line. No exposure flash and no fog from the frame before in any picture. Please report the log's "vk: readbacks of GPU results" lines (what the readbacks waited for) on both sides.

@Beanstalk This changes readbacks of GPU results with Threaded rendering on, the default (gpu/vk): a readback waits for the part of the submission that writes it back; RX_VK_ASYNC_PARTS=0 turns it off. Please start from the kokiri-start save and take the picture 5 s (300 frames at 60 fps) after the first frame whose picture is not a single uniform colour, with no input in between (a picture during the load's fade-in from black is not comparable), with a main-against-itself picture on the same PC from the same point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, on) and with RX_VK_ASYNC_PARTS=0 (off), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. The same picture as main within main's own difference from itself; with it unset, frame time p99 equal to main's or better, within the run-to-run spread, and equal to RX_VK_ASYNC_PARTS=0 or better. The log must have no FATAL, device lost or validation error line. No exposure flash and no fog from the frame before in any picture. Please report the log's "vk: readbacks of GPU results" lines (what the readbacks waited for) on both sides.
Member

@siantm only members of BigBeans can start the farm.

One of them can approve this request by reacting 👍 to it or to this comment. This request was for 9751e51, and the PR has changed since (756da26), so a 👍 no longer approves it. Comment @Beanstalk again to ask for the new commit.

@siantm only members of `BigBeans` can start the farm. ~~One of them can approve this request by reacting 👍 to it or to this comment.~~ This request was for `9751e51`, and the PR has changed since (`756da26`), so a 👍 no longer approves it. Comment `@Beanstalk` again to ask for the new commit.
dazemc left a comment

Read of 9751e510 on main a2dc5385 (+395, five files). The design is careful, =0 is main exactly, and the test is real. The strongest thing is that #2211 does not only shorten texture readbacks: it also puts a catch-up back on the ordinary buffer readback — the one the code says was removed for 7.5–11 ms a readback — and it ships on with no run.

1. The buffer readback gains the catch-up its own comment says was removed. With parts on (the default), any readback of a range with a live write-back now runs async_catch_up() (gpu/vk/vk_replay.cpp:4071-4078), which waits until the replay thread has reached the last submit handed over before the read (async_catch_up, :7878-7894). The paragraph directly above the line still reads "RX_VK_ASYNC=1, the render thread: no catch-up either … Catching up instead (the older replay thread, removed) held the game's job threads for the whole replay of the frame, 7.5-11 ms a readback in the Market, and forced half of the stopped submissions past their waits (the flashes)" (:4046-4053). The new catch-up drops the forcing (which is the better half of that fix) but keeps the wait for the replay to reach the read, which is where the 7.5–11 ms went; and w = !behind || exact || parts now reports every such read as one that waited (:4078). The description frames the win as the texture path and says "The result expected: shorter readback waits"; on this path the wait is longer than main's (which was none). OoT's exposure-meter read is exactly this path, once a frame. If the catch-up is only there to make the writer's part known, main already falls back to wait_recorded/readback_wait_value when it is not — so what does it buy that the A/B can show? If it is needed, the comment above needs replacing, not just appending to.

2. Default vs evidence. Same as #2212: RX_VK_ASYNC_PARTS ships on (switches.def:302) while Measurements says "no measurement chose that default yet" and Testing says "It has NOT run in the game on this PC yet". RX_VK_ASYNC is Auto-on from 4 physical cores, so this is most PCs' readback path. The in-game ABBA (unset lower than =0 and than main, =0 the same as main) is the evidence the switch rule asks for; until it exists the measured side is =0. With the buffer-path point above, I would hold the default off (attempt) until then.

The spot checks:

  • Which waits split: the texture-storage path drops wait_queue_empty() for async_catch_up() then a JOB_TEXELS_TO_GUEST job that runs texture_flush_to_guest (the job's own flush does a bounded GPU readback wait, flush_textures → readback_submit_wait), and invalidate returns without taking replay_mu (:4263-4285); and the buffer path gains the catch-up above. The writer's part wait (wait_recorded_part/wait_recorded) is unchanged.
  • Deadlock: none found. Nothing waits on a submit not yet enqueued: async_catch_up captures q_last_submit at the call, the texels job is enqueued after that and before any later submit, and a part's signal only depends on the recordings' timeline advancing, which the replay does itself. The q_reached waits are under q_mu against q_done incremented there, and the notify is after q_done++ (:7795-7801), so no lost wakeup. Two bounded stalls to know about, both pre-existing in wait_queue_empty: a readback with a blocked queue waits for every job handed over before it (:7887), which can include a held present, so up to the replay's hold_ms; and the ev_wait_in_memory fallback is an unbounded wait_queue_empty (:7891-7893) — that one is documented as the guest-memory-event case.
  • Off path: =0 is main: parts false leaves else if (behind) with only the exact test, w as before, sync_settle/wait_queue_empty then texture_flush_to_guest under replay_mu for textures. enqueue's new seq/q_last_submit/q_present_value writes and the two thread-local counters are inert.
  • The test: real, not a parse check — it cuts and runs async_catch_up and async_texels_to_guest against a stand-in queue (tests/test_async_parts.py:87-132) and asserts the wiring (:225-244), so on main it fails at the extraction. Gaps: the stand-in replay only advances while a waiter is present and its wait_queue_empty only counts, so a lost wakeup or the unbounded fallback is not exercised; and invalidate is only grepped, so the new buffer catch-up is asserted to exist — where it fires and what it costs is not.
  • With #2212: they compose. The shared q_reached/q_reach_waiters is notified after q_done++ and by async_fences_done under q_mu, so a catch-up waiter and a fence waiter cannot miss each other; the texels job carries no queue or value, so aq_last/async_fences_done ignore it. A present can queue behind the texels job, but that is the same serialisation the old replay_mu flush had, and no cycle exists with a fence: async_wait_fence waits for submits to be recorded, and the texels job is not a submit.
  • Our lanes: no hunk overlap — #2211's hunks are invalidate, enqueue, the job loop and the three new functions; the barrier-split branch is vk_texture.cpp plus one vk_replay.cpp frame-line hunk, and the #1988 line fix is SlowWatch/do_present — rebase only. The measurement pin is the same as for #2212: a #1988 present/texture-stall A/B must have both RX_VK_ASYNC_PARTS and RX_VK_ASYNC_FENCES on the same side in both arms.

No approval (WIP), and no claim on it.

**Read of `9751e510` on main `a2dc5385` (+395, five files).** The design is careful, `=0` is main exactly, and the test is real. The strongest thing is that #2211 does not only shorten texture readbacks: it also puts a catch-up back on the ordinary buffer readback — the one the code says was removed for 7.5–11 ms a readback — and it ships on with no run. **1. The buffer readback gains the catch-up its own comment says was removed.** With `parts` on (the default), any readback of a range with a live write-back now runs `async_catch_up()` (`gpu/vk/vk_replay.cpp:4071-4078`), which waits until the replay thread has reached the last submit handed over before the read (`async_catch_up`, `:7878-7894`). The paragraph directly above the line still reads "RX_VK_ASYNC=1, the render thread: no catch-up either … Catching up instead (the older replay thread, removed) held the game's job threads for the whole replay of the frame, 7.5-11 ms a readback in the Market, and forced half of the stopped submissions past their waits (the flashes)" (`:4046-4053`). The new catch-up drops the forcing (which is the better half of that fix) but keeps the wait for the replay to reach the read, which is where the 7.5–11 ms went; and `w = !behind || exact || parts` now reports every such read as one that waited (`:4078`). The description frames the win as the texture path and says "The result expected: shorter readback waits"; on this path the wait is longer than main's (which was none). OoT's exposure-meter read is exactly this path, once a frame. If the catch-up is only there to make the writer's part known, main already falls back to `wait_recorded`/`readback_wait_value` when it is not — so what does it buy that the A/B can show? If it is needed, the comment above needs replacing, not just appending to. **2. Default vs evidence.** Same as #2212: `RX_VK_ASYNC_PARTS` ships on (`switches.def:302`) while Measurements says "no measurement chose that default yet" and Testing says "It has NOT run in the game on this PC yet". `RX_VK_ASYNC` is Auto-on from 4 physical cores, so this is most PCs' readback path. The in-game ABBA (unset lower than `=0` and than main, `=0` the same as main) is the evidence the switch rule asks for; until it exists the measured side is `=0`. With the buffer-path point above, I would hold the default off (`attempt`) until then. **The spot checks:** - **Which waits split:** the texture-storage path drops `wait_queue_empty()` for `async_catch_up()` then a `JOB_TEXELS_TO_GUEST` job that runs `texture_flush_to_guest` (the job's own flush does a bounded GPU readback wait, `flush_textures` → `readback_submit_wait`), and `invalidate` returns without taking `replay_mu` (`:4263-4285`); and the buffer path gains the catch-up above. The writer's part wait (`wait_recorded_part`/`wait_recorded`) is unchanged. - **Deadlock:** none found. Nothing waits on a submit not yet enqueued: `async_catch_up` captures `q_last_submit` at the call, the texels job is enqueued after that and before any later submit, and a part's signal only depends on the recordings' timeline advancing, which the replay does itself. The `q_reached` waits are under `q_mu` against `q_done` incremented there, and the notify is after `q_done++` (`:7795-7801`), so no lost wakeup. Two bounded stalls to know about, both pre-existing in `wait_queue_empty`: a readback with a blocked queue waits for *every* job handed over before it (`:7887`), which can include a held present, so up to the replay's `hold_ms`; and the `ev_wait_in_memory` fallback is an unbounded `wait_queue_empty` (`:7891-7893`) — that one is documented as the guest-memory-event case. - **Off path:** `=0` is main: `parts` false leaves `else if (behind)` with only the `exact` test, `w` as before, `sync_settle`/`wait_queue_empty` then `texture_flush_to_guest` under `replay_mu` for textures. `enqueue`'s new `seq`/`q_last_submit`/`q_present_value` writes and the two thread-local counters are inert. - **The test:** real, not a parse check — it cuts and runs `async_catch_up` and `async_texels_to_guest` against a stand-in queue (`tests/test_async_parts.py:87-132`) and asserts the wiring (`:225-244`), so on main it fails at the extraction. Gaps: the stand-in replay only advances while a waiter is present and its `wait_queue_empty` only counts, so a lost wakeup or the unbounded fallback is not exercised; and `invalidate` is only grepped, so the new buffer catch-up is asserted to exist — where it fires and what it costs is not. - **With #2212:** they compose. The shared `q_reached`/`q_reach_waiters` is notified after `q_done++` and by `async_fences_done` under `q_mu`, so a catch-up waiter and a fence waiter cannot miss each other; the texels job carries no queue or value, so `aq_last`/`async_fences_done` ignore it. A present can queue behind the texels job, but that is the same serialisation the old `replay_mu` flush had, and no cycle exists with a fence: `async_wait_fence` waits for submits to be recorded, and the texels job is not a submit. - **Our lanes:** no hunk overlap — #2211's hunks are `invalidate`, `enqueue`, the job loop and the three new functions; the barrier-split branch is `vk_texture.cpp` plus one `vk_replay.cpp` frame-line hunk, and the #1988 line fix is `SlowWatch`/`do_present` — rebase only. The measurement pin is the same as for #2212: a #1988 present/texture-stall A/B must have **both** `RX_VK_ASYNC_PARTS` and `RX_VK_ASYNC_FENCES` on the same side in both arms. No approval (WIP), and no claim on it.
- async_parts: env_on, off unless set. Nothing has measured it in the game yet, and with RX_VK_ASYNC Auto-on from 4
  physical cores it would be most PCs' readback path; off, the render thread's readbacks are main's (dazemc, 72494 point 2,
  as for RX_VK_ASYNC_FENCES in 72465). =1 turns it on; the log says so, and that it is not in use without RX_VK_ASYNC=1 or
  with RX_VK_PER_QUEUE_FENCES=0.
- gpu/vk/switches.def: kind attempt; the row says what unset does now and the shared rule: unset, blank (spaces only) or 0,
  false, off or no in any case are off; any other value is on.
- tests/test_async_parts.py: the switch read in fresh processes off when unset (unset 0, 0 0, 1 1, 2 1, off 0), the reader
  and the row checked, and off the readback's and a texture's catch-ups and write-back main's lines.

Assisted-by: Claude Code
- The stand-in replay thread finishes the jobs on its own, a waiter or not, and tells the waiters as replay_thread_main does
  (before: only while a reader waited). New cases: jobs finished while nobody waited (no wait), the texels' job done at
  its hand-over before its reader looks (not waited for, no demand on the frame gate), wakeups for the jobs before the
  texels' job (they do not end its wait), and 200 reads racing the replay; a watchdog fails a wait that does not end.
- wait_queue_empty is the render thread's (every job handed over before it done, taking q_mu itself), not a count: the
  catch-up with an event in guest memory returns false only once the whole queue is done.
- invalidate's texture-storage path is cut and run (before: grepped): with the switch the texels go by the replay thread's
  job and the reading thread waits for no queue and takes no replay_mu; off, main's way (the whole queue twice, then the
  texels under replay_mu).

(dazemc, 72494, the test's gaps.) Mutants: async_texels_to_guest's wait without its condition, its early return when the job
is already done gone, the guest-memory fallback taken under q_mu, and its texels' return after replay_mu is taken, each
fail here and pass the test before.

Assisted-by: Claude Code
invalidate's buffer readback with the switch on runs async_catch_up (the replay thread to reach the last submit handed over
before the read) and counts the read as one that waited (w = !behind || exact || parts). On main the render thread has no
catch-up there: the comment above it says catching up held the game's job threads for the replay of the frame, 7.5-11 ms
a readback in the Market; the read takes the write-backs recorded so far and waits for those by part (dazemc, 72494
point 1). This adds none of it back with the switch on.

The test cuts that catch-up out of invalidate and runs it with invalidate's values as stand-ins: on the render thread with
the switch on or off no catch-up, no wait for the queue and not counted as a wait; RX_VK_READBACK_EXACT, the submitting
thread and the forced replay as before. Fails here: the switch on catches up.

Assisted-by: Claude Code
fix(vk): with RX_VK_ASYNC_PARTS a buffer readback no longer catches up: main's again
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
beanstalk/approval changed since the request: ask again
756da265b1
The branch (bd3ea307) put async_catch_up on the buffer readback when the render thread's readback there still waited for
the whole queue, forced, then the main timeline (its note: Kokiri Forest, i7-9700, 54-58 ms of readback waits a frame);
the catch-up to the last submit was shorter than that. Main has since taken that wait out: on the render thread a buffer
readback takes the write-backs recorded so far and waits for those by part, and the work still queued reads the CPU's
answer later (memory_rb_refresh). Ported onto that, the catch-up added a wait for the replay of every submit handed over
before the read, which is where the removed catch-up's 7.5-11 ms a readback in the Market went, then a part wait for the
newest work it had just recorded (dazemc, 72494 point 1).

- invalidate's buffer readback is main's line for line, the switch on or off; the comment above it holds as it is.
- What only that catch-up fed goes: the readbacks' RX_VK_ASYNC_PARTS line every 3000 calls (async_rb), the counters
  async_queue_waits and async_real_waits, async_present_value and q_present_value. tests/test_readback_part.py is main's
  again (its stand-ins for them are gone).
- The switch, its row, the log line and the comments say what is left: a readback over a texture's storage waits for the
  submits handed over before it, not the whole queue, and its texels go back by a job of the replay thread's.

Nothing the buffer readback reads moves with the switch on: memory_writeback_value's pages are noted at the replay's part
ends, its part wait is the recordings' timeline's, and memory_rb_refresh is the recording's; the texels' job only writes
textures' texels into guest memory and their own state (texture_flush_to_guest).

Test: tests/test_async_parts.py (the commit before: fails without this, the switch on catches up).

Assisted-by: Claude Code
siantm changed title from WIP: perf(vk): with the render thread, a readback can wait for its place in the queue and its write-back's part (RX_VK_ASYNC_PARTS) to WIP: perf(vk): with the render thread, a readback over a texture's storage waits for its place in the queue, not the whole queue (RX_VK_ASYNC_PARTS) 2026-11-22 09:13:38 +00:00
Author
Contributor

Thank you for the read. New head 756da265 on main a2dc5385: 9751e510 unchanged, four commits on it.

  1. You were right. The branch (bd3ea307) put the catch-up on the buffer readback while the render thread's buffer readback there still waited for the whole queue, forced, then the main timeline (its note: Kokiri Forest, i7-9700, 54-58 ms of readback waits a frame), so there it was the shorter wait. Main has since taken that wait out (:4046-4053), and ported onto main it only added waits: the replay of every submit handed over before the read, the wait the removed catch-up's 7.5-11 ms went into, then the part of the newest work it had just recorded. The buffer path needs none of it for what this claims, which is the texture-storage readback. Test first, 78652994 (the catch-up block of invalidate cut and run: on the render thread, the switch on or off, no catch-up, no wait for the queue, not counted as a wait; it fails at the first push's code), then 756da265: the buffer readback is main's line for line, the switch on or off, so the comment above it holds as it stands. Gone with it, as only it fed them: the readbacks' RX_VK_ASYNC_PARTS line every 3000 calls (async_rb), async_queue_waits, async_real_waits, async_present_value and q_present_value; tests/test_readback_part.py is main's again. Nothing the buffer read depends on moves with the switch on: memory_writeback_value's pages are noted at the replay's part ends, its part wait is the recordings' timeline's, memory_rb_refresh is the recording's, and the texels' job writes only textures' texels into guest memory and their own state. The title and the description now claim the texture-storage path only.

  2. Done in 8386cf0a: RX_VK_ASYNC_PARTS ships off, kind attempt: env_on, its row, the log line, the test's switch read (off when unset) and the description, which says the on side is proposed and unmeasured. The A/B sets =1.

The test (a8d87dcd, 78652994): the stand-in replay now finishes jobs on its own, a waiter or not, and tells the waiters as replay_thread_main does; wait_queue_empty is the render thread's (every job handed over before it done, taking q_mu); new cases: jobs finished while nobody waited, the texels' job done at its hand-over before its reader looks, wakeups for the jobs before the texels' job, 200 reads racing the replay, and a watchdog that fails a wait that does not end. invalidate's texture-storage end and its buffer catch-up are cut and run, not grepped. Mutants that fail the new test and passed the old one: the texels' wait without its condition (a lost wakeup), its early return gone, the guest-memory fallback taken under q_mu, and the texels' return moved after replay_mu is taken.

Deadlock: thank you; the two bounded stalls you name, both from wait_queue_empty, are in Risks as kept from main (a stopped queue: every job before the read, a held present up to hold_ms; an event in guest memory: the whole-queue wait, unbounded).

With #2212 and our lanes: agreed; both switches are off by default now, and Still to test pins them to the same side in both arms of any #1988 present or texture-stall A/B.

Checks (one queue job, fx2212-r1): its own checks pass at the head; tests/test_async_parts.py fails at 78652994 and passes at 756da265; every mutant above fails at the head; --changed a2dc5385 145 passed, 11 failed, each failing on main too; the renderer compiles and links. Pushed with a lease, 9751e510 unchanged under the new commits.

No game run yet; the description is updated.

Thank you for the read. New head `756da265` on main `a2dc5385`: `9751e510` unchanged, four commits on it. 1. You were right. The branch (bd3ea307) put the catch-up on the buffer readback while the render thread's buffer readback there still waited for the whole queue, forced, then the main timeline (its note: Kokiri Forest, i7-9700, 54-58 ms of readback waits a frame), so there it was the shorter wait. Main has since taken that wait out (`:4046-4053`), and ported onto main it only added waits: the replay of every submit handed over before the read, the wait the removed catch-up's 7.5-11 ms went into, then the part of the newest work it had just recorded. The buffer path needs none of it for what this claims, which is the texture-storage readback. Test first, `78652994` (the catch-up block of `invalidate` cut and run: on the render thread, the switch on or off, no catch-up, no wait for the queue, not counted as a wait; it fails at the first push's code), then `756da265`: the buffer readback is main's line for line, the switch on or off, so the comment above it holds as it stands. Gone with it, as only it fed them: the readbacks' `RX_VK_ASYNC_PARTS` line every 3000 calls (`async_rb`), `async_queue_waits`, `async_real_waits`, `async_present_value` and `q_present_value`; `tests/test_readback_part.py` is main's again. Nothing the buffer read depends on moves with the switch on: `memory_writeback_value`'s pages are noted at the replay's part ends, its part wait is the recordings' timeline's, `memory_rb_refresh` is the recording's, and the texels' job writes only textures' texels into guest memory and their own state. The title and the description now claim the texture-storage path only. 2. Done in `8386cf0a`: `RX_VK_ASYNC_PARTS` ships off, kind `attempt`: `env_on`, its row, the log line, the test's switch read (off when unset) and the description, which says the on side is proposed and unmeasured. The A/B sets `=1`. The test (`a8d87dcd`, `78652994`): the stand-in replay now finishes jobs on its own, a waiter or not, and tells the waiters as `replay_thread_main` does; `wait_queue_empty` is the render thread's (every job handed over before it done, taking `q_mu`); new cases: jobs finished while nobody waited, the texels' job done at its hand-over before its reader looks, wakeups for the jobs before the texels' job, 200 reads racing the replay, and a watchdog that fails a wait that does not end. `invalidate`'s texture-storage end and its buffer catch-up are cut and run, not grepped. Mutants that fail the new test and passed the old one: the texels' wait without its condition (a lost wakeup), its early return gone, the guest-memory fallback taken under `q_mu`, and the texels' return moved after `replay_mu` is taken. Deadlock: thank you; the two bounded stalls you name, both from `wait_queue_empty`, are in Risks as kept from main (a stopped queue: every job before the read, a held present up to `hold_ms`; an event in guest memory: the whole-queue wait, unbounded). With #2212 and our lanes: agreed; both switches are off by default now, and Still to test pins them to the same side in both arms of any #1988 present or texture-stall A/B. Checks (one queue job, `fx2212-r1`): its own checks pass at the head; `tests/test_async_parts.py` fails at `78652994` and passes at `756da265`; every mutant above fails at the head; `--changed a2dc5385` 145 passed, 11 failed, each failing on main too; the renderer compiles and links. Pushed with a lease, `9751e510` unchanged under the new commits. No game run yet; the description is updated.
Author
Contributor

@Beanstalk This replaces my request 71757, made for the earlier head 9751e510, where the switch was on by default. This adds RX_VK_ASYNC_PARTS, an attempt off by default: with RX_VK_ASYNC_PARTS=1 and Threaded rendering on (the default), a readback over a texture's storage waits only for the part of the submission that writes it back (gpu/vk); unset, it is main's way. Please start from the kokiri-start save and take the picture 5 s (300 frames at 60 fps) after the first frame whose picture is not a single uniform colour, with no input in between (a picture during the load's fade-in from black is not comparable), with a main-against-itself picture on the same PC from the same point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, off) and with RX_VK_ASYNC_PARTS=1 (on), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. RX_VK_ASYNC_FENCES stays unset on every side. The same picture as main within main's own difference from itself; unset, frame time p99 equal to main's; with RX_VK_ASYNC_PARTS=1, equal to unset or better, within the run-to-run spread. The log must have no FATAL, device lost or validation error line. No hang, no exposure flash and no fog from the frame before in any picture. Please report the log's "vk: readbacks of GPU results" lines (what the readbacks waited for) on both sides.

@Beanstalk This replaces my request 71757, made for the earlier head 9751e510, where the switch was on by default. This adds RX_VK_ASYNC_PARTS, an attempt off by default: with RX_VK_ASYNC_PARTS=1 and Threaded rendering on (the default), a readback over a texture's storage waits only for the part of the submission that writes it back (gpu/vk); unset, it is main's way. Please start from the kokiri-start save and take the picture 5 s (300 frames at 60 fps) after the first frame whose picture is not a single uniform colour, with no input in between (a picture during the load's fade-in from black is not comparable), with a main-against-itself picture on the same PC from the same point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, off) and with RX_VK_ASYNC_PARTS=1 (on), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. RX_VK_ASYNC_FENCES stays unset on every side. The same picture as main within main's own difference from itself; unset, frame time p99 equal to main's; with RX_VK_ASYNC_PARTS=1, equal to unset or better, within the run-to-run spread. The log must have no FATAL, device lost or validation error line. No hang, no exposure flash and no fog from the frame before in any picture. Please report the log's "vk: readbacks of GPU results" lines (what the readbacks waited for) on both sides.
Member

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

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

Description: corrected where this can show anything. This PC's game logs on disk (182 runs with Threaded rendering on: Kokiri Forest, the Market, Hyrule Field, Link's house) show no readback over a live texture's storage: the render thread's per-600-presents count of such readbacks was 0 throughout, and no run reached the line logged once per 300 readbacks over a texture the GPU wrote. So Kokiri Forest and Hyrule Field, which Still to test named, may not reach the change at all. Still to test now starts with a census on main over ten scenes, and the A/B (unset against RX_VK_ASYNC_PARTS=1, 8 runs a side) goes to the scene where the census finds those readbacks. No code change; head still 756da265.

Description: corrected where this can show anything. This PC's game logs on disk (182 runs with Threaded rendering on: Kokiri Forest, the Market, Hyrule Field, Link's house) show no readback over a live texture's storage: the render thread's per-600-presents count of such readbacks was 0 throughout, and no run reached the line logged once per 300 readbacks over a texture the GPU wrote. So Kokiri Forest and Hyrule Field, which Still to test named, may not reach the change at all. Still to test now starts with a census on main over ten scenes, and the A/B (unset against `RX_VK_ASYNC_PARTS=1`, 8 runs a side) goes to the scene where the census finds those readbacks. No code change; head still `756da265`.
Author
Contributor

@Beanstalk This replaces my request 72691 on this head and the corrections under it, in a form the farm can run: it cannot time a picture from the first frame that is not a uniform colour (its answer on #2131), so each picture here follows a fixed wait after the map event. This adds RX_VK_ASYNC_PARTS, an attempt off by default: with RX_VK_ASYNC_PARTS=1 and Threaded rendering on (the default), a readback over a texture's storage waits only for the part of the submission that writes it back (gpu/vk); unset, it is main's way. Please start from the kokiri-start save and take the picture 10 s (600 frames at 60 fps) after the map event that ends the load, a fixed wait with no input in between (the farm cannot time it from the first frame that is not a uniform colour), with a main-against-itself picture on the same PC from the same point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, off) and with RX_VK_ASYNC_PARTS=1 (on), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. RX_VK_ASYNC_FENCES stays unset on every side. The same picture as main within main's own difference from itself; unset, frame time p99 equal to main's; with RX_VK_ASYNC_PARTS=1, equal to unset or better, within the run-to-run spread. The log must have no FATAL, device lost or validation error line. No hang, no exposure flash and no fog from the frame before in any picture. Please report the log's "vk: readbacks of GPU results" lines (what the readbacks waited for) on both sides.

@Beanstalk This replaces my request 72691 on this head and the corrections under it, in a form the farm can run: it cannot time a picture from the first frame that is not a uniform colour (its answer on #2131), so each picture here follows a fixed wait after the map event. This adds RX_VK_ASYNC_PARTS, an attempt off by default: with RX_VK_ASYNC_PARTS=1 and Threaded rendering on (the default), a readback over a texture's storage waits only for the part of the submission that writes it back (gpu/vk); unset, it is main's way. Please start from the kokiri-start save and take the picture 10 s (600 frames at 60 fps) after the map event that ends the load, a fixed wait with no input in between (the farm cannot time it from the first frame that is not a uniform colour), with a main-against-itself picture on the same PC from the same point; then, for frame times only, play Kokiri Forest and Hyrule Field, two minutes each; at least two starts a side, interleaved, the PR against main on the same PC, on the PR's side unset (the default, off) and with RX_VK_ASYNC_PARTS=1 (on), on Windows with an RTX 4070, Windows with an Arc B580, Linux with an RX 6600 (RADV) and the Steam Deck. RX_VK_ASYNC_FENCES stays unset on every side. The same picture as main within main's own difference from itself; unset, frame time p99 equal to main's; with RX_VK_ASYNC_PARTS=1, equal to unset or better, within the run-to-run spread. The log must have no FATAL, device lost or validation error line. No hang, no exposure flash and no fog from the frame before in any picture. Please report the log's "vk: readbacks of GPU results" lines (what the readbacks waited for) on both sides.
Member

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

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

Windows 11 + AMD Radeon 860M (Ryzen AI 7 350, RDNA 3.5 iGPU, Adrenalin 26.10.1 LLPC) check, built from the follow-up PR #2212 head c314a21e (which stacks directly on #2211 756da265 over main a2dc5385, longshot_vk.dll pack).

Why one build from #2212 tests #2211

#2212 is the follow-up PR stacked on #2211 (sharing #2211's q_reached condition variable). All #2212 changes are gated behind RX_VK_ASYNC_FENCES (off by default, explicitly set to RX_VK_ASYNC_FENCES=0 here), so with RX_VK_ASYNC_FENCES=0 the binary runs #2211's exact code path (async_fences() false, leaving fence_q, wait_inner, and enqueue unchanged).

Settings: dev.py ab --separate --runs 3 --seconds 45 --warmup 10, 67% render scale (2560x1440 output), uncapped (HOS_FPS_MAX=1000), V-Sync and framegen off, RX_VK_ASYNC=1, RX_VK_ASYNC_FENCES=0.

Key finding: #2211's path did not fire in standing dev.py ab scenes

Across all 12 runs here (market and kokiri-forest) — and all 24 runs of the follow-up #2212 A/B across 4 scenes (market, kokiri-forest, hyrule-field, deku-tree, 36 runs total) — every vk: the render thread log line reported 0 in one texture-storage readbacks and 0 catch-ups during play:

# market A1 (=0)
[hos host] vk: the render thread (600 presents, 35.21 ms a frame): its jobs 14.22 ms a frame (submits 3.79, presents 0.39, others 10.04), idle 20.99; the game waited for room at 0 presents, 0.00 ms each (0.00 a frame; 5.12 jobs queued at a present); 0 catch-ups (a finish, a texture read back, a write-back not recorded yet: 0), 0.00 ms each; 0 presents held for the CPU's signal, 0.00 ms each (0 let go by RX_VK_HOLD_MS); 487 captures at a CPU signal; the submits' waits read in 0.077 ms a frame; readbacks: 3000 next to a texture's storage (no catch-up), 0 in one, 0 read exactly (after the work handed over: among the catch-ups); a present made 13.09 ms after its hand-over (26.73 at most)

# market B1 (=1)
[hos host] vk: the render thread (600 presents, 31.12 ms a frame): its jobs 13.22 ms a frame (submits 2.63, presents 0.35, others 10.24), idle 17.90; the game waited for room at 0 presents, 0.00 ms each (0.00 a frame; 5.42 jobs queued at a present); 0 catch-ups (a finish, a texture read back, a write-back not recorded yet: 0), 0.00 ms each; 0 presents held for the CPU's signal, 0.00 ms each (0 let go by RX_VK_HOLD_MS); 533 captures at a CPU signal; the submits' waits read in 0.069 ms a frame; readbacks: 3000 next to a texture's storage (no catch-up), 0 in one, 0 read exactly (after the work handed over: among the catch-ups); a present made 12.21 ms after its hand-over (50.26 at most)

Since 756da265 removed the buffer-readback catch-up, RX_VK_ASYNC_PARTS=1 only acts on readbacks in a GPU-written texture's storage (in one > 0). Because none occurred in these standing scenes, the numbers below are not a measured speedup for #2211 — they are a Windows AMD stability / no-regression check (=1 variance vs =0).

Results (stability / no-regression only — 0 in one readbacks)

Market (market, standing, 3 matched pairs):

Metric RX_VK_ASYNC_PARTS=0 (A1 / A2 / A3) RX_VK_ASYNC_PARTS=1 (B1 / B2 / B3) Notes
FPS 28.4 / 32.2 / 30.0 (median 30.0) 32.2 / 32.6 / 31.2 (median 32.2) Run-to-run spread (0 in one)
1% low FPS 25.3 / 28.5 / 20.8 (median 25.3) 27.6 / 27.6 / 26.9 (median 27.6) —
Median frame time 35.07 / 30.99 / 32.72 ms (32.72 ms) 30.96 / 30.54 / 31.90 ms (30.96 ms) —
p99 frame time 39.45 / 35.11 / 48.16 ms (39.45 ms) 36.20 / 36.28 / 37.22 ms (36.28 ms) —

Kokiri Forest (kokiri-forest, standing; B2 excluded for kokiri-start spot mismatch):

  • B2 (39.0 fps, 25.55 ms median) teleported early (35.4 s vs 37.6–40.1 s) and landed at the lighter kokiri-start spot (1287 textures / 2658 MB vs 1517–1561 textures / 2731–2936 MB on all other 5 runs), so it is excluded.
  • Matched-spot runs: =0 (A1 / A2 / A3): 32.0 / 31.9 / 31.8 fps, 1% low 28.9 / 28.1 / 28.4 fps, p99 34.65 / 35.64 / 35.19 ms; =1 (B1 / B3): 29.9 / 32.2 fps, 1% low 20.4 / 28.6 fps, p99 49.02 / 34.95 ms.

Logs, follow-up (#2212), and limits

  • Stability: 0 FATAL, VK_ERROR, device-lost, or validation lines across all 12 runs; vk: RX_VK_ASYNC_PARTS=1 (an attempt, off unless set) logged on all =1 runs.
  • Follow-up #2212: The stacked follow-up PR #2212 (RX_VK_ASYNC_FENCES) was also A/B tested additively on top of RX_VK_ASYNC_PARTS=1 across 4 scenes on this PC (market, kokiri-forest, hyrule-field, deku-tree): 0 errors, with frame times falling within GPU-bound run-to-run variance at 67% render scale of 2560x1440 (~30 fps, 12.0–26.2 ms/frame fence waits / 23.0–51.0 ms/frame total across threads in vk: host time in GPU resource waits).
  • Limits & what's needed: Standing dev.py ab scenes, GPU-bound at 67% render scale on an 8-CU iGPU (where RX_VK_ASYNC=1 is forced on a non-mirrored iGPU, vs Auto off on main). Benchmarking #2211's actual path will require a scene/route or interaction that produces in one > 0 texture-storage readbacks (e.g., pause menu / save thumbnail).
Windows 11 + AMD Radeon 860M (Ryzen AI 7 350, RDNA 3.5 iGPU, Adrenalin 26.10.1 LLPC) check, built from the follow-up PR #2212 head `c314a21e` (which stacks directly on #2211 `756da265` over `main` `a2dc5385`, `longshot_vk.dll` pack). ### Why one build from `#2212` tests `#2211` `#2212` is the follow-up PR stacked on `#2211` (sharing `#2211`'s `q_reached` condition variable). All `#2212` changes are gated behind `RX_VK_ASYNC_FENCES` (off by default, explicitly set to `RX_VK_ASYNC_FENCES=0` here), so with `RX_VK_ASYNC_FENCES=0` the binary runs `#2211`'s exact code path (`async_fences()` false, leaving `fence_q`, `wait_inner`, and `enqueue` unchanged). Settings: `dev.py ab --separate --runs 3 --seconds 45 --warmup 10`, 67% render scale (2560x1440 output), uncapped (`HOS_FPS_MAX=1000`), V-Sync and framegen off, `RX_VK_ASYNC=1`, `RX_VK_ASYNC_FENCES=0`. ### Key finding: `#2211`'s path did not fire in standing `dev.py ab` scenes Across all 12 runs here (`market` and `kokiri-forest`) — and all 24 runs of the follow-up `#2212` A/B across 4 scenes (`market`, `kokiri-forest`, `hyrule-field`, `deku-tree`, 36 runs total) — every `vk: the render thread` log line reported **`0 in one`** texture-storage readbacks and `0 catch-ups` during play: ```text # market A1 (=0) [hos host] vk: the render thread (600 presents, 35.21 ms a frame): its jobs 14.22 ms a frame (submits 3.79, presents 0.39, others 10.04), idle 20.99; the game waited for room at 0 presents, 0.00 ms each (0.00 a frame; 5.12 jobs queued at a present); 0 catch-ups (a finish, a texture read back, a write-back not recorded yet: 0), 0.00 ms each; 0 presents held for the CPU's signal, 0.00 ms each (0 let go by RX_VK_HOLD_MS); 487 captures at a CPU signal; the submits' waits read in 0.077 ms a frame; readbacks: 3000 next to a texture's storage (no catch-up), 0 in one, 0 read exactly (after the work handed over: among the catch-ups); a present made 13.09 ms after its hand-over (26.73 at most) # market B1 (=1) [hos host] vk: the render thread (600 presents, 31.12 ms a frame): its jobs 13.22 ms a frame (submits 2.63, presents 0.35, others 10.24), idle 17.90; the game waited for room at 0 presents, 0.00 ms each (0.00 a frame; 5.42 jobs queued at a present); 0 catch-ups (a finish, a texture read back, a write-back not recorded yet: 0), 0.00 ms each; 0 presents held for the CPU's signal, 0.00 ms each (0 let go by RX_VK_HOLD_MS); 533 captures at a CPU signal; the submits' waits read in 0.069 ms a frame; readbacks: 3000 next to a texture's storage (no catch-up), 0 in one, 0 read exactly (after the work handed over: among the catch-ups); a present made 12.21 ms after its hand-over (50.26 at most) ``` Since `756da265` removed the buffer-readback catch-up, `RX_VK_ASYNC_PARTS=1` only acts on readbacks *in* a GPU-written texture's storage (`in one > 0`). Because none occurred in these standing scenes, the numbers below are **not** a measured speedup for `#2211` — they are a **Windows AMD stability / no-regression check** (`=1` variance vs `=0`). ### Results (stability / no-regression only — `0 in one` readbacks) **Market (`market`, standing, 3 matched pairs):** | Metric | `RX_VK_ASYNC_PARTS=0` (A1 / A2 / A3) | `RX_VK_ASYNC_PARTS=1` (B1 / B2 / B3) | Notes | |---|---|---|---| | FPS | `28.4 / 32.2 / 30.0` (median **30.0**) | `32.2 / 32.6 / 31.2` (median **32.2**) | Run-to-run spread (`0 in one`) | | 1% low FPS | `25.3 / 28.5 / 20.8` (median **25.3**) | `27.6 / 27.6 / 26.9` (median **27.6**) | — | | Median frame time | `35.07 / 30.99 / 32.72 ms` (**32.72 ms**) | `30.96 / 30.54 / 31.90 ms` (**30.96 ms**) | — | | p99 frame time | `39.45 / 35.11 / 48.16 ms` (**39.45 ms**) | `36.20 / 36.28 / 37.22 ms` (**36.28 ms**) | — | **Kokiri Forest (`kokiri-forest`, standing; `B2` excluded for `kokiri-start` spot mismatch):** - `B2` (`39.0 fps`, `25.55 ms` median) teleported early (`35.4 s` vs `37.6–40.1 s`) and landed at the lighter `kokiri-start` spot (`1287` textures / `2658 MB` vs `1517–1561` textures / `2731–2936 MB` on all other 5 runs), so it is excluded. - Matched-spot runs: `=0` (`A1 / A2 / A3`): `32.0 / 31.9 / 31.8` fps, 1% low `28.9 / 28.1 / 28.4` fps, p99 `34.65 / 35.64 / 35.19 ms`; `=1` (`B1 / B3`): `29.9 / 32.2` fps, 1% low `20.4 / 28.6` fps, p99 `49.02 / 34.95 ms`. ### Logs, follow-up (`#2212`), and limits - **Stability:** 0 `FATAL`, `VK_ERROR`, device-lost, or validation lines across all 12 runs; `vk: RX_VK_ASYNC_PARTS=1 (an attempt, off unless set)` logged on all `=1` runs. - **Follow-up `#2212`:** The stacked follow-up PR `#2212` (`RX_VK_ASYNC_FENCES`) was also A/B tested additively on top of `RX_VK_ASYNC_PARTS=1` across 4 scenes on this PC (`market`, `kokiri-forest`, `hyrule-field`, `deku-tree`): 0 errors, with frame times falling within GPU-bound run-to-run variance at 67% render scale of 2560x1440 (`~30 fps`, `12.0–26.2 ms/frame` fence waits / `23.0–51.0 ms/frame` total across threads in `vk: host time in GPU resource waits`). - **Limits & what's needed:** Standing `dev.py ab` scenes, GPU-bound at 67% render scale on an 8-CU iGPU (where `RX_VK_ASYNC=1` is forced on a non-mirrored iGPU, vs `Auto` off on `main`). Benchmarking `#2211`'s actual path will require a scene/route or interaction that produces `in one > 0` texture-storage readbacks (e.g., pause menu / save thumbnail).
Author
Contributor

@Jer9 thank you for this, and for reading the render thread's line before the frame times: that is the right reading. Your run is now in Measurements as a third party's, with the limits you gave (iGPU, GPU-bound at 67 %, three runs a side, RX_VK_ASYNC=1 forced where main's Auto leaves it off).

Our own logs agree. On this PC, 492 game runs on disk carry that line, 10,491 lines in all, and every one reads 0 in one. No run has logged a readback in a live texture's storage. So this change has not yet been seen to act in play on any PC, and the description now says so first.

On your suggestion: the code shows one interaction that is likely to read a rendered picture back. A save writes a JPEG thumbnail of the scene into caption.sav, which the file select shows (host/control.c). Whether that read, or anything in the pause menu, lands in a texture's storage the GPU wrote, our code cannot tell, because the game decides how it makes the picture. So I've set up the smallest run that would show it: two scripted starts on main from kokiri-start, Threaded rendering on. One opens and closes the pause menu six times. The other answers the save prompt twice and checks that the save's files changed. It counts in one and the live-storage lines in each start. If either reaches it, the A/B runs there.

@Jer9 thank you for this, and for reading the render thread's line before the frame times: that is the right reading. Your run is now in Measurements as a third party's, with the limits you gave (iGPU, GPU-bound at 67 %, three runs a side, `RX_VK_ASYNC=1` forced where main's Auto leaves it off). Our own logs agree. On this PC, 492 game runs on disk carry that line, 10,491 lines in all, and every one reads `0 in one`. No run has logged `a readback in a live texture's storage`. So this change has not yet been seen to act in play on any PC, and the description now says so first. On your suggestion: the code shows one interaction that is likely to read a rendered picture back. A save writes a JPEG thumbnail of the scene into `caption.sav`, which the file select shows (`host/control.c`). Whether that read, or anything in the pause menu, lands in a texture's storage the GPU wrote, our code cannot tell, because the game decides how it makes the picture. So I've set up the smallest run that would show it: two scripted starts on main from `kokiri-start`, Threaded rendering on. One opens and closes the pause menu six times. The other answers the save prompt twice and checks that the save's files changed. It counts `in one` and the live-storage lines in each start. If either reaches it, the A/B runs there.
Author
Contributor

@Jer9 your suggestion was tried (Measurements, Verdict): on this PC, on main with Threaded rendering on, the pause menu opened and closed six times, and a scripted save through the pause menu made one confirmed save (the save slot's thumbnail written again). Neither produced a readback inside a GPU-written texture's storage, the one path this changes: every render-thread line read 0 in one, as in the 492 runs on disk and your 36.

So the change has not been made to act by any means tried, and it is withdrawn, with #2212, which is built on it. Thank you for your runs and the suggestion. The branch perf/vk-async-parts stays on the fork, and this can be reopened.

@Jer9 your suggestion was tried (Measurements, Verdict): on this PC, on main with Threaded rendering on, the pause menu opened and closed six times, and a scripted save through the pause menu made one confirmed save (the save slot's thumbnail written again). Neither produced a readback inside a GPU-written texture's storage, the one path this changes: every render-thread line read `0 in one`, as in the 492 runs on disk and your 36. So the change has not been made to act by any means tried, and it is withdrawn, with #2212, which is built on it. Thank you for your runs and the suggestion. The branch `perf/vk-async-parts` stays on the fork, and this can be reopened.
siantm closed this pull request 2026-11-24 02:00:49 +00:00
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
beanstalk/approval changed since the request: ask again

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 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!2211
No description provided.