compositor: Add support for GL_EXT_x11_sync_object

If GL advertises this extension we'll use it to synchronize X with GL
rendering instead of relying on the XSync() behavior with open source
drivers.

Some driver bugs were uncovered while working on this so if we have
had to reboot the ring a few times, something is probably wrong and
we're likely to just make things worse by continuing to try.  Let's
err on the side of caution, disable ourselves and fallback to the
XSync() path in the compositor.

https://bugzilla.gnome.org/show_bug.cgi?id=728464
This commit is contained in:
Rui Matos
2014-04-18 20:21:20 +02:00
parent 352cac3850
commit 39763d4add
7 changed files with 641 additions and 23 deletions

View File

@ -45,6 +45,7 @@
#include <meta/util.h>
#include "display-private.h"
#include "compositor/compositor-private.h"
#include "compositor/meta-sync-ring.h"
typedef enum {
/* We're a traditional CM running under the host. */
@ -267,6 +268,8 @@ handle_host_xevent (MetaBackend *backend,
MetaCompositor *compositor = display->compositor;
if (meta_plugin_manager_xevent_filter (compositor->plugin_mgr, event))
bypass_clutter = TRUE;
if (compositor->have_x11_sync_object)
meta_sync_ring_handle_event (event);
}
}