Merge pull request #37745 from nekomatata/vulkan-warnings-android

Fix extra warnings in Android build
This commit is contained in:
Rémi Verschelde 2020-04-10 11:40:19 +02:00 committed by GitHub
commit ea2dfb8cc7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 9 deletions

View File

@ -57,7 +57,7 @@ matrix:
- name: Android export template (release_debug, Clang)
stage: build
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="werror=yes"
env: PLATFORM=android TOOLS=no TARGET=release_debug CACHE_NAME=${PLATFORM}-clang EXTRA_ARGS="warnings=extra werror=yes"
os: linux
compiler: clang
addons:

View File

@ -14,6 +14,14 @@ if env["platform"] == "android":
thirdparty_dir + "/layers/generated",
]
env.Prepend(CPPPATH=thirdparty_includes)
# Build Vulkan memory allocator
env_thirdparty = env.Clone()
env_thirdparty.disable_warnings()
thirdparty_dir = "#thirdparty/vulkan"
vma_sources = [thirdparty_dir + "/android/vk_mem_alloc.cpp"]
env_thirdparty.add_source_files(env.drivers_sources, vma_sources)
elif env["builtin_vulkan"]:
# Use bundled Vulkan headers
thirdparty_dir = "#thirdparty/vulkan"

View File

@ -31,14 +31,6 @@
#include "vulkan_context_android.h"
#include <vulkan/vulkan_android.h>
#define VMA_IMPLEMENTATION
#ifdef DEBUG_ENABLED
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
#include <vk_mem_alloc.h>
const char *VulkanContextAndroid::_get_platform_surface_extension() const {
return VK_KHR_ANDROID_SURFACE_EXTENSION_NAME;
}

View File

@ -0,0 +1,8 @@
#define VMA_IMPLEMENTATION
#ifdef DEBUG_ENABLED
#ifndef _DEBUG
#define _DEBUG
#endif
#endif
// Include memory allocator from Android NDK
#include <vk_mem_alloc.h>