mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
Staging a swept write-only element (#7618) costs a copy-in and a copy-back per use. In PPSA03912's town that saves GPU time, but in its main menu the 202 MiB element is faster in place (73 vs 91 ms of GPU time per frame), so the menu lost about a fifth of its frames. Decide per element by measurement. The busiest element is probed in its current mode, the other mode and its current mode again; the other mode is kept when its frames are faster by more than twice the standard error. A repeated answer doubles the wait for the next probe from 20 s up to 160 s, and a jump of the frame GPU time by more than a quarter (a scene change) probes again at once. The frame GPU time comes from the whole-batch timestamps, which the first probe turns on. Resource builds made under the other decision are not reused. APS5_NO_ADAPTIVE_STAGING=1 stages every eligible element, as before. The policy is in AdaptiveStaging.hpp, fed by the caller with frame counts and time; agc_adaptive_staging covers keeping the faster mode, frame noise, the back-off cap, a scene change and the share threshold. AI-assisted. Tested by me on my own machine.