GPU: evict idle title buffers, multi-key windows, and unmapped placed RT/depth textures #194
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork!194
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/194/head"
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?
@MartinIndra02 on GitHub · 2026-11-24 22:25 UTC · original
MartinIndra02:perf/fxceless-vram-eviction→main· +79 −9 · 2 files · 1 commits · closed without mergingSummary
Closes three VRAM and shared-memory eviction gaps in \ictory-gpu's idle sweeps (\shadow::let_go_idle\ and
esource::let_go_idle):
Evict idle registered title buffer copies (including carded VRAM copies) in \shadow::let_go_idle:
eferences(&s.buffer) == 1, and !s.writes_pending()\ are now retired (and expired \Weak\ entries pruned from \CARDED). Because title memory remains authoritative once no flight is writing to the buffer, the next lookup recreates the copy cleanly.
Fix multi-key window leak in \LOOSE\ (\shadow::let_go_idle):
Evict idle placed RT/depth/UAV textures whose backing title memory has been unmapped (
esource::let_go_idle):
.host.placed && !texture::committed(r.data(), 1)), idle, and unreferenced (including any \DepthTwin) are now safely retired, reclaiming both the texture and its twin in VRAM.
Verification
AI-assisted contribution (authored and verified with an AI coding assistant).
@MartinIndra02 on GitHub · 2026-11-24 22:32 UTC · original
Live hardware verification on RTX 3080 (10 GB, Windows 11, release build merged locally with #25 + #71 + #144 + #185):
AI-assisted log summary; counts and timings only.
@Jonirulah on GitHub · 2026-11-25 01:29 UTC · original
On native Windows, this PR makes the picture worse in the opening cutscene.
Setup
--console series-s).VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024 VICTORY_LEAN_WINDOWS=1 VICTORY_PIPELINE_WAIT_MS=24.main(2119b0e) + #188, #270, #186, #159, #265, #97, #258, #241, #203, #261.Same shot (character seen from behind, looking out of the window at the prison yard):
Performance: frame time is about the same (median 231 ms/frame with the PR, roughly 230-257 ms without).
Crash: the first run with this PR crashed during loading:
0xc0000005in title code,game_scarlett_master.exe+0x164a298, reading address0x2c. A second run did not crash, so I can't tie the crash to the PR.Guess (untested): the sweep retires host copies of title buffers that the scene still reads through descriptors. The title's per-frame linear allocators reuse the same blocks every frame, so a copy that looks "idle" between sweeps can be needed again. After it is retired, its contents come back empty or stale.
@MartinIndra02 on GitHub · 2026-11-25 10:40 UTC · original
Closing this PR — thanks @Jonirulah for catching the visual regression in the opening cutscene on RTX 3070 8 GB! Evicting \BUFFERS\ entries while descriptor tables/linear allocators still read them via GPU addresses is unsafe without tracking descriptor/allocator liveness.
Pull request closed