Android: Check for a crashing custom driver on Android 11+ too

There the backend is never given up on, but a custom driver that crashed
Vulkan last time is cleared, and Vulkan is tried again with the system's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-11-10 15:09:16 +01:00
1 parent 3c491b7423
commit b44e93b3c6
2 files changed
+13 -6

No files matched your search

+12 -5
View File
@@ -507,12 +507,17 @@ static void CheckFailedGPUBackends() {
return;
#endif
// Only a custom driver is given up on, never the backend.
bool customDriverOnly = false;
#if PPSSPP_PLATFORM(ANDROID)
if (System_GetPropertyInt(SYSPROP_SYSTEMVERSION) >= 30) {
// In Android 11 or later, Vulkan is as stable as OpenGL, so let's not even bother.
// Have also seen unexplained issues with random fallbacks to OpenGL for no good reason,
// especially when debugging.
return;
// In Android 11 or later, Vulkan is as stable as OpenGL, so the only thing to check for is a custom
// driver that crashes. Have also seen unexplained issues with random fallbacks to OpenGL for no good
// reason, especially when debugging.
if (g_Config.iGPUBackend != (int)GPUBackend::VULKAN || g_Config.sCustomDriver.empty()) {
return;
}
customDriverOnly = true;
}
#endif
@@ -556,7 +561,9 @@ static void CheckFailedGPUBackends() {
#endif
// Okay, let's not try a backend in the failed list.
g_Config.iGPUBackend = g_Config.NextValidBackend();
if (!customDriverOnly) {
g_Config.iGPUBackend = g_Config.NextValidBackend();
}
if (lastBackend != g_Config.iGPUBackend) {
// This is the expected path.
std::string param = GPUBackendToString((GPUBackend)lastBackend) + " -> " + GPUBackendToString((GPUBackend)g_Config.iGPUBackend);
+1 -1
View File
@@ -869,7 +869,7 @@ retry:
const std::string failedDriver = VulkanTakeFailedCustomDriver();
if (!failedDriver.empty()) {
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
g_OSD.Show(OSDType::MESSAGE_ERROR, gr->T("The custom driver failed, so the default driver is used instead"), failedDriver, 10.0f);
g_OSD.Show(OSDType::MESSAGE_ERROR, gr->T("The custom Vulkan driver failed to load. Switching back to default."), failedDriver, 10.0f);
g_Config.Save("CustomDriverFailed");
}
}