AMD cards: windows in card memory the CPU maps share the windows' own room (RX 9070 XT: no longer over its budget) #4189
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4189"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by RustyTheDalek on 2026-11-30T17:16:02Z.
What it changes
ae8fa941puts windows of title memory in card memory the CPU maps on cards with a budget of 14 GiB or more (window_mapped_default, 4096 MB, measured on an RTX 5080 16 GB: shared GPU memory 1.6-2.4 GB lower, the card's own 1.9-2.2 GB higher). Those mapped windows have a room of their own (WINDOW_MAPPED_BYTESagainstwindow_mapped_most), next to the 2,560 MB the card sides of windows with two sides already have (WINDOW_CARD_BYTESagainstwindow_card_most). So on a 16 GB card windows can take up to about 6.5 GB of the card.On an RTX 5080 that fits. AMD's driver gives the process less of the same 16 GB once the world loads: a Radeon RX 9070 XT's budget went from 15,419 MB at the start to between 13,160 and 14,120 MB in the world, in each of five play runs over two days, against the RTX 5080's 15,209. There the windows' extra room came out of the textures' room.
This makes the two kinds of window share one room,
window_card_most, on AMD cards: a mapped window counts the card sides already made, and a card side counts the mapped windows. The PC's memory keeps the gain (a mapped window has no CPU's side). The card holds no more windows than it did beforeae8fa941.VICTORY_WINDOWS_BAR_MBset).VICTORY_WINDOWS_SHARE_ROOM: unset on AMD cards (vendor0x1002);1on any card;0never, which gives back ae8fa941's 4096 MB of their own.windows in card memory the CPU maps share the windows' own room on the card (VICTORY_WINDOWS_SHARE_ROOM=0: 4096 MB of their own) room_mb=2560.How it was tested
buffer mirror span, at most), with the card's own memory against its budget:41adb55141adb551c71899d9with #3859 and #3717In all three the PC's own memory held: 1.2-5.8 GB free, against 0.3-2 GB and frames of 5 to 9 s in a run before windows were mapped (13:04,
41adb551).mapped_windows_share_the_room_on_big_amd_cards.cargo testpassed for the crates it touches: yes,cargo test -p victory-gpu --lib -- shadow::. Clippy reports no warning on the lines this changes.Checked for overlap
window_mapped_for's line (80 % of the budget to the windows' percent) and lets idle mapped windows go; it touches the same function, a different question. #3965 is aboutVICTORY_SEND_BAR(now off unless set,1a4c66ca).🤖 Generated with Claude Code
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:46:07Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed