diff options
Diffstat (limited to 'drivers/vulkan/SCsub')
-rw-r--r-- | drivers/vulkan/SCsub | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub index 3e0f5788c3..8fe75367a8 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": @@ -47,6 +36,10 @@ if env["use_volk"]: thirdparty_sources_volk = [thirdparty_volk_dir + "/volk.c"] env_thirdparty_volk.add_source_files(thirdparty_obj, thirdparty_sources_volk) +elif env["platform"] == "android": + # Our current NDK version only provides old Vulkan headers, + # so we have to limit VMA. + env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1000000"]) env_thirdparty_vma.add_source_files(thirdparty_obj, thirdparty_sources_vma) |