Monday, January 7, 2013

Re: [android-developers] OpenGL ES 2.0 glDrawElements() context switches for long time

Hi Adam,

This is typically the kind of performance issue that is best diagnosed with systrace instead of traceview. Traceview shows your process is busy waiting on something else and systrace should be able to show what.


On Sun, Jan 6, 2013 at 1:31 PM, Adam Metcalf <gambloren@gmail.com> wrote:
I have been trying to diagnose a framerate issue in my game engine. I recently switched from GL ES 1.1 to 2.0. In the attached images, Thread is the game logic thread and GLThread is the glSurfaceView's Renderer thread.

On my Nexus S (ICS 4.0.4), ICS.png, everything works fine except sometimes eglSwapBuffers takes > 16 ms at the start, sometimes 40ms it eventually settles but is still 17ms.

On my Galaxy Nexus (JB 4.1.2), JellyBean.png, the eglSwapBuffers call is short but a call made in the rendering thread context switches for about 17-20ms every frame. I have been trying to figure out why for a while now.

Now as I understand, JellyBean added a bunch of vsync code for project butter. Also the Galaxy Nexus has a multicore processor, so things are different. I am wondering why my call is being delayed what seems like a frame length? Is this due to project butter? How I can prevent this from happening?

Extra notes about the glDrawElements call:
Is usually 48-70 indices, not in a glBuffer
Most basic texture fragment shader.
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
Is fine on the Nexus S.

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en



--
Romain Guy
Android framework engineer
romainguy@android.com

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment