[Mesa-dev] [PATCH] dri2: Insert a synchronisation point for glXWaitX
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 3 08:40:20 UTC 2016
On Mon, Aug 17, 2015 at 03:17:30PM -0700, Eric Anholt wrote:
> Chris Wilson <chris at chris-wilson.co.uk> writes:
>
> > "X rendering calls made prior to glXWaitX are guaranteed to be
> > executed before GL rendering calls made after glXWaitX."
> >
> > The goal is to implement that without adding a round-trip to the
> > Xserver. Adding one using XSync() is easy, but we can piggy-back
> > another, the DRI2GetBuffers request made to update the render buffers
> > before the next rendering (thus satisfying the condition of flushing all
> > X operations before the next GL rendering). To this end we can just flag
> > the DRI2 buffers as invalid, and the driver will refresh them in due
> > course. If the DRI2 buffers are, or will be, invalid due to damage from
> > X or through a SwapBuffers call, we will not have to add another
> > roundtrip as the single DRI2GetBuffers will refresh over multiple
> > invalidates.
> >
> > This should fix the historic issue that glXWaitX() has been unreliable,
> > but has recently found itself a new trigger will the removal of
> > unnecessary glViewport calls:
>
> I think XSync makes more sense. It's cheaper, and it does exactly what
> you're supposed to do at this point -- make sure that all your X
> requests have been processed, so that any GL batchbuffer flushes happen
> after that.
Considering the issue that Michel raise, XSync is not cheaper than a
known flush point.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the mesa-dev
mailing list