Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

win32/driver loader: Allow backends to load drivers from registry path #715

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Commits on Jun 9, 2023

  1. va: Split va_OpenDriver into separate functions

    No functional changes, just split the actual DLL loading to a new function va_OpenDriverFromPath
    
    Signed-off-by: Sil Vilerino <[email protected]>
    sivileri committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    19481b9 View commit details
    Browse the repository at this point in the history
  2. 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 <[email protected]>
    sivileri committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    afda003 View commit details
    Browse the repository at this point in the history
  3. va/win32: Change default driver name to default driver filename

    As in Win LoadLibrary (aliased to dlopen) supports the file string
    to have multiple semantics. I left only the vaon12_drv_video filename,
    which will first still try to open .\vaon12_drv_video.dll and then
    attempt again using the default Windows library search order.
    
    From the LoadLibrary documentation:
    
    - If no file name extension is specified in the lpFileName parameter,
      the default library extension .dll is appended.
    
    - When no path is specified, the function searches for loaded modules
      whose base name matches the base name of the module to be loaded.
      If the name matches, the load succeeds. Otherwise, the function searches
      for the file. The first directory searched is the directory containing
      the image file used to create the calling process...
    
    Signed-off-by: Sil Vilerino <[email protected]>
    sivileri committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    e63b0ad View commit details
    Browse the repository at this point in the history
  4. va: Attempt to load driver name without appending drv_video as fallback

    This allows LIBVA_DRIVER_NAME pointing to an path string which we want to support.
    
    Signed-off-by: Sil Vilerino <[email protected]>
    sivileri committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    39913d8 View commit details
    Browse the repository at this point in the history