Skip to content

Commit

Permalink
x11: don't do DRI3 with Intel drivers
Browse files Browse the repository at this point in the history
Requests for DRI3 have been widely known for over 5 years. DRI3 support
landed in libva nearly one year ago and there is seemingly zero interest
in adding support to the i965 or iHD drivers.

There is MIT licensed code in Mesa to handle all problematic
vaPutSurface path (et al), although even if a random volunteer codes
forward with a MRs those are very unlikely to get merged.

The i965 driver is practically unmaintained at this point, with Intel
refusing to throw the towel (officially at least).

The iHD one is having some changes done, but only a handful of
privileged people within the Intel Org have a _change_ of getting stuff
merged.

It's quite unfortunate, yet here we are.

Signed-off-by: Emil Velikov <[email protected]>
  • Loading branch information
evelikov committed Jul 7, 2023
1 parent 984dfee commit f7101b6
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion va/x11/va_x11.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,27 @@ static VAStatus va_DisplayContextGetDriverNames(
{
VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;

if (!getenv("LIBVA_DRI3_DISABLE"))
if (!getenv("LIBVA_DRI3_DISABLE")) {
unsigned old_num_drivers = *num_drivers;

vaStatus = va_DRI3_GetDriverNames(pDisplayContext, drivers, num_drivers);
/* Intel drivers lack DRI3 support and they seem uninterested in
* adding one - le sigh.
*/
if (vaStatus == VA_STATUS_SUCCESS) {
for (unsigned i = 0; i < *num_drivers; i++) {
if (drivers[i] && (!strcmp(drivers[i], "iHD") ||
!strcmp(drivers[i], "i965")))
vaStatus = VA_STATUS_ERROR_UNKNOWN;
}
if (vaStatus == VA_STATUS_ERROR_UNKNOWN) {
for (unsigned i = 0; i < *num_drivers; i++)
free(drivers[i]);
*num_drivers = old_num_drivers;
}
}
}

if (vaStatus != VA_STATUS_SUCCESS)
vaStatus = va_DRI2_GetDriverNames(pDisplayContext, drivers, num_drivers);
#ifdef HAVE_NVCTRL
Expand Down

0 comments on commit f7101b6

Please sign in to comment.