mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Add a workaround for Mesa Iris returning the wrong VA driver
This commit is contained in:
@@ -139,6 +139,15 @@ VAAPIRenderer::initialize(PDECODER_PARAMETERS params)
|
|||||||
int major, minor;
|
int major, minor;
|
||||||
VAStatus status;
|
VAStatus status;
|
||||||
status = vaInitialize(vaDeviceContext->display, &major, &minor);
|
status = vaInitialize(vaDeviceContext->display, &major, &minor);
|
||||||
|
if (status != VA_STATUS_SUCCESS && qEnvironmentVariableIsEmpty("LIBVA_DRIVER_NAME")) {
|
||||||
|
// The Iris driver in Mesa 20.0 returns a bogus VA driver (iris_drv_video.so)
|
||||||
|
// even though the correct driver is still i965. If we hit this path, we'll
|
||||||
|
// explicitly try i965 to handle this case.
|
||||||
|
vaSetDriverName(vaDeviceContext->display, const_cast<char*>("i965"));
|
||||||
|
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
|
"Attempting fallback to i965 VA driver");
|
||||||
|
status = vaInitialize(vaDeviceContext->display, &major, &minor);
|
||||||
|
}
|
||||||
if (status != VA_STATUS_SUCCESS) {
|
if (status != VA_STATUS_SUCCESS) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"Failed to initialize VAAPI: %d",
|
"Failed to initialize VAAPI: %d",
|
||||||
|
|||||||
Reference in New Issue
Block a user