mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-07 13:39:55 +00:00
A draw that hits through a relocation alias reuses its donor's stages under a key the cache doesn't hold. It isn't inserted, since cacheDrawStages skips hits, and lookupDraw moves an entry up the LRU only when the entry it hit is the one cached under the draw's own key. So a donor that serves a relocated draw every frame ages to the back of the LRU like an unused entry, and the cache evicts it once other draws insert. Since aliases name a key instead of holding the entry, that eviction also ends the alias, and the next relocated draw misses, compiles and is admitted again, only to age out the same way. A relocated hit now moves its donor to the front of the LRU, with the same rate limit as a direct hit (once per an eighth of the cache's entries in hits). agc_driver_draw_cache_relocation_kept (--kept, with APS5_DRAW_CACHE_ENTRIES=2) teaches a relocation alias, then runs three rounds: two draws of another vertex shader that insert an entry, then a moved draw with the taught contents. Every moved draw has to hit. Without the refresh, the second round's insert evicts the donor and its moved draw misses.