gpu(menu): retire old Buffers on format/scale change instead of mem::forget #3049
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!3049
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3049"
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?
@RanoGames on GitHub · 2026-11-29 19:45 UTC · original
RanoGames:fix/menu-retire-buffers→main· +3 −1 · 1 files · 1 commits · closed without mergingWhat it changes
Fixes a permanent GPU/COM resource and memory leak in
crates/victory-gpu/src/host/menu.rs:(format, scale)changed (e.g. on window resize),Menu::drawpreviously calledstd::mem::forget(self.buffers.take()), permanently leaking the oldBuffersstruct (Vec<(ID3D12Resource, *mut u8)>heap allocation, the 4 uploadID3D12ResourceCOM references, andcard: ID3D12Resource).std::mem::forget(self.buffers.take())withif let Some(old) = self.buffers.take() { super::retire(old); }, deferring drop viahost::retireuntil all in-flight and queued GPU submissions have finished.How it was tested
Buffers(uploads+cardID3D12Resources) viastd::mem::forget.Buffersis queued inhost::retireand dropped safely after GPU submissions finish.cargo testpassed for the crates it touches: yes (cargo test --locked -p victory-gpu --lib -- host::menu::tests --test-threads=1: 14 passed, 0 failed;cargo xtask policy --stagedpassed)Checked for overlap
mem::forget,Buffers,menu.rs).@RanoGames on GitHub · 2026-12-01 16:24 UTC · original
Closing in favor of #915, which already retires the F1 menu buffers when the output format or UI scale changes.
Pull request closed