Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to optimize the memory usage of our iOS game and I'm puzzled about when/why the iOS GLES driver allocates extra memory at runtime... When I run our game through Instruments with the OpenGL ES Driver instrument the gartUsedBytes value can fluctuate quite wildly. We preload all our textures and build the buffer objects up front, so it's not the game engine requesting extra memory from GL.

Currently we are manually requesting around 50MB of GL memory, yet the gartUsedBytes value sits at around 90MB most of the time, peaking at 125MB from time to time. It seems to be linked to what you are rendering that frame - our PVS only submits VBO's for visible meshes.

Can anyone shed some light on what the driver is doing in the background ? Like I said earlier, all our game engine allocations are done on level load, so in theory there shouldn't be any fluctuation on GL memory usage while the level is running.

Thanks.

share|improve this question

1 Answer 1

and welcome to the world of "binned", "tiled", or "scene capture" rendering.

The screen on most mobile devices (Adreno, PowerVR, Mali at least) is split into smaller tiles, and when you render something, the driver actually records your rendering commands, and when it has no other option, it starts rendering.

Then it re-plays those commands from said buffers for each tile.

That's a bit trivial way of explaining what's going on, but the details don't really matter.

Oddly enough, this is more efficient in both rendering performance and power use than rendering directly to a large framebuffer - you can have a small amount of very, very, VERY fast memory which contains one tile.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.