[vulkan] Vulkan is available since Android 8.0

This commit is contained in:
r.kuznetsov 2019-05-06 13:12:57 +03:00 committed by Arsentiy Milchakov
parent 693b98acb0
commit c40f64b1f3

View file

@ -175,7 +175,12 @@ bool Framework::DestroySurfaceOnDetach()
bool Framework::CreateDrapeEngine(JNIEnv * env, jobject jSurface, int densityDpi, bool firstLaunch,
bool launchByDeepLink, int appVersionCode)
{
auto const vulkanForbidden = dp::SupportManager::Instance().IsVulkanForbidden();
// Vulkan is supported only since Android 8.0, because some Android devices with Android 7.x
// have fatal driver issue, which can lead to process termination and whole OS destabilization.
int constexpr kMinSdkVersionForVulkan = 26;
int const sdkVersion = GetAndroidSdkVersion();
auto const vulkanForbidden = sdkVersion < kMinSdkVersionForVulkan ||
dp::SupportManager::Instance().IsVulkanForbidden();
if (vulkanForbidden)
LOG(LWARNING, ("Vulkan API is forbidden on this device."));