fix(agc): the stage-A fast path leaves a view of a pending image whose keys were filled to the full lookup #249
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/249"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MichonGoddijn231849 on 2026-10-01T19:12:57Z.
What
#163's per-read DCC model: after a uniform key fill with a clear code, a sampled read through the surface's keys reads the clear value instead of the image's pending results (
cachedTexture,clearThroughKeys). The stage-A fast path (fastTexture) skipped that check. It returned the record's view of the pending image whenever the scanned keys matched the entry's, so a sampled read between the fill and the image's next refresh read the previous results.The fast path now leaves such a view to the full lookup: when the record's source image has keys filled with a clear code and the read goes through keys (
dccAddress != 0). The full lookup then binds the clear or takes its other branches as before. Once the image is refreshed (uploadresetsfilledKeys), the fast path applies again.GTA V clears its 1280×720 bloom buffer every frame by filling its DCC keys (code 0000). Its composite then samples the buffer through the fast path before the buffer's next refresh, so each frame added onto the last one:
Until now, GTA needed
APS5_KEYS_FILL_CLEAR=1to avoid this.Tested
Windows 11 Pro, AMD Ryzen 5 7600, NVIDIA GeForce RTX 5080 (driver 32.0.16.1074), 32 GB DDR5-5600, MinGW-w64 GCC 15.2.0.
APS5_KEYS_FILL_CLEAR. I read the scene luminance (the 1×1 R32F the auto-exposure averages into) back from its GPU image every frame:APS5_KEYS_FILL_CLEAR=1.ctest: all tests pass.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository🤖 Generated with Claude Code