зеркало из https://github.com/AvaloniaUI/angle.git
Reland "Reland "Add support for Linux GPU info with Vulkan backend""
This is a reland of9a8397327f
Chrome Linux crash issue could be fixed in0615bbde39
, let's reland this now. Original change's description: > Reland "Add support for Linux GPU info with Vulkan backend" > > This is a reland of5c09c1f882
> > Extra change: Add new ANGLE_HAS_VULKAN_SYSTEM_INFO compile > variable for GetSystemInfoVulkan() in linux platform. > > Original change's description: > > 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/+/2734375 > > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > > Reviewed-by: Jamie Madill <jmadill@chromium.org> > > Commit-Queue: Jamie Madill <jmadill@chromium.org> > > Bug: angleproject:5717 > Change-Id: Iaaab8f512b6ec1d524d7ebb3b4252fec3cfe7dc3 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2739097 > Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> Bug: angleproject:5717 Change-Id: Iad6736f9137b7e9640c97fa2b9eded3fd37ac88f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2821410 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Родитель
14f8918c6b
Коммит
ed4f7cb63e
1
BUILD.gn
1
BUILD.gn
|
@ -427,6 +427,7 @@ angle_static_library("angle_gpu_info_util") {
|
|||
if (!is_chromeos && angle_has_build) {
|
||||
sources += libangle_gpu_info_util_vulkan_sources
|
||||
deps += [ "$angle_vulkan_headers_dir:vulkan_headers" ]
|
||||
defines += [ "ANGLE_HAS_VULKAN_SYSTEM_INFO" ]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
|
|
|
@ -73,7 +73,12 @@ bool GetSystemInfo(SystemInfo *info)
|
|||
{
|
||||
if (!GetPCIDevicesWithLibPCI(&(info->gpus)))
|
||||
{
|
||||
#if defined(ANGLE_HAS_VULKAN_SYSTEM_INFO)
|
||||
// Try vulkan backend to get GPU info
|
||||
return GetSystemInfoVulkan(info);
|
||||
#else
|
||||
return false;
|
||||
#endif // defined(ANGLE_HAS_VULKAN_SYSTEM_INFO)
|
||||
}
|
||||
|
||||
if (info->gpus.size() == 0)
|
||||
|
|
|
@ -49,7 +49,16 @@ class VulkanLibrary final : NonCopyable
|
|||
{
|
||||
mLibVulkan = OpenSharedLibraryWithExtension(libraryName);
|
||||
if (mLibVulkan)
|
||||
break;
|
||||
{
|
||||
if (mLibVulkan->getNative())
|
||||
{
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
SafeDelete(mLibVulkan);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!mLibVulkan)
|
||||
|
|
Загрузка…
Ссылка в новой задаче