Keep released textures for one minute and up to a thirty-second of the video memory budget.

The textures the game lets go of were kept for three minutes and could hold a quarter of the card's budget, up to
8 GiB with room. A run through Hyrule Field shows what that bought and what it cost (RTX 5090, 5120x2160 with DLSS
Performance, about three minutes of running; the game keeps 4.8 GiB of textures live and loads about 190 a second):
the released textures held 5.3 GiB on average and the video memory in use went from 11.1 to 17.9 GiB, while the
game took back 1,494 MiB of them within 10 s of the release, 171 MiB within a minute and 10 MiB later, beside 33,000
textures it loaded anew. A shorter hold alone gives nothing back: with 20 s the released textures fell to 0.5 GiB
and the free space inside the allocator's blocks rose to 4.9 GiB, since a block returns to the driver only when it
is empty. What the released textures hold at their fullest is what the session costs, so the bound is the lever.

The bound is now a thirty-second of the budget, 384 MiB to 1 GiB (vk_tex_release.h trl_cap_mb), still doubled while
the card and the commit have room, and the hold 60 s, 120 for content only the GPU made. The same run with the new
defaults: 13.2 GiB in use on average against 16.7, 13.8 at most against 17.9, 532 MiB of textures made again over
the run, 77 fps against 75. An 8 GiB card keeps 384 MiB where it kept up to 1.9 GiB.

tests/tex_release_check checks the bound by the budget and the sessions it simulates against the rule before.
Compaction (tex_compact) and 16 MiB blocks were tried on the same run and gave back 0.7 and 1.2 GiB; neither is
changed here.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-14 08:33:01 -05:00
parent 7b33512e32
commit 87bb179c78
8 changed files with 158 additions and 94 deletions

View File

@@ -23,6 +23,13 @@ cards).
their video memory is the PC's own memory. With a card filled to the room of an 8 GB one, a tester measured 29.6 fps
with *Full* and 42.8 with *Reduced* on the same tour, and a handheld that got *Full* closed when a save was loaded.
A texture detail you chose yourself stays as you set it.
- **Less video memory held in reserve.** The game lets go of textures as you move and takes a few of them back; the
ones it let go of were kept for three minutes and could hold a quarter of the card's video memory (up to 8 GB), and
what they held at their fullest stayed in use for the rest of the session. They are now kept for one minute and may
hold a thirty-second of the card's video memory, 384 MB to 1 GB (`tex_released_hold`, `tex_released_mb`). Measured
on a run through Hyrule Field at 5120x2160 with DLSS Performance on an RTX 5090: 13.2 GB in use on average where
it was 16.7, 13.8 at most where it was 17.9, at the same frame rate. An 8 GB card keeps 384 MB of such textures
where it kept up to 1.9 GB.
## Removed