Commit e1d1b8b3 by Jamie Madill Committed by Commit Bot

Fix info collection on Android without Vulkan.

Allows Vulkan info collection even if Vk is not enabled in ANGLE. Also removes the system_utils error message so that the Android test runner can parse the standard output without conflicts. Bug: chromium:1133459 Bug: angleproject:5109 Change-Id: I7d7bff0f1c3e456342f27538812b33ee6cd1054b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2436657Reviewed-by: 's avatarCody Northrop <cnorthrop@google.com> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent f8e5b97e
......@@ -363,7 +363,7 @@ angle_static_library("angle_gpu_info_util") {
libs = []
defines = []
if (angle_enable_vulkan) {
if (!is_chromeos) {
sources += libangle_gpu_info_util_vulkan_sources
deps += [ "$angle_root/third_party/vulkan-headers/src:vulkan_headers" ]
}
......
......@@ -72,13 +72,7 @@ std::string GetHelperExecutableDir()
class PosixLibrary : public Library
{
public:
PosixLibrary(const std::string &fullPath) : mModule(dlopen(fullPath.c_str(), RTLD_NOW))
{
if (!mModule)
{
std::cerr << "Failed to load " << fullPath << ": " << dlerror() << std::endl;
}
}
PosixLibrary(const std::string &fullPath) : mModule(dlopen(fullPath.c_str(), RTLD_NOW)) {}
~PosixLibrary() override
{
......
......@@ -83,9 +83,8 @@ struct SystemInfo
// be filled with partial information.
bool GetSystemInfo(SystemInfo *info);
#if defined(ANGLE_ENABLE_VULKAN)
// Vulkan-specific info collection.
bool GetSystemInfoVulkan(SystemInfo *info);
#endif
// Known PCI vendor IDs
constexpr VendorID kVendorID_AMD = 0x1002;
......
......@@ -15,10 +15,6 @@
#include "common/angleutils.h"
#include "common/debug.h"
#if defined(ANGLE_ENABLE_VULKAN)
# include "gpu_info_util/SystemInfo_vulkan.h"
#endif // defined(ANGLE_ENABLE_VULKAN)
namespace angle
{
namespace
......@@ -47,13 +43,7 @@ bool GetSystemInfo(SystemInfo *info)
isFullyPopulated =
GetAndroidSystemProperty("ro.product.model", &info->machineModelName) && isFullyPopulated;
#if defined(ANGLE_ENABLE_VULKAN)
isFullyPopulated = GetSystemInfoVulkan(info) && isFullyPopulated;
#else
isFullyPopulated = false;
#endif // defined(ANGLE_ENABLE_VULKAN)
return isFullyPopulated;
return GetSystemInfoVulkan(info) && isFullyPopulated;
}
} // namespace angle
......@@ -91,8 +91,8 @@ class VulkanLibrary final : NonCopyable
createInstanceInfo.ppEnabledExtensionNames = nullptr;
auto pfnCreateInstance = getProc<PFN_vkCreateInstance>("vkCreateInstance");
ASSERT(pfnCreateInstance);
if (pfnCreateInstance(&createInstanceInfo, nullptr, &mInstance) != VK_SUCCESS)
if (!pfnCreateInstance ||
pfnCreateInstance(&createInstanceInfo, nullptr, &mInstance) != VK_SUCCESS)
{
return VK_NULL_HANDLE;
}
......
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