blob: d2f61246621f95a1286a10bcfdbf80af9bb8f9af [file] [log] [blame]
dino@apple.combce93132017-04-19 00:37:30 +00001//
2// Copyright (c) 2013-2017 The ANGLE Project Authors. All rights reserved.
3// Use of this source code is governed by a BSD-style license that can be
4// found in the LICENSE file.
5//
6
7// SystemInfo_internal.h: Functions used by the SystemInfo_* files and unittests
8
9#ifndef GPU_INFO_UTIL_SYSTEM_INFO_INTERNAL_H_
10#define GPU_INFO_UTIL_SYSTEM_INFO_INTERNAL_H_
11
12#include "gpu_info_util/SystemInfo.h"
13
14namespace angle
15{
16
17// Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined.
18bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices);
19// Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined.
20bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version);
21
22// Target specific helper functions that can be compiled on all targets
23// Live in SystemInfo.cpp
24bool ParseAMDBrahmaDriverVersion(const std::string &content, std::string *version);
25bool ParseAMDCatalystDriverVersion(const std::string &content, std::string *version);
26bool ParseMacMachineModel(const std::string &identifier,
27 std::string *type,
28 int32_t *major,
29 int32_t *minor);
30bool CMDeviceIDToDeviceAndVendorID(const std::string &id, uint32_t *vendorId, uint32_t *deviceId);
31
32// In the case there are multiple GPUs, this finds the primary one and sets Optimus or AMD
33// Switchable
34void FindPrimaryGPU(SystemInfo *info);
35
36} // namespace angle
37
38#endif // GPU_INFO_UTIL_SYSTEM_INFO_INTERNAL_H_