Browse Source

Fix find GPU driver dll path in windows (#5141)

tags/20240102
張小凡 GitHub 2 years ago
parent
commit
2ecaf37a3e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions
  1. +2
    -2
      docs/developer-guide/vulkan-driver-loader.md
  2. +2
    -2
      src/simplevk.cpp

+ 2
- 2
docs/developer-guide/vulkan-driver-loader.md View File

@@ -73,12 +73,12 @@ Requires static meltvk driver linking and should always succeed
If failed, it will try to find graphics driver object and load it

#### Windows
search ```C:\Windows\System32\DriverStore\FileRepository``` for
for 64bit applications. search in ```%SystemRoot%\System32\DriverStore\FileRepository```
- nvoglv64.dll
- amdvlk64.dll
- igvk64.dll

for 32bit applications
for 32bit applications. search in ```%SystemRoot%\System32\DriverStore\FileRepository```
- nvoglv32.dll
- amdvlk32.dll
- igvk32.dll


+ 2
- 2
src/simplevk.cpp View File

@@ -554,8 +554,8 @@ int load_vulkan_driver(const char* driver_path)
for (int i = 0; i < well_known_path_count; i++)
{
#if defined _WIN32
// find driver dll in C:\\Windows\\System32\\DriverStore\\FileRepository
std::string dllpath = search_file("C:\\Windows\\System32\\DriverStore\\FileRepository", well_known_path[i]);
// find driver dll in %SystemRoot%\System32\DriverStore\FileRepository (32bit and 64bit both and in here)
std::string dllpath = search_file("%SystemRoot%\\System32\\DriverStore\\FileRepository", well_known_path[i]);
if (dllpath.empty())
continue;



Loading…
Cancel
Save