Comment 1 for bug 1573014

Revision history for this message
Kevin DuBois (kdub) wrote : Re: corrpution in software clients on some platforms

Problem is turning out to be a bit of bear...

The corruption is due to releasing a buffer that's being used as a texture in the server's GL render loop. Unfortunately though, the egl sync extensions that we need to get this right don't appear to working properly on mali.

The installation of sync points on mali can be very non-performant, taking between 500us-1ms per fence install (see lp: 1563287).
This can be worked around by installing post-eglSwapBuffers (this is the path surfaceflinger takes). This limits install time to a reasonable 50-80us.

With this worked around, the sync points still appear to be broken somehow, as waiting on the sync point (even after glFlush and eglSwapBuffers) is seemingly triggered by the hwc commit, delaying by many ms (which is incorrect, the fence should clear very shortly after issuing the gpu commands)

I've experimented with shifting the synchronization from the compositor loop as it sends back the buffers, to the client when it tries to access the buffers. This though still seems to have the fences tied to the post/vsync event though, so it degrades our swapinterval-0 performance unacceptably.