From 5493ce0600ff2922a6e5fec145f1f0b531180746 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 15 Mar 2026 11:52:23 -0700 Subject: [PATCH] Default to Vulkan video driver on Android Vulkan enables modern slang shader support and other benefits. Added GL fallback on Vulkan init failure for devices without working Vulkan. --- configuration.c | 2 ++ gfx/drivers/vulkan.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/configuration.c b/configuration.c index 58c0437c16c7..67a260f33291 100644 --- a/configuration.c +++ b/configuration.c @@ -450,6 +450,8 @@ static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D11; static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL1; #elif defined(HAVE_VITA2D) static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_VITA2D; +#elif defined(ANDROID) && defined(HAVE_VULKAN) +static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_VULKAN; #elif defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) || defined(HAVE_PSGL) static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL; #elif defined(HAVE_OPENGL_CORE) && !defined(__HAIKU__) diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 277ab522a982..4f2de6e89fb6 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -4016,6 +4016,9 @@ static void *vulkan_init(const video_info_t *video, error: vulkan_free(vk); +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) + video_driver_force_fallback("gl"); +#endif return NULL; }