Windows on the card with their CPU side in plain memory (VICTORY_WINDOW_PLAIN=1): 7.7 -> 6.1 GB of memory shared with the card on a 16 GB PC #281
No reviewers
Labels
No labels
accessibility
already-solved
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
merged
needs-decision
needs-game-run
needs-rebase
not-merged
nvidia
obsolete
question
security
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/avatarmanz--VIctory-7900XTX!281
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-281"
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?
@Zayfway on GitHub · 2026-11-26 14:16 UTC · original
Zayfway:window-plain→main· +85 −12 · 2 files · 1 commits · openWith
VICTORY_CARD_WINDOWS_MB, a window of title memory outside buffers gets a card side in the card's memory. Its CPU side still stayed a buffer as big as the window in the PC's memory shared with the card (shared_buffer). The card never reads that buffer: shaders read the card side, and sinceVICTORY_SEND_OWN(on by default) the sends go out of memory of their own.On a 16 GB PC that shared budget is 7,488 MiB, and windows were about 4.7 GB of it in the first mission. There, NVIDIA refused upload buffers by the thousand and the device hung (0x887A0005). #255 makes the refusals survivable; this PR removes their cause in that scene.
Change
With
VICTORY_WINDOW_PLAIN=1(off by default), a window that gets a card side has its CPU side in plain committed memory (VirtualAlloc). It holds the same bytes, refreshed the same way, but no longer counts against the shared budget.The switch only acts while
send::own()is on, because the sends must come from memory of their own.Card.stagingbecomesOption<ID3D12Resource>:card_sides()givesNonefor such a window.The plain memory is freed with the copy.
Measurements
PC: RTX 3060 12 GB, Ryzen 7 5700X, 16 GB RAM, Windows 11, Series S profile.
Build: codec-d/cool_fox f4b48ad with the same change. It is built on this repository;
shadow.rsandsend.rsmatch here, and this branch applies to0dec5dcwith one trivialmodconflict.Settings:
CARD_BUFFERS_MIN_KB=64,CARD_BUFFERS_MB=1536(#225), andCARD_WINDOWS_MB=2048in the runs that have it.WINDOW_PLAIN=1WINDOW_PLAIN=1Tests
cargo test -p victory-gpu --lib shadow: 35 passed, 1 ignored. The test-onlyShadow::unbackedis updated for the optional staging.cargo clippy -p victory-gpu --lib -- -D warnings: clean.Not done
🤖 Generated with Claude Code
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.