feat(agc): count which key component differs on resource-content cache misses #5408
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5408"
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 AlxcBTW on 2026-10-13T19:05:19Z.
What
APS5_TRACE_RESOURCE_KEY_MISSES=1reports why a resource-content cache lookup missed, not just that it missed. On each miss, the new key is compared word by word with the last key of the same shader set. Each differing word is attributed to the component it belongs to:Every 10 s it prints one line per draw/dispatch:
It also prints up to 256 per-miss lines, at most 4 per shader set, naming the components that changed.
This complements #5364, which traces draw-key misses. This PR covers the resource-content key, which is the one that decides whether a draw or dispatch re-records its descriptor contents. For #5345 the question is which part of that key changes from frame to frame: a buffer base address (word 0), a size or stride (word 2), or the layout itself. That decides whether masking a component in the key is worth trying. Off by default; no behaviour change without the variable.
Tested
tests/KeyMiss.cpp:Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-14T11:47:37Z.
Checked on Linux (GCC/Ninja, PR merged onto main):
agc_driver_key_misspasses and does not build without the change. The component labelling matches theContentKeylayout for dispatch and draw keys, and with the variable unset nothing changes. The two other failures in the libSceAgcDriver ctest scope (agc_recorder_kept_bytes,agc_driver_tessellation) also fail on clean main. Merging once the full Build is green.