};
static void
-dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions)
+dri2BindExtensions(struct dri2_screen *psc, const __DRIextension **extensions,
+ const char *driverName)
{
int i;
__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");
}
}
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);