Files
AnyPS5/docs/dev
Joey Fisher b4cd843324 fix(agc): fail a template's proof on a released texture and audit it with the full walk
The fast proof of a cached ShaderResources proves each sampled texture
from write stamps, keys and the pending registry. It never asks whether
the sampled lookup would still return the bound Texture, so a template
whose surface memory is unchanged keeps binding an old object:

- After the sampled cache drops or replaces the entry (#6492 marks the
  texture released), Find keeps serving the template until the next
  Insert, and its fast proof passes.
- When the lookup's answer changes without any lookup running (a
  snapshot whose surface became host-imported is viewed through its
  storage image from then on), nothing replaces the entry and the
  template keeps the snapshot until it leaves the resource cache.

The fast proof now fails with 'replaced texture' when a bound texture
is released. A template whose last full walk is older than
APS5_TEMPLATE_AUDIT_MS (default 1000, 0 turns it off) takes the full
walk instead of the fast proof ('audit'), so a different lookup answer
fails the proof and the template is rebuilt.
2026-10-19 16:13:56 -06:00
..