mirror of
https://github.com/love2d/love.git
synced 2026-08-12 00:20:52 +02:00
android: attempt to use vulkan by default when vulkan 1.1+ is supported.
This commit is contained in:
@@ -116,9 +116,8 @@ namespace vulkan { extern love::graphics::Graphics *createInstance(); }
|
||||
|
||||
static const Renderer rendererOrder[] = {
|
||||
RENDERER_METAL,
|
||||
#if defined(LOVE_ANDROID) || (defined(LOVE_WINDOWS) && defined(_M_ARM64))
|
||||
// Don't prioritize Vulkan by default yet on Android - it needs more testing.
|
||||
// Also don't prioritize Vulkan on Windows ARM64 because it doesn't work.
|
||||
#if defined(LOVE_WINDOWS) && defined(_M_ARM64)
|
||||
// Don't prioritize Vulkan on Windows ARM64 because it doesn't work.
|
||||
// See https://github.com/love2d/love/issues/2196
|
||||
RENDERER_OPENGL,
|
||||
RENDERER_VULKAN,
|
||||
|
||||
@@ -1757,6 +1757,13 @@ int Graphics::rateDeviceSuitability(VkPhysicalDevice device, bool querySwapChain
|
||||
if (!deviceFeatures.fillModeNonSolid)
|
||||
score = 0;
|
||||
|
||||
#ifdef LOVE_ANDROID
|
||||
// Attempt to reduce potential driver bugs on Android by not allowing Vulkan
|
||||
// if the device only supports Vulkan 1.0.
|
||||
if (deviceProperties.apiVersion < VK_API_VERSION_1_1)
|
||||
score = 0;
|
||||
#endif
|
||||
|
||||
return score;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user