summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Chet Haase <chet@google.com> 2012-10-04 19:48:12 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2012-10-04 19:48:12 -0700
commit9c58d96f0079e627004c606436df27fa97ff4c8e (patch)
tree1336a00ed4d5ae9f91ed5ba92dfea66e5b386fab
parentdca9d13581d4d14701d8a207ed647c94ffb1778c (diff)
parent27b28fd9960b73a1f13e22dd6655f75e2e76eef7 (diff)
am 27b28fd9: Merge "Add GL Error logs (temporary)" into jb-mr1-dev
* commit '27b28fd9960b73a1f13e22dd6655f75e2e76eef7': Add GL Error logs (temporary)
-rw-r--r--opengl/libs/Android.mk4
-rw-r--r--opengl/libs/GLES2/gl2.cpp10
2 files changed, 13 insertions, 1 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk
index 31bfcd7e75..bbdef62648 100644
--- a/opengl/libs/Android.mk
+++ b/opengl/libs/Android.mk
@@ -126,6 +126,10 @@ LOCAL_SRC_FILES:= \
GLES2/gl2.cpp.arm \
#
+ifneq (,$(filter manta, $(TARGET_DEVICE)))
+ LOCAL_CFLAGS += -DIS_MANTA
+endif
+
LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL
LOCAL_LDLIBS := -lpthread -ldl
LOCAL_MODULE:= libGLESv2
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index 2d0045e051..cd70ac8813 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -44,10 +44,18 @@ using namespace android;
#undef CALL_GL_API
#undef CALL_GL_API_RETURN
+#ifdef IS_MANTA
+#define DEBUG_CALL_GL_API 1
+#else
#define DEBUG_CALL_GL_API 0
+#endif
#define DEBUG_PRINT_CALL_STACK_ON_ERROR 0
#define SYSTRACE_CALL_GL_API 0
+#ifdef IS_MANTA
+#undef USE_FAST_TLS_KEY
+#endif
+
#if USE_FAST_TLS_KEY
#ifdef HAVE_ARM_TLS_REGISTER
@@ -91,7 +99,7 @@ using namespace android;
GLenum status = GL_NO_ERROR; \
bool error = false; \
while ((status = glGetError()) != GL_NO_ERROR) { \
- ALOGD("[" #_api "] 0x%x", status); \
+ ALOGD("GL Error: [" #_api "] 0x%x", status); \
error = true; \
} \
if (DEBUG_PRINT_CALL_STACK_ON_ERROR && error) { \