[android] Use OpenGL on Emulator API 30 and 36 (Android 11 and 16)

OM crashes likely due to some bugs in Vulkan driver

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk
2025-07-07 19:00:35 +02:00
committed by Konstantin Pastbin
parent 90492e95e6
commit a036edc9c5
3 changed files with 14 additions and 7 deletions

View File

@@ -108,9 +108,17 @@ bool SupportManager::IsVulkanForbidden()
}
bool SupportManager::IsVulkanForbidden(std::string const & deviceName, Version apiVersion,
Version driverVersion, bool isCustomROM)
Version driverVersion, bool isCustomROM, int sdkVersion)
{
LOG(LINFO, ("Device =", deviceName, "API =", apiVersion, "Driver =", driverVersion));
LOG(LINFO, ("Device =", deviceName, "API =", apiVersion, "Driver =", driverVersion, "SDK =", sdkVersion));
// Vulkan crashes on Android Emulator (API 30 and API 36), likely due to some bug in the emulator's driver.
// TODO(AB): Remove this workaround when it is fixed.
if (deviceName == "SwiftShader Device (LLVM 10.0.0)" && (sdkVersion == 30 || sdkVersion == 36))
{
LOG(LWARNING, ("Use OpenGL instead of Vulkan on Android Emulator due to crashes caused by graphics driver."));
return true;
}
static char const * kBannedDevices[] = {
/// @todo Should we ban all PowerVR Rogue devices?