10 #include "flutter/fml/build_config.h"
41 case VK_VENDOR_ID_MESA:
60 return "ImgTec PowerVR";
80 return "Integrated GPU";
82 return "Discrete GPU";
93 case vk::PhysicalDeviceType::eOther:
95 case vk::PhysicalDeviceType::eIntegratedGpu:
97 case vk::PhysicalDeviceType::eDiscreteGpu:
99 case vk::PhysicalDeviceType::eVirtualGpu:
101 case vk::PhysicalDeviceType::eCpu:
109 auto props = device.getProperties();
110 api_version_ =
Version{VK_API_VERSION_MAJOR(props.apiVersion),
111 VK_API_VERSION_MINOR(props.apiVersion),
112 VK_API_VERSION_PATCH(props.apiVersion)};
115 FML_LOG(WARNING) <<
"Unknown GPU Driver Vendor: " << props.vendorID
116 <<
". This is not an error.";
119 if (props.deviceName.data() !=
nullptr) {
120 driver_name_ = props.deviceName.data();
143 std::vector<std::pair<std::string, std::string>> items;
144 items.emplace_back(
"Name", driver_name_);
145 items.emplace_back(
"API Version", api_version_.
ToString());
148 items.emplace_back(
"Is Emulator", std::to_string(
IsEmulator()));
152 for (
const auto& item : items) {
158 std::stringstream stream;
162 stream <<
"--- Driver Information ------------------------------------------";
166 for (
const auto& item : items) {
167 stream <<
"| " << std::setw(
static_cast<int>(
padding)) << item.first
168 << std::setw(0) <<
": " << item.second << std::endl;
171 stream <<
"-----------------------------------------------------------------";
173 FML_LOG(IMPORTANT) << stream.str();
180 driver_name_.find(
"SwiftShader") != std::string::npos) {
183 #endif // FML_OS_ANDROID