From e0e5e8cb1bc513721324d2b414ce75256aace00e Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 3 Nov 2012 09:35:18 +0100 Subject: [PATCH] (Android GLSL) MAX_PROGRAMS 8 instead of 16, MAX_TEXTURES 4 instead of 8, PREV_TEXTURES 3 instead of 7 --- android/native/jni/Android.mk | 2 +- gfx/shader_glsl.c | 9 ++++++++- retroarch.c | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/android/native/jni/Android.mk b/android/native/jni/Android.mk index ab1b327b7f..f3f35eb6f2 100644 --- a/android/native/jni/Android.mk +++ b/android/native/jni/Android.mk @@ -27,7 +27,7 @@ ifeq ($(PERF_TEST), 1) LOCAL_CFLAGS += -DPERF_TEST endif -LOCAL_CFLAGS += -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREAD -D__LIBRETRO__ -DHAVE_CONFIGFILE=1 -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -std=gnu99 +LOCAL_CFLAGS += -O3 -fno-stack-protector -funroll-loops -DNDEBUG -DHAVE_GRIFFIN -DANDROID -DHAVE_DYNAMIC -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_VID_CONTEXT -DHAVE_OPENGLES2 -DGLSL_DEBUG -DHAVE_GLSL -DHAVE_ZLIB -DINLINE=inline -DLSB_FIRST -DHAVE_THREAD -D__LIBRETRO__ -DHAVE_CONFIGFILE=1 -DRARCH_PERFORMANCE_MODE -DRARCH_GPU_PERFORMANCE_MODE -DPACKAGE_VERSION=\"$(RARCH_VERSION)\" -std=gnu99 LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -landroid -lEGL -lGLESv2 -llog -ldl -lz diff --git a/gfx/shader_glsl.c b/gfx/shader_glsl.c index 619c182ceb..0c832a8946 100644 --- a/gfx/shader_glsl.c +++ b/gfx/shader_glsl.c @@ -119,10 +119,17 @@ static PFNGLVERTEXATTRIBPOINTERPROC pglVertexAttribPointer; #define BORDER_FUNC GL_CLAMP_TO_BORDER #endif +#define MAX_VARIABLES 256 + +#ifdef RARCH_GPU_PERFORMANCE_MODE +#define MAX_PROGRAMS 8 +#define MAX_TEXTURES 4 +#define PREV_TEXTURES 3 +#else #define MAX_PROGRAMS 16 #define MAX_TEXTURES 8 -#define MAX_VARIABLES 256 #define PREV_TEXTURES 7 +#endif enum filter_type { diff --git a/retroarch.c b/retroarch.c index 65bc6a1d24..09f46002e8 100644 --- a/retroarch.c +++ b/retroarch.c @@ -52,9 +52,11 @@ // We want to use -mconsole in Win32, so we need main(). #endif -#if defined(RARCH_CONSOLE) || defined(ANDROID) +#if defined(RARCH_CONSOLE) +#ifndef RARCH_PERFORMANCE_MODE #define RARCH_PERFORMANCE_MODE #endif +#endif // To avoid continous switching if we hold the button down, we require that the button must go from pressed, unpressed back to pressed to be able to toggle between then. static void set_fast_forward_button(bool new_button_state, bool new_hold_button_state)