hrydgard/ppsspp — pull request #1767 by unknownbrackets (2013-05-11 23:02:08+00:00)
Title: Load cluts when told to, improve texhash func a bit

So, right after I said I hadn't found a game that the old hash didn't do the job for, I found out Final Fantasy 2 was having issues with it, heh. I tried FletcherHash and CityHash32 (which btw, CityHash32 was faster) and they were both way slower, so I just added an xor step to the current one. It fixes it and doesn't seem to hurt anyone. But maybe we do need a better hash....

Anyway, that game is spending 75% of its time in the texture cache. About 50/50 in texhash and in loading the texture. It only happens when you're near animated water, which they do evil things with like in Popolocrois. Worse, it animates slowly and causes the entire sprite sheet to invalidate or something.

Cranking the decimate frames up to 1200 makes it faster, but that's not a solution so I didn't commit that...

Anyway, I went ahead and also made it load cluts on LOADCLUT. This means it's reusing the clut sometimes (I checked and games do this) on future textures. It might be faster, and it probably matches behavior better as you said (in the case they don't load the clut.)

-[Unknown]