Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1759"
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 crashoverride1995 on 2026-11-28T23:56:58Z.
Includes #1562 (Mikael Järvinen) and #1441 (saltdam36). Their commits are in this branch unchanged, with their authors, and two commits of mine follow on top. Merging this merges all of them; the measurements below are of the whole set.
VICTORY_PRESSURE_LEVELSVICTORY_SHRINK_FARWhat it changes
On a card that is full, a texture the title picks by index that has no host copy yet waits for room, and draws black (or late, as pop-in) until it gets it. While driving on a 12 GB card the texture queue said "no room, new textures wait" in 70 % of its 5-second checks, with tens of thousands of slots held back every 5 seconds: black sign lettering, blank billboards, roads and leaves popping in late.
VICTORY_PRESSURE_LEVELS, default 2, 0 = off). When the card has no room, a first upload is tried without its largest level, then without its two largest: a quarter or a sixteenth of the bytes. The slot shows the texture at once, a little soft, instead of black. The smaller copy is tried first, so the 5-second first-upload window (shared by every slot of the pass) admits about four times as many textures, instead of a few large ones using it all up.want_levelgives the levels back once the card has room again; while it has none, a view of level 0 leaves the small copy as it is instead of sending it back to waiting.from_basenow movesTexture2DArrayviews of one-layer textures to the copy's first level too. Without that, a one-layer texture shown as an array by another slot named levels the copy no longer had, and the device was removed about 70 s into a drive.Hosted::reduced). A first version kept it in one table under one lock; every view looked it up, and that cost the submitting thread about 5 ms a frame.VICTORY_SHRINK_FAR, default on, 0 = off). Copies only ever grew: when the title's streaming moved a far texture's views to a smaller level, the host copy kept the large levels. Now, while the card has no room,want_levelremakes a copy without its larger levels once no slot shows them any more (lowest level over all slots,first_viewed). The room goes to textures near the player, and the copy grows back when a view asks for the levels and the card has room again.A new line every 5 s says how many textures are reduced, how many got their levels back, and how many copies shrank, of how many MB.
How it was tested
mainrun was longer (about 10 minutes) and started at night.d4b5d51)cargo test -p victory-gpu --lib: all passed (including a new test: a texture made without its largest levels keeps them out while the card has no room, and gets them back with room).cargo clippyfinds nothing in the changed lines; it does fail on main already invictory-shader(an unused variable and a manual checked division inemit/lower.rs).Checked for overlap
Credits
held_only/want_level/from_base: the existing machinery that copies only the levels views show. This change builds on it.Pull request closed