GPU: loose copies of title memory get LRU bounds and refusal #3928
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3928"
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?
Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-12-01T04:26:57Z.
Summary
loose()windows used e.g. for GTA VI's allocator-owned interface vertices) were never freed: each unique aligned window pinned a permanentshared_bufferin GPU-visible system memory.CreateCommittedResource/MakeResidentfailed0x8007000E, the device suspended0x887A0007and was removed.loose()and the per-frameevict_loose()(run inHost::execute, on the same boundary asresource::evict_unused) retire idle copies least-recently-used first. Past the hard bound (512 MB)loose()refuses the copy instead of racing the driver to OOM — copies are regenerable from title memory and live lists/heap slots hold their own references, so correctness is preserved while the allocation storm can no longer take the device down.no shared buffererrors, memory stable).Test plan
cargo check -p victory-gpu --features diagnosticscleancargo test -p victory-gpu --features diagnostics shadow— 11/11 passGenerated with Devin
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T12:30:28Z.
On
ab99a148I lowered the cache limits in a test build and kept a cold loose window alive through a recorded GPU list. At frame 300 the cache dropped that window and retained the other two. The recorded copy still read0x11223344. After changing title memory, a fresh copy read0x99aabbcc. Four recent windows fit and a fifth was refused.There was one distinct failure on this head. An oversized request first trimmed four cold windows down to one, then returned
None. The cache membership changed but its generation stayed at 6. The assertion that removal must advance the generation failed. The stacked commitcaeb48fin #3930 already callschanged()when this allocation-time trim removes entries. The failing observation here is the generation value. The GPU readback checks above passed.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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.