perf(agc): answer Refresh's registry and host-import lookups from an index and a cache #15674
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15674"
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 oneandonlydean on 2026-11-04T03:15:28Z.
What
Carries #7514 by @AlxcBTW, with credit: the branch keeps their seven commits with their authorship, followed by merges of current
main. The original is on a fork that is now archived, so it cannot take pushes; it also conflicts with currentmain.StorageTexture::Refreshruns for every storage image a dispatch or draw reads or writes and looks up the same facts each time: which images pending in the same memory overlap it, which pending image sits at its address, and which host import holds its range. Three exact changes (the same answers, only cheaper to get), all turned off together byAPS5_NO_REFRESH_LOOKUP_CACHE=1:RangeIndex(newGraphics/include/RangeIndex.hpp), so overlap and same-address queries are O(log n + k) instead of a scan under the registry mutex.changedlist).StorageTextureremembers the host import its last Refresh lookup returned, with the range, the import table's epoch and an insert count, andHostImportForCachedanswers from it while all three are unchanged and the registry has not moved, with the same last-use stamps as a full hit.Resolution of the merge with
main, for the reviewer: the insert counter ismain'sHostImports::inserted(bumped only when an import is actually added, at the one insert site), which the lookup cache compares, instead of the original's own counter;GuestBufferMemory.hpp,Texture.hpp(UnitFlags borrowedUnitsnext toimportLookup),HostImportRetireHold.cppandENVIRONMENT.mdkeep both sides; the test registrations live intests/cmake/agc_range_index_tests.cmake.Tested
agc_range_index,agc_host_import_retire,agc_host_import_retirement. The branch merges cleanly withmain04a9eb4fa2. Not run: Windows, macOS, the full suite, any GPU or game qualification.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryPull request closed