GPU tests: a memory bench that drives the layer through the title's interface (no game) #473
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!473
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-473"
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?
@simbaui4life on GitHub · 2026-11-27 16:17 UTC · original
simbaui4life:test/memory-bench→main· +840 −4 · 5 files · 1 commits · openA memory bench for
victory-gpu. It drives the layer through the title-facing interface with synthetic frames, without the game, and reads what each memory class holds. One commit on014d52d. Test-only: the production changes are test hooks.Why: memory changes are hard to judge without the game, and
docs/findings.mdreports 40–46 GB private with no single leak (#234). This gives a game-less, repeatable footprint check, so a memory change can be measured before and after on any PC with a GPU.What it drives (
crates/victory-gpu/src/host/membench.rs)queue::create,fence::create,list::create_allocator/create_list, andresource::test_bufferbuffers. Title memory comes from a write-watchedVirtualAllocallocator installed withresource::use_allocator.place_copy, so scratch, host copies and card copies are used.list::with_state+shadow::find/refreshcreate and read 4 MiB windows.release_held,frame::test_advance).Tests (ignored; each in a process of its own, because the bench installs the title allocator process-wide)
memory_bench_steady_state: 60 warm-up frames and 240 measured. It prints a table per class (host lists, scratch, host copies, windows, snapshots, fetch buffers, staging, blocks, made buffers, private bytes) and asserts that nothing grows.memory_bench_pressure_lets_idle_go: a spike, then idle with 18 GB free (kept), then "1 GiB free" injected (let go). It lists what pressure does not reach.VICTORY_MEMBENCH_STRICT=1asserts that too.cargo test -p victory-gpu --lib memory_bench_steady_state -- --ignored --nocapture. AddVICTORY_RELAY=2 VICTORY_RELAY_COPY=1for the relay pathsscripts/play.ps1uses.Test hooks (all
cfg(test))list::idle()reports the pool's count and bytes.host::FREE_RAM_SAIDoverridesavailable_physical_ram().shadow::memory/windowsandtexture::memory/let_goare nowcfg(any(test, feature = "diagnostics")).Numbers (RTX 4070 Ti, driver 621.01, debug build)
VICTORY_RELAY=2)Does it catch faults? Each of these was put in on purpose, and the steady-state test failed every time:
What it shows (none of these grows across frames; they are plateaus that never come down)
simbaui4life:fix/scratch-at-landing.IDLE_MOST.1) never applies, because pooled lists hand back their scratch. Their allocator memory, about 2 MB per pooled list here, is unbounded up to 512 lists. On NVIDIA a separate probe measured 0.4–0.5 MiB per idle allocator.VICTORY_RESIDENCY), the list pool or the fetch buffers.Tested (RTX 4070 Ti)
cargo test -p victory-gpu: 394 passed, 0 failed (37 ignored, the two bench tests among them).-D warningsadds nothing. main already fails clippy inlist.rs,watch.rs,host/panel.rsandhost/place.rs, and in the diagnostics buildtexture.rsStaging::size(#362).Not tested: other GPUs; anything the bench cannot reach (see above).
No game data in the commits.
🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.