[RFC] GLX_INTEL_swap_event

Jesse Barnes jbarnes at virtuousgeek.org
Mon Nov 16 09:00:34 PST 2009

Kristian, Chris and I met with some of the Clutter/Mutter developers
last week and came up with a new GLX extension to help GLX integrate
more naturally into glib style event loops:

The basic idea is that glXSwapBuffers should be asynchronous (i.e.
return immediately and swap at some point in the future based on swap
interval settings, busy buffers, etc.).  In order to really take
advantage of this fact though, it helps if clients can perform other
work that won't cause them to block (e.g. rendering to one of the busy
buffers from a previous swap).  Since knowledge of the busy buffers or
which operations might require them may not be present at all levels in
client code, having a notification arrive when swaps complete can
help.  Clients can process non-GL related code until the event arrives,
then start preparing their next frame.

Note that this in no way prevents clients from queuing multiple swaps
(e.g. with triple buffering or N-buffering), it just notifies them when
swaps complete.

The latest implementation bits for this extension are in my personal
repos: glxproto, dri2proto, xserver and mesa.

Is this something people feel is generally useful?

Jesse Barnes, Intel Open Source Technology Center

More information about the xorg-devel mailing list