The PSP hardware seems to make very strange mipmap selections; in fact, it seems to depend on the orientation of the texture. Has anyone else seen this?
I have a simple demo which draws a ground plane which spins around. From some viewpoints, the mipmap selection is as you'd expect (using levels 2-6), but as it turns it ends up using levels 0-2 for the whole plane. Not only does this mean that the appearance changes as the camera turns, but there's a large, obvious framerate slowdown.
I'm not swizzling my textures, which will be the next thing to try; maybe the PSP's mipmap selection depends on the stride through texture memory.
But I'm really wondering if this has to do with the other mipmap LOD-looking registers, like bits 8-15 in TexMode (#194) or the texture slope register. Has anyone experimented with these?
I've put my test program up at http://www.goop.org/psp/gl/mipmap-test.zip so you can see what I'm talking about (don't worry about the stripes in the sky; I think that's just an incorrect max-mipmap level for that texture). Circle pauses, triangle turns of mipmaps, X exits.
Strange Mipmap selection
Weird, I'll have to try this later.
Swizzling shouldn't affect mipmap selection, but WILL give you a big speedup.
Swizzling shouldn't affect mipmap selection, but WILL give you a big speedup.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
Yeah, swizzling makes no difference to mipmap selection, though it does remove the variable speed.
I tried playing with the texmode bits 8-15, and the texture slope, but I didn't see any obvious effect - certainly no improvement.
I just noticed the texture level bias setting; I'll give it a tweak, though I don't think it should have any effect.
The range of angles which cause the problem seem quite narrow (~10 deg?). I wonder if its just a hardware bug?
I tried playing with the texmode bits 8-15, and the texture slope, but I didn't see any obvious effect - certainly no improvement.
I just noticed the texture level bias setting; I'll give it a tweak, though I don't think it should have any effect.
The range of angles which cause the problem seem quite narrow (~10 deg?). I wonder if its just a hardware bug?
Yep, looks like a hardware bug, and similar to what can happen in burnout.
http://www.dtek.chalmers.se/~tronic/PSPTexTool.zip Free texture converter for PSP with source. More to come.
-
- Posts: 8
- Joined: Wed Mar 29, 2006 1:22 pm
I think it is a hardware bug, simply because I can't think of any good reason for it to behave in the way it does. If it hits some games and not others, take that to mean that it happens with some combinations of state and not others. I haven't managed to find a way to avoid the problem.
It's possible that developers are working around it by using manual texture LOD rather than automatic. I haven't tried that yet.
It's possible that developers are working around it by using manual texture LOD rather than automatic. I haven't tried that yet.