Commit b630bf9e by Michael Spang Committed by Commit Bot

Fuchsia: Implement SystemInfo on Fuchsia

The Android vulkan code is reusable, so move that to a new file SystemInfo_vulkan.cpp and call it in the Android & Fuchsia implementations. This is necessary to skip tests based on GPU. Bug: angleproject:4349, angleproject:4352 Change-Id: I8330cfcdbd41f4d51391bd5ed7f0820c55e02801 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2023909 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent e3ba0d7d
...@@ -351,8 +351,18 @@ angle_static_library("angle_gpu_info_util") { ...@@ -351,8 +351,18 @@ angle_static_library("angle_gpu_info_util") {
libs = [] libs = []
defines = [] defines = []
if (is_android || is_fuchsia) {
sources += libangle_gpu_info_util_vulkan_sources
}
if (is_android) { if (is_android) {
sources += [ "src/gpu_info_util/SystemInfo_android.cpp" ] sources += libangle_gpu_info_util_android_sources
}
if (is_fuchsia) {
sources += libangle_gpu_info_util_fuchsia_sources
deps +=
[ "$angle_root/src/libANGLE/renderer/vulkan:angle_vulkan_entry_points" ]
} }
if (is_win) { if (is_win) {
...@@ -363,7 +373,7 @@ angle_static_library("angle_gpu_info_util") { ...@@ -363,7 +373,7 @@ angle_static_library("angle_gpu_info_util") {
libs += [ "dxgi.lib" ] libs += [ "dxgi.lib" ]
} }
if (is_linux || is_fuchsia) { if (is_linux) {
sources += libangle_gpu_info_util_linux_sources sources += libangle_gpu_info_util_linux_sources
if (angle_use_x11) { if (angle_use_x11) {
......
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// SystemInfo_fuchsia.cpp: implementation of the Fuchsia-specific parts of SystemInfo.h
#include "gpu_info_util/SystemInfo_vulkan.h"
namespace angle
{
bool GetSystemInfo(SystemInfo *info)
{
return GetSystemInfoVulkan(info);
}
} // namespace angle
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// SystemInfo_vulkan.h: Reusable Vulkan implementation for SystemInfo.h
#ifndef GPU_INFO_UTIL_SYSTEM_INFO_VULKAN_H_
#define GPU_INFO_UTIL_SYSTEM_INFO_VULKAN_H_
namespace angle
{
struct SystemInfo;
// Reusable vulkan implementation of GetSystemInfo(). See SystemInfo.h.
bool GetSystemInfoVulkan(SystemInfo *info);
} // namespace angle
#endif // GPU_INFO_UTIL_SYSTEM_INFO_VULKAN_H_
...@@ -122,9 +122,20 @@ libangle_gpu_info_util_sources = [ ...@@ -122,9 +122,20 @@ libangle_gpu_info_util_sources = [
libangle_gpu_info_util_win_sources = [ "src/gpu_info_util/SystemInfo_win.cpp" ] libangle_gpu_info_util_win_sources = [ "src/gpu_info_util/SystemInfo_win.cpp" ]
libangle_gpu_info_util_android_sources =
[ "src/gpu_info_util/SystemInfo_android.cpp" ]
libangle_gpu_info_util_linux_sources = libangle_gpu_info_util_linux_sources =
[ "src/gpu_info_util/SystemInfo_linux.cpp" ] [ "src/gpu_info_util/SystemInfo_linux.cpp" ]
libangle_gpu_info_util_fuchsia_sources =
[ "src/gpu_info_util/SystemInfo_fuchsia.cpp" ]
libangle_gpu_info_util_vulkan_sources = [
"src/gpu_info_util/SystemInfo_vulkan.cpp",
"src/gpu_info_util/SystemInfo_vulkan.h",
]
libangle_gpu_info_util_libpci_sources = libangle_gpu_info_util_libpci_sources =
[ "src/gpu_info_util/SystemInfo_libpci.cpp" ] [ "src/gpu_info_util/SystemInfo_libpci.cpp" ]
......
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