Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
beau-lunarg committed Jan 23, 2025
1 parent 5369e65 commit 713e4c5
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/test_apps/common/test_app_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,18 +167,24 @@ class VulkanFunctions
return true;
}
auto library_path = std::getenv("VULKAN_LIBRARY_PATH");
#if defined(__linux__)
if (library_path != nullptr)
{
std::cout << "looking in " << library_path << std::endl;
library = dlopen(library_path, RTLD_NOW | RTLD_LOCAL);
std::cout << "found it? : " << library != nullptr << std::endl;
std::cout << "found it? : " << (library != nullptr) << std::endl;
}
#if defined(__linux__)
if (!library)
library = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL);
if (!library)
library = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
#elif defined(__APPLE__)
if (library_path != nullptr)
{
std::cout << "looking in " << library_path << std::endl;
library = dlopen(library_path, RTLD_NOW | RTLD_LOCAL);
std::cout << "found it? : " << (library != nullptr) << std::endl;
}
std::cout << "looking for apple libvulkan" << std::endl;
if (!library)
library = dlopen("libvulkan.dylib", RTLD_NOW | RTLD_LOCAL);
Expand All @@ -187,6 +193,12 @@ class VulkanFunctions
if (!library)
library = dlopen("libMoltenVK.dylib", RTLD_NOW | RTLD_LOCAL);
#elif defined(_WIN32)
if (library_path != nullptr)
{
std::cout << "looking in " << library_path << std::endl;
library = LoadLibrary(library_path);
std::cout << "found it? : " << (library != nullptr) << std::endl;
}
if (!library)
library = LoadLibrary(TEXT("vulkan-1.dll"));
#else
Expand Down

0 comments on commit 713e4c5

Please sign in to comment.