Commit 5c09c1f8 by Xiaoxuan Liu Committed by Commit Bot

Add support for Linux GPU info with Vulkan backend

1. Add support for Linux GPU info with vulkan backend: for dev board without PCI support, try vulkan backend to get GPU info. 2. Fix getVulkanInstance() issue when loading non-exist lib: return NULL instance if open lib failed. Bug: angleproject:5717 Change-Id: I03c11da25a8787496d098f6c9d6b4c53701383e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2734375Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 54294c9a
...@@ -73,7 +73,8 @@ bool GetSystemInfo(SystemInfo *info) ...@@ -73,7 +73,8 @@ bool GetSystemInfo(SystemInfo *info)
{ {
if (!GetPCIDevicesWithLibPCI(&(info->gpus))) if (!GetPCIDevicesWithLibPCI(&(info->gpus)))
{ {
return false; // Try vulkan backend to get GPU info
return GetSystemInfoVulkan(info);
} }
if (info->gpus.size() == 0) if (info->gpus.size() == 0)
......
...@@ -49,7 +49,16 @@ class VulkanLibrary final : NonCopyable ...@@ -49,7 +49,16 @@ class VulkanLibrary final : NonCopyable
{ {
mLibVulkan = OpenSharedLibraryWithExtension(libraryName); mLibVulkan = OpenSharedLibraryWithExtension(libraryName);
if (mLibVulkan) if (mLibVulkan)
break; {
if (mLibVulkan->getNative())
{
break;
}
else
{
SafeDelete(mLibVulkan);
}
}
} }
if (!mLibVulkan) if (!mLibVulkan)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment