Where and how are textures saved?

Started by
0 comments, last by Ohforf sake 9 years, 8 months ago

Hi,

I am using OpenGL (ES) 4.X (3.X) and the Android OS.

Something I never understood was how textures are exactly saved in the RAM or if they are even saved there.

What really grinds my gears is when I am loading and displaying (stress testing) 256x "1024x1024 ARGB8888" textures on my smartphone gpu (Mali 400).

In theory that should never work because this is 1GB of data... I don't know how much VRAM a Mali-400 GPU has (propably none) but even my SGS3 has only 1GB RAM at all.

Can anyone enlighten me what exactly happens with those textures?

Thanks

Ice

Advertisement
I'm not sure, but can smartphones swap out memory to flash?

In OpenGL, textures are stored in system memory by the driver and optionally in video memory (if it exists). Usually, all textures that you are using should reside in the faster video memory, and usually the driver will see to that if the textures are used. Even when the textures are stored in video memory, some implementations (used to?) keep the copy in system memory in case the OS needs to cannibalize the video memory all of a sudden.
In your case, I could imagine that the driver swaps out some textures to the flash memory as part of the regular swap file/partition and rotates, which ones are in flash and which ones in memory. Can you scale your test from 1 texture to 256 textures and measure the frame times, just to see, if for some amount of textures there is a sudden performance drop?

This topic is closed to new replies.

Advertisement