Files
Cesarus85--mjolnir-vr/tools
hkmoddandClaude Opus 5.5 7c19ec27ea Drop idle textures after half a minute of time, not 1800 frames
The texture cache dropped a texture once it had gone 1800 frames without
being drawn, and checked every 600 frames: half a minute and ten seconds
at 60 frames a second. At 360 frames a second it is five seconds, so
looking away from part of a level for five seconds dropped its textures,
and turning back converted and uploaded them again; the faster the
display, the more often. On b30 at 357 frames a second, 105 textures were
dropped in 38 seconds of play.

The cache now sweeps every 10 seconds of time (SDL_GetTicks, which the
Android guest and the web have too) and drops the textures not drawn since
the sweep three sweeps before: 30 to 40 seconds after they were last
drawn, which is what it did at 60 frames a second. The frame counter still
orders the palette variants.

Checked with a harness test (tools/harness/tests/test_texture_idle.py)
that runs xgpu_texture_cache_begin_frame from the sources against a fake
clock: a texture last drawn 1 or 25 seconds in is dropped 30 to 40 seconds
later at 360 frames a second, and at 60 as before; on main the 360 cases
fail (dropped after 5.7 and 6.7 seconds) and the 60 one passes. Four
negative controls. Not measured: the time saved, which is small on an
RTX 4080 (each upload took 1.6 ms or less) and larger where conversion and
uploads cost more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 04:37:43 +02:00
..
2026-10-10 12:09:19 +13:00
2026-09-26 16:16:00 +12:00
2026-09-26 16:16:00 +12:00
2026-09-26 16:16:00 +12:00
2026-09-26 16:16:00 +12:00
2026-09-26 16:16:00 +12:00
2026-10-11 12:46:28 +13:00
2026-10-11 12:46:28 +13:00
2025-11-27 02:27:27 +00:00
2026-09-28 17:42:22 +13:00
2026-10-12 08:07:14 +13:00
2026-10-06 20:32:36 +13:00
2026-10-11 12:46:28 +13:00
2026-10-11 12:46:28 +13:00