perf(agc): keep the buffer pool's free slots by key and retain 4096 #401
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/401"
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-02T18:36:07Z.
What
BufferPool::Takescanned every retained slot of its tier for one with the same size, usage and memory properties. That kept the slot bound at 512 per tier.vkAllocateMemory/vkFreeMemorypairs per second, all on the submission thread.NtGdiDdDDICreateAllocation,DestroyAllocation2andMapGpuVirtualAddress.Takepops the newest slot of its key. Eviction takes the oldest front among the lists, so the least-recently-used order is unchanged.maxMemoryAllocationCountso the three tiers keep half of it free on drivers with a low limit.APS5_BUFFER_POOL_SLOTSstill overrides it. The byte budgets are unchanged.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_PROFILE_DRAW=1:main,APS5_BUFFER_POOL_SLOTS=512): 2.2 fps. The small tier missed about 58,700 times per 10 s, andGraphics::Drawtook 252 µs per draw packet.Graphics::Drawtook 67 µs per draw packet.main.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 repositoryBufferPool::Trim, which walks the free slots; whichever of the two merges second needs that loop adapted to the per-key lists.🤖 Generated with Claude Code