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:13:45 +0100
commite947c713a541086f80a308d22774229f0720196a (patch)
treec0687f530ed45bcf1432b734358955f5d9064804
parent2701b93f159bf2d3387cedf2d06fe921ad5641f3 (diff)
downloadcogl-e947c713a541086f80a308d22774229f0720196a.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>
-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 3bf4bbe7..ff9b1fd7 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -436,6 +436,9 @@ update_winsys_features (CoglContext *context, CoglError **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)