- April 20, 2014 at 4:50 am #31677
you know the memory is used almost doubled. Because of the metadata!
I tested Xcode5,iOS 6,iPhonn4s. Opengles2
I’m working on the optimization of our game(launching soon).
I used pvr format(ARGB8888) in my game UI.
pvr format(ARGB8888) has Meta data always 15byte by PVRTexTool
in PVRTTextureLoadFromPointer API.
for (PVRTuint32 uiFace=0; uiFace
uiMipLevel == 0 about 4MB Increase in memory usage.
uiMIPLevel == 1 about 5MB Increase in memory usage.
uiMIPLevel == 2 about 1MB Increase in memory usage.
so totally about 10MB Increase in memory usage per 1024×1024(ARGB8888)
The solution is Edit->Align texture data->Align 4byte boundary by PVRTexTool. (if you did, totally about 5.6MB Increase in memory usage )
I solved the batch execution too many textures .(make an utility)
Most of metadata size is not aligned 4byte.
This happens to be in any format.(pvrtc,pvrtcII,rgbxxxx,etc..)
Most people do not know will be used.
so metadata default size must be aligne 4 or 8byte.
Thanks Regards,April 22, 2014 at 11:00 am #38648
When you say there’s an increase in memory usage – are you referring to a temporary cost of moving data around when the MIP-Map levels aren’t aligned? This is going to happen with NPOT textures as well, so the Meta Data alignment won’t solve it for everyone.
FYI, the 15bytes of meta data are from the axis alignment of the texture. If you uncheck “vertical flip” when compressing your texture (and there’s not already meta data in the image) then no meta data will be added. That option adds the meta data to indicate that it should be effectively displayed upside-down.
We’re working on a new version of the SDK tools as well – this will solve the issue by allocating the texture memory into a separate buffer to the meta data, allowing alignment to occur naturally.