From 784df92f8dcec351c28b737b5210f64e131801ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 1 Mar 2016 23:37:27 +0100 Subject: [PATCH] (Android) Compile in Vulkan support --- griffin/griffin_cpp.cpp | 2 ++ pkg/android/phoenix/jni/Android.mk | 40 +++++++++++++++++++++++++++-- pkg/android/phoenix/jni/Android2.mk | 38 ++++++++++++++++++++++++++- 3 files changed, 77 insertions(+), 3 deletions(-) diff --git a/griffin/griffin_cpp.cpp b/griffin/griffin_cpp.cpp index 23cbd8cd2e..5d2ffec9f4 100644 --- a/griffin/griffin_cpp.cpp +++ b/griffin/griffin_cpp.cpp @@ -25,6 +25,7 @@ #include #endif +#ifdef WANT_GLSLANG #ifdef HAVE_VULKAN #include "../deps/glslang/glslang.cpp" #include "../deps/glslang/glslang_tab.cpp" @@ -70,6 +71,7 @@ #include "../deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp" #endif #endif +#endif /*============================================================ AUDIO diff --git a/pkg/android/phoenix/jni/Android.mk b/pkg/android/phoenix/jni/Android.mk index 270cb14947..e42d94dc94 100644 --- a/pkg/android/phoenix/jni/Android.mk +++ b/pkg/android/phoenix/jni/Android.mk @@ -5,7 +5,7 @@ RARCH_DIR := ../../../.. HAVE_NEON := 1 HAVE_LOGGER := 0 -HAVE_VULKAN := 0 +HAVE_VULKAN := 1 INCFLAGS := DEFINES := @@ -62,7 +62,7 @@ DEFINES += -DHAVE_CHEEVOS DEFINES += -DHAVE_SL LOCAL_CFLAGS += -Wall -std=gnu99 -pthread -Wno-unused-function -fno-stack-protector -funroll-loops $(DEFINES) -LOCAL_CPPFLAGS := -std=gnu++11 $(DEFINES) +LOCAL_CPPFLAGS := -fno-exceptions -std=gnu++11 -fno-rtti -Wno-reorder $(DEFINES) # Let ndk-build set the optimization flags but remove -O3 like in cf3c3 LOCAL_CFLAGS := $(subst -O3,-O2,$(LOCAL_CFLAGS)) @@ -78,6 +78,42 @@ LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang \ -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/Public \ -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent \ -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/SPIRV +LOCAL_SRC_FILES += $(RARCH_DIR)/deps/glslang/glslang.cpp \ + $(RARCH_DIR)/deps/glslang/glslang_tab.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/SpvBuilder.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/SPVRemapper.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/InReadableOrder.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/doc.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/GlslangToSpv.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/disassemble.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/OGLCompilersDLL/InitializeDll.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/GenericCodeGen/Link.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Versions.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/limits.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/intermOut.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Initialize.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/parseConst.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/ParseHelper.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/IntermTraverse.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/InfoSink.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Constant.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/reflection.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/linkValidate.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/PoolAlloc.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp endif LOCAL_LDLIBS += -lOpenSLES -lz diff --git a/pkg/android/phoenix/jni/Android2.mk b/pkg/android/phoenix/jni/Android2.mk index 57fb8428db..8d88e7bbdd 100644 --- a/pkg/android/phoenix/jni/Android2.mk +++ b/pkg/android/phoenix/jni/Android2.mk @@ -5,7 +5,7 @@ RARCH_DIR := ../../../.. HAVE_NEON := 1 HAVE_LOGGER := 0 -HAVE_VULKAN := 0 +HAVE_VULKAN := 1 INCFLAGS := DEFINES := @@ -83,6 +83,42 @@ LOCAL_CPPFLAGS += -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang \ -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/Public \ -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent \ -I$(LOCAL_PATH)/$(RARCH_DIR)/deps/glslang/glslang/SPIRV +LOCAL_SRC_FILES += $(RARCH_DIR)/deps/glslang/glslang.cpp \ + $(RARCH_DIR)/deps/glslang/glslang_tab.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/SpvBuilder.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/SPVRemapper.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/InReadableOrder.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/doc.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/GlslangToSpv.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/SPIRV/disassemble.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/OGLCompilersDLL/InitializeDll.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/GenericCodeGen/Link.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Intermediate.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Versions.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/RemoveTree.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/limits.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/intermOut.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Initialize.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/SymbolTable.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/parseConst.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/ParseHelper.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/ShaderLang.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/IntermTraverse.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/InfoSink.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Constant.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/Scan.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/reflection.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/linkValidate.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/PoolAlloc.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpAtom.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpContext.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpMemory.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpTokens.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpScanner.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/PpSymbols.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/MachineIndependent/preprocessor/Pp.cpp \ + $(RARCH_DIR)/deps/glslang/glslang/glslang/OSDependent/Unix/ossource.cpp endif LOCAL_LDLIBS += -lOpenSLES -lz