hrydgard/ppsspp — pull request #2992 by unknownbrackets (2013-07-30 07:30:19+00:00)
Title: Detect less direct cases of render to texture

Specifically:
* Detects when render-to-texture is used with a different format (may mean wrong FBO, for now just logs.) This [does in fact happen] (http://report.ppsspp.org/logs/kind/253).
* Detects when render-to-texture uses a subtexture (offset y, as in Sword Art Online.) Just binds the FBO for now, which works in [the only game I've seen this in] (http://report.ppsspp.org/logs/kind/252).
* Detects when render-to-texture uses a CLUT (as in 3rd Birthday.) Just binds the FBO as well, which isn't worse than using garbage ram, and [also seems uncommon] (http://report.ppsspp.org/logs/kind/254).
* Uses the old logic when copy to VRAM is enabled.

AFAICT the perf impact should be minimal due to the bound check, even with a ton of textures.

Practical impact - not complete, but improves the graphical glitches that occur in 3rd Birthday and Sword Art Online without breaking fonts or other graphics. Previous situation was reading garbage as a texture (unless the FBO was flushed), so even if not correct, this shouldn't be any worse.

-[Unknown]