perf(vk): Skip Upscaler Wait on GPUs whose upscale network does not translate, and late pages judged by the part that wrote them back #3212

Merged
HumanBean merged 8 commits from Veix/Longshot:perf/skip-tail-amd-late into main 2026-12-05 17:02:12 +00:00
Member

Summary

Skip Upscaler Wait now works on GPUs whose upscale network does not translate (AMD RX 6000 and older, NVIDIA GTX 10 and 16): on an RX 6800 XT with FSR 4, 75.1 -> 84.5 fps. And with the row on, a capture's page is no longer late while only the frame before's upscale and HUD are still on the GPU, and the render thread no longer waits for a late page's repair to read bytes the repair cannot change: on an RTX 4070 SUPER, 4K DLSS 99.8 -> 102.1 fps, 4K DLAA 77.9 -> 79.6.

On a GPU without cooperative matrices (or, on AMD, without WMMA) the game's upscale network is left out, and its pass is drawn in its place by the temporal upscaler or FSR 3.1 (upscale_stub). Skip Upscaler Wait finds the upscale by the program dispatch notes before it draws a network, and this path returned before that note: the part before the upscale was never cut, and the frame limiter waited for the whole frame on every frame, as with the row off. An RX 6800 XT's log with FSR 4: 0 of 10,796 frames waited up to their upscale.

With the row on, the game's next submits come while the frame before's upscale and HUD, its last parts, are still on the GPU. A page the CPU wrote that a write-back not done yet also writes is late, and gets a repair on the GPU (a 64 KB stamp block, 64 MB at most) or a wait. main judges that by the whole submission, so pages the frame before wrote back early in its frame were late until its upscale was done: on the market route here, about 75 % of the late pages had the part that wrote them back done already. Once the stamp table is full, each of them is a wait for the frame before's whole submission, upscale included.

With pages judged by their part, the stamp table no longer fills, and the pages still late get the GPU repair. The render thread reads some of them while it records (pointer tables, headers: submitted_read_locked), and such a read waited for the repair, which runs behind the frame before's upscale and HUD: on this PC +1.2 ms a frame of draw and descriptor recording, and the rule alone lost about 2 % there.

What this changes:

  • The upscale drawn in place of a network (upscale_stub, gpu/vk/vk_draw.cpp): where the temporal upscaler or FSR 3.1 drew the scene into the picture, its program is noted for the frame limiter's part (skip_tail_note_upscale), as dispatch does for the networks that translate; once, the log says so (vk: Skip Upscaler Wait: the gameplay upscale is network ...'s stand-in). A blit, a typed fallback or a movie's upscale is not noted.
  • The rule (late_replay::landed_by_part, gpu/vk/late_replay.h): a page late by its submission is not late when the part that recorded its newest write-back has reached its place on the recordings' timeline (vk_parts_reached, vk_part_seq over part_rec, gpu/vk/vk_replay.cpp) and no write in place of it is pending. Each part's write-backs are recorded at its end and noted just before its submit.
  • Where it is asked (late_landed_by_part, gpu/vk/vk_memory.cpp): at the capture (capture_make, the timeline read before the pages are copied), at the take (capture_late_at_replay, by the timeline the capture read) and in the repair's build (late_fix_build, for the pages it copies again from guest memory).
  • The read (late_read_same, called from late_fix_cpu_read, gpu/vk/vk_memory.cpp): a read of a page whose repair has not run takes the capture's copy with no wait when the page's write-backs the repair gives words of are done (by their submission, or their part), no capture or GPU write has given the page a newer generation since the take, the host's write mark of the page is clear, and guest memory holds the copy's bytes there. The repair writes a word only where such a write-back changed it, with that write-back's value, which is then in guest memory too: the copy's bytes are what the read would take after the repair. The page stays under its repair for its other bytes. The newest write-back is noted when the repair is recorded (late_fix_emit), the generation at the take.
  • The host's mark (MkwVkHost.page_written, API version 96, host/rx_backend.c): the soft write watch's mark of one page, read and left set, for a write of the game's after its newest submission, which no capture has taken yet. -1 where the build has no watch: the read waits.
  • As before: where the part is not known (not submitted yet, no timeline of its own, RX_VK_PER_QUEUE_FENCES=0) or a write in place is pending, a page is judged as on main. A counter the GPU counts and the game sets back to 0 now gets the game's 0 in the mirror at once.
  • The switches RX_VK_LATE_BY_PART (kill, on; =0: main's rule) and RX_VK_LATE_READ_SAME (kill, on; =0: the read waits for the repair), and RX_VK_TEST_LATE_READ_CHECK (diag: such reads wait too and are compared after the repair; the late pages' line counts them), with their rows in gpu/vk/switches.def.
  • RX_VK_MEM_CHECK counts the pages the rule did not call late as a path of their own (by a part done at the capture, with their replaced words), gpu/vk/mem_check.h.

Read first: upscale_stub in gpu/vk/vk_draw.cpp; landed_by_part in gpu/vk/late_replay.h; late_landed_by_part and its three callers, and late_read_same in gpu/vk/vk_memory.cpp.

Written with AI assistance (Claude); the commits carry Co-Authored-By: trailers.

Testing

Tested: Windows 11, RTX 4070 SUPER, driver 621.24; the walking route (market, castle, market), headless, 4K DLSS 67 %, the row on, this branch's build.

  • The upscale network forced onto the replacement path (RX_VK_FORCE_UPSCALE_STUB=2, as on an RX 6800 XT): the log names network 6676619641320ba7 as the stand-in, and 6,000 frames waited up to their upscale.
  • RX_VK_MEM_CHECK=1: 0 candidates written back from a mirror and not late, 0 takes unpaired (95,880).
  • RX_VK_TEST_LATE_READ_CHECK=1: every read the read rule let go waited for the repair too and was compared after it: 0 of them changed (the late pages' line: 142, 80, 96 a window, changed 0).
  • On #3178 (a diagnostic build with this change and a test form of the rule), an RX 6800 XT (AMD 26.11.2, FSR 4, 1280x720 -> 2560x1440), automatic states: the frame limiter waited up to the upscale on 3,572 of 3,600 frames with the row on (0 of 10,796 before).
  • Checks: tests/test_upscale_fallback.py (new cases: the scene drawn in place of a network is noted; not with the row off or no program bound; never for a blit, a typed fallback or a movie), failing on main and passing here. tests/test_late_by_part.py (new: the rule, the page tables, the timeline lookups and capture_late_at_replay cut from the source, with RX_VK_LATE_BY_PART on and at 0), tests/test_late_fix_build.py cases (t) and (u) to (z) (the read: a word the write-back did not write, read with no wait and left so by the repair; the word it wrote, a write-back not done, a newer generation, the mark set or not known, and the game putting the GPU's word back to its old value: the wait; run with RX_VK_LATE_READ_SAME on, at 0 and checked; each of the read's four conditions taken out of the source fails its case), tests/test_mem_check.py, g++ and clang++. The checks reading the changed files: 15 fail, the same 15 on main f359e2621 on this PC (shader headers not generated, and fixtures missing ui, order_watch_on, sync_watch_event_on). For the read and the host's mark, the checks reading the files they change: 178 pass, 12 skip, and tests/test_ui_renderer.py fails (a pop-out's picture in vk_paint.cpp), the same on main f359e2621.

Still to test:

  • Windows, AMD RX 6000 or older, FSR 4 or FSR 3.1: the market with the row on and off, expecting the log's line above and more FPS with the row on (by hand).
  • Windows, NVIDIA GTX 10 or 16, DLSS or FSR 3.1: the same (by hand).
  • Linux, a dedicated GPU: the market route with the row on and off, expecting no lower FPS with the row on (by hand).

Measurements

Verdict: on an RX 6800 XT with FSR 4, +12.5 % FPS with the row on; the game's wait for the GPU 6.82 -> 0.06 ms a frame.

Baseline: the row off in #3178's build, not a main build: with the row off the frame limiter makes main's wait, and both states ran on one build, interleaved, on a tester's RX 6800 XT, which this PC is not.

Setup: Windows, RX 6800 XT, AMD 26.11.2, 2560x1440, FSR 4 Performance (1280x720 -> 2560x1440), one spot; #3178's automatic states, interleaved, 6 windows of 600 frames each. "Row on" is #3178's state with this change and the test form of the rule.

Before: #3178, the row off (main's wait) @ 2b89064bd After: #3178, the row on with this change @ 2b89064bd
FPS 75.1 84.5
Frame / p99 13.37 / 15.66 ms 11.85 / 14.75 ms
GPU busy 83 % 93 %
The game's wait for the GPU 6.82 ms 0.06 ms
Frames waited up to their upscale 3 3,572

An RX 7900 XT (AMD 26.11.2, i7-14700KF, 2294x960 -> 3440x1440, V-Sync on; its network translates, so only the rule
applies there), #3178 @ 92a2281be, the same automatic states, 10-11 windows each, the averages of the play windows over the session (the
scenes as he played them): the row off against the row on with the rule.

Before: #3178, the row off (main's wait) @ 92a2281be After: #3178, the row on with the rule @ 92a2281be
FPS, FSR 4 78.8 105.7
FPS, FSR 3.1 94.3 102.6
The game's wait for the GPU, FSR 4 / FSR 3.1 4.47 / 2.05 ms 0.06 / 0.03 ms

The same card at one spot with FSR 4, by its tester's screenshots: on nightly 1100 (the row without this rule) 75 -> 81 fps with the row; on #3178 83 -> ~98 fps (with the rule; the reader fix there added nothing on this card, 104.7 against 105.7 in the logs above).

This PC: Windows 11, RTX 4070 SUPER, driver 621.24, Ryzen 9 9900X, 64 GB; the walking route (market, castle, market), headless, the row on, the second market stay from 5 s after its entry; two runs a state, interleaved, one build. Baseline: this branch with RX_VK_LATE_BY_PART=0 and RX_VK_LATE_READ_SAME=0, which is main's behaviour on this card (its upscale network translates: the replacement path does not run).

Before: this branch, both switches 0 (main's behaviour) @ 0207afebf After: this branch @ 0207afebf
FPS, 4K DLSS 67 % 99.9 / 99.7 101.5 / 102.7
p99, 4K DLSS 67 % 13.88 / 13.85 ms 13.59 / 13.76 ms
The capture's wait for late pages, 4K DLSS 67 % 1.18 / 1.26 ms 0.00 / 0.00 ms
FPS, 4K DLAA 77.7 / 78.0 79.5 / 79.7
p99, 4K DLAA 17.16 / 17.03 ms 17.07 / 16.77 ms
Frames over 20 ms, 4K DLAA 13 / 8 7 / 4

The rule alone (RX_VK_LATE_READ_SAME=0): 98.0 / 98.3 fps with DLSS and 76.5 / 76.2 with DLAA, its draw and descriptor recording 4.72 / 1.96 ms a frame against 4.12 / 1.40 before and 4.15 / 1.41 after.

Risks

  • RX_VK_LATE_BY_PART=0 brings back main's rule, RX_VK_LATE_READ_SAME=0 the read's wait for the repair; Skip Upscaler Wait's row off brings back the limiter's whole wait. A revert is enough.
  • After updating: on the GPUs named above, the row now applies; nothing else changes for a player.

Checklist

Ready for review

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

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A 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.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

## Summary **Skip Upscaler Wait now works on GPUs whose upscale network does not translate (AMD RX 6000 and older, NVIDIA GTX 10 and 16): on an RX 6800 XT with FSR 4, 75.1 -> 84.5 fps. And with the row on, a capture's page is no longer late while only the frame before's upscale and HUD are still on the GPU, and the render thread no longer waits for a late page's repair to read bytes the repair cannot change: on an RTX 4070 SUPER, 4K DLSS 99.8 -> 102.1 fps, 4K DLAA 77.9 -> 79.6.** On a GPU without cooperative matrices (or, on AMD, without WMMA) the game's upscale network is left out, and its pass is drawn in its place by the temporal upscaler or FSR 3.1 (`upscale_stub`). Skip Upscaler Wait finds the upscale by the program `dispatch` notes before it draws a network, and this path returned before that note: the part before the upscale was never cut, and the frame limiter waited for the whole frame on every frame, as with the row off. An RX 6800 XT's log with FSR 4: 0 of 10,796 frames waited up to their upscale. With the row on, the game's next submits come while the frame before's upscale and HUD, its last parts, are still on the GPU. A page the CPU wrote that a write-back not done yet also writes is late, and gets a repair on the GPU (a 64 KB stamp block, 64 MB at most) or a wait. `main` judges that by the whole submission, so pages the frame before wrote back early in its frame were late until its upscale was done: on the market route here, about 75 % of the late pages had the part that wrote them back done already. Once the stamp table is full, each of them is a wait for the frame before's whole submission, upscale included. With pages judged by their part, the stamp table no longer fills, and the pages still late get the GPU repair. The render thread reads some of them while it records (pointer tables, headers: `submitted_read_locked`), and such a read waited for the repair, which runs behind the frame before's upscale and HUD: on this PC +1.2 ms a frame of draw and descriptor recording, and the rule alone lost about 2 % there. What this changes: - **The upscale drawn in place of a network** (`upscale_stub`, `gpu/vk/vk_draw.cpp`): where the temporal upscaler or FSR 3.1 drew the scene into the picture, its program is noted for the frame limiter's part (`skip_tail_note_upscale`), as `dispatch` does for the networks that translate; once, the log says so (`vk: Skip Upscaler Wait: the gameplay upscale is network ...'s stand-in`). A blit, a typed fallback or a movie's upscale is not noted. - **The rule** (`late_replay::landed_by_part`, `gpu/vk/late_replay.h`): a page late by its submission is not late when the part that recorded its newest write-back has reached its place on the recordings' timeline (`vk_parts_reached`, `vk_part_seq` over `part_rec`, `gpu/vk/vk_replay.cpp`) and no write in place of it is pending. Each part's write-backs are recorded at its end and noted just before its submit. - **Where it is asked** (`late_landed_by_part`, `gpu/vk/vk_memory.cpp`): at the capture (`capture_make`, the timeline read before the pages are copied), at the take (`capture_late_at_replay`, by the timeline the capture read) and in the repair's build (`late_fix_build`, for the pages it copies again from guest memory). - **The read** (`late_read_same`, called from `late_fix_cpu_read`, `gpu/vk/vk_memory.cpp`): a read of a page whose repair has not run takes the capture's copy with no wait when the page's write-backs the repair gives words of are done (by their submission, or their part), no capture or GPU write has given the page a newer generation since the take, the host's write mark of the page is clear, and guest memory holds the copy's bytes there. The repair writes a word only where such a write-back changed it, with that write-back's value, which is then in guest memory too: the copy's bytes are what the read would take after the repair. The page stays under its repair for its other bytes. The newest write-back is noted when the repair is recorded (`late_fix_emit`), the generation at the take. - **The host's mark** (`MkwVkHost.page_written`, API version 96, `host/rx_backend.c`): the soft write watch's mark of one page, read and left set, for a write of the game's after its newest submission, which no capture has taken yet. -1 where the build has no watch: the read waits. - **As before:** where the part is not known (not submitted yet, no timeline of its own, `RX_VK_PER_QUEUE_FENCES=0`) or a write in place is pending, a page is judged as on `main`. A counter the GPU counts and the game sets back to 0 now gets the game's 0 in the mirror at once. - **The switches** `RX_VK_LATE_BY_PART` (`kill`, on; `=0`: `main`'s rule) and `RX_VK_LATE_READ_SAME` (`kill`, on; `=0`: the read waits for the repair), and `RX_VK_TEST_LATE_READ_CHECK` (`diag`: such reads wait too and are compared after the repair; the late pages' line counts them), with their rows in `gpu/vk/switches.def`. - **`RX_VK_MEM_CHECK`** counts the pages the rule did not call late as a path of their own (`by a part done at the capture`, with their replaced words), `gpu/vk/mem_check.h`. Read first: `upscale_stub` in `gpu/vk/vk_draw.cpp`; `landed_by_part` in `gpu/vk/late_replay.h`; `late_landed_by_part` and its three callers, and `late_read_same` in `gpu/vk/vk_memory.cpp`. Written with AI assistance (Claude); the commits carry `Co-Authored-By:` trailers. ## Testing **Tested:** Windows 11, RTX 4070 SUPER, driver 621.24; the walking route (market, castle, market), headless, 4K DLSS 67 %, the row on, this branch's build. - The upscale network forced onto the replacement path (`RX_VK_FORCE_UPSCALE_STUB=2`, as on an RX 6800 XT): the log names network `6676619641320ba7` as the stand-in, and 6,000 frames waited up to their upscale. - `RX_VK_MEM_CHECK=1`: 0 candidates written back from a mirror and not late, 0 takes unpaired (95,880). - `RX_VK_TEST_LATE_READ_CHECK=1`: every read the read rule let go waited for the repair too and was compared after it: 0 of them changed (the late pages' line: 142, 80, 96 a window, changed 0). - On #3178 (a diagnostic build with this change and a test form of the rule), an RX 6800 XT (AMD 26.11.2, FSR 4, 1280x720 -> 2560x1440), automatic states: the frame limiter waited up to the upscale on 3,572 of 3,600 frames with the row on (0 of 10,796 before). - Checks: `tests/test_upscale_fallback.py` (new cases: the scene drawn in place of a network is noted; not with the row off or no program bound; never for a blit, a typed fallback or a movie), failing on `main` and passing here. `tests/test_late_by_part.py` (new: the rule, the page tables, the timeline lookups and `capture_late_at_replay` cut from the source, with `RX_VK_LATE_BY_PART` on and at 0), `tests/test_late_fix_build.py` cases (t) and (u) to (z) (the read: a word the write-back did not write, read with no wait and left so by the repair; the word it wrote, a write-back not done, a newer generation, the mark set or not known, and the game putting the GPU's word back to its old value: the wait; run with `RX_VK_LATE_READ_SAME` on, at 0 and checked; each of the read's four conditions taken out of the source fails its case), `tests/test_mem_check.py`, g++ and clang++. The checks reading the changed files: 15 fail, the same 15 on `main` f359e2621 on this PC (shader headers not generated, and fixtures missing `ui`, `order_watch_on`, `sync_watch_event_on`). For the read and the host's mark, the checks reading the files they change: 178 pass, 12 skip, and `tests/test_ui_renderer.py` fails (a pop-out's picture in `vk_paint.cpp`), the same on `main` f359e2621. **Still to test:** - Windows, AMD RX 6000 or older, FSR 4 or FSR 3.1: the market with the row on and off, expecting the log's line above and more FPS with the row on (by hand). - Windows, NVIDIA GTX 10 or 16, DLSS or FSR 3.1: the same (by hand). - Linux, a dedicated GPU: the market route with the row on and off, expecting no lower FPS with the row on (by hand). ## Measurements **Verdict:** on an RX 6800 XT with FSR 4, +12.5 % FPS with the row on; the game's wait for the GPU 6.82 -> 0.06 ms a frame. Baseline: the row off in #3178's build, not a `main` build: with the row off the frame limiter makes `main`'s wait, and both states ran on one build, interleaved, on a tester's RX 6800 XT, which this PC is not. Setup: Windows, RX 6800 XT, AMD 26.11.2, 2560x1440, FSR 4 Performance (1280x720 -> 2560x1440), one spot; #3178's automatic states, interleaved, 6 windows of 600 frames each. "Row on" is #3178's state with this change and the test form of the rule. | | Before: #3178, the row off (`main`'s wait) @ 2b89064bd | After: #3178, the row on with this change @ 2b89064bd | |---|---|---| | FPS | 75.1 | 84.5 | | Frame / p99 | 13.37 / 15.66 ms | 11.85 / 14.75 ms | | GPU busy | 83 % | 93 % | | The game's wait for the GPU | 6.82 ms | 0.06 ms | | Frames waited up to their upscale | 3 | 3,572 | An RX 7900 XT (AMD 26.11.2, i7-14700KF, 2294x960 -> 3440x1440, V-Sync on; its network translates, so only the rule applies there), #3178 @ 92a2281be, the same automatic states, 10-11 windows each, the averages of the play windows over the session (the scenes as he played them): the row off against the row on with the rule. | | Before: #3178, the row off (`main`'s wait) @ 92a2281be | After: #3178, the row on with the rule @ 92a2281be | |---|---|---| | FPS, FSR 4 | 78.8 | 105.7 | | FPS, FSR 3.1 | 94.3 | 102.6 | | The game's wait for the GPU, FSR 4 / FSR 3.1 | 4.47 / 2.05 ms | 0.06 / 0.03 ms | The same card at one spot with FSR 4, by its tester's screenshots: on nightly 1100 (the row without this rule) 75 -> 81 fps with the row; on #3178 83 -> ~98 fps (with the rule; the reader fix there added nothing on this card, 104.7 against 105.7 in the logs above). This PC: Windows 11, RTX 4070 SUPER, driver 621.24, Ryzen 9 9900X, 64 GB; the walking route (market, castle, market), headless, the row on, the second market stay from 5 s after its entry; two runs a state, interleaved, one build. Baseline: this branch with `RX_VK_LATE_BY_PART=0` and `RX_VK_LATE_READ_SAME=0`, which is `main`'s behaviour on this card (its upscale network translates: the replacement path does not run). | | Before: this branch, both switches 0 (`main`'s behaviour) @ 0207afebf | After: this branch @ 0207afebf | |---|---|---| | FPS, 4K DLSS 67 % | 99.9 / 99.7 | 101.5 / 102.7 | | p99, 4K DLSS 67 % | 13.88 / 13.85 ms | 13.59 / 13.76 ms | | The capture's wait for late pages, 4K DLSS 67 % | 1.18 / 1.26 ms | 0.00 / 0.00 ms | | FPS, 4K DLAA | 77.7 / 78.0 | 79.5 / 79.7 | | p99, 4K DLAA | 17.16 / 17.03 ms | 17.07 / 16.77 ms | | Frames over 20 ms, 4K DLAA | 13 / 8 | 7 / 4 | The rule alone (`RX_VK_LATE_READ_SAME=0`): 98.0 / 98.3 fps with DLSS and 76.5 / 76.2 with DLAA, its draw and descriptor recording 4.72 / 1.96 ms a frame against 4.12 / 1.40 before and 4.15 / 1.41 after. ## Risks - `RX_VK_LATE_BY_PART=0` brings back `main`'s rule, `RX_VK_LATE_READ_SAME=0` the read's wait for the repair; Skip Upscaler Wait's row off brings back the limiter's whole wait. A revert is enough. - After updating: on the GPUs named above, the row now applies; nothing else changes for a player. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [x] A 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. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
upscale_stub is compiled alone and the temporal upscaler is made to draw the scene in place of the network:
its program must be noted for the frame limiter's part (skip_tail_note_upscale), not with the row off or no
program bound, and never for a blit, a typed fallback or a movie's upscale. Fails on main: it is never noted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On a discrete GPU without cooperative matrices (NVIDIA GTX 10/16) or without WMMA (AMD RX 6000 and older), the
game's upscale network is left out and upscale_stub draws the scene into the picture with the temporal upscaler
or FSR 3.1. That path returned before dispatch() noted the upscale's program, so the part before the upscale was
never cut and the frame limiter waited for the whole frame every frame: on an RX 6800 XT with FSR 4, 0 of 10,796
frames by the part. upscale_stub now notes it as dispatch does, and logs it once.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tests/test_late_by_part.py compiles the rule, the page tables, the recordings' timeline lookups and
capture_late_at_replay from the source and plays one frame of parts: a page written back by a part done
by the timeline is not late though its submission is not done; a part not done, not submitted, a write in
place not done, no timeline or RX_VK_PER_QUEUE_FENCES=0 keep main's judgement; overlapping recordings are
judged each by its own part; the take judges by the timeline as the capture read it. And as text: each
part's write-backs are noted just before that part's own submit under replay_mu, the order the rule rests
on. test_late_fix_build.py's case (t): a late page whose part is done gets no repair. test_mem_check.py:
the memory checker's path for such pages, its replaced words counted apart. Run with the switch on and at 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
perf(vk): a capture's page is late only while the part that wrote it back is not done (RX_VK_LATE_BY_PART)
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
bb7580a714
A page the CPU wrote that a write-back not done yet also writes is late: its capture's copy lacks the GPU's
words, and it takes a repair on the GPU (a 64 KB stamp block, 64 MB at most) or a wait for the submission.
Main judged that by the whole submission's value. A submission is recorded in parts, each submitted at its
end with its own write-backs; with Skip Upscaler Wait the game runs on while the frame before's upscale and
HUD, its last parts, are still on the GPU, so pages written back early in that frame were late at nearly
every capture: here about 75 % of the late pages had their writer's part done. Once the stamp table was full,
each took a wait for the frame before's whole submission, upscale included, on the render thread.

Now a page is late only while the part that recorded its newest write-back has not reached its place on the
recordings' timeline, asked at the capture, the take and the repair's build. A write in place not done, a
part not submitted, no timeline or RX_VK_PER_QUEUE_FENCES=0: main's judgement. RX_VK_MEM_CHECK counts the pages
the rule spared on a path of their own. RX_VK_LATE_BY_PART=0: main's rule.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11, RTX 4070 SUPER, driver 621.24: the walking route (market, castle, market), headless, 4K DLSS 67 %, Skip Upscaler Wait on, this branch's build. With the upscale network forced onto the replacement path (RX_VK_FORCE_UPSCALE_STUB=2) the frame limiter waited up to the upscale on 6,000 frames; with RX_VK_MEM_CHECK=1, 0 pages written back from a mirror and not late. An RX 6800 XT (AMD 26.11.2, FSR 4) on #3178 with this change: 75.1 -> 84.5 fps with the row on.

Tested in game: Windows 11, RTX 4070 SUPER, driver 621.24: the walking route (market, castle, market), headless, 4K DLSS 67 %, Skip Upscaler Wait on, this branch's build. With the upscale network forced onto the replacement path (RX_VK_FORCE_UPSCALE_STUB=2) the frame limiter waited up to the upscale on 6,000 frames; with RX_VK_MEM_CHECK=1, 0 pages written back from a mirror and not late. An RX 6800 XT (AMD 26.11.2, FSR 4) on #3178 with this change: 75.1 -> 84.5 fps with the row on.
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The new game-free check assumes a GCC-compatible compiler and does not honor the selected compiler when run directly. The performance gain and the default-on page rule also need measurements on this head against its base. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

The fallback upscale can now mark the point where Skip Upscaler Wait should stop waiting, and completed recording parts can keep pages out of the late-page repair path. This may reduce frame waits, at the cost of timeline queries and page-table lookups on capture and replay paths.

Should fix (1): not blocking, but worth doing before merging.

  • L1 tests/test_late_by_part.py:243: The new check defaults to g++ and always passes GCC-style options, so it does not use the configured compiler when invoked directly and cannot run with MSVC's cl. (more on the line) Do: Honor the configured C++ compiler by default and construct the appropriate command line for cl or clang-cl as well as GCC-compatible compilers.

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

  • L2: The claimed performance gain has not been measured between the base and this head with the same player settings. When: The RX 6800 XT result compares two settings in #3178's diagnostic build, whose test form of the rule can differ from the shipped code; it cannot isolate this head's gain or its costs. Do: Run interleaved base and head measurements on the target RX 6800 XT route and settings, reporting average fps, 1% lows, frame-time distribution and the waits the change targets.
  • L3 gpu/vk/vk_memory.cpp:2570: The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. (more on the line) Do: Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on.

@fix can do L1.

Checks: Still running: 11 checks.

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

Does it help: Unproven for this head against its base. A diagnostic build on RX 6800 XT measured 75.1 to 84.5 fps and 15.66 to 14.75 ms p99 with the row off versus on, but it included a test form of the rule and was not a base-versus-head comparison. The RTX 4070 SUPER run shows the forced fallback was identified for 6,000 frames.

Other systems: The page rule affects mirrored memory capture and replay across vendors and operating systems, including when Skip Upscaler Wait is off. The reported head run covers Windows and RTX 4070 SUPER; AMD, Linux and Steam Deck coverage for the default-on rule remains outstanding.

Switches: RX_VK_LATE_BY_PART is added as a kill switch, default on. It has a switches.def row, but the reported comparisons do not establish that its default is suitable across the affected systems.

Reviewed: bb7580a714 against f359e26213: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, commit messages, the full diff, late_replay.h and test_late_by_part.py. Reviewed the changed sections and relevant surrounding recording, capture, write-back and upscale paths in the larger source files; the remaining portions of those files and the other changed tests were skimmed. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • Both AI-assisted code commits and test commits carry Co-Authored-By trailers.
  • The new switch has a switches.def entry, and no renderer API or shader file changes require a version bump or regenerated shader headers.
  • The changed file list contains no committed build output or game files.
  • Unknown part mappings and unavailable recording timelines fall back to the submission-based late-page rule.

Testing: No code or tests were run, as requested. CI was still running in the supplied results.

Overlaps and merge order: Not checked; the network is closed.


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

**Recommendation: Approve.** The new game-free check assumes a GCC-compatible compiler and does not honor the selected compiler when run directly. The performance gain and the default-on page rule also need measurements on this head against its base. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. The fallback upscale can now mark the point where Skip Upscaler Wait should stop waiting, and completed recording parts can keep pages out of the late-page repair path. This may reduce frame waits, at the cost of timeline queries and page-table lookups on capture and replay paths. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_late_by_part.py:243`: The new check defaults to g++ and always passes GCC-style options, so it does not use the configured compiler when invoked directly and cannot run with MSVC's cl. (more on the line) **Do:** Honor the configured C++ compiler by default and construct the appropriate command line for cl or clang-cl as well as GCC-compatible compilers. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2**: The claimed performance gain has not been measured between the base and this head with the same player settings. *When:* The RX 6800 XT result compares two settings in #3178's diagnostic build, whose test form of the rule can differ from the shipped code; it cannot isolate this head's gain or its costs. **Do:** Run interleaved base and head measurements on the target RX 6800 XT route and settings, reporting average fps, 1% lows, frame-time distribution and the waits the change targets. - **L3** `gpu/vk/vk_memory.cpp:2570`: The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. (more on the line) **Do:** Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on. `@fix` can do L1. **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven for this head against its base. A diagnostic build on RX 6800 XT measured 75.1 to 84.5 fps and 15.66 to 14.75 ms p99 with the row off versus on, but it included a test form of the rule and was not a base-versus-head comparison. The RTX 4070 SUPER run shows the forced fallback was identified for 6,000 frames. **Other systems:** The page rule affects mirrored memory capture and replay across vendors and operating systems, including when Skip Upscaler Wait is off. The reported head run covers Windows and RTX 4070 SUPER; AMD, Linux and Steam Deck coverage for the default-on rule remains outstanding. **Switches:** RX_VK_LATE_BY_PART is added as a kill switch, default on. It has a switches.def row, but the reported comparisons do not establish that its default is suitable across the affected systems. **Reviewed:** bb7580a71401 against f359e2621315: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, commit messages, the full diff, late_replay.h and test_late_by_part.py. Reviewed the changed sections and relevant surrounding recording, capture, write-back and upscale paths in the larger source files; the remaining portions of those files and the other changed tests were skimmed. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - Both AI-assisted code commits and test commits carry Co-Authored-By trailers. - The new switch has a switches.def entry, and no renderer API or shader file changes require a version bump or regenerated shader headers. - The changed file list contains no committed build output or game files. - Unknown part mappings and unavailable recording timelines fall back to the submission-based late-page rule. **Testing:** No code or tests were run, as requested. CI was still running in the supplied results. **Overlaps and merge order:** Not checked; the network is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.</sub>
@ -2550,2 +2567,4 @@
const uint64_t done = vk_timeline_completed();
c->late_done = done;
// (RX_VK_LATE_BY_PART: the recordings' timeline, read before the pages are copied below: a part done by it has its
// write-backs in guest memory, and so in the copy)
Member

L3 (should fix): The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths.

When: AMD and Linux players, including Steam Deck users, take the new timeline and page classification path without a reported run of this head showing correct rendering and frame pacing.

Do: Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on.

**L3** (should fix): The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. *When:* AMD and Linux players, including Steam Deck users, take the new timeline and page classification path without a reported run of this head showing correct rendering and frame pacing. **Do:** Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on.
@ -0,0 +240,4 @@
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--cxx", default="g++")
Member

L1 (should fix): The new check defaults to g++ and always passes GCC-style options, so it does not use the configured compiler when invoked directly and cannot run with MSVC's cl.

When: On a Windows developer setup with only a configured Visual Studio compiler, the default invocation cannot find g++; passing --cxx cl still supplies -std=c++20, -I and -o instead of the corresponding MSVC options.

Do: Honor the configured C++ compiler by default and construct the appropriate command line for cl or clang-cl as well as GCC-compatible compilers.

**L1** (should fix): The new check defaults to g++ and always passes GCC-style options, so it does not use the configured compiler when invoked directly and cannot run with MSVC's cl. *When:* On a Windows developer setup with only a configured Visual Studio compiler, the default invocation cannot find g++; passing --cxx cl still supplies -std=c++20, -I and -o instead of the corresponding MSVC options. **Do:** Honor the configured C++ compiler by default and construct the appropriate command line for cl or clang-cl as well as GCC-compatible compilers.
test(vk): test_late_by_part.py compiles with the configured compiler, cl and clang-cl too
Some checks failed
PR description / Title and description (pull_request_target) Successful in 7s
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
11a27ce7c7
The fixture was compiled with g++ unless --cxx said otherwise, and always with GCC's options. It now takes
$CXX by default and builds MSVC's command line for cl and clang-cl, as test_upscale_fallback.py does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The compiler fix addresses the open test issue. The claimed performance gain and the default-on page rule still need base-versus-head measurements and coverage on affected systems. Recommend approval; not approved on the forge.

The change makes Skip Upscaler Wait apply to supported fallback upscalers and avoids unnecessary late-page repairs when the writing GPU part has finished. It adds timeline and page-tracking complexity in exchange for potentially less waiting.

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

  • L2: The claimed performance gain has not been measured between the base and this head with the same player settings. When: The RX 6800 XT result compares two settings in #3178's diagnostic build, whose test form of the rule can differ from the shipped code; it cannot isolate this head's gain or its costs. Do: Run interleaved base and head measurements on the target RX 6800 XT route and settings, reporting average fps, 1% lows, frame-time distribution and the waits the change targets.
  • L3 gpu/vk/vk_memory.cpp:2570: The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. When: AMD and Linux players, including Steam Deck users, take the new timeline and page classification path without a reported run of this head showing correct rendering and frame pacing. Do: Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on.

Since the last review (on bb7580a714)
Resolved: L1 (The new check defaults to g++ and always passes GCC-style options, so it does not use the…)
Still open: L2 (The claimed performance gain has not been measured between the base and this head with the…); L3 (The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and…)

Checks: Still running: 11 checks.

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

Does it help: Unproven against the base and this head. A diagnostic build reported 75.1 to 84.5 fps on an RX 6800 XT with the setting off versus on, but that comparison was not against this head and its base.

Other systems: The page rule affects Vulkan replay across GPU vendors and operating systems. The recorded head run covers Windows on an RTX 4070 SUPER; AMD, older NVIDIA and Linux coverage remains outstanding.

Switches: RX_VK_LATE_BY_PART is added, default on; setting it to 0 restores the previous page rule. The default still needs the outstanding hardware coverage and base-versus-head measurements.

Reviewed: 11a27ce7c7 against f359e26213: Read tests/test_late_by_part.py in full, the change since the ledger, repository rules and pull request template. Skimmed the broader diff and recorded results; the other changed code files were not read in full.; nothing run (a code review).

Checked and fine:

  • The compiler fix retains explicit --cxx selection and runs the fixture with the rule both enabled and disabled.

Testing: No commands from the project or tests were run. The reported Windows NVIDIA run exercised the forced fallback and memory check; CI is still running.

Overlaps and merge order: none found


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

**Recommendation: Approve.** The code is ready: only testing is left. The compiler fix addresses the open test issue. The claimed performance gain and the default-on page rule still need base-versus-head measurements and coverage on affected systems. Recommend approval; not approved on the forge. The change makes Skip Upscaler Wait apply to supported fallback upscalers and avoids unnecessary late-page repairs when the writing GPU part has finished. It adds timeline and page-tracking complexity in exchange for potentially less waiting. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2**: The claimed performance gain has not been measured between the base and this head with the same player settings. *When:* The RX 6800 XT result compares two settings in #3178's diagnostic build, whose test form of the rule can differ from the shipped code; it cannot isolate this head's gain or its costs. **Do:** Run interleaved base and head measurements on the target RX 6800 XT route and settings, reporting average fps, 1% lows, frame-time distribution and the waits the change targets. - **L3** `gpu/vk/vk_memory.cpp:2570`: The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. *When:* AMD and Linux players, including Steam Deck users, take the new timeline and page classification path without a reported run of this head showing correct rendering and frame pacing. **Do:** Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on. **Since the last review** (on bb7580a71401) Resolved: L1 (The new check defaults to g++ and always passes GCC-style options, so it does not use the…) Still open: L2 (The claimed performance gain has not been measured between the base and this head with the…); L3 (The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and…) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against the base and this head. A diagnostic build reported 75.1 to 84.5 fps on an RX 6800 XT with the setting off versus on, but that comparison was not against this head and its base. **Other systems:** The page rule affects Vulkan replay across GPU vendors and operating systems. The recorded head run covers Windows on an RTX 4070 SUPER; AMD, older NVIDIA and Linux coverage remains outstanding. **Switches:** RX_VK_LATE_BY_PART is added, default on; setting it to 0 restores the previous page rule. The default still needs the outstanding hardware coverage and base-versus-head measurements. **Reviewed:** 11a27ce7c7a3 against f359e2621315: Read tests/test_late_by_part.py in full, the change since the ledger, repository rules and pull request template. Skimmed the broader diff and recorded results; the other changed code files were not read in full.; nothing run (a code review). **Checked and fine:** - The compiler fix retains explicit --cxx selection and runs the fixture with the rule both enabled and disabled. **Testing:** No commands from the project or tests were run. The reported Windows NVIDIA run exercised the forced fallback and memory check; CI is still running. **Overlaps and merge order:** none found </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.</sub>
Cases (u) to (z) of late_fix_cpu_read with RX_VK_LATE_READ_SAME on, at 0 and checked (RX_VK_TEST_LATE_READ_CHECK=1):
a read of words the write-back did not write, with the write-back done (by its submission or its part), the page's
generation the take's, the host's write mark clear and guest memory holding the copy's bytes, takes the copy with no
wait and the fix then leaves those bytes; the word the write-back wrote, a write-back not done, a newer generation, a
mark set or not known wait as before. The game putting a word the GPU changed back to its old value is caught by the
mark; with the mark missed the check counts it changed. The read's bytes are handed to late_fix_cpu_read.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the late rule (RX_VK_LATE_BY_PART) the stamp table no longer fills, so the pages still late get the GPU fix, and
the render thread's reads of them while it records waited for that fix, which sits behind the frame before's tail.
The fix writes a word only where a write-back after the capture's view changed it, and writes what that write-back
wrote. So once those write-backs have run, nothing has written the page since the take (its generation, and the
host's soft write watch mark, read after the bytes) and guest memory holds the copy's bytes there, the copy's bytes
are what the read would take after the fix: it takes them with no wait.

The host gives the mark of one page, read and left set (MkwVkHost.page_written, API version 96): a write of the game's
after its newest submission, which no capture or collection has taken yet. =0: the wait, as before.
RX_VK_TEST_LATE_READ_CHECK=1: such reads wait too and are compared after the fix.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
test(vk): test_program_hooks.py knows MkwVkHost's page_written, last since API version 96
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
71d3b8dca1
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The reported runs show promising gains, but a same-settings comparison of the final implementation against the base and coverage of other affected systems are still missing. Recommend approval; not approved on the forge.

The change enables Skip Upscaler Wait on GPUs using the replacement upscale path and reduces waits for late-page repairs. It adds synchronization and write-watch logic to the renderer, with default-on switches for the new rules.

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

  • L2: The claimed performance gain has not been measured between the base and this head with the same player settings. When: The RX 6800 XT result compares two settings in #3178's diagnostic build, whose test form of the rule can differ from the shipped code; it cannot isolate this head's gain or its costs. Do: Run interleaved base and head measurements on the target RX 6800 XT route and settings, reporting average fps, 1% lows, frame-time distribution and the waits the change targets.
  • L3 gpu/vk/vk_memory.cpp:2570: The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. When: AMD and Linux players, including Steam Deck users, take the new timeline and page classification path without a reported run of this head showing correct rendering and frame pacing. Do: Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on.

Since the last review (on 11a27ce7c7)
Still open: L2 (The claimed performance gain has not been measured between the base and this head with the…); L3 (The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and…)

Checks: Still running: 11 checks.

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

Does it help: Unproven against the base at this head. The reported diagnostic-build RX 6800 XT comparison is 75.1 to 84.5 fps, and the RTX 4070 SUPER comparison with both new rules toggled is approximately 99.8 to 102.1 fps; neither is a same-settings base-versus-head comparison.

Other systems: The page rules affect GPU write-backs and CPU reads across vendors and operating systems. The reported head run covers Windows on an RTX 4070 SUPER; affected AMD, older NVIDIA and Linux paths remain to be tested.

Switches: RX_VK_LATE_BY_PART and RX_VK_LATE_READ_SAME default on; their performance and correctness across affected systems still need coverage. RX_VK_TEST_LATE_READ_CHECK defaults off and is diagnostic. All three have rows in switches.def.

Reviewed: 71d3b8dca1 against f359e26213: Read AGENTS.md, CONTRIBUTING.md and the pull request template; inspected the changes since the ledger, the affected synchronization and write-watch paths, and portions of the base diff. The full changed code and tests were not read in full; test files and recorded runs were skimmed. No review-checklist.md was found.; nothing run (a code review).

Checked and fine:

  • The host API version is bumped for page_written, and builds without the soft write watch return an unknown mark so the read waits.
  • The reported diagnostic comparison found zero changed reads on the tested Windows NVIDIA route.

Testing: No commands that build or run project code were executed. The author reports game-free checks and a Windows RTX 4070 SUPER game run; CI is still running.

Overlaps and merge order: Not checked; network access is closed.


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

**Recommendation: Approve.** The code is ready: only testing is left. The reported runs show promising gains, but a same-settings comparison of the final implementation against the base and coverage of other affected systems are still missing. Recommend approval; not approved on the forge. The change enables Skip Upscaler Wait on GPUs using the replacement upscale path and reduces waits for late-page repairs. It adds synchronization and write-watch logic to the renderer, with default-on switches for the new rules. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2**: The claimed performance gain has not been measured between the base and this head with the same player settings. *When:* The RX 6800 XT result compares two settings in #3178's diagnostic build, whose test form of the rule can differ from the shipped code; it cannot isolate this head's gain or its costs. **Do:** Run interleaved base and head measurements on the target RX 6800 XT route and settings, reporting average fps, 1% lows, frame-time distribution and the waits the change targets. - **L3** `gpu/vk/vk_memory.cpp:2570`: The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and needs coverage of those paths. *When:* AMD and Linux players, including Steam Deck users, take the new timeline and page classification path without a reported run of this head showing correct rendering and frame pacing. **Do:** Run the head on affected Tier 1 AMD and NVIDIA systems on Windows and Linux, including Steam Deck, and compare rendering and frame pacing with the rule off and on. **Since the last review** (on 11a27ce7c7a3) Still open: L2 (The claimed performance gain has not been measured between the base and this head with the…); L3 (The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and…) **Checks:** Still running: 11 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against the base at this head. The reported diagnostic-build RX 6800 XT comparison is 75.1 to 84.5 fps, and the RTX 4070 SUPER comparison with both new rules toggled is approximately 99.8 to 102.1 fps; neither is a same-settings base-versus-head comparison. **Other systems:** The page rules affect GPU write-backs and CPU reads across vendors and operating systems. The reported head run covers Windows on an RTX 4070 SUPER; affected AMD, older NVIDIA and Linux paths remain to be tested. **Switches:** RX_VK_LATE_BY_PART and RX_VK_LATE_READ_SAME default on; their performance and correctness across affected systems still need coverage. RX_VK_TEST_LATE_READ_CHECK defaults off and is diagnostic. All three have rows in switches.def. **Reviewed:** 71d3b8dca19b against f359e2621315: Read AGENTS.md, CONTRIBUTING.md and the pull request template; inspected the changes since the ledger, the affected synchronization and write-watch paths, and portions of the base diff. The full changed code and tests were not read in full; test files and recorded runs were skimmed. No review-checklist.md was found.; nothing run (a code review). **Checked and fine:** - The host API version is bumped for page_written, and builds without the soft write watch return an unknown mark so the read waits. - The reported diagnostic comparison found zero changed reads on the tested Windows NVIDIA route. **Testing:** No commands that build or run project code were executed. The author reports game-free checks and a Windows RTX 4070 SUPER game run; CI is still running. **Overlaps and merge order:** Not checked; network access is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by Veix. Nothing was run; a maintainer decides.</sub>
Owner

AMD lab A/B/A/B: main 7bc53f841 (A) against this PR's head 71d3b8dca merged onto it (B). AMD lab PC: Linux 7.3.3-1-cachyos, Core i7-9700K, 15 GB RAM (zram swap), Radeon RX 580 with Mesa RADV 3:26.2.6-1. A/B/A/B, 90 s per run after a 15 s warm-up, each a timing job in the queue, headless, uncapped, V-Sync and frame generation off.

Scenario: standing in the Market, 1920x1080 output, FSR 3.1 from 960x540, Skip Upscaler Wait on in both.

About +14 % fps on the RX 580 (52.5-53.2 to 60.3), the same in both pairs.

In the measured 90 s A1 B1 A2 B2
Average fps 53.2 60.3 52.5 60.3
Median frame 18.70 ms 16.50 ms 18.82 ms 16.53 ms
p99 frame 21.96 ms 19.59 ms 22.55 ms 19.46 ms
1 % low (1000 / p99) 45.5 51.1 44.4 51.4
Frames of 50 ms or more 0 0 0 0
wait_gpu_ms, mean 7.90 0.01 8.02 0.01
main_cpu_ms, mean 4.01 3.97 4.05 3.97
  • B's log has the new path: vk: Skip Upscaler Wait: the gameplay upscale is network 72ba090c70fe2614's stand-in (it does not translate here), then 6000 frames waited for up to their upscale; the whole frame: 91 without an upscale, 22 with guest memory read in place after it, 0 out of time (B2: 82 and 21).
  • GPU time is 14.2 ms a frame in A1's and B1's logs, so B's GPU is busy about 86 % of its 16.5 ms frame, against about 76 % of A's.
  • No Vulkan errors in the logs. No run was flagged noisy. I did not check the picture by eye, or input latency.

This covers the "Linux, a dedicated GPU: ... no lower FPS" item in part: it compares main with the PR, both with the row on, in a standing view, not the row on against off on the market route.

**AMD lab A/B/A/B:** `main` `7bc53f841` (A) against this PR's head `71d3b8dca` merged onto it (B). AMD lab PC: Linux 7.3.3-1-cachyos, Core i7-9700K, 15 GB RAM (zram swap), Radeon RX 580 with Mesa RADV 3:26.2.6-1. A/B/A/B, 90 s per run after a 15 s warm-up, each a timing job in the queue, headless, uncapped, V-Sync and frame generation off. Scenario: standing in the Market, 1920x1080 output, FSR 3.1 from 960x540, **Skip Upscaler Wait on in both**. **About +14 % fps on the RX 580 (52.5-53.2 to 60.3), the same in both pairs.** | In the measured 90 s | A1 | B1 | A2 | B2 | |---|---:|---:|---:|---:| | Average fps | 53.2 | 60.3 | 52.5 | 60.3 | | Median frame | 18.70 ms | 16.50 ms | 18.82 ms | 16.53 ms | | p99 frame | 21.96 ms | 19.59 ms | 22.55 ms | 19.46 ms | | 1 % low (1000 / p99) | 45.5 | 51.1 | 44.4 | 51.4 | | Frames of 50 ms or more | 0 | 0 | 0 | 0 | | `wait_gpu_ms`, mean | 7.90 | 0.01 | 8.02 | 0.01 | | `main_cpu_ms`, mean | 4.01 | 3.97 | 4.05 | 3.97 | - B's log has the new path: `vk: Skip Upscaler Wait: the gameplay upscale is network 72ba090c70fe2614's stand-in (it does not translate here)`, then `6000 frames waited for up to their upscale; the whole frame: 91 without an upscale, 22 with guest memory read in place after it, 0 out of time` (B2: 82 and 21). - GPU time is 14.2 ms a frame in A1's and B1's logs, so B's GPU is busy about 86 % of its 16.5 ms frame, against about 76 % of A's. - No Vulkan errors in the logs. No run was flagged noisy. I did not check the picture by eye, or input latency. This covers the "Linux, a dedicated GPU: ... no lower FPS" item in part: it compares `main` with the PR, both with the row on, in a standing view, not the row on against off on the market route.
Member

Measured on Windows at Market center: the late-page part works as described (35 late pages a capture to about 2, no waits), and the frame rate is level on this PC: +0.5 % fps, −1.8 % CPU ms.

This head (71d3b8dca) as a pack over main f359e2621, its merge base. The pack carries both changed modules (game exe and longshot_vk.dll); the DLL has the PR's new stand-in log line, main's does not.

Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2. Market center (child, a save at the fountain, loaded directly), the right stick held right from the load, 1280x720 16:9, uncapped (HOS_FPS_MAX=240), render thread on, Skip Upscaler Wait on (the default), a 20 s window, 3 alternating pairs, all 6 runs admitted, game clock 1.000.

Market center, 3 pairs main f359e2621 this PR
fps, median 95.84 96.29 (+0.5 %)
CPU ms a frame, median 54.34 53.35 (−1.8 %)
p99 frame time, ms 14.31 14.05
worst frame, ms (max of 3) 29.0 128.4
frames over 100 ms 0 1
  • By pair, fps: −1.1 %, +0.7 %, +0.1 %. Within this scene's noise; 3 pairs is diagnostic.
  • The late-page fix line, first runs: main had 1,652 captures with late pages at 35.3 pages each, 524 of them waited ("no stamps or shadow yet"). With the PR: 688 and 679 captures at 2.3 and 2.0 pages, 0 waited.
  • Both arms: 3,000 frames waited only up to their upscale, so the frame limiter's part was active in both.
  • The stand-in path did not run here: on the RX 9070 XT the upscale network translates, so the stand-in line never appears. The RX 6800 XT gain in the description is not something this PC can show.
  • The one 128 ms frame came at 37.3 s in the PR's second run; nothing in its log explains it. The PR's first run was on a freshly made runtime, which learned its 589 module identifiers in that run; its p99 was 18.2 ms.

Note for anyone measuring on main since #2822: Mouse camera now defaults to Native, and with HOS_INPUT_EXCLUSIVE=1 read_input (host/nn_hid.c) returns before hos_mouse_native_stick(), so a scripted right stick turns nothing. These runs set HOS_MOUSE_NATIVE=0. An earlier still-camera round gave +1.2 % fps and −2.6 % CPU ms.

🤖 Generated with Claude Code

**Measured on Windows at Market center: the late-page part works as described (35 late pages a capture to about 2, no waits), and the frame rate is level on this PC: +0.5 % fps, −1.8 % CPU ms.** This head (71d3b8dca) as a pack over main f359e2621, its merge base. The pack carries both changed modules (game exe and `longshot_vk.dll`); the DLL has the PR's new `stand-in` log line, main's does not. Setup: Windows 11, Ryzen 7 5700X3D, RX 9070 XT, AMD 26.11.2. Market center (child, a save at the fountain, loaded directly), the right stick held right from the load, 1280x720 16:9, uncapped (HOS_FPS_MAX=240), render thread on, Skip Upscaler Wait on (the default), a 20 s window, 3 alternating pairs, all 6 runs admitted, game clock 1.000. | Market center, 3 pairs | main f359e2621 | this PR | |---|---|---| | fps, median | 95.84 | 96.29 (+0.5 %) | | CPU ms a frame, median | 54.34 | 53.35 (−1.8 %) | | p99 frame time, ms | 14.31 | 14.05 | | worst frame, ms (max of 3) | 29.0 | 128.4 | | frames over 100 ms | 0 | 1 | - By pair, fps: −1.1 %, +0.7 %, +0.1 %. Within this scene's noise; 3 pairs is diagnostic. - The late-page fix line, first runs: main had 1,652 captures with late pages at 35.3 pages each, 524 of them waited ("no stamps or shadow yet"). With the PR: 688 and 679 captures at 2.3 and 2.0 pages, 0 waited. - Both arms: 3,000 frames waited only up to their upscale, so the frame limiter's part was active in both. - The stand-in path did not run here: on the RX 9070 XT the upscale network translates, so the `stand-in` line never appears. The RX 6800 XT gain in the description is not something this PC can show. - The one 128 ms frame came at 37.3 s in the PR's second run; nothing in its log explains it. The PR's first run was on a freshly made runtime, which learned its 589 module identifiers in that run; its p99 was 18.2 ms. Note for anyone measuring on main since #2822: Mouse camera now defaults to Native, and with `HOS_INPUT_EXCLUSIVE=1` `read_input` (`host/nn_hid.c`) returns before `hos_mouse_native_stick()`, so a scripted right stick turns nothing. These runs set `HOS_MOUSE_NATIVE=0`. An earlier still-camera round gave +1.2 % fps and −2.6 % CPU ms. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Contributor

RX 7900 XT on 71d3b8dc — FSR 3.1 and FSR 4

At FSR 4 67%, enabling Skip Upscaler Wait raised average FPS by 7.8% and dropped the 1% low by 25.7%. The p99 regression reproduced in both pairs: 11.12 → 14.89 ms and 10.51 → 14.21 ms.

Setup. Windows 11, Radeon RX 7900 XT, driver 32.0.32029.2010. Fixed Hyrule Field view, 3440×1440 output, frame generation and V-Sync off, uncapped. Both arms used PR head 71d3b8dc. Each row is two interleaved pairs (off/on/off/on) with dev.py ab, at least 20 s to settle after each launch, then a 30 s frame trace. Values are medians across the two runs per state. The runner calculates each run's 1% low as 1000 / p99_ms.

Upscaler Render scale Average FPS off → on FPS change Median frame time off → on p99 frame time off → on 1% low FPS off → on
FSR 3.1 50% 156.5 → 169.0 +8.0% 6.35 → 5.86 ms 8.29 → 7.92 ms 120.6 → 126.4
FSR 3.1 67% 149.6 → 164.2 +9.7% 6.65 → 6.07 ms 7.88 → 7.55 ms 127.1 → 133.3
FSR 3.1 92% 126.8 → 141.5 +11.6% 7.85 → 7.01 ms 8.88 → 9.62 ms 112.6 → 104.6
FSR 4 50% 115.4 → 127.3 +10.3% 8.61 → 7.75 ms 10.28 → 11.51 ms 97.3 → 87.9
FSR 4 67% 108.5 → 117.0 +7.8% 9.18 → 8.38 ms 10.82 → 14.55 ms 92.5 → 68.8
FSR 4 92% 98.1 → 103.3 +5.3% 10.16 → 9.48 ms 12.72 → 14.74 ms 78.7 → 67.9

Average FPS rose in all six configurations. FSR 4 p99 rose in both pairs at every scale. The FSR 3.1 92% p99 regression was concentrated in one enabled run. All captures had zero cold frames and zero frames at or above 50 ms. The FSR 3.1 50% row comes directly from the four run records because the report generator flagged per-launch Windows handle differences.

Late-page rules at FSR 4 67%

I kept Skip Upscaler Wait on in both arms and switched RX_VK_LATE_BY_PART and RX_VK_LATE_READ_SAME together from 0 to 1, using the same two-pair protocol. Enabling the pair increased average FPS 102.9 → 109.9 (+6.8%), reduced median frame time 9.62 → 8.76 ms, and worsened p99 12.15 → 14.86 ms and 1% low 82.4 → 67.3 FPS (−18.3%). The p99 increase reproduced in both pairs (12.34 → 14.89 ms and 11.95 → 14.83 ms). This measures the combined effect of the two rules.

In both FSR 4 67% skip-wait-on traces from the matrix, the slowest 1% of frames coincided with increased render-thread waiting and main-thread blocking. GPU work stayed roughly flat on those frames. The FSR 4 67% matrix logs showed zero Vulkan errors.

### RX 7900 XT on `71d3b8dc` — FSR 3.1 and FSR 4 **At FSR 4 67%, enabling Skip Upscaler Wait raised average FPS by 7.8% and dropped the 1% low by 25.7%.** The p99 regression reproduced in both pairs: 11.12 → 14.89 ms and 10.51 → 14.21 ms. **Setup.** Windows 11, Radeon RX 7900 XT, driver `32.0.32029.2010`. Fixed Hyrule Field view, 3440×1440 output, frame generation and V-Sync off, uncapped. Both arms used PR head `71d3b8dc`. Each row is two interleaved pairs (off/on/off/on) with `dev.py ab`, at least 20 s to settle after each launch, then a 30 s frame trace. Values are medians across the two runs per state. The runner calculates each run's 1% low as `1000 / p99_ms`. | Upscaler | Render scale | Average FPS off → on | FPS change | Median frame time off → on | p99 frame time off → on | 1% low FPS off → on | |---|---:|---:|---:|---:|---:|---:| | FSR 3.1 | 50% | 156.5 → 169.0 | +8.0% | 6.35 → 5.86 ms | 8.29 → 7.92 ms | 120.6 → 126.4 | | FSR 3.1 | 67% | 149.6 → 164.2 | +9.7% | 6.65 → 6.07 ms | 7.88 → 7.55 ms | 127.1 → 133.3 | | FSR 3.1 | 92% | 126.8 → 141.5 | +11.6% | 7.85 → 7.01 ms | 8.88 → 9.62 ms | 112.6 → 104.6 | | FSR 4 | 50% | 115.4 → 127.3 | +10.3% | 8.61 → 7.75 ms | 10.28 → 11.51 ms | 97.3 → 87.9 | | **FSR 4** | **67%** | **108.5 → 117.0** | **+7.8%** | **9.18 → 8.38 ms** | **10.82 → 14.55 ms** | **92.5 → 68.8** | | FSR 4 | 92% | 98.1 → 103.3 | +5.3% | 10.16 → 9.48 ms | 12.72 → 14.74 ms | 78.7 → 67.9 | Average FPS rose in all six configurations. FSR 4 p99 rose in both pairs at every scale. The FSR 3.1 92% p99 regression was concentrated in one enabled run. All captures had zero cold frames and zero frames at or above 50 ms. The FSR 3.1 50% row comes directly from the four run records because the report generator flagged per-launch Windows handle differences. ### Late-page rules at FSR 4 67% I kept Skip Upscaler Wait on in both arms and switched `RX_VK_LATE_BY_PART` and `RX_VK_LATE_READ_SAME` together from `0` to `1`, using the same two-pair protocol. Enabling the pair increased average FPS **102.9 → 109.9 (+6.8%)**, reduced median frame time **9.62 → 8.76 ms**, and worsened p99 **12.15 → 14.86 ms** and 1% low **82.4 → 67.3 FPS (−18.3%)**. The p99 increase reproduced in both pairs (12.34 → 14.89 ms and 11.95 → 14.83 ms). This measures the combined effect of the two rules. In both FSR 4 67% skip-wait-on traces from the matrix, the slowest 1% of frames coincided with increased render-thread waiting and main-thread blocking. GPU work stayed roughly flat on those frames. The FSR 4 67% matrix logs showed zero Vulkan errors.
Owner
@rebase
Member

I rebased this pull request onto main (be69c3f99c): the new head is e285e9998c.

Conflicts resolved

  • gpu/vk/vk_api.h: Kept the base API fields and added page_written as API version 97, the next free version.
  • host/rx_backend.c: Kept the base host initializer and added page_written, with its version references updated to 97.
  • tests/test_program_hooks.py: Kept the base branch’s output_picture and ui_begin members and added page_written in the order used by MkwVkHost.

Nothing was built or run: read the resolution before merging.


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

I rebased this pull request onto `main` (be69c3f99c64): the new head is e285e9998c18. **Conflicts resolved** - gpu/vk/vk_api.h: Kept the base API fields and added page_written as API version 97, the next free version. - host/rx_backend.c: Kept the base host initializer and added page_written, with its version references updated to 97. - tests/test_program_hooks.py: Kept the base branch’s output_picture and ui_begin members and added page_written in the order used by MkwVkHost. Nothing was built or run: read the resolution before merging. --- <sub>Automated rebase by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
BeanBot force-pushed perf/skip-tail-amd-late from 71d3b8dca1
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to e285e9998c
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
CI / What the change needs (pull_request) Successful in 7s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 20s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 13m14s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Failing after 1m16s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m39s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 10m36s
CI / Website build and checks (pull_request) Failing after 39s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 48m19s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 1h0m5s
2026-12-05 17:01:17 +00:00
Compare
BeanBot left a comment

Recommendation: Approve. The requested base comparison and AMD and Linux coverage have been supplied. The pull request is reported as unmergeable, so its mergeability needs to be resolved before it can be merged. Nothing blocking is left. Recommend approval; not approved on the forge.

The change lets Skip Upscaler Wait work with the replacement upscale path and reduces waits for late pages. It adds timeline and page-tracking complexity to the Vulkan memory path.

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

  • What is preventing the pull request from merging?

Since the last review (on 71d3b8dca1)
Resolved: L2 (The claimed performance gain has not been measured between the base and this head with the…); L3 (The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and…)

Checks: Still running: PR description / Title and description (pull_request_target).

Also noticed (2; not asked for, not blocking)
  • On the RX 7900 XT, enabling both late-page rules improved average FPS from 102.9 to 109.9 but worsened p99 from 12.15 to 14.86 ms in the reported FSR 4 test.
  • The pull request description calls the host API version 96, while the rebased code uses version 97.
More: does it help, other systems, switches, what was read

Does it help: Yes. HumanBean's Linux RX 580 A/B/A/B comparison against main improved average FPS from 52.5–53.2 to 60.3 and improved p99 frame time from 21.96–22.55 to 19.46–19.59 ms. The Windows RX 9070 XT comparison showed a 0.5% median FPS increase, within the reported noise.

Other systems: The page rule affects Vulkan memory replay across GPUs and operating systems. Recorded runs cover Windows NVIDIA and AMD and Linux AMD; the Linux run did not inspect the picture by eye.

Switches: RX_VK_LATE_BY_PART and RX_VK_LATE_READ_SAME default on and restore the previous rules at 0. RX_VK_TEST_LATE_READ_CHECK defaults off and enables diagnostic comparisons at 1. All have entries in switches.def; the recorded results support the defaults on tested systems, though frame pacing varies by workload.

Reviewed: e285e9998c against be69c3f99c: Read the repository instructions, contribution rules, pull request template, commit list, diff for vk_api.h, rx_backend.c and test_program_hooks.py, and references to the changed host callback and version checks. The remaining changed files and their full diffs were not read in this check; recorded runs and test claims were reviewed from the pull request and comments.; nothing run (a code review).

Checked and fine:

  • The rebased host callback is appended to MkwVkHost, the API version is bumped to 97, and the host initializes it.
  • The no-watch host branch returns -1, causing the read optimization to retain its wait.

Testing: No commands that build or run code were executed. The reported title and description check is still running.

Overlaps and merge order: Not checked.


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

**Recommendation: Approve.** The requested base comparison and AMD and Linux coverage have been supplied. The pull request is reported as unmergeable, so its mergeability needs to be resolved before it can be merged. Nothing blocking is left. Recommend approval; not approved on the forge. The change lets Skip Upscaler Wait work with the replacement upscale path and reduces waits for late pages. It adds timeline and page-tracking complexity to the Vulkan memory path. **Questions (1)** (not confirmed from the code; they don't hold the recommendation) - What is preventing the pull request from merging? **Since the last review** (on 71d3b8dca19b) Resolved: L2 (The claimed performance gain has not been measured between the base and this head with the…); L3 (The default-on page rule runs on systems beyond the reported Windows NVIDIA head test and…) **Checks:** Still running: `PR description / Title and description (pull_request_target)`. <details> <summary>Also noticed (2; not asked for, not blocking)</summary> - On the RX 7900 XT, enabling both late-page rules improved average FPS from 102.9 to 109.9 but worsened p99 from 12.15 to 14.86 ms in the reported FSR 4 test. - The pull request description calls the host API version 96, while the rebased code uses version 97. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes. HumanBean's Linux RX 580 A/B/A/B comparison against main improved average FPS from 52.5–53.2 to 60.3 and improved p99 frame time from 21.96–22.55 to 19.46–19.59 ms. The Windows RX 9070 XT comparison showed a 0.5% median FPS increase, within the reported noise. **Other systems:** The page rule affects Vulkan memory replay across GPUs and operating systems. Recorded runs cover Windows NVIDIA and AMD and Linux AMD; the Linux run did not inspect the picture by eye. **Switches:** RX_VK_LATE_BY_PART and RX_VK_LATE_READ_SAME default on and restore the previous rules at 0. RX_VK_TEST_LATE_READ_CHECK defaults off and enables diagnostic comparisons at 1. All have entries in switches.def; the recorded results support the defaults on tested systems, though frame pacing varies by workload. **Reviewed:** e285e9998c18 against be69c3f99c64: Read the repository instructions, contribution rules, pull request template, commit list, diff for vk_api.h, rx_backend.c and test_program_hooks.py, and references to the changed host callback and version checks. The remaining changed files and their full diffs were not read in this check; recorded runs and test claims were reviewed from the pull request and comments.; nothing run (a code review). **Checked and fine:** - The rebased host callback is appended to MkwVkHost, the API version is bumped to 97, and the host initializes it. - The no-watch host branch returns -1, causing the read optimization to retain its wait. **Testing:** No commands that build or run code were executed. The reported title and description check is still running. **Overlaps and merge order:** Not checked. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its rebase. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch perf/skip-tail-amd-late 2026-12-05 17:02:12 +00:00
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!3212
No description provided.