Repository navigation
GPU: evict idle title buffers, multi-key windows, and unmapped placed RT/depth textures - #194
MartinIndra02 wants to merge 1 commit into
Conversation
… RT/depth textures
|
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. |
…e buffers, multi-key windows, and unmapped placed RT/depth textures Part of #16 # Conflicts: # crates/victory-gpu/src/resource.rs # crates/victory-gpu/src/shadow.rs
|
On native Windows, this PR makes the picture worse in the opening cutscene. Setup
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: 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. |
Audio: an XMA loop's skip is of its first frame, not of its last
Audio: an XMA loop's skip is of its first frame, not of its last (cherry picked from commit 2a45e75)
|
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. |
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).