summaryrefslogtreecommitdiffstats
path: root/opengl/libs/GLES_trace/tools/genapi.py
diff options
context:
space:
mode:
authorSiva Velusamy <vsiva@google.com>2012-02-27 12:02:47 -0800
committerSiva Velusamy <vsiva@google.com>2012-02-27 12:08:47 -0800
commitd4edba0fe9cb0bab6ce706b5e285806baf138df7 (patch)
tree8c3641e7263d491c22c86eb96813d1aa0bf9bee6 /opengl/libs/GLES_trace/tools/genapi.py
parent8293c92c751f15614b1c72e92becba6097e053c0 (diff)
downloadframeworks_base-d4edba0fe9cb0bab6ce706b5e285806baf138df7.zip
frameworks_base-d4edba0fe9cb0bab6ce706b5e285806baf138df7.tar.gz
frameworks_base-d4edba0fe9cb0bab6ce706b5e285806baf138df7.tar.bz2
gltrace: Make code 64-bit safe.
Currently, the trace API passes the pointers that need to be patched up via 32 bit integers. Such code will not be 64 bit safe. This patch sends all pointers in a separate array of pointers for the fixup calls to read from. Change-Id: If975333f11a6f6f9a74fba57de328affaed452a5
Diffstat (limited to 'opengl/libs/GLES_trace/tools/genapi.py')
-rwxr-xr-xopengl/libs/GLES_trace/tools/genapi.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py
index e1660be..24034c1 100755
--- a/opengl/libs/GLES_trace/tools/genapi.py
+++ b/opengl/libs/GLES_trace/tools/genapi.py
@@ -92,8 +92,8 @@ GL2PROTOBUF_TYPE_MAP = {
"GLclampf":DataType.FLOAT,
"GLfixed":DataType.INT,
"GLclampx":DataType.INT,
- "GLsizeiptr":DataType.POINTER,
- "GLintptr":DataType.POINTER,
+ "GLsizeiptr":DataType.INT,
+ "GLintptr":DataType.INT,
"GLeglImageOES":DataType.POINTER,
}
@@ -180,9 +180,20 @@ TRACE_CALL_TEMPLATE = pyratemp.Template(
rt->$!retDataType.getProtobufCall()!$retValue);
<!--(end)-->
+ void *pointerArgs[] = {
+<!--(for argname, argtype in parsedArgs)-->
+ <!--(if argtype == DataType.POINTER)-->
+ (void *) $!argname!$,
+ <!--(end)-->
+<!--(end)-->
+<!--(if retDataType == DataType.POINTER)-->
+ (void *) retValue,
+<!--(end)-->
+ };
+
fixupGLMessage(glContext, wallStartTime, wallEndTime,
threadStartTime, threadEndTime,
- &glmsg);
+ &glmsg, pointerArgs);
glContext->traceGLMessage(&glmsg);
<!--(if retType != "void")-->