Skip to content

perf(agc): answer Refresh's registry and host-import lookups from an index and a cache - #7514

Open
AlxcBTW wants to merge 3 commits into
boykopovar:mainfrom
AlxcBTW:pr/refresh-lookups
Open

AlxcBTW wants to merge 3 commits into
boykopovar:mainfrom
AlxcBTW:pr/refresh-lookups

Conversation

@AlxcBTW

@AlxcBTW AlxcBTW commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

What

StorageTexture::Refresh runs for every storage image a dispatch or draw reads or writes, tens of thousands of times per 10 s in a gameplay scene, 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 commits, each on by default and each exact (the same answers, only cheaper to get):

  1. perf(agc): answer Refresh's pending registry queries from an address index. PendingList keeps its images in a RangeIndex (new Graphics/include/RangeIndex.hpp) beside the vector: items keyed by [begin, end), ordered by (begin, registration order), overlap queries in O(log n + k) over an implicit balanced tree that holds the largest end of each subtree (rebuilt in O(n) on the first query after a change). otherPendingOverlaps asks the index for images overlapping the range (any image but this), pendingAlias asks for the images starting at its address. Before, both scanned every pending image under the registry mutex (std::any_of over the vector; the loop of pendingAlias). The index is updated where the vector is (push_back, erase, remove).
  2. perf(agc): skip the per-unit state of a Refresh that finds nothing stamped. A Refresh of an image with block units, unchanged DCC keys and no pending alias, whose surface has no stamp since the image's generation (GuestMemory::UnchangedSince, the test the code already makes), answers "unchanged" whatever the per-unit state says: no unit is changed, nothing is compared, nothing is borrowed. It no longer allocates the per-unit changed list or walks it for pending units. The host-import lookup and everything after the early return stay.
  3. perf(agc): remember the host import a storage image's Refresh found. Each StorageTexture remembers the import its last Refresh lookup returned, with the range, the import table's epoch (bumped whenever an import is dropped or the device changes) and a new insert count (bumped whenever an import is added). HostImportForCached takes the import mutex and does the Windows settle step and the registry staleness check exactly as HostImportFor does, and answers from the remembered import when range, epoch and insert count are unchanged and the registry has not moved since the imports were reconciled, with the same last-use stamps as a full hit (findImport's and the explicit one, 2 per lookup); otherwise it runs the full lookup (now hostImportSettled, the old body of HostImportFor after the settle) and remembers its result. A lookup that finds no import is not remembered.

All three are turned off together by APS5_NO_REFRESH_LOOKUP_CACHE=1 (set at all means off, like the other APS5_NO_* switches); with it set the code paths are the old ones (the index is not even filled). I considered two PRs: the index and the lookup cache touch different data and could stand alone, but they are one topic (Refresh's lookups), share the switch, and the only measurements I have are of the stack that has them together, so one PR with the three commits in the order that each builds and passes alone.

Why the answers are the same:

  • Index. A pending image's range is [descriptor.baseAddress, baseAddress + guestBytes) and both are fixed at construction, so the range an entry is filed under is the range overlaps() tests. RangeIndex::Overlapping visits exactly the entries with address < end && begin < address + bytes (the predicate of StorageTexture::overlaps, zero-length queries return nothing as before), StartingAt visits the entries with that begin in registration order, which is the vector's order for equal begins (an erase and re-push goes behind the others in both). otherPendingOverlaps and pendingAlias only ask for existence or collect candidates in that order, and pendingAlias still filters by size and block units as before. The flushing list is untouched.
  • Quick path. With quick true the code that is skipped only reads and writes changed, which is all false when no unit is stamped, compared and pendingChanged stay false, and the alias branch needs a non-null alias; the unchanged return is the one the old code reaches.
  • Cache. The old lookup, once the registry is not stale, is findImport (the import containing the range, by base) plus a stamp. Imports enter the table in one place (the insert count) and leave it in retireImport, the device reset and the shutdown clear (each bumps the epoch), so with epoch and insert count unchanged and the registry not stale the import found by range is the remembered one, and the stamps make lastUse and useCounter end up as after a full lookup (the eviction rule reads both).

Not covered by this PR: equivalence of the whole Refresh is argued from the code and measured by the lab verify runs below (compare mode that is not in the PR); the title speed gain is not established (below).

Tested

  • Linux (Ubuntu 24.04, Mesa lavapipe), fork CI (the PR head b3120a214 plus the CI scaffolding commit 38f169c31; run 39113200466, test filter ^agc_): 709 of 709 passed, among them agc_range_index (0.51 s) and agc_host_import_retire (0.01 s). Not run on Windows.
  • New tests: agc_range_index (tests/RangeIndex.cpp, new executable): the index against a brute-force list over random registries (four seeds, address spaces from 16 to 2^40 bytes, 3000 to 4000 rounds each of random inserts, removals of a random live entry and inserts at a fixed begin, with four random overlap queries and a start query after every round, and a final drain of all entries); fixed cases for the strict overlap rule at both ends, empty query, zero-length entry, registration order at one begin, a removed entry, a re-registered entry and a query running past the end of the address space. agc_host_import_retire (tests/HostImportRetireHold.cpp) has two new cases: the cached lookup agrees with the full lookup, a repeat hits the remembered import, another range and an empty range are not answered from it, and a cached hit and a full lookup move lastUse by the same amount; and the cache follows the import table: an import added between two lookups (which also moves the registry) leaves the answer equal to the full lookup, a dropped import (the heap grows, the import is replaced by one over both ranges) is not answered from the cache and the cache refills, a cache filled after the drop agrees, and a range outside every registered range answers null and is not remembered. The rewatch of a settled import (Windows only) is not driven by a test; it does not change the import pointer.
  • Windows 11, NVIDIA, Minecraft Dungeons II (PPSA16064). All figures are from lab builds, not from this PR's head against main: the lab stack best10 and its successors, a run of lab changes of which the lab switch APS5_LAB_REFRESH_LEVER is the only difference between the arms. The lab version of the cache is the same as commit 3 here without the switch and without the lab counters; the lab version of the index is commit 1; its quick path is commit 2. Lab arm =1 had in addition an unexact variant, the host-import lookup skipped on the unchanged path (it also skips the last-use stamps), which this PR does not contain. Arm =2 (the cached lookup) contains the index and the quick path as well, so it is this PR; arm =1 is not.

Job 95 (A/B/C, trace-digest figures, no profile counters; a: best10, b: =1 index + quick path + skipped lookup, c: =2 index + quick path + cached lookup, which is this PR; arm order a b c, c b a, b a c; gameplay is a 180 s walk traced from 170 s, title is 200 s traced from 100 s):

row scene arm FPS frame p50 ms frame p99 ms GPU busy per present ms
r3-g-a-1 gameplay a 5.95 175.4 361.0 66.6
r3-g-a-2 gameplay a 1.15 816.7 1833.4 156.0
r3-g-a-3 gameplay a 4.95 199.4 455.6 67.4
r3-g-b-1 gameplay b 6.90 146.4 346.2 62.9
r3-g-b-2 gameplay b 4.70 217.5 300.8 76.5
r3-g-c-1 gameplay c 8.75 111.2 307.8 60.2
r3-g-c-2 gameplay c 5.90 180.5 381.2 64.9
r3-g-c-3 gameplay c 6.15 157.0 247.8 73.7
r3-t-a-1 title a 9.27 106.5 133.8 76.6
r3-t-a-2 title a 8.07 118.0 179.7 77.3
r3-t-b-1 title b 8.62 115.0 134.8 77.0
r3-t-b-2 title b 7.90 114.6 279.8 77.1
r3-t-c-1 title c 8.38 111.8 256.3 77.1
r3-t-c-2 title c 9.78 102.3 114.7 76.6

Row r3-g-a-2 is a world-load crash and retry (FAsyncLoadingThread 0xc0000005, the title's own load-time crash, not this change); one b row ran out of memory (0.45 GiB free, stopped), so b has two gameplay rows. Gameplay means: a 4.02 FPS (5.45 without the crash row), b 5.80, c 6.93. Title means: a 8.67, b 8.26, c 9.08. These were daytime rows: they ended at 0.5 to 6.4 GiB free with 46 to 56 GiB committed and about 35 browser processes open, which is the memory-noisy state this machine produces gameplay figures in (31 GiB), and the spread inside arm a alone is 1.15 to 5.95 FPS. I read them as: c is ahead of a in every gameplay row against a's rows that did not crash, and the title shows no difference (8.38 and 9.78 in c against 9.27 and 8.07 in a); I do not claim a gain from them. There is no clean A/B of this change on its own.

Job 91zz-best12 (best11 against best12, both with APS5_LAB_REFRESH_LEVER=2 and APS5_LAB_DEPTH_CLEAR_HLE=1; it compares two integration stacks and is not an A/B of this change, listed because the lever is on in both arms and its counters are the largest sample of the cached lookup):

row scene arm FPS frame p50 ms frame p99 ms GPU busy per present ms
b12-g-a-1 gameplay best11 7.75 113.4 362.3 53.7
b12-g-a-2 gameplay best11 4.95 200.7 282.0 65.7
b12-g-a-3 gameplay best11 4.85 202.5 257.4 64.9
b12-g-b-1 gameplay best12 8.80 116.0 385.5 51.8
b12-g-b-2 gameplay best12 8.15 119.6 181.0 60.1
b12-g-b-3 gameplay best12 4.60 215.1 296.9 58.7
b12-t-a-1 title best11 8.88 111.9 130.5 71.6
b12-t-a-2 title best11 8.93 111.5 127.2 71.5
b12-t-b-1 title best12 9.20 108.3 126.3 66.2
b12-t-b-2 title best12 9.22 107.9 126.0 66.2

Gameplay rows ended at 4 to 6.5 GiB free (noisy), the title rows at 9.3 GiB free (clean). The difference between the stacks is not this change.

Counters that bear on exactness and on how often each lookup is taken (lab builds, per 10 s, the lab counters are not in the PR):

  • Cached lookup, verify mode verify2 (job 91zz of 17.10, gameplay: each cached answer compared with the full lookup made right after it), last three windows of the row: 131,395 hits and 3,841 misses; 116,834 and 3,725; 122,069 and 4,041; epoch moves seen at a miss 221, 22, 256; verify2 differences 0 (since start), no DISAGREE line, stop reason program-done. Cached mode, title row of the same job: 112,204 hits and 2,641 misses; 111,038 and 2,620; 113,122 and 2,644, no epoch move, 0 differences. In the best12 rows (cached mode only, last window per row): gameplay best11 92,390 hits / 5,037 misses, 108,903 / 4,128, 95,631 / 3,804; best12 180,725 / 7,338, 150,467 / 5,934, 122,903 / 4,141; title 133,818 / 3,178, 134,236 / 4,151, 136,771 / 4,125, 136,252 / 3,464. So 96 to 98 % of the lookups are hits.
  • Index and quick path, verify mode verify (job 91z of 17.10, gameplay: the old scans run beside the index and the quick answer is compared with the full path): "disagreements 0 (since start)" on every one of the 26 windows of the row, for example 117,271 refreshes, 58,310 index queries and 45,056 entries returned in the last 10 s. In on mode of the same stack (arm =1, gameplay rows of job 91z), 9,900 to 28,800 of 66,000 to 180,000 refreshes per 10 s took the quick path, and the index answered 32,000 to 96,700 queries per 10 s returning 0.7 to 1.0 entries on average.

Refresh's cost, from the hold profile (lab build best10 with the profile switch on, so no lever; gameplay row g1 of job 88, summed over every thread and hold site, per 10 s, spans nested inside storage-refresh-self; the profile costs two clock reads per span, so its FPS is not comparable): StorageTexture::Refresh 1,139 ms over 59,137 calls (19.4 us per call) in the earlier profile; the finer one, rf-host-import (the HostImportFor lookup) 519.3 ms over 20,497 calls (25.3 us per call), rf-scan-blocks 154.2 ms, wb-windows 386.6 ms, rf-alias (pendingAlias) 10.3 ms over 20,497 calls (0.5 us), rf-unchanged-tail 10.4 ms over 17,781 calls, refresh-proved 18.2 ms over 32,147 calls, rf-decide-loops 6.6 ms over 20,497 calls, what remains in storage-refresh-self 47.8 ms. The pending-registry scans were cheap to start with (24,000 scans over 2.9 M entries, about 120 per scan). Two things follow, and I want them read as limits of the claim: the span the cache can touch is the biggest one, but the profile does not split it further, and the cached hit still takes the import mutex, so how much of the 25 us is the map descent and how much is waiting for the mutex is not known; and the index and the quick path address spans that were already small (about 10 ms and 7 ms per 10 s). I have no hold profile of a build with the changes, so the reduction of these spans is not measured.

Not measured: Windows CI, other GPUs, other titles, the tests with the switch set (the new tests run with the default, the cache test also compares against the full lookup). The RangeIndex header also has no user besides PendingList.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none (PPSA16064 speed; no Game bring-up discussion yet)
  • GPUs tested: Mesa lavapipe, Ubuntu 24.04 (all GPU tests); NVIDIA GeForce RTX 5070 Laptop GPU, driver 617.42, Windows 11 26200 (game rows only, GPU tests not run there)
  • AI-assisted: yes

…index

pendingAlias and otherPendingOverlaps scanned every pending storage image on each Refresh. PendingList now keeps its images in an address-ordered range index (RangeIndex) beside the vector: the images starting at an address come back in registration order and the images overlapping a range in order of start, in O(log n + k) instead of O(n). The answers are those of the scans (the registry's membership and each image's range are fixed while it is pending); the new test compares overlap and start queries with the linear scan over random registries. APS5_NO_REFRESH_LOOKUP_CACHE=1 scans as before.
…amped

A Refresh of an image with block units, unchanged DCC keys and no pending alias whose surface has no stamp since the image's generation answers unchanged whatever the per-unit state says: no unit is changed, nothing is compared and nothing is borrowed. It no longer builds the per-unit changed list or walks it. APS5_NO_REFRESH_LOOKUP_CACHE=1 builds it as before.
Refresh looks up the host import of the image's range on every call. Each StorageTexture now remembers the import its last lookup returned, with the import table's epoch (bumped when an import is dropped or the device changes) and its insert count. HostImportForCached answers from it, after the same settle and staleness checks and with the same last-use stamps as the full lookup, while the range, the epoch and the insert count are unchanged and the registry has not changed since the imports were reconciled; otherwise it takes the full lookup and remembers its result. A lookup that finds no import is not remembered. APS5_NO_REFRESH_LOOKUP_CACHE=1 takes the full lookup every time.
@github-actions

github-actions Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 862 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1324 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1341 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 1368 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 1395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 2434 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4891 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5021 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5371 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5426 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5431 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5480 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5499 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5609 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 5656 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 5925 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6044 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6108 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6146 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6169 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6182 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6187 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6188 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6192 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6202 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6209 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6218 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6249 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6280 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6300 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6326 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6412 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6451 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6457 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6479 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6481 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6501 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6535 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6539 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6588 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6601 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6606 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6611 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6636 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6646 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6650 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6682 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6683 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6701 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6718 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6730 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6741 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6743 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6747 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6759 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6763 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6772 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6786 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6788 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6808 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6820 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6848 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6856 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6868 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6887 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6905 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6911 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6913 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6914 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6918 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6937 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6941 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6946 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6947 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6948 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6951 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6955 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6959 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6960 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6963 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6965 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6971 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6973 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6977 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6982 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 6987 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6989 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 6995 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7002 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7082 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/HostImportRetireHold.cpp
PR 7085 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7154 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7201 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7223 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7233 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7254 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7256 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7261 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7275 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7292 core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7307 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7310 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7332 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7371 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7395 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7427 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7446 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7457 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7464 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7465 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7466 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7473 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7508 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7533 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7570 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7579 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7604 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7610 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7615 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7618 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7627 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7629 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7642 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7644 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7647 core/libs/prx/libSceAgcDriver/CMakeLists.txt
core/libs/prx/libSceAgcDriver/Graphics/include/GuestBufferMemory.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7677 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7705 core/libs/prx/libSceAgcDriver/CMakeLists.txt
PR 7717 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7757 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7769 core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hpp
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp
PR 7799 core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp

@akkadbakkad89

akkadbakkad89 commented Oct 18, 2026 •

Copy link
Copy Markdown

Windows runs at head b3120a214 (first non-lavapipe datapoint for this head): agc_range_index, agc_host_import_retire, agc_host_import_retirement and agc_driver_graphics all pass - 4/4 on NVIDIA RTX 3070 (driver 617.42) and 4/4 on Intel UHD 630 (ANYPS5_GPU=UHD, igvk64). Windows 11, MinGW (WinLibs GCC 15.2.0), Release.

@LeandroLP23

Copy link
Copy Markdown
Contributor

AMD on Windows: the tests this PR names pass on an RDNA 3.5 GPU.

Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release. main 6efb7261b with this PR (b3120a214) merged, together with #7296, #7446, #7377, #7445, #6708, #6748, #6785, #6706, #6613, #7449, #7391, #7489, #7484. They were built once, so the result is for the combination; each merge was clean.

  • agc_host_import_retire, agc_range_index: pass, 3 runs of 3.
  • Every agc_* test on the combined build: 713 of 716 pass. The 3 that fail, agc_driver_host_import_lifetime, agc_driver_quad_pixel_mask and agc_driver_layered_volume_vertex_no_gpl, fail the same way on unchanged main here, so none comes from these PRs.

AI-assisted

@AlxcBTW

AlxcBTW commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

@akkadbakkad89 @LeandroLP23 thanks for the Windows runs on NVIDIA, Intel and RDNA 3.5. They are the first non-lavapipe data for this head. The speed A/B (this PR against APS5_NO_REFRESH_LOOKUP_CACHE=1 in one build on main) is queued on the lab machine, and I'll post the rows here.

AI-assisted: yes (Claude Code)

@oneandonlydean oneandonlydean self-assigned this Oct 18, 2026
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line unblocks title Names a title ID on the Unblocks line needs rebase Conflicts with main, rebase needed labels Oct 18, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@AlxcBTW #6364 (flush-wait-newer-writers) has merged, and #7514 now conflicts with it in Texture.cpp, in StorageTextureList. Both PRs rewrite the same container:

Both change push_back/erase/remove/MayOverlap and the members, so this needs a design choice rather than a keep-both merge. Could you rebase onto current main and decide how the index and the published snapshot live together? Specifically: does SurelyClear() read the index, or does it still need the snapshot; who bumps the version on each mutation; and do the index and the snapshot stay consistent under the same lock? A short note in the PR on what you chose would help the re-review. Thanks!

@blawesom

Copy link
Copy Markdown
Contributor

Rebase handoff — rebased onto current main (all three commits, authorship unchanged). Two conflicts in Texture.cpp's PendingList: main's changed() bookkeeping kept with your RangeIndex maintenance layered into erase/remove, and your RangeIndex+ranges members. One ENVIRONMENT.md row added for APS5_NO_REFRESH_LOOKUP_CACHE (the conventions check requires it).

Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON, AMD RX 9070 XT / RADV): builds; conventions pass; full suite green apart from the four known main regressions (#5444 Mesa, #7584 BDA, #7766, #7784), none from this PR.

To pick it up:

git fetch https://github.com/blawesom/AnyPS5 rebase/7514
git checkout <your branch>
git merge --ff-only FETCH_HEAD

Head is a72a93f20.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc* build needs rebase Conflicts with main, rebase needed perf numbers missing perf pull request without a before and after summary line perf Performance change unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants