Commit 62fcd364 authored by Adel Gadllah's avatar Adel Gadllah Committed by Keith Packard
Browse files

dri2: Set vdpau driver name if ddx does not provide any driver name



Currently when the ddx does not set any driver name we set DRI2 driver but
not the VDPAU driver name. The result is that VDPAU drivers will not get found
by libvdpau when the modesetting driver is being used.

Just assume that the VDPAU driver matches the DRI2 driver name, this is true
for nouveau, r300, r600 and radeonsi i.e all VDPAU drivers currently supported
by mesa.
Signed-off-by: default avatarAdel Gadllah <adel.gadllah@gmail.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: Alan Coopersmith's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent fe4c774c
......@@ -1576,15 +1576,15 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info)
if (info->version == 3 || info->numDrivers == 0) {
/* Driver too old: use the old-style driverName field */
ds->numDrivers = 1;
ds->driverNames = malloc(sizeof(*ds->driverNames));
ds->numDrivers = info->driverName ? 1 : 2;
ds->driverNames = malloc(ds->numDrivers * sizeof(*ds->driverNames));
if (!ds->driverNames)
goto err_out;
if (info->driverName) {
ds->driverNames[0] = info->driverName;
} else {
ds->driverNames[0] = dri2_probe_driver_name(pScreen, info);
ds->driverNames[0] = ds->driverNames[1] = dri2_probe_driver_name(pScreen, info);
if (!ds->driverNames[0])
return FALSE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment