From 0d3cb7787f5028c0abcad1500acbba003921e997 Mon Sep 17 00:00:00 2001 From: Alejandro Saucedo Date: Sat, 3 Oct 2020 16:12:17 +0100 Subject: [PATCH] Updated android example to reduce number of files --- .../android-simple/app/src/main/jni/CMakeLists.txt | 8 ++------ examples/android/android-simple/app/src/main/jni/main.cpp | 8 -------- single_include/kompute/Kompute.hpp | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/examples/android/android-simple/app/src/main/jni/CMakeLists.txt b/examples/android/android-simple/app/src/main/jni/CMakeLists.txt index 9e4c2c1fb..8c3ea439f 100644 --- a/examples/android/android-simple/app/src/main/jni/CMakeLists.txt +++ b/examples/android/android-simple/app/src/main/jni/CMakeLists.txt @@ -19,12 +19,8 @@ include_directories( ${VK_ANDROID_COMMON_DIR} ${VK_ANDROID_INCLUDE_DIR} ../../../../../../../single_include/ - ../../../../../../../vulkan_ndk_patch_include/) + ../../../../../../../vk_ndk_wrapper_include/) -# TODO: Explore: -# * -DVK_NO_PROTOTYPES -# * -DUSE_DEBUG_EXTENTIONS -# * -Wno-unused-variable set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14 \ -DVK_USE_PLATFORM_ANDROID_KHR=1 -DKOMPUTE_DISABLE_VK_DEBUG_LAYERS=1") @@ -35,5 +31,5 @@ target_link_libraries(kompute_android kompute app-glue log - android_vulkan_wrapper + kompute_vk_ndk_wrapper android) \ No newline at end of file diff --git a/examples/android/android-simple/app/src/main/jni/main.cpp b/examples/android/android-simple/app/src/main/jni/main.cpp index 0fda97d82..3946ce5e2 100644 --- a/examples/android/android-simple/app/src/main/jni/main.cpp +++ b/examples/android/android-simple/app/src/main/jni/main.cpp @@ -34,14 +34,6 @@ static const char* kTAG = "Vulkan-Tutorial01"; #define LOGE(...) \ ((void)__android_log_print(ANDROID_LOG_ERROR, kTAG, __VA_ARGS__)) -// Vulkan call wrapper -#define CALL_VK(func) \ - if (VK_SUCCESS != (func)) { \ - __android_log_print(ANDROID_LOG_ERROR, "Tutorial ", \ - "Vulkan error. File[%s], line[%d]", __FILE__, \ - __LINE__); \ - assert(false); \ - } // We will call this function the window is opened. // This is where we will initialise everything diff --git a/single_include/kompute/Kompute.hpp b/single_include/kompute/Kompute.hpp index 6ee47169c..ec04fde88 100755 --- a/single_include/kompute/Kompute.hpp +++ b/single_include/kompute/Kompute.hpp @@ -11,7 +11,7 @@ #ifdef VK_USE_PLATFORM_ANDROID_KHR #include #include -#include +#include // VK_NO_PROTOTYPES required before vulkan import but after wrapper.hpp #undef VK_NO_PROTOTYPES