Files
AnyPS5/docs/dev
dantdmdarealguy 36277c4b44 perf(agc): keep recently sampled depth plane copies up to twice the budget
The depth plane copy budget (APS5_DEPTH_PLANE_COPY_MIB, 256 MiB) evicted
the least recently used copy even when it had been sampled in the same
frame. When one frame samples more than the budget, every use evicts a
copy the next use needs, so each copy is made and refilled again on every
use. ASTRO BOT (PPSA21564) samples a 1536x1536x16 D32 copy (288 MiB with
its staging buffer) and a 2048x2048x3 D16 copy (48 MiB) alternately in
its intro and thrashes this way.

A copy sampled in the current or the previous present now stays while
all copies hold at most twice the budget. Past that, the least recently
used copies leave whenever they were sampled, so the copies never hold
more than twice the budget, or the one copy being sampled if it is
larger. Older copies still leave first by least recent use down to the
budget.

DepthPlaneCopyBytes reports the bytes the copies hold, for the tests.
The pooled-memory rounds of agc_driver_depth_plane_guest_layers now
advance two presents between samples, since two copies sampled in one
present may now be kept together.
2026-10-26 22:31:18 -05:00
..