perf(vk): hierarchical sub-region summary and scratch reuse in mirror_sync #2978

Open
siantm wants to merge 4 commits from siantm/Longshot:perf/vk-memsync-fast into main
Contributor

Summary

Speeds up mirror synchronization and written-page traversal in gpu/vk/vk_memory.cpp under RX_VK_MEMSYNC_FAST (default on 1).

Before this change:

  1. mirror_sync() skipped clean 2 MB regions via region_gen, then walked all 512 individual pages of any touched 2 MB region linearly (page_gen(page)), performing per-page cap_bufs.find(e.gen) hash lookups and inserting copies into per-call heap-allocated std::map<VkBuffer, std::vector<VkBufferCopy>> + std::vector<VkBufferCopy> containers.
  2. msync_pass_add() and memory_end_submission() repeatedly re-queried buffer device addresses (vkGetBufferDeviceAddress) and prot_page_since() took a mutex even when no pages were protected.

With RX_VK_MEMSYNC_FAST:

  1. memsync_fast.h adds a hierarchical 64-page (256 KB) SubRegionTable (8 × uint64_t max-gen per 2 MB region, alignas(64)) maintained alongside region_gen so walk_dirty_pages() skips clean 256 KB sub-regions in O(1) inside mirror_sync(), memory_written_since(), and memory_written_runs().
  2. mirror_sync() uses reusable sorted flat SmallCapRuns scratch (preserving VkBuffer order with O(1) last-buffer cache and retained capacities), single-entry GenBufCache (eliminating redundant cap_bufs.find(e.gen) lookups across consecutive pages), batched pool stats updates, cached Pool::mirror_address / CapBuf::address device addresses, and lock-free prot_pages_any fast-outs.
  3. Live RX_VK_MEMSYNC_FAST=check runs mirror_sync_reference_scan() in parallel and asserts 1:1 parity on both runs and cap_runs across all 256 KB skips and flat scratch paths.

First read memsync_fast.h and vk_memory.cpp.

Testing

Tested: Windows 11, NVIDIA GeForce RTX 4060 (driver 621.40, Vulkan 1.4).

  • python -X utf8 -I tests/test_vk_memsync_fast.py --cxx clang++ --headers ... passed (SubRegionTable skip & boundary alignment, SmallCapRuns sorted coalescing, GenBufCache, 500-round randomized mirror_sync parity, source wiring, and 5 broken variants caught).
  • python -X utf8 -I tests/test_hos_ab.py, tests/test_flat_map.py, tests/test_saveload_warm_cache.py, tests/test_vk_braces.py, and clang++ -fsyntax-only on gpu/vk/vk_memory.cpp passed.
  • Live Market smoke (RX_VK_MEMSYNC_FAST=1, 15 s): 1,183 frames, 0 cold frames, RUN_ERROR=None.
  • Live Market parity (RX_VK_MEMSYNC_FAST=check, 25 s): 654,794 syncs (4,000,014 dirty pages checked), 0 mismatches, RUN_ERROR=None.
  • Queued in-run HOS_AB (HOS_AB=RX_VK_MEMSYNC_FAST=0,3,0, 5×90 s, 145 paired periods in Market): 5/5 runs won, zero crashes/errors.
  • Rebased onto main @ 0aeb6858 (2026-12-03), with the three checks this change broke updated: tests/run_all.py --exact of test_vk_memsync_fast, test_msync_pass, test_mem_check, test_capture_copy_runs, test_hos_ab and test_switch_table passed (Windows 11, llvm-mingw clang++), and clang++ -fsyntax-only of gpu/vk/vk_memory.cpp. No game run on the rebased head.
  • Test farm on f747daf: passed on windows+amd, linux+radv and intel; failed on windows+nvidia (a GTX 980 whose Field frame times flip between two levels on main too: main p99 47.19 / 27.68 / 26.90 ms, PR 46.92 / 30.82 / 43.77 ms) and steamdeck (screenshot.max_diff 0.78 with the PR's picture taken on a loading screen; Market 1% low 61.19 -> 78.84 ms on one Deck, the other passing). RX_VK_MEMSYNC_FAST=check logged no mismatch.
  • AMD Lab, Linux RX 580 (3 pairs, =0 vs =1): +6.15% median FPS, p99 39.71 -> 27.38 ms. HumanBean, Linux RTX 3090 (2 pairs): -0.55%, inconclusive (one =1 capture with 46 frames of 50 ms or more, the other none).

Still to test:

  • main against this head at player settings, in the Market and a heavy area, with RAM: the in-run A/B can't show the summary table's own cost, both sides pay it (by hand).
  • Steam Deck and Windows AMD: the same, and RX_VK_MEMSYNC_FAST=check (by hand / @Beanstalk).

Measurements

Verdict: faster: +0.85% fps, mean frame time -0.107 ms (95% interval +0.44% to +1.25% faster vs RX_VK_MEMSYNC_FAST=0).

Setup: Windows 11, NVIDIA GeForce RTX 4060 (driver 621.40, Vulkan 1.4); Market, child (crowded), 50% res (768x432), output res 1280x720, frame generation Off, vsync Off, uncapped (HOS_FPS_MAX=1000), queued in-run HOS_AB=RX_VK_MEMSYNC_FAST=0,3,0 across 5×90 s runs (145 paired periods; 16,207 ON frames vs 16,062 OFF frames).

Baseline: both columns are one build, 056beb631 on perf/vk-memsync-fast (main @ 495ed9fe2): RX_VK_MEMSYNC_FAST=0 (Before) against RX_VK_MEMSYNC_FAST unset (After).

Before, RX_VK_MEMSYNC_FAST=0: this PR @ 056beb63 After, RX_VK_MEMSYNC_FAST unset: this PR @ 056beb63 Δ
fps 79.32 80.01 +0.85%
mean frame time 12.60 ms 12.50 ms -0.11 ms
median frame time 12.33 ms 12.24 ms -0.09 ms
p99 frame time 15.72 ms 15.51 ms -0.21 ms
1% low fps 63.65 64.47 +1.29%
0.1% low fps 53.62 54.41 +1.47%
desc_ms 2.701 ms 2.627 ms -2.74% (-0.074 ms)
draw_ms 7.315 ms 7.227 ms -1.20% (-0.088 ms)
wait_gpu_ms 1.908 ms 1.794 ms -5.97% (-0.114 ms)

Risks

Set RX_VK_MEMSYNC_FAST=0 to restore the full 2 MB page scan and per-call std::map copy gathering in mirror_sync(), or RX_VK_MEMSYNC_FAST=check to verify live parity (0 mismatches across 654k+ syncs / 4.0M+ pages). Shader cache and pipeline cache are untouched.

Assisted-by: Antigravity

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.
  • 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 Speeds up mirror synchronization and written-page traversal in `gpu/vk/vk_memory.cpp` under `RX_VK_MEMSYNC_FAST` (default on `1`). Before this change: 1. `mirror_sync()` skipped clean 2 MB regions via `region_gen`, then walked all 512 individual pages of any touched 2 MB region linearly (`page_gen(page)`), performing per-page `cap_bufs.find(e.gen)` hash lookups and inserting copies into per-call heap-allocated `std::map<VkBuffer, std::vector<VkBufferCopy>>` + `std::vector<VkBufferCopy>` containers. 2. `msync_pass_add()` and `memory_end_submission()` repeatedly re-queried buffer device addresses (`vkGetBufferDeviceAddress`) and `prot_page_since()` took a mutex even when no pages were protected. With `RX_VK_MEMSYNC_FAST`: 1. [memsync_fast.h](gpu/vk/memsync_fast.h) adds a hierarchical 64-page (`256 KB`) `SubRegionTable` (`8 × uint64_t` max-gen per 2 MB region, `alignas(64)`) maintained alongside `region_gen` so `walk_dirty_pages()` skips clean 256 KB sub-regions in O(1) inside `mirror_sync()`, `memory_written_since()`, and `memory_written_runs()`. 2. `mirror_sync()` uses reusable sorted flat `SmallCapRuns` scratch (preserving `VkBuffer` order with O(1) last-buffer cache and retained capacities), single-entry `GenBufCache` (eliminating redundant `cap_bufs.find(e.gen)` lookups across consecutive pages), batched pool stats updates, cached `Pool::mirror_address` / `CapBuf::address` device addresses, and lock-free `prot_pages_any` fast-outs. 3. Live `RX_VK_MEMSYNC_FAST=check` runs `mirror_sync_reference_scan()` in parallel and asserts 1:1 parity on both `runs` and `cap_runs` across all 256 KB skips and flat scratch paths. First read [memsync_fast.h](gpu/vk/memsync_fast.h) and [vk_memory.cpp](gpu/vk/vk_memory.cpp). ## Testing **Tested:** Windows 11, NVIDIA GeForce RTX 4060 (driver 621.40, Vulkan 1.4). - `python -X utf8 -I tests/test_vk_memsync_fast.py --cxx clang++ --headers ...` passed (`SubRegionTable` skip & boundary alignment, `SmallCapRuns` sorted coalescing, `GenBufCache`, 500-round randomized `mirror_sync` parity, source wiring, and 5 broken variants caught). - `python -X utf8 -I tests/test_hos_ab.py`, `tests/test_flat_map.py`, `tests/test_saveload_warm_cache.py`, `tests/test_vk_braces.py`, and `clang++ -fsyntax-only` on `gpu/vk/vk_memory.cpp` passed. - Live Market smoke (`RX_VK_MEMSYNC_FAST=1`, 15 s): `1,183` frames, `0` cold frames, `RUN_ERROR=None`. - Live Market parity (`RX_VK_MEMSYNC_FAST=check`, 25 s): **`654,794` syncs (`4,000,014` dirty pages checked), `0` mismatches**, `RUN_ERROR=None`. - Queued in-run `HOS_AB` (`HOS_AB=RX_VK_MEMSYNC_FAST=0,3,0`, 5×90 s, `145` paired periods in Market): `5/5` runs won, zero crashes/errors. - Rebased onto `main` @ `0aeb6858` (2026-12-03), with the three checks this change broke updated: `tests/run_all.py --exact` of `test_vk_memsync_fast`, `test_msync_pass`, `test_mem_check`, `test_capture_copy_runs`, `test_hos_ab` and `test_switch_table` passed (Windows 11, llvm-mingw clang++), and `clang++ -fsyntax-only` of `gpu/vk/vk_memory.cpp`. No game run on the rebased head. - Test farm on `f747daf`: passed on `windows+amd`, `linux+radv` and `intel`; failed on `windows+nvidia` (a GTX 980 whose Field frame times flip between two levels on main too: main p99 47.19 / 27.68 / 26.90 ms, PR 46.92 / 30.82 / 43.77 ms) and `steamdeck` (`screenshot.max_diff` 0.78 with the PR's picture taken on a loading screen; Market 1% low 61.19 -> 78.84 ms on one Deck, the other passing). `RX_VK_MEMSYNC_FAST=check` logged no mismatch. - AMD Lab, Linux RX 580 (3 pairs, `=0` vs `=1`): +6.15% median FPS, p99 39.71 -> 27.38 ms. HumanBean, Linux RTX 3090 (2 pairs): -0.55%, inconclusive (one `=1` capture with 46 frames of 50 ms or more, the other none). **Still to test:** - `main` against this head at player settings, in the Market and a heavy area, with RAM: the in-run A/B can't show the summary table's own cost, both sides pay it (`by hand`). - Steam Deck and Windows AMD: the same, and `RX_VK_MEMSYNC_FAST=check` (`by hand` / `@Beanstalk`). ## Measurements **Verdict:** faster: +0.85% fps, mean frame time -0.107 ms (95% interval +0.44% to +1.25% faster vs `RX_VK_MEMSYNC_FAST=0`). Setup: Windows 11, NVIDIA GeForce RTX 4060 (driver 621.40, Vulkan 1.4); Market, child (crowded), 50% res (`768x432`), output res `1280x720`, frame generation Off, vsync Off, uncapped (`HOS_FPS_MAX=1000`), queued in-run `HOS_AB=RX_VK_MEMSYNC_FAST=0,3,0` across 5×90 s runs (`145` paired periods; `16,207` ON frames vs `16,062` OFF frames). Baseline: both columns are one build, `056beb631` on `perf/vk-memsync-fast` (`main` @ `495ed9fe2`): `RX_VK_MEMSYNC_FAST=0` (Before) against `RX_VK_MEMSYNC_FAST` unset (After). | | Before, RX_VK_MEMSYNC_FAST=0: this PR @ 056beb63 | After, RX_VK_MEMSYNC_FAST unset: this PR @ 056beb63 | Δ | |---|---|---|---| | fps | 79.32 | 80.01 | +0.85% | | mean frame time | 12.60 ms | 12.50 ms | -0.11 ms | | median frame time | 12.33 ms | 12.24 ms | -0.09 ms | | p99 frame time | 15.72 ms | 15.51 ms | -0.21 ms | | 1% low fps | 63.65 | 64.47 | +1.29% | | 0.1% low fps | 53.62 | 54.41 | +1.47% | | `desc_ms` | 2.701 ms | 2.627 ms | -2.74% (-0.074 ms) | | `draw_ms` | 7.315 ms | 7.227 ms | -1.20% (-0.088 ms) | | `wait_gpu_ms` | 1.908 ms | 1.794 ms | -5.97% (-0.114 ms) | ## Risks Set `RX_VK_MEMSYNC_FAST=0` to restore the full 2 MB page scan and per-call `std::map` copy gathering in `mirror_sync()`, or `RX_VK_MEMSYNC_FAST=check` to verify live parity (`0` mismatches across `654k+` syncs / `4.0M+` pages). Shader cache and pipeline cache are untouched. Assisted-by: Antigravity ## 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 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] 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): add hierarchical sub-region summary and scratch reuse in mirror_sync (RX_VK_MEMSYNC_FAST)
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
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
056beb631c
Author
Contributor

Tested in game: Windows 11, NVIDIA GeForce RTX 4060 (Vulkan 1.4, driver 621.40), Market: RX_VK_MEMSYNC_FAST=1 (1183 frames, RUN_ERROR=None), =check (654794 syncs, 4.00M+ dirty pages, 0 mismatches), 5x90s HOS_AB (145 periods, +0.85% FPS, 95% CI +0.44%..+1.25%, 1% Low +1.29%, 0.1% Low +1.47%)

Tested in game: Windows 11, NVIDIA GeForce RTX 4060 (Vulkan 1.4, driver 621.40), Market: RX_VK_MEMSYNC_FAST=1 (1183 frames, RUN_ERROR=None), =check (654794 syncs, 4.00M+ dirty pages, 0 mismatches), 5x90s HOS_AB (145 periods, +0.85% FPS, 95% CI +0.44%..+1.25%, 1% Low +1.29%, 0.1% Low +1.47%)
Member

Possibly related, for context:

  • PR #2134 WIP: perf(vk): a mirror sync's walk over the page write generations in x86-64 assembly — Overlapping mirror_sync dirty-page traversal optimization
  • PR #2858 perf(vk): honor NVN2 CPU_NO_ACCESS pool flags and add AVX2 mirror_sync — Overlaps mirror_sync scan and scratch/cache optimization
  • issue #1912 Idea: # Significant Performance Difference Between Longshot and NX2navi — Mentions dirty-page synchronization as a performance area
Possibly related, for context: - PR #2134 WIP: perf(vk): a mirror sync's walk over the page write generations in x86-64 assembly — Overlapping mirror_sync dirty-page traversal optimization - PR #2858 perf(vk): honor NVN2 CPU_NO_ACCESS pool flags and add AVX2 mirror_sync — Overlaps mirror_sync scan and scratch/cache optimization - issue #1912 Idea: # Significant Performance Difference Between Longshot and NX2navi — Mentions dirty-page synchronization as a performance area
Member
@review
BeanBot left a comment

Recommendation: Request changes. The commit omits the required AI-assistance trailer, and the test hardcodes its standalone compiler. The reported speedup also does not measure the full change against main.

The change skips clean sub-regions and reuses mirror-sync scratch storage. It also adds a 16 MiB generation table and maintains it even when the new switch is off; the net player benefit against main remains unproven.

Blocking (1): must change before merging.

  1. L1: The commit has no AI-assistance trailer, although the PR records assistance and checks the trailer box. When: The only commit, 056beb631c, has no Assisted-by or Co-Authored-By trailer, so the required attribution is absent from the commit. Do: Add the required assistance trailer to the commit message.

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

  • L2 tests/test_vk_memsync_fast.py:450: The standalone test ignores the configured C++ compiler and defaults to clang++. (more on the line) Do: Default to CXX when set, with the repository's usual compiler fallback, while retaining the explicit --cxx override.

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

  • L3 gpu/vk/vk_memory.cpp:897: The A/B result excludes costs shared by both switch settings, so it cannot establish the change's net speedup against main. (more on the line) Do: Run interleaved base-versus-head measurements at player settings in Market and a heavy area, reporting FPS, frame-time tails and RAM. (@fix does its part first: Allocate and maintain summaries only where needed, if HOS_AB switching is redesigned to preserve correctness.)
  • L4 gpu/vk/memsync_fast.h:191: The new default traversal has only been exercised in game on Windows NVIDIA. (more on the line) Do: Run the default and check mode on the outstanding Tier 1 configurations, including a representative performance comparison against main.

@fix can do L1, L2 and L3.

Checks: Still running: 10 checks.

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

Does it help: Unproven. The PR reports +0.85% FPS over five interleaved runs on an RTX 4060, but both sides use the PR build and therefore include its shared costs. No comparison against base 495ed9fe is supplied.

Other systems: The changed generation tracking also feeds texture upload and write detection, and the cached addresses and scratch storage affect mirror synchronization. Windows NVIDIA received a smoke and parity run; Linux, AMD and Steam Deck coverage is still outstanding.

Switches: RX_VK_MEMSYNC_FAST is added, default on; 0 selects the legacy scan and check compares scans. Its default is not yet supported by measurements against main or by the outstanding Tier 1 runs. The switch table has a row.

Reviewed: 056beb631c against 495ed9fe2a: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the commit, the full diff, memsync_fast.h, the new test and the changed vk_memory.cpp paths and relevant callers. Skimmed the remainder of vk_memory.cpp and test_hos_ab.py. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • The new switch has a switches.def entry.
  • The mirror address cache is cleared when the mirror is freed.
  • The reported Windows check-mode run found no parity mismatches across 654,794 syncs.

Testing: No commands from the project were run, as requested. CI was still running on this head.

Overlaps and merge order: Not checked; network access was unavailable.


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

**Recommendation: Request changes.** The commit omits the required AI-assistance trailer, and the test hardcodes its standalone compiler. The reported speedup also does not measure the full change against main. The change skips clean sub-regions and reuses mirror-sync scratch storage. It also adds a 16 MiB generation table and maintains it even when the new switch is off; the net player benefit against main remains unproven. **Blocking (1)**: must change before merging. 1. **L1**: The commit has no AI-assistance trailer, although the PR records assistance and checks the trailer box. *When:* The only commit, 056beb631c5e, has no Assisted-by or Co-Authored-By trailer, so the required attribution is absent from the commit. **Do:** Add the required assistance trailer to the commit message. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `tests/test_vk_memsync_fast.py:450`: The standalone test ignores the configured C++ compiler and defaults to clang++. (more on the line) **Do:** Default to CXX when set, with the repository's usual compiler fallback, while retaining the explicit --cxx override. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_memory.cpp:897`: The A/B result excludes costs shared by both switch settings, so it cannot establish the change's net speedup against main. (more on the line) **Do:** Run interleaved base-versus-head measurements at player settings in Market and a heavy area, reporting FPS, frame-time tails and RAM. *(`@fix` does its part first: Allocate and maintain summaries only where needed, if HOS_AB switching is redesigned to preserve correctness.)* - **L4** `gpu/vk/memsync_fast.h:191`: The new default traversal has only been exercised in game on Windows NVIDIA. (more on the line) **Do:** Run the default and check mode on the outstanding Tier 1 configurations, including a representative performance comparison against main. `@fix` can do L1, L2 and L3. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven. The PR reports +0.85% FPS over five interleaved runs on an RTX 4060, but both sides use the PR build and therefore include its shared costs. No comparison against base 495ed9fe is supplied. **Other systems:** The changed generation tracking also feeds texture upload and write detection, and the cached addresses and scratch storage affect mirror synchronization. Windows NVIDIA received a smoke and parity run; Linux, AMD and Steam Deck coverage is still outstanding. **Switches:** RX_VK_MEMSYNC_FAST is added, default on; 0 selects the legacy scan and check compares scans. Its default is not yet supported by measurements against main or by the outstanding Tier 1 runs. The switch table has a row. **Reviewed:** 056beb631c5e against 495ed9fe2aaa: Read AGENTS.md, CONTRIBUTING.md, the PR template, standards, the commit, the full diff, memsync_fast.h, the new test and the changed vk_memory.cpp paths and relevant callers. Skimmed the remainder of vk_memory.cpp and test_hos_ab.py. docs/review-checklist.md and ../Tooling/AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - The new switch has a switches.def entry. - The mirror address cache is cleared when the mirror is freed. - The reported Windows check-mode run found no parity mismatches across 654,794 syncs. **Testing:** No commands from the project were run, as requested. CI was still running on this head. **Overlaps and merge order:** Not checked; network access was unavailable. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -0,0 +188,4 @@
/// Walks [start_page, end_page) invoking `on_dirty(page, pg)` for every page whose generation > `synced_gen`.
/// When `use_subregions` is true, checks 64-page sub-regions and hoists chunk/region_full pointers per 2 MB region.
/// `on_dirty` must return true to continue or false to stop early.
template <class ChunkVecT, class Fn>
Member

L4 (should fix): The new default traversal has only been exercised in game on Windows NVIDIA.

When: Linux, AMD and Steam Deck players use the same changed synchronization and texture-write paths, but the PR has no game run on those Tier 1 configurations.

Do: Run the default and check mode on the outstanding Tier 1 configurations, including a representative performance comparison against main.

**L4** (should fix): The new default traversal has only been exercised in game on Windows NVIDIA. *When:* Linux, AMD and Steam Deck players use the same changed synchronization and texture-write paths, but the PR has no game run on those Tier 1 configurations. **Do:** Run the default and check mode on the outstanding Tier 1 configurations, including a representative performance comparison against main.
@ -892,1 +894,4 @@
std::vector<uint64_t> region_full(kPages / kRegionPages);
// (longshot, RX_VK_MEMSYNC_FAST) 64-page (256 KB) max-generation summary, 8 words per 2 MB region on one cache line.
// Always maintained on every stamp so HOS_AB flips see an up-to-date summary without stale skips.
memsync_fast::SubRegionTable subregion_gen(kPages / kRegionPages);
Member

L3 (should fix): The A/B result excludes costs shared by both switch settings, so it cannot establish the change's net speedup against main.

When: Both measured modes allocate the 16 MiB table and update its summaries on every stamp; main does neither. Those costs can offset the reported 0.85% mode-to-mode gain.

Do: Run interleaved base-versus-head measurements at player settings in Market and a heavy area, reporting FPS, frame-time tails and RAM.

**L3** (should fix): The A/B result excludes costs shared by both switch settings, so it cannot establish the change's net speedup against main. *When:* Both measured modes allocate the 16 MiB table and update its summaries on every stamp; main does neither. Those costs can offset the reported 0.85% mode-to-mode gain. **Do:** Run interleaved base-versus-head measurements at player settings in Market and a heavy area, reporting FPS, frame-time tails and RAM.
@ -0,0 +447,4 @@
def main():
p = argparse.ArgumentParser(description=__doc__.split("\n")[0])
p.add_argument("--cxx", default="clang++")
Member

L2 (should fix): The standalone test ignores the configured C++ compiler and defaults to clang++.

When: On a supported Linux development setup with CXX=g++ and no clang++, invoking this test directly fails before testing the change, even though the configured compiler is available.

Do: Default to CXX when set, with the repository's usual compiler fallback, while retaining the explicit --cxx override.

**L2** (should fix): The standalone test ignores the configured C++ compiler and defaults to clang++. *When:* On a supported Linux development setup with CXX=g++ and no clang++, invoking this test directly fails before testing the change, even though the configured compiler is available. **Do:** Default to CXX when set, with the repository's usual compiler fallback, while retaining the explicit --cxx override.
siantm force-pushed perf/vk-memsync-fast from 056beb631c
Some checks failed
PR description / Title and description (pull_request_target) Successful in 6s
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 f747daf2fa
Some checks failed
PR description / Title and description (pull_request_target) Successful in 4s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows+nvidia 1/1 fail
beanstalk/windows+amd 2/1 pass
beanstalk/linux+radv 2/1 pass
beanstalk/intel 1/1 pass
beanstalk/steamdeck 1/1 fail
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
2026-12-02 09:50:45 +00:00
Compare
Author
Contributor

Updated in f747daf2f:

  • L1 (trailer): Added Assisted-by: Antigravity (Google DeepMind) to the commit message.
  • L2 (tests/test_vk_memsync_fast.py compiler selection): Replaced the hardcoded clang++ default with tests/compiler_command.py (--cxx override, then CXX, then c++, g++, clang++ fallback, plus LONGSHOT_MINGW on Windows when unset).
  • L3 (gpu/vk/vk_memory.cpp, gpu/vk/memsync_fast.h mode-0 allocation & stamp cost):
    • subregion_gen is now lazily allocated (ensure_subregion_table() / SubRegionTable::ensure()) so static RX_VK_MEMSYNC_FAST=0 (when HOS_AB does not target RX_VK_MEMSYNC_FAST) allocates 0 bytes and performs zero subregion_gen or untracked_gen writes on stamp_page() / memory_stamp().
    • When HOS_AB=RX_VK_MEMSYNC_FAST=... is active, mode-0 stamps skip subregion_gen updates and raise subregion_gen.untracked_gen; subregion_gen.usable(synced_gen) disables sub-region skipping until synced_gen >= untracked_gen, preventing stale skips across 0 -> 1 flips.
    • Added unit tests (test_static_mode_zero_no_alloc_or_writes, test_hos_ab_flip_parity) and a broken-variant trap (broken_usable_ignores_untracked_gen) in tests/test_vk_memsync_fast.py.
    • Note on L3/L4 live measurements: Interleaved base-vs-head measurements (495ed9fe2 vs f747daf2f) and Tier 1 hardware coverage beyond Windows NVIDIA remain to be run by the author/maintainers.

Verified after the final edit:

  • clang++ -std=c++20 -Wall -Wextra -Werror -x c++-header -fsyntax-only gpu/vk/memsync_fast.h (PASS)
  • python -I -B tests/test_vk_memsync_fast.py --cxx clang++, with CXX=clang++, and with CXX unset (all PASS, 6/6 broken variants caught)
  • python -I -B tests/test_hos_ab.py --cc clang (PASS)
  • python -I -B tests/test_tls_objects.py (PASS)
  • python -I -B tests/test_vk_braces.py (PASS)
Updated in `f747daf2f`: - **L1 (trailer):** Added `Assisted-by: Antigravity (Google DeepMind)` to the commit message. - **L2 (`tests/test_vk_memsync_fast.py` compiler selection):** Replaced the hardcoded `clang++` default with `tests/compiler_command.py` (`--cxx` override, then `CXX`, then `c++`, `g++`, `clang++` fallback, plus `LONGSHOT_MINGW` on Windows when unset). - **L3 (`gpu/vk/vk_memory.cpp`, `gpu/vk/memsync_fast.h` mode-0 allocation & stamp cost):** - `subregion_gen` is now lazily allocated (`ensure_subregion_table()` / `SubRegionTable::ensure()`) so static `RX_VK_MEMSYNC_FAST=0` (when `HOS_AB` does not target `RX_VK_MEMSYNC_FAST`) allocates 0 bytes and performs zero `subregion_gen` or `untracked_gen` writes on `stamp_page()` / `memory_stamp()`. - When `HOS_AB=RX_VK_MEMSYNC_FAST=...` is active, mode-0 stamps skip `subregion_gen` updates and raise `subregion_gen.untracked_gen`; `subregion_gen.usable(synced_gen)` disables sub-region skipping until `synced_gen >= untracked_gen`, preventing stale skips across `0 -> 1` flips. - Added unit tests (`test_static_mode_zero_no_alloc_or_writes`, `test_hos_ab_flip_parity`) and a broken-variant trap (`broken_usable_ignores_untracked_gen`) in `tests/test_vk_memsync_fast.py`. - *Note on L3/L4 live measurements:* Interleaved base-vs-head measurements (`495ed9fe2` vs `f747daf2f`) and Tier 1 hardware coverage beyond Windows NVIDIA remain to be run by the author/maintainers. Verified after the final edit: - `clang++ -std=c++20 -Wall -Wextra -Werror -x c++-header -fsyntax-only gpu/vk/memsync_fast.h` (PASS) - `python -I -B tests/test_vk_memsync_fast.py --cxx clang++`, with `CXX=clang++`, and with `CXX` unset (all PASS, 6/6 broken variants caught) - `python -I -B tests/test_hos_ab.py --cc clang` (PASS) - `python -I -B tests/test_tls_objects.py` (PASS) - `python -I -B tests/test_vk_braces.py` (PASS)
Owner

@review
@beanstalk

@review @beanstalk
Member
Beanstalk test farm · an earlier run: commit f747daf (the newer results are in a comment below)

Commit f747daf · approved by HumanBean (reviewed) · dashboard

⚠️ Note: The reported 0.85% improvement is smaller than the regression thresholds and may not be distinguishable from run-to-run noise; the plan measures net performance against main rather than the author's in-run switch comparison.
⚠️ Note: Check mode reports mismatches if encountered, but the plan cannot guarantee that every synchronization branch or a parity summary is reached; check-mode timings are not used for performance judgments.
⚠️ Note: macOS and the in-run HOS_AB switching comparison are not covered by these farm steps.

Summary, written by AI (gpt-6.1-terra) from the numbers below:

The change failed on Windows NVIDIA and Steam Deck; Windows AMD, Linux RADV and Intel passed overall. On the GTX 980, Hyrule Field frame-time p99 worsened from 27.68 to 43.77 ms (+58.2%), and 1% low frame time rose from 29.43 to 46.73 ms (+58.8%). On one Steam Deck, Market 1% low frame time rose from 61.19 to 78.84 ms (+28.8%), and the screenshot difference failed at 0.7842 against a 0.25 limit; the other Deck passed. The Windows Intel UHD 630 report was inconclusive because both baseline and candidate crashed on every start, pointing to that PC rather than the change; the Linux Intel report passed.

Done (started 2026-12-02 15:44 UTC, last report 07:24 UTC). Comment @Beanstalk to run it again.

Target Result Reports Frame time p99 (ms), main → PR VRAM peak (MB) Crashes
windows+nvidia ❌ fail (an outlier) 2 1 2 18.0 → 25.9 (+44%) — none
windows+amd ✅ pass 2 1 2 39.3 → 39.0 (−1%) — none
linux+radv ✅ pass (an outlier) 2 1 2 32.4 → 32.3 (−0%) — none
intel ✅ pass 2 1 2 203.1 → 204.0 (+0%) — 4 PR runs
steamdeck ❌ fail (an outlier) 2 1 2 40.3 → 37.7 (−6%) — none

Why it failed

  • windows+nvidia: default-performance field.frametime_p99_ms.max_delta_pct: 27.7 → 43.8 (+58.2%); limit 15.0
  • windows+nvidia: default-performance field.frametime_1pct_low_ms.max_delta_pct: 29.4 → 46.7 (+58.8%); limit 15.0
  • steamdeck: default-performance market.frametime_1pct_low_ms.max_delta_pct: 61.2 → 78.8 (+28.8%); limit 15.0
  • steamdeck: default-performance screenshot.max_diff: 0.2 → 0.8; limit 0.2

Couldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.

  • intel, report 1: Insufficient frame-time evidence for 6 required comparison(s). See rule results.
What was tested

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

The farm will compare main with the default fast synchronization path in Market and Hyrule Field, using three uncapped starts per side and 20-second measurements at each place. A separate check-mode run will exercise live mirror-sync parity in both places with one start per side. The plan measures frame-time tails, FPS and process memory, and compares stationary pictures; a crash, parity mismatch, excessive picture difference or frame-time regression fails the pull request. The run covers Windows NVIDIA, Windows AMD, Linux RADV, Intel and Steam Deck testers.

  • Where: windows+nvidia (1-2 reports), windows+amd (1-2 reports), linux+radv (1-2 reports), intel (1-2 reports), steamdeck (1-2 reports).
  • Matrix: 1 cell, each on main and the PR: RX_VK_MEMSYNC_FAST check (PR only).
  • default-performance: from the repository's save market-entrance (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0), then teleport to Market, take the picture market to compare with main, measure market for 20 s (after 10 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 10 s warm-up); 3 runs on each side.
  • live-parity: from the repository's save market-entrance (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0), then teleport to Market, teleport to Hyrule Field; 1 run on each side.
  • Measured: crashes, frame times, stutters and hitches, draws and frame rate, memory and CPU time, the game's log.
  • The PR fails if: it crashes; or frame time (p99) in field is more than 15% above main; or frame time (worst 1%) in field is more than 15% above main; or frame time (p99) in market is more than 15% above main; or frame time (worst 1%) in market is more than 15% above main; or a picture differs from main by more than 25%; or forbidden log lines is above 0.
  • Time: about 48 min of game runs per tester (8 game starts), plus the two builds.
Measurements on `windows+nvidia`, for the PR description

Verdict: fail on windows+nvidia (2 reports): default-performance field.frametime_p99_ms.max_delta_pct (+58.2%); default-performance field.frametime_1pct_low_ms.max_delta_pct (+58.8%) failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window+xess NVIDIA GeForce GTX 980, 582.78.0 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpu+window NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 495ed9f After: this PR @ f747daf
default-performance · field · frame time (p99) (ms) 18.0 25.9 (+44%)
default-performance · market · frame time (p99) (ms) 31.9 32.3 (+1%)
default-performance · field · frame time (worst 1%) (ms) 19.2 27.6 (+44%)
default-performance · market · frame time (worst 1%) (ms) 34.6 34.7 (+0%)
default-performance · forbidden log lines 0.0 0.0
live-parity · RX_VK_MEMSYNC_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame time (p99)) Helps / doesn't help / untested
RX_VK_MEMSYNC_FAST switch the PR adds (set on the PR side only) check not in main the PR's default live-parity, main without it → the PR with check: not measured untested

As Markdown for the PR description:

## Measurements

**Verdict:** fail on windows+nvidia (2 reports): `default-performance field.frametime_p99_ms.max_delta_pct (+58.2%)`; `default-performance field.frametime_1pct_low_ms.max_delta_pct (+58.8%)` failed.

Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM`  
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 495ed9f | After: this PR @ f747daf |
|---|---|---|
| default-performance · field · frame time (p99) (ms) | 18.0 | 25.9 (+44%) |
| default-performance · market · frame time (p99) (ms) | 31.9 | 32.3 (+1%) |
| default-performance · field · frame time (worst 1%) (ms) | 19.2 | 27.6 (+44%) |
| default-performance · market · frame time (worst 1%) (ms) | 34.6 | 34.7 (+0%) |
| default-performance · forbidden log lines | 0.0 | 0.0 |
| live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested |
Measurements on `windows+amd`, for the PR description

Verdict: pass on windows+amd (2 reports): no rule failed and no PR run crashed.

Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM; 2: windows+amd+amd-proprietary+igpu+window+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 495ed9f After: this PR @ f747daf
default-performance · field · frame time (p99) (ms) 39.3 39.0 (−1%)
default-performance · market · frame time (p99) (ms) 46.4 43.8 (−6%)
default-performance · field · frame time (worst 1%) (ms) 40.5 40.5 (−0%)
default-performance · market · frame time (worst 1%) (ms) 53.9 49.9 (−7%)
default-performance · forbidden log lines 0.0 0.0
live-parity · RX_VK_MEMSYNC_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame time (p99)) Helps / doesn't help / untested
RX_VK_MEMSYNC_FAST switch the PR adds (set on the PR side only) check not in main the PR's default live-parity, main without it → the PR with check: not measured untested

As Markdown for the PR description:

## Measurements

**Verdict:** pass on windows+amd (2 reports): no rule failed and no PR run crashed.

Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM`; 2: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM`  
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 495ed9f | After: this PR @ f747daf |
|---|---|---|
| default-performance · field · frame time (p99) (ms) | 39.3 | 39.0 (−1%) |
| default-performance · market · frame time (p99) (ms) | 46.4 | 43.8 (−6%) |
| default-performance · field · frame time (worst 1%) (ms) | 40.5 | 40.5 (−0%) |
| default-performance · market · frame time (worst 1%) (ms) | 53.9 | 49.9 (−7%) |
| default-performance · forbidden log lines | 0.0 | 0.0 |
| live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested |
Measurements on `linux+radv`, for the PR description

Verdict: pass on linux+radv (2 reports): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 495ed9f After: this PR @ f747daf
default-performance · field · frame time (p99) (ms) 32.4 32.3 (−0%)
default-performance · market · frame time (p99) (ms) 37.4 37.3 (−0%)
default-performance · field · frame time (worst 1%) (ms) 34.5 33.2 (−4%)
default-performance · market · frame time (worst 1%) (ms) 40.7 39.1 (−4%)
default-performance · forbidden log lines 0.0 0.0
live-parity · RX_VK_MEMSYNC_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame time (p99)) Helps / doesn't help / untested
RX_VK_MEMSYNC_FAST switch the PR adds (set on the PR side only) check not in main the PR's default live-parity, main without it → the PR with check: not measured untested

As Markdown for the PR description:

## Measurements

**Verdict:** pass on linux+radv (2 reports): no rule failed and no PR run crashed.

Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM`  
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 495ed9f | After: this PR @ f747daf |
|---|---|---|
| default-performance · field · frame time (p99) (ms) | 32.4 | 32.3 (−0%) |
| default-performance · market · frame time (p99) (ms) | 37.4 | 37.3 (−0%) |
| default-performance · field · frame time (worst 1%) (ms) | 34.5 | 33.2 (−4%) |
| default-performance · market · frame time (worst 1%) (ms) | 40.7 | 39.1 (−4%) |
| default-performance · forbidden log lines | 0.0 | 0.0 |
| live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested |
Measurements on `intel`, for the PR description

Verdict: pass on intel (2 reports): no rule failed and no PR run crashed.

Hardware: 1: windows+intel+intel-proprietary+igpu+window Intel(R) UHD Graphics 630, 0.404.2115 Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM; 2: linux+intel+anv+igpu Intel(R) Graphics (RKL GT1), 26.2.4 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 495ed9f After: this PR @ f747daf
default-performance · field · frame time (p99) (ms) 203.1 204.0 (+0%)
default-performance · market · frame time (p99) (ms) 235.9 237.8 (+1%)
default-performance · field · frame time (worst 1%) (ms) 203.6 204.2 (+0%)
default-performance · market · frame time (worst 1%) (ms) 249.6 242.6 (−3%)
default-performance · forbidden log lines 0.0 0.0
live-parity · RX_VK_MEMSYNC_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame time (p99)) Helps / doesn't help / untested
RX_VK_MEMSYNC_FAST switch the PR adds (set on the PR side only) check not in main the PR's default live-parity, main without it → the PR with check: not measured untested

As Markdown for the PR description:

## Measurements

**Verdict:** pass on intel (2 reports): no rule failed and no PR run crashed.

Hardware: 1: windows+intel+intel-proprietary+igpu+window `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM`; 2: linux+intel+anv+igpu `Intel(R) Graphics (RKL GT1), 26.2.4` `11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM`  
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 495ed9f | After: this PR @ f747daf |
|---|---|---|
| default-performance · field · frame time (p99) (ms) | 203.1 | 204.0 (+0%) |
| default-performance · market · frame time (p99) (ms) | 235.9 | 237.8 (+1%) |
| default-performance · field · frame time (worst 1%) (ms) | 203.6 | 204.2 (+0%) |
| default-performance · market · frame time (worst 1%) (ms) | 249.6 | 242.6 (−3%) |
| default-performance · forbidden log lines | 0.0 | 0.0 |
| live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested |
Measurements on `steamdeck`, for the PR description

Verdict: fail on steamdeck (2 reports): default-performance market.frametime_1pct_low_ms.max_delta_pct (+28.8%); default-performance screenshot.max_diff failed.

Hardware: 1: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 GB RAM; 2: linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 GB RAM
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (@Beanstalk on this PR runs it again)

Before: main @ 495ed9f After: this PR @ f747daf
default-performance · field · frame time (p99) (ms) 40.3 37.7 (−6%)
default-performance · market · frame time (p99) (ms) 51.4 52.7 (+3%)
default-performance · field · frame time (worst 1%) (ms) 57.6 41.2 (−28%)
default-performance · market · frame time (worst 1%) (ms) 67.8 73.6 (+9%)
default-performance · forbidden log lines 0.0 0.0
live-parity · RX_VK_MEMSYNC_FAST=check (PR only) · forbidden log lines 0.0 0.0

Flags and settings

Flag What it is Values tried Before this PR After this PR Effect (frame time (p99)) Helps / doesn't help / untested
RX_VK_MEMSYNC_FAST switch the PR adds (set on the PR side only) check not in main the PR's default live-parity, main without it → the PR with check: not measured untested

As Markdown for the PR description:

## Measurements

**Verdict:** fail on steamdeck (2 reports): `default-performance market.frametime_1pct_low_ms.max_delta_pct (+28.8%)`; `default-performance screenshot.max_diff` failed.

Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM`; 2: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM`  
Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them  
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports  
How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again)

| | Before: main @ 495ed9f | After: this PR @ f747daf |
|---|---|---|
| default-performance · field · frame time (p99) (ms) | 40.3 | 37.7 (−6%) |
| default-performance · market · frame time (p99) (ms) | 51.4 | 52.7 (+3%) |
| default-performance · field · frame time (worst 1%) (ms) | 57.6 | 41.2 (−28%) |
| default-performance · market · frame time (worst 1%) (ms) | 67.8 | 73.6 (+9%) |
| default-performance · forbidden log lines | 0.0 | 0.0 |
| live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 |

**Flags and settings**

| Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested |
|---|---|---|---|---|---|---|
| `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested |
The testers' hardware
Target Report Ran on
windows+nvidia 1 windows+nvidia+nvidia-proprietary+dgpu+window+xess NVIDIA GeForce GTX 980, 582.78.0 Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM
windows+nvidia 2 windows+nvidia+nvidia-proprietary+dgpu+window NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0 AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM
windows+amd 1 windows+amd+amd-proprietary+dgpu+window+fsr4 AMD Radeon RX 9070 XT, 2.0.416 AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM
windows+amd 2 windows+amd+amd-proprietary+igpu+window+xess AMD Radeon(TM) Graphics, 2.0.279 AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM
linux+radv 1 linux+amd+radv+dgpu AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1 AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM
linux+radv 2 linux+amd+radv+dgpu AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1 AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM
intel 1 windows+intel+intel-proprietary+igpu+window Intel(R) UHD Graphics 630, 0.404.2115 Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM
intel 2 linux+intel+anv+igpu Intel(R) Graphics (RKL GT1), 26.2.4 11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM
steamdeck 1 linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 GB RAM
steamdeck 2 linux+amd+radv+igpu+handheld AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99 AMD Custom APU 0405, 16 GB RAM
<!-- beanstalk:previous --> <details><summary>Beanstalk test farm · an earlier run: commit <code>f747daf</code> (the newer results are in a comment below)</summary> Commit `f747daf` · approved by HumanBean (reviewed) · [dashboard](https://beanstalk.magicbean.dev/prs/2978) ⚠️ **Note:** The reported 0.85% improvement is smaller than the regression thresholds and may not be distinguishable from run-to-run noise; the plan measures net performance against main rather than the author's in-run switch comparison. ⚠️ **Note:** Check mode reports mismatches if encountered, but the plan cannot guarantee that every synchronization branch or a parity summary is reached; check-mode timings are not used for performance judgments. ⚠️ **Note:** macOS and the in-run HOS_AB switching comparison are not covered by these farm steps. > **Summary**, written by AI (`gpt-6.1-terra`) from the numbers below: > > The change failed on Windows NVIDIA and Steam Deck; Windows AMD, Linux RADV and Intel passed overall. On the GTX 980, Hyrule Field frame-time p99 worsened from 27.68 to 43.77 ms (+58.2%), and 1% low frame time rose from 29.43 to 46.73 ms (+58.8%). On one Steam Deck, Market 1% low frame time rose from 61.19 to 78.84 ms (+28.8%), and the screenshot difference failed at 0.7842 against a 0.25 limit; the other Deck passed. The Windows Intel UHD 630 report was inconclusive because both baseline and candidate crashed on every start, pointing to that PC rather than the change; the Linux Intel report passed. Done (started 2026-12-02 15:44 UTC, last report 07:24 UTC). Comment `@Beanstalk` to run it again. | Target | Result | Reports | Frame time p99 (ms), main → PR | VRAM peak (MB) | Crashes | | --- | --- | --- | --- | --- | --- | | `windows+nvidia` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_9f1e8ead77f80cf2) [2](https://beanstalk.magicbean.dev/reports/rp_5517e06a7f0e4a55) | 18.0 → 25.9 (+44%) | — | none | | `windows+amd` | ✅ pass | 2 [1](https://beanstalk.magicbean.dev/reports/rp_647db8771994834f) [2](https://beanstalk.magicbean.dev/reports/rp_bd1345cb002b068f) | 39.3 → 39.0 (−1%) | — | none | | `linux+radv` | ✅ pass (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_2a08ae7bdb5b9124) [2](https://beanstalk.magicbean.dev/reports/rp_f6fa96eb8c0b824f) | 32.4 → 32.3 (−0%) | — | none | | `intel` | ✅ pass | 2 [1](https://beanstalk.magicbean.dev/reports/rp_e19d659b86253101) [2](https://beanstalk.magicbean.dev/reports/rp_28649f94e51ff5fe) | 203.1 → 204.0 (+0%) | — | 4 PR runs | | `steamdeck` | ❌ fail (an outlier) | 2 [1](https://beanstalk.magicbean.dev/reports/rp_8562325049dfc8cd) [2](https://beanstalk.magicbean.dev/reports/rp_18d9b9a341adc746) | 40.3 → 37.7 (−6%) | — | none | **Why it failed** - `windows+nvidia`: `default-performance` `field.frametime_p99_ms.max_delta_pct`: `27.7 → 43.8 (+58.2%); limit 15.0` - `windows+nvidia`: `default-performance` `field.frametime_1pct_low_ms.max_delta_pct`: `29.4 → 46.7 (+58.8%); limit 15.0` - `steamdeck`: `default-performance` `market.frametime_1pct_low_ms.max_delta_pct`: `61.2 → 78.8 (+28.8%); limit 15.0` - `steamdeck`: `default-performance` `screenshot.max_diff`: `0.2 → 0.8; limit 0.2` **Couldn't be judged**: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own. - `intel`, [report 1](https://beanstalk.magicbean.dev/reports/rp_e19d659b86253101): `Insufficient frame-time evidence for 6 required comparison(s). See rule results.` <details><summary>What was tested</summary> **What will be tested** · AI plan (`gpt-6.1-terra`) The farm will compare main with the default fast synchronization path in Market and Hyrule Field, using three uncapped starts per side and 20-second measurements at each place. A separate check-mode run will exercise live mirror-sync parity in both places with one start per side. The plan measures frame-time tails, FPS and process memory, and compares stationary pictures; a crash, parity mismatch, excessive picture difference or frame-time regression fails the pull request. The run covers Windows NVIDIA, Windows AMD, Linux RADV, Intel and Steam Deck testers. - **Where:** windows+nvidia (1-2 reports), windows+amd (1-2 reports), linux+radv (1-2 reports), intel (1-2 reports), steamdeck (1-2 reports). - **Matrix:** 1 cell, each on main and the PR: RX_VK_MEMSYNC_FAST `check` (PR only). - **default-performance:** from the repository's save `market-entrance` (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches `HOS_OUTPUT_RES=1280x720`, `RX_VK_AUTO_TUNE=0`), then teleport to Market, take the picture market to compare with main, measure market for 20 s (after 10 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 20 s (after 10 s warm-up); 3 runs on each side. - **live-parity:** from the repository's save `market-entrance` (settings vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0; switches `HOS_OUTPUT_RES=1280x720`, `RX_VK_AUTO_TUNE=0`), then teleport to Market, teleport to Hyrule Field; 1 run on each side. - **Measured:** crashes, frame times, stutters and hitches, draws and frame rate, memory and CPU time, the game's log. - **The PR fails if:** it crashes; or frame time (p99) in field is more than 15% above main; or frame time (worst 1%) in field is more than 15% above main; or frame time (p99) in market is more than 15% above main; or frame time (worst 1%) in market is more than 15% above main; or a picture differs from main by more than 25%; or forbidden log lines is above 0. - **Time:** about 48 min of game runs per tester (8 game starts), plus the two builds. </details> <details><summary>Measurements on `windows+nvidia`, for the PR description</summary> **Verdict:** fail on windows+nvidia (2 reports): `default-performance field.frametime_p99_ms.max_delta_pct (+58.2%)`; `default-performance field.frametime_1pct_low_ms.max_delta_pct (+58.8%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 18.0 | 25.9 (+44%) | | default-performance · market · frame time (p99) (ms) | 31.9 | 32.3 (+1%) | | default-performance · field · frame time (worst 1%) (ms) | 19.2 | 27.6 (+44%) | | default-performance · market · frame time (worst 1%) (ms) | 34.6 | 34.7 (+0%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on windows+nvidia (2 reports): `default-performance field.frametime_p99_ms.max_delta_pct (+58.2%)`; `default-performance field.frametime_1pct_low_ms.max_delta_pct (+58.8%)` failed. Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM`; 2: windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 18.0 | 25.9 (+44%) | | default-performance · market · frame time (p99) (ms) | 31.9 | 32.3 (+1%) | | default-performance · field · frame time (worst 1%) (ms) | 19.2 | 27.6 (+44%) | | default-performance · market · frame time (worst 1%) (ms) | 34.6 | 34.7 (+0%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | ``` </details> <details><summary>Measurements on `windows+amd`, for the PR description</summary> **Verdict:** pass on windows+amd (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM`; 2: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 39.3 | 39.0 (−1%) | | default-performance · market · frame time (p99) (ms) | 46.4 | 43.8 (−6%) | | default-performance · field · frame time (worst 1%) (ms) | 40.5 | 40.5 (−0%) | | default-performance · market · frame time (worst 1%) (ms) | 53.9 | 49.9 (−7%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on windows+amd (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM`; 2: windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 39.3 | 39.0 (−1%) | | default-performance · market · frame time (p99) (ms) | 46.4 | 43.8 (−6%) | | default-performance · field · frame time (worst 1%) (ms) | 40.5 | 40.5 (−0%) | | default-performance · market · frame time (worst 1%) (ms) | 53.9 | 49.9 (−7%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | ``` </details> <details><summary>Measurements on `linux+radv`, for the PR description</summary> **Verdict:** pass on linux+radv (2 reports): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 32.4 | 32.3 (−0%) | | default-performance · market · frame time (p99) (ms) | 37.4 | 37.3 (−0%) | | default-performance · field · frame time (worst 1%) (ms) | 34.5 | 33.2 (−4%) | | default-performance · market · frame time (worst 1%) (ms) | 40.7 | 39.1 (−4%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on linux+radv (2 reports): no rule failed and no PR run crashed. Hardware: 1: linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM`; 2: linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 32.4 | 32.3 (−0%) | | default-performance · market · frame time (p99) (ms) | 37.4 | 37.3 (−0%) | | default-performance · field · frame time (worst 1%) (ms) | 34.5 | 33.2 (−4%) | | default-performance · market · frame time (worst 1%) (ms) | 40.7 | 39.1 (−4%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | ``` </details> <details><summary>Measurements on `intel`, for the PR description</summary> **Verdict:** pass on intel (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+intel+intel-proprietary+igpu+window `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM`; 2: linux+intel+anv+igpu `Intel(R) Graphics (RKL GT1), 26.2.4` `11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 203.1 | 204.0 (+0%) | | default-performance · market · frame time (p99) (ms) | 235.9 | 237.8 (+1%) | | default-performance · field · frame time (worst 1%) (ms) | 203.6 | 204.2 (+0%) | | default-performance · market · frame time (worst 1%) (ms) | 249.6 | 242.6 (−3%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** pass on intel (2 reports): no rule failed and no PR run crashed. Hardware: 1: windows+intel+intel-proprietary+igpu+window `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM`; 2: linux+intel+anv+igpu `Intel(R) Graphics (RKL GT1), 26.2.4` `11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 203.1 | 204.0 (+0%) | | default-performance · market · frame time (p99) (ms) | 235.9 | 237.8 (+1%) | | default-performance · field · frame time (worst 1%) (ms) | 203.6 | 204.2 (+0%) | | default-performance · market · frame time (worst 1%) (ms) | 249.6 | 242.6 (−3%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | ``` </details> <details><summary>Measurements on `steamdeck`, for the PR description</summary> **Verdict:** fail on steamdeck (2 reports): `default-performance market.frametime_1pct_low_ms.max_delta_pct (+28.8%)`; `default-performance screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM`; 2: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 40.3 | 37.7 (−6%) | | default-performance · market · frame time (p99) (ms) | 51.4 | 52.7 (+3%) | | default-performance · field · frame time (worst 1%) (ms) | 57.6 | 41.2 (−28%) | | default-performance · market · frame time (worst 1%) (ms) | 67.8 | 73.6 (+9%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | As Markdown for the PR description: ```markdown ## Measurements **Verdict:** fail on steamdeck (2 reports): `default-performance market.frametime_1pct_low_ms.max_delta_pct (+28.8%)`; `default-performance screenshot.max_diff` failed. Hardware: 1: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM`; 2: linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` Scene: default-performance, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); live-parity, from the repository's save market-entrance (vsync=2, resolution=1, frame_rate_cap=6, quality_preset=0, frame_generation=0, HOS_OUTPUT_RES=1280x720, RX_VK_AUTO_TUNE=0); each cell's settings and switches as the table names them Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); default-performance: 3 game starts a side, market 20 s after 10 s warm-up, field 20 s after 10 s warm-up; live-parity: 1 game start a side; each number the median of the runs, then of 2 reports How to reproduce: the farm's plan above (`@Beanstalk` on this PR runs it again) | | Before: main @ 495ed9f | After: this PR @ f747daf | |---|---|---| | default-performance · field · frame time (p99) (ms) | 40.3 | 37.7 (−6%) | | default-performance · market · frame time (p99) (ms) | 51.4 | 52.7 (+3%) | | default-performance · field · frame time (worst 1%) (ms) | 57.6 | 41.2 (−28%) | | default-performance · market · frame time (worst 1%) (ms) | 67.8 | 73.6 (+9%) | | default-performance · forbidden log lines | 0.0 | 0.0 | | live-parity · `RX_VK_MEMSYNC_FAST=check (PR only)` · forbidden log lines | 0.0 | 0.0 | **Flags and settings** | Flag | What it is | Values tried | Before this PR | After this PR | Effect (frame time (p99)) | Helps / doesn't help / untested | |---|---|---|---|---|---|---| | `RX_VK_MEMSYNC_FAST` | switch the PR adds (set on the PR side only) | `check` | not in main | the PR's default | live-parity, main without it → the PR with check: not measured | untested | ``` </details> <details><summary>The testers' hardware</summary> | Target | Report | Ran on | | --- | --- | --- | | `windows+nvidia` | [1](https://beanstalk.magicbean.dev/reports/rp_9f1e8ead77f80cf2) | windows+nvidia+nvidia-proprietary+dgpu+window+xess `NVIDIA GeForce GTX 980, 582.78.0` `Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz, 32 GB RAM` | | `windows+nvidia` | [2](https://beanstalk.magicbean.dev/reports/rp_5517e06a7f0e4a55) | windows+nvidia+nvidia-proprietary+dgpu+window `NVIDIA GeForce RTX 4070 Ti SUPER, 621.14.0` `AMD Ryzen 7 7800X3D 8-Core Processor, 32 GB RAM` | | `windows+amd` | [1](https://beanstalk.magicbean.dev/reports/rp_647db8771994834f) | windows+amd+amd-proprietary+dgpu+window+fsr4 `AMD Radeon RX 9070 XT, 2.0.416` `AMD Ryzen 9 7950X 16-Core Processor, 128 GB RAM` | | `windows+amd` | [2](https://beanstalk.magicbean.dev/reports/rp_bd1345cb002b068f) | windows+amd+amd-proprietary+igpu+window+xess `AMD Radeon(TM) Graphics, 2.0.279` `AMD Ryzen 5 5600G with Radeon Graphics, 28 GB RAM` | | `linux+radv` | [1](https://beanstalk.magicbean.dev/reports/rp_2a08ae7bdb5b9124) | linux+amd+radv+dgpu `AMD Radeon RX 7900 XTX (RADV NAVI31), 26.3.1` `AMD Ryzen 7 5800X3D 8-Core Processor, 32 GB RAM` | | `linux+radv` | [2](https://beanstalk.magicbean.dev/reports/rp_f6fa96eb8c0b824f) | linux+amd+radv+dgpu `AMD Radeon RX 9070 XT (RADV GFX1201), 26.3.1` `AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAM` | | `intel` | [1](https://beanstalk.magicbean.dev/reports/rp_e19d659b86253101) | windows+intel+intel-proprietary+igpu+window `Intel(R) UHD Graphics 630, 0.404.2115` `Intel(R) Core(TM) i3-8100 CPU @ 3.60GHz, 8 GB RAM` | | `intel` | [2](https://beanstalk.magicbean.dev/reports/rp_28649f94e51ff5fe) | linux+intel+anv+igpu `Intel(R) Graphics (RKL GT1), 26.2.4` `11th Gen Intel(R) Core(TM) i7-11700K @ 3.60GHz, 128 GB RAM` | | `steamdeck` | [1](https://beanstalk.magicbean.dev/reports/rp_8562325049dfc8cd) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` | | `steamdeck` | [2](https://beanstalk.magicbean.dev/reports/rp_18d9b9a341adc746) | linux+amd+radv+igpu+handheld `AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99` `AMD Custom APU 0405, 16 GB RAM` | </details> </details>
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The net performance gain against main remains unmeasured, and the new traversal still needs in-game coverage beyond Windows NVIDIA. The reported in-run comparison shows a small improvement but excludes work shared by both switch settings. Recommend approval; not approved on the forge.

The change skips clean sub-regions and reuses scratch storage during Vulkan mirror synchronization. Lazy allocation removes the summary allocation and writes in static mode 0, at the cost of additional mode and generation tracking.

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

  • L3 gpu/vk/vk_memory.cpp:897: The A/B result excludes costs shared by both switch settings, so it cannot establish the change's net speedup against main. When: Both measured modes allocate the 16 MiB table and update its summaries on every stamp; main does neither. Those costs can offset the reported 0.85% mode-to-mode gain. Do: Run interleaved base-versus-head measurements at player settings in Market and a heavy area, reporting FPS, frame-time tails and RAM. (@fix does its part first: Allocate and maintain summaries only where needed, if HOS_AB switching is redesigned to preserve correctness.)
  • L4 gpu/vk/memsync_fast.h:191: The new default traversal has only been exercised in game on Windows NVIDIA. When: Linux, AMD and Steam Deck players use the same changed synchronization and texture-write paths, but the PR has no game run on those Tier 1 configurations. Do: Run the default and check mode on the outstanding Tier 1 configurations, including a representative performance comparison against main.

@fix can do L3.

Since the last review (on 056beb631c)
Resolved: L1 (The commit has no AI-assistance trailer, although the PR records assistance and checks the…); L2 (The standalone test ignores the configured C++ compiler and defaults to clang++.)
Still open: L3 (The A/B result excludes costs shared by both switch settings, so it cannot establish the c…); L4 (The new default traversal has only been exercised in game on Windows NVIDIA.)

Checks: Still running: 10 checks.

Also noticed (1; not asked for, not blocking)
  • The requested Beanstalk run could not be submitted because no Test Farm tool is available in this environment.
More: does it help, other systems, switches, what was read

Does it help: Unproven against main. The author's Windows RTX 4060 in-run comparison reported +0.85% FPS and improved frame-time lows over five runs, but both sides used the PR build and shared some added costs.

Other systems: The traversal affects Vulkan memory synchronization and written-page queries across platforms and GPUs. The reported live parity run covered Windows NVIDIA; Linux, AMD and Intel coverage remains outstanding.

Switches: RX_VK_MEMSYNC_FAST is added, defaults to 1, and offers 0 and check modes. Its default's net gain against main and broader hardware behavior remain unverified.

Reviewed: f747daf2fa against 495ed9fe2a: Read the commit message, repository rules, memsync_fast.h, compiler selection helper, and the changed portions of vk_memory.cpp and the tests; inspected the changes since the earlier head and the reported runs. The full vk_memory.cpp and the complete original PR diff were not read in full.; nothing run (a code review).

Checked and fine:

  • Both page stamps and whole-region stamps record untracked generations while HOS_AB runs mode 0.
  • The three fast traversal callers check whether the sub-region summaries are usable before skipping.

Testing: No commands from the project were run. The author reports passing game-free checks and Windows NVIDIA live smoke and parity runs; CI is still running.

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


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

**Recommendation: Approve.** The code is ready: only testing is left. The net performance gain against main remains unmeasured, and the new traversal still needs in-game coverage beyond Windows NVIDIA. The reported in-run comparison shows a small improvement but excludes work shared by both switch settings. Recommend approval; not approved on the forge. The change skips clean sub-regions and reuses scratch storage during Vulkan mirror synchronization. Lazy allocation removes the summary allocation and writes in static mode 0, at the cost of additional mode and generation tracking. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3** `gpu/vk/vk_memory.cpp:897`: The A/B result excludes costs shared by both switch settings, so it cannot establish the change's net speedup against main. *When:* Both measured modes allocate the 16 MiB table and update its summaries on every stamp; main does neither. Those costs can offset the reported 0.85% mode-to-mode gain. **Do:** Run interleaved base-versus-head measurements at player settings in Market and a heavy area, reporting FPS, frame-time tails and RAM. *(`@fix` does its part first: Allocate and maintain summaries only where needed, if HOS_AB switching is redesigned to preserve correctness.)* - **L4** `gpu/vk/memsync_fast.h:191`: The new default traversal has only been exercised in game on Windows NVIDIA. *When:* Linux, AMD and Steam Deck players use the same changed synchronization and texture-write paths, but the PR has no game run on those Tier 1 configurations. **Do:** Run the default and check mode on the outstanding Tier 1 configurations, including a representative performance comparison against main. `@fix` can do L3. **Since the last review** (on 056beb631c5e) Resolved: L1 (The commit has no AI-assistance trailer, although the PR records assistance and checks the…); L2 (The standalone test ignores the configured C++ compiler and defaults to clang++.) Still open: L3 (The A/B result excludes costs shared by both switch settings, so it cannot establish the c…); L4 (The new default traversal has only been exercised in game on Windows NVIDIA.) **Checks:** Still running: 10 checks. <details> <summary>Also noticed (1; not asked for, not blocking)</summary> - The requested Beanstalk run could not be submitted because no Test Farm tool is available in this environment. </details> <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Unproven against main. The author's Windows RTX 4060 in-run comparison reported +0.85% FPS and improved frame-time lows over five runs, but both sides used the PR build and shared some added costs. **Other systems:** The traversal affects Vulkan memory synchronization and written-page queries across platforms and GPUs. The reported live parity run covered Windows NVIDIA; Linux, AMD and Intel coverage remains outstanding. **Switches:** RX_VK_MEMSYNC_FAST is added, defaults to 1, and offers 0 and check modes. Its default's net gain against main and broader hardware behavior remain unverified. **Reviewed:** f747daf2fa04 against 495ed9fe2aaa: Read the commit message, repository rules, memsync_fast.h, compiler selection helper, and the changed portions of vk_memory.cpp and the tests; inspected the changes since the earlier head and the reported runs. The full vk_memory.cpp and the complete original PR diff were not read in full.; nothing run (a code review). **Checked and fine:** - Both page stamps and whole-region stamps record untracked generations while HOS_AB runs mode 0. - The three fast traversal callers check whether the sub-region summaries are usable before skipping. **Testing:** No commands from the project were run. The author reports passing game-free checks and Windows NVIDIA live smoke and parity runs; CI is still running. **Overlaps and merge order:** Not checked; the network is closed. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
Owner

Independent Linux Market A/B on PR head f747daf2fa04. RX_VK_MEMSYNC_FAST defaults to on in this revision.

Inconclusive in this short capture. Median average FPS changed by -0.55%.

Metric Off (0) On (1)
Average FPS, each run 114.74 / 115.38 126.23 / 102.62
Average FPS, median 115.06 114.43
1% low FPS (1000 ÷ p99) 72.87 46.42
Median frame time 8.05 ms 7.75 ms
p99 frame time 13.77 ms 38.32 ms
Frames of 50 ms or more, each run 7 / 1 0 / 46

Market (child), Linux 7.3.3-1-cachyos, RTX 3090, NVIDIA 620.70.06, 1280x720, 50% (640x360), uncapped with V-Sync and frame generation off. Two interleaved 30-second captures per side on the same PR binary, each after pipeline warm-up. Frame-time and 1% low rows report the median across the two captures.

The repeats on at least one side differ by more than 10%, so the average FPS delta is sensitive to the run chosen.

Independent Linux Market A/B on PR head `f747daf2fa04`. `RX_VK_MEMSYNC_FAST` defaults to on in this revision. **Inconclusive in this short capture.** Median average FPS changed by **-0.55%**. | Metric | Off (`0`) | On (`1`) | |---|---:|---:| | Average FPS, each run | 114.74 / 115.38 | 126.23 / 102.62 | | Average FPS, median | 115.06 | 114.43 | | 1% low FPS (1000 ÷ p99) | 72.87 | 46.42 | | Median frame time | 8.05 ms | 7.75 ms | | p99 frame time | 13.77 ms | 38.32 ms | | Frames of 50 ms or more, each run | 7 / 1 | 0 / 46 | Market (child), Linux 7.3.3-1-cachyos, RTX 3090, NVIDIA 620.70.06, 1280x720, 50% (640x360), uncapped with V-Sync and frame generation off. Two interleaved 30-second captures per side on the same PR binary, each after pipeline warm-up. Frame-time and 1% low rows report the median across the two captures. The repeats on at least one side differ by more than 10%, so the average FPS delta is sensitive to the run chosen.
Owner

AMD Lab Market A/B on PR head f747daf2fa04, using RX_VK_MEMSYNC_FAST=0 and RX_VK_MEMSYNC_FAST=1 on the same build.

Within the run-to-run spread. Median average FPS changed by +6.15%.

Metric A (0) B (1)
Average FPS, each capture 54.26 / 56.92 / 53.98 58.56 / 54.70 / 57.60
Average FPS, median 54.26 57.60
1% low FPS (1000 ÷ p99), median 25.18 36.52
Median frame time 17.77 ms 17.00 ms
p99 frame time, median 39.71 ms 27.38 ms
Frames of 50 ms or more, each capture 9 / 5 / 16 1 / 14 / 7

Market (child), headless Linux 7.3.3-1-cachyos, Core i7-9700K, Radeon RX 580 with Mesa RADV 3:26.2.6-1, 1280x720 output and 50% (640x360) render scale, uncapped with V-Sync and frame generation off. Three alternating pairs, 40 seconds per capture after warm-up.

After warm-up, the harness still flagged pipeline or shader activity in 33 / 13 / 47 frames on side A and 2 / 34 / 24 on side B across the three captures. The FPS and tail numbers include those frames.

AMD Lab Market A/B on PR head `f747daf2fa04`, using `RX_VK_MEMSYNC_FAST=0` and `RX_VK_MEMSYNC_FAST=1` on the same build. **Within the run-to-run spread.** Median average FPS changed by **+6.15%**. | Metric | A (`0`) | B (`1`) | |---|---:|---:| | Average FPS, each capture | 54.26 / 56.92 / 53.98 | 58.56 / 54.70 / 57.60 | | Average FPS, median | 54.26 | 57.60 | | 1% low FPS (1000 ÷ p99), median | 25.18 | 36.52 | | Median frame time | 17.77 ms | 17.00 ms | | p99 frame time, median | 39.71 ms | 27.38 ms | | Frames of 50 ms or more, each capture | 9 / 5 / 16 | 1 / 14 / 7 | Market (child), headless Linux 7.3.3-1-cachyos, Core i7-9700K, Radeon RX 580 with Mesa RADV 3:26.2.6-1, 1280x720 output and 50% (640x360) render scale, uncapped with V-Sync and frame generation off. Three alternating pairs, 40 seconds per capture after warm-up. After warm-up, the harness still flagged pipeline or shader activity in 33 / 13 / 47 frames on side A and 2 / 34 / 24 on side B across the three captures. The FPS and tail numbers include those frames.
siantm force-pushed perf/vk-memsync-fast from f747daf2fa
Some checks failed
PR description / Title and description (pull_request_target) Successful in 4s
beanstalk/approval approved by HumanBean (reviewed)
beanstalk/windows+nvidia 1/1 fail
beanstalk/windows+amd 2/1 pass
beanstalk/linux+radv 2/1 pass
beanstalk/intel 1/1 pass
beanstalk/steamdeck 1/1 fail
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 8eb6923443
Some checks are pending
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 6s
2026-12-03 19:43:39 +00:00
Compare
Member

Beanstalk test farm

Commit 8eb6923 · approved by nobody yet · dashboard

A member of BigBeans can review this commit and comment @Beanstalk to test it.

<!-- beanstalk:sticky --> ### Beanstalk test farm Commit `8eb6923` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/2978) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
Author
Contributor

Rebased onto main @ 0aeb6858 (head 8eb69234). The default stays on. The description's Testing is updated.

Rebase conflicts, resolved keeping both sides:

  • Pool: main's switch-gated mirror-address cache (cached_mirror_address/cached_mirror_buf, used by RX_VK_WB_CPU_WORDS_FAST) sits beside this PR's mirror_address.
  • mirror_sync: main's span_memo_flush stays beside this PR's mode logic.

Checks this PR broke, fixed in 00c4c5bc, aaa5ae16 and 8eb69234. On the rebased head, tests/run_all.py --changed origin/main showed three checks broken by this PR's own changes (test_mem_check, test_msync_pass, test_capture_copy_runs), plus three that ran out of time (below).

  • tests/test_mem_check.py: the fast walk in mirror_sync called mem_checker().live_read(…) behind a local copy of mem_check_on(), which the check doesn't accept as the switch. It now asks mem_check_on() itself, as the walked path does (gpu/vk/vk_memory.cpp). There is no change when RX_VK_MEM_CHECK is unset.
  • tests/test_msync_pass.py: msync_pass_add gained a capture-address argument, and its copies are now counted by msync_copies_n so their arrays are reused. The test now cuts the new signature and counts the copies in use, so an earlier sync's entry is taken again. It also checks that an address the caller passes is used (with the buffer's own lookup gone), and that the mirror's address is kept in the pool.
  • tests/test_msync_pass.py's source checks: this PR moved mirror_sync's loop over the capture buffers into emit_mirror_sync_copies and its emit_cap lambda, so the checks now read it there (8eb69234). Before moving them I checked both rules against the new code. The runs the pass takes are still copied into the write-back shadow (shadow_sync_copy in emit_cap's taken branch). msync_pass_flush() still comes right after the loop over the capture buffers (both loops of the if constexpr), which calls only emit_cap and has no return. The checks also require that mirror_sync hands the pass no run itself. Each check fails on a copy of the source with its rule broken (shadow copy removed, flush moved after the early return, a return in the loop, an extra emit_cap call).
  • tests/test_capture_copy_runs.py: append_capture_copy now calls memsync_fast::append_copy, so the fixture includes memsync_fast.h.

Farm results (f747daf):

  • windows+nvidia (GTX 980), Field p99 27.68 → 43.77 ms: the Field frame times on that PC switch between two levels on both sides. Main's starts gave 47.19 / 27.68 / 26.90 ms and the PR's 46.92 / 30.82 / 43.77 ms, with mean FPS 24.7 / 43.0 / 45.0 against 24.6 / 38.1 / 27.2. With main itself hitting 47 ms, that +58% can't be put on the PR. The RTX 4070 Ti SUPER report on the same target passed, with the PR slightly faster.
  • steamdeck screenshot.max_diff 0.78: the PR's Market picture is a loading screen, so the capture came too early. It doesn't show the scene.
  • steamdeck Market 1% low 61.19 → 78.84 ms: PR starts 78.84 / 92.61 / 76.17 ms against main's 60.84 / 61.19 / 86.31 ms. The other Deck passed, and there main's own starts went 74.35 / 48.51 / 326.75 ms. Weak evidence either way.
  • RX_VK_MEMSYNC_FAST=check logged no mismatch on any target.

Measurements by people:

  • AMD Lab, RX 580: +6.15% median FPS, p99 39.71 → 27.38 ms.
  • HumanBean, Linux RTX 3090: -0.55%, inconclusive. Its p99 13.77 → 38.32 ms comes from one =1 capture with 46 frames of 50 ms or more; the other =1 capture had none, at 126 FPS.

No system shows it slower, so the default stays on.

L3 (net gain against main, including the summary table's cost): still open. With the switch on, both A/B sides pay for the 64-page summary (subregion_gen, allocated on first use, gpu/vk/vk_memory.cpp:895-898). So the in-run A/B can't show the net effect against main; that needs base-against-head runs at player settings, which I can't run here (one Windows RTX 4060 PC, a shared queue, no game runs). L4 (other Tier 1 systems): the farm ran default and check mode on all six targets (above), and the AMD Lab ran Linux RX 580. Still missing: a base-against-head comparison at player settings on AMD and Steam Deck.

Tested on the rebased head (Windows 11, llvm-mingw clang++):

  • tests/run_all.py --exact of test_msync_pass, test_mem_check, test_capture_copy_runs, test_vk_memsync_fast, test_hos_ab, test_switch_table: 6 passed, 0 failed.
  • clang++ -fsyntax-only of gpu/vk/vk_memory.cpp, with the build plan's own compile command: no errors.
  • The three that ran out of time (test_direct_buffer_writes, test_invalidate_quick, test_wb_spans) did so only while 8 checks ran at once. Run one at a time, they passed on this PR and on main (checked before the last rebase, on main @ 1c91b18f).
    No game run on the rebased head.
Rebased onto `main` @ `0aeb6858` (head `8eb69234`). The default stays on. The description's Testing is updated. **Rebase conflicts, resolved keeping both sides:** - `Pool`: `main`'s switch-gated mirror-address cache (`cached_mirror_address`/`cached_mirror_buf`, used by `RX_VK_WB_CPU_WORDS_FAST`) sits beside this PR's `mirror_address`. - `mirror_sync`: `main`'s `span_memo_flush` stays beside this PR's mode logic. **Checks this PR broke, fixed in `00c4c5bc`, `aaa5ae16` and `8eb69234`.** On the rebased head, `tests/run_all.py --changed origin/main` showed three checks broken by this PR's own changes (`test_mem_check`, `test_msync_pass`, `test_capture_copy_runs`), plus three that ran out of time (below). - `tests/test_mem_check.py`: the fast walk in `mirror_sync` called `mem_checker().live_read(…)` behind a local copy of `mem_check_on()`, which the check doesn't accept as the switch. It now asks `mem_check_on()` itself, as the walked path does (`gpu/vk/vk_memory.cpp`). There is no change when `RX_VK_MEM_CHECK` is unset. - `tests/test_msync_pass.py`: `msync_pass_add` gained a capture-address argument, and its copies are now counted by `msync_copies_n` so their arrays are reused. The test now cuts the new signature and counts the copies in use, so an earlier sync's entry is taken again. It also checks that an address the caller passes is used (with the buffer's own lookup gone), and that the mirror's address is kept in the pool. - `tests/test_msync_pass.py`'s source checks: this PR moved `mirror_sync`'s loop over the capture buffers into `emit_mirror_sync_copies` and its `emit_cap` lambda, so the checks now read it there (`8eb69234`). Before moving them I checked both rules against the new code. The runs the pass takes are still copied into the write-back shadow (`shadow_sync_copy` in `emit_cap`'s taken branch). `msync_pass_flush()` still comes right after the loop over the capture buffers (both loops of the `if constexpr`), which calls only `emit_cap` and has no `return`. The checks also require that `mirror_sync` hands the pass no run itself. Each check fails on a copy of the source with its rule broken (shadow copy removed, flush moved after the early `return`, a `return` in the loop, an extra `emit_cap` call). - `tests/test_capture_copy_runs.py`: `append_capture_copy` now calls `memsync_fast::append_copy`, so the fixture includes `memsync_fast.h`. **Farm results (`f747daf`):** - `windows+nvidia` (GTX 980), Field p99 27.68 → 43.77 ms: the Field frame times on that PC switch between two levels on **both** sides. Main's starts gave 47.19 / 27.68 / 26.90 ms and the PR's 46.92 / 30.82 / 43.77 ms, with mean FPS 24.7 / 43.0 / 45.0 against 24.6 / 38.1 / 27.2. With main itself hitting 47 ms, that +58% can't be put on the PR. The RTX 4070 Ti SUPER report on the same target passed, with the PR slightly faster. - `steamdeck` `screenshot.max_diff` 0.78: the PR's Market picture is a loading screen, so the capture came too early. It doesn't show the scene. - `steamdeck` Market 1% low 61.19 → 78.84 ms: PR starts 78.84 / 92.61 / 76.17 ms against main's 60.84 / 61.19 / 86.31 ms. The other Deck passed, and there main's own starts went 74.35 / 48.51 / 326.75 ms. Weak evidence either way. - `RX_VK_MEMSYNC_FAST=check` logged no mismatch on any target. **Measurements by people:** - AMD Lab, RX 580: +6.15% median FPS, p99 39.71 → 27.38 ms. - HumanBean, Linux RTX 3090: -0.55%, inconclusive. Its p99 13.77 → 38.32 ms comes from one `=1` capture with 46 frames of 50 ms or more; the other `=1` capture had none, at 126 FPS. No system shows it slower, so the default stays on. **L3 (net gain against `main`, including the summary table's cost):** still open. With the switch on, both A/B sides pay for the 64-page summary (`subregion_gen`, allocated on first use, `gpu/vk/vk_memory.cpp:895-898`). So the in-run A/B can't show the net effect against `main`; that needs base-against-head runs at player settings, which I can't run here (one Windows RTX 4060 PC, a shared queue, no game runs). **L4 (other Tier 1 systems):** the farm ran default and check mode on all six targets (above), and the AMD Lab ran Linux RX 580. Still missing: a base-against-head comparison at player settings on AMD and Steam Deck. **Tested on the rebased head** (Windows 11, llvm-mingw clang++): - `tests/run_all.py --exact` of `test_msync_pass`, `test_mem_check`, `test_capture_copy_runs`, `test_vk_memsync_fast`, `test_hos_ab`, `test_switch_table`: 6 passed, 0 failed. - `clang++ -fsyntax-only` of `gpu/vk/vk_memory.cpp`, with the build plan's own compile command: no errors. - The three that ran out of time (`test_direct_buffer_writes`, `test_invalidate_quick`, `test_wb_spans`) did so only while 8 checks ran at once. Run one at a time, they passed on this PR and on `main` (checked before the last rebase, on `main` @ `1c91b18f`). No game run on the rebased head.
dyst left a comment

Recommendation: Wait (on numbers against main and a Test Farm run of the rebased head). I found no bug in the fast walk. The code reads as equivalent to the old scan. But no measurement against main shows a gain: the farm's main-against-PR runs on f747daf show none on any target, and two targets failed. The head also conflicts with main. A perf change with no measured gain doesn't merge yet.

For a player: the same pictures, with a cheaper mirror sync each submission. Clean 256 KB pieces of a dirty 2 MB region are skipped, scratch arrays are reused, and device addresses are cached. The code gets a separate header with a standalone test and a live =check parity mode, which is good. It also adds a second mirror-sync path beside the old one while the switch exists.

Does it help: Unproven.

  • The only numbers against main are the farm's on f747daf: windows+amd p99 -1%, linux+radv -0%, intel +0%. windows+nvidia failed: GTX 980 Field p99 27.7 -> 43.8 ms (main also swings to 47 ms on that PC), while the 4070 Ti SUPER passed. steamdeck failed: one Deck's Market 1% low 61.2 -> 78.8 ms, and its picture was a loading screen.
  • The author's +0.85% (95% interval +0.44% to +1.25%) is an in-run HOS_AB within the PR's build on one RTX 4060. Its =0 side is not main: the 16 MiB table is allocated, every stamp does a CAS on untracked_gen, and region_gen is now a CAS max instead of a store.
  • The hand runs were +6.15% (RX 580, inside the run-to-run spread, with shader activity in the captures) and -0.55% (RTX 3090, inconclusive).

Other systems:

  • Every GPU and OS runs the new stamps: stamp_page, the whole-region path in memory_stamp, and memory_begin_submission's mode switch.
  • In the default mode, mirror_sync, memory_written_since, memory_written_runs and cap_pages_over all take the new walk.
  • =check compares only mirror_sync's output (below).
  • RAM: the 16 MiB summary (2^18 regions x 64 B) is committed on the first stamp on every PC, the Deck included. Risks doesn't name it.

Switches: RX_VK_MEMSYNC_FAST (kill; default on, 0 the old scan, check both with a parity log). The row is in switches.def. Default on is not yet backed by measurements against main on any platform.

Reviewed: 8eb692344 against merge base 0aeb68589.

  • Read in full: gpu/vk/memsync_fast.h, the whole gpu/vk/vk_memory.cpp diff, and the code it relies on: page_gen, stamp_page, memory_stamp, the region_gen/region_full writers (only those two), kChunkPages/kCapChunkPages, every assignment to Pool::mirror (mirror_make, the sparse mirror's creation, mirror_free), old cap_pages_over, msync_copies users, prot_pages writers, and host/hos_ab.c's value format.
  • Skimmed: tests/test_vk_memsync_fast.py, tests/test_msync_pass.py, tests/test_capture_copy_runs.py.
  • Nothing run.

Fixed in this review: nothing (no push).

Checked and fine:

  • Skipping a sub-region is safe:
    • Every writer of a page's generation updates the summary when the mode isn't 0. Those are stamp_page and memory_stamp's whole-region path, the only writers of region_gen and region_full.
    • A sub-region's value is a max over its pages, so a clean sub-region has only clean pages.
    • The write order (page, then sub-region, then region, each a release) means a reader that sees a region dirty also sees the sub-region update.
  • HOS_AB flips are covered: mode-0 stamps raise untracked_gen, the flip raises it to gen_now, and usable() holds skips off until the pool has synced past it. HOS_AB names one switch (host/hos_ab.c), so the strncmp prefix test is right. Static =0 never allocates or reads the table.
  • Taking walk_dirty_pages' chunk pointer and cap_pages_over's capture chunk once per region is sound: both chunk sizes are 65,536 pages, a multiple of the 512-page region, so a region never spans two chunks.
  • region_gen as a monotonic max can't hide a page that a later stamp with a lower generation would have hidden. That holds on the =0 side too.
  • SmallCapRuns keeps std::map<VkBuffer,...>'s order (std::less), so the copies go out in the same order. Insertion keeps inner capacities and resets last_idx.
  • GenBufCache pointers into cap_bufs stay valid through a pass (nothing erases).
  • msync_copies_n replaces clear() at every user (msync_pass_add, both flush exits, the fallback loop).
  • Pool::mirror_address is set in mirror_make (dense and sparse) and cleared in mirror_free. There is no other place a mirror is replaced.
  • CapBuf::address lives and dies with its cap_bufs entry.
  • prot_pages_any is written under prot_mu at the only writer of prot_pages.
  • In mirror_sync, the fast path keeps the old per-page order: GPU-page diagnostic, write-back note, protected pages, capture, live. A =check mismatch falls back to the reference copies.

Suggestions

  1. Rebase: tests/test_hos_ab.py conflicts with main in the WIRED table (both sides add rows: keep both). The other files merge cleanly.
  2. tests/test_hos_ab.py:364: the WIRED comment is out of date since f747daf2f. It says "subregion_gen is always maintained on every stamp" and "no cross-submission mode state". In fact, mode-0 stamps skip the table and raise untracked_gen, which carries across submissions. Fix it while resolving the conflict.
  3. gpu/vk/vk_memory.cpp:1104, :1125, :7228: with =check, memory_written_since, memory_written_runs and cap_pages_over still take the new walk unchecked. So the "0 mismatches over 654k syncs" covers mirror_sync only. Comparing their results with the old loops in check mode would cost a few lines.
  4. gpu/vk/vk_memory.cpp:99-101: Pool now caches the mirror's address twice: main's cached_mirror_address/cached_mirror_buf for RX_VK_WB_CPU_WORDS_FAST, and this PR's mirror_address. Since mirror_address is set at mirror_make and cleared at mirror_free, the write-back path could read it and the other pair could go.
  5. gpu/vk/vk_memory.cpp:898: the 16 MiB table is zero-filled and committed at once. Allocating it per 256 MB chunk on first stamp (as gen_chunks is) would keep it to the address space the game touches. Either way, name the RAM in Risks.
  6. Description: Measurements' baseline is the switch flipped in the PR's build, yet the "Measured against main" box is ticked. Say which it is, or add the main-against-head numbers.

Testing:

  • Author (RTX 4060, Windows, on older heads): smoke, =check (654,794 syncs, 0 mismatches), and the 5x90 s in-run A/B.
  • Test Farm on f747daf: 3 targets pass, 2 fail (above). =check logged no mismatch anywhere.
  • Hand runs: RX 580 and RTX 3090 (above).
  • The rebased head 8eb69234 has had no game run and no farm run (the farm's sticky says no BigBean has approved one).
  • Still missing, and it holds the merge: main against this head at player settings in the Market and a heavy area, with RAM. Also a farm run of the rebased head to settle or confirm the GTX 980 Field and Deck Market tails.

Overlaps and merge order:

  • Other open PRs that touch the mirror sync and memory paths: #3162, #3116, #3114, #3080, #2989, #2948.
  • Also #2858 (AVX2 mirror_sync) and #2134 (assembly walk) optimise the same loop, so only one approach should land.
  • Whichever merges first, the other rebases and measures again: these change the same mirror_sync scan, so their gains don't add.
**Recommendation: Wait (on numbers against `main` and a Test Farm run of the rebased head).** I found no bug in the fast walk. The code reads as equivalent to the old scan. But no measurement against `main` shows a gain: the farm's `main`-against-PR runs on `f747daf` show none on any target, and two targets failed. The head also conflicts with `main`. A perf change with no measured gain doesn't merge yet. For a player: the same pictures, with a cheaper mirror sync each submission. Clean 256 KB pieces of a dirty 2 MB region are skipped, scratch arrays are reused, and device addresses are cached. The code gets a separate header with a standalone test and a live `=check` parity mode, which is good. It also adds a second mirror-sync path beside the old one while the switch exists. **Does it help:** Unproven. - The only numbers against `main` are the farm's on `f747daf`: windows+amd p99 -1%, linux+radv -0%, intel +0%. windows+nvidia failed: GTX 980 Field p99 27.7 -> 43.8 ms (`main` also swings to 47 ms on that PC), while the 4070 Ti SUPER passed. steamdeck failed: one Deck's Market 1% low 61.2 -> 78.8 ms, and its picture was a loading screen. - The author's +0.85% (95% interval +0.44% to +1.25%) is an in-run `HOS_AB` within the PR's build on one RTX 4060. Its `=0` side is not `main`: the 16 MiB table is allocated, every stamp does a CAS on `untracked_gen`, and `region_gen` is now a CAS max instead of a store. - The hand runs were +6.15% (RX 580, inside the run-to-run spread, with shader activity in the captures) and -0.55% (RTX 3090, inconclusive). **Other systems:** - Every GPU and OS runs the new stamps: `stamp_page`, the whole-region path in `memory_stamp`, and `memory_begin_submission`'s mode switch. - In the default mode, `mirror_sync`, `memory_written_since`, `memory_written_runs` and `cap_pages_over` all take the new walk. - `=check` compares only `mirror_sync`'s output (below). - RAM: the 16 MiB summary (2^18 regions x 64 B) is committed on the first stamp on every PC, the Deck included. Risks doesn't name it. **Switches:** `RX_VK_MEMSYNC_FAST` (kill; default on, `0` the old scan, `check` both with a parity log). The row is in `switches.def`. Default on is not yet backed by measurements against `main` on any platform. **Reviewed:** `8eb692344` against merge base `0aeb68589`. - Read in full: `gpu/vk/memsync_fast.h`, the whole `gpu/vk/vk_memory.cpp` diff, and the code it relies on: `page_gen`, `stamp_page`, `memory_stamp`, the `region_gen`/`region_full` writers (only those two), `kChunkPages`/`kCapChunkPages`, every assignment to `Pool::mirror` (`mirror_make`, the sparse mirror's creation, `mirror_free`), old `cap_pages_over`, `msync_copies` users, `prot_pages` writers, and `host/hos_ab.c`'s value format. - Skimmed: `tests/test_vk_memsync_fast.py`, `tests/test_msync_pass.py`, `tests/test_capture_copy_runs.py`. - Nothing run. **Fixed in this review:** nothing (no push). **Checked and fine:** - Skipping a sub-region is safe: - Every writer of a page's generation updates the summary when the mode isn't 0. Those are `stamp_page` and `memory_stamp`'s whole-region path, the only writers of `region_gen` and `region_full`. - A sub-region's value is a max over its pages, so a clean sub-region has only clean pages. - The write order (page, then sub-region, then region, each a release) means a reader that sees a region dirty also sees the sub-region update. - `HOS_AB` flips are covered: mode-0 stamps raise `untracked_gen`, the flip raises it to `gen_now`, and `usable()` holds skips off until the pool has synced past it. `HOS_AB` names one switch (`host/hos_ab.c`), so the `strncmp` prefix test is right. Static `=0` never allocates or reads the table. - Taking `walk_dirty_pages`' chunk pointer and `cap_pages_over`'s capture chunk once per region is sound: both chunk sizes are 65,536 pages, a multiple of the 512-page region, so a region never spans two chunks. - `region_gen` as a monotonic max can't hide a page that a later stamp with a lower generation would have hidden. That holds on the `=0` side too. - `SmallCapRuns` keeps `std::map<VkBuffer,...>`'s order (`std::less`), so the copies go out in the same order. Insertion keeps inner capacities and resets `last_idx`. - `GenBufCache` pointers into `cap_bufs` stay valid through a pass (nothing erases). - `msync_copies_n` replaces `clear()` at every user (`msync_pass_add`, both flush exits, the fallback loop). - `Pool::mirror_address` is set in `mirror_make` (dense and sparse) and cleared in `mirror_free`. There is no other place a mirror is replaced. - `CapBuf::address` lives and dies with its `cap_bufs` entry. - `prot_pages_any` is written under `prot_mu` at the only writer of `prot_pages`. - In `mirror_sync`, the fast path keeps the old per-page order: GPU-page diagnostic, write-back note, protected pages, capture, live. A `=check` mismatch falls back to the reference copies. **Suggestions** 1. Rebase: `tests/test_hos_ab.py` conflicts with `main` in the `WIRED` table (both sides add rows: keep both). The other files merge cleanly. 2. `tests/test_hos_ab.py:364`: the `WIRED` comment is out of date since `f747daf2f`. It says "subregion_gen is always maintained on every stamp" and "no cross-submission mode state". In fact, mode-0 stamps skip the table and raise `untracked_gen`, which carries across submissions. Fix it while resolving the conflict. 3. `gpu/vk/vk_memory.cpp:1104`, `:1125`, `:7228`: with `=check`, `memory_written_since`, `memory_written_runs` and `cap_pages_over` still take the new walk unchecked. So the "0 mismatches over 654k syncs" covers `mirror_sync` only. Comparing their results with the old loops in check mode would cost a few lines. 4. `gpu/vk/vk_memory.cpp:99-101`: `Pool` now caches the mirror's address twice: `main`'s `cached_mirror_address`/`cached_mirror_buf` for `RX_VK_WB_CPU_WORDS_FAST`, and this PR's `mirror_address`. Since `mirror_address` is set at `mirror_make` and cleared at `mirror_free`, the write-back path could read it and the other pair could go. 5. `gpu/vk/vk_memory.cpp:898`: the 16 MiB table is zero-filled and committed at once. Allocating it per 256 MB chunk on first stamp (as `gen_chunks` is) would keep it to the address space the game touches. Either way, name the RAM in Risks. 6. Description: Measurements' baseline is the switch flipped in the PR's build, yet the "Measured against `main`" box is ticked. Say which it is, or add the `main`-against-head numbers. **Testing:** - Author (RTX 4060, Windows, on older heads): smoke, `=check` (654,794 syncs, 0 mismatches), and the 5x90 s in-run A/B. - Test Farm on `f747daf`: 3 targets pass, 2 fail (above). `=check` logged no mismatch anywhere. - Hand runs: RX 580 and RTX 3090 (above). - The rebased head `8eb69234` has had no game run and no farm run (the farm's sticky says no BigBean has approved one). - Still missing, and it holds the merge: `main` against this head at player settings in the Market and a heavy area, with RAM. Also a farm run of the rebased head to settle or confirm the GTX 980 Field and Deck Market tails. **Overlaps and merge order:** - Other open PRs that touch the mirror sync and memory paths: https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3162, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3116, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3114, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/3080, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2989, https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2948. - Also https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2858 (AVX2 `mirror_sync`) and https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2134 (assembly walk) optimise the same loop, so only one approach should land. - Whichever merges first, the other rebases and measures again: these change the same `mirror_sync` scan, so their gains don't add.
Some checks are pending
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
beanstalk/approval not approved yet
PR description / Title and description (pull_request_target) Successful in 6s
This pull request has changes conflicting with the target branch.
  • tests/test_hos_ab.py
Some workflows are waiting to be reviewed.
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'perf/vk-memsync-fast:siantm-perf/vk-memsync-fast'
git switch 'siantm-perf/vk-memsync-fast'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
6 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!2978
No description provided.