dino@apple.com | bce9313 | 2017-04-19 00:37:30 +0000 | [diff] [blame^] | 1 | // |
| 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 | |
| 14 | namespace angle |
| 15 | { |
| 16 | |
| 17 | // Defined in SystemInfo_libpci when GPU_INFO_USE_LIBPCI is defined. |
| 18 | bool GetPCIDevicesWithLibPCI(std::vector<GPUDeviceInfo> *devices); |
| 19 | // Defined in SystemInfo_x11 when GPU_INFO_USE_X11 is defined. |
| 20 | bool GetNvidiaDriverVersionWithXNVCtrl(std::string *version); |
| 21 | |
| 22 | // Target specific helper functions that can be compiled on all targets |
| 23 | // Live in SystemInfo.cpp |
| 24 | bool ParseAMDBrahmaDriverVersion(const std::string &content, std::string *version); |
| 25 | bool ParseAMDCatalystDriverVersion(const std::string &content, std::string *version); |
| 26 | bool ParseMacMachineModel(const std::string &identifier, |
| 27 | std::string *type, |
| 28 | int32_t *major, |
| 29 | int32_t *minor); |
| 30 | bool 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 |
| 34 | void FindPrimaryGPU(SystemInfo *info); |
| 35 | |
| 36 | } // namespace angle |
| 37 | |
| 38 | #endif // GPU_INFO_UTIL_SYSTEM_INFO_INTERNAL_H_ |