diff options
author | Zack Rusin <zackr@vmware.com> | 2013-02-14 20:39:36 -0800 |
---|---|---|
committer | Andreas Boll <andreas.boll.dev@gmail.com> | 2013-02-21 09:27:39 +0100 |
commit | f84fe6aa2eac6984b77ca6da0c7e5a571b425827 (patch) | |
tree | a67ee1c0c5abcf09ab9bebd20357b96d8e0dfe5c | |
parent | be7048477a2989bd11ab590c65ea1515f764a86c (diff) |
DRI2: Don't disable GLX_INTEL_swap_event unconditionally
GLX_INTEL_swap_event is broken on the server side, where it's
currently unconditionally enabled. This completely breaks
systems running on drivers which don't support that extension.
There's no way to test for its presence on this side, so instead
of disabling it uncondtionally, just disable it for drivers
which are known to not support it. It makes sense because
most drivers do support it right now.
We'll be able to remove this once Xserver properly advertises
GLX_INTEL_swap_event.
Note: This is a candidate for stable branch branches.
Signed-off-by: Zack Rusin <zackr@vmware.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60052
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit 076403c30d9f5cc79374e30d9f6007b08a63bf2d)
-rw-r--r-- | src/glx/dri2_glx.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c index b8a007c08e..87e42b7a39 100644 --- a/src/glx/dri2_glx.c +++ b/src/glx/dri2_glx.c @@ -951,7 +951,8 @@ static const struct glx_context_vtable dri2_context_vtable = { }; static void -dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions) +dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions, + const char *driverName) { int i; @@ -960,7 +961,15 @@ dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions) __glXEnableDirectExtension(&psc->base, "GLX_MESA_swap_control"); __glXEnableDirectExtension(&psc->base, "GLX_SGI_make_current_read"); - if (psc->dri2->base.version >= 4) { + /* + * GLX_INTEL_swap_event is broken on the server side, where it's + * currently unconditionally enabled. This completely breaks + * systems running on drivers which don't support that extension. + * There's no way to test for its presence on this side, so instead + * of disabling it uncondtionally, just disable it for drivers + * which are known to not support it. + */ + if (strcmp(driverName, "vmwgfx") != 0) { __glXEnableDirectExtension(&psc->base, "GLX_INTEL_swap_event"); } @@ -1105,7 +1114,7 @@ dri2CreateScreen(int screen, struct glx_display * priv) } extensions = psc->core->getExtensions(psc->driScreen); - dri2BindExtensions(psc, extensions); + dri2BindExtensions(psc, extensions, driverName); configs = driConvertConfigs(psc->core, psc->base.configs, driver_configs); visuals = driConvertConfigs(psc->core, psc->base.visuals, driver_configs); |