mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Count the texture cache's short waits in seconds below 60 presents a second too.
The cache counts its short waits in presents (PRESENTS(n): n presents at 60 a second) and scales them by the presents a second. Above 60 it always did. Below 60 the rate stopped at 60, so the 120 presents a released texture stays out of the VRAM pressure's reach (STALE_FRAMES) were 4 s at 30 presents a second and 5.7 s at 21. The game lets go of textures by the second, as the player moves, so what that window holds grows with its length. A tester's log (RTX 4070 SUPER, 2560x1440, DLSS Quality with frame generation, texture detail Full, 0.10.2-rc4): the card went to 11,198 MiB against a budget of 10,600 while the frame rate fell from 63 to 21 fps. The released textures held 2,644 MiB against their bound of 384, and 2,105 MiB of that was released too lately to go (442 MiB when the pressure began). On an RTX 5090 with the budget taken as 10,600 MiB and the tester's output settings, a walk through Hyrule Field at a 30 fps limit: the released-too-lately textures were all in their first 120 presents (the new census line below) and held 383 and 429 MiB on average at the memory reports of two runs, against 292 MiB at 60 fps. With this change they are in their first 60 presents and hold 209 MiB. Textures made again after a drop: 295 and 523 before, 511 after. Not shown: the tester's 21 fps and a card that is really over its budget, which this card does not reach; the memory in use as the driver counts it stayed at 9.8 GiB in the capped runs. The rate now follows the presents down to 15 a second (vk_tex_release.h trl_rate_sample, trl_rate, trl_presents), once eight seconds in a row were under 60, and never in a run's first eight seconds; one slow second among fast ones still shortens nothing. Every wait PRESENTS counts follows it. NX2NAVI_TEX_RATE_LOW=0 stops the rate at 60 as before, and one line says when the rate crosses 60. Values at 60 presents a second and above are the ones before. The census of the released textures over their bound gets a second line: what the ones released too lately wait for (their first presents after the release, content only the GPU made, the gap before a take-back with or without a lookup still reaching them). It is what showed which wait held the memory. tests/tex_release_check has the rate's checks and a table of the wait by presents a second; they fail against the rule before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -432,6 +432,13 @@
|
||||
# game does this all the time: 52,000 second uploads in three minutes without it, 600 with it. 0: only the small ones,
|
||||
# as before (for a comparison; nothing should look different). Read at start.
|
||||
# tex_same_big = 1
|
||||
# The texture cache counts its short waits in frames: a texture the game let go of may be dropped under video memory
|
||||
# pressure 2 seconds later, one nothing sampled for 2 seconds counts as idle, and so on. Above 60 fps those frame
|
||||
# counts always grew with the frame rate, so that the seconds stayed. Below 60 fps they did not shrink: the 2 seconds
|
||||
# were 4 at 30 fps and nearly 6 at 21, and the textures waiting them out held about three times the video memory on a
|
||||
# card that was already over its budget, which kept the frame rate down. 1 (the default) counts the seconds below 60
|
||||
# fps too, down to 15 fps, once the game has been under 60 fps for 8 seconds; 0: as before. Read at start.
|
||||
# tex_rate_low = 1
|
||||
# Texture compaction (experimental). Video memory is taken in blocks (vma_block_mb), and a block goes back to the
|
||||
# driver only once everything in it is freed: after a long session the blocks hold textures scattered between holes,
|
||||
# and the game holds a gigabyte or two of video memory it does not use. 1: textures no shader sampled for ten seconds
|
||||
|
||||
Reference in New Issue
Block a user