fix(vk): admit capture sizes while retaining loading spares #2281

Merged
HumanBean merged 2 commits from tevan/Longshot:fix/capture-spare-admission into main 2026-11-28 05:06:37 +00:00
Contributor

Summary

A full capture-spare pool can keep rejecting a newly needed buffer size even after that buffer finishes real work. Twelve small spares cannot serve a larger request, but the completed large capture cannot enter the pool; the next request allocates again. Byte exhaustion can produce the same starvation below twelve slots.

Admit completed real captures by displacing the most represented size class first, counting the incoming capture too. Break ties by oldest return. This retains rare large/prewarmed loading spares when small captures return repeatedly. Keep the existing twelve slots, byte ceilings, worker reservations and asynchronous/synchronous release paths. Speculative workers cannot displace spares, and destruction happens after unlocking through a fixed-size eviction array.

Read cap_buf_free in gpu/vk/vk_memory.cpp, then tests/test_capture_spare_admission.py. See #2220. The branch has the regression-test commit before the fix commit. This addresses demonstrated admission/reuse churn; the original approximately 47-minute Lost Woods/Dodongo fault storm is not established as fixed.

Prior work: open #1599 also retains size classes, specializing in a missing large class at slot exhaustion and adding refill/selection changes. This change independently implements general admission at entry or byte exhaustion and avoids that PR's other behavior changes. Merged #2366 fixes a separate culling-table wait and is included on both sides.

Head e537e5739136f842fa947fdf14cf31683b5398ef, based on main a8f6b4da230ba04ca3ed367b7767c75f0493efde. Measurements below ran main 388c9d4b against candidate 092e81a2; the final rebase adds only upstream's builder ROM-export command/docs. Game, host and renderer source are byte-identical across that rebase, and both measured sides used the same host executable. Final-head validation is listed separately.

Testing

Tested: Linux 7.2.11-arch1-1, Ryzen 5 7600X, 32 GB RAM, RX 6800 XT 16 GB, RADV/Mesa 26.2.5-arch1.1.

  • Exact-main/head production-function oracle with GCC and Clang: sixteen allocations for sixteen requests on main, one here. The new repeated-small-return test retains two loading spares and needs zero creations for the next simultaneous large requests; FIFO fails it. Covers entry/byte exhaustion, mixed in-flight sizes, worker reservations, speculative prewarm, pressure limits, exactly-once destruction outside the mutex and inherited minimum-size overrides. Class-selection mutations also fail assertions.
  • The full strict suite before the two subsequent upstream-only rebases had 851 passes, nine explicit platform/GPU skips and one unchanged-main failure: tests/test_lifter.py, three Clippy needless_borrow findings in builder/crates/build-driver/src/play.rs. The candidate's GPU source is unchanged since that run. Rebased main388/head092: 124 affected checks pass, none fail or skip. Final rebase strict affected checks: 130 pass, none fail or skip.
  • Linux renderer build/link/runtime assembly and Windows llvm-mingw renderer build/link/export checks pass on the measured revision. Final-head Linux runtime assembly on main a8f6b4da and Windows renderer rebuild/link/export checks also pass. Pre-commit checks pass, including Ruff and secret detection. Required independent cold ownership/locking review found no blocking issue; its additional rare-loading-spare case was added and passes.
  • Both diagnostic runtimes were primed with a full-input nine-visit circuit from identical cache contents. Queued A/B/A/B then completed all 72 visits in four isolated processes, copied saves/settings, nine visits per circuit and two circuits per process. All arrivals, effective settings and queue noise checks pass. No crashes or sustained severe standing slowdown. Residual cold frames are retained, not filtered out.
  • Clean final installed runtime passes Lost Woods and Dodongo with normal asynchronous release and with RX_VK_CAP_FREE_ASYNC=0; four screenshots inspected, rendering correct, all 31 player save/settings files unchanged from before installation. Windows execution and L3 hardware remain unavailable locally.

Still to test:

  • Linux RX 6800 XT, by hand: a single uninterrupted session beyond the original approximately 47-minute onset through Lost Woods/Dodongo; check sustained standing slowdown and mapped-buffer faults. The shorter comparison processes do not establish that mitigation.
  • Windows AMD/NVIDIA and Steam Deck, Test Farm with maintainer approval: current main versus this PR through repeated Kokiri/Field/Lost Woods/Kakariko/Death Mountain/Dodongo transitions, same settings and copied saves, normal/tight memory budgets and asynchronous release on/off. Expect correct rendering, bounded retention and no consistent loading/frame-pacing regression. Runtime coverage is not claimed by the Windows cross-build.

Measurements

Verdict: about 86% fewer successful capture-buffer creations and 64% less logical capture-buffer capacity created per minute on this PC. Typical load time is unchanged; the previous FIFO candidate's repeatable loading regression is not present in this comparison. Rare >=250 ms loading frames remain mixed, and this is not proof that every hitch or the original long-session episode is fixed.

Default spare-budget profile

Setup: hardware above; 3440x1440 game picture, 75% render, uncapped (HOS_FPS_MAX=1000), VSync/frame generation off, muted, copied settings/private test saves. Identical private counters on both sides, removed from the player build. A1/B1/A2/B2, two nine-visit circuits each; fixed camera/step inputs followed by at least thirty seconds standing per visit (35 seconds requested dwell). Primary results are the second circuit of each process; first circuits and all cold flags remain in the local data. Medians of two runs:

Before: main @ 388c9d4bdd After: this PR @ 092e81a2c0dc
Capture-buffer creations/min 1047.50 141.92
Creations/10,000 capture requests 328.78 43.81
Logical capture-buffer MiB created/min 5222.59 1858.23
Standing FPS 119.52 122.36
Standing p99 frame time, ms 11.62 10.86
Standing frames >=50 ms 2.5 1
Loading frames >=50 / >=100 / >=250 ms 55 / 20 / 1 51 / 16.5 / 2
Median load time, s 3.560 3.557
p99 load time, s 4.717 4.229
Peak game RAM, MiB 7321 7490
Peak DRM VRAM, MiB 12117.88 11729.54
Peak DRM GTT, MiB (separate from RAM) 3760.70 3722.70
Capture-worker major faults 1,151,390 876,586

Repeat spread, main versus revised: creations/min 1039.88/1055.13 versus 143.80/140.04; median loads 3.483/3.638 versus 3.639/3.474 seconds; loading >=100 ms frames 23/17 versus 13/20; >=250 ms frames 2/0 versus 3/1. Standing FPS 119.57/119.47 versus 122.12/122.59, a modest local difference, not a general FPS promise. Per-area standing rates are mixed in Field and improve more in several other areas. Peak game RAM increases about 169 MiB (+2.3%); VRAM drops about 388 MiB. Minimum available system RAM stays above 13.8 GiB and game swap is zero.

Residual second-circuit cold-frame counts A1/B1/A2/B2 are 6/10/3/2, including 1/0/0/1 during standing; none were removed. The engine trace measures internal frame time, not displayed PresentMon pacing. Counters include prewarm VMA buffer creations, not necessarily driver vkAllocateMemory; independently relaxed cumulative reports every 600 presents approximate boundaries. Major faults are sampled thread counters, not proof of disk paging, and short-lived threads can undercount. No timing run overlapped a build or backup upload; queue noise checks pass.

Earlier exploratory six-run main/FIFO/revised testing on main86 showed revised median loading 3.802 versus main3.454 seconds, alongside lower long-frame counts; those runs used a different dwell and were not equally primed. They are not pooled here or hidden as a universal loading-speed win. The latest matched, full-input-primed comparison tests the same revised GPU policy on the newer shared host and shows no repeatable median-load increase. Broader hardware/long-session coverage remains necessary.

Reduced spare-budget profile (not adopted)

The existing RX_VK_CAP_SPARE_MB=512 setting was tested on the same PR head against main with an explicit 768 MiB budget (equivalent to the normal ceiling on this card). This compares the proposed lower-memory combination against stock main; it does not isolate the budget setting from the admission-policy change, and is not pooled with the default-budget comparison above.

Main a8f6b4da versus PR e537e573, A/B/A/B, twelve visits per process (two circuits of six areas), 35 seconds requested dwell and at least thirty seconds standing. Lost Woods now uses the first-left Skull Kid mask clearing, verified visually and by position/camera bounds, reached by input from the entrance. Both sides use the same private entrance-arrival override and an identical host executable, with the same host/game source and Vulkan API. Renderer allocation counters are identical on both sides, initial shader caches match, and both are primed with the full route before measurement. All 48 timed visits pass. Primary results are second-circuit medians of two runs:

Before: main @ a8f6b4da23 (768 MiB) After: this PR @ e537e57391 (512 MiB)
Capture-buffer creations/min 1040.52 235.02
Logical spare bytes, median of per-run medians, MiB 698.5 486
Peak game RAM, MiB 7411 7457
Peak DRM VRAM / GTT, MiB (separate ledgers) 11164 / 3335 11473 / 3585
Standing FPS / p99 ms 122.04 / 11.16 121.43 / 10.83
Skull Kid clearing standing FPS / p99 ms 123.35 / 10.10 122.80 / 10.26
Loading frames >=50 / >=100 / >=250 ms 37.5 / 15.5 / 2 46.5 / 22.5 / 4
Median / p99 load time, s 3.586 / 4.227 3.461 / 4.596
Capture-worker major faults 859462 1080110

Per-run peak RAM: main7480/7342 MiB, reduced-budget PR7497/7417 MiB; loading >=100 ms main13/18 versus PR22/23, >=250 ms main2/2 versus PR4/4. The reduced logical pool does not translate into a demonstrated overall-RAM saving. Standing FPS overlaps; typical load times are mixed, while long loading frames increase in both reduced-budget runs. The Skull Kid approach itself has no >=50 ms frame on either side in the second circuit. All four standing views were inspected; they do not reproduce the reported intermittent on-screen artifacting, which remains unresolved.

Queue noise checks accept these runs with no competing builds or backup uploads and no memory/I/O pressure stall. Some system swapping is present (0.2/1.0/0.1/0.0 MiB/s in A1/B1/A2/B2), while measured game swap is zero; residual cold-frame counts are 7/11/6/0, none during standing. These limits and the run spread preclude a precise causal RAM claim. The lower-budget combination is not selected or recommended as a cost-free optimization. The earlier default-profile 169 MiB peak delta is a measured difference, not a higher pool ceiling or proof that the entire difference comes from spares.

Risks

The reduced-budget combination above does not demonstrate a RAM-neutral improvement and leaves the normal automatic budget unchanged. Changing retained sizes can shift a later allocation cost: rare large mappings and pressure behavior need other hardware coverage. Latest testing shows approximately 169 MiB higher peak game RAM and mixed rare >=250 ms loading-frame counts. The original long single-process episode remains unverified. Slot/byte limits, reservations, API, settings, saves, cache formats and release switches are unchanged; no new switch or allocation is introduced in admission. Reverting restores the old policy. No game data, binaries, caches, saves, options, raw profiles or local paths are attached; only source and aggregate text.

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). Full-suite baseline failure and rebase checks disclosed above.
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here; test precedes fix.
  • A check under tests/ that reads changed source is updated, not weakened.
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Final renderer builds/links/exports pass; no path-handling change.
  • Docs updated.
  • AI assistance recorded with Assisted-by/Co-Authored-By trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested.
  • 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 A full capture-spare pool can keep rejecting a newly needed buffer size even after that buffer finishes real work. Twelve small spares cannot serve a larger request, but the completed large capture cannot enter the pool; the next request allocates again. Byte exhaustion can produce the same starvation below twelve slots. Admit completed real captures by displacing the most represented size class first, counting the incoming capture too. Break ties by oldest return. This retains rare large/prewarmed loading spares when small captures return repeatedly. Keep the existing twelve slots, byte ceilings, worker reservations and asynchronous/synchronous release paths. Speculative workers cannot displace spares, and destruction happens after unlocking through a fixed-size eviction array. Read `cap_buf_free` in `gpu/vk/vk_memory.cpp`, then `tests/test_capture_spare_admission.py`. See #2220. The branch has the regression-test commit before the fix commit. This addresses demonstrated admission/reuse churn; the original approximately 47-minute Lost Woods/Dodongo fault storm is not established as fixed. Prior work: open #1599 also retains size classes, specializing in a missing large class at slot exhaustion and adding refill/selection changes. This change independently implements general admission at entry or byte exhaustion and avoids that PR's other behavior changes. Merged #2366 fixes a separate culling-table wait and is included on both sides. Head `e537e5739136f842fa947fdf14cf31683b5398ef`, based on main `a8f6b4da230ba04ca3ed367b7767c75f0493efde`. Measurements below ran main `388c9d4b` against candidate `092e81a2`; the final rebase adds only upstream's builder ROM-export command/docs. Game, host and renderer source are byte-identical across that rebase, and both measured sides used the same host executable. Final-head validation is listed separately. ## Testing **Tested:** Linux 7.2.11-arch1-1, Ryzen 5 7600X, 32 GB RAM, RX 6800 XT 16 GB, RADV/Mesa 26.2.5-arch1.1. - Exact-main/head production-function oracle with GCC and Clang: sixteen allocations for sixteen requests on main, one here. The new repeated-small-return test retains two loading spares and needs zero creations for the next simultaneous large requests; FIFO fails it. Covers entry/byte exhaustion, mixed in-flight sizes, worker reservations, speculative prewarm, pressure limits, exactly-once destruction outside the mutex and inherited minimum-size overrides. Class-selection mutations also fail assertions. - The full strict suite before the two subsequent upstream-only rebases had 851 passes, nine explicit platform/GPU skips and one unchanged-main failure: `tests/test_lifter.py`, three Clippy `needless_borrow` findings in `builder/crates/build-driver/src/play.rs`. The candidate's GPU source is unchanged since that run. Rebased main388/head092: 124 affected checks pass, none fail or skip. Final rebase strict affected checks: 130 pass, none fail or skip. - Linux renderer build/link/runtime assembly and Windows llvm-mingw renderer build/link/export checks pass on the measured revision. Final-head Linux runtime assembly on main a8f6b4da and Windows renderer rebuild/link/export checks also pass. Pre-commit checks pass, including Ruff and secret detection. Required independent cold ownership/locking review found no blocking issue; its additional rare-loading-spare case was added and passes. - Both diagnostic runtimes were primed with a full-input nine-visit circuit from identical cache contents. Queued A/B/A/B then completed all 72 visits in four isolated processes, copied saves/settings, nine visits per circuit and two circuits per process. All arrivals, effective settings and queue noise checks pass. No crashes or sustained severe standing slowdown. Residual cold frames are retained, not filtered out. - Clean final installed runtime passes Lost Woods and Dodongo with normal asynchronous release and with `RX_VK_CAP_FREE_ASYNC=0`; four screenshots inspected, rendering correct, all 31 player save/settings files unchanged from before installation. Windows execution and L3 hardware remain unavailable locally. **Still to test:** - Linux RX 6800 XT, by hand: a single uninterrupted session beyond the original approximately 47-minute onset through Lost Woods/Dodongo; check sustained standing slowdown and mapped-buffer faults. The shorter comparison processes do not establish that mitigation. - Windows AMD/NVIDIA and Steam Deck, Test Farm with maintainer approval: current main versus this PR through repeated Kokiri/Field/Lost Woods/Kakariko/Death Mountain/Dodongo transitions, same settings and copied saves, normal/tight memory budgets and asynchronous release on/off. Expect correct rendering, bounded retention and no consistent loading/frame-pacing regression. Runtime coverage is not claimed by the Windows cross-build. ## Measurements **Verdict:** about 86% fewer successful capture-buffer creations and 64% less logical capture-buffer capacity created per minute on this PC. Typical load time is unchanged; the previous FIFO candidate's repeatable loading regression is not present in this comparison. Rare >=250 ms loading frames remain mixed, and this is not proof that every hitch or the original long-session episode is fixed. ### Default spare-budget profile Setup: hardware above; 3440x1440 game picture, 75% render, uncapped (`HOS_FPS_MAX=1000`), VSync/frame generation off, muted, copied settings/private test saves. Identical private counters on both sides, removed from the player build. A1/B1/A2/B2, two nine-visit circuits each; fixed camera/step inputs followed by at least thirty seconds standing per visit (35 seconds requested dwell). Primary results are the second circuit of each process; first circuits and all cold flags remain in the local data. Medians of two runs: | | Before: main @ 388c9d4bddbb | After: this PR @ 092e81a2c0dc | |---|---:|---:| | Capture-buffer creations/min | 1047.50 | 141.92 | | Creations/10,000 capture requests | 328.78 | 43.81 | | Logical capture-buffer MiB created/min | 5222.59 | 1858.23 | | Standing FPS | 119.52 | 122.36 | | Standing p99 frame time, ms | 11.62 | 10.86 | | Standing frames >=50 ms | 2.5 | 1 | | Loading frames >=50 / >=100 / >=250 ms | 55 / 20 / 1 | 51 / 16.5 / 2 | | Median load time, s | 3.560 | 3.557 | | p99 load time, s | 4.717 | 4.229 | | Peak game RAM, MiB | 7321 | 7490 | | Peak DRM VRAM, MiB | 12117.88 | 11729.54 | | Peak DRM GTT, MiB (separate from RAM) | 3760.70 | 3722.70 | | Capture-worker major faults | 1,151,390 | 876,586 | Repeat spread, main versus revised: creations/min 1039.88/1055.13 versus 143.80/140.04; median loads 3.483/3.638 versus 3.639/3.474 seconds; loading >=100 ms frames 23/17 versus 13/20; >=250 ms frames 2/0 versus 3/1. Standing FPS 119.57/119.47 versus 122.12/122.59, a modest local difference, not a general FPS promise. Per-area standing rates are mixed in Field and improve more in several other areas. Peak game RAM increases about 169 MiB (+2.3%); VRAM drops about 388 MiB. Minimum available system RAM stays above 13.8 GiB and game swap is zero. Residual second-circuit cold-frame counts A1/B1/A2/B2 are 6/10/3/2, including 1/0/0/1 during standing; none were removed. The engine trace measures internal frame time, not displayed PresentMon pacing. Counters include prewarm VMA buffer creations, not necessarily driver `vkAllocateMemory`; independently relaxed cumulative reports every 600 presents approximate boundaries. Major faults are sampled thread counters, not proof of disk paging, and short-lived threads can undercount. No timing run overlapped a build or backup upload; queue noise checks pass. Earlier exploratory six-run main/FIFO/revised testing on main86 showed revised median loading 3.802 versus main3.454 seconds, alongside lower long-frame counts; those runs used a different dwell and were not equally primed. They are not pooled here or hidden as a universal loading-speed win. The latest matched, full-input-primed comparison tests the same revised GPU policy on the newer shared host and shows no repeatable median-load increase. Broader hardware/long-session coverage remains necessary. ### Reduced spare-budget profile (not adopted) The existing `RX_VK_CAP_SPARE_MB=512` setting was tested on the same PR head against main with an explicit 768 MiB budget (equivalent to the normal ceiling on this card). This compares the proposed lower-memory **combination** against stock main; it does not isolate the budget setting from the admission-policy change, and is not pooled with the default-budget comparison above. Main `a8f6b4da` versus PR `e537e573`, A/B/A/B, twelve visits per process (two circuits of six areas), 35 seconds requested dwell and at least thirty seconds standing. Lost Woods now uses the first-left Skull Kid mask clearing, verified visually and by position/camera bounds, reached by input from the entrance. Both sides use the same private entrance-arrival override and an identical host executable, with the same host/game source and Vulkan API. Renderer allocation counters are identical on both sides, initial shader caches match, and both are primed with the full route before measurement. All 48 timed visits pass. Primary results are second-circuit medians of two runs: | | Before: main @ a8f6b4da230b (768 MiB) | After: this PR @ e537e5739136 (512 MiB) | |---|---:|---:| | Capture-buffer creations/min | 1040.52 | 235.02 | | Logical spare bytes, median of per-run medians, MiB | 698.5 | 486 | | Peak game RAM, MiB | 7411 | 7457 | | Peak DRM VRAM / GTT, MiB (separate ledgers) | 11164 / 3335 | 11473 / 3585 | | Standing FPS / p99 ms | 122.04 / 11.16 | 121.43 / 10.83 | | Skull Kid clearing standing FPS / p99 ms | 123.35 / 10.10 | 122.80 / 10.26 | | Loading frames >=50 / >=100 / >=250 ms | 37.5 / 15.5 / 2 | 46.5 / 22.5 / 4 | | Median / p99 load time, s | 3.586 / 4.227 | 3.461 / 4.596 | | Capture-worker major faults | 859462 | 1080110 | Per-run peak RAM: main7480/7342 MiB, reduced-budget PR7497/7417 MiB; loading >=100 ms main13/18 versus PR22/23, >=250 ms main2/2 versus PR4/4. The reduced logical pool does not translate into a demonstrated overall-RAM saving. Standing FPS overlaps; typical load times are mixed, while long loading frames increase in both reduced-budget runs. The Skull Kid approach itself has no >=50 ms frame on either side in the second circuit. All four standing views were inspected; they do not reproduce the reported intermittent on-screen artifacting, which remains unresolved. Queue noise checks accept these runs with no competing builds or backup uploads and no memory/I/O pressure stall. Some system swapping is present (0.2/1.0/0.1/0.0 MiB/s in A1/B1/A2/B2), while measured game swap is zero; residual cold-frame counts are 7/11/6/0, none during standing. These limits and the run spread preclude a precise causal RAM claim. The lower-budget combination is not selected or recommended as a cost-free optimization. The earlier default-profile 169 MiB peak delta is a measured difference, not a higher pool ceiling or proof that the entire difference comes from spares. ## Risks The reduced-budget combination above does not demonstrate a RAM-neutral improvement and leaves the normal automatic budget unchanged. Changing retained sizes can shift a later allocation cost: rare large mappings and pressure behavior need other hardware coverage. Latest testing shows approximately 169 MiB higher peak game RAM and mixed rare >=250 ms loading-frame counts. The original long single-process episode remains unverified. Slot/byte limits, reservations, API, settings, saves, cache formats and release switches are unchanged; no new switch or allocation is introduced in admission. Reverting restores the old policy. No game data, binaries, caches, saves, options, raw profiles or local paths are attached; only source and aggregate text. ## 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). Full-suite baseline failure and rebase checks disclosed above. - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here; test precedes fix. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. Final renderer builds/links/exports pass; no path-handling change. - [x] Docs updated. - [x] AI assistance recorded with Assisted-by/Co-Authored-By trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested. - [ ] 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.
Exercise production get/free paths with full slot and byte budgets.
The first reuse assertion fails on main because newly needed buffers
are discarded while unsuitable spares remain cached.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
fix(vk): make room for returned capture buffer classes
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 26s
beanstalk/approval can't be tested as asked: see the farm's comment
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
5499ba8adb
A full spare pool could reject every return of a newly needed size,
allocating it again on every submission. Make room by displacing the
oldest returned buffers, within the existing byte and slot budgets.
Protect workers reservations and leave speculative completions unable
to displace returned spares. Release displaced buffers outside the
pool mutex through the existing asynchronous destruction path.

Assisted-by: OpenAI Codex
Co-Authored-By: OpenAI Codex <[email protected]>
Author
Contributor

Tested in game: RX 6800 XT 16 GB, RADV Mesa 26.2.5-arch1.1, Linux 7.2.11-arch1-1: queued isolated Hyrule Field A/B/A/B, 3440x1440 output / 75% render, frame generation and V-Sync off, uncapped, 30 measured seconds per run after warm-up; main a2dc5385 median 116.0 FPS versus head 5499ba8a 116.2 FPS, within spread, no frames >=50 ms on either side. Candidate rendered normally. The reported long-session Lost Woods/Dodongo slowdown was not reproduced and is not claimed fixed. Source regression and real-RADV-buffer experiments independently demonstrate admission churn and reduced mapping faults.

Tested in game: RX 6800 XT 16 GB, RADV Mesa 26.2.5-arch1.1, Linux 7.2.11-arch1-1: queued isolated Hyrule Field A/B/A/B, 3440x1440 output / 75% render, frame generation and V-Sync off, uncapped, 30 measured seconds per run after warm-up; main a2dc5385 median 116.0 FPS versus head 5499ba8a 116.2 FPS, within spread, no frames >=50 ms on either side. Candidate rendered normally. The reported long-session Lost Woods/Dodongo slowdown was not reproduced and is not claimed fixed. Source regression and real-RADV-buffer experiments independently demonstrate admission churn and reduced mapping faults.
Author
Contributor

@Beanstalk please validate the Windows renderer build and run this PR on Windows AMD, Windows NVIDIA, and Steam Deck, with a maintainer's approval.

Use main a2dc5385901812d183c4b7f0f9d48b295f17a510 (the tested base) against PR head 5499ba8adbeb4cf8a5ec5284b72facbc49f76c1f, identical scene/settings/save copies, two interleaved area-change tours per side through Kokiri Forest, Hyrule Field, Market and Kakariko. Record crashes, rendering errors, peak RAM/VRAM, frame pacing/frames >=50 ms and the renderer's capture-spare/budget lines. Expect the existing entry/byte limits and worker reservations to hold, and no new rendering/load regression. Include a short smoke with RX_VK_CAP_FREE_ASYNC=0 to exercise synchronous release outside the pool lock, alongside the normal default.

The PR stays WIP: a rebase and measurements against latest main are separate outstanding author work. Do not attribute a comparison against a different/unmatched base to this admission change. The short Linux game A/B showed no FPS difference beyond spread; the real-RADV allocation/mapping reproducer is the demonstrated gain. These requests do not assert that the reported long-session episodes are fixed.

@Beanstalk please validate the Windows renderer build and run this PR on Windows AMD, Windows NVIDIA, and Steam Deck, with a maintainer's approval. Use main `a2dc5385901812d183c4b7f0f9d48b295f17a510` (the tested base) against PR head `5499ba8adbeb4cf8a5ec5284b72facbc49f76c1f`, identical scene/settings/save copies, two interleaved area-change tours per side through Kokiri Forest, Hyrule Field, Market and Kakariko. Record crashes, rendering errors, peak RAM/VRAM, frame pacing/frames >=50 ms and the renderer's capture-spare/budget lines. Expect the existing entry/byte limits and worker reservations to hold, and no new rendering/load regression. Include a short smoke with RX_VK_CAP_FREE_ASYNC=0 to exercise synchronous release outside the pool lock, alongside the normal default. The PR stays WIP: a rebase and measurements against latest main are separate outstanding author work. Do not attribute a comparison against a different/unmatched base to this admission change. The short Linux game A/B showed no FPS difference beyond spread; the real-RADV allocation/mapping reproducer is the demonstrated gain. These requests do not assert that the reported long-session episodes are fixed.
Member

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

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

Beanstalk test farm

Commit e537e57 · 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 `e537e57` · approved by nobody yet · [dashboard](https://beanstalk.magicbean.dev/prs/2281) A member of `BigBeans` can review this commit and comment `@Beanstalk` to test it.
Author
Contributor

Rebased onto current main 753fb5af; new head a8369e79. The authored four-file diff and admission functions are unchanged. Focused GCC/Clang checks, full Linux renderer rebuild/export checks and pre-commit checks pass; the current strict suite has 936 passes and four failures reproduced on unchanged current main, all named in the description. Historical game/native measurements remain labeled with the revisions actually tested. The rejected farm request will be replaced with the supported farm-selected main-versus-PR build/area-tour plan, without commit constraints or custom allocator/log assertions. The PR remains WIP for fresh game/memory/long-session and Windows coverage.

Rebased onto current main 753fb5af; new head a8369e79. The authored four-file diff and admission functions are unchanged. Focused GCC/Clang checks, full Linux renderer rebuild/export checks and pre-commit checks pass; the current strict suite has 936 passes and four failures reproduced on unchanged current main, all named in the description. Historical game/native measurements remain labeled with the revisions actually tested. The rejected farm request will be replaced with the supported farm-selected main-versus-PR build/area-tour plan, without commit constraints or custom allocator/log assertions. The PR remains WIP for fresh game/memory/long-session and Windows coverage.
Author
Contributor

@Beanstalk please replace the earlier request with this supported main-versus-PR compatibility plan.

Compare the farm's current main and this PR on Windows AMD, Windows NVIDIA and Steam Deck. Use the revisions selected by the farm and record their commit IDs in the results. Build both sides, then run two interleaved area-change tours per side through Kokiri Forest, Hyrule Field, Market and Kakariko Village, with identical settings and save copies per device.

Compare still-scene pictures using the farm's normal image tolerance, crashes, median/p99 frame times, and load times. Flag a frame-time or load-time regression above 10%. Record peak RAM and VRAM for comparison. Add a short startup/area-change smoke with RX_VK_CAP_FREE_ASYNC=0 to check the synchronous-release configuration.

These are build, rendering and area-tour checks. The production-function regression, allocator/fault experiment and reservation/retention invariants are separate local/unit validations; the original long-session slowdown remains a separate validation gap. This request does not select historical commits, parse custom capture-budget log lines, require a particular cache-eviction event, or claim to prove the original hitches fixed.

A BigBeans maintainer may need to approve this replacement request for the rebased head with 👍. Please generate a fresh plan rather than override the earlier rejected plan.

@Beanstalk please replace the earlier request with this supported main-versus-PR compatibility plan. Compare the farm's current main and this PR on Windows AMD, Windows NVIDIA and Steam Deck. Use the revisions selected by the farm and record their commit IDs in the results. Build both sides, then run two interleaved area-change tours per side through Kokiri Forest, Hyrule Field, Market and Kakariko Village, with identical settings and save copies per device. Compare still-scene pictures using the farm's normal image tolerance, crashes, median/p99 frame times, and load times. Flag a frame-time or load-time regression above 10%. Record peak RAM and VRAM for comparison. Add a short startup/area-change smoke with RX_VK_CAP_FREE_ASYNC=0 to check the synchronous-release configuration. These are build, rendering and area-tour checks. The production-function regression, allocator/fault experiment and reservation/retention invariants are separate local/unit validations; the original long-session slowdown remains a separate validation gap. This request does not select historical commits, parse custom capture-budget log lines, require a particular cache-eviction event, or claim to prove the original hitches fixed. A BigBeans maintainer may need to approve this replacement request for the rebased head with 👍. Please generate a fresh plan rather than override the earlier rejected plan.
Member

@tevan only members of BigBeans can start the farm.

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

@tevan only members of `BigBeans` can start the farm. ~~One of them can approve this request by reacting 👍 to it or to this comment.~~ This request was for `a8369e7`, and the PR has changed since (`6caf914`), so a 👍 no longer approves it. Comment `@Beanstalk` again to ask for the new commit.
tevan force-pushed fix/capture-spare-admission from 5499ba8adb
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 26s
beanstalk/approval can't be tested as asked: see the farm's comment
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to a8369e79a6
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval waiting for a BigBean's 👍 on the request
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-22 19:21:24 +00:00
Compare
tevan force-pushed fix/capture-spare-admission from a8369e79a6
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
beanstalk/approval waiting for a BigBean's 👍 on the request
PR description / Description follows the template (pull_request_target) Successful in 6s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to 6caf914c51
Some checks failed
beanstalk/approval changed since the request: ask again
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-23 03:42:07 +00:00
Compare
Author
Contributor

Rebased again onto current main 0e32bc10, head 6caf914c, preserving the unchanged authored admission fix. Full Linux renderer and full Windows renderer cross-build/link/export checks pass; 82 changed-source checks pass; full strict suite has 936 passes and the same four failures reproduced on unchanged current main. The author owns marking this PR ready under the project guide; it will not remain WIP merely for Test Farm/other-hardware runtime coverage. The approved fresh on-PC A/B/A/B is in progress now, after which I will assess ready status. The supported main-versus-PR farm request remains unchanged; historical measurements stay under their original commit labels.

Rebased again onto current main 0e32bc10, head 6caf914c, preserving the unchanged authored admission fix. Full Linux renderer and full Windows renderer cross-build/link/export checks pass; 82 changed-source checks pass; full strict suite has 936 passes and the same four failures reproduced on unchanged current main. The author owns marking this PR ready under the project guide; it will not remain WIP merely for Test Farm/other-hardware runtime coverage. The approved fresh on-PC A/B/A/B is in progress now, after which I will assess ready status. The supported main-versus-PR farm request remains unchanged; historical measurements stay under their original commit labels.
Author
Contributor

Fresh approved current-head Hyrule Field A/B/A/B is complete: main 0e32bc10 versus PR 6caf914c, identical copied settings/private saves, 30 measured seconds per run after warmup. Median 116.6 versus 115.7 FPS (-0.8%, within observed spread), median frame time 8.57 ms both, p99 10.00 versus 10.34 ms, no measured frames of at least 50 ms. No FPS gain or long-session mitigation is claimed. Current production-function regression remains 16 versus 1 allocations under GCC and Clang. Full strict suite: 936 passed, four named failures reproduced on unchanged main, 18 explicit skips; all 82 changed-source checks, Linux and Windows renderer builds/exports and pre-commit pass. Description/checklists updated; remaining farm, mixed-area and long-session coverage stays explicit for review. Marking ready under the author-owned workflow; no merge requested.

Fresh approved current-head Hyrule Field A/B/A/B is complete: main 0e32bc10 versus PR 6caf914c, identical copied settings/private saves, 30 measured seconds per run after warmup. Median 116.6 versus 115.7 FPS (-0.8%, within observed spread), median frame time 8.57 ms both, p99 10.00 versus 10.34 ms, no measured frames of at least 50 ms. No FPS gain or long-session mitigation is claimed. Current production-function regression remains 16 versus 1 allocations under GCC and Clang. Full strict suite: 936 passed, four named failures reproduced on unchanged main, 18 explicit skips; all 82 changed-source checks, Linux and Windows renderer builds/exports and pre-commit pass. Description/checklists updated; remaining farm, mixed-area and long-session coverage stays explicit for review. Marking ready under the author-owned workflow; no merge requested.
tevan changed title from WIP: fix(vk): admit newly needed capture buffer sizes into a full spare pool to fix(vk): admit newly needed capture buffer sizes into a full spare pool 2026-11-23 03:50:14 +00:00
Member
@review
BeanBot left a comment

Recommendation: Approve. The test demonstrates that returned buffers can now enter a full spare pool, but the replacement policy’s effects during area changes and on other supported systems remain unmeasured. CI is also still running. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.

Returned capture buffers can displace older spares, avoiding repeated allocations when the needed size mix changes. This may release a prewarmed buffer that a later area needs, trading the fixed allocation churn for a possible later allocation and memory cost.

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

  • L1 tests/test_capture_spare_admission.py:168: The fixture inherits RX_VK_CAP_MIN_MB from the caller, so its allocation-class assertions depend on the developer’s environment. (more on the line) Do: Run the fixture with RX_VK_CAP_MIN_MB removed from its environment, or explicitly set a controlled value.

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

  • L2 gpu/vk/vk_memory.cpp:1426: Measure replacement during mixed-area and long-session play, including its allocation and memory costs. (more on the line) Do: Compare current main and this head over repeated mixed-area and reported long-session workloads, recording allocation rates, load and frame times, and peak RAM and VRAM.
  • L3 gpu/vk/vk_memory.cpp:1426: Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons. (more on the line) Do: Run the requested main-versus-PR area tours and synchronous-release smoke, comparing rendering, load and frame times and peak memory.

@fix can do L1.

Checks: Still running: 10 checks.

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

Does it help: Yes for the demonstrated admission bug: the production-function fixture reports 16 allocations on main and 1 on this branch for 16 requests. The current-head game comparison shows no FPS gain outside run-to-run spread; mitigation of the reported long-session slowdown remains unproven.

Other systems: The pool is shared by capture paths on Windows and Linux across GPU vendors. Replacement can change later allocation, release and memory behavior; current game evidence covers a short Linux RADV scene, while mixed-area, Windows and Steam Deck runs remain outstanding.

Switches: None added, changed or removed. Existing RX_VK_CAP_FREE_ASYNC defaults on; displaced buffers use its existing asynchronous or synchronous release path.

Reviewed: 6caf914c51 against 0e32bc100d: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, both changed tests, the complete diff and commit messages. Read the changed function and surrounding capture allocation, reservation and release code in vk_memory.cpp; the rest of that large code file and architecture.md were skimmed. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent.; nothing run (a code review).

Checked and fine:

  • The eviction array is bounded by the twelve-entry spare-pool limit, and displaced buffers are released after unlocking.
  • Worker byte and slot reservations are retained and speculative worker completions do not evict spares.
  • Both commits record AI assistance; no generated files, game-derived files or API changes appear in the diff.
  • The regression fixture exercises production get/free functions and is reported to fail on main for the allocation count.

Testing: No commands that build or run project code were executed. Author-reported Linux and Windows builds and test results were considered; the listed CI checks are still running.

Overlaps and merge order: The description identifies open #2244 as changing copy scheduling rather than spare admission; no dependency is claimed. Other open pull requests were not available for inspection.


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

**Recommendation: Approve.** The test demonstrates that returned buffers can now enter a full spare pool, but the replacement policy’s effects during area changes and on other supported systems remain unmeasured. CI is also still running. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge. Returned capture buffers can displace older spares, avoiding repeated allocations when the needed size mix changes. This may release a prewarmed buffer that a later area needs, trading the fixed allocation churn for a possible later allocation and memory cost. **Should fix (1)**: not blocking, but worth doing before merging. - **L1** `tests/test_capture_spare_admission.py:168`: The fixture inherits RX_VK_CAP_MIN_MB from the caller, so its allocation-class assertions depend on the developer’s environment. (more on the line) **Do:** Run the fixture with RX_VK_CAP_MIN_MB removed from its environment, or explicitly set a controlled value. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_memory.cpp:1426`: Measure replacement during mixed-area and long-session play, including its allocation and memory costs. (more on the line) **Do:** Compare current main and this head over repeated mixed-area and reported long-session workloads, recording allocation rates, load and frame times, and peak RAM and VRAM. - **L3** `gpu/vk/vk_memory.cpp:1426`: Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons. (more on the line) **Do:** Run the requested main-versus-PR area tours and synchronous-release smoke, comparing rendering, load and frame times and peak memory. `@fix` can do L1. **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the demonstrated admission bug: the production-function fixture reports 16 allocations on main and 1 on this branch for 16 requests. The current-head game comparison shows no FPS gain outside run-to-run spread; mitigation of the reported long-session slowdown remains unproven. **Other systems:** The pool is shared by capture paths on Windows and Linux across GPU vendors. Replacement can change later allocation, release and memory behavior; current game evidence covers a short Linux RADV scene, while mixed-area, Windows and Steam Deck runs remain outstanding. **Switches:** None added, changed or removed. Existing RX_VK_CAP_FREE_ASYNC defaults on; displaced buffers use its existing asynchronous or synchronous release path. **Reviewed:** 6caf914c5146 against 0e32bc100dbe: Read AGENTS.md, CONTRIBUTING.md, the pull request template, standards, both changed tests, the complete diff and commit messages. Read the changed function and surrounding capture allocation, reservation and release code in vk_memory.cpp; the rest of that large code file and architecture.md were skimmed. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent.; nothing run (a code review). **Checked and fine:** - The eviction array is bounded by the twelve-entry spare-pool limit, and displaced buffers are released after unlocking. - Worker byte and slot reservations are retained and speculative worker completions do not evict spares. - Both commits record AI assistance; no generated files, game-derived files or API changes appear in the diff. - The regression fixture exercises production get/free functions and is reported to fail on main for the allocation count. **Testing:** No commands that build or run project code were executed. Author-reported Linux and Windows builds and test results were considered; the listed CI checks are still running. **Overlaps and merge order:** The description identifies open #2244 as changing copy scheduling rather than spare admission; no dependency is claimed. Other open pull requests were not available for inspection. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.</sub>
@ -1416,0 +1423,4 @@
// speculative prewarming never displaces a buffer a real submission returned.
if (!from_worker && size <= (256ull << 20) && workers < 12 &&
pending <= limit && size <= limit - pending) {
while (!cap_free.empty() && (cap_free.size() + workers >= 12 ||
Member

L2 (should fix): Measure replacement during mixed-area and long-session play, including its allocation and memory costs.

When: A returned small capture can evict an older large prewarmed spare; a later load that needs that class must allocate it again. The short Hyrule Field comparison does not exercise the reported area transitions or measure peak memory.

Do: Compare current main and this head over repeated mixed-area and reported long-session workloads, recording allocation rates, load and frame times, and peak RAM and VRAM.

**L2** (should fix): Measure replacement during mixed-area and long-session play, including its allocation and memory costs. *When:* A returned small capture can evict an older large prewarmed spare; a later load that needs that class must allocate it again. The short Hyrule Field comparison does not exercise the reported area transitions or measure peak memory. **Do:** Compare current main and this head over repeated mixed-area and reported long-session workloads, recording allocation rates, load and frame times, and peak RAM and VRAM.
Member

L3 (should fix): Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons.

When: The same replacement and release path runs on these systems, where allocation and destruction costs can differ from the tested Linux RADV device; no runtime results are yet recorded for them.

Do: Run the requested main-versus-PR area tours and synchronous-release smoke, comparing rendering, load and frame times and peak memory.

**L3** (should fix): Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons. *When:* The same replacement and release path runs on these systems, where allocation and destruction costs can differ from the tested Linux RADV device; no runtime results are yet recorded for them. **Do:** Run the requested main-versus-PR area tours and synchronous-release smoke, comparing rendering, load and frame times and peak memory.
@ -0,0 +165,4 @@
"""
with tempfile.TemporaryDirectory() as folder:
path = Path(folder)
(path / "test.cpp").write_text(fixture)
Member

L1 (should fix): The fixture inherits RX_VK_CAP_MIN_MB from the caller, so its allocation-class assertions depend on the developer’s environment.

When: With RX_VK_CAP_MIN_MB=256, cap_buf_size chooses a 256 MiB minimum; the cold-large-buffer scenario can reuse its existing 256 MiB spare and fails the assertion that one new allocation occurred.

Do: Run the fixture with RX_VK_CAP_MIN_MB removed from its environment, or explicitly set a controlled value.

**L1** (should fix): The fixture inherits RX_VK_CAP_MIN_MB from the caller, so its allocation-class assertions depend on the developer’s environment. *When:* With RX_VK_CAP_MIN_MB=256, cap_buf_size chooses a 256 MiB minimum; the cold-large-buffer scenario can reuse its existing 256 MiB spare and fails the assertion that one new allocation occurred. **Do:** Run the fixture with RX_VK_CAP_MIN_MB removed from its environment, or explicitly set a controlled value.
Author
Contributor

L1 addressed in head ac517778 (test-first commit de6cc4c0): remove inherited RX_VK_CAP_MIN_MB only from the fixture executable environment, preserving other environment settings. Reproduced the original assertion failure at caller value 256; updated fixture passes GCC and Clang at caller values 2, 16 and 256, and still fails on main for 16 allocations rather than 1 with both compilers. All 82 strict changed-source checks and pre-commit pass. The test-only change is folded into the test commit to preserve test-then-fix history. Renderer/docs are byte-identical to reviewed and game-tested 6caf914c, so prior build/game results retain their actual revision labels and no extra game run was needed. L2 remains open: longer mixed-area/Lost Woods/Dodongo comparisons with allocation, load/frame and peak-memory measurements have not run; the short static scene cannot establish those results. L3 remains open for Windows AMD/NVIDIA and Steam Deck runtime coverage; refreshing the stale supported farm request for this head next. CI still requires repository approval. No merge-readiness boxes are ticked.

L1 addressed in head ac517778 (test-first commit de6cc4c0): remove inherited RX_VK_CAP_MIN_MB only from the fixture executable environment, preserving other environment settings. Reproduced the original assertion failure at caller value 256; updated fixture passes GCC and Clang at caller values 2, 16 and 256, and still fails on main for 16 allocations rather than 1 with both compilers. All 82 strict changed-source checks and pre-commit pass. The test-only change is folded into the test commit to preserve test-then-fix history. Renderer/docs are byte-identical to reviewed and game-tested 6caf914c, so prior build/game results retain their actual revision labels and no extra game run was needed. L2 remains open: longer mixed-area/Lost Woods/Dodongo comparisons with allocation, load/frame and peak-memory measurements have not run; the short static scene cannot establish those results. L3 remains open for Windows AMD/NVIDIA and Steam Deck runtime coverage; refreshing the stale supported farm request for this head next. CI still requires repository approval. No merge-readiness boxes are ticked.
tevan force-pushed fix/capture-spare-admission from 6caf914c51
Some checks failed
beanstalk/approval changed since the request: ask again
PR description / Description follows the template (pull_request_target) Successful in 3s
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
to ac5177783a
Some checks failed
PR description / Description follows the template (pull_request_target) Has been cancelled
beanstalk/approval waiting for a BigBean's 👍 on the request
Website / Website on Cloudflare (pull_request_target) Has been skipped
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been cancelled
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been cancelled
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been cancelled
CI / Workflow lint (actionlint) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
Guide screenshots / Guide images and local UI source review (pull_request) Has been cancelled
Third-party parts / As their notes say (pull_request) Has been cancelled
Third-party parts / The same as upstream (pull_request) Has been cancelled
Website / Website on Cloudflare (pull_request) Has been cancelled
2026-11-23 04:45:58 +00:00
Compare
Author
Contributor

@Beanstalk please renew the supported main-versus-PR compatibility request for current head ac517778. The prior approval request is stale after the test-only L1 correction; renderer code is unchanged from 6caf914c. This covers review L3; L2 long-session testing remains separate.

Compare the farm's current main and this PR on Windows AMD, Windows NVIDIA and Steam Deck. Use the revisions selected by the farm and record their commit IDs in the results. Build both sides, then run two interleaved area-change tours per side through Kokiri Forest, Hyrule Field, Market and Kakariko Village, with identical settings and save copies per device.

Compare still-scene pictures using the farm's normal image tolerance, crashes, median/p99 frame times, and load times. Flag a frame-time or load-time regression above 10%. Record peak RAM and VRAM for comparison. Add a short startup/area-change smoke with RX_VK_CAP_FREE_ASYNC=0 to check the synchronous-release configuration.

These are build, rendering and area-tour checks. The production-function regression, allocator/fault experiment and reservation/retention invariants are separate local/unit validations; the original long-session slowdown remains a separate validation gap. This request does not select historical commits, parse custom capture-budget log lines, require a particular cache-eviction event, or claim to prove the original hitches fixed.

A BigBeans maintainer may need to approve this replacement request for this head with 👍. Please generate a fresh plan rather than override the earlier rejected plan.

@Beanstalk please renew the supported main-versus-PR compatibility request for current head ac517778. The prior approval request is stale after the test-only L1 correction; renderer code is unchanged from 6caf914c. This covers review L3; L2 long-session testing remains separate. Compare the farm's current main and this PR on Windows AMD, Windows NVIDIA and Steam Deck. Use the revisions selected by the farm and record their commit IDs in the results. Build both sides, then run two interleaved area-change tours per side through Kokiri Forest, Hyrule Field, Market and Kakariko Village, with identical settings and save copies per device. Compare still-scene pictures using the farm's normal image tolerance, crashes, median/p99 frame times, and load times. Flag a frame-time or load-time regression above 10%. Record peak RAM and VRAM for comparison. Add a short startup/area-change smoke with RX_VK_CAP_FREE_ASYNC=0 to check the synchronous-release configuration. These are build, rendering and area-tour checks. The production-function regression, allocator/fault experiment and reservation/retention invariants are separate local/unit validations; the original long-session slowdown remains a separate validation gap. This request does not select historical commits, parse custom capture-budget log lines, require a particular cache-eviction event, or claim to prove the original hitches fixed. A BigBeans maintainer may need to approve this replacement request for this head with 👍. Please generate a fresh plan rather than override the earlier rejected plan.
Member

@tevan only members of BigBeans can start the farm.

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

@tevan only members of `BigBeans` can start the farm. ~~One of them can approve this request by reacting 👍 to it or to this comment.~~ This request was for `ac51777`, and the PR has changed since (`ce98ab5`), so a 👍 no longer approves it. Comment `@Beanstalk` again to ask for the new commit.
Author
Contributor

L2: I can run the mixed-area/long-session comparison locally on Linux/RADV. L3: I do not have Windows AMD/NVIDIA or Steam Deck systems available for runtime testing, so those comparisons need the Test Farm or another tester; the farm request is posted and awaiting maintainer approval.

L2: I can run the mixed-area/long-session comparison locally on Linux/RADV. L3: I do not have Windows AMD/NVIDIA or Steam Deck systems available for runtime testing, so those comparisons need the Test Farm or another tester; the farm request is posted and awaiting maintainer approval.
Merge branch 'main' into fix/capture-spare-admission
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website builds (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
beanstalk/approval changed since the request: ask again
PR description / Description follows the template (pull_request_target) Successful in 7s
CI / Conventional Commit title (pull_request) Successful in 7s
CI / Workflow lint (actionlint) (pull_request) Successful in 13s
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m6s
Website / Website on Cloudflare (pull_request) Has been skipped
Website / Website preview, build (pull_request) Has been skipped
Website / Website preview, upload (pull_request) Has been skipped
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 13s
Third-party parts / As their notes say (pull_request) Successful in 15s
CI / Website build and checks (pull_request) Failing after 24s
Website / Website builds (pull_request) Failing after 29s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 2m6s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m58s
ce98ab5639
tevan force-pushed fix/capture-spare-admission from ce98ab5639
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website builds (pull_request_target) Has been skipped
Website / Website preview, build (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
beanstalk/approval changed since the request: ask again
PR description / Description follows the template (pull_request_target) Successful in 7s
CI / Conventional Commit title (pull_request) Successful in 7s
CI / Workflow lint (actionlint) (pull_request) Successful in 13s
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Rust (rustfmt, clippy, cargo test) (pull_request) Failing after 4m6s
Website / Website on Cloudflare (pull_request) Has been skipped
Website / Website preview, build (pull_request) Has been skipped
Website / Website preview, upload (pull_request) Has been skipped
Guide screenshots / Guide images and local UI source review (pull_request) Successful in 13s
Third-party parts / As their notes say (pull_request) Successful in 15s
CI / Website build and checks (pull_request) Failing after 24s
Website / Website builds (pull_request) Failing after 29s
CI / longshot-builder end to end (synthetic game) (pull_request) Successful in 2m6s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m58s
to f12edacfc8
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
beanstalk/approval changed since the request: ask again
PR description / Title and description (pull_request_target) Successful in 5s
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-11-27 04:48:15 +00:00
Compare
tevan changed title from fix(vk): admit newly needed capture buffer sizes into a full spare pool to WIP: fix(vk): admit newly needed capture buffer sizes into a full spare pool 2026-11-27 04:48:40 +00:00
Author
Contributor

Prepared L2: rebased the unchanged test/fix pair onto current main 9eabf8bc, head f12edacf. HumanBean had merged main into the fork at ce98ab56; verified its authored diff and this rebased diff have identical stable patch IDs, preserving the maintainer update while restoring test-then-fix history. All 85 affected strict checks and pre-commit pass; GCC/Clang still show 16 allocations on current main versus 1 with the fix. Rechecked prior work: main still has the admission bug; merged #2366 fixes a different culling-table wait and is included on both new sides. The local player is still on nightly-665. Current-main runtime builds and full/L2 validation are deferred until that active session finishes, especially given the intervening Rust builder/game-layout migration. Temporarily WIP while that local revalidation is pending; earlier game/build numbers remain labeled with their actual revisions. L3 remains external hardware coverage, and any farm approval must target the new head.

Prepared L2: rebased the unchanged test/fix pair onto current main 9eabf8bc, head f12edacf. HumanBean had merged main into the fork at ce98ab56; verified its authored diff and this rebased diff have identical stable patch IDs, preserving the maintainer update while restoring test-then-fix history. All 85 affected strict checks and pre-commit pass; GCC/Clang still show 16 allocations on current main versus 1 with the fix. Rechecked prior work: main still has the admission bug; merged #2366 fixes a different culling-table wait and is included on both new sides. The local player is still on nightly-665. Current-main runtime builds and full/L2 validation are deferred until that active session finishes, especially given the intervening Rust builder/game-layout migration. Temporarily WIP while that local revalidation is pending; earlier game/build numbers remain labeled with their actual revisions. L3 remains external hardware coverage, and any farm approval must target the new head.
tevan force-pushed fix/capture-spare-admission from f12edacfc8
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
beanstalk/approval changed since the request: ask again
PR description / Title and description (pull_request_target) Successful in 5s
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 ede5275c44
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
beanstalk/approval changed since the request: ask again
PR description / Title and description (pull_request_target) Successful in 5s
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-11-27 05:41:01 +00:00
Compare
Author
Contributor

Rebased the unchanged test/fix pair onto main86b3b9e4, headede5275c. Current Linux and Windows renderer builds/links/exports and pre-commit pass. Full strict checks plus corrected-dependency reruns give851passes,9explicit skips and one Rust-check failure: the same3 Clippy needless_borrow findings reproduce on unmodified main. Approved L2 main/fix A/B/A/B is now running with copied settings/saves, strict area-arrival checks and identical private allocation counters. The preflight validated all six unique destinations. Keeping WIP until the repeated-run results are assessed; no FPS gain or47-minute-episode mitigation is claimed in advance.

Rebased the unchanged test/fix pair onto main86b3b9e4, headede5275c. Current Linux and Windows renderer builds/links/exports and pre-commit pass. Full strict checks plus corrected-dependency reruns give851passes,9explicit skips and one Rust-check failure: the same3 Clippy needless_borrow findings reproduce on unmodified main. Approved L2 main/fix A/B/A/B is now running with copied settings/saves, strict area-arrival checks and identical private allocation counters. The preflight validated all six unique destinations. Keeping WIP until the repeated-run results are assessed; no FPS gain or47-minute-episode mitigation is claimed in advance.
Author
Contributor

L2 finished on main 86b3b9e4 / PR ede5275c: all 144 area visits completed. Capture-buffer creations fell about 95%; warm standing FPS remained within spread and peak RAM stayed similar. However, both PR runs had roughly twice as many loading frames over 100 ms and more capture-worker major faults overall. The description now includes the full tradeoff and per-run values. Keeping WIP pending investigation of that loading cost; neither the original 47-minute episode nor L3 hardware coverage is claimed fixed. Exact-head GCC/Clang regression checks still give 16 allocations on main versus 1 on PR, including caller RX_VK_CAP_MIN_MB=256.

L2 finished on main 86b3b9e4 / PR ede5275c: all 144 area visits completed. Capture-buffer creations fell about 95%; warm standing FPS remained within spread and peak RAM stayed similar. However, both PR runs had roughly twice as many loading frames over 100 ms and more capture-worker major faults overall. The description now includes the full tradeoff and per-run values. Keeping WIP pending investigation of that loading cost; neither the original 47-minute episode nor L3 hardware coverage is claimed fixed. Exact-head GCC/Clang regression checks still give 16 allocations on main versus 1 on PR, including caller RX_VK_CAP_MIN_MB=256.
tevan force-pushed fix/capture-spare-admission from ede5275c44
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
beanstalk/approval changed since the request: ask again
PR description / Title and description (pull_request_target) Successful in 5s
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 e537e57391
Some checks are pending
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
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 / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 21s
beanstalk/approval changed since the request: ask again
2026-11-27 17:16:33 +00:00
Compare
tevan changed title from WIP: fix(vk): admit newly needed capture buffer sizes into a full spare pool to WIP: fix(vk): admit capture sizes while retaining loading spares 2026-11-27 17:18:59 +00:00
Author
Contributor

Rebased onto main a8f6b4da and replaced FIFO eviction with most-represented-size eviction, counting the incoming buffer. A new production-function regression shows FIFO flushes loading spares through repeated small returns; this policy preserves them. GCC/Clang oracle, 130 final affected checks, Linux/Windows renderer builds/exports and clean installed async/sync smoke pass.

Fresh matched A/B/A/B: all 72 visits pass, creations/min 1047.5 -> 141.9, median load 3.560 -> 3.557 s, >=100 ms loading frames 20 -> 16.5. Rare >=250 ms counts are mixed and peak RAM rises about 169 MiB; the description includes repeat spread, residual cold frames and earlier exploratory loading costs. It does not claim the original long-session episode is fixed. Open #1599 is acknowledged as related prior work.

@Beanstalk Please compare current main and this PR on Windows AMD/NVIDIA and Steam Deck: repeated Kokiri Forest, Hyrule Field, Lost Woods, Kakariko, Death Mountain Trail and Dodongo Cavern visits, two interleaved runs each with identical settings and copied saves. Record the actual revisions, frame pacing, area load times and peak RAM/VRAM; check rendering and bounded memory under normal/tight budgets and smoke both normal asynchronous release and RX_VK_CAP_FREE_ASYNC=0. Earlier requests targeted superseded heads. Other-hardware runtime coverage remains unavailable locally; a BigBean must approve this request. The original long uninterrupted standing-slowdown episode remains a separate manual test.

Rebased onto main a8f6b4da and replaced FIFO eviction with most-represented-size eviction, counting the incoming buffer. A new production-function regression shows FIFO flushes loading spares through repeated small returns; this policy preserves them. GCC/Clang oracle, 130 final affected checks, Linux/Windows renderer builds/exports and clean installed async/sync smoke pass. Fresh matched A/B/A/B: all 72 visits pass, creations/min 1047.5 -> 141.9, median load 3.560 -> 3.557 s, >=100 ms loading frames 20 -> 16.5. Rare >=250 ms counts are mixed and peak RAM rises about 169 MiB; the description includes repeat spread, residual cold frames and earlier exploratory loading costs. It does not claim the original long-session episode is fixed. Open #1599 is acknowledged as related prior work. @Beanstalk Please compare current main and this PR on Windows AMD/NVIDIA and Steam Deck: repeated Kokiri Forest, Hyrule Field, Lost Woods, Kakariko, Death Mountain Trail and Dodongo Cavern visits, two interleaved runs each with identical settings and copied saves. Record the actual revisions, frame pacing, area load times and peak RAM/VRAM; check rendering and bounded memory under normal/tight budgets and smoke both normal asynchronous release and RX_VK_CAP_FREE_ASYNC=0. Earlier requests targeted superseded heads. Other-hardware runtime coverage remains unavailable locally; a BigBean must approve this request. The original long uninterrupted standing-slowdown episode remains a separate manual test.
Member

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

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

Measurement rebase note: main388c9d4b -> a8f6b4da adds only the builder ROM-export command/tests/docs. Game, host and renderer source are byte-identical; candidate092e81a2 -> e537e573 also leaves those sources unchanged. The measured host executable was identical across A/B, so those gameplay numbers still apply. The final head additionally passed 130 affected checks, Linux/Windows renderer builds/exports and clean installed async/sync gameplay smoke on the rebuilt a8f6b4da base.

Measurement rebase note: main388c9d4b -> a8f6b4da adds only the builder ROM-export command/tests/docs. Game, host and renderer source are byte-identical; candidate092e81a2 -> e537e573 also leaves those sources unchanged. The measured host executable was identical across A/B, so those gameplay numbers still apply. The final head additionally passed 130 affected checks, Linux/Windows renderer builds/exports and clean installed async/sync gameplay smoke on the rebuilt a8f6b4da base.
tevan changed title from WIP: fix(vk): admit capture sizes while retaining loading spares to fix(vk): admit capture sizes while retaining loading spares 2026-11-27 17:20:16 +00:00
Author
Contributor

RAM follow-up completed with the requested first-left Lost Woods Skull Kid clearing: 48 timed visits, main768 MiB versus PR512 MiB, A/B/A/B, identical host and matched inputs/settings. Logical spares fall about 213 MiB, but peak game RAM is 7411 versus 7457 MiB (within run spread), and >=100 ms loading frames rise 15.5 -> 22.5 per measured circuit (both PR runs higher); >=250 ms rise 2 -> 4. No RAM saving without a loading tradeoff is demonstrated, so the reduced-budget combination is not adopted and the code/default remain unchanged. This is a settings-combination comparison, not an isolated budget-effect test. Description updated with repeat spread, swap/cold-frame limits and source/route provenance; the original long-session issue and other-hardware coverage remain open.

RAM follow-up completed with the requested first-left Lost Woods Skull Kid clearing: 48 timed visits, main768 MiB versus PR512 MiB, A/B/A/B, identical host and matched inputs/settings. Logical spares fall about 213 MiB, but peak game RAM is 7411 versus 7457 MiB (within run spread), and >=100 ms loading frames rise 15.5 -> 22.5 per measured circuit (both PR runs higher); >=250 ms rise 2 -> 4. No RAM saving without a loading tradeoff is demonstrated, so the reduced-budget combination is not adopted and the code/default remain unchanged. This is a settings-combination comparison, not an isolated budget-effect test. Description updated with repeat spread, swap/cold-frame limits and source/route provenance; the original long-session issue and other-hardware coverage remain open.
Owner
@review
BeanBot left a comment

Recommendation: Approve. The code is ready: only testing is left. The revised policy substantially reduces capture-buffer creation in the reported Linux comparison, with mixed rare loading-frame results and higher peak RAM. The requested long-session and other-hardware runtime comparisons remain outstanding. Recommend approval; not approved on the forge.

Completed capture buffers can displace redundant spare sizes, reducing repeated allocations while retaining useful loading spares. The policy adds bounded selection work and can change later allocation and memory costs.

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

  • L2 gpu/vk/vk_memory.cpp:1426: Measure replacement during mixed-area and long-session play, including its allocation and memory costs. When: A returned small capture can evict an older large prewarmed spare; a later load that needs that class must allocate it again. The short Hyrule Field comparison does not exercise the reported area transitions or measure peak memory. Do: Compare current main and this head over repeated mixed-area and reported long-session workloads, recording allocation rates, load and frame times, and peak RAM and VRAM.
  • L3 gpu/vk/vk_memory.cpp:1426: Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons. When: The same replacement and release path runs on these systems, where allocation and destruction costs can differ from the tested Linux RADV device; no runtime results are yet recorded for them. Do: Run the requested main-versus-PR area tours and synchronous-release smoke, comparing rendering, load and frame times and peak memory.

Since the last review (on 6caf914c51)
Resolved: L1 (The fixture inherits RX_VK_CAP_MIN_MB from the caller, so its allocation-class assertions…)
Still open: L2 (Measure replacement during mixed-area and long-session play, including its allocation and…); L3 (Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons.)

Checks: Still running: 10 checks.

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

Does it help: Yes for the measured allocation churn: on Linux RX 6800 XT, reported median creations fell from 1047.50 to 141.92 per minute and logical capacity created fell from 5222.59 to 1858.23 MiB/min. Median load time was 3.560 versus 3.557 seconds; peak game RAM was 169 MiB higher. The original long-session slowdown is not established as fixed.

Other systems: The shared Vulkan capture path affects Windows, Linux and Steam Deck, including asynchronous and synchronous release and pressure-limited pools. Linux gameplay smoke and Windows cross-builds are reported, but Windows AMD/NVIDIA and Steam Deck runtime comparisons remain outstanding.

Switches: None added, changed or removed. Existing RX_VK_CAP_FREE_ASYNC defaults on; the reported Linux smoke also exercised it off.

Reviewed: e537e57391 against a8f6b4da23: Read the full diffs, admission and reuse tests, AGENTS.md, CONTRIBUTING.md and pull request template. Read the relevant capture-pool, reservation, retirement and destruction code; skimmed the remaining renderer and architecture files. The full renderer and architecture files were not read.; nothing run (a code review).

Checked and fine:

  • Admission accounts for worker reservations before evicting and speculative workers cannot evict spares.
  • Victim selection counts the incoming class and preserves oldest-returned ordering on ties.
  • Displaced buffers are released after the spare-pool mutex is unlocked.
  • The regression fixture exercises slot and byte exhaustion, repeated returns, reservations and both release paths.

Testing: No commands that build or run tests were executed. The author reports GCC and Clang production-function checks, affected checks, Linux and Windows renderer builds, and Linux async/sync gameplay smoke; CI is still running.

Overlaps and merge order: Open #1599 also retains size classes and changes refill and selection behavior; the description distinguishes its scope. No merge order is established.


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 revised policy substantially reduces capture-buffer creation in the reported Linux comparison, with mixed rare loading-frame results and higher peak RAM. The requested long-session and other-hardware runtime comparisons remain outstanding. Recommend approval; not approved on the forge. Completed capture buffers can displace redundant spare sizes, reducing repeated allocations while retaining useful loading spares. The policy adds bounded selection work and can change later allocation and memory costs. **Testing before merging (2)** (runs on the systems it can change; it doesn't hold the recommendation) - **L2** `gpu/vk/vk_memory.cpp:1426`: Measure replacement during mixed-area and long-session play, including its allocation and memory costs. *When:* A returned small capture can evict an older large prewarmed spare; a later load that needs that class must allocate it again. The short Hyrule Field comparison does not exercise the reported area transitions or measure peak memory. **Do:** Compare current main and this head over repeated mixed-area and reported long-session workloads, recording allocation rates, load and frame times, and peak RAM and VRAM. - **L3** `gpu/vk/vk_memory.cpp:1426`: Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons. *When:* The same replacement and release path runs on these systems, where allocation and destruction costs can differ from the tested Linux RADV device; no runtime results are yet recorded for them. **Do:** Run the requested main-versus-PR area tours and synchronous-release smoke, comparing rendering, load and frame times and peak memory. **Since the last review** (on 6caf914c5146) Resolved: L1 (The fixture inherits RX_VK_CAP_MIN_MB from the caller, so its allocation-class assertions…) Still open: L2 (Measure replacement during mixed-area and long-session play, including its allocation and…); L3 (Complete the requested Windows AMD, Windows NVIDIA and Steam Deck runtime comparisons.) **Checks:** Still running: 10 checks. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Yes for the measured allocation churn: on Linux RX 6800 XT, reported median creations fell from 1047.50 to 141.92 per minute and logical capacity created fell from 5222.59 to 1858.23 MiB/min. Median load time was 3.560 versus 3.557 seconds; peak game RAM was 169 MiB higher. The original long-session slowdown is not established as fixed. **Other systems:** The shared Vulkan capture path affects Windows, Linux and Steam Deck, including asynchronous and synchronous release and pressure-limited pools. Linux gameplay smoke and Windows cross-builds are reported, but Windows AMD/NVIDIA and Steam Deck runtime comparisons remain outstanding. **Switches:** None added, changed or removed. Existing RX_VK_CAP_FREE_ASYNC defaults on; the reported Linux smoke also exercised it off. **Reviewed:** e537e5739136 against a8f6b4da230b: Read the full diffs, admission and reuse tests, AGENTS.md, CONTRIBUTING.md and pull request template. Read the relevant capture-pool, reservation, retirement and destruction code; skimmed the remaining renderer and architecture files. The full renderer and architecture files were not read.; nothing run (a code review). **Checked and fine:** - Admission accounts for worker reservations before evicting and speculative workers cannot evict spares. - Victim selection counts the incoming class and preserves oldest-returned ordering on ties. - Displaced buffers are released after the spare-pool mutex is unlocked. - The regression fixture exercises slot and byte exhaustion, repeated returns, reservations and both release paths. **Testing:** No commands that build or run tests were executed. The author reports GCC and Clang production-function checks, affected checks, Linux and Windows renderer builds, and Linux async/sync gameplay smoke; CI is still running. **Overlaps and merge order:** Open #1599 also retains size classes and changes refill and selection behavior; the description distinguishes its scope. No merge order is established. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
HumanBean deleted branch fix/capture-spare-admission 2026-11-28 05:06:37 +00:00
Some checks are pending
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
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 / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 21s
beanstalk/approval changed since the request: ask again
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
5 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2281
No description provided.