summaryrefslogtreecommitdiffstats
path: root/opengl/libs/GLES_trace
diff options
context:
space:
mode:
authorBen Clayton <bclayton@google.com>2014-07-07 11:50:44 +0100
committerBen Clayton <bclayton@google.com>2014-07-07 11:57:45 +0100
commit3d3c125423ab922e705c3f563c689bd7c4a04bac (patch)
tree2dddcc1e4311e4fdaa8057f6933accde926888a5 /opengl/libs/GLES_trace
parentf0ca9cd773a14690ff114fc43217475d3f0f6ec2 (diff)
downloadframeworks_native-3d3c125423ab922e705c3f563c689bd7c4a04bac.zip
frameworks_native-3d3c125423ab922e705c3f563c689bd7c4a04bac.tar.gz
frameworks_native-3d3c125423ab922e705c3f563c689bd7c4a04bac.tar.bz2
Add data capturing of glCompressedTexImage2D and glCompressedTexSubImage2D calls.
Change-Id: I38643f5d279a84f1b7069801d7c106fc8f1ae394
Diffstat (limited to 'opengl/libs/GLES_trace')
-rw-r--r--opengl/libs/GLES_trace/src/gltrace_fixup.cpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
index a6c024b..2e7aa20 100644
--- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
+++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp
@@ -218,6 +218,59 @@ void fixup_glTexSubImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
fixup_glTexImage(widthIndex, heightIndex, glmsg, pointersToFixup[0]);
}
+void fixup_glCompressedTexImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
+ /* void glCompressedTexImage2D(GLenum target,
+ GLint level,
+ GLenum internalformat,
+ GLsizei width,
+ GLsizei height,
+ GLint border,
+ GLsizei imageSize,
+ const GLvoid* data);
+ */
+ GLsizei size = glmsg->args(6).intvalue(0);
+ void *data = pointersToFixup[0];
+
+ GLMessage_DataType *arg_data = glmsg->mutable_args(7);
+ arg_data->set_type(GLMessage::DataType::BYTE);
+ arg_data->clear_rawbytes();
+
+ if (data != NULL) {
+ arg_data->set_isarray(true);
+ arg_data->add_rawbytes(data, size);
+ } else {
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::VOID);
+ }
+}
+
+void fixup_glCompressedTexSubImage2D(GLMessage *glmsg, void *pointersToFixup[]) {
+ /* void glCompressedTexSubImage2D(GLenum target,
+ GLint level,
+ GLint xoffset,
+ GLint yoffset,
+ GLsizei width,
+ GLsizei height,
+ GLenum format,
+ GLsizei imageSize,
+ const GLvoid* data);
+ */
+ GLsizei size = glmsg->args(7).intvalue(0);
+ void *data = pointersToFixup[0];
+
+ GLMessage_DataType *arg_data = glmsg->mutable_args(8);
+ arg_data->set_type(GLMessage::DataType::BYTE);
+ arg_data->clear_rawbytes();
+
+ if (data != NULL) {
+ arg_data->set_isarray(true);
+ arg_data->add_rawbytes(data, size);
+ } else {
+ arg_data->set_isarray(false);
+ arg_data->set_type(GLMessage::DataType::VOID);
+ }
+}
+
void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) {
/* void glShaderSource(GLuint shader, GLsizei count, const GLchar** string,
const GLint* length) */
@@ -760,6 +813,16 @@ void fixupGLMessage(GLTraceContext *context, nsecs_t wallStart, nsecs_t wallEnd,
fixup_glTexSubImage2D(glmsg, pointersToFixup);
}
break;
+ case GLMessage::glCompressedTexImage2D:
+ if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
+ fixup_glCompressedTexImage2D(glmsg, pointersToFixup);
+ }
+ break;
+ case GLMessage::glCompressedTexSubImage2D:
+ if (context->getGlobalTraceState()->shouldCollectTextureDataOnGlTexImage()) {
+ fixup_glCompressedTexSubImage2D(glmsg, pointersToFixup);
+ }
+ break;
case GLMessage::glShaderSource:
fixup_glShaderSource(glmsg, pointersToFixup);
break;