Title memory is copied, not used in place, past half of the host GPU's system-memory budget (#147) #161
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/Belobug--VIctory-Belobug-AMD!161
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-161"
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?
@RodrigoTorreao on GitHub · 2026-11-25 17:57 UTC · original
RodrigoTorreao:nonlocal-budget→main· +51 −3 · 2 files · 2 commits · openOn a machine with 16 GB of RAM, the driver's system-memory segment (
DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL, about half of RAM) fills up seconds into the world and host allocations then fail with0x8007000E(#147). Title memory used in place is the biggest part of it (3.4 GB of about 7.7 GB on01aadd1), and nothing looks at that segment's budget: only video memory's is checked.What
shadow::over_system_budget: before a window of title memory is opened in place (direct, andthrough_another_viewon currentmain), the segment's use plus the window's length is compared withVICTORY_IN_PLACE_SYSTEM_PERCENTof its budget (50 by default; 100 turns the check off). Past that, the window is copied, as memory the host GPU cannot use in place already is. Logged at most a few times.system X of Y MiB(it wassystem X MiB).Machines with 32 GB or more should not be affected: the segment is about 16 GB there, and half of it is more than the in-place windows I saw.
Tested
RX 6750 XT 12 GB, i5-14600KF, 16 GB RAM, Windows 11 26200, diagnostics build, README settings,
--console series-x, Enter every 5 s. The A and B runs are the same executable: the share is set by the variable. One run per row; this machine is noisy.On
01aadd1:VICTORY_GPU_UPLOAD+0x23cf683after allocation failures from 120 sOn
a59f3e5(currentmain), with #40 cherry-picked in every run so that crash does not end them:VICTORY_GPU_UPLOAD0x887A0007) at 100 s0x887A0007) at 148 s0x887A0006) at 378 sSo it delays the failure; it does not remove it. Upload buffers and copies still grow into the segment, and on current
mainthe runs end in a device removal with video memory above 90%, in both arms.cargo test -p victory-gpu --libona59f3e5+ this change: 112 passed, 0 failed, 4 ignored.cargo clippy -p victory-gpu --libandrustfmt --check: nothing on the changed lines.Not tested: any machine with more RAM (the check should stay quiet there), NVIDIA, Intel.
AI-assisted (Claude Code): the change, the runs and this text. No game data.
🤖 Generated with Claude Code
@KernelSmoker on GitHub · 2026-11-25 18:01 UTC · original
Checked
9f6973e. For the 100% control run, could the early return in over_system_budget move before the call to video_memory()? With a live adapter, video_memory() calls QueryVideoMemoryInfo for both LOCAL and NON_LOCAL on each invocation, including when the budget check is disabled. Returning first would let 100% serve as a control without the new driver queries. This is from reading the call path. I haven't measured their cost.@RodrigoTorreao on GitHub · 2026-11-25 18:06 UTC · original
Thanks, done in
2f0ac1f: withVICTORY_IN_PLACE_SYSTEM_PERCENT=100the function now returns beforevideo_memory(), so the control asks the driver nothing new.The control runs in the description were made before this. I don't expect it to change them, though I haven't measured it either:
over_system_budgetruns only when a new window of title memory is about to be opened, not per frame, andvideo_memory()is already called more often elsewhere (card.rsfor each card buffer,resource.rsup to every 50 ms).cargo test -p victory-gpu --lib: 112 passed, 0 failed, 4 ignored; clippy and rustfmt clean on the changed lines.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.