diff --git a/hw/xfree86/dri2/dri2.c b/hw/xfree86/dri2/dri2.c index b913c2220..18a6fefff 100644 --- a/hw/xfree86/dri2/dri2.c +++ b/hw/xfree86/dri2/dri2.c @@ -1602,9 +1602,16 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) if (info->driverName) { ds->driverNames[0] = info->driverName; } else { + /* FIXME dri2_probe_driver_name() returns a strdup-ed string, + * currently this gets leaked */ ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info); if (!ds->driverNames[0]) return FALSE; + + /* There is no VDPAU driver for i965, fallback to the generic + * OpenGL/VAAPI va_gl backend to emulate VDPAU on i965. */ + if (strcmp(ds->driverNames[0], "i965") == 0) + ds->driverNames[1] = "va_gl"; } } else {