perf(agc): pool device staging buffers by size class #1004
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1004"
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 Celegans12 on 2026-10-06T22:52:27Z.
What
The device-local tier of
BufferPoolonly reused a buffer of the exact same size and usage. Partial storage-image detiles and retiles ask for a new size and the other transfer direction almost every time, so in PPSA26344 the tier sits at its 512 MiB budget and misses and evicts ~77 buffers per frame. The release thread then spends ~38 ms per frame invkFreeMemory, which on NVIDIA also holds upvkQueueSubmit(mean ~0.7 ms).STORAGE | TRANSFER_SRC | TRANSFER_DSTadded (BufferPool::Usage), so uploads, write-backs and staging shadows share a list;SHADER_DEVICE_ADDRESSandINDIRECTrequests keep their own.Takeserves a request from the smallest retained buffer of its class up to twice its size; the buffer returns to its own class. Callers bind and copy explicit sizes, as with the small classes.APS5_NO_BUFFER_CLASSES=1still matches exact sizes.Resources.cppconflict is textual, so whichever lands second needs a small rebase.Tested
mainab9437e3: configure-DBUILD_TESTING=ON, full build,--target libs,ctest:ctest --output-on-failure)VK_DRIVER_FILES): 367/367 pass;agc_driver_flat_storeis left out there because it takes several minutes on Windows llvmpipeagc_buffer_pool(mock device): size classes, shared directions, the 2x fit, reuse only after release, budget. Fails on main.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 (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-07T00:03:29Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Graphics/include/BufferPool.hppL93-94core/libs/prx/libSceAgcDriver/Graphics/src/BufferPool.cppL58