Skip to content

Commit

Permalink
Fix find GPU driver dll path in windows (#5141)
Browse files Browse the repository at this point in the history
  • Loading branch information
whyb committed Nov 10, 2023
1 parent b4f2623 commit 2ecaf37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/developer-guide/vulkan-driver-loader.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/simplevk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 2ecaf37

Please sign in to comment.