diff --git a/test/test_apps/common/test_app_base.cpp b/test/test_apps/common/test_app_base.cpp index 9db8775432..328e17a66c 100644 --- a/test/test_apps/common/test_app_base.cpp +++ b/test/test_apps/common/test_app_base.cpp @@ -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); @@ -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