Skip to content

Commit

Permalink
update HasVulkanLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
Qining committed Feb 22, 2018
1 parent 92887c6 commit 5ae192f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/cc/armlinux/get_vulkan_proc_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ GetVulkanInstanceProcAddressFunc* GetVulkanInstanceProcAddress = getVulkanInstan
GetVulkanDeviceProcAddressFunc* GetVulkanDeviceProcAddress = getVulkanDeviceProcAddress;
GetVulkanProcAddressFunc* GetVulkanProcAddress = getVulkanProcAddress;
bool HasVulkanLoader() {
return DlLoader::can_load("libvulkan.so");
return DlLoader::can_load("libvulkan.so") || DlLoader::can_load("libvulkan.so.1");
}
} // namespace core
7 changes: 4 additions & 3 deletions core/cc/dl_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ namespace core {
// Utility class for retrieving function pointers from dynamic libraries.
class DlLoader {
public:
// Loads the specified dynamic library.
// If the library cannot be loaded then this is a fatal error.
// For *nix systems, a nullptr can be used to search the application's functions.
// Loads the dynamic library specified by the given name and fallback names
// (if any). Names will be used to try to find the library in order. If the
// library cannot be loaded then this is a fatal error. For *nix systems,
// a nullptr can be used to search the application's functions.
template<typename... ConstCharPtrs>
DlLoader(const char* name, ConstCharPtrs... fallback_names);

Expand Down
2 changes: 1 addition & 1 deletion core/cc/linux/get_vulkan_proc_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ GetVulkanInstanceProcAddressFunc* GetVulkanInstanceProcAddress = getVulkanInstan
GetVulkanDeviceProcAddressFunc* GetVulkanDeviceProcAddress = getVulkanDeviceProcAddress;
GetVulkanProcAddressFunc* GetVulkanProcAddress = getVulkanProcAddress;
bool HasVulkanLoader() {
return DlLoader::can_load("libvulkan.so");
return DlLoader::can_load("libvulkan.so") || DlLoader::can_load("libvulkan.so.1");
}
} // namespace core

0 comments on commit 5ae192f

Please sign in to comment.