aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2013-01-24 17:48:12 -0800
committerAndreas Boll <andreas.boll.dev@gmail.com>2013-02-13 18:46:39 +0100
commit63f858943084b5cbeb20cce96ccae3c25e633663 (patch)
treee45485d6a5ae2dc0260e2b12140f8a549bd06f34
parent1151cdfa9eede5f8b69865d5764b5aa3eb3f1cf7 (diff)
downloadmesa3d-63f858943084b5cbeb20cce96ccae3c25e633663.tar.gz
glx: only advertise GLX_INTEL_swap_event if it's supported
Only drivers supporting DRI2 version >=4 support GLX_INTEL_swap_event. So lets mark it as such otherwise applications which use this extension (i.e. everything based on Clutter, e.g. gnome-shell) break horribly on drivers supporting DRI2 versions only up to 3. Note: This is a candidate for the 9.0 branch. Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit dbb2d192de33064ae6cdb799d71c5ac89a6ea8ff)
-rw-r--r--src/glx/dri2_glx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 15f590e7877..b8a007c08e8 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -960,8 +960,9 @@ dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions)
__glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control");
__glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read");
- /* FIXME: if DRI2 version supports it... */
- __glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event");
+ if (psc->dri2->base.version >= 4) {
+ __glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event");
+ }
if (psc->dri2->base.version >= 3) {
const unsigned mask = psc->dri2->getAPIMask(psc->driScreen);