hrydgard/ppsspp — pull request #1277 by unknownbrackets (2013-04-14 03:14:32+00:00)
Title: More optimizations to texture loading (swizzled)

Includes #1276, because it's based upon those changes. However, texture unswizzling makes my brain melt a little bit, so I'm far less sure about this change. It may be better to merge it after 0.7.5, although it seems to work fine so far.

This also changes the rowWidth == 1 case, because there was a comment `// This looks wrong, shouldn't it be & 0xFF (that is no mask at all?)`, which I heartily agree with (and it wasn't even increasing addr, so there's no way it could've been working I think.) JPCSP agrees with the updated code as well.

More ideally it would unswizzle and handle clut simultaneously. That gets a bit messy, though, so I backtracked and just did this.

Performance won't be as good if unswizzled textures aren't multiples of 1024 bytes, but that seems generally unlikely, Adventures To Go for example only had textures that were multiples of 1024.

I had some trouble measuring this one accurately (the game I had that popped it up on a profile cleanly, Adventures To Go, just isn't a high-action game, so it heavily depended on timing and what I did, which was different each time...) but overall every test run spends a lower % of time by a good bit in SetTexture.

-[Unknown]