From 554312a3b2aeb6d4080912064658d755991228d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Thu, 12 Aug 2021 23:39:30 +0200 Subject: Android: Use volk instead of NDK Vulkan headers We no longer build the Vulkan loader, and volk lets us load it dynamically. Roblox uses volk on Android so it should work well for us too. --- drivers/vulkan/SCsub | 17 +++-------------- platform/android/detect.py | 1 - 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 3e0f5788c3..ab45863f5b 100644 --- a/drivers/vulkan/SCsub +++ b/drivers/vulkan/SCsub @@ -6,24 +6,13 @@ thirdparty_obj = [] thirdparty_dir = "#thirdparty/vulkan" thirdparty_volk_dir = "#thirdparty/volk" +# Use bundled Vulkan headers +env.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"]) + if env["use_volk"]: env.AppendUnique(CPPDEFINES=["USE_VOLK"]) env.Prepend(CPPPATH=[thirdparty_volk_dir]) -if env["platform"] == "android" and not env["use_volk"]: - # Use NDK Vulkan headers - ndk_vulkan_dir = env["ANDROID_NDK_ROOT"] + "/sources/third_party/vulkan/src" - thirdparty_includes = [ - ndk_vulkan_dir, - ndk_vulkan_dir + "/include", - ndk_vulkan_dir + "/layers", - ndk_vulkan_dir + "/layers/generated", - ] - env.Prepend(CPPPATH=thirdparty_includes) -else: - # Use bundled Vulkan headers - env.Prepend(CPPPATH=[thirdparty_dir, thirdparty_dir + "/include"]) - if env["platform"] == "android": env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_ANDROID_KHR"]) elif env["platform"] == "iphone": diff --git a/platform/android/detect.py b/platform/android/detect.py index 9be6f33b93..7a993e9ca6 100644 --- a/platform/android/detect.py +++ b/platform/android/detect.py @@ -54,7 +54,6 @@ def get_android_ndk_root(): def get_flags(): return [ ("tools", False), - ("use_volk", False), ] -- cgit v1.2.3