diff --git a/core/cc/armlinux/get_vulkan_proc_address.cpp b/core/cc/armlinux/get_vulkan_proc_address.cpp index 14eec9f04a..7399c71ecc 100644 --- a/core/cc/armlinux/get_vulkan_proc_address.cpp +++ b/core/cc/armlinux/get_vulkan_proc_address.cpp @@ -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 diff --git a/core/cc/dl_loader.h b/core/cc/dl_loader.h index c6a8488d2f..e0997ba8ee 100644 --- a/core/cc/dl_loader.h +++ b/core/cc/dl_loader.h @@ -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 DlLoader(const char* name, ConstCharPtrs... fallback_names); diff --git a/core/cc/linux/get_vulkan_proc_address.cpp b/core/cc/linux/get_vulkan_proc_address.cpp index aa740ac60b..02ea1eda86 100644 --- a/core/cc/linux/get_vulkan_proc_address.cpp +++ b/core/cc/linux/get_vulkan_proc_address.cpp @@ -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