summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2012-09-27 14:12:08 +0100
committerNeil Roberts <neil@linux.intel.com>2012-09-28 17:15:11 +0100
commitf9e7f8df94bb8ff6bd96207fc7cffe8fdee20ea1 (patch)
treef8f2e976d24a935a2061ec2500db3bb1a569e1bb
parentcfdc1c95eb92c5c0c280457d0df376a051fbe8b1 (diff)
downloadcogl-f9e7f8df94bb8ff6bd96207fc7cffe8fdee20ea1.tar.gz
winsys-glx: Remove the vblank counter feature when indirect rendering
Previously when Cogl detects that the GLX context is indirect it resets the function pointers for the VBLANK_COUNTER feature to NULL. However it wasn't removing the VBLANK_COUNTER feature flag. Some other parts of the winsys check for that feature flag rather than checking whether the pointer is NULL so it would end up calling an invalid function pointer and crashing. This just fixes it to also clear the feature flag. https://bugzilla.gnome.org/show_bug.cgi?id=684917 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit e947c713a541086f80a308d22774229f0720196a)
-rw-r--r--cogl/winsys/cogl-winsys-glx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 8fc9b710..839464f5 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -437,6 +437,9 @@ update_winsys_features (CoglContext *context, GError **error)
{
glx_renderer->pf_glXGetVideoSync = NULL;
glx_renderer->pf_glXWaitVideoSync = NULL;
+ COGL_FLAGS_SET (context->winsys_features,
+ COGL_WINSYS_FEATURE_VBLANK_COUNTER,
+ FALSE);
}
if (glx_renderer->pf_glXWaitVideoSync)