GPU: evict idle title buffers, multi-key windows, and unmapped placed RT/depth textures #194
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/194"
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 fxceless/victory-fork. Originally posted by MartinIndra02 on 2026-11-24T22:25:46Z.
Summary
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).
Imported from fxceless/victory-fork. Originally posted by MartinIndra02 on 2026-11-24T22:32:14Z.
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.
Imported from fxceless/victory-fork. Originally posted by Jonirulah on 2026-11-25T01:29:54Z.
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.
Imported from fxceless/victory-fork. Originally posted by MartinIndra02 on 2026-11-25T10:40:26Z.
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