Mir

Comment 6 for bug 1377872

Revision history for this message
In , Daniel van Vugt (vanvugt) wrote :

In the Mir server code (DRI output) we call:
  1. eglSwapBuffers()
  2. get the new front buffer
  3. schedule a page flip: drmModePageFlip()

This works well, however if I force it to wait for the page flip immediately:
  4. select() on the DRM fd and then drmHandleEvent()
then step 4 (under some rare but predictable rendering loads) takes 32ms to complete.

I've now confirmed it is just the page flip event that takes almost two frames to arrive. And there are two workarounds that seem to successfully kick the driver into action:
  3.5. glFinish()
or
  0. env INTEL_DEBUG=sync
Using either of these workarounds, rendering completes in about 1ms and select then returns the next page flip event (~16ms interval).

So it seems the intel batching logic is deferring rendering way too long, or the page flip event delivery is being deferred. However the two workarounds suggest the former.

Using:
Mesa 10.3.2-0ubuntu1 (Ubuntu 15.04 vivid)
IntelĀ® HD Graphics 4600 (Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz)