Question

I'm getting some surprising results rendering large model (around 130K verts) on iO6/iPad3.

Here is the background information:

  1. 130k verts, non interleaved (bad I know), in 5 batches drawn with glDrawElements
  2. Verts are position (3 float), normal (3 byte), color (4 byte), in GL_STATIC_DRAW VBOs.
  3. Vertex state is set with a VAO at beginning of frame.
  4. glClear is called at beginning of frame.
  5. App is using a GLKViewController to handle GL framework.

Result, Xcode profile view reports:

  1. About 3 fps.
  2. GPU utilization is around 7%. Tiler is at 2%, Renderer is at 5%.
  3. CPU time is 360 ms per frame, GPU is 25. Youch!

Further profiling with instruments reports a internal GL function called glRunVertexSubmitARM (called from glDrawElements) to be taking most time. What's going on here? Is my input data so bad that GL is spending time every frame munging it into a nice format?

Was it helpful?

Solution

That's exactly what is happening. Make sure that all vertex attributes start on 4 byte boundaries (add a padding byte to your normals).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top