Let the upscaler stand-in's scratch images make room for a new size instead of refusing it.

The cache kept the first eight sizes and formats for the whole run and refused every other one, so after a few
window, resolution or DLSS mode changes the stand-in's blit of a new size was left out, while the old sizes' images
stayed. A new size now takes a free entry or the one used longest ago, whose image goes through the deferred
destruction after the tonemap pass drops its views of it (vk_tonemap_forget), before another image can take its
handle. tests/scratch_lru_check.py checks the choice.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 23:17:36 -05:00
parent d77572c69c
commit a4310491de
7 changed files with 173 additions and 7 deletions

View File

@@ -662,6 +662,11 @@ bytes goes first, what moves fits the free bytes outside the chosen blocks, a pl
and 400 random tables keep those rules. The part of `runtime/vk_texture.c` that builds the table and moves the images
(`NX2NAVI_TEX_COMPACT`) is not built by it. No GPU, no game files.
A change to which entry of the upscaler stand-in's scratch images serves a new size (`runtime/vk_scratch_lru.h`,
`runtime/vk_exec_draw.c` `fallback_scratch`) passes `python tests\scratch_lru_check.py`, which builds the header alone
and checks that a match is a hit, a ninth size takes a free entry or the one used longest ago instead of being
refused, and two images of one frame never evict each other. No GPU, no game files.
A change to which frames FSR 3.1 frame generation is told are camera cuts (`runtime/vk_fg_reset.h`, `runtime/vk_fg.cpp`
`generate` and `vk_fg_frame`) passes `python tests\fg_reset_check.py`, which builds the header alone and checks that each
frame id gets its own frame's cut, that an id never noted or no longer held counts as a cut, and that a slot rewritten