Skip to content

Commit afda003

Browse files
committed
va: Attempt to load driver name as path as fallback
This fixes loading of the registry driver full path for a given adapter/device by LUID. This now allows LIBVA_DRIVER_NAME pointing to a path (any LoadLibrary allowed path string) No changes to existing loading mechanisms, which will still work the same, just extending new functionality when the existing ones fail. Signed-off-by: Sil Vilerino <sivileri@microsoft.com>
1 parent 19481b9 commit afda003

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

va/va.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -721,6 +721,10 @@ static VAStatus va_new_opendriver(VADisplay dpy)
721721
}
722722

723723
vaStatus = va_openDriver(dpy, drivers[i]);
724+
/* Try as path as fallback */
725+
if (vaStatus != VA_STATUS_SUCCESS)
726+
vaStatus = va_openDriverFromPath(dpy, drivers[i]);
727+
724728
va_infoMessage(dpy, "va_openDriver() returns %d\n", vaStatus);
725729

726730
if (vaStatus == VA_STATUS_SUCCESS)

0 commit comments

Comments
 (0)