Try radeonsi if other VAAPI drivers fail

This commit is contained in:
Cameron Gutman
2020-04-26 20:18:46 -07:00
parent 7cf2a55b43
commit 55e3e16860

View File

@@ -230,6 +230,18 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
}
}
if (status != VA_STATUS_SUCCESS) {
// The RadeonSI driver is compatible with XWayland but can't be detected by libva
// so try it too if all else fails.
qputenv("LIBVA_DRIVER_NAME", "radeonsi");
status = vaInitialize(vaDeviceContext->display, &major, &minor);
if (status == VA_STATUS_SUCCESS && !validateDriver(vaDeviceContext->display)) {
vaTerminate(vaDeviceContext->display);
vaDeviceContext->display = openDisplay(params->window);
status = VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
}
}
if (status != VA_STATUS_SUCCESS) {
// Unset LIBVA_DRIVER_NAME if none of the drivers we tried worked. This ensures
// we will get a fresh start using the default driver selection behavior after