shadow: credit free texture-pool space in window_room_for up to real budget margin #2940
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2940"
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 Maverick0351a on 2026-11-29T18:54:49Z.
Fixes #
What it changes
window_fits_in_vramincrates/victory-gpu/src/shadow.rssowindow_room_forcreditscrate::pool::texture_room()(free space inside committed texture-pool blocks) when weighing DXGIusedagainstwindow_lineandroom_line, while preserving the 256 MiB real-budget margin guard (REAL_MARGIN, matchingresource::room'sVICTORY_ROOM_REALfrom #1888).resource::room()subtractedcrate::pool::texture_room()(typically 300-500 MB) fromusedwhen admitting textures up toroom_line(budget), whereasshadow::window_room_for()compared rawusedagainstwindow_line(89% - kept, ~1,100 MB belowroom_lineon a 16 GB card).used - pool::texture_room() < room_linewhile rawused > window_line, every idle buffer window evicted byshadow::let_go_idle()had its VRAM permanently taken by textures and no new buffer window could enter VRAM (host copies in the card's memorybled from5,234 MBdown to2,395 MBover 12 minutes of play on an RTX 5080 16 GB, spilling 1.6-2.8 GB of vertex/index/constant windows into system-RAMUPLOADheaps over PCIe).How it was tested
the card's own 13,292-13,371 MB in use of a budget of 15,235 MBand417 MB free in texture blocks,resource::roomreported13,404 MB against a line of 14,016 MB: room, whilewindow_room_forcompared raw13,371 MB > window_line (12,916 MB)and refused all new windows;host copies in the card's memoryfell from5,941 copies (5,234 MB)at18:12:30to4,702 copies (2,395 MB)at18:28:11.window_fits_in_vramcreditspool::texture_room()whileused + size < budget - 256 MiB, keeping buffer windows on equal footing with texture admissions underwindow_line.cargo testpassed for the crates it touches: yes (cargo test -p victory-gpu --lib window_fits_in_vram, 1 passed;window_line_keeps_the_room_held_for_targets, 1 passed).Checked for overlap
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.