fix(vk): admit capture sizes while retaining loading spares #2281
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
5 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2281
Loading…
Reference in a new issue
No description provided.
Delete branch "tevan/Longshot:fix/capture-spare-admission"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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_freeingpu/vk/vk_memory.cpp, thentests/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 maina8f6b4da230ba04ca3ed367b7767c75f0493efde. Measurements below ran main388c9d4bagainst candidate092e81a2; 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.
tests/test_lifter.py, three Clippyneedless_borrowfindings inbuilder/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.a8f6b4daand 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.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:
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:388c9d4bddRepeat 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=512setting 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
a8f6b4daversus PRe537e573, 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:a8f6b4da23(768 MiB)e537e57391(512 MiB)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
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Full-suite baseline failure and rebase checks disclosed above.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here; test precedes fix.tests/that reads changed source is updated, not weakened.Ready to merge
main, measured again or a comment says why the numbers still hold.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
a2dc5385median 116.0 FPS versus head5499ba8a116.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.@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 head5499ba8adbeb4cf8a5ec5284b72facbc49f76c1f, 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.
@tevan only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it or to this comment.Beanstalk test farm
Commit
e537e57· approved by nobody yet · dashboardA member of
BigBeanscan review this commit and comment@Beanstalkto test it.Rebased onto current main
753fb5af; new heada8369e79. 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.@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.
@tevan only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was fora8369e7, and the PR has changed since (6caf914), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.5499ba8adba8369e79a6a8369e79a66caf914c51Rebased again onto current main
0e32bc10, head6caf914c, 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.Fresh approved current-head Hyrule Field A/B/A/B is complete: main
0e32bc10versus PR6caf914c, 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.WIP: fix(vk): admit newly needed capture buffer sizes into a full spare poolto fix(vk): admit newly needed capture buffer sizes into a full spare pool@review
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.
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)
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.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.@fixcan 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:
6caf914c51against0e32bc100d: 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:
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.
@ -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 ||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.
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)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 addressed in head
ac517778(test-first commitde6cc4c0): 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-tested6caf914c, 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.6caf914c51ac5177783a@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 from6caf914c. 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.
@tevan only members of
BigBeanscan start the farm.One of them can approve this request by reacting 👍 to it or to this comment.This request was forac51777, and the PR has changed since (ce98ab5), so a 👍 no longer approves it. Comment@Beanstalkagain to ask for the new commit.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.
ce98ab5639f12edacfc8fix(vk): admit newly needed capture buffer sizes into a full spare poolto WIP: fix(vk): admit newly needed capture buffer sizes into a full spare poolPrepared L2: rebased the unchanged test/fix pair onto current main
9eabf8bc, headf12edacf. HumanBean had merged main into the fork atce98ab56; 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.f12edacfc8ede5275c44Rebased 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.
L2 finished on main
86b3b9e4/ PRede5275c: 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.ede5275c44e537e57391WIP: fix(vk): admit newly needed capture buffer sizes into a full spare poolto WIP: fix(vk): admit capture sizes while retaining loading sparesRebased onto main
a8f6b4daand 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.
@tevan only members of
BigBeanscan start the farm. One of them can approve this request by reacting 👍 to it or to this comment.Measurement rebase note: main388c9d4b ->
a8f6b4daadds only the builder ROM-export command/tests/docs. Game, host and renderer source are byte-identical; candidate092e81a2 ->e537e573also 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 rebuilta8f6b4dabase.WIP: fix(vk): admit capture sizes while retaining loading sparesto fix(vk): admit capture sizes while retaining loading sparesRAM 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.
@review
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)
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.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:
e537e57391againsta8f6b4da23: 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:
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.