GPU: copies of title buffers get bounds, and the system segment's #3930
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3930"
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-01T05:39:49Z.
Summary
find()'s copies of whole title buffers.Entrynow records the presented frame its copy was last asked for. Past the soft bound (1 GB)find()and the per-frameevict_loose()retire idle buffer copies least-recently-used first; past the hard bound (1.5 GB) — or whenQueryVideoMemoryInfosays the GPU-visible system segment has no room for the copy plus a 256 MB reserve — the copy is refused rather than racing the driver's limit.segment_short()reads the non-local segment budget (video_memory()[1]), so both the loose and buffer maps trim to zero when the driver budget is nearly exhausted — the point where an idle-floor no longer frees headroom.3905/3791 MB, buffers ≈735 MB uncapped). With this applied the title ran story mode for 14m25s before crashing on its own memory ceiling (Breakpadmemory.load_percent 98,TileHeap 2761/3977Mb) — the host device survived.Test plan
cargo check -p victory-gpu --features diagnosticscleancargo test -p victory-gpu --features diagnostics shadow— 10/10 passGenerated with Devin
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-12-01T12:30:30Z.
On
7a6a8225I injected non-local segment readings while leaving whole-buffer allocation and GPU readback on the hardware device. A reported budget of 805 decimal MB falls below the 768 MiB credibility cutoff and allowed the copy. With credible budgets of 1,024 MB and 3,500 MB, the effective reserves were 128,000,000 and 268,435,456 bytes, respectively.A four-byte lookup triggered allocation of the whole registered buffer. At exact headroom, a 1,000,000-byte buffer and a 564,544-byte buffer were admitted in their respective cases. Adding one byte to either requested buffer caused refusal and retirement of the cached buffer. Lowering reported usage by 1 MB allowed both refused buffers to be created, with GPU readbacks of
0x137a51feand0x137a51ff.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.