Get information about the Vulkan driver. More...
#include <driver_info_vk.h>
Public Member Functions | |
DriverInfoVK (const vk::PhysicalDevice &device) | |
~DriverInfoVK () | |
DriverInfoVK (const DriverInfoVK &)=delete | |
DriverInfoVK & | operator= (const DriverInfoVK &)=delete |
const Version & | GetAPIVersion () const |
Gets the Vulkan API version. Should be at or above Vulkan 1.1 which is the Impeller baseline. More... | |
const VendorVK & | GetVendor () const |
Get the vendor of the Vulkan implementation. This is a broad check and includes multiple drivers and platforms. More... | |
const DeviceTypeVK & | GetDeviceType () const |
Get the device type. Typical use might be to check if the device is a CPU implementation. More... | |
const std::string & | GetDriverName () const |
Get the self-reported name of the graphics driver. More... | |
void | DumpToLog () const |
Dumps the current driver info to the log. More... | |
bool | IsEmulator () const |
Determines if the driver represents an emulator. There is no definitive way to tell if a driver is an emulator and drivers don't self identify as emulators. So take this information with a pinch of salt. More... | |
bool | IsKnownBadDriver () const |
Determines if the driver has been tested and determined to be non-functional. More... | |
std::optional< MaliGPU > | GetMaliGPUInfo () const |
Returns Mali GPU info if this is a Mali GPU, otherwise std::nullopt. More... | |
std::optional< AdrenoGPU > | GetAdrenoGPUInfo () const |
Returns Adreno GPU info if this is a Adreno GPU, otherwise std::nullopt. More... | |
std::optional< PowerVRGPU > | GetPowerVRGPUInfo () const |
Returns PowerVR GPU info if this is a PowerVR GPU, otherwise std::nullopt. More... | |
Get information about the Vulkan driver.
Before gating features behind any of the information reported by the driver, consider alternatives (extensions checks perhaps) and try to get a reviewer buddy to convince you to avoid using this.
Definition at line 195 of file driver_info_vk.h.
|
explicit |
Definition at line 256 of file driver_info_vk.cc.
References impeller::GetAdrenoVersion(), impeller::GetMaliVersion(), impeller::GetPowerVRVersion(), impeller::IdentifyVendor(), impeller::kARM, impeller::kPowerVR, impeller::kQualcomm, impeller::kUnknown, and impeller::ToDeviceType().
|
default |
|
delete |
void impeller::DriverInfoVK::DumpToLog | ( | ) | const |
Dumps the current driver info to the log.
Definition at line 304 of file driver_info_vk.cc.
References impeller::DeviceTypeToString(), IsEmulator(), padding, impeller::Version::ToString(), and impeller::VendorToString().
std::optional< AdrenoGPU > impeller::DriverInfoVK::GetAdrenoGPUInfo | ( | ) | const |
Returns Adreno GPU info if this is a Adreno GPU, otherwise std::nullopt.
Definition at line 383 of file driver_info_vk.cc.
Referenced by impeller::GetWorkaroundsFromDriverInfo().
const Version & impeller::DriverInfoVK::GetAPIVersion | ( | ) | const |
Gets the Vulkan API version. Should be at or above Vulkan 1.1 which is the Impeller baseline.
Definition at line 288 of file driver_info_vk.cc.
const DeviceTypeVK & impeller::DriverInfoVK::GetDeviceType | ( | ) | const |
Get the device type. Typical use might be to check if the device is a CPU implementation.
Definition at line 296 of file driver_info_vk.cc.
const std::string & impeller::DriverInfoVK::GetDriverName | ( | ) | const |
Get the self-reported name of the graphics driver.
Definition at line 300 of file driver_info_vk.cc.
std::optional< MaliGPU > impeller::DriverInfoVK::GetMaliGPUInfo | ( | ) | const |
Returns Mali GPU info if this is a Mali GPU, otherwise std::nullopt.
Definition at line 379 of file driver_info_vk.cc.
std::optional< PowerVRGPU > impeller::DriverInfoVK::GetPowerVRGPUInfo | ( | ) | const |
Returns PowerVR GPU info if this is a PowerVR GPU, otherwise std::nullopt.
Definition at line 387 of file driver_info_vk.cc.
Referenced by impeller::GetWorkaroundsFromDriverInfo().
const VendorVK & impeller::DriverInfoVK::GetVendor | ( | ) | const |
Get the vendor of the Vulkan implementation. This is a broad check and includes multiple drivers and platforms.
Definition at line 292 of file driver_info_vk.cc.
bool impeller::DriverInfoVK::IsEmulator | ( | ) | const |
Determines if the driver represents an emulator. There is no definitive way to tell if a driver is an emulator and drivers don't self identify as emulators. So take this information with a pinch of salt.
Definition at line 338 of file driver_info_vk.cc.
References impeller::kCPU, and impeller::kGoogle.
Referenced by DumpToLog().
bool impeller::DriverInfoVK::IsKnownBadDriver | ( | ) | const |
Determines if the driver has been tested and determined to be non-functional.
If true, context setup should fail such that the device falls back to OpenGLES.
Definition at line 349 of file driver_info_vk.cc.
References impeller::Version::IsAtLeast(), impeller::kCXT, impeller::kHuawei, and impeller::kSamsung.
|
delete |