[Mesa-dev] [PATCH] dri2: Insert a synchronisation point for glXWaitX

Eric Anholt eric at anholt.net
Mon Aug 17 15:17:30 PDT 2015


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150817/7a71c08f/attachment.sig>


More information about the mesa-dev mailing list