intel: Use the new DRI2 flush invalidate entrypoint to signal frame done.

Previously for frame throttling we would wait on the first batch after
a swap before emitting another swap, because we had no hook after a
swap was emitted.  This meant that if an app managed to squeeze
everything it for a frame had into one batch, it would lock-step with
the GPU.  With the swapbuffers changes, we now have the entrypoint we
want.

This takes the WoW intro screen from 25% GPU idle and visibly jerky to
4-5% GPU idle and rather smooth.  Other apps such as OpenArena have
run into this problem as well.
2 files changed