mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-14 15:00:30 +02:00
Each queued primitive adds its vertex flags (alpha, fog, colors) to its state, and states are optimized for those flags before their items are distributed. A state can still gain primitives after some of its items are in tiles. Re-optimizing it then changed its pixel and sampler functions and IDs while threads drew with them. With the x86 pixel JIT, the span function could turn null between checking and calling it, as in Coded Arms' frame dump. God of War hit this about four times a frame. Now a state is live once any of its items is in a tile, until the tiles are drawn and reset, and a live state isn't changed. A primitive that would change a live state's flags starts a new, unoptimized state from the same registers instead, optimized for its own primitives only. 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.