dri3: Wait for all pending swapbuffers to be scheduled before touching the front