android: Default to Vulkan video driver on Android#18832
android: Default to Vulkan video driver on Android#18832mattakins wants to merge 1 commit intolibretro:masterfrom
Conversation
Vulkan enables modern slang shader support and other benefits. Added GL fallback on Vulkan init failure for devices without working Vulkan.
|
While this solution has clear advantages many users may actually experience reduced performance as most devices still show better performance and compatibility when using OpenGL as the video driver. This is especially true for Android TV devices and mobile devices with older GPUs and outdated Vulkan drivers. |
|
I've just yesterday helped someone that had a blackscreens on any core (so its a frontend bug) with gl and worked fine with vulkan, so gl is broken in some android devices (he had a adreno, the logs should still be in cache in the help discord channel). |
|
@i30817 were they using the nightly or stable? I think that was actually just fixed in the nightlies a few days ago.l Nevertheless, I am concerned that vulkan might not be readily available on legacy devices, and in those cases they won't even be able to launch to change it, right? That is, complete lockout (without editing config files manually) on older devices vs inconvenience on newer ones. |
|
It was Git 69a4f0e from the log If that's before or after that fix I don't know. Edit checked it, now the handy github hyperlink showed, most definitely before, November of 2025 |
|
I'm surprised that retroarch doesnt fallback automatically on boot when a default driver doesnt work, maybe with a startup overlay warning. |
The fallback mechanism handles the lockout concern directly. If Vulkan init fails (e.g. libvulkan.so doesn't exist, context creation fails, no GPU support), it hits goto error → video_driver_force_fallback("gl") → saves "gl" to the config file → exits. Next launch automatically uses GL. The user sees one failed launch, not a permanent lockout. I took this from the existing D3D11 fallback pattern on Windows.
Regarding performance — Vulkan has been mandatory on all 64-bit Android 10+ devices since 2019, and any SoC from 2018 onwards has mature Vulkan drivers at this point. The devices with no Vulkan or poor Vulkan implementations are largely pre-2016 hardware or low end Android TV devices. On those devices, Vulkan init will either fail cleanly and fall back to GL, or the user can switch back to GL in settings. So we are just flipping the inconvenience from the 85% of users who would benefit from Vulkan to the 15% still using legacy devices (see Google Play's Vulkan dashboard for stats). |
|
As long as the fallback works, I'm fine with it. |
|
As a test, I built RetroArch with Vulkan as the default video driver but with vulkan_init forced to fail immediately to simluate a device with no Vulkan support. On first launch, the fallback kicked in and it exited. On second launch, it came upon GL normally, so the fallback successfully wrote video_driver = "gl" to config. No lockout! |
This also pops up occasionally on the RetroArch subreddit. Just today I received a comment in a old post thanking me for pointing out the "fix", the fix being simply switching from GL to Vulkan. Edit: link to it: https://www.reddit.com/r/RetroArch/comments/1n5robl/comment/obgjkb5/
If the fix you mentioned is #18758, it covers devices with Snapdragon CPU/Adreno GPU, but other devices also have issues with their OpenGL drivers. My Samsung device with an Exynos CPU/Xclipse GPU used to show this black screen on any core and simply crash most standalone emulators that used OpenGL. Now after recent system updates, it seems to be using ANGLE. Its compatibility has improved somewhat since then, but it still has graphical bugs and is obviously far behind Vulkan in terms of speed: |
|
@LibretroAdmin This is ready for a look when you get a chance. Quick summary:
|
|
We're holding off on some PRs until the stable release, but I think this one probably could/should come before it. |

Description
Android defaults to GL due to preprocessor ordering in configuration.c.
Vulkan enables modern slang shader support and other benefits. Vulkan is widely supported on Android 10+.
Switching video modes is unintuitive, especially to first time users.
Added GL fallback on Vulkan init failure for devices without Vulkan support.