mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 15:00:30 +02:00
Each thread used to own a band of the screen, fixed when the work was first split, and got its own copies of the primitives touching it. Bands were rarely balanced (edge bands had half the work of middle ones, and on big.LITTLE CPUs half the threads are slower), and primitives queued up to the 2048 limit before the threads started. Now primitives go to 64x16 tiles, as indices into the shared queue, in batches of 16. A thread takes any tile with work and draws its items in order; only one thread holds a tile at a time, so per-pixel order is kept. A flush or a full queue has the main thread draw tiles too instead of waiting, and when there's only a little work it does that alone rather than wake the threads. Items are reclaimed once every tile has drawn them. This also drops the per-thread queues, up to 23 MB. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
To get to 100% compatibility, we will need a software renderer as there are games out there that do tricks that can't really be faked in a sensible way. Useful for homebrew too that mix sw and accel rendering.