perf(agc): build the color target swizzle tables once per element size #404
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/404"
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-02T19:27:47Z.
What
ColorTargetLayout's constructor built the SW_64KB_R_X swizzle tables (xOffsets,yOffsets) every time: two vectors filled through a 16-bit parity loop per element. Every draw builds a layout for each color target, while decoding the state and again while setting the target up.std::call_once, and the layout points into them.If #377 merges first, its SW_4KB_S tables can be cached the same way, with a second table set per element size.
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.
main.ctest: all tests pass, including the color target layout tests.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🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-03T06:28:28Z.
+1. My integration branch has carried an equivalent change. In PPSA21564 the ColorTargetLayout constructor rebuilt the SW_64KB_R_X tables twice per draw, which took 2 to 3.7% of the GPU worker thread's time.