Skip to content

Commit 1b43b18

Browse files
evelikov-workevelikov
authored andcommitted
x11: use LIBVA_DRI3_DISABLE in GetNumCandidates
As reported by @zhmars, we need to check the override in both code paths. That's because we get only one candidate, while for Intel GPUs we have 2 drivers - so this might work when the user needs iHD, but will fail if they rely on the older driver. Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
1 parent 29ac033 commit 1b43b18

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

va/x11/va_x11.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,10 @@ static VAStatus va_DisplayContextGetNumCandidates(
195195
int *num_candidates
196196
)
197197
{
198-
VAStatus vaStatus;
198+
VAStatus vaStatus = VA_STATUS_ERROR_UNKNOWN;
199199

200-
vaStatus = va_DRI3_GetNumCandidates(pDisplayContext, num_candidates);
200+
if (!getenv("LIBVA_DRI3_DISABLE"))
201+
vaStatus = va_DRI3_GetNumCandidates(pDisplayContext, num_candidates);
201202
if (vaStatus != VA_STATUS_SUCCESS)
202203
vaStatus = va_DRI2_GetNumCandidates(pDisplayContext, num_candidates);
203204

0 commit comments

Comments
 (0)