mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Try radeonsi if other VAAPI drivers fail
This commit is contained in:
@@ -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) {
|
if (status != VA_STATUS_SUCCESS) {
|
||||||
// Unset LIBVA_DRIVER_NAME if none of the drivers we tried worked. This ensures
|
// 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
|
// we will get a fresh start using the default driver selection behavior after
|
||||||
|
|||||||
Reference in New Issue
Block a user