vulkan_library: Add debug logging

This commit is contained in:
lat9nq 2022-05-29 19:49:44 -04:00
parent f22867efc5
commit b43ae9d5ed

View file

@ -5,11 +5,13 @@
#include "common/dynamic_library.h" #include "common/dynamic_library.h"
#include "common/fs/path_util.h" #include "common/fs/path_util.h"
#include "common/logging/log.h"
#include "video_core/vulkan_common/vulkan_library.h" #include "video_core/vulkan_common/vulkan_library.h"
namespace Vulkan { namespace Vulkan {
Common::DynamicLibrary OpenLibrary() { Common::DynamicLibrary OpenLibrary() {
LOG_DEBUG(Render_Vulkan, "Looking for a Vulkan library");
Common::DynamicLibrary library; Common::DynamicLibrary library;
#ifdef __APPLE__ #ifdef __APPLE__
// Check if a path to a specific Vulkan library has been specified. // Check if a path to a specific Vulkan library has been specified.
@ -22,9 +24,11 @@ Common::DynamicLibrary OpenLibrary() {
} }
#else #else
std::string filename = Common::DynamicLibrary::GetVersionedFilename("vulkan", 1); std::string filename = Common::DynamicLibrary::GetVersionedFilename("vulkan", 1);
LOG_DEBUG(Render_Vulkan, "Trying Vulkan library: {}", filename);
if (!library.Open(filename.c_str())) { if (!library.Open(filename.c_str())) {
// Android devices may not have libvulkan.so.1, only libvulkan.so. // Android devices may not have libvulkan.so.1, only libvulkan.so.
filename = Common::DynamicLibrary::GetVersionedFilename("vulkan"); filename = Common::DynamicLibrary::GetVersionedFilename("vulkan");
LOG_DEBUG(Render_Vulkan, "Trying Vulkan library (second attempt): {}", filename);
void(library.Open(filename.c_str())); void(library.Open(filename.c_str()));
} }
#endif #endif