perf(texture): reuse surface sizes for identical layouts #1294
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1294"
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 TibixDev on 2026-10-07T22:39:09Z.
What
Texture lookups rebuild mip-layout vectors when they only need a surface size. Cache the size in 128 entries per thread, keyed by all seven layout fields. Full key checks prevent collisions from returning the wrong size.
Tested
Fedora 44, Release:
agc_driver_graphicspasses. The added test compares 4,096 layouts withDescribeSurface, including rejected layouts, cache replacement, and changed view fields.Earlier paired tests on the combined fork reduced CPU time from 9.89–10.00 to 9.50–9.55 µs per draw with eight textures. Total draw time was unchanged.
Checklist
main; no duplicate open PR.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-08T02:44:47Z.
Closing: the measurement shows total draw time unchanged, and the 0.4 µs per draw comes from a combined fork, not main against main plus this change (#218). If you measure a gain, please comment here with main vs main+this numbers.
Pull request closed