Using the Vulkan backend is prohibited on Android devices running versions below Android 8 (APILevel <= 27). (#15386)

This commit is contained in:
Zach Lee
2023-06-08 19:56:26 +08:00
committed by GitHub
parent 119d787796
commit ea32f09213
+8 -1
View File
@@ -28,6 +28,7 @@
#include "gfx-agent/DeviceAgent.h"
#include "gfx-validator/DeviceValidator.h"
#include "platform/BasePlatform.h"
// #undef CC_USE_NVN
// #undef CC_USE_VULKAN
@@ -90,7 +91,13 @@ public:
#if XR_OEM_PICO
Device::isSupportDetachDeviceThread = false;
#endif
if (tryCreate<CCVKDevice>(info, &device)) return device;
bool skipVulkan = false;
#if CC_PLATFORM == CC_PLATFORM_ANDROID
auto sdkVersion = BasePlatform::getPlatform()->getSdkVersion();
skipVulkan = sdkVersion <= 27; // Android 8
#endif
if (!skipVulkan && tryCreate<CCVKDevice>(info, &device)) return device;
#endif
#ifdef CC_USE_METAL