Home | History | Annotate | Download | only in src
      1 /*
      2  * Copyright 2011, The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *     http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  *
     16  * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
     17  */
     18 
     19 #include <cutils/log.h>
     20 #include <utils/Timers.h>
     21 #include <GLES2/gl2.h>
     22 
     23 #include "gltrace.pb.h"
     24 #include "gltrace_context.h"
     25 #include "gltrace_fixup.h"
     26 #include "gltrace_transport.h"
     27 
     28 namespace android {
     29 namespace gltrace {
     30 
     31 // Definitions for GL2 APIs
     32 
     33 void GLTrace_glActiveTexture(GLenum texture) {
     34     GLMessage glmsg;
     35     GLTraceContext *glContext = getGLTraceContext();
     36 
     37     glmsg.set_function(GLMessage::glActiveTexture);
     38 
     39     // copy argument texture
     40     GLMessage_DataType *arg_texture = glmsg.add_args();
     41     arg_texture->set_isarray(false);
     42     arg_texture->set_type(GLMessage::DataType::ENUM);
     43     arg_texture->add_intvalue((int)texture);
     44 
     45     // call function
     46     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     47     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
     48     glContext->hooks->gl.glActiveTexture(texture);
     49     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     50     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
     51 
     52     void *pointerArgs[] = {
     53     };
     54 
     55     fixupGLMessage(glContext, wallStartTime, wallEndTime,
     56                               threadStartTime, threadEndTime,
     57                               &glmsg, pointerArgs);
     58     glContext->traceGLMessage(&glmsg);
     59 }
     60 
     61 void GLTrace_glAttachShader(GLuint program, GLuint shader) {
     62     GLMessage glmsg;
     63     GLTraceContext *glContext = getGLTraceContext();
     64 
     65     glmsg.set_function(GLMessage::glAttachShader);
     66 
     67     // copy argument program
     68     GLMessage_DataType *arg_program = glmsg.add_args();
     69     arg_program->set_isarray(false);
     70     arg_program->set_type(GLMessage::DataType::INT);
     71     arg_program->add_intvalue(program);
     72 
     73     // copy argument shader
     74     GLMessage_DataType *arg_shader = glmsg.add_args();
     75     arg_shader->set_isarray(false);
     76     arg_shader->set_type(GLMessage::DataType::INT);
     77     arg_shader->add_intvalue(shader);
     78 
     79     // call function
     80     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
     81     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
     82     glContext->hooks->gl.glAttachShader(program, shader);
     83     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
     84     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
     85 
     86     void *pointerArgs[] = {
     87     };
     88 
     89     fixupGLMessage(glContext, wallStartTime, wallEndTime,
     90                               threadStartTime, threadEndTime,
     91                               &glmsg, pointerArgs);
     92     glContext->traceGLMessage(&glmsg);
     93 }
     94 
     95 void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) {
     96     GLMessage glmsg;
     97     GLTraceContext *glContext = getGLTraceContext();
     98 
     99     glmsg.set_function(GLMessage::glBindAttribLocation);
    100 
    101     // copy argument program
    102     GLMessage_DataType *arg_program = glmsg.add_args();
    103     arg_program->set_isarray(false);
    104     arg_program->set_type(GLMessage::DataType::INT);
    105     arg_program->add_intvalue(program);
    106 
    107     // copy argument index
    108     GLMessage_DataType *arg_index = glmsg.add_args();
    109     arg_index->set_isarray(false);
    110     arg_index->set_type(GLMessage::DataType::INT);
    111     arg_index->add_intvalue(index);
    112 
    113     // copy argument name
    114     GLMessage_DataType *arg_name = glmsg.add_args();
    115     arg_name->set_isarray(false);
    116     arg_name->set_type(GLMessage::DataType::INT);
    117     arg_name->add_intvalue((int)name);
    118 
    119     // call function
    120     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    121     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    122     glContext->hooks->gl.glBindAttribLocation(program, index, name);
    123     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    124     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    125 
    126     void *pointerArgs[] = {
    127         (void *) name,
    128     };
    129 
    130     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    131                               threadStartTime, threadEndTime,
    132                               &glmsg, pointerArgs);
    133     glContext->traceGLMessage(&glmsg);
    134 }
    135 
    136 void GLTrace_glBindBuffer(GLenum target, GLuint buffer) {
    137     GLMessage glmsg;
    138     GLTraceContext *glContext = getGLTraceContext();
    139 
    140     glmsg.set_function(GLMessage::glBindBuffer);
    141 
    142     // copy argument target
    143     GLMessage_DataType *arg_target = glmsg.add_args();
    144     arg_target->set_isarray(false);
    145     arg_target->set_type(GLMessage::DataType::ENUM);
    146     arg_target->add_intvalue((int)target);
    147 
    148     // copy argument buffer
    149     GLMessage_DataType *arg_buffer = glmsg.add_args();
    150     arg_buffer->set_isarray(false);
    151     arg_buffer->set_type(GLMessage::DataType::INT);
    152     arg_buffer->add_intvalue(buffer);
    153 
    154     // call function
    155     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    156     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    157     glContext->hooks->gl.glBindBuffer(target, buffer);
    158     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    159     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    160 
    161     void *pointerArgs[] = {
    162     };
    163 
    164     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    165                               threadStartTime, threadEndTime,
    166                               &glmsg, pointerArgs);
    167     glContext->traceGLMessage(&glmsg);
    168 }
    169 
    170 void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer) {
    171     GLMessage glmsg;
    172     GLTraceContext *glContext = getGLTraceContext();
    173 
    174     glmsg.set_function(GLMessage::glBindFramebuffer);
    175 
    176     // copy argument target
    177     GLMessage_DataType *arg_target = glmsg.add_args();
    178     arg_target->set_isarray(false);
    179     arg_target->set_type(GLMessage::DataType::ENUM);
    180     arg_target->add_intvalue((int)target);
    181 
    182     // copy argument framebuffer
    183     GLMessage_DataType *arg_framebuffer = glmsg.add_args();
    184     arg_framebuffer->set_isarray(false);
    185     arg_framebuffer->set_type(GLMessage::DataType::INT);
    186     arg_framebuffer->add_intvalue(framebuffer);
    187 
    188     // call function
    189     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    190     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    191     glContext->hooks->gl.glBindFramebuffer(target, framebuffer);
    192     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    193     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    194 
    195     void *pointerArgs[] = {
    196     };
    197 
    198     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    199                               threadStartTime, threadEndTime,
    200                               &glmsg, pointerArgs);
    201     glContext->traceGLMessage(&glmsg);
    202 }
    203 
    204 void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
    205     GLMessage glmsg;
    206     GLTraceContext *glContext = getGLTraceContext();
    207 
    208     glmsg.set_function(GLMessage::glBindRenderbuffer);
    209 
    210     // copy argument target
    211     GLMessage_DataType *arg_target = glmsg.add_args();
    212     arg_target->set_isarray(false);
    213     arg_target->set_type(GLMessage::DataType::ENUM);
    214     arg_target->add_intvalue((int)target);
    215 
    216     // copy argument renderbuffer
    217     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
    218     arg_renderbuffer->set_isarray(false);
    219     arg_renderbuffer->set_type(GLMessage::DataType::INT);
    220     arg_renderbuffer->add_intvalue(renderbuffer);
    221 
    222     // call function
    223     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    224     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    225     glContext->hooks->gl.glBindRenderbuffer(target, renderbuffer);
    226     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    227     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    228 
    229     void *pointerArgs[] = {
    230     };
    231 
    232     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    233                               threadStartTime, threadEndTime,
    234                               &glmsg, pointerArgs);
    235     glContext->traceGLMessage(&glmsg);
    236 }
    237 
    238 void GLTrace_glBindTexture(GLenum target, GLuint texture) {
    239     GLMessage glmsg;
    240     GLTraceContext *glContext = getGLTraceContext();
    241 
    242     glmsg.set_function(GLMessage::glBindTexture);
    243 
    244     // copy argument target
    245     GLMessage_DataType *arg_target = glmsg.add_args();
    246     arg_target->set_isarray(false);
    247     arg_target->set_type(GLMessage::DataType::ENUM);
    248     arg_target->add_intvalue((int)target);
    249 
    250     // copy argument texture
    251     GLMessage_DataType *arg_texture = glmsg.add_args();
    252     arg_texture->set_isarray(false);
    253     arg_texture->set_type(GLMessage::DataType::INT);
    254     arg_texture->add_intvalue(texture);
    255 
    256     // call function
    257     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    258     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    259     glContext->hooks->gl.glBindTexture(target, texture);
    260     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    261     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    262 
    263     void *pointerArgs[] = {
    264     };
    265 
    266     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    267                               threadStartTime, threadEndTime,
    268                               &glmsg, pointerArgs);
    269     glContext->traceGLMessage(&glmsg);
    270 }
    271 
    272 void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
    273     GLMessage glmsg;
    274     GLTraceContext *glContext = getGLTraceContext();
    275 
    276     glmsg.set_function(GLMessage::glBlendColor);
    277 
    278     // copy argument red
    279     GLMessage_DataType *arg_red = glmsg.add_args();
    280     arg_red->set_isarray(false);
    281     arg_red->set_type(GLMessage::DataType::FLOAT);
    282     arg_red->add_floatvalue(red);
    283 
    284     // copy argument green
    285     GLMessage_DataType *arg_green = glmsg.add_args();
    286     arg_green->set_isarray(false);
    287     arg_green->set_type(GLMessage::DataType::FLOAT);
    288     arg_green->add_floatvalue(green);
    289 
    290     // copy argument blue
    291     GLMessage_DataType *arg_blue = glmsg.add_args();
    292     arg_blue->set_isarray(false);
    293     arg_blue->set_type(GLMessage::DataType::FLOAT);
    294     arg_blue->add_floatvalue(blue);
    295 
    296     // copy argument alpha
    297     GLMessage_DataType *arg_alpha = glmsg.add_args();
    298     arg_alpha->set_isarray(false);
    299     arg_alpha->set_type(GLMessage::DataType::FLOAT);
    300     arg_alpha->add_floatvalue(alpha);
    301 
    302     // call function
    303     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    304     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    305     glContext->hooks->gl.glBlendColor(red, green, blue, alpha);
    306     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    307     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    308 
    309     void *pointerArgs[] = {
    310     };
    311 
    312     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    313                               threadStartTime, threadEndTime,
    314                               &glmsg, pointerArgs);
    315     glContext->traceGLMessage(&glmsg);
    316 }
    317 
    318 void GLTrace_glBlendEquation(GLenum mode) {
    319     GLMessage glmsg;
    320     GLTraceContext *glContext = getGLTraceContext();
    321 
    322     glmsg.set_function(GLMessage::glBlendEquation);
    323 
    324     // copy argument mode
    325     GLMessage_DataType *arg_mode = glmsg.add_args();
    326     arg_mode->set_isarray(false);
    327     arg_mode->set_type(GLMessage::DataType::ENUM);
    328     arg_mode->add_intvalue((int)mode);
    329 
    330     // call function
    331     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    332     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    333     glContext->hooks->gl.glBlendEquation(mode);
    334     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    335     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    336 
    337     void *pointerArgs[] = {
    338     };
    339 
    340     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    341                               threadStartTime, threadEndTime,
    342                               &glmsg, pointerArgs);
    343     glContext->traceGLMessage(&glmsg);
    344 }
    345 
    346 void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
    347     GLMessage glmsg;
    348     GLTraceContext *glContext = getGLTraceContext();
    349 
    350     glmsg.set_function(GLMessage::glBlendEquationSeparate);
    351 
    352     // copy argument modeRGB
    353     GLMessage_DataType *arg_modeRGB = glmsg.add_args();
    354     arg_modeRGB->set_isarray(false);
    355     arg_modeRGB->set_type(GLMessage::DataType::ENUM);
    356     arg_modeRGB->add_intvalue((int)modeRGB);
    357 
    358     // copy argument modeAlpha
    359     GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
    360     arg_modeAlpha->set_isarray(false);
    361     arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
    362     arg_modeAlpha->add_intvalue((int)modeAlpha);
    363 
    364     // call function
    365     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    366     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    367     glContext->hooks->gl.glBlendEquationSeparate(modeRGB, modeAlpha);
    368     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    369     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    370 
    371     void *pointerArgs[] = {
    372     };
    373 
    374     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    375                               threadStartTime, threadEndTime,
    376                               &glmsg, pointerArgs);
    377     glContext->traceGLMessage(&glmsg);
    378 }
    379 
    380 void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor) {
    381     GLMessage glmsg;
    382     GLTraceContext *glContext = getGLTraceContext();
    383 
    384     glmsg.set_function(GLMessage::glBlendFunc);
    385 
    386     // copy argument sfactor
    387     GLMessage_DataType *arg_sfactor = glmsg.add_args();
    388     arg_sfactor->set_isarray(false);
    389     arg_sfactor->set_type(GLMessage::DataType::ENUM);
    390     arg_sfactor->add_intvalue((int)sfactor);
    391 
    392     // copy argument dfactor
    393     GLMessage_DataType *arg_dfactor = glmsg.add_args();
    394     arg_dfactor->set_isarray(false);
    395     arg_dfactor->set_type(GLMessage::DataType::ENUM);
    396     arg_dfactor->add_intvalue((int)dfactor);
    397 
    398     // call function
    399     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    400     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    401     glContext->hooks->gl.glBlendFunc(sfactor, dfactor);
    402     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    403     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    404 
    405     void *pointerArgs[] = {
    406     };
    407 
    408     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    409                               threadStartTime, threadEndTime,
    410                               &glmsg, pointerArgs);
    411     glContext->traceGLMessage(&glmsg);
    412 }
    413 
    414 void GLTrace_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
    415     GLMessage glmsg;
    416     GLTraceContext *glContext = getGLTraceContext();
    417 
    418     glmsg.set_function(GLMessage::glBlendFuncSeparate);
    419 
    420     // copy argument srcRGB
    421     GLMessage_DataType *arg_srcRGB = glmsg.add_args();
    422     arg_srcRGB->set_isarray(false);
    423     arg_srcRGB->set_type(GLMessage::DataType::ENUM);
    424     arg_srcRGB->add_intvalue((int)srcRGB);
    425 
    426     // copy argument dstRGB
    427     GLMessage_DataType *arg_dstRGB = glmsg.add_args();
    428     arg_dstRGB->set_isarray(false);
    429     arg_dstRGB->set_type(GLMessage::DataType::ENUM);
    430     arg_dstRGB->add_intvalue((int)dstRGB);
    431 
    432     // copy argument srcAlpha
    433     GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
    434     arg_srcAlpha->set_isarray(false);
    435     arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
    436     arg_srcAlpha->add_intvalue((int)srcAlpha);
    437 
    438     // copy argument dstAlpha
    439     GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
    440     arg_dstAlpha->set_isarray(false);
    441     arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
    442     arg_dstAlpha->add_intvalue((int)dstAlpha);
    443 
    444     // call function
    445     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    446     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    447     glContext->hooks->gl.glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
    448     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    449     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    450 
    451     void *pointerArgs[] = {
    452     };
    453 
    454     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    455                               threadStartTime, threadEndTime,
    456                               &glmsg, pointerArgs);
    457     glContext->traceGLMessage(&glmsg);
    458 }
    459 
    460 void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) {
    461     GLMessage glmsg;
    462     GLTraceContext *glContext = getGLTraceContext();
    463 
    464     glmsg.set_function(GLMessage::glBufferData);
    465 
    466     // copy argument target
    467     GLMessage_DataType *arg_target = glmsg.add_args();
    468     arg_target->set_isarray(false);
    469     arg_target->set_type(GLMessage::DataType::ENUM);
    470     arg_target->add_intvalue((int)target);
    471 
    472     // copy argument size
    473     GLMessage_DataType *arg_size = glmsg.add_args();
    474     arg_size->set_isarray(false);
    475     arg_size->set_type(GLMessage::DataType::INT);
    476     arg_size->add_intvalue(size);
    477 
    478     // copy argument data
    479     GLMessage_DataType *arg_data = glmsg.add_args();
    480     arg_data->set_isarray(false);
    481     arg_data->set_type(GLMessage::DataType::INT);
    482     arg_data->add_intvalue((int)data);
    483 
    484     // copy argument usage
    485     GLMessage_DataType *arg_usage = glmsg.add_args();
    486     arg_usage->set_isarray(false);
    487     arg_usage->set_type(GLMessage::DataType::ENUM);
    488     arg_usage->add_intvalue((int)usage);
    489 
    490     // call function
    491     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    492     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    493     glContext->hooks->gl.glBufferData(target, size, data, usage);
    494     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    495     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    496 
    497     void *pointerArgs[] = {
    498         (void *) data,
    499     };
    500 
    501     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    502                               threadStartTime, threadEndTime,
    503                               &glmsg, pointerArgs);
    504     glContext->traceGLMessage(&glmsg);
    505 }
    506 
    507 void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) {
    508     GLMessage glmsg;
    509     GLTraceContext *glContext = getGLTraceContext();
    510 
    511     glmsg.set_function(GLMessage::glBufferSubData);
    512 
    513     // copy argument target
    514     GLMessage_DataType *arg_target = glmsg.add_args();
    515     arg_target->set_isarray(false);
    516     arg_target->set_type(GLMessage::DataType::ENUM);
    517     arg_target->add_intvalue((int)target);
    518 
    519     // copy argument offset
    520     GLMessage_DataType *arg_offset = glmsg.add_args();
    521     arg_offset->set_isarray(false);
    522     arg_offset->set_type(GLMessage::DataType::INT);
    523     arg_offset->add_intvalue(offset);
    524 
    525     // copy argument size
    526     GLMessage_DataType *arg_size = glmsg.add_args();
    527     arg_size->set_isarray(false);
    528     arg_size->set_type(GLMessage::DataType::INT);
    529     arg_size->add_intvalue(size);
    530 
    531     // copy argument data
    532     GLMessage_DataType *arg_data = glmsg.add_args();
    533     arg_data->set_isarray(false);
    534     arg_data->set_type(GLMessage::DataType::INT);
    535     arg_data->add_intvalue((int)data);
    536 
    537     // call function
    538     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    539     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    540     glContext->hooks->gl.glBufferSubData(target, offset, size, data);
    541     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    542     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    543 
    544     void *pointerArgs[] = {
    545         (void *) data,
    546     };
    547 
    548     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    549                               threadStartTime, threadEndTime,
    550                               &glmsg, pointerArgs);
    551     glContext->traceGLMessage(&glmsg);
    552 }
    553 
    554 GLenum GLTrace_glCheckFramebufferStatus(GLenum target) {
    555     GLMessage glmsg;
    556     GLTraceContext *glContext = getGLTraceContext();
    557 
    558     glmsg.set_function(GLMessage::glCheckFramebufferStatus);
    559 
    560     // copy argument target
    561     GLMessage_DataType *arg_target = glmsg.add_args();
    562     arg_target->set_isarray(false);
    563     arg_target->set_type(GLMessage::DataType::ENUM);
    564     arg_target->add_intvalue((int)target);
    565 
    566     // call function
    567     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    568     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    569     GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatus(target);
    570     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    571     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    572 
    573     // set return value
    574     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
    575     rt->set_isarray(false);
    576     rt->set_type(GLMessage::DataType::ENUM);
    577     rt->add_intvalue((int)retValue);
    578 
    579     void *pointerArgs[] = {
    580     };
    581 
    582     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    583                               threadStartTime, threadEndTime,
    584                               &glmsg, pointerArgs);
    585     glContext->traceGLMessage(&glmsg);
    586 
    587     return retValue;
    588 }
    589 
    590 void GLTrace_glClear(GLbitfield mask) {
    591     GLMessage glmsg;
    592     GLTraceContext *glContext = getGLTraceContext();
    593 
    594     glmsg.set_function(GLMessage::glClear);
    595 
    596     // copy argument mask
    597     GLMessage_DataType *arg_mask = glmsg.add_args();
    598     arg_mask->set_isarray(false);
    599     arg_mask->set_type(GLMessage::DataType::INT);
    600     arg_mask->add_intvalue(mask);
    601 
    602     // call function
    603     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    604     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    605     glContext->hooks->gl.glClear(mask);
    606     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    607     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    608 
    609     void *pointerArgs[] = {
    610     };
    611 
    612     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    613                               threadStartTime, threadEndTime,
    614                               &glmsg, pointerArgs);
    615     glContext->traceGLMessage(&glmsg);
    616 }
    617 
    618 void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) {
    619     GLMessage glmsg;
    620     GLTraceContext *glContext = getGLTraceContext();
    621 
    622     glmsg.set_function(GLMessage::glClearColor);
    623 
    624     // copy argument red
    625     GLMessage_DataType *arg_red = glmsg.add_args();
    626     arg_red->set_isarray(false);
    627     arg_red->set_type(GLMessage::DataType::FLOAT);
    628     arg_red->add_floatvalue(red);
    629 
    630     // copy argument green
    631     GLMessage_DataType *arg_green = glmsg.add_args();
    632     arg_green->set_isarray(false);
    633     arg_green->set_type(GLMessage::DataType::FLOAT);
    634     arg_green->add_floatvalue(green);
    635 
    636     // copy argument blue
    637     GLMessage_DataType *arg_blue = glmsg.add_args();
    638     arg_blue->set_isarray(false);
    639     arg_blue->set_type(GLMessage::DataType::FLOAT);
    640     arg_blue->add_floatvalue(blue);
    641 
    642     // copy argument alpha
    643     GLMessage_DataType *arg_alpha = glmsg.add_args();
    644     arg_alpha->set_isarray(false);
    645     arg_alpha->set_type(GLMessage::DataType::FLOAT);
    646     arg_alpha->add_floatvalue(alpha);
    647 
    648     // call function
    649     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    650     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    651     glContext->hooks->gl.glClearColor(red, green, blue, alpha);
    652     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    653     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    654 
    655     void *pointerArgs[] = {
    656     };
    657 
    658     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    659                               threadStartTime, threadEndTime,
    660                               &glmsg, pointerArgs);
    661     glContext->traceGLMessage(&glmsg);
    662 }
    663 
    664 void GLTrace_glClearDepthf(GLclampf depth) {
    665     GLMessage glmsg;
    666     GLTraceContext *glContext = getGLTraceContext();
    667 
    668     glmsg.set_function(GLMessage::glClearDepthf);
    669 
    670     // copy argument depth
    671     GLMessage_DataType *arg_depth = glmsg.add_args();
    672     arg_depth->set_isarray(false);
    673     arg_depth->set_type(GLMessage::DataType::FLOAT);
    674     arg_depth->add_floatvalue(depth);
    675 
    676     // call function
    677     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    678     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    679     glContext->hooks->gl.glClearDepthf(depth);
    680     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    681     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    682 
    683     void *pointerArgs[] = {
    684     };
    685 
    686     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    687                               threadStartTime, threadEndTime,
    688                               &glmsg, pointerArgs);
    689     glContext->traceGLMessage(&glmsg);
    690 }
    691 
    692 void GLTrace_glClearStencil(GLint s) {
    693     GLMessage glmsg;
    694     GLTraceContext *glContext = getGLTraceContext();
    695 
    696     glmsg.set_function(GLMessage::glClearStencil);
    697 
    698     // copy argument s
    699     GLMessage_DataType *arg_s = glmsg.add_args();
    700     arg_s->set_isarray(false);
    701     arg_s->set_type(GLMessage::DataType::INT);
    702     arg_s->add_intvalue(s);
    703 
    704     // call function
    705     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    706     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    707     glContext->hooks->gl.glClearStencil(s);
    708     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    709     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    710 
    711     void *pointerArgs[] = {
    712     };
    713 
    714     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    715                               threadStartTime, threadEndTime,
    716                               &glmsg, pointerArgs);
    717     glContext->traceGLMessage(&glmsg);
    718 }
    719 
    720 void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) {
    721     GLMessage glmsg;
    722     GLTraceContext *glContext = getGLTraceContext();
    723 
    724     glmsg.set_function(GLMessage::glColorMask);
    725 
    726     // copy argument red
    727     GLMessage_DataType *arg_red = glmsg.add_args();
    728     arg_red->set_isarray(false);
    729     arg_red->set_type(GLMessage::DataType::BOOL);
    730     arg_red->add_boolvalue(red);
    731 
    732     // copy argument green
    733     GLMessage_DataType *arg_green = glmsg.add_args();
    734     arg_green->set_isarray(false);
    735     arg_green->set_type(GLMessage::DataType::BOOL);
    736     arg_green->add_boolvalue(green);
    737 
    738     // copy argument blue
    739     GLMessage_DataType *arg_blue = glmsg.add_args();
    740     arg_blue->set_isarray(false);
    741     arg_blue->set_type(GLMessage::DataType::BOOL);
    742     arg_blue->add_boolvalue(blue);
    743 
    744     // copy argument alpha
    745     GLMessage_DataType *arg_alpha = glmsg.add_args();
    746     arg_alpha->set_isarray(false);
    747     arg_alpha->set_type(GLMessage::DataType::BOOL);
    748     arg_alpha->add_boolvalue(alpha);
    749 
    750     // call function
    751     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    752     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    753     glContext->hooks->gl.glColorMask(red, green, blue, alpha);
    754     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    755     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    756 
    757     void *pointerArgs[] = {
    758     };
    759 
    760     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    761                               threadStartTime, threadEndTime,
    762                               &glmsg, pointerArgs);
    763     glContext->traceGLMessage(&glmsg);
    764 }
    765 
    766 void GLTrace_glCompileShader(GLuint shader) {
    767     GLMessage glmsg;
    768     GLTraceContext *glContext = getGLTraceContext();
    769 
    770     glmsg.set_function(GLMessage::glCompileShader);
    771 
    772     // copy argument shader
    773     GLMessage_DataType *arg_shader = glmsg.add_args();
    774     arg_shader->set_isarray(false);
    775     arg_shader->set_type(GLMessage::DataType::INT);
    776     arg_shader->add_intvalue(shader);
    777 
    778     // call function
    779     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    780     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    781     glContext->hooks->gl.glCompileShader(shader);
    782     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    783     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    784 
    785     void *pointerArgs[] = {
    786     };
    787 
    788     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    789                               threadStartTime, threadEndTime,
    790                               &glmsg, pointerArgs);
    791     glContext->traceGLMessage(&glmsg);
    792 }
    793 
    794 void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) {
    795     GLMessage glmsg;
    796     GLTraceContext *glContext = getGLTraceContext();
    797 
    798     glmsg.set_function(GLMessage::glCompressedTexImage2D);
    799 
    800     // copy argument target
    801     GLMessage_DataType *arg_target = glmsg.add_args();
    802     arg_target->set_isarray(false);
    803     arg_target->set_type(GLMessage::DataType::ENUM);
    804     arg_target->add_intvalue((int)target);
    805 
    806     // copy argument level
    807     GLMessage_DataType *arg_level = glmsg.add_args();
    808     arg_level->set_isarray(false);
    809     arg_level->set_type(GLMessage::DataType::INT);
    810     arg_level->add_intvalue(level);
    811 
    812     // copy argument internalformat
    813     GLMessage_DataType *arg_internalformat = glmsg.add_args();
    814     arg_internalformat->set_isarray(false);
    815     arg_internalformat->set_type(GLMessage::DataType::ENUM);
    816     arg_internalformat->add_intvalue((int)internalformat);
    817 
    818     // copy argument width
    819     GLMessage_DataType *arg_width = glmsg.add_args();
    820     arg_width->set_isarray(false);
    821     arg_width->set_type(GLMessage::DataType::INT);
    822     arg_width->add_intvalue(width);
    823 
    824     // copy argument height
    825     GLMessage_DataType *arg_height = glmsg.add_args();
    826     arg_height->set_isarray(false);
    827     arg_height->set_type(GLMessage::DataType::INT);
    828     arg_height->add_intvalue(height);
    829 
    830     // copy argument border
    831     GLMessage_DataType *arg_border = glmsg.add_args();
    832     arg_border->set_isarray(false);
    833     arg_border->set_type(GLMessage::DataType::INT);
    834     arg_border->add_intvalue(border);
    835 
    836     // copy argument imageSize
    837     GLMessage_DataType *arg_imageSize = glmsg.add_args();
    838     arg_imageSize->set_isarray(false);
    839     arg_imageSize->set_type(GLMessage::DataType::INT);
    840     arg_imageSize->add_intvalue(imageSize);
    841 
    842     // copy argument data
    843     GLMessage_DataType *arg_data = glmsg.add_args();
    844     arg_data->set_isarray(false);
    845     arg_data->set_type(GLMessage::DataType::INT);
    846     arg_data->add_intvalue((int)data);
    847 
    848     // call function
    849     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    850     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    851     glContext->hooks->gl.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
    852     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    853     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    854 
    855     void *pointerArgs[] = {
    856         (void *) data,
    857     };
    858 
    859     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    860                               threadStartTime, threadEndTime,
    861                               &glmsg, pointerArgs);
    862     glContext->traceGLMessage(&glmsg);
    863 }
    864 
    865 void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) {
    866     GLMessage glmsg;
    867     GLTraceContext *glContext = getGLTraceContext();
    868 
    869     glmsg.set_function(GLMessage::glCompressedTexSubImage2D);
    870 
    871     // copy argument target
    872     GLMessage_DataType *arg_target = glmsg.add_args();
    873     arg_target->set_isarray(false);
    874     arg_target->set_type(GLMessage::DataType::ENUM);
    875     arg_target->add_intvalue((int)target);
    876 
    877     // copy argument level
    878     GLMessage_DataType *arg_level = glmsg.add_args();
    879     arg_level->set_isarray(false);
    880     arg_level->set_type(GLMessage::DataType::INT);
    881     arg_level->add_intvalue(level);
    882 
    883     // copy argument xoffset
    884     GLMessage_DataType *arg_xoffset = glmsg.add_args();
    885     arg_xoffset->set_isarray(false);
    886     arg_xoffset->set_type(GLMessage::DataType::INT);
    887     arg_xoffset->add_intvalue(xoffset);
    888 
    889     // copy argument yoffset
    890     GLMessage_DataType *arg_yoffset = glmsg.add_args();
    891     arg_yoffset->set_isarray(false);
    892     arg_yoffset->set_type(GLMessage::DataType::INT);
    893     arg_yoffset->add_intvalue(yoffset);
    894 
    895     // copy argument width
    896     GLMessage_DataType *arg_width = glmsg.add_args();
    897     arg_width->set_isarray(false);
    898     arg_width->set_type(GLMessage::DataType::INT);
    899     arg_width->add_intvalue(width);
    900 
    901     // copy argument height
    902     GLMessage_DataType *arg_height = glmsg.add_args();
    903     arg_height->set_isarray(false);
    904     arg_height->set_type(GLMessage::DataType::INT);
    905     arg_height->add_intvalue(height);
    906 
    907     // copy argument format
    908     GLMessage_DataType *arg_format = glmsg.add_args();
    909     arg_format->set_isarray(false);
    910     arg_format->set_type(GLMessage::DataType::ENUM);
    911     arg_format->add_intvalue((int)format);
    912 
    913     // copy argument imageSize
    914     GLMessage_DataType *arg_imageSize = glmsg.add_args();
    915     arg_imageSize->set_isarray(false);
    916     arg_imageSize->set_type(GLMessage::DataType::INT);
    917     arg_imageSize->add_intvalue(imageSize);
    918 
    919     // copy argument data
    920     GLMessage_DataType *arg_data = glmsg.add_args();
    921     arg_data->set_isarray(false);
    922     arg_data->set_type(GLMessage::DataType::INT);
    923     arg_data->add_intvalue((int)data);
    924 
    925     // call function
    926     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    927     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    928     glContext->hooks->gl.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
    929     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
    930     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
    931 
    932     void *pointerArgs[] = {
    933         (void *) data,
    934     };
    935 
    936     fixupGLMessage(glContext, wallStartTime, wallEndTime,
    937                               threadStartTime, threadEndTime,
    938                               &glmsg, pointerArgs);
    939     glContext->traceGLMessage(&glmsg);
    940 }
    941 
    942 void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) {
    943     GLMessage glmsg;
    944     GLTraceContext *glContext = getGLTraceContext();
    945 
    946     glmsg.set_function(GLMessage::glCopyTexImage2D);
    947 
    948     // copy argument target
    949     GLMessage_DataType *arg_target = glmsg.add_args();
    950     arg_target->set_isarray(false);
    951     arg_target->set_type(GLMessage::DataType::ENUM);
    952     arg_target->add_intvalue((int)target);
    953 
    954     // copy argument level
    955     GLMessage_DataType *arg_level = glmsg.add_args();
    956     arg_level->set_isarray(false);
    957     arg_level->set_type(GLMessage::DataType::INT);
    958     arg_level->add_intvalue(level);
    959 
    960     // copy argument internalformat
    961     GLMessage_DataType *arg_internalformat = glmsg.add_args();
    962     arg_internalformat->set_isarray(false);
    963     arg_internalformat->set_type(GLMessage::DataType::ENUM);
    964     arg_internalformat->add_intvalue((int)internalformat);
    965 
    966     // copy argument x
    967     GLMessage_DataType *arg_x = glmsg.add_args();
    968     arg_x->set_isarray(false);
    969     arg_x->set_type(GLMessage::DataType::INT);
    970     arg_x->add_intvalue(x);
    971 
    972     // copy argument y
    973     GLMessage_DataType *arg_y = glmsg.add_args();
    974     arg_y->set_isarray(false);
    975     arg_y->set_type(GLMessage::DataType::INT);
    976     arg_y->add_intvalue(y);
    977 
    978     // copy argument width
    979     GLMessage_DataType *arg_width = glmsg.add_args();
    980     arg_width->set_isarray(false);
    981     arg_width->set_type(GLMessage::DataType::INT);
    982     arg_width->add_intvalue(width);
    983 
    984     // copy argument height
    985     GLMessage_DataType *arg_height = glmsg.add_args();
    986     arg_height->set_isarray(false);
    987     arg_height->set_type(GLMessage::DataType::INT);
    988     arg_height->add_intvalue(height);
    989 
    990     // copy argument border
    991     GLMessage_DataType *arg_border = glmsg.add_args();
    992     arg_border->set_isarray(false);
    993     arg_border->set_type(GLMessage::DataType::INT);
    994     arg_border->add_intvalue(border);
    995 
    996     // call function
    997     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
    998     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
    999     glContext->hooks->gl.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
   1000     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1001     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1002 
   1003     void *pointerArgs[] = {
   1004     };
   1005 
   1006     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1007                               threadStartTime, threadEndTime,
   1008                               &glmsg, pointerArgs);
   1009     glContext->traceGLMessage(&glmsg);
   1010 }
   1011 
   1012 void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
   1013     GLMessage glmsg;
   1014     GLTraceContext *glContext = getGLTraceContext();
   1015 
   1016     glmsg.set_function(GLMessage::glCopyTexSubImage2D);
   1017 
   1018     // copy argument target
   1019     GLMessage_DataType *arg_target = glmsg.add_args();
   1020     arg_target->set_isarray(false);
   1021     arg_target->set_type(GLMessage::DataType::ENUM);
   1022     arg_target->add_intvalue((int)target);
   1023 
   1024     // copy argument level
   1025     GLMessage_DataType *arg_level = glmsg.add_args();
   1026     arg_level->set_isarray(false);
   1027     arg_level->set_type(GLMessage::DataType::INT);
   1028     arg_level->add_intvalue(level);
   1029 
   1030     // copy argument xoffset
   1031     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   1032     arg_xoffset->set_isarray(false);
   1033     arg_xoffset->set_type(GLMessage::DataType::INT);
   1034     arg_xoffset->add_intvalue(xoffset);
   1035 
   1036     // copy argument yoffset
   1037     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   1038     arg_yoffset->set_isarray(false);
   1039     arg_yoffset->set_type(GLMessage::DataType::INT);
   1040     arg_yoffset->add_intvalue(yoffset);
   1041 
   1042     // copy argument x
   1043     GLMessage_DataType *arg_x = glmsg.add_args();
   1044     arg_x->set_isarray(false);
   1045     arg_x->set_type(GLMessage::DataType::INT);
   1046     arg_x->add_intvalue(x);
   1047 
   1048     // copy argument y
   1049     GLMessage_DataType *arg_y = glmsg.add_args();
   1050     arg_y->set_isarray(false);
   1051     arg_y->set_type(GLMessage::DataType::INT);
   1052     arg_y->add_intvalue(y);
   1053 
   1054     // copy argument width
   1055     GLMessage_DataType *arg_width = glmsg.add_args();
   1056     arg_width->set_isarray(false);
   1057     arg_width->set_type(GLMessage::DataType::INT);
   1058     arg_width->add_intvalue(width);
   1059 
   1060     // copy argument height
   1061     GLMessage_DataType *arg_height = glmsg.add_args();
   1062     arg_height->set_isarray(false);
   1063     arg_height->set_type(GLMessage::DataType::INT);
   1064     arg_height->add_intvalue(height);
   1065 
   1066     // call function
   1067     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1068     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1069     glContext->hooks->gl.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
   1070     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1071     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1072 
   1073     void *pointerArgs[] = {
   1074     };
   1075 
   1076     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1077                               threadStartTime, threadEndTime,
   1078                               &glmsg, pointerArgs);
   1079     glContext->traceGLMessage(&glmsg);
   1080 }
   1081 
   1082 GLuint GLTrace_glCreateProgram(void) {
   1083     GLMessage glmsg;
   1084     GLTraceContext *glContext = getGLTraceContext();
   1085 
   1086     glmsg.set_function(GLMessage::glCreateProgram);
   1087 
   1088     // call function
   1089     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1090     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1091     GLuint retValue = glContext->hooks->gl.glCreateProgram();
   1092     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1093     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1094 
   1095     // set return value
   1096     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   1097     rt->set_isarray(false);
   1098     rt->set_type(GLMessage::DataType::INT);
   1099     rt->add_intvalue(retValue);
   1100 
   1101     void *pointerArgs[] = {
   1102     };
   1103 
   1104     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1105                               threadStartTime, threadEndTime,
   1106                               &glmsg, pointerArgs);
   1107     glContext->traceGLMessage(&glmsg);
   1108 
   1109     return retValue;
   1110 }
   1111 
   1112 GLuint GLTrace_glCreateShader(GLenum type) {
   1113     GLMessage glmsg;
   1114     GLTraceContext *glContext = getGLTraceContext();
   1115 
   1116     glmsg.set_function(GLMessage::glCreateShader);
   1117 
   1118     // copy argument type
   1119     GLMessage_DataType *arg_type = glmsg.add_args();
   1120     arg_type->set_isarray(false);
   1121     arg_type->set_type(GLMessage::DataType::ENUM);
   1122     arg_type->add_intvalue((int)type);
   1123 
   1124     // call function
   1125     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1126     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1127     GLuint retValue = glContext->hooks->gl.glCreateShader(type);
   1128     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1129     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1130 
   1131     // set return value
   1132     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   1133     rt->set_isarray(false);
   1134     rt->set_type(GLMessage::DataType::INT);
   1135     rt->add_intvalue(retValue);
   1136 
   1137     void *pointerArgs[] = {
   1138     };
   1139 
   1140     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1141                               threadStartTime, threadEndTime,
   1142                               &glmsg, pointerArgs);
   1143     glContext->traceGLMessage(&glmsg);
   1144 
   1145     return retValue;
   1146 }
   1147 
   1148 void GLTrace_glCullFace(GLenum mode) {
   1149     GLMessage glmsg;
   1150     GLTraceContext *glContext = getGLTraceContext();
   1151 
   1152     glmsg.set_function(GLMessage::glCullFace);
   1153 
   1154     // copy argument mode
   1155     GLMessage_DataType *arg_mode = glmsg.add_args();
   1156     arg_mode->set_isarray(false);
   1157     arg_mode->set_type(GLMessage::DataType::ENUM);
   1158     arg_mode->add_intvalue((int)mode);
   1159 
   1160     // call function
   1161     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1162     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1163     glContext->hooks->gl.glCullFace(mode);
   1164     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1165     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1166 
   1167     void *pointerArgs[] = {
   1168     };
   1169 
   1170     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1171                               threadStartTime, threadEndTime,
   1172                               &glmsg, pointerArgs);
   1173     glContext->traceGLMessage(&glmsg);
   1174 }
   1175 
   1176 void GLTrace_glDeleteBuffers(GLsizei n, const GLuint* buffers) {
   1177     GLMessage glmsg;
   1178     GLTraceContext *glContext = getGLTraceContext();
   1179 
   1180     glmsg.set_function(GLMessage::glDeleteBuffers);
   1181 
   1182     // copy argument n
   1183     GLMessage_DataType *arg_n = glmsg.add_args();
   1184     arg_n->set_isarray(false);
   1185     arg_n->set_type(GLMessage::DataType::INT);
   1186     arg_n->add_intvalue(n);
   1187 
   1188     // copy argument buffers
   1189     GLMessage_DataType *arg_buffers = glmsg.add_args();
   1190     arg_buffers->set_isarray(false);
   1191     arg_buffers->set_type(GLMessage::DataType::INT);
   1192     arg_buffers->add_intvalue((int)buffers);
   1193 
   1194     // call function
   1195     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1196     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1197     glContext->hooks->gl.glDeleteBuffers(n, buffers);
   1198     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1199     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1200 
   1201     void *pointerArgs[] = {
   1202         (void *) buffers,
   1203     };
   1204 
   1205     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1206                               threadStartTime, threadEndTime,
   1207                               &glmsg, pointerArgs);
   1208     glContext->traceGLMessage(&glmsg);
   1209 }
   1210 
   1211 void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) {
   1212     GLMessage glmsg;
   1213     GLTraceContext *glContext = getGLTraceContext();
   1214 
   1215     glmsg.set_function(GLMessage::glDeleteFramebuffers);
   1216 
   1217     // copy argument n
   1218     GLMessage_DataType *arg_n = glmsg.add_args();
   1219     arg_n->set_isarray(false);
   1220     arg_n->set_type(GLMessage::DataType::INT);
   1221     arg_n->add_intvalue(n);
   1222 
   1223     // copy argument framebuffers
   1224     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   1225     arg_framebuffers->set_isarray(false);
   1226     arg_framebuffers->set_type(GLMessage::DataType::INT);
   1227     arg_framebuffers->add_intvalue((int)framebuffers);
   1228 
   1229     // call function
   1230     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1231     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1232     glContext->hooks->gl.glDeleteFramebuffers(n, framebuffers);
   1233     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1234     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1235 
   1236     void *pointerArgs[] = {
   1237         (void *) framebuffers,
   1238     };
   1239 
   1240     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1241                               threadStartTime, threadEndTime,
   1242                               &glmsg, pointerArgs);
   1243     glContext->traceGLMessage(&glmsg);
   1244 }
   1245 
   1246 void GLTrace_glDeleteProgram(GLuint program) {
   1247     GLMessage glmsg;
   1248     GLTraceContext *glContext = getGLTraceContext();
   1249 
   1250     glmsg.set_function(GLMessage::glDeleteProgram);
   1251 
   1252     // copy argument program
   1253     GLMessage_DataType *arg_program = glmsg.add_args();
   1254     arg_program->set_isarray(false);
   1255     arg_program->set_type(GLMessage::DataType::INT);
   1256     arg_program->add_intvalue(program);
   1257 
   1258     // call function
   1259     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1260     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1261     glContext->hooks->gl.glDeleteProgram(program);
   1262     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1263     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1264 
   1265     void *pointerArgs[] = {
   1266     };
   1267 
   1268     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1269                               threadStartTime, threadEndTime,
   1270                               &glmsg, pointerArgs);
   1271     glContext->traceGLMessage(&glmsg);
   1272 }
   1273 
   1274 void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) {
   1275     GLMessage glmsg;
   1276     GLTraceContext *glContext = getGLTraceContext();
   1277 
   1278     glmsg.set_function(GLMessage::glDeleteRenderbuffers);
   1279 
   1280     // copy argument n
   1281     GLMessage_DataType *arg_n = glmsg.add_args();
   1282     arg_n->set_isarray(false);
   1283     arg_n->set_type(GLMessage::DataType::INT);
   1284     arg_n->add_intvalue(n);
   1285 
   1286     // copy argument renderbuffers
   1287     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   1288     arg_renderbuffers->set_isarray(false);
   1289     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   1290     arg_renderbuffers->add_intvalue((int)renderbuffers);
   1291 
   1292     // call function
   1293     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1294     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1295     glContext->hooks->gl.glDeleteRenderbuffers(n, renderbuffers);
   1296     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1297     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1298 
   1299     void *pointerArgs[] = {
   1300         (void *) renderbuffers,
   1301     };
   1302 
   1303     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1304                               threadStartTime, threadEndTime,
   1305                               &glmsg, pointerArgs);
   1306     glContext->traceGLMessage(&glmsg);
   1307 }
   1308 
   1309 void GLTrace_glDeleteShader(GLuint shader) {
   1310     GLMessage glmsg;
   1311     GLTraceContext *glContext = getGLTraceContext();
   1312 
   1313     glmsg.set_function(GLMessage::glDeleteShader);
   1314 
   1315     // copy argument shader
   1316     GLMessage_DataType *arg_shader = glmsg.add_args();
   1317     arg_shader->set_isarray(false);
   1318     arg_shader->set_type(GLMessage::DataType::INT);
   1319     arg_shader->add_intvalue(shader);
   1320 
   1321     // call function
   1322     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1323     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1324     glContext->hooks->gl.glDeleteShader(shader);
   1325     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1326     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1327 
   1328     void *pointerArgs[] = {
   1329     };
   1330 
   1331     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1332                               threadStartTime, threadEndTime,
   1333                               &glmsg, pointerArgs);
   1334     glContext->traceGLMessage(&glmsg);
   1335 }
   1336 
   1337 void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures) {
   1338     GLMessage glmsg;
   1339     GLTraceContext *glContext = getGLTraceContext();
   1340 
   1341     glmsg.set_function(GLMessage::glDeleteTextures);
   1342 
   1343     // copy argument n
   1344     GLMessage_DataType *arg_n = glmsg.add_args();
   1345     arg_n->set_isarray(false);
   1346     arg_n->set_type(GLMessage::DataType::INT);
   1347     arg_n->add_intvalue(n);
   1348 
   1349     // copy argument textures
   1350     GLMessage_DataType *arg_textures = glmsg.add_args();
   1351     arg_textures->set_isarray(false);
   1352     arg_textures->set_type(GLMessage::DataType::INT);
   1353     arg_textures->add_intvalue((int)textures);
   1354 
   1355     // call function
   1356     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1357     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1358     glContext->hooks->gl.glDeleteTextures(n, textures);
   1359     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1360     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1361 
   1362     void *pointerArgs[] = {
   1363         (void *) textures,
   1364     };
   1365 
   1366     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1367                               threadStartTime, threadEndTime,
   1368                               &glmsg, pointerArgs);
   1369     glContext->traceGLMessage(&glmsg);
   1370 }
   1371 
   1372 void GLTrace_glDepthFunc(GLenum func) {
   1373     GLMessage glmsg;
   1374     GLTraceContext *glContext = getGLTraceContext();
   1375 
   1376     glmsg.set_function(GLMessage::glDepthFunc);
   1377 
   1378     // copy argument func
   1379     GLMessage_DataType *arg_func = glmsg.add_args();
   1380     arg_func->set_isarray(false);
   1381     arg_func->set_type(GLMessage::DataType::ENUM);
   1382     arg_func->add_intvalue((int)func);
   1383 
   1384     // call function
   1385     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1386     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1387     glContext->hooks->gl.glDepthFunc(func);
   1388     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1389     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1390 
   1391     void *pointerArgs[] = {
   1392     };
   1393 
   1394     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1395                               threadStartTime, threadEndTime,
   1396                               &glmsg, pointerArgs);
   1397     glContext->traceGLMessage(&glmsg);
   1398 }
   1399 
   1400 void GLTrace_glDepthMask(GLboolean flag) {
   1401     GLMessage glmsg;
   1402     GLTraceContext *glContext = getGLTraceContext();
   1403 
   1404     glmsg.set_function(GLMessage::glDepthMask);
   1405 
   1406     // copy argument flag
   1407     GLMessage_DataType *arg_flag = glmsg.add_args();
   1408     arg_flag->set_isarray(false);
   1409     arg_flag->set_type(GLMessage::DataType::BOOL);
   1410     arg_flag->add_boolvalue(flag);
   1411 
   1412     // call function
   1413     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1414     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1415     glContext->hooks->gl.glDepthMask(flag);
   1416     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1417     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1418 
   1419     void *pointerArgs[] = {
   1420     };
   1421 
   1422     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1423                               threadStartTime, threadEndTime,
   1424                               &glmsg, pointerArgs);
   1425     glContext->traceGLMessage(&glmsg);
   1426 }
   1427 
   1428 void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar) {
   1429     GLMessage glmsg;
   1430     GLTraceContext *glContext = getGLTraceContext();
   1431 
   1432     glmsg.set_function(GLMessage::glDepthRangef);
   1433 
   1434     // copy argument zNear
   1435     GLMessage_DataType *arg_zNear = glmsg.add_args();
   1436     arg_zNear->set_isarray(false);
   1437     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   1438     arg_zNear->add_floatvalue(zNear);
   1439 
   1440     // copy argument zFar
   1441     GLMessage_DataType *arg_zFar = glmsg.add_args();
   1442     arg_zFar->set_isarray(false);
   1443     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   1444     arg_zFar->add_floatvalue(zFar);
   1445 
   1446     // call function
   1447     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1448     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1449     glContext->hooks->gl.glDepthRangef(zNear, zFar);
   1450     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1451     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1452 
   1453     void *pointerArgs[] = {
   1454     };
   1455 
   1456     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1457                               threadStartTime, threadEndTime,
   1458                               &glmsg, pointerArgs);
   1459     glContext->traceGLMessage(&glmsg);
   1460 }
   1461 
   1462 void GLTrace_glDetachShader(GLuint program, GLuint shader) {
   1463     GLMessage glmsg;
   1464     GLTraceContext *glContext = getGLTraceContext();
   1465 
   1466     glmsg.set_function(GLMessage::glDetachShader);
   1467 
   1468     // copy argument program
   1469     GLMessage_DataType *arg_program = glmsg.add_args();
   1470     arg_program->set_isarray(false);
   1471     arg_program->set_type(GLMessage::DataType::INT);
   1472     arg_program->add_intvalue(program);
   1473 
   1474     // copy argument shader
   1475     GLMessage_DataType *arg_shader = glmsg.add_args();
   1476     arg_shader->set_isarray(false);
   1477     arg_shader->set_type(GLMessage::DataType::INT);
   1478     arg_shader->add_intvalue(shader);
   1479 
   1480     // call function
   1481     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1482     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1483     glContext->hooks->gl.glDetachShader(program, shader);
   1484     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1485     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1486 
   1487     void *pointerArgs[] = {
   1488     };
   1489 
   1490     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1491                               threadStartTime, threadEndTime,
   1492                               &glmsg, pointerArgs);
   1493     glContext->traceGLMessage(&glmsg);
   1494 }
   1495 
   1496 void GLTrace_glDisable(GLenum cap) {
   1497     GLMessage glmsg;
   1498     GLTraceContext *glContext = getGLTraceContext();
   1499 
   1500     glmsg.set_function(GLMessage::glDisable);
   1501 
   1502     // copy argument cap
   1503     GLMessage_DataType *arg_cap = glmsg.add_args();
   1504     arg_cap->set_isarray(false);
   1505     arg_cap->set_type(GLMessage::DataType::ENUM);
   1506     arg_cap->add_intvalue((int)cap);
   1507 
   1508     // call function
   1509     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1510     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1511     glContext->hooks->gl.glDisable(cap);
   1512     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1513     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1514 
   1515     void *pointerArgs[] = {
   1516     };
   1517 
   1518     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1519                               threadStartTime, threadEndTime,
   1520                               &glmsg, pointerArgs);
   1521     glContext->traceGLMessage(&glmsg);
   1522 }
   1523 
   1524 void GLTrace_glDisableVertexAttribArray(GLuint index) {
   1525     GLMessage glmsg;
   1526     GLTraceContext *glContext = getGLTraceContext();
   1527 
   1528     glmsg.set_function(GLMessage::glDisableVertexAttribArray);
   1529 
   1530     // copy argument index
   1531     GLMessage_DataType *arg_index = glmsg.add_args();
   1532     arg_index->set_isarray(false);
   1533     arg_index->set_type(GLMessage::DataType::INT);
   1534     arg_index->add_intvalue(index);
   1535 
   1536     // call function
   1537     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1538     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1539     glContext->hooks->gl.glDisableVertexAttribArray(index);
   1540     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1541     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1542 
   1543     void *pointerArgs[] = {
   1544     };
   1545 
   1546     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1547                               threadStartTime, threadEndTime,
   1548                               &glmsg, pointerArgs);
   1549     glContext->traceGLMessage(&glmsg);
   1550 }
   1551 
   1552 void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count) {
   1553     GLMessage glmsg;
   1554     GLTraceContext *glContext = getGLTraceContext();
   1555 
   1556     glmsg.set_function(GLMessage::glDrawArrays);
   1557 
   1558     // copy argument mode
   1559     GLMessage_DataType *arg_mode = glmsg.add_args();
   1560     arg_mode->set_isarray(false);
   1561     arg_mode->set_type(GLMessage::DataType::ENUM);
   1562     arg_mode->add_intvalue((int)mode);
   1563 
   1564     // copy argument first
   1565     GLMessage_DataType *arg_first = glmsg.add_args();
   1566     arg_first->set_isarray(false);
   1567     arg_first->set_type(GLMessage::DataType::INT);
   1568     arg_first->add_intvalue(first);
   1569 
   1570     // copy argument count
   1571     GLMessage_DataType *arg_count = glmsg.add_args();
   1572     arg_count->set_isarray(false);
   1573     arg_count->set_type(GLMessage::DataType::INT);
   1574     arg_count->add_intvalue(count);
   1575 
   1576     // call function
   1577     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1578     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1579     glContext->hooks->gl.glDrawArrays(mode, first, count);
   1580     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1581     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1582 
   1583     void *pointerArgs[] = {
   1584     };
   1585 
   1586     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1587                               threadStartTime, threadEndTime,
   1588                               &glmsg, pointerArgs);
   1589     glContext->traceGLMessage(&glmsg);
   1590 }
   1591 
   1592 void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) {
   1593     GLMessage glmsg;
   1594     GLTraceContext *glContext = getGLTraceContext();
   1595 
   1596     glmsg.set_function(GLMessage::glDrawElements);
   1597 
   1598     // copy argument mode
   1599     GLMessage_DataType *arg_mode = glmsg.add_args();
   1600     arg_mode->set_isarray(false);
   1601     arg_mode->set_type(GLMessage::DataType::ENUM);
   1602     arg_mode->add_intvalue((int)mode);
   1603 
   1604     // copy argument count
   1605     GLMessage_DataType *arg_count = glmsg.add_args();
   1606     arg_count->set_isarray(false);
   1607     arg_count->set_type(GLMessage::DataType::INT);
   1608     arg_count->add_intvalue(count);
   1609 
   1610     // copy argument type
   1611     GLMessage_DataType *arg_type = glmsg.add_args();
   1612     arg_type->set_isarray(false);
   1613     arg_type->set_type(GLMessage::DataType::ENUM);
   1614     arg_type->add_intvalue((int)type);
   1615 
   1616     // copy argument indices
   1617     GLMessage_DataType *arg_indices = glmsg.add_args();
   1618     arg_indices->set_isarray(false);
   1619     arg_indices->set_type(GLMessage::DataType::INT);
   1620     arg_indices->add_intvalue((int)indices);
   1621 
   1622     // call function
   1623     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1624     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1625     glContext->hooks->gl.glDrawElements(mode, count, type, indices);
   1626     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1627     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1628 
   1629     void *pointerArgs[] = {
   1630         (void *) indices,
   1631     };
   1632 
   1633     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1634                               threadStartTime, threadEndTime,
   1635                               &glmsg, pointerArgs);
   1636     glContext->traceGLMessage(&glmsg);
   1637 }
   1638 
   1639 void GLTrace_glEnable(GLenum cap) {
   1640     GLMessage glmsg;
   1641     GLTraceContext *glContext = getGLTraceContext();
   1642 
   1643     glmsg.set_function(GLMessage::glEnable);
   1644 
   1645     // copy argument cap
   1646     GLMessage_DataType *arg_cap = glmsg.add_args();
   1647     arg_cap->set_isarray(false);
   1648     arg_cap->set_type(GLMessage::DataType::ENUM);
   1649     arg_cap->add_intvalue((int)cap);
   1650 
   1651     // call function
   1652     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1653     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1654     glContext->hooks->gl.glEnable(cap);
   1655     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1656     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1657 
   1658     void *pointerArgs[] = {
   1659     };
   1660 
   1661     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1662                               threadStartTime, threadEndTime,
   1663                               &glmsg, pointerArgs);
   1664     glContext->traceGLMessage(&glmsg);
   1665 }
   1666 
   1667 void GLTrace_glEnableVertexAttribArray(GLuint index) {
   1668     GLMessage glmsg;
   1669     GLTraceContext *glContext = getGLTraceContext();
   1670 
   1671     glmsg.set_function(GLMessage::glEnableVertexAttribArray);
   1672 
   1673     // copy argument index
   1674     GLMessage_DataType *arg_index = glmsg.add_args();
   1675     arg_index->set_isarray(false);
   1676     arg_index->set_type(GLMessage::DataType::INT);
   1677     arg_index->add_intvalue(index);
   1678 
   1679     // call function
   1680     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1681     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1682     glContext->hooks->gl.glEnableVertexAttribArray(index);
   1683     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1684     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1685 
   1686     void *pointerArgs[] = {
   1687     };
   1688 
   1689     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1690                               threadStartTime, threadEndTime,
   1691                               &glmsg, pointerArgs);
   1692     glContext->traceGLMessage(&glmsg);
   1693 }
   1694 
   1695 void GLTrace_glFinish(void) {
   1696     GLMessage glmsg;
   1697     GLTraceContext *glContext = getGLTraceContext();
   1698 
   1699     glmsg.set_function(GLMessage::glFinish);
   1700 
   1701     // call function
   1702     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1703     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1704     glContext->hooks->gl.glFinish();
   1705     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1706     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1707 
   1708     void *pointerArgs[] = {
   1709     };
   1710 
   1711     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1712                               threadStartTime, threadEndTime,
   1713                               &glmsg, pointerArgs);
   1714     glContext->traceGLMessage(&glmsg);
   1715 }
   1716 
   1717 void GLTrace_glFlush(void) {
   1718     GLMessage glmsg;
   1719     GLTraceContext *glContext = getGLTraceContext();
   1720 
   1721     glmsg.set_function(GLMessage::glFlush);
   1722 
   1723     // call function
   1724     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1725     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1726     glContext->hooks->gl.glFlush();
   1727     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1728     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1729 
   1730     void *pointerArgs[] = {
   1731     };
   1732 
   1733     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1734                               threadStartTime, threadEndTime,
   1735                               &glmsg, pointerArgs);
   1736     glContext->traceGLMessage(&glmsg);
   1737 }
   1738 
   1739 void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
   1740     GLMessage glmsg;
   1741     GLTraceContext *glContext = getGLTraceContext();
   1742 
   1743     glmsg.set_function(GLMessage::glFramebufferRenderbuffer);
   1744 
   1745     // copy argument target
   1746     GLMessage_DataType *arg_target = glmsg.add_args();
   1747     arg_target->set_isarray(false);
   1748     arg_target->set_type(GLMessage::DataType::ENUM);
   1749     arg_target->add_intvalue((int)target);
   1750 
   1751     // copy argument attachment
   1752     GLMessage_DataType *arg_attachment = glmsg.add_args();
   1753     arg_attachment->set_isarray(false);
   1754     arg_attachment->set_type(GLMessage::DataType::ENUM);
   1755     arg_attachment->add_intvalue((int)attachment);
   1756 
   1757     // copy argument renderbuffertarget
   1758     GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
   1759     arg_renderbuffertarget->set_isarray(false);
   1760     arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
   1761     arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
   1762 
   1763     // copy argument renderbuffer
   1764     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   1765     arg_renderbuffer->set_isarray(false);
   1766     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   1767     arg_renderbuffer->add_intvalue(renderbuffer);
   1768 
   1769     // call function
   1770     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1771     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1772     glContext->hooks->gl.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
   1773     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1774     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1775 
   1776     void *pointerArgs[] = {
   1777     };
   1778 
   1779     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1780                               threadStartTime, threadEndTime,
   1781                               &glmsg, pointerArgs);
   1782     glContext->traceGLMessage(&glmsg);
   1783 }
   1784 
   1785 void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
   1786     GLMessage glmsg;
   1787     GLTraceContext *glContext = getGLTraceContext();
   1788 
   1789     glmsg.set_function(GLMessage::glFramebufferTexture2D);
   1790 
   1791     // copy argument target
   1792     GLMessage_DataType *arg_target = glmsg.add_args();
   1793     arg_target->set_isarray(false);
   1794     arg_target->set_type(GLMessage::DataType::ENUM);
   1795     arg_target->add_intvalue((int)target);
   1796 
   1797     // copy argument attachment
   1798     GLMessage_DataType *arg_attachment = glmsg.add_args();
   1799     arg_attachment->set_isarray(false);
   1800     arg_attachment->set_type(GLMessage::DataType::ENUM);
   1801     arg_attachment->add_intvalue((int)attachment);
   1802 
   1803     // copy argument textarget
   1804     GLMessage_DataType *arg_textarget = glmsg.add_args();
   1805     arg_textarget->set_isarray(false);
   1806     arg_textarget->set_type(GLMessage::DataType::ENUM);
   1807     arg_textarget->add_intvalue((int)textarget);
   1808 
   1809     // copy argument texture
   1810     GLMessage_DataType *arg_texture = glmsg.add_args();
   1811     arg_texture->set_isarray(false);
   1812     arg_texture->set_type(GLMessage::DataType::INT);
   1813     arg_texture->add_intvalue(texture);
   1814 
   1815     // copy argument level
   1816     GLMessage_DataType *arg_level = glmsg.add_args();
   1817     arg_level->set_isarray(false);
   1818     arg_level->set_type(GLMessage::DataType::INT);
   1819     arg_level->add_intvalue(level);
   1820 
   1821     // call function
   1822     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1823     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1824     glContext->hooks->gl.glFramebufferTexture2D(target, attachment, textarget, texture, level);
   1825     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1826     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1827 
   1828     void *pointerArgs[] = {
   1829     };
   1830 
   1831     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1832                               threadStartTime, threadEndTime,
   1833                               &glmsg, pointerArgs);
   1834     glContext->traceGLMessage(&glmsg);
   1835 }
   1836 
   1837 void GLTrace_glFrontFace(GLenum mode) {
   1838     GLMessage glmsg;
   1839     GLTraceContext *glContext = getGLTraceContext();
   1840 
   1841     glmsg.set_function(GLMessage::glFrontFace);
   1842 
   1843     // copy argument mode
   1844     GLMessage_DataType *arg_mode = glmsg.add_args();
   1845     arg_mode->set_isarray(false);
   1846     arg_mode->set_type(GLMessage::DataType::ENUM);
   1847     arg_mode->add_intvalue((int)mode);
   1848 
   1849     // call function
   1850     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1851     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1852     glContext->hooks->gl.glFrontFace(mode);
   1853     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1854     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1855 
   1856     void *pointerArgs[] = {
   1857     };
   1858 
   1859     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1860                               threadStartTime, threadEndTime,
   1861                               &glmsg, pointerArgs);
   1862     glContext->traceGLMessage(&glmsg);
   1863 }
   1864 
   1865 void GLTrace_glGenBuffers(GLsizei n, GLuint* buffers) {
   1866     GLMessage glmsg;
   1867     GLTraceContext *glContext = getGLTraceContext();
   1868 
   1869     glmsg.set_function(GLMessage::glGenBuffers);
   1870 
   1871     // copy argument n
   1872     GLMessage_DataType *arg_n = glmsg.add_args();
   1873     arg_n->set_isarray(false);
   1874     arg_n->set_type(GLMessage::DataType::INT);
   1875     arg_n->add_intvalue(n);
   1876 
   1877     // copy argument buffers
   1878     GLMessage_DataType *arg_buffers = glmsg.add_args();
   1879     arg_buffers->set_isarray(false);
   1880     arg_buffers->set_type(GLMessage::DataType::INT);
   1881     arg_buffers->add_intvalue((int)buffers);
   1882 
   1883     // call function
   1884     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1885     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1886     glContext->hooks->gl.glGenBuffers(n, buffers);
   1887     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1888     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1889 
   1890     void *pointerArgs[] = {
   1891         (void *) buffers,
   1892     };
   1893 
   1894     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1895                               threadStartTime, threadEndTime,
   1896                               &glmsg, pointerArgs);
   1897     glContext->traceGLMessage(&glmsg);
   1898 }
   1899 
   1900 void GLTrace_glGenerateMipmap(GLenum target) {
   1901     GLMessage glmsg;
   1902     GLTraceContext *glContext = getGLTraceContext();
   1903 
   1904     glmsg.set_function(GLMessage::glGenerateMipmap);
   1905 
   1906     // copy argument target
   1907     GLMessage_DataType *arg_target = glmsg.add_args();
   1908     arg_target->set_isarray(false);
   1909     arg_target->set_type(GLMessage::DataType::ENUM);
   1910     arg_target->add_intvalue((int)target);
   1911 
   1912     // call function
   1913     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1914     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1915     glContext->hooks->gl.glGenerateMipmap(target);
   1916     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1917     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1918 
   1919     void *pointerArgs[] = {
   1920     };
   1921 
   1922     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1923                               threadStartTime, threadEndTime,
   1924                               &glmsg, pointerArgs);
   1925     glContext->traceGLMessage(&glmsg);
   1926 }
   1927 
   1928 void GLTrace_glGenFramebuffers(GLsizei n, GLuint* framebuffers) {
   1929     GLMessage glmsg;
   1930     GLTraceContext *glContext = getGLTraceContext();
   1931 
   1932     glmsg.set_function(GLMessage::glGenFramebuffers);
   1933 
   1934     // copy argument n
   1935     GLMessage_DataType *arg_n = glmsg.add_args();
   1936     arg_n->set_isarray(false);
   1937     arg_n->set_type(GLMessage::DataType::INT);
   1938     arg_n->add_intvalue(n);
   1939 
   1940     // copy argument framebuffers
   1941     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   1942     arg_framebuffers->set_isarray(false);
   1943     arg_framebuffers->set_type(GLMessage::DataType::INT);
   1944     arg_framebuffers->add_intvalue((int)framebuffers);
   1945 
   1946     // call function
   1947     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1948     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1949     glContext->hooks->gl.glGenFramebuffers(n, framebuffers);
   1950     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1951     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1952 
   1953     void *pointerArgs[] = {
   1954         (void *) framebuffers,
   1955     };
   1956 
   1957     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1958                               threadStartTime, threadEndTime,
   1959                               &glmsg, pointerArgs);
   1960     glContext->traceGLMessage(&glmsg);
   1961 }
   1962 
   1963 void GLTrace_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) {
   1964     GLMessage glmsg;
   1965     GLTraceContext *glContext = getGLTraceContext();
   1966 
   1967     glmsg.set_function(GLMessage::glGenRenderbuffers);
   1968 
   1969     // copy argument n
   1970     GLMessage_DataType *arg_n = glmsg.add_args();
   1971     arg_n->set_isarray(false);
   1972     arg_n->set_type(GLMessage::DataType::INT);
   1973     arg_n->add_intvalue(n);
   1974 
   1975     // copy argument renderbuffers
   1976     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   1977     arg_renderbuffers->set_isarray(false);
   1978     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   1979     arg_renderbuffers->add_intvalue((int)renderbuffers);
   1980 
   1981     // call function
   1982     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1983     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   1984     glContext->hooks->gl.glGenRenderbuffers(n, renderbuffers);
   1985     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   1986     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   1987 
   1988     void *pointerArgs[] = {
   1989         (void *) renderbuffers,
   1990     };
   1991 
   1992     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   1993                               threadStartTime, threadEndTime,
   1994                               &glmsg, pointerArgs);
   1995     glContext->traceGLMessage(&glmsg);
   1996 }
   1997 
   1998 void GLTrace_glGenTextures(GLsizei n, GLuint* textures) {
   1999     GLMessage glmsg;
   2000     GLTraceContext *glContext = getGLTraceContext();
   2001 
   2002     glmsg.set_function(GLMessage::glGenTextures);
   2003 
   2004     // copy argument n
   2005     GLMessage_DataType *arg_n = glmsg.add_args();
   2006     arg_n->set_isarray(false);
   2007     arg_n->set_type(GLMessage::DataType::INT);
   2008     arg_n->add_intvalue(n);
   2009 
   2010     // copy argument textures
   2011     GLMessage_DataType *arg_textures = glmsg.add_args();
   2012     arg_textures->set_isarray(false);
   2013     arg_textures->set_type(GLMessage::DataType::INT);
   2014     arg_textures->add_intvalue((int)textures);
   2015 
   2016     // call function
   2017     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2018     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2019     glContext->hooks->gl.glGenTextures(n, textures);
   2020     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2021     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2022 
   2023     void *pointerArgs[] = {
   2024         (void *) textures,
   2025     };
   2026 
   2027     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2028                               threadStartTime, threadEndTime,
   2029                               &glmsg, pointerArgs);
   2030     glContext->traceGLMessage(&glmsg);
   2031 }
   2032 
   2033 void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
   2034     GLMessage glmsg;
   2035     GLTraceContext *glContext = getGLTraceContext();
   2036 
   2037     glmsg.set_function(GLMessage::glGetActiveAttrib);
   2038 
   2039     // copy argument program
   2040     GLMessage_DataType *arg_program = glmsg.add_args();
   2041     arg_program->set_isarray(false);
   2042     arg_program->set_type(GLMessage::DataType::INT);
   2043     arg_program->add_intvalue(program);
   2044 
   2045     // copy argument index
   2046     GLMessage_DataType *arg_index = glmsg.add_args();
   2047     arg_index->set_isarray(false);
   2048     arg_index->set_type(GLMessage::DataType::INT);
   2049     arg_index->add_intvalue(index);
   2050 
   2051     // copy argument bufsize
   2052     GLMessage_DataType *arg_bufsize = glmsg.add_args();
   2053     arg_bufsize->set_isarray(false);
   2054     arg_bufsize->set_type(GLMessage::DataType::INT);
   2055     arg_bufsize->add_intvalue(bufsize);
   2056 
   2057     // copy argument length
   2058     GLMessage_DataType *arg_length = glmsg.add_args();
   2059     arg_length->set_isarray(false);
   2060     arg_length->set_type(GLMessage::DataType::INT);
   2061     arg_length->add_intvalue((int)length);
   2062 
   2063     // copy argument size
   2064     GLMessage_DataType *arg_size = glmsg.add_args();
   2065     arg_size->set_isarray(false);
   2066     arg_size->set_type(GLMessage::DataType::INT);
   2067     arg_size->add_intvalue((int)size);
   2068 
   2069     // copy argument type
   2070     GLMessage_DataType *arg_type = glmsg.add_args();
   2071     arg_type->set_isarray(false);
   2072     arg_type->set_type(GLMessage::DataType::INT);
   2073     arg_type->add_intvalue((int)type);
   2074 
   2075     // copy argument name
   2076     GLMessage_DataType *arg_name = glmsg.add_args();
   2077     arg_name->set_isarray(false);
   2078     arg_name->set_type(GLMessage::DataType::INT);
   2079     arg_name->add_intvalue((int)name);
   2080 
   2081     // call function
   2082     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2083     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2084     glContext->hooks->gl.glGetActiveAttrib(program, index, bufsize, length, size, type, name);
   2085     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2086     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2087 
   2088     void *pointerArgs[] = {
   2089         (void *) length,
   2090         (void *) size,
   2091         (void *) type,
   2092         (void *) name,
   2093     };
   2094 
   2095     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2096                               threadStartTime, threadEndTime,
   2097                               &glmsg, pointerArgs);
   2098     glContext->traceGLMessage(&glmsg);
   2099 }
   2100 
   2101 void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) {
   2102     GLMessage glmsg;
   2103     GLTraceContext *glContext = getGLTraceContext();
   2104 
   2105     glmsg.set_function(GLMessage::glGetActiveUniform);
   2106 
   2107     // copy argument program
   2108     GLMessage_DataType *arg_program = glmsg.add_args();
   2109     arg_program->set_isarray(false);
   2110     arg_program->set_type(GLMessage::DataType::INT);
   2111     arg_program->add_intvalue(program);
   2112 
   2113     // copy argument index
   2114     GLMessage_DataType *arg_index = glmsg.add_args();
   2115     arg_index->set_isarray(false);
   2116     arg_index->set_type(GLMessage::DataType::INT);
   2117     arg_index->add_intvalue(index);
   2118 
   2119     // copy argument bufsize
   2120     GLMessage_DataType *arg_bufsize = glmsg.add_args();
   2121     arg_bufsize->set_isarray(false);
   2122     arg_bufsize->set_type(GLMessage::DataType::INT);
   2123     arg_bufsize->add_intvalue(bufsize);
   2124 
   2125     // copy argument length
   2126     GLMessage_DataType *arg_length = glmsg.add_args();
   2127     arg_length->set_isarray(false);
   2128     arg_length->set_type(GLMessage::DataType::INT);
   2129     arg_length->add_intvalue((int)length);
   2130 
   2131     // copy argument size
   2132     GLMessage_DataType *arg_size = glmsg.add_args();
   2133     arg_size->set_isarray(false);
   2134     arg_size->set_type(GLMessage::DataType::INT);
   2135     arg_size->add_intvalue((int)size);
   2136 
   2137     // copy argument type
   2138     GLMessage_DataType *arg_type = glmsg.add_args();
   2139     arg_type->set_isarray(false);
   2140     arg_type->set_type(GLMessage::DataType::INT);
   2141     arg_type->add_intvalue((int)type);
   2142 
   2143     // copy argument name
   2144     GLMessage_DataType *arg_name = glmsg.add_args();
   2145     arg_name->set_isarray(false);
   2146     arg_name->set_type(GLMessage::DataType::INT);
   2147     arg_name->add_intvalue((int)name);
   2148 
   2149     // call function
   2150     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2151     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2152     glContext->hooks->gl.glGetActiveUniform(program, index, bufsize, length, size, type, name);
   2153     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2154     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2155 
   2156     void *pointerArgs[] = {
   2157         (void *) length,
   2158         (void *) size,
   2159         (void *) type,
   2160         (void *) name,
   2161     };
   2162 
   2163     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2164                               threadStartTime, threadEndTime,
   2165                               &glmsg, pointerArgs);
   2166     glContext->traceGLMessage(&glmsg);
   2167 }
   2168 
   2169 void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) {
   2170     GLMessage glmsg;
   2171     GLTraceContext *glContext = getGLTraceContext();
   2172 
   2173     glmsg.set_function(GLMessage::glGetAttachedShaders);
   2174 
   2175     // copy argument program
   2176     GLMessage_DataType *arg_program = glmsg.add_args();
   2177     arg_program->set_isarray(false);
   2178     arg_program->set_type(GLMessage::DataType::INT);
   2179     arg_program->add_intvalue(program);
   2180 
   2181     // copy argument maxcount
   2182     GLMessage_DataType *arg_maxcount = glmsg.add_args();
   2183     arg_maxcount->set_isarray(false);
   2184     arg_maxcount->set_type(GLMessage::DataType::INT);
   2185     arg_maxcount->add_intvalue(maxcount);
   2186 
   2187     // copy argument count
   2188     GLMessage_DataType *arg_count = glmsg.add_args();
   2189     arg_count->set_isarray(false);
   2190     arg_count->set_type(GLMessage::DataType::INT);
   2191     arg_count->add_intvalue((int)count);
   2192 
   2193     // copy argument shaders
   2194     GLMessage_DataType *arg_shaders = glmsg.add_args();
   2195     arg_shaders->set_isarray(false);
   2196     arg_shaders->set_type(GLMessage::DataType::INT);
   2197     arg_shaders->add_intvalue((int)shaders);
   2198 
   2199     // call function
   2200     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2201     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2202     glContext->hooks->gl.glGetAttachedShaders(program, maxcount, count, shaders);
   2203     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2204     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2205 
   2206     void *pointerArgs[] = {
   2207         (void *) count,
   2208         (void *) shaders,
   2209     };
   2210 
   2211     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2212                               threadStartTime, threadEndTime,
   2213                               &glmsg, pointerArgs);
   2214     glContext->traceGLMessage(&glmsg);
   2215 }
   2216 
   2217 int GLTrace_glGetAttribLocation(GLuint program, const GLchar* name) {
   2218     GLMessage glmsg;
   2219     GLTraceContext *glContext = getGLTraceContext();
   2220 
   2221     glmsg.set_function(GLMessage::glGetAttribLocation);
   2222 
   2223     // copy argument program
   2224     GLMessage_DataType *arg_program = glmsg.add_args();
   2225     arg_program->set_isarray(false);
   2226     arg_program->set_type(GLMessage::DataType::INT);
   2227     arg_program->add_intvalue(program);
   2228 
   2229     // copy argument name
   2230     GLMessage_DataType *arg_name = glmsg.add_args();
   2231     arg_name->set_isarray(false);
   2232     arg_name->set_type(GLMessage::DataType::INT);
   2233     arg_name->add_intvalue((int)name);
   2234 
   2235     // call function
   2236     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2237     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2238     int retValue = glContext->hooks->gl.glGetAttribLocation(program, name);
   2239     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2240     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2241 
   2242     // set return value
   2243     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   2244     rt->set_isarray(false);
   2245     rt->set_type(GLMessage::DataType::INT);
   2246     rt->add_intvalue(retValue);
   2247 
   2248     void *pointerArgs[] = {
   2249         (void *) name,
   2250     };
   2251 
   2252     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2253                               threadStartTime, threadEndTime,
   2254                               &glmsg, pointerArgs);
   2255     glContext->traceGLMessage(&glmsg);
   2256 
   2257     return retValue;
   2258 }
   2259 
   2260 void GLTrace_glGetBooleanv(GLenum pname, GLboolean* params) {
   2261     GLMessage glmsg;
   2262     GLTraceContext *glContext = getGLTraceContext();
   2263 
   2264     glmsg.set_function(GLMessage::glGetBooleanv);
   2265 
   2266     // copy argument pname
   2267     GLMessage_DataType *arg_pname = glmsg.add_args();
   2268     arg_pname->set_isarray(false);
   2269     arg_pname->set_type(GLMessage::DataType::ENUM);
   2270     arg_pname->add_intvalue((int)pname);
   2271 
   2272     // copy argument params
   2273     GLMessage_DataType *arg_params = glmsg.add_args();
   2274     arg_params->set_isarray(false);
   2275     arg_params->set_type(GLMessage::DataType::INT);
   2276     arg_params->add_intvalue((int)params);
   2277 
   2278     // call function
   2279     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2280     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2281     glContext->hooks->gl.glGetBooleanv(pname, params);
   2282     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2283     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2284 
   2285     void *pointerArgs[] = {
   2286         (void *) params,
   2287     };
   2288 
   2289     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2290                               threadStartTime, threadEndTime,
   2291                               &glmsg, pointerArgs);
   2292     glContext->traceGLMessage(&glmsg);
   2293 }
   2294 
   2295 void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) {
   2296     GLMessage glmsg;
   2297     GLTraceContext *glContext = getGLTraceContext();
   2298 
   2299     glmsg.set_function(GLMessage::glGetBufferParameteriv);
   2300 
   2301     // copy argument target
   2302     GLMessage_DataType *arg_target = glmsg.add_args();
   2303     arg_target->set_isarray(false);
   2304     arg_target->set_type(GLMessage::DataType::ENUM);
   2305     arg_target->add_intvalue((int)target);
   2306 
   2307     // copy argument pname
   2308     GLMessage_DataType *arg_pname = glmsg.add_args();
   2309     arg_pname->set_isarray(false);
   2310     arg_pname->set_type(GLMessage::DataType::ENUM);
   2311     arg_pname->add_intvalue((int)pname);
   2312 
   2313     // copy argument params
   2314     GLMessage_DataType *arg_params = glmsg.add_args();
   2315     arg_params->set_isarray(false);
   2316     arg_params->set_type(GLMessage::DataType::INT);
   2317     arg_params->add_intvalue((int)params);
   2318 
   2319     // call function
   2320     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2321     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2322     glContext->hooks->gl.glGetBufferParameteriv(target, pname, params);
   2323     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2324     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2325 
   2326     void *pointerArgs[] = {
   2327         (void *) params,
   2328     };
   2329 
   2330     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2331                               threadStartTime, threadEndTime,
   2332                               &glmsg, pointerArgs);
   2333     glContext->traceGLMessage(&glmsg);
   2334 }
   2335 
   2336 GLenum GLTrace_glGetError(void) {
   2337     GLMessage glmsg;
   2338     GLTraceContext *glContext = getGLTraceContext();
   2339 
   2340     glmsg.set_function(GLMessage::glGetError);
   2341 
   2342     // call function
   2343     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2344     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2345     GLenum retValue = glContext->hooks->gl.glGetError();
   2346     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2347     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2348 
   2349     // set return value
   2350     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   2351     rt->set_isarray(false);
   2352     rt->set_type(GLMessage::DataType::ENUM);
   2353     rt->add_intvalue((int)retValue);
   2354 
   2355     void *pointerArgs[] = {
   2356     };
   2357 
   2358     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2359                               threadStartTime, threadEndTime,
   2360                               &glmsg, pointerArgs);
   2361     glContext->traceGLMessage(&glmsg);
   2362 
   2363     return retValue;
   2364 }
   2365 
   2366 void GLTrace_glGetFloatv(GLenum pname, GLfloat* params) {
   2367     GLMessage glmsg;
   2368     GLTraceContext *glContext = getGLTraceContext();
   2369 
   2370     glmsg.set_function(GLMessage::glGetFloatv);
   2371 
   2372     // copy argument pname
   2373     GLMessage_DataType *arg_pname = glmsg.add_args();
   2374     arg_pname->set_isarray(false);
   2375     arg_pname->set_type(GLMessage::DataType::ENUM);
   2376     arg_pname->add_intvalue((int)pname);
   2377 
   2378     // copy argument params
   2379     GLMessage_DataType *arg_params = glmsg.add_args();
   2380     arg_params->set_isarray(false);
   2381     arg_params->set_type(GLMessage::DataType::INT);
   2382     arg_params->add_intvalue((int)params);
   2383 
   2384     // call function
   2385     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2386     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2387     glContext->hooks->gl.glGetFloatv(pname, params);
   2388     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2389     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2390 
   2391     void *pointerArgs[] = {
   2392         (void *) params,
   2393     };
   2394 
   2395     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2396                               threadStartTime, threadEndTime,
   2397                               &glmsg, pointerArgs);
   2398     glContext->traceGLMessage(&glmsg);
   2399 }
   2400 
   2401 void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
   2402     GLMessage glmsg;
   2403     GLTraceContext *glContext = getGLTraceContext();
   2404 
   2405     glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameteriv);
   2406 
   2407     // copy argument target
   2408     GLMessage_DataType *arg_target = glmsg.add_args();
   2409     arg_target->set_isarray(false);
   2410     arg_target->set_type(GLMessage::DataType::ENUM);
   2411     arg_target->add_intvalue((int)target);
   2412 
   2413     // copy argument attachment
   2414     GLMessage_DataType *arg_attachment = glmsg.add_args();
   2415     arg_attachment->set_isarray(false);
   2416     arg_attachment->set_type(GLMessage::DataType::ENUM);
   2417     arg_attachment->add_intvalue((int)attachment);
   2418 
   2419     // copy argument pname
   2420     GLMessage_DataType *arg_pname = glmsg.add_args();
   2421     arg_pname->set_isarray(false);
   2422     arg_pname->set_type(GLMessage::DataType::ENUM);
   2423     arg_pname->add_intvalue((int)pname);
   2424 
   2425     // copy argument params
   2426     GLMessage_DataType *arg_params = glmsg.add_args();
   2427     arg_params->set_isarray(false);
   2428     arg_params->set_type(GLMessage::DataType::INT);
   2429     arg_params->add_intvalue((int)params);
   2430 
   2431     // call function
   2432     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2433     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2434     glContext->hooks->gl.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
   2435     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2436     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2437 
   2438     void *pointerArgs[] = {
   2439         (void *) params,
   2440     };
   2441 
   2442     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2443                               threadStartTime, threadEndTime,
   2444                               &glmsg, pointerArgs);
   2445     glContext->traceGLMessage(&glmsg);
   2446 }
   2447 
   2448 void GLTrace_glGetIntegerv(GLenum pname, GLint* params) {
   2449     GLMessage glmsg;
   2450     GLTraceContext *glContext = getGLTraceContext();
   2451 
   2452     glmsg.set_function(GLMessage::glGetIntegerv);
   2453 
   2454     // copy argument pname
   2455     GLMessage_DataType *arg_pname = glmsg.add_args();
   2456     arg_pname->set_isarray(false);
   2457     arg_pname->set_type(GLMessage::DataType::ENUM);
   2458     arg_pname->add_intvalue((int)pname);
   2459 
   2460     // copy argument params
   2461     GLMessage_DataType *arg_params = glmsg.add_args();
   2462     arg_params->set_isarray(false);
   2463     arg_params->set_type(GLMessage::DataType::INT);
   2464     arg_params->add_intvalue((int)params);
   2465 
   2466     // call function
   2467     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2468     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2469     glContext->hooks->gl.glGetIntegerv(pname, params);
   2470     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2471     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2472 
   2473     void *pointerArgs[] = {
   2474         (void *) params,
   2475     };
   2476 
   2477     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2478                               threadStartTime, threadEndTime,
   2479                               &glmsg, pointerArgs);
   2480     glContext->traceGLMessage(&glmsg);
   2481 }
   2482 
   2483 void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint* params) {
   2484     GLMessage glmsg;
   2485     GLTraceContext *glContext = getGLTraceContext();
   2486 
   2487     glmsg.set_function(GLMessage::glGetProgramiv);
   2488 
   2489     // copy argument program
   2490     GLMessage_DataType *arg_program = glmsg.add_args();
   2491     arg_program->set_isarray(false);
   2492     arg_program->set_type(GLMessage::DataType::INT);
   2493     arg_program->add_intvalue(program);
   2494 
   2495     // copy argument pname
   2496     GLMessage_DataType *arg_pname = glmsg.add_args();
   2497     arg_pname->set_isarray(false);
   2498     arg_pname->set_type(GLMessage::DataType::ENUM);
   2499     arg_pname->add_intvalue((int)pname);
   2500 
   2501     // copy argument params
   2502     GLMessage_DataType *arg_params = glmsg.add_args();
   2503     arg_params->set_isarray(false);
   2504     arg_params->set_type(GLMessage::DataType::INT);
   2505     arg_params->add_intvalue((int)params);
   2506 
   2507     // call function
   2508     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2509     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2510     glContext->hooks->gl.glGetProgramiv(program, pname, params);
   2511     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2512     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2513 
   2514     void *pointerArgs[] = {
   2515         (void *) params,
   2516     };
   2517 
   2518     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2519                               threadStartTime, threadEndTime,
   2520                               &glmsg, pointerArgs);
   2521     glContext->traceGLMessage(&glmsg);
   2522 }
   2523 
   2524 void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
   2525     GLMessage glmsg;
   2526     GLTraceContext *glContext = getGLTraceContext();
   2527 
   2528     glmsg.set_function(GLMessage::glGetProgramInfoLog);
   2529 
   2530     // copy argument program
   2531     GLMessage_DataType *arg_program = glmsg.add_args();
   2532     arg_program->set_isarray(false);
   2533     arg_program->set_type(GLMessage::DataType::INT);
   2534     arg_program->add_intvalue(program);
   2535 
   2536     // copy argument bufsize
   2537     GLMessage_DataType *arg_bufsize = glmsg.add_args();
   2538     arg_bufsize->set_isarray(false);
   2539     arg_bufsize->set_type(GLMessage::DataType::INT);
   2540     arg_bufsize->add_intvalue(bufsize);
   2541 
   2542     // copy argument length
   2543     GLMessage_DataType *arg_length = glmsg.add_args();
   2544     arg_length->set_isarray(false);
   2545     arg_length->set_type(GLMessage::DataType::INT);
   2546     arg_length->add_intvalue((int)length);
   2547 
   2548     // copy argument infolog
   2549     GLMessage_DataType *arg_infolog = glmsg.add_args();
   2550     arg_infolog->set_isarray(false);
   2551     arg_infolog->set_type(GLMessage::DataType::INT);
   2552     arg_infolog->add_intvalue((int)infolog);
   2553 
   2554     // call function
   2555     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2556     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2557     glContext->hooks->gl.glGetProgramInfoLog(program, bufsize, length, infolog);
   2558     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2559     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2560 
   2561     void *pointerArgs[] = {
   2562         (void *) length,
   2563         (void *) infolog,
   2564     };
   2565 
   2566     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2567                               threadStartTime, threadEndTime,
   2568                               &glmsg, pointerArgs);
   2569     glContext->traceGLMessage(&glmsg);
   2570 }
   2571 
   2572 void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) {
   2573     GLMessage glmsg;
   2574     GLTraceContext *glContext = getGLTraceContext();
   2575 
   2576     glmsg.set_function(GLMessage::glGetRenderbufferParameteriv);
   2577 
   2578     // copy argument target
   2579     GLMessage_DataType *arg_target = glmsg.add_args();
   2580     arg_target->set_isarray(false);
   2581     arg_target->set_type(GLMessage::DataType::ENUM);
   2582     arg_target->add_intvalue((int)target);
   2583 
   2584     // copy argument pname
   2585     GLMessage_DataType *arg_pname = glmsg.add_args();
   2586     arg_pname->set_isarray(false);
   2587     arg_pname->set_type(GLMessage::DataType::ENUM);
   2588     arg_pname->add_intvalue((int)pname);
   2589 
   2590     // copy argument params
   2591     GLMessage_DataType *arg_params = glmsg.add_args();
   2592     arg_params->set_isarray(false);
   2593     arg_params->set_type(GLMessage::DataType::INT);
   2594     arg_params->add_intvalue((int)params);
   2595 
   2596     // call function
   2597     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2598     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2599     glContext->hooks->gl.glGetRenderbufferParameteriv(target, pname, params);
   2600     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2601     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2602 
   2603     void *pointerArgs[] = {
   2604         (void *) params,
   2605     };
   2606 
   2607     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2608                               threadStartTime, threadEndTime,
   2609                               &glmsg, pointerArgs);
   2610     glContext->traceGLMessage(&glmsg);
   2611 }
   2612 
   2613 void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) {
   2614     GLMessage glmsg;
   2615     GLTraceContext *glContext = getGLTraceContext();
   2616 
   2617     glmsg.set_function(GLMessage::glGetShaderiv);
   2618 
   2619     // copy argument shader
   2620     GLMessage_DataType *arg_shader = glmsg.add_args();
   2621     arg_shader->set_isarray(false);
   2622     arg_shader->set_type(GLMessage::DataType::INT);
   2623     arg_shader->add_intvalue(shader);
   2624 
   2625     // copy argument pname
   2626     GLMessage_DataType *arg_pname = glmsg.add_args();
   2627     arg_pname->set_isarray(false);
   2628     arg_pname->set_type(GLMessage::DataType::ENUM);
   2629     arg_pname->add_intvalue((int)pname);
   2630 
   2631     // copy argument params
   2632     GLMessage_DataType *arg_params = glmsg.add_args();
   2633     arg_params->set_isarray(false);
   2634     arg_params->set_type(GLMessage::DataType::INT);
   2635     arg_params->add_intvalue((int)params);
   2636 
   2637     // call function
   2638     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2639     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2640     glContext->hooks->gl.glGetShaderiv(shader, pname, params);
   2641     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2642     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2643 
   2644     void *pointerArgs[] = {
   2645         (void *) params,
   2646     };
   2647 
   2648     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2649                               threadStartTime, threadEndTime,
   2650                               &glmsg, pointerArgs);
   2651     glContext->traceGLMessage(&glmsg);
   2652 }
   2653 
   2654 void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) {
   2655     GLMessage glmsg;
   2656     GLTraceContext *glContext = getGLTraceContext();
   2657 
   2658     glmsg.set_function(GLMessage::glGetShaderInfoLog);
   2659 
   2660     // copy argument shader
   2661     GLMessage_DataType *arg_shader = glmsg.add_args();
   2662     arg_shader->set_isarray(false);
   2663     arg_shader->set_type(GLMessage::DataType::INT);
   2664     arg_shader->add_intvalue(shader);
   2665 
   2666     // copy argument bufsize
   2667     GLMessage_DataType *arg_bufsize = glmsg.add_args();
   2668     arg_bufsize->set_isarray(false);
   2669     arg_bufsize->set_type(GLMessage::DataType::INT);
   2670     arg_bufsize->add_intvalue(bufsize);
   2671 
   2672     // copy argument length
   2673     GLMessage_DataType *arg_length = glmsg.add_args();
   2674     arg_length->set_isarray(false);
   2675     arg_length->set_type(GLMessage::DataType::INT);
   2676     arg_length->add_intvalue((int)length);
   2677 
   2678     // copy argument infolog
   2679     GLMessage_DataType *arg_infolog = glmsg.add_args();
   2680     arg_infolog->set_isarray(false);
   2681     arg_infolog->set_type(GLMessage::DataType::INT);
   2682     arg_infolog->add_intvalue((int)infolog);
   2683 
   2684     // call function
   2685     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2686     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2687     glContext->hooks->gl.glGetShaderInfoLog(shader, bufsize, length, infolog);
   2688     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2689     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2690 
   2691     void *pointerArgs[] = {
   2692         (void *) length,
   2693         (void *) infolog,
   2694     };
   2695 
   2696     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2697                               threadStartTime, threadEndTime,
   2698                               &glmsg, pointerArgs);
   2699     glContext->traceGLMessage(&glmsg);
   2700 }
   2701 
   2702 void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) {
   2703     GLMessage glmsg;
   2704     GLTraceContext *glContext = getGLTraceContext();
   2705 
   2706     glmsg.set_function(GLMessage::glGetShaderPrecisionFormat);
   2707 
   2708     // copy argument shadertype
   2709     GLMessage_DataType *arg_shadertype = glmsg.add_args();
   2710     arg_shadertype->set_isarray(false);
   2711     arg_shadertype->set_type(GLMessage::DataType::ENUM);
   2712     arg_shadertype->add_intvalue((int)shadertype);
   2713 
   2714     // copy argument precisiontype
   2715     GLMessage_DataType *arg_precisiontype = glmsg.add_args();
   2716     arg_precisiontype->set_isarray(false);
   2717     arg_precisiontype->set_type(GLMessage::DataType::ENUM);
   2718     arg_precisiontype->add_intvalue((int)precisiontype);
   2719 
   2720     // copy argument range
   2721     GLMessage_DataType *arg_range = glmsg.add_args();
   2722     arg_range->set_isarray(false);
   2723     arg_range->set_type(GLMessage::DataType::INT);
   2724     arg_range->add_intvalue((int)range);
   2725 
   2726     // copy argument precision
   2727     GLMessage_DataType *arg_precision = glmsg.add_args();
   2728     arg_precision->set_isarray(false);
   2729     arg_precision->set_type(GLMessage::DataType::INT);
   2730     arg_precision->add_intvalue((int)precision);
   2731 
   2732     // call function
   2733     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2734     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2735     glContext->hooks->gl.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
   2736     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2737     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2738 
   2739     void *pointerArgs[] = {
   2740         (void *) range,
   2741         (void *) precision,
   2742     };
   2743 
   2744     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2745                               threadStartTime, threadEndTime,
   2746                               &glmsg, pointerArgs);
   2747     glContext->traceGLMessage(&glmsg);
   2748 }
   2749 
   2750 void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) {
   2751     GLMessage glmsg;
   2752     GLTraceContext *glContext = getGLTraceContext();
   2753 
   2754     glmsg.set_function(GLMessage::glGetShaderSource);
   2755 
   2756     // copy argument shader
   2757     GLMessage_DataType *arg_shader = glmsg.add_args();
   2758     arg_shader->set_isarray(false);
   2759     arg_shader->set_type(GLMessage::DataType::INT);
   2760     arg_shader->add_intvalue(shader);
   2761 
   2762     // copy argument bufsize
   2763     GLMessage_DataType *arg_bufsize = glmsg.add_args();
   2764     arg_bufsize->set_isarray(false);
   2765     arg_bufsize->set_type(GLMessage::DataType::INT);
   2766     arg_bufsize->add_intvalue(bufsize);
   2767 
   2768     // copy argument length
   2769     GLMessage_DataType *arg_length = glmsg.add_args();
   2770     arg_length->set_isarray(false);
   2771     arg_length->set_type(GLMessage::DataType::INT);
   2772     arg_length->add_intvalue((int)length);
   2773 
   2774     // copy argument source
   2775     GLMessage_DataType *arg_source = glmsg.add_args();
   2776     arg_source->set_isarray(false);
   2777     arg_source->set_type(GLMessage::DataType::INT);
   2778     arg_source->add_intvalue((int)source);
   2779 
   2780     // call function
   2781     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2782     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2783     glContext->hooks->gl.glGetShaderSource(shader, bufsize, length, source);
   2784     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2785     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2786 
   2787     void *pointerArgs[] = {
   2788         (void *) length,
   2789         (void *) source,
   2790     };
   2791 
   2792     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2793                               threadStartTime, threadEndTime,
   2794                               &glmsg, pointerArgs);
   2795     glContext->traceGLMessage(&glmsg);
   2796 }
   2797 
   2798 const GLubyte* GLTrace_glGetString(GLenum name) {
   2799     GLMessage glmsg;
   2800     GLTraceContext *glContext = getGLTraceContext();
   2801 
   2802     glmsg.set_function(GLMessage::glGetString);
   2803 
   2804     // copy argument name
   2805     GLMessage_DataType *arg_name = glmsg.add_args();
   2806     arg_name->set_isarray(false);
   2807     arg_name->set_type(GLMessage::DataType::ENUM);
   2808     arg_name->add_intvalue((int)name);
   2809 
   2810     // call function
   2811     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2812     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2813     const GLubyte* retValue = glContext->hooks->gl.glGetString(name);
   2814     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2815     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2816 
   2817     // set return value
   2818     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   2819     rt->set_isarray(false);
   2820     rt->set_type(GLMessage::DataType::INT);
   2821     rt->add_intvalue((int)retValue);
   2822 
   2823     void *pointerArgs[] = {
   2824         (void *) retValue,
   2825     };
   2826 
   2827     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2828                               threadStartTime, threadEndTime,
   2829                               &glmsg, pointerArgs);
   2830     glContext->traceGLMessage(&glmsg);
   2831 
   2832     return retValue;
   2833 }
   2834 
   2835 void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) {
   2836     GLMessage glmsg;
   2837     GLTraceContext *glContext = getGLTraceContext();
   2838 
   2839     glmsg.set_function(GLMessage::glGetTexParameterfv);
   2840 
   2841     // copy argument target
   2842     GLMessage_DataType *arg_target = glmsg.add_args();
   2843     arg_target->set_isarray(false);
   2844     arg_target->set_type(GLMessage::DataType::ENUM);
   2845     arg_target->add_intvalue((int)target);
   2846 
   2847     // copy argument pname
   2848     GLMessage_DataType *arg_pname = glmsg.add_args();
   2849     arg_pname->set_isarray(false);
   2850     arg_pname->set_type(GLMessage::DataType::ENUM);
   2851     arg_pname->add_intvalue((int)pname);
   2852 
   2853     // copy argument params
   2854     GLMessage_DataType *arg_params = glmsg.add_args();
   2855     arg_params->set_isarray(false);
   2856     arg_params->set_type(GLMessage::DataType::INT);
   2857     arg_params->add_intvalue((int)params);
   2858 
   2859     // call function
   2860     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2861     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2862     glContext->hooks->gl.glGetTexParameterfv(target, pname, params);
   2863     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2864     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2865 
   2866     void *pointerArgs[] = {
   2867         (void *) params,
   2868     };
   2869 
   2870     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2871                               threadStartTime, threadEndTime,
   2872                               &glmsg, pointerArgs);
   2873     glContext->traceGLMessage(&glmsg);
   2874 }
   2875 
   2876 void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) {
   2877     GLMessage glmsg;
   2878     GLTraceContext *glContext = getGLTraceContext();
   2879 
   2880     glmsg.set_function(GLMessage::glGetTexParameteriv);
   2881 
   2882     // copy argument target
   2883     GLMessage_DataType *arg_target = glmsg.add_args();
   2884     arg_target->set_isarray(false);
   2885     arg_target->set_type(GLMessage::DataType::ENUM);
   2886     arg_target->add_intvalue((int)target);
   2887 
   2888     // copy argument pname
   2889     GLMessage_DataType *arg_pname = glmsg.add_args();
   2890     arg_pname->set_isarray(false);
   2891     arg_pname->set_type(GLMessage::DataType::ENUM);
   2892     arg_pname->add_intvalue((int)pname);
   2893 
   2894     // copy argument params
   2895     GLMessage_DataType *arg_params = glmsg.add_args();
   2896     arg_params->set_isarray(false);
   2897     arg_params->set_type(GLMessage::DataType::INT);
   2898     arg_params->add_intvalue((int)params);
   2899 
   2900     // call function
   2901     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2902     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2903     glContext->hooks->gl.glGetTexParameteriv(target, pname, params);
   2904     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2905     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2906 
   2907     void *pointerArgs[] = {
   2908         (void *) params,
   2909     };
   2910 
   2911     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2912                               threadStartTime, threadEndTime,
   2913                               &glmsg, pointerArgs);
   2914     glContext->traceGLMessage(&glmsg);
   2915 }
   2916 
   2917 void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat* params) {
   2918     GLMessage glmsg;
   2919     GLTraceContext *glContext = getGLTraceContext();
   2920 
   2921     glmsg.set_function(GLMessage::glGetUniformfv);
   2922 
   2923     // copy argument program
   2924     GLMessage_DataType *arg_program = glmsg.add_args();
   2925     arg_program->set_isarray(false);
   2926     arg_program->set_type(GLMessage::DataType::INT);
   2927     arg_program->add_intvalue(program);
   2928 
   2929     // copy argument location
   2930     GLMessage_DataType *arg_location = glmsg.add_args();
   2931     arg_location->set_isarray(false);
   2932     arg_location->set_type(GLMessage::DataType::INT);
   2933     arg_location->add_intvalue(location);
   2934 
   2935     // copy argument params
   2936     GLMessage_DataType *arg_params = glmsg.add_args();
   2937     arg_params->set_isarray(false);
   2938     arg_params->set_type(GLMessage::DataType::INT);
   2939     arg_params->add_intvalue((int)params);
   2940 
   2941     // call function
   2942     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2943     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2944     glContext->hooks->gl.glGetUniformfv(program, location, params);
   2945     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2946     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2947 
   2948     void *pointerArgs[] = {
   2949         (void *) params,
   2950     };
   2951 
   2952     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2953                               threadStartTime, threadEndTime,
   2954                               &glmsg, pointerArgs);
   2955     glContext->traceGLMessage(&glmsg);
   2956 }
   2957 
   2958 void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint* params) {
   2959     GLMessage glmsg;
   2960     GLTraceContext *glContext = getGLTraceContext();
   2961 
   2962     glmsg.set_function(GLMessage::glGetUniformiv);
   2963 
   2964     // copy argument program
   2965     GLMessage_DataType *arg_program = glmsg.add_args();
   2966     arg_program->set_isarray(false);
   2967     arg_program->set_type(GLMessage::DataType::INT);
   2968     arg_program->add_intvalue(program);
   2969 
   2970     // copy argument location
   2971     GLMessage_DataType *arg_location = glmsg.add_args();
   2972     arg_location->set_isarray(false);
   2973     arg_location->set_type(GLMessage::DataType::INT);
   2974     arg_location->add_intvalue(location);
   2975 
   2976     // copy argument params
   2977     GLMessage_DataType *arg_params = glmsg.add_args();
   2978     arg_params->set_isarray(false);
   2979     arg_params->set_type(GLMessage::DataType::INT);
   2980     arg_params->add_intvalue((int)params);
   2981 
   2982     // call function
   2983     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2984     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   2985     glContext->hooks->gl.glGetUniformiv(program, location, params);
   2986     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   2987     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   2988 
   2989     void *pointerArgs[] = {
   2990         (void *) params,
   2991     };
   2992 
   2993     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   2994                               threadStartTime, threadEndTime,
   2995                               &glmsg, pointerArgs);
   2996     glContext->traceGLMessage(&glmsg);
   2997 }
   2998 
   2999 int GLTrace_glGetUniformLocation(GLuint program, const GLchar* name) {
   3000     GLMessage glmsg;
   3001     GLTraceContext *glContext = getGLTraceContext();
   3002 
   3003     glmsg.set_function(GLMessage::glGetUniformLocation);
   3004 
   3005     // copy argument program
   3006     GLMessage_DataType *arg_program = glmsg.add_args();
   3007     arg_program->set_isarray(false);
   3008     arg_program->set_type(GLMessage::DataType::INT);
   3009     arg_program->add_intvalue(program);
   3010 
   3011     // copy argument name
   3012     GLMessage_DataType *arg_name = glmsg.add_args();
   3013     arg_name->set_isarray(false);
   3014     arg_name->set_type(GLMessage::DataType::INT);
   3015     arg_name->add_intvalue((int)name);
   3016 
   3017     // call function
   3018     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3019     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3020     int retValue = glContext->hooks->gl.glGetUniformLocation(program, name);
   3021     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3022     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3023 
   3024     // set return value
   3025     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3026     rt->set_isarray(false);
   3027     rt->set_type(GLMessage::DataType::INT);
   3028     rt->add_intvalue(retValue);
   3029 
   3030     void *pointerArgs[] = {
   3031         (void *) name,
   3032     };
   3033 
   3034     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3035                               threadStartTime, threadEndTime,
   3036                               &glmsg, pointerArgs);
   3037     glContext->traceGLMessage(&glmsg);
   3038 
   3039     return retValue;
   3040 }
   3041 
   3042 void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) {
   3043     GLMessage glmsg;
   3044     GLTraceContext *glContext = getGLTraceContext();
   3045 
   3046     glmsg.set_function(GLMessage::glGetVertexAttribfv);
   3047 
   3048     // copy argument index
   3049     GLMessage_DataType *arg_index = glmsg.add_args();
   3050     arg_index->set_isarray(false);
   3051     arg_index->set_type(GLMessage::DataType::INT);
   3052     arg_index->add_intvalue(index);
   3053 
   3054     // copy argument pname
   3055     GLMessage_DataType *arg_pname = glmsg.add_args();
   3056     arg_pname->set_isarray(false);
   3057     arg_pname->set_type(GLMessage::DataType::ENUM);
   3058     arg_pname->add_intvalue((int)pname);
   3059 
   3060     // copy argument params
   3061     GLMessage_DataType *arg_params = glmsg.add_args();
   3062     arg_params->set_isarray(false);
   3063     arg_params->set_type(GLMessage::DataType::INT);
   3064     arg_params->add_intvalue((int)params);
   3065 
   3066     // call function
   3067     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3068     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3069     glContext->hooks->gl.glGetVertexAttribfv(index, pname, params);
   3070     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3071     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3072 
   3073     void *pointerArgs[] = {
   3074         (void *) params,
   3075     };
   3076 
   3077     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3078                               threadStartTime, threadEndTime,
   3079                               &glmsg, pointerArgs);
   3080     glContext->traceGLMessage(&glmsg);
   3081 }
   3082 
   3083 void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) {
   3084     GLMessage glmsg;
   3085     GLTraceContext *glContext = getGLTraceContext();
   3086 
   3087     glmsg.set_function(GLMessage::glGetVertexAttribiv);
   3088 
   3089     // copy argument index
   3090     GLMessage_DataType *arg_index = glmsg.add_args();
   3091     arg_index->set_isarray(false);
   3092     arg_index->set_type(GLMessage::DataType::INT);
   3093     arg_index->add_intvalue(index);
   3094 
   3095     // copy argument pname
   3096     GLMessage_DataType *arg_pname = glmsg.add_args();
   3097     arg_pname->set_isarray(false);
   3098     arg_pname->set_type(GLMessage::DataType::ENUM);
   3099     arg_pname->add_intvalue((int)pname);
   3100 
   3101     // copy argument params
   3102     GLMessage_DataType *arg_params = glmsg.add_args();
   3103     arg_params->set_isarray(false);
   3104     arg_params->set_type(GLMessage::DataType::INT);
   3105     arg_params->add_intvalue((int)params);
   3106 
   3107     // call function
   3108     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3109     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3110     glContext->hooks->gl.glGetVertexAttribiv(index, pname, params);
   3111     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3112     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3113 
   3114     void *pointerArgs[] = {
   3115         (void *) params,
   3116     };
   3117 
   3118     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3119                               threadStartTime, threadEndTime,
   3120                               &glmsg, pointerArgs);
   3121     glContext->traceGLMessage(&glmsg);
   3122 }
   3123 
   3124 void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) {
   3125     GLMessage glmsg;
   3126     GLTraceContext *glContext = getGLTraceContext();
   3127 
   3128     glmsg.set_function(GLMessage::glGetVertexAttribPointerv);
   3129 
   3130     // copy argument index
   3131     GLMessage_DataType *arg_index = glmsg.add_args();
   3132     arg_index->set_isarray(false);
   3133     arg_index->set_type(GLMessage::DataType::INT);
   3134     arg_index->add_intvalue(index);
   3135 
   3136     // copy argument pname
   3137     GLMessage_DataType *arg_pname = glmsg.add_args();
   3138     arg_pname->set_isarray(false);
   3139     arg_pname->set_type(GLMessage::DataType::ENUM);
   3140     arg_pname->add_intvalue((int)pname);
   3141 
   3142     // copy argument pointer
   3143     GLMessage_DataType *arg_pointer = glmsg.add_args();
   3144     arg_pointer->set_isarray(false);
   3145     arg_pointer->set_type(GLMessage::DataType::INT);
   3146     arg_pointer->add_intvalue((int)pointer);
   3147 
   3148     // call function
   3149     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3150     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3151     glContext->hooks->gl.glGetVertexAttribPointerv(index, pname, pointer);
   3152     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3153     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3154 
   3155     void *pointerArgs[] = {
   3156         (void *) pointer,
   3157     };
   3158 
   3159     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3160                               threadStartTime, threadEndTime,
   3161                               &glmsg, pointerArgs);
   3162     glContext->traceGLMessage(&glmsg);
   3163 }
   3164 
   3165 void GLTrace_glHint(GLenum target, GLenum mode) {
   3166     GLMessage glmsg;
   3167     GLTraceContext *glContext = getGLTraceContext();
   3168 
   3169     glmsg.set_function(GLMessage::glHint);
   3170 
   3171     // copy argument target
   3172     GLMessage_DataType *arg_target = glmsg.add_args();
   3173     arg_target->set_isarray(false);
   3174     arg_target->set_type(GLMessage::DataType::ENUM);
   3175     arg_target->add_intvalue((int)target);
   3176 
   3177     // copy argument mode
   3178     GLMessage_DataType *arg_mode = glmsg.add_args();
   3179     arg_mode->set_isarray(false);
   3180     arg_mode->set_type(GLMessage::DataType::ENUM);
   3181     arg_mode->add_intvalue((int)mode);
   3182 
   3183     // call function
   3184     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3185     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3186     glContext->hooks->gl.glHint(target, mode);
   3187     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3188     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3189 
   3190     void *pointerArgs[] = {
   3191     };
   3192 
   3193     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3194                               threadStartTime, threadEndTime,
   3195                               &glmsg, pointerArgs);
   3196     glContext->traceGLMessage(&glmsg);
   3197 }
   3198 
   3199 GLboolean GLTrace_glIsBuffer(GLuint buffer) {
   3200     GLMessage glmsg;
   3201     GLTraceContext *glContext = getGLTraceContext();
   3202 
   3203     glmsg.set_function(GLMessage::glIsBuffer);
   3204 
   3205     // copy argument buffer
   3206     GLMessage_DataType *arg_buffer = glmsg.add_args();
   3207     arg_buffer->set_isarray(false);
   3208     arg_buffer->set_type(GLMessage::DataType::INT);
   3209     arg_buffer->add_intvalue(buffer);
   3210 
   3211     // call function
   3212     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3213     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3214     GLboolean retValue = glContext->hooks->gl.glIsBuffer(buffer);
   3215     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3216     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3217 
   3218     // set return value
   3219     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3220     rt->set_isarray(false);
   3221     rt->set_type(GLMessage::DataType::BOOL);
   3222     rt->add_boolvalue(retValue);
   3223 
   3224     void *pointerArgs[] = {
   3225     };
   3226 
   3227     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3228                               threadStartTime, threadEndTime,
   3229                               &glmsg, pointerArgs);
   3230     glContext->traceGLMessage(&glmsg);
   3231 
   3232     return retValue;
   3233 }
   3234 
   3235 GLboolean GLTrace_glIsEnabled(GLenum cap) {
   3236     GLMessage glmsg;
   3237     GLTraceContext *glContext = getGLTraceContext();
   3238 
   3239     glmsg.set_function(GLMessage::glIsEnabled);
   3240 
   3241     // copy argument cap
   3242     GLMessage_DataType *arg_cap = glmsg.add_args();
   3243     arg_cap->set_isarray(false);
   3244     arg_cap->set_type(GLMessage::DataType::ENUM);
   3245     arg_cap->add_intvalue((int)cap);
   3246 
   3247     // call function
   3248     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3249     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3250     GLboolean retValue = glContext->hooks->gl.glIsEnabled(cap);
   3251     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3252     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3253 
   3254     // set return value
   3255     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3256     rt->set_isarray(false);
   3257     rt->set_type(GLMessage::DataType::BOOL);
   3258     rt->add_boolvalue(retValue);
   3259 
   3260     void *pointerArgs[] = {
   3261     };
   3262 
   3263     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3264                               threadStartTime, threadEndTime,
   3265                               &glmsg, pointerArgs);
   3266     glContext->traceGLMessage(&glmsg);
   3267 
   3268     return retValue;
   3269 }
   3270 
   3271 GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer) {
   3272     GLMessage glmsg;
   3273     GLTraceContext *glContext = getGLTraceContext();
   3274 
   3275     glmsg.set_function(GLMessage::glIsFramebuffer);
   3276 
   3277     // copy argument framebuffer
   3278     GLMessage_DataType *arg_framebuffer = glmsg.add_args();
   3279     arg_framebuffer->set_isarray(false);
   3280     arg_framebuffer->set_type(GLMessage::DataType::INT);
   3281     arg_framebuffer->add_intvalue(framebuffer);
   3282 
   3283     // call function
   3284     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3285     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3286     GLboolean retValue = glContext->hooks->gl.glIsFramebuffer(framebuffer);
   3287     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3288     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3289 
   3290     // set return value
   3291     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3292     rt->set_isarray(false);
   3293     rt->set_type(GLMessage::DataType::BOOL);
   3294     rt->add_boolvalue(retValue);
   3295 
   3296     void *pointerArgs[] = {
   3297     };
   3298 
   3299     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3300                               threadStartTime, threadEndTime,
   3301                               &glmsg, pointerArgs);
   3302     glContext->traceGLMessage(&glmsg);
   3303 
   3304     return retValue;
   3305 }
   3306 
   3307 GLboolean GLTrace_glIsProgram(GLuint program) {
   3308     GLMessage glmsg;
   3309     GLTraceContext *glContext = getGLTraceContext();
   3310 
   3311     glmsg.set_function(GLMessage::glIsProgram);
   3312 
   3313     // copy argument program
   3314     GLMessage_DataType *arg_program = glmsg.add_args();
   3315     arg_program->set_isarray(false);
   3316     arg_program->set_type(GLMessage::DataType::INT);
   3317     arg_program->add_intvalue(program);
   3318 
   3319     // call function
   3320     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3321     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3322     GLboolean retValue = glContext->hooks->gl.glIsProgram(program);
   3323     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3324     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3325 
   3326     // set return value
   3327     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3328     rt->set_isarray(false);
   3329     rt->set_type(GLMessage::DataType::BOOL);
   3330     rt->add_boolvalue(retValue);
   3331 
   3332     void *pointerArgs[] = {
   3333     };
   3334 
   3335     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3336                               threadStartTime, threadEndTime,
   3337                               &glmsg, pointerArgs);
   3338     glContext->traceGLMessage(&glmsg);
   3339 
   3340     return retValue;
   3341 }
   3342 
   3343 GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer) {
   3344     GLMessage glmsg;
   3345     GLTraceContext *glContext = getGLTraceContext();
   3346 
   3347     glmsg.set_function(GLMessage::glIsRenderbuffer);
   3348 
   3349     // copy argument renderbuffer
   3350     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   3351     arg_renderbuffer->set_isarray(false);
   3352     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   3353     arg_renderbuffer->add_intvalue(renderbuffer);
   3354 
   3355     // call function
   3356     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3357     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3358     GLboolean retValue = glContext->hooks->gl.glIsRenderbuffer(renderbuffer);
   3359     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3360     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3361 
   3362     // set return value
   3363     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3364     rt->set_isarray(false);
   3365     rt->set_type(GLMessage::DataType::BOOL);
   3366     rt->add_boolvalue(retValue);
   3367 
   3368     void *pointerArgs[] = {
   3369     };
   3370 
   3371     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3372                               threadStartTime, threadEndTime,
   3373                               &glmsg, pointerArgs);
   3374     glContext->traceGLMessage(&glmsg);
   3375 
   3376     return retValue;
   3377 }
   3378 
   3379 GLboolean GLTrace_glIsShader(GLuint shader) {
   3380     GLMessage glmsg;
   3381     GLTraceContext *glContext = getGLTraceContext();
   3382 
   3383     glmsg.set_function(GLMessage::glIsShader);
   3384 
   3385     // copy argument shader
   3386     GLMessage_DataType *arg_shader = glmsg.add_args();
   3387     arg_shader->set_isarray(false);
   3388     arg_shader->set_type(GLMessage::DataType::INT);
   3389     arg_shader->add_intvalue(shader);
   3390 
   3391     // call function
   3392     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3393     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3394     GLboolean retValue = glContext->hooks->gl.glIsShader(shader);
   3395     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3396     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3397 
   3398     // set return value
   3399     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3400     rt->set_isarray(false);
   3401     rt->set_type(GLMessage::DataType::BOOL);
   3402     rt->add_boolvalue(retValue);
   3403 
   3404     void *pointerArgs[] = {
   3405     };
   3406 
   3407     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3408                               threadStartTime, threadEndTime,
   3409                               &glmsg, pointerArgs);
   3410     glContext->traceGLMessage(&glmsg);
   3411 
   3412     return retValue;
   3413 }
   3414 
   3415 GLboolean GLTrace_glIsTexture(GLuint texture) {
   3416     GLMessage glmsg;
   3417     GLTraceContext *glContext = getGLTraceContext();
   3418 
   3419     glmsg.set_function(GLMessage::glIsTexture);
   3420 
   3421     // copy argument texture
   3422     GLMessage_DataType *arg_texture = glmsg.add_args();
   3423     arg_texture->set_isarray(false);
   3424     arg_texture->set_type(GLMessage::DataType::INT);
   3425     arg_texture->add_intvalue(texture);
   3426 
   3427     // call function
   3428     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3429     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3430     GLboolean retValue = glContext->hooks->gl.glIsTexture(texture);
   3431     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3432     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3433 
   3434     // set return value
   3435     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   3436     rt->set_isarray(false);
   3437     rt->set_type(GLMessage::DataType::BOOL);
   3438     rt->add_boolvalue(retValue);
   3439 
   3440     void *pointerArgs[] = {
   3441     };
   3442 
   3443     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3444                               threadStartTime, threadEndTime,
   3445                               &glmsg, pointerArgs);
   3446     glContext->traceGLMessage(&glmsg);
   3447 
   3448     return retValue;
   3449 }
   3450 
   3451 void GLTrace_glLineWidth(GLfloat width) {
   3452     GLMessage glmsg;
   3453     GLTraceContext *glContext = getGLTraceContext();
   3454 
   3455     glmsg.set_function(GLMessage::glLineWidth);
   3456 
   3457     // copy argument width
   3458     GLMessage_DataType *arg_width = glmsg.add_args();
   3459     arg_width->set_isarray(false);
   3460     arg_width->set_type(GLMessage::DataType::FLOAT);
   3461     arg_width->add_floatvalue(width);
   3462 
   3463     // call function
   3464     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3465     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3466     glContext->hooks->gl.glLineWidth(width);
   3467     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3468     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3469 
   3470     void *pointerArgs[] = {
   3471     };
   3472 
   3473     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3474                               threadStartTime, threadEndTime,
   3475                               &glmsg, pointerArgs);
   3476     glContext->traceGLMessage(&glmsg);
   3477 }
   3478 
   3479 void GLTrace_glLinkProgram(GLuint program) {
   3480     GLMessage glmsg;
   3481     GLTraceContext *glContext = getGLTraceContext();
   3482 
   3483     glmsg.set_function(GLMessage::glLinkProgram);
   3484 
   3485     // copy argument program
   3486     GLMessage_DataType *arg_program = glmsg.add_args();
   3487     arg_program->set_isarray(false);
   3488     arg_program->set_type(GLMessage::DataType::INT);
   3489     arg_program->add_intvalue(program);
   3490 
   3491     // call function
   3492     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3493     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3494     glContext->hooks->gl.glLinkProgram(program);
   3495     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3496     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3497 
   3498     void *pointerArgs[] = {
   3499     };
   3500 
   3501     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3502                               threadStartTime, threadEndTime,
   3503                               &glmsg, pointerArgs);
   3504     glContext->traceGLMessage(&glmsg);
   3505 }
   3506 
   3507 void GLTrace_glPixelStorei(GLenum pname, GLint param) {
   3508     GLMessage glmsg;
   3509     GLTraceContext *glContext = getGLTraceContext();
   3510 
   3511     glmsg.set_function(GLMessage::glPixelStorei);
   3512 
   3513     // copy argument pname
   3514     GLMessage_DataType *arg_pname = glmsg.add_args();
   3515     arg_pname->set_isarray(false);
   3516     arg_pname->set_type(GLMessage::DataType::ENUM);
   3517     arg_pname->add_intvalue((int)pname);
   3518 
   3519     // copy argument param
   3520     GLMessage_DataType *arg_param = glmsg.add_args();
   3521     arg_param->set_isarray(false);
   3522     arg_param->set_type(GLMessage::DataType::INT);
   3523     arg_param->add_intvalue(param);
   3524 
   3525     // call function
   3526     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3527     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3528     glContext->hooks->gl.glPixelStorei(pname, param);
   3529     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3530     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3531 
   3532     void *pointerArgs[] = {
   3533     };
   3534 
   3535     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3536                               threadStartTime, threadEndTime,
   3537                               &glmsg, pointerArgs);
   3538     glContext->traceGLMessage(&glmsg);
   3539 }
   3540 
   3541 void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units) {
   3542     GLMessage glmsg;
   3543     GLTraceContext *glContext = getGLTraceContext();
   3544 
   3545     glmsg.set_function(GLMessage::glPolygonOffset);
   3546 
   3547     // copy argument factor
   3548     GLMessage_DataType *arg_factor = glmsg.add_args();
   3549     arg_factor->set_isarray(false);
   3550     arg_factor->set_type(GLMessage::DataType::FLOAT);
   3551     arg_factor->add_floatvalue(factor);
   3552 
   3553     // copy argument units
   3554     GLMessage_DataType *arg_units = glmsg.add_args();
   3555     arg_units->set_isarray(false);
   3556     arg_units->set_type(GLMessage::DataType::FLOAT);
   3557     arg_units->add_floatvalue(units);
   3558 
   3559     // call function
   3560     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3561     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3562     glContext->hooks->gl.glPolygonOffset(factor, units);
   3563     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3564     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3565 
   3566     void *pointerArgs[] = {
   3567     };
   3568 
   3569     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3570                               threadStartTime, threadEndTime,
   3571                               &glmsg, pointerArgs);
   3572     glContext->traceGLMessage(&glmsg);
   3573 }
   3574 
   3575 void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) {
   3576     GLMessage glmsg;
   3577     GLTraceContext *glContext = getGLTraceContext();
   3578 
   3579     glmsg.set_function(GLMessage::glReadPixels);
   3580 
   3581     // copy argument x
   3582     GLMessage_DataType *arg_x = glmsg.add_args();
   3583     arg_x->set_isarray(false);
   3584     arg_x->set_type(GLMessage::DataType::INT);
   3585     arg_x->add_intvalue(x);
   3586 
   3587     // copy argument y
   3588     GLMessage_DataType *arg_y = glmsg.add_args();
   3589     arg_y->set_isarray(false);
   3590     arg_y->set_type(GLMessage::DataType::INT);
   3591     arg_y->add_intvalue(y);
   3592 
   3593     // copy argument width
   3594     GLMessage_DataType *arg_width = glmsg.add_args();
   3595     arg_width->set_isarray(false);
   3596     arg_width->set_type(GLMessage::DataType::INT);
   3597     arg_width->add_intvalue(width);
   3598 
   3599     // copy argument height
   3600     GLMessage_DataType *arg_height = glmsg.add_args();
   3601     arg_height->set_isarray(false);
   3602     arg_height->set_type(GLMessage::DataType::INT);
   3603     arg_height->add_intvalue(height);
   3604 
   3605     // copy argument format
   3606     GLMessage_DataType *arg_format = glmsg.add_args();
   3607     arg_format->set_isarray(false);
   3608     arg_format->set_type(GLMessage::DataType::ENUM);
   3609     arg_format->add_intvalue((int)format);
   3610 
   3611     // copy argument type
   3612     GLMessage_DataType *arg_type = glmsg.add_args();
   3613     arg_type->set_isarray(false);
   3614     arg_type->set_type(GLMessage::DataType::ENUM);
   3615     arg_type->add_intvalue((int)type);
   3616 
   3617     // copy argument pixels
   3618     GLMessage_DataType *arg_pixels = glmsg.add_args();
   3619     arg_pixels->set_isarray(false);
   3620     arg_pixels->set_type(GLMessage::DataType::INT);
   3621     arg_pixels->add_intvalue((int)pixels);
   3622 
   3623     // call function
   3624     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3625     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3626     glContext->hooks->gl.glReadPixels(x, y, width, height, format, type, pixels);
   3627     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3628     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3629 
   3630     void *pointerArgs[] = {
   3631         (void *) pixels,
   3632     };
   3633 
   3634     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3635                               threadStartTime, threadEndTime,
   3636                               &glmsg, pointerArgs);
   3637     glContext->traceGLMessage(&glmsg);
   3638 }
   3639 
   3640 void GLTrace_glReleaseShaderCompiler(void) {
   3641     GLMessage glmsg;
   3642     GLTraceContext *glContext = getGLTraceContext();
   3643 
   3644     glmsg.set_function(GLMessage::glReleaseShaderCompiler);
   3645 
   3646     // call function
   3647     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3648     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3649     glContext->hooks->gl.glReleaseShaderCompiler();
   3650     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3651     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3652 
   3653     void *pointerArgs[] = {
   3654     };
   3655 
   3656     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3657                               threadStartTime, threadEndTime,
   3658                               &glmsg, pointerArgs);
   3659     glContext->traceGLMessage(&glmsg);
   3660 }
   3661 
   3662 void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
   3663     GLMessage glmsg;
   3664     GLTraceContext *glContext = getGLTraceContext();
   3665 
   3666     glmsg.set_function(GLMessage::glRenderbufferStorage);
   3667 
   3668     // copy argument target
   3669     GLMessage_DataType *arg_target = glmsg.add_args();
   3670     arg_target->set_isarray(false);
   3671     arg_target->set_type(GLMessage::DataType::ENUM);
   3672     arg_target->add_intvalue((int)target);
   3673 
   3674     // copy argument internalformat
   3675     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   3676     arg_internalformat->set_isarray(false);
   3677     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   3678     arg_internalformat->add_intvalue((int)internalformat);
   3679 
   3680     // copy argument width
   3681     GLMessage_DataType *arg_width = glmsg.add_args();
   3682     arg_width->set_isarray(false);
   3683     arg_width->set_type(GLMessage::DataType::INT);
   3684     arg_width->add_intvalue(width);
   3685 
   3686     // copy argument height
   3687     GLMessage_DataType *arg_height = glmsg.add_args();
   3688     arg_height->set_isarray(false);
   3689     arg_height->set_type(GLMessage::DataType::INT);
   3690     arg_height->add_intvalue(height);
   3691 
   3692     // call function
   3693     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3694     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3695     glContext->hooks->gl.glRenderbufferStorage(target, internalformat, width, height);
   3696     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3697     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3698 
   3699     void *pointerArgs[] = {
   3700     };
   3701 
   3702     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3703                               threadStartTime, threadEndTime,
   3704                               &glmsg, pointerArgs);
   3705     glContext->traceGLMessage(&glmsg);
   3706 }
   3707 
   3708 void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert) {
   3709     GLMessage glmsg;
   3710     GLTraceContext *glContext = getGLTraceContext();
   3711 
   3712     glmsg.set_function(GLMessage::glSampleCoverage);
   3713 
   3714     // copy argument value
   3715     GLMessage_DataType *arg_value = glmsg.add_args();
   3716     arg_value->set_isarray(false);
   3717     arg_value->set_type(GLMessage::DataType::FLOAT);
   3718     arg_value->add_floatvalue(value);
   3719 
   3720     // copy argument invert
   3721     GLMessage_DataType *arg_invert = glmsg.add_args();
   3722     arg_invert->set_isarray(false);
   3723     arg_invert->set_type(GLMessage::DataType::BOOL);
   3724     arg_invert->add_boolvalue(invert);
   3725 
   3726     // call function
   3727     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3728     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3729     glContext->hooks->gl.glSampleCoverage(value, invert);
   3730     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3731     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3732 
   3733     void *pointerArgs[] = {
   3734     };
   3735 
   3736     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3737                               threadStartTime, threadEndTime,
   3738                               &glmsg, pointerArgs);
   3739     glContext->traceGLMessage(&glmsg);
   3740 }
   3741 
   3742 void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) {
   3743     GLMessage glmsg;
   3744     GLTraceContext *glContext = getGLTraceContext();
   3745 
   3746     glmsg.set_function(GLMessage::glScissor);
   3747 
   3748     // copy argument x
   3749     GLMessage_DataType *arg_x = glmsg.add_args();
   3750     arg_x->set_isarray(false);
   3751     arg_x->set_type(GLMessage::DataType::INT);
   3752     arg_x->add_intvalue(x);
   3753 
   3754     // copy argument y
   3755     GLMessage_DataType *arg_y = glmsg.add_args();
   3756     arg_y->set_isarray(false);
   3757     arg_y->set_type(GLMessage::DataType::INT);
   3758     arg_y->add_intvalue(y);
   3759 
   3760     // copy argument width
   3761     GLMessage_DataType *arg_width = glmsg.add_args();
   3762     arg_width->set_isarray(false);
   3763     arg_width->set_type(GLMessage::DataType::INT);
   3764     arg_width->add_intvalue(width);
   3765 
   3766     // copy argument height
   3767     GLMessage_DataType *arg_height = glmsg.add_args();
   3768     arg_height->set_isarray(false);
   3769     arg_height->set_type(GLMessage::DataType::INT);
   3770     arg_height->add_intvalue(height);
   3771 
   3772     // call function
   3773     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3774     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3775     glContext->hooks->gl.glScissor(x, y, width, height);
   3776     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3777     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3778 
   3779     void *pointerArgs[] = {
   3780     };
   3781 
   3782     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3783                               threadStartTime, threadEndTime,
   3784                               &glmsg, pointerArgs);
   3785     glContext->traceGLMessage(&glmsg);
   3786 }
   3787 
   3788 void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) {
   3789     GLMessage glmsg;
   3790     GLTraceContext *glContext = getGLTraceContext();
   3791 
   3792     glmsg.set_function(GLMessage::glShaderBinary);
   3793 
   3794     // copy argument n
   3795     GLMessage_DataType *arg_n = glmsg.add_args();
   3796     arg_n->set_isarray(false);
   3797     arg_n->set_type(GLMessage::DataType::INT);
   3798     arg_n->add_intvalue(n);
   3799 
   3800     // copy argument shaders
   3801     GLMessage_DataType *arg_shaders = glmsg.add_args();
   3802     arg_shaders->set_isarray(false);
   3803     arg_shaders->set_type(GLMessage::DataType::INT);
   3804     arg_shaders->add_intvalue((int)shaders);
   3805 
   3806     // copy argument binaryformat
   3807     GLMessage_DataType *arg_binaryformat = glmsg.add_args();
   3808     arg_binaryformat->set_isarray(false);
   3809     arg_binaryformat->set_type(GLMessage::DataType::ENUM);
   3810     arg_binaryformat->add_intvalue((int)binaryformat);
   3811 
   3812     // copy argument binary
   3813     GLMessage_DataType *arg_binary = glmsg.add_args();
   3814     arg_binary->set_isarray(false);
   3815     arg_binary->set_type(GLMessage::DataType::INT);
   3816     arg_binary->add_intvalue((int)binary);
   3817 
   3818     // copy argument length
   3819     GLMessage_DataType *arg_length = glmsg.add_args();
   3820     arg_length->set_isarray(false);
   3821     arg_length->set_type(GLMessage::DataType::INT);
   3822     arg_length->add_intvalue(length);
   3823 
   3824     // call function
   3825     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3826     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3827     glContext->hooks->gl.glShaderBinary(n, shaders, binaryformat, binary, length);
   3828     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3829     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3830 
   3831     void *pointerArgs[] = {
   3832         (void *) shaders,
   3833         (void *) binary,
   3834     };
   3835 
   3836     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3837                               threadStartTime, threadEndTime,
   3838                               &glmsg, pointerArgs);
   3839     glContext->traceGLMessage(&glmsg);
   3840 }
   3841 
   3842 void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) {
   3843     GLMessage glmsg;
   3844     GLTraceContext *glContext = getGLTraceContext();
   3845 
   3846     glmsg.set_function(GLMessage::glShaderSource);
   3847 
   3848     // copy argument shader
   3849     GLMessage_DataType *arg_shader = glmsg.add_args();
   3850     arg_shader->set_isarray(false);
   3851     arg_shader->set_type(GLMessage::DataType::INT);
   3852     arg_shader->add_intvalue(shader);
   3853 
   3854     // copy argument count
   3855     GLMessage_DataType *arg_count = glmsg.add_args();
   3856     arg_count->set_isarray(false);
   3857     arg_count->set_type(GLMessage::DataType::INT);
   3858     arg_count->add_intvalue(count);
   3859 
   3860     // copy argument string
   3861     GLMessage_DataType *arg_string = glmsg.add_args();
   3862     arg_string->set_isarray(false);
   3863     arg_string->set_type(GLMessage::DataType::INT);
   3864     arg_string->add_intvalue((int)string);
   3865 
   3866     // copy argument length
   3867     GLMessage_DataType *arg_length = glmsg.add_args();
   3868     arg_length->set_isarray(false);
   3869     arg_length->set_type(GLMessage::DataType::INT);
   3870     arg_length->add_intvalue((int)length);
   3871 
   3872     // call function
   3873     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3874     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3875     glContext->hooks->gl.glShaderSource(shader, count, string, length);
   3876     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3877     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3878 
   3879     void *pointerArgs[] = {
   3880         (void *) string,
   3881         (void *) length,
   3882     };
   3883 
   3884     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3885                               threadStartTime, threadEndTime,
   3886                               &glmsg, pointerArgs);
   3887     glContext->traceGLMessage(&glmsg);
   3888 }
   3889 
   3890 void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask) {
   3891     GLMessage glmsg;
   3892     GLTraceContext *glContext = getGLTraceContext();
   3893 
   3894     glmsg.set_function(GLMessage::glStencilFunc);
   3895 
   3896     // copy argument func
   3897     GLMessage_DataType *arg_func = glmsg.add_args();
   3898     arg_func->set_isarray(false);
   3899     arg_func->set_type(GLMessage::DataType::ENUM);
   3900     arg_func->add_intvalue((int)func);
   3901 
   3902     // copy argument ref
   3903     GLMessage_DataType *arg_ref = glmsg.add_args();
   3904     arg_ref->set_isarray(false);
   3905     arg_ref->set_type(GLMessage::DataType::INT);
   3906     arg_ref->add_intvalue(ref);
   3907 
   3908     // copy argument mask
   3909     GLMessage_DataType *arg_mask = glmsg.add_args();
   3910     arg_mask->set_isarray(false);
   3911     arg_mask->set_type(GLMessage::DataType::INT);
   3912     arg_mask->add_intvalue(mask);
   3913 
   3914     // call function
   3915     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3916     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3917     glContext->hooks->gl.glStencilFunc(func, ref, mask);
   3918     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3919     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3920 
   3921     void *pointerArgs[] = {
   3922     };
   3923 
   3924     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3925                               threadStartTime, threadEndTime,
   3926                               &glmsg, pointerArgs);
   3927     glContext->traceGLMessage(&glmsg);
   3928 }
   3929 
   3930 void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) {
   3931     GLMessage glmsg;
   3932     GLTraceContext *glContext = getGLTraceContext();
   3933 
   3934     glmsg.set_function(GLMessage::glStencilFuncSeparate);
   3935 
   3936     // copy argument face
   3937     GLMessage_DataType *arg_face = glmsg.add_args();
   3938     arg_face->set_isarray(false);
   3939     arg_face->set_type(GLMessage::DataType::ENUM);
   3940     arg_face->add_intvalue((int)face);
   3941 
   3942     // copy argument func
   3943     GLMessage_DataType *arg_func = glmsg.add_args();
   3944     arg_func->set_isarray(false);
   3945     arg_func->set_type(GLMessage::DataType::ENUM);
   3946     arg_func->add_intvalue((int)func);
   3947 
   3948     // copy argument ref
   3949     GLMessage_DataType *arg_ref = glmsg.add_args();
   3950     arg_ref->set_isarray(false);
   3951     arg_ref->set_type(GLMessage::DataType::INT);
   3952     arg_ref->add_intvalue(ref);
   3953 
   3954     // copy argument mask
   3955     GLMessage_DataType *arg_mask = glmsg.add_args();
   3956     arg_mask->set_isarray(false);
   3957     arg_mask->set_type(GLMessage::DataType::INT);
   3958     arg_mask->add_intvalue(mask);
   3959 
   3960     // call function
   3961     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3962     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3963     glContext->hooks->gl.glStencilFuncSeparate(face, func, ref, mask);
   3964     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3965     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3966 
   3967     void *pointerArgs[] = {
   3968     };
   3969 
   3970     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3971                               threadStartTime, threadEndTime,
   3972                               &glmsg, pointerArgs);
   3973     glContext->traceGLMessage(&glmsg);
   3974 }
   3975 
   3976 void GLTrace_glStencilMask(GLuint mask) {
   3977     GLMessage glmsg;
   3978     GLTraceContext *glContext = getGLTraceContext();
   3979 
   3980     glmsg.set_function(GLMessage::glStencilMask);
   3981 
   3982     // copy argument mask
   3983     GLMessage_DataType *arg_mask = glmsg.add_args();
   3984     arg_mask->set_isarray(false);
   3985     arg_mask->set_type(GLMessage::DataType::INT);
   3986     arg_mask->add_intvalue(mask);
   3987 
   3988     // call function
   3989     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3990     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   3991     glContext->hooks->gl.glStencilMask(mask);
   3992     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   3993     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   3994 
   3995     void *pointerArgs[] = {
   3996     };
   3997 
   3998     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   3999                               threadStartTime, threadEndTime,
   4000                               &glmsg, pointerArgs);
   4001     glContext->traceGLMessage(&glmsg);
   4002 }
   4003 
   4004 void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask) {
   4005     GLMessage glmsg;
   4006     GLTraceContext *glContext = getGLTraceContext();
   4007 
   4008     glmsg.set_function(GLMessage::glStencilMaskSeparate);
   4009 
   4010     // copy argument face
   4011     GLMessage_DataType *arg_face = glmsg.add_args();
   4012     arg_face->set_isarray(false);
   4013     arg_face->set_type(GLMessage::DataType::ENUM);
   4014     arg_face->add_intvalue((int)face);
   4015 
   4016     // copy argument mask
   4017     GLMessage_DataType *arg_mask = glmsg.add_args();
   4018     arg_mask->set_isarray(false);
   4019     arg_mask->set_type(GLMessage::DataType::INT);
   4020     arg_mask->add_intvalue(mask);
   4021 
   4022     // call function
   4023     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4024     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4025     glContext->hooks->gl.glStencilMaskSeparate(face, mask);
   4026     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4027     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4028 
   4029     void *pointerArgs[] = {
   4030     };
   4031 
   4032     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4033                               threadStartTime, threadEndTime,
   4034                               &glmsg, pointerArgs);
   4035     glContext->traceGLMessage(&glmsg);
   4036 }
   4037 
   4038 void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) {
   4039     GLMessage glmsg;
   4040     GLTraceContext *glContext = getGLTraceContext();
   4041 
   4042     glmsg.set_function(GLMessage::glStencilOp);
   4043 
   4044     // copy argument fail
   4045     GLMessage_DataType *arg_fail = glmsg.add_args();
   4046     arg_fail->set_isarray(false);
   4047     arg_fail->set_type(GLMessage::DataType::ENUM);
   4048     arg_fail->add_intvalue((int)fail);
   4049 
   4050     // copy argument zfail
   4051     GLMessage_DataType *arg_zfail = glmsg.add_args();
   4052     arg_zfail->set_isarray(false);
   4053     arg_zfail->set_type(GLMessage::DataType::ENUM);
   4054     arg_zfail->add_intvalue((int)zfail);
   4055 
   4056     // copy argument zpass
   4057     GLMessage_DataType *arg_zpass = glmsg.add_args();
   4058     arg_zpass->set_isarray(false);
   4059     arg_zpass->set_type(GLMessage::DataType::ENUM);
   4060     arg_zpass->add_intvalue((int)zpass);
   4061 
   4062     // call function
   4063     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4064     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4065     glContext->hooks->gl.glStencilOp(fail, zfail, zpass);
   4066     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4067     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4068 
   4069     void *pointerArgs[] = {
   4070     };
   4071 
   4072     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4073                               threadStartTime, threadEndTime,
   4074                               &glmsg, pointerArgs);
   4075     glContext->traceGLMessage(&glmsg);
   4076 }
   4077 
   4078 void GLTrace_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) {
   4079     GLMessage glmsg;
   4080     GLTraceContext *glContext = getGLTraceContext();
   4081 
   4082     glmsg.set_function(GLMessage::glStencilOpSeparate);
   4083 
   4084     // copy argument face
   4085     GLMessage_DataType *arg_face = glmsg.add_args();
   4086     arg_face->set_isarray(false);
   4087     arg_face->set_type(GLMessage::DataType::ENUM);
   4088     arg_face->add_intvalue((int)face);
   4089 
   4090     // copy argument fail
   4091     GLMessage_DataType *arg_fail = glmsg.add_args();
   4092     arg_fail->set_isarray(false);
   4093     arg_fail->set_type(GLMessage::DataType::ENUM);
   4094     arg_fail->add_intvalue((int)fail);
   4095 
   4096     // copy argument zfail
   4097     GLMessage_DataType *arg_zfail = glmsg.add_args();
   4098     arg_zfail->set_isarray(false);
   4099     arg_zfail->set_type(GLMessage::DataType::ENUM);
   4100     arg_zfail->add_intvalue((int)zfail);
   4101 
   4102     // copy argument zpass
   4103     GLMessage_DataType *arg_zpass = glmsg.add_args();
   4104     arg_zpass->set_isarray(false);
   4105     arg_zpass->set_type(GLMessage::DataType::ENUM);
   4106     arg_zpass->add_intvalue((int)zpass);
   4107 
   4108     // call function
   4109     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4110     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4111     glContext->hooks->gl.glStencilOpSeparate(face, fail, zfail, zpass);
   4112     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4113     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4114 
   4115     void *pointerArgs[] = {
   4116     };
   4117 
   4118     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4119                               threadStartTime, threadEndTime,
   4120                               &glmsg, pointerArgs);
   4121     glContext->traceGLMessage(&glmsg);
   4122 }
   4123 
   4124 void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
   4125     GLMessage glmsg;
   4126     GLTraceContext *glContext = getGLTraceContext();
   4127 
   4128     glmsg.set_function(GLMessage::glTexImage2D);
   4129 
   4130     // copy argument target
   4131     GLMessage_DataType *arg_target = glmsg.add_args();
   4132     arg_target->set_isarray(false);
   4133     arg_target->set_type(GLMessage::DataType::ENUM);
   4134     arg_target->add_intvalue((int)target);
   4135 
   4136     // copy argument level
   4137     GLMessage_DataType *arg_level = glmsg.add_args();
   4138     arg_level->set_isarray(false);
   4139     arg_level->set_type(GLMessage::DataType::INT);
   4140     arg_level->add_intvalue(level);
   4141 
   4142     // copy argument internalformat
   4143     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   4144     arg_internalformat->set_isarray(false);
   4145     arg_internalformat->set_type(GLMessage::DataType::INT);
   4146     arg_internalformat->add_intvalue(internalformat);
   4147 
   4148     // copy argument width
   4149     GLMessage_DataType *arg_width = glmsg.add_args();
   4150     arg_width->set_isarray(false);
   4151     arg_width->set_type(GLMessage::DataType::INT);
   4152     arg_width->add_intvalue(width);
   4153 
   4154     // copy argument height
   4155     GLMessage_DataType *arg_height = glmsg.add_args();
   4156     arg_height->set_isarray(false);
   4157     arg_height->set_type(GLMessage::DataType::INT);
   4158     arg_height->add_intvalue(height);
   4159 
   4160     // copy argument border
   4161     GLMessage_DataType *arg_border = glmsg.add_args();
   4162     arg_border->set_isarray(false);
   4163     arg_border->set_type(GLMessage::DataType::INT);
   4164     arg_border->add_intvalue(border);
   4165 
   4166     // copy argument format
   4167     GLMessage_DataType *arg_format = glmsg.add_args();
   4168     arg_format->set_isarray(false);
   4169     arg_format->set_type(GLMessage::DataType::ENUM);
   4170     arg_format->add_intvalue((int)format);
   4171 
   4172     // copy argument type
   4173     GLMessage_DataType *arg_type = glmsg.add_args();
   4174     arg_type->set_isarray(false);
   4175     arg_type->set_type(GLMessage::DataType::ENUM);
   4176     arg_type->add_intvalue((int)type);
   4177 
   4178     // copy argument pixels
   4179     GLMessage_DataType *arg_pixels = glmsg.add_args();
   4180     arg_pixels->set_isarray(false);
   4181     arg_pixels->set_type(GLMessage::DataType::INT);
   4182     arg_pixels->add_intvalue((int)pixels);
   4183 
   4184     // call function
   4185     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4186     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4187     glContext->hooks->gl.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
   4188     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4189     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4190 
   4191     void *pointerArgs[] = {
   4192         (void *) pixels,
   4193     };
   4194 
   4195     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4196                               threadStartTime, threadEndTime,
   4197                               &glmsg, pointerArgs);
   4198     glContext->traceGLMessage(&glmsg);
   4199 }
   4200 
   4201 void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param) {
   4202     GLMessage glmsg;
   4203     GLTraceContext *glContext = getGLTraceContext();
   4204 
   4205     glmsg.set_function(GLMessage::glTexParameterf);
   4206 
   4207     // copy argument target
   4208     GLMessage_DataType *arg_target = glmsg.add_args();
   4209     arg_target->set_isarray(false);
   4210     arg_target->set_type(GLMessage::DataType::ENUM);
   4211     arg_target->add_intvalue((int)target);
   4212 
   4213     // copy argument pname
   4214     GLMessage_DataType *arg_pname = glmsg.add_args();
   4215     arg_pname->set_isarray(false);
   4216     arg_pname->set_type(GLMessage::DataType::ENUM);
   4217     arg_pname->add_intvalue((int)pname);
   4218 
   4219     // copy argument param
   4220     GLMessage_DataType *arg_param = glmsg.add_args();
   4221     arg_param->set_isarray(false);
   4222     arg_param->set_type(GLMessage::DataType::FLOAT);
   4223     arg_param->add_floatvalue(param);
   4224 
   4225     // call function
   4226     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4227     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4228     glContext->hooks->gl.glTexParameterf(target, pname, param);
   4229     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4230     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4231 
   4232     void *pointerArgs[] = {
   4233     };
   4234 
   4235     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4236                               threadStartTime, threadEndTime,
   4237                               &glmsg, pointerArgs);
   4238     glContext->traceGLMessage(&glmsg);
   4239 }
   4240 
   4241 void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) {
   4242     GLMessage glmsg;
   4243     GLTraceContext *glContext = getGLTraceContext();
   4244 
   4245     glmsg.set_function(GLMessage::glTexParameterfv);
   4246 
   4247     // copy argument target
   4248     GLMessage_DataType *arg_target = glmsg.add_args();
   4249     arg_target->set_isarray(false);
   4250     arg_target->set_type(GLMessage::DataType::ENUM);
   4251     arg_target->add_intvalue((int)target);
   4252 
   4253     // copy argument pname
   4254     GLMessage_DataType *arg_pname = glmsg.add_args();
   4255     arg_pname->set_isarray(false);
   4256     arg_pname->set_type(GLMessage::DataType::ENUM);
   4257     arg_pname->add_intvalue((int)pname);
   4258 
   4259     // copy argument params
   4260     GLMessage_DataType *arg_params = glmsg.add_args();
   4261     arg_params->set_isarray(false);
   4262     arg_params->set_type(GLMessage::DataType::INT);
   4263     arg_params->add_intvalue((int)params);
   4264 
   4265     // call function
   4266     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4267     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4268     glContext->hooks->gl.glTexParameterfv(target, pname, params);
   4269     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4270     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4271 
   4272     void *pointerArgs[] = {
   4273         (void *) params,
   4274     };
   4275 
   4276     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4277                               threadStartTime, threadEndTime,
   4278                               &glmsg, pointerArgs);
   4279     glContext->traceGLMessage(&glmsg);
   4280 }
   4281 
   4282 void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param) {
   4283     GLMessage glmsg;
   4284     GLTraceContext *glContext = getGLTraceContext();
   4285 
   4286     glmsg.set_function(GLMessage::glTexParameteri);
   4287 
   4288     // copy argument target
   4289     GLMessage_DataType *arg_target = glmsg.add_args();
   4290     arg_target->set_isarray(false);
   4291     arg_target->set_type(GLMessage::DataType::ENUM);
   4292     arg_target->add_intvalue((int)target);
   4293 
   4294     // copy argument pname
   4295     GLMessage_DataType *arg_pname = glmsg.add_args();
   4296     arg_pname->set_isarray(false);
   4297     arg_pname->set_type(GLMessage::DataType::ENUM);
   4298     arg_pname->add_intvalue((int)pname);
   4299 
   4300     // copy argument param
   4301     GLMessage_DataType *arg_param = glmsg.add_args();
   4302     arg_param->set_isarray(false);
   4303     arg_param->set_type(GLMessage::DataType::INT);
   4304     arg_param->add_intvalue(param);
   4305 
   4306     // call function
   4307     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4308     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4309     glContext->hooks->gl.glTexParameteri(target, pname, param);
   4310     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4311     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4312 
   4313     void *pointerArgs[] = {
   4314     };
   4315 
   4316     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4317                               threadStartTime, threadEndTime,
   4318                               &glmsg, pointerArgs);
   4319     glContext->traceGLMessage(&glmsg);
   4320 }
   4321 
   4322 void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) {
   4323     GLMessage glmsg;
   4324     GLTraceContext *glContext = getGLTraceContext();
   4325 
   4326     glmsg.set_function(GLMessage::glTexParameteriv);
   4327 
   4328     // copy argument target
   4329     GLMessage_DataType *arg_target = glmsg.add_args();
   4330     arg_target->set_isarray(false);
   4331     arg_target->set_type(GLMessage::DataType::ENUM);
   4332     arg_target->add_intvalue((int)target);
   4333 
   4334     // copy argument pname
   4335     GLMessage_DataType *arg_pname = glmsg.add_args();
   4336     arg_pname->set_isarray(false);
   4337     arg_pname->set_type(GLMessage::DataType::ENUM);
   4338     arg_pname->add_intvalue((int)pname);
   4339 
   4340     // copy argument params
   4341     GLMessage_DataType *arg_params = glmsg.add_args();
   4342     arg_params->set_isarray(false);
   4343     arg_params->set_type(GLMessage::DataType::INT);
   4344     arg_params->add_intvalue((int)params);
   4345 
   4346     // call function
   4347     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4348     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4349     glContext->hooks->gl.glTexParameteriv(target, pname, params);
   4350     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4351     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4352 
   4353     void *pointerArgs[] = {
   4354         (void *) params,
   4355     };
   4356 
   4357     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4358                               threadStartTime, threadEndTime,
   4359                               &glmsg, pointerArgs);
   4360     glContext->traceGLMessage(&glmsg);
   4361 }
   4362 
   4363 void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) {
   4364     GLMessage glmsg;
   4365     GLTraceContext *glContext = getGLTraceContext();
   4366 
   4367     glmsg.set_function(GLMessage::glTexSubImage2D);
   4368 
   4369     // copy argument target
   4370     GLMessage_DataType *arg_target = glmsg.add_args();
   4371     arg_target->set_isarray(false);
   4372     arg_target->set_type(GLMessage::DataType::ENUM);
   4373     arg_target->add_intvalue((int)target);
   4374 
   4375     // copy argument level
   4376     GLMessage_DataType *arg_level = glmsg.add_args();
   4377     arg_level->set_isarray(false);
   4378     arg_level->set_type(GLMessage::DataType::INT);
   4379     arg_level->add_intvalue(level);
   4380 
   4381     // copy argument xoffset
   4382     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   4383     arg_xoffset->set_isarray(false);
   4384     arg_xoffset->set_type(GLMessage::DataType::INT);
   4385     arg_xoffset->add_intvalue(xoffset);
   4386 
   4387     // copy argument yoffset
   4388     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   4389     arg_yoffset->set_isarray(false);
   4390     arg_yoffset->set_type(GLMessage::DataType::INT);
   4391     arg_yoffset->add_intvalue(yoffset);
   4392 
   4393     // copy argument width
   4394     GLMessage_DataType *arg_width = glmsg.add_args();
   4395     arg_width->set_isarray(false);
   4396     arg_width->set_type(GLMessage::DataType::INT);
   4397     arg_width->add_intvalue(width);
   4398 
   4399     // copy argument height
   4400     GLMessage_DataType *arg_height = glmsg.add_args();
   4401     arg_height->set_isarray(false);
   4402     arg_height->set_type(GLMessage::DataType::INT);
   4403     arg_height->add_intvalue(height);
   4404 
   4405     // copy argument format
   4406     GLMessage_DataType *arg_format = glmsg.add_args();
   4407     arg_format->set_isarray(false);
   4408     arg_format->set_type(GLMessage::DataType::ENUM);
   4409     arg_format->add_intvalue((int)format);
   4410 
   4411     // copy argument type
   4412     GLMessage_DataType *arg_type = glmsg.add_args();
   4413     arg_type->set_isarray(false);
   4414     arg_type->set_type(GLMessage::DataType::ENUM);
   4415     arg_type->add_intvalue((int)type);
   4416 
   4417     // copy argument pixels
   4418     GLMessage_DataType *arg_pixels = glmsg.add_args();
   4419     arg_pixels->set_isarray(false);
   4420     arg_pixels->set_type(GLMessage::DataType::INT);
   4421     arg_pixels->add_intvalue((int)pixels);
   4422 
   4423     // call function
   4424     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4425     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4426     glContext->hooks->gl.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
   4427     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4428     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4429 
   4430     void *pointerArgs[] = {
   4431         (void *) pixels,
   4432     };
   4433 
   4434     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4435                               threadStartTime, threadEndTime,
   4436                               &glmsg, pointerArgs);
   4437     glContext->traceGLMessage(&glmsg);
   4438 }
   4439 
   4440 void GLTrace_glUniform1f(GLint location, GLfloat x) {
   4441     GLMessage glmsg;
   4442     GLTraceContext *glContext = getGLTraceContext();
   4443 
   4444     glmsg.set_function(GLMessage::glUniform1f);
   4445 
   4446     // copy argument location
   4447     GLMessage_DataType *arg_location = glmsg.add_args();
   4448     arg_location->set_isarray(false);
   4449     arg_location->set_type(GLMessage::DataType::INT);
   4450     arg_location->add_intvalue(location);
   4451 
   4452     // copy argument x
   4453     GLMessage_DataType *arg_x = glmsg.add_args();
   4454     arg_x->set_isarray(false);
   4455     arg_x->set_type(GLMessage::DataType::FLOAT);
   4456     arg_x->add_floatvalue(x);
   4457 
   4458     // call function
   4459     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4460     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4461     glContext->hooks->gl.glUniform1f(location, x);
   4462     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4463     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4464 
   4465     void *pointerArgs[] = {
   4466     };
   4467 
   4468     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4469                               threadStartTime, threadEndTime,
   4470                               &glmsg, pointerArgs);
   4471     glContext->traceGLMessage(&glmsg);
   4472 }
   4473 
   4474 void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) {
   4475     GLMessage glmsg;
   4476     GLTraceContext *glContext = getGLTraceContext();
   4477 
   4478     glmsg.set_function(GLMessage::glUniform1fv);
   4479 
   4480     // copy argument location
   4481     GLMessage_DataType *arg_location = glmsg.add_args();
   4482     arg_location->set_isarray(false);
   4483     arg_location->set_type(GLMessage::DataType::INT);
   4484     arg_location->add_intvalue(location);
   4485 
   4486     // copy argument count
   4487     GLMessage_DataType *arg_count = glmsg.add_args();
   4488     arg_count->set_isarray(false);
   4489     arg_count->set_type(GLMessage::DataType::INT);
   4490     arg_count->add_intvalue(count);
   4491 
   4492     // copy argument v
   4493     GLMessage_DataType *arg_v = glmsg.add_args();
   4494     arg_v->set_isarray(false);
   4495     arg_v->set_type(GLMessage::DataType::INT);
   4496     arg_v->add_intvalue((int)v);
   4497 
   4498     // call function
   4499     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4500     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4501     glContext->hooks->gl.glUniform1fv(location, count, v);
   4502     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4503     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4504 
   4505     void *pointerArgs[] = {
   4506         (void *) v,
   4507     };
   4508 
   4509     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4510                               threadStartTime, threadEndTime,
   4511                               &glmsg, pointerArgs);
   4512     glContext->traceGLMessage(&glmsg);
   4513 }
   4514 
   4515 void GLTrace_glUniform1i(GLint location, GLint x) {
   4516     GLMessage glmsg;
   4517     GLTraceContext *glContext = getGLTraceContext();
   4518 
   4519     glmsg.set_function(GLMessage::glUniform1i);
   4520 
   4521     // copy argument location
   4522     GLMessage_DataType *arg_location = glmsg.add_args();
   4523     arg_location->set_isarray(false);
   4524     arg_location->set_type(GLMessage::DataType::INT);
   4525     arg_location->add_intvalue(location);
   4526 
   4527     // copy argument x
   4528     GLMessage_DataType *arg_x = glmsg.add_args();
   4529     arg_x->set_isarray(false);
   4530     arg_x->set_type(GLMessage::DataType::INT);
   4531     arg_x->add_intvalue(x);
   4532 
   4533     // call function
   4534     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4535     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4536     glContext->hooks->gl.glUniform1i(location, x);
   4537     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4538     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4539 
   4540     void *pointerArgs[] = {
   4541     };
   4542 
   4543     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4544                               threadStartTime, threadEndTime,
   4545                               &glmsg, pointerArgs);
   4546     glContext->traceGLMessage(&glmsg);
   4547 }
   4548 
   4549 void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint* v) {
   4550     GLMessage glmsg;
   4551     GLTraceContext *glContext = getGLTraceContext();
   4552 
   4553     glmsg.set_function(GLMessage::glUniform1iv);
   4554 
   4555     // copy argument location
   4556     GLMessage_DataType *arg_location = glmsg.add_args();
   4557     arg_location->set_isarray(false);
   4558     arg_location->set_type(GLMessage::DataType::INT);
   4559     arg_location->add_intvalue(location);
   4560 
   4561     // copy argument count
   4562     GLMessage_DataType *arg_count = glmsg.add_args();
   4563     arg_count->set_isarray(false);
   4564     arg_count->set_type(GLMessage::DataType::INT);
   4565     arg_count->add_intvalue(count);
   4566 
   4567     // copy argument v
   4568     GLMessage_DataType *arg_v = glmsg.add_args();
   4569     arg_v->set_isarray(false);
   4570     arg_v->set_type(GLMessage::DataType::INT);
   4571     arg_v->add_intvalue((int)v);
   4572 
   4573     // call function
   4574     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4575     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4576     glContext->hooks->gl.glUniform1iv(location, count, v);
   4577     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4578     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4579 
   4580     void *pointerArgs[] = {
   4581         (void *) v,
   4582     };
   4583 
   4584     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4585                               threadStartTime, threadEndTime,
   4586                               &glmsg, pointerArgs);
   4587     glContext->traceGLMessage(&glmsg);
   4588 }
   4589 
   4590 void GLTrace_glUniform2f(GLint location, GLfloat x, GLfloat y) {
   4591     GLMessage glmsg;
   4592     GLTraceContext *glContext = getGLTraceContext();
   4593 
   4594     glmsg.set_function(GLMessage::glUniform2f);
   4595 
   4596     // copy argument location
   4597     GLMessage_DataType *arg_location = glmsg.add_args();
   4598     arg_location->set_isarray(false);
   4599     arg_location->set_type(GLMessage::DataType::INT);
   4600     arg_location->add_intvalue(location);
   4601 
   4602     // copy argument x
   4603     GLMessage_DataType *arg_x = glmsg.add_args();
   4604     arg_x->set_isarray(false);
   4605     arg_x->set_type(GLMessage::DataType::FLOAT);
   4606     arg_x->add_floatvalue(x);
   4607 
   4608     // copy argument y
   4609     GLMessage_DataType *arg_y = glmsg.add_args();
   4610     arg_y->set_isarray(false);
   4611     arg_y->set_type(GLMessage::DataType::FLOAT);
   4612     arg_y->add_floatvalue(y);
   4613 
   4614     // call function
   4615     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4616     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4617     glContext->hooks->gl.glUniform2f(location, x, y);
   4618     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4619     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4620 
   4621     void *pointerArgs[] = {
   4622     };
   4623 
   4624     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4625                               threadStartTime, threadEndTime,
   4626                               &glmsg, pointerArgs);
   4627     glContext->traceGLMessage(&glmsg);
   4628 }
   4629 
   4630 void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) {
   4631     GLMessage glmsg;
   4632     GLTraceContext *glContext = getGLTraceContext();
   4633 
   4634     glmsg.set_function(GLMessage::glUniform2fv);
   4635 
   4636     // copy argument location
   4637     GLMessage_DataType *arg_location = glmsg.add_args();
   4638     arg_location->set_isarray(false);
   4639     arg_location->set_type(GLMessage::DataType::INT);
   4640     arg_location->add_intvalue(location);
   4641 
   4642     // copy argument count
   4643     GLMessage_DataType *arg_count = glmsg.add_args();
   4644     arg_count->set_isarray(false);
   4645     arg_count->set_type(GLMessage::DataType::INT);
   4646     arg_count->add_intvalue(count);
   4647 
   4648     // copy argument v
   4649     GLMessage_DataType *arg_v = glmsg.add_args();
   4650     arg_v->set_isarray(false);
   4651     arg_v->set_type(GLMessage::DataType::INT);
   4652     arg_v->add_intvalue((int)v);
   4653 
   4654     // call function
   4655     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4656     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4657     glContext->hooks->gl.glUniform2fv(location, count, v);
   4658     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4659     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4660 
   4661     void *pointerArgs[] = {
   4662         (void *) v,
   4663     };
   4664 
   4665     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4666                               threadStartTime, threadEndTime,
   4667                               &glmsg, pointerArgs);
   4668     glContext->traceGLMessage(&glmsg);
   4669 }
   4670 
   4671 void GLTrace_glUniform2i(GLint location, GLint x, GLint y) {
   4672     GLMessage glmsg;
   4673     GLTraceContext *glContext = getGLTraceContext();
   4674 
   4675     glmsg.set_function(GLMessage::glUniform2i);
   4676 
   4677     // copy argument location
   4678     GLMessage_DataType *arg_location = glmsg.add_args();
   4679     arg_location->set_isarray(false);
   4680     arg_location->set_type(GLMessage::DataType::INT);
   4681     arg_location->add_intvalue(location);
   4682 
   4683     // copy argument x
   4684     GLMessage_DataType *arg_x = glmsg.add_args();
   4685     arg_x->set_isarray(false);
   4686     arg_x->set_type(GLMessage::DataType::INT);
   4687     arg_x->add_intvalue(x);
   4688 
   4689     // copy argument y
   4690     GLMessage_DataType *arg_y = glmsg.add_args();
   4691     arg_y->set_isarray(false);
   4692     arg_y->set_type(GLMessage::DataType::INT);
   4693     arg_y->add_intvalue(y);
   4694 
   4695     // call function
   4696     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4697     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4698     glContext->hooks->gl.glUniform2i(location, x, y);
   4699     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4700     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4701 
   4702     void *pointerArgs[] = {
   4703     };
   4704 
   4705     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4706                               threadStartTime, threadEndTime,
   4707                               &glmsg, pointerArgs);
   4708     glContext->traceGLMessage(&glmsg);
   4709 }
   4710 
   4711 void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint* v) {
   4712     GLMessage glmsg;
   4713     GLTraceContext *glContext = getGLTraceContext();
   4714 
   4715     glmsg.set_function(GLMessage::glUniform2iv);
   4716 
   4717     // copy argument location
   4718     GLMessage_DataType *arg_location = glmsg.add_args();
   4719     arg_location->set_isarray(false);
   4720     arg_location->set_type(GLMessage::DataType::INT);
   4721     arg_location->add_intvalue(location);
   4722 
   4723     // copy argument count
   4724     GLMessage_DataType *arg_count = glmsg.add_args();
   4725     arg_count->set_isarray(false);
   4726     arg_count->set_type(GLMessage::DataType::INT);
   4727     arg_count->add_intvalue(count);
   4728 
   4729     // copy argument v
   4730     GLMessage_DataType *arg_v = glmsg.add_args();
   4731     arg_v->set_isarray(false);
   4732     arg_v->set_type(GLMessage::DataType::INT);
   4733     arg_v->add_intvalue((int)v);
   4734 
   4735     // call function
   4736     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4737     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4738     glContext->hooks->gl.glUniform2iv(location, count, v);
   4739     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4740     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4741 
   4742     void *pointerArgs[] = {
   4743         (void *) v,
   4744     };
   4745 
   4746     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4747                               threadStartTime, threadEndTime,
   4748                               &glmsg, pointerArgs);
   4749     glContext->traceGLMessage(&glmsg);
   4750 }
   4751 
   4752 void GLTrace_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) {
   4753     GLMessage glmsg;
   4754     GLTraceContext *glContext = getGLTraceContext();
   4755 
   4756     glmsg.set_function(GLMessage::glUniform3f);
   4757 
   4758     // copy argument location
   4759     GLMessage_DataType *arg_location = glmsg.add_args();
   4760     arg_location->set_isarray(false);
   4761     arg_location->set_type(GLMessage::DataType::INT);
   4762     arg_location->add_intvalue(location);
   4763 
   4764     // copy argument x
   4765     GLMessage_DataType *arg_x = glmsg.add_args();
   4766     arg_x->set_isarray(false);
   4767     arg_x->set_type(GLMessage::DataType::FLOAT);
   4768     arg_x->add_floatvalue(x);
   4769 
   4770     // copy argument y
   4771     GLMessage_DataType *arg_y = glmsg.add_args();
   4772     arg_y->set_isarray(false);
   4773     arg_y->set_type(GLMessage::DataType::FLOAT);
   4774     arg_y->add_floatvalue(y);
   4775 
   4776     // copy argument z
   4777     GLMessage_DataType *arg_z = glmsg.add_args();
   4778     arg_z->set_isarray(false);
   4779     arg_z->set_type(GLMessage::DataType::FLOAT);
   4780     arg_z->add_floatvalue(z);
   4781 
   4782     // call function
   4783     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4784     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4785     glContext->hooks->gl.glUniform3f(location, x, y, z);
   4786     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4787     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4788 
   4789     void *pointerArgs[] = {
   4790     };
   4791 
   4792     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4793                               threadStartTime, threadEndTime,
   4794                               &glmsg, pointerArgs);
   4795     glContext->traceGLMessage(&glmsg);
   4796 }
   4797 
   4798 void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) {
   4799     GLMessage glmsg;
   4800     GLTraceContext *glContext = getGLTraceContext();
   4801 
   4802     glmsg.set_function(GLMessage::glUniform3fv);
   4803 
   4804     // copy argument location
   4805     GLMessage_DataType *arg_location = glmsg.add_args();
   4806     arg_location->set_isarray(false);
   4807     arg_location->set_type(GLMessage::DataType::INT);
   4808     arg_location->add_intvalue(location);
   4809 
   4810     // copy argument count
   4811     GLMessage_DataType *arg_count = glmsg.add_args();
   4812     arg_count->set_isarray(false);
   4813     arg_count->set_type(GLMessage::DataType::INT);
   4814     arg_count->add_intvalue(count);
   4815 
   4816     // copy argument v
   4817     GLMessage_DataType *arg_v = glmsg.add_args();
   4818     arg_v->set_isarray(false);
   4819     arg_v->set_type(GLMessage::DataType::INT);
   4820     arg_v->add_intvalue((int)v);
   4821 
   4822     // call function
   4823     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4824     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4825     glContext->hooks->gl.glUniform3fv(location, count, v);
   4826     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4827     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4828 
   4829     void *pointerArgs[] = {
   4830         (void *) v,
   4831     };
   4832 
   4833     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4834                               threadStartTime, threadEndTime,
   4835                               &glmsg, pointerArgs);
   4836     glContext->traceGLMessage(&glmsg);
   4837 }
   4838 
   4839 void GLTrace_glUniform3i(GLint location, GLint x, GLint y, GLint z) {
   4840     GLMessage glmsg;
   4841     GLTraceContext *glContext = getGLTraceContext();
   4842 
   4843     glmsg.set_function(GLMessage::glUniform3i);
   4844 
   4845     // copy argument location
   4846     GLMessage_DataType *arg_location = glmsg.add_args();
   4847     arg_location->set_isarray(false);
   4848     arg_location->set_type(GLMessage::DataType::INT);
   4849     arg_location->add_intvalue(location);
   4850 
   4851     // copy argument x
   4852     GLMessage_DataType *arg_x = glmsg.add_args();
   4853     arg_x->set_isarray(false);
   4854     arg_x->set_type(GLMessage::DataType::INT);
   4855     arg_x->add_intvalue(x);
   4856 
   4857     // copy argument y
   4858     GLMessage_DataType *arg_y = glmsg.add_args();
   4859     arg_y->set_isarray(false);
   4860     arg_y->set_type(GLMessage::DataType::INT);
   4861     arg_y->add_intvalue(y);
   4862 
   4863     // copy argument z
   4864     GLMessage_DataType *arg_z = glmsg.add_args();
   4865     arg_z->set_isarray(false);
   4866     arg_z->set_type(GLMessage::DataType::INT);
   4867     arg_z->add_intvalue(z);
   4868 
   4869     // call function
   4870     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4871     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4872     glContext->hooks->gl.glUniform3i(location, x, y, z);
   4873     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4874     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4875 
   4876     void *pointerArgs[] = {
   4877     };
   4878 
   4879     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4880                               threadStartTime, threadEndTime,
   4881                               &glmsg, pointerArgs);
   4882     glContext->traceGLMessage(&glmsg);
   4883 }
   4884 
   4885 void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint* v) {
   4886     GLMessage glmsg;
   4887     GLTraceContext *glContext = getGLTraceContext();
   4888 
   4889     glmsg.set_function(GLMessage::glUniform3iv);
   4890 
   4891     // copy argument location
   4892     GLMessage_DataType *arg_location = glmsg.add_args();
   4893     arg_location->set_isarray(false);
   4894     arg_location->set_type(GLMessage::DataType::INT);
   4895     arg_location->add_intvalue(location);
   4896 
   4897     // copy argument count
   4898     GLMessage_DataType *arg_count = glmsg.add_args();
   4899     arg_count->set_isarray(false);
   4900     arg_count->set_type(GLMessage::DataType::INT);
   4901     arg_count->add_intvalue(count);
   4902 
   4903     // copy argument v
   4904     GLMessage_DataType *arg_v = glmsg.add_args();
   4905     arg_v->set_isarray(false);
   4906     arg_v->set_type(GLMessage::DataType::INT);
   4907     arg_v->add_intvalue((int)v);
   4908 
   4909     // call function
   4910     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4911     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4912     glContext->hooks->gl.glUniform3iv(location, count, v);
   4913     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4914     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4915 
   4916     void *pointerArgs[] = {
   4917         (void *) v,
   4918     };
   4919 
   4920     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4921                               threadStartTime, threadEndTime,
   4922                               &glmsg, pointerArgs);
   4923     glContext->traceGLMessage(&glmsg);
   4924 }
   4925 
   4926 void GLTrace_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
   4927     GLMessage glmsg;
   4928     GLTraceContext *glContext = getGLTraceContext();
   4929 
   4930     glmsg.set_function(GLMessage::glUniform4f);
   4931 
   4932     // copy argument location
   4933     GLMessage_DataType *arg_location = glmsg.add_args();
   4934     arg_location->set_isarray(false);
   4935     arg_location->set_type(GLMessage::DataType::INT);
   4936     arg_location->add_intvalue(location);
   4937 
   4938     // copy argument x
   4939     GLMessage_DataType *arg_x = glmsg.add_args();
   4940     arg_x->set_isarray(false);
   4941     arg_x->set_type(GLMessage::DataType::FLOAT);
   4942     arg_x->add_floatvalue(x);
   4943 
   4944     // copy argument y
   4945     GLMessage_DataType *arg_y = glmsg.add_args();
   4946     arg_y->set_isarray(false);
   4947     arg_y->set_type(GLMessage::DataType::FLOAT);
   4948     arg_y->add_floatvalue(y);
   4949 
   4950     // copy argument z
   4951     GLMessage_DataType *arg_z = glmsg.add_args();
   4952     arg_z->set_isarray(false);
   4953     arg_z->set_type(GLMessage::DataType::FLOAT);
   4954     arg_z->add_floatvalue(z);
   4955 
   4956     // copy argument w
   4957     GLMessage_DataType *arg_w = glmsg.add_args();
   4958     arg_w->set_isarray(false);
   4959     arg_w->set_type(GLMessage::DataType::FLOAT);
   4960     arg_w->add_floatvalue(w);
   4961 
   4962     // call function
   4963     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4964     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   4965     glContext->hooks->gl.glUniform4f(location, x, y, z, w);
   4966     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   4967     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   4968 
   4969     void *pointerArgs[] = {
   4970     };
   4971 
   4972     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   4973                               threadStartTime, threadEndTime,
   4974                               &glmsg, pointerArgs);
   4975     glContext->traceGLMessage(&glmsg);
   4976 }
   4977 
   4978 void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) {
   4979     GLMessage glmsg;
   4980     GLTraceContext *glContext = getGLTraceContext();
   4981 
   4982     glmsg.set_function(GLMessage::glUniform4fv);
   4983 
   4984     // copy argument location
   4985     GLMessage_DataType *arg_location = glmsg.add_args();
   4986     arg_location->set_isarray(false);
   4987     arg_location->set_type(GLMessage::DataType::INT);
   4988     arg_location->add_intvalue(location);
   4989 
   4990     // copy argument count
   4991     GLMessage_DataType *arg_count = glmsg.add_args();
   4992     arg_count->set_isarray(false);
   4993     arg_count->set_type(GLMessage::DataType::INT);
   4994     arg_count->add_intvalue(count);
   4995 
   4996     // copy argument v
   4997     GLMessage_DataType *arg_v = glmsg.add_args();
   4998     arg_v->set_isarray(false);
   4999     arg_v->set_type(GLMessage::DataType::INT);
   5000     arg_v->add_intvalue((int)v);
   5001 
   5002     // call function
   5003     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5004     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5005     glContext->hooks->gl.glUniform4fv(location, count, v);
   5006     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5007     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5008 
   5009     void *pointerArgs[] = {
   5010         (void *) v,
   5011     };
   5012 
   5013     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5014                               threadStartTime, threadEndTime,
   5015                               &glmsg, pointerArgs);
   5016     glContext->traceGLMessage(&glmsg);
   5017 }
   5018 
   5019 void GLTrace_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) {
   5020     GLMessage glmsg;
   5021     GLTraceContext *glContext = getGLTraceContext();
   5022 
   5023     glmsg.set_function(GLMessage::glUniform4i);
   5024 
   5025     // copy argument location
   5026     GLMessage_DataType *arg_location = glmsg.add_args();
   5027     arg_location->set_isarray(false);
   5028     arg_location->set_type(GLMessage::DataType::INT);
   5029     arg_location->add_intvalue(location);
   5030 
   5031     // copy argument x
   5032     GLMessage_DataType *arg_x = glmsg.add_args();
   5033     arg_x->set_isarray(false);
   5034     arg_x->set_type(GLMessage::DataType::INT);
   5035     arg_x->add_intvalue(x);
   5036 
   5037     // copy argument y
   5038     GLMessage_DataType *arg_y = glmsg.add_args();
   5039     arg_y->set_isarray(false);
   5040     arg_y->set_type(GLMessage::DataType::INT);
   5041     arg_y->add_intvalue(y);
   5042 
   5043     // copy argument z
   5044     GLMessage_DataType *arg_z = glmsg.add_args();
   5045     arg_z->set_isarray(false);
   5046     arg_z->set_type(GLMessage::DataType::INT);
   5047     arg_z->add_intvalue(z);
   5048 
   5049     // copy argument w
   5050     GLMessage_DataType *arg_w = glmsg.add_args();
   5051     arg_w->set_isarray(false);
   5052     arg_w->set_type(GLMessage::DataType::INT);
   5053     arg_w->add_intvalue(w);
   5054 
   5055     // call function
   5056     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5057     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5058     glContext->hooks->gl.glUniform4i(location, x, y, z, w);
   5059     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5060     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5061 
   5062     void *pointerArgs[] = {
   5063     };
   5064 
   5065     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5066                               threadStartTime, threadEndTime,
   5067                               &glmsg, pointerArgs);
   5068     glContext->traceGLMessage(&glmsg);
   5069 }
   5070 
   5071 void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint* v) {
   5072     GLMessage glmsg;
   5073     GLTraceContext *glContext = getGLTraceContext();
   5074 
   5075     glmsg.set_function(GLMessage::glUniform4iv);
   5076 
   5077     // copy argument location
   5078     GLMessage_DataType *arg_location = glmsg.add_args();
   5079     arg_location->set_isarray(false);
   5080     arg_location->set_type(GLMessage::DataType::INT);
   5081     arg_location->add_intvalue(location);
   5082 
   5083     // copy argument count
   5084     GLMessage_DataType *arg_count = glmsg.add_args();
   5085     arg_count->set_isarray(false);
   5086     arg_count->set_type(GLMessage::DataType::INT);
   5087     arg_count->add_intvalue(count);
   5088 
   5089     // copy argument v
   5090     GLMessage_DataType *arg_v = glmsg.add_args();
   5091     arg_v->set_isarray(false);
   5092     arg_v->set_type(GLMessage::DataType::INT);
   5093     arg_v->add_intvalue((int)v);
   5094 
   5095     // call function
   5096     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5097     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5098     glContext->hooks->gl.glUniform4iv(location, count, v);
   5099     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5100     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5101 
   5102     void *pointerArgs[] = {
   5103         (void *) v,
   5104     };
   5105 
   5106     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5107                               threadStartTime, threadEndTime,
   5108                               &glmsg, pointerArgs);
   5109     glContext->traceGLMessage(&glmsg);
   5110 }
   5111 
   5112 void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   5113     GLMessage glmsg;
   5114     GLTraceContext *glContext = getGLTraceContext();
   5115 
   5116     glmsg.set_function(GLMessage::glUniformMatrix2fv);
   5117 
   5118     // copy argument location
   5119     GLMessage_DataType *arg_location = glmsg.add_args();
   5120     arg_location->set_isarray(false);
   5121     arg_location->set_type(GLMessage::DataType::INT);
   5122     arg_location->add_intvalue(location);
   5123 
   5124     // copy argument count
   5125     GLMessage_DataType *arg_count = glmsg.add_args();
   5126     arg_count->set_isarray(false);
   5127     arg_count->set_type(GLMessage::DataType::INT);
   5128     arg_count->add_intvalue(count);
   5129 
   5130     // copy argument transpose
   5131     GLMessage_DataType *arg_transpose = glmsg.add_args();
   5132     arg_transpose->set_isarray(false);
   5133     arg_transpose->set_type(GLMessage::DataType::BOOL);
   5134     arg_transpose->add_boolvalue(transpose);
   5135 
   5136     // copy argument value
   5137     GLMessage_DataType *arg_value = glmsg.add_args();
   5138     arg_value->set_isarray(false);
   5139     arg_value->set_type(GLMessage::DataType::INT);
   5140     arg_value->add_intvalue((int)value);
   5141 
   5142     // call function
   5143     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5144     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5145     glContext->hooks->gl.glUniformMatrix2fv(location, count, transpose, value);
   5146     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5147     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5148 
   5149     void *pointerArgs[] = {
   5150         (void *) value,
   5151     };
   5152 
   5153     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5154                               threadStartTime, threadEndTime,
   5155                               &glmsg, pointerArgs);
   5156     glContext->traceGLMessage(&glmsg);
   5157 }
   5158 
   5159 void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   5160     GLMessage glmsg;
   5161     GLTraceContext *glContext = getGLTraceContext();
   5162 
   5163     glmsg.set_function(GLMessage::glUniformMatrix3fv);
   5164 
   5165     // copy argument location
   5166     GLMessage_DataType *arg_location = glmsg.add_args();
   5167     arg_location->set_isarray(false);
   5168     arg_location->set_type(GLMessage::DataType::INT);
   5169     arg_location->add_intvalue(location);
   5170 
   5171     // copy argument count
   5172     GLMessage_DataType *arg_count = glmsg.add_args();
   5173     arg_count->set_isarray(false);
   5174     arg_count->set_type(GLMessage::DataType::INT);
   5175     arg_count->add_intvalue(count);
   5176 
   5177     // copy argument transpose
   5178     GLMessage_DataType *arg_transpose = glmsg.add_args();
   5179     arg_transpose->set_isarray(false);
   5180     arg_transpose->set_type(GLMessage::DataType::BOOL);
   5181     arg_transpose->add_boolvalue(transpose);
   5182 
   5183     // copy argument value
   5184     GLMessage_DataType *arg_value = glmsg.add_args();
   5185     arg_value->set_isarray(false);
   5186     arg_value->set_type(GLMessage::DataType::INT);
   5187     arg_value->add_intvalue((int)value);
   5188 
   5189     // call function
   5190     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5191     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5192     glContext->hooks->gl.glUniformMatrix3fv(location, count, transpose, value);
   5193     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5194     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5195 
   5196     void *pointerArgs[] = {
   5197         (void *) value,
   5198     };
   5199 
   5200     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5201                               threadStartTime, threadEndTime,
   5202                               &glmsg, pointerArgs);
   5203     glContext->traceGLMessage(&glmsg);
   5204 }
   5205 
   5206 void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   5207     GLMessage glmsg;
   5208     GLTraceContext *glContext = getGLTraceContext();
   5209 
   5210     glmsg.set_function(GLMessage::glUniformMatrix4fv);
   5211 
   5212     // copy argument location
   5213     GLMessage_DataType *arg_location = glmsg.add_args();
   5214     arg_location->set_isarray(false);
   5215     arg_location->set_type(GLMessage::DataType::INT);
   5216     arg_location->add_intvalue(location);
   5217 
   5218     // copy argument count
   5219     GLMessage_DataType *arg_count = glmsg.add_args();
   5220     arg_count->set_isarray(false);
   5221     arg_count->set_type(GLMessage::DataType::INT);
   5222     arg_count->add_intvalue(count);
   5223 
   5224     // copy argument transpose
   5225     GLMessage_DataType *arg_transpose = glmsg.add_args();
   5226     arg_transpose->set_isarray(false);
   5227     arg_transpose->set_type(GLMessage::DataType::BOOL);
   5228     arg_transpose->add_boolvalue(transpose);
   5229 
   5230     // copy argument value
   5231     GLMessage_DataType *arg_value = glmsg.add_args();
   5232     arg_value->set_isarray(false);
   5233     arg_value->set_type(GLMessage::DataType::INT);
   5234     arg_value->add_intvalue((int)value);
   5235 
   5236     // call function
   5237     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5238     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5239     glContext->hooks->gl.glUniformMatrix4fv(location, count, transpose, value);
   5240     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5241     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5242 
   5243     void *pointerArgs[] = {
   5244         (void *) value,
   5245     };
   5246 
   5247     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5248                               threadStartTime, threadEndTime,
   5249                               &glmsg, pointerArgs);
   5250     glContext->traceGLMessage(&glmsg);
   5251 }
   5252 
   5253 void GLTrace_glUseProgram(GLuint program) {
   5254     GLMessage glmsg;
   5255     GLTraceContext *glContext = getGLTraceContext();
   5256 
   5257     glmsg.set_function(GLMessage::glUseProgram);
   5258 
   5259     // copy argument program
   5260     GLMessage_DataType *arg_program = glmsg.add_args();
   5261     arg_program->set_isarray(false);
   5262     arg_program->set_type(GLMessage::DataType::INT);
   5263     arg_program->add_intvalue(program);
   5264 
   5265     // call function
   5266     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5267     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5268     glContext->hooks->gl.glUseProgram(program);
   5269     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5270     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5271 
   5272     void *pointerArgs[] = {
   5273     };
   5274 
   5275     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5276                               threadStartTime, threadEndTime,
   5277                               &glmsg, pointerArgs);
   5278     glContext->traceGLMessage(&glmsg);
   5279 }
   5280 
   5281 void GLTrace_glValidateProgram(GLuint program) {
   5282     GLMessage glmsg;
   5283     GLTraceContext *glContext = getGLTraceContext();
   5284 
   5285     glmsg.set_function(GLMessage::glValidateProgram);
   5286 
   5287     // copy argument program
   5288     GLMessage_DataType *arg_program = glmsg.add_args();
   5289     arg_program->set_isarray(false);
   5290     arg_program->set_type(GLMessage::DataType::INT);
   5291     arg_program->add_intvalue(program);
   5292 
   5293     // call function
   5294     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5295     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5296     glContext->hooks->gl.glValidateProgram(program);
   5297     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5298     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5299 
   5300     void *pointerArgs[] = {
   5301     };
   5302 
   5303     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5304                               threadStartTime, threadEndTime,
   5305                               &glmsg, pointerArgs);
   5306     glContext->traceGLMessage(&glmsg);
   5307 }
   5308 
   5309 void GLTrace_glVertexAttrib1f(GLuint indx, GLfloat x) {
   5310     GLMessage glmsg;
   5311     GLTraceContext *glContext = getGLTraceContext();
   5312 
   5313     glmsg.set_function(GLMessage::glVertexAttrib1f);
   5314 
   5315     // copy argument indx
   5316     GLMessage_DataType *arg_indx = glmsg.add_args();
   5317     arg_indx->set_isarray(false);
   5318     arg_indx->set_type(GLMessage::DataType::INT);
   5319     arg_indx->add_intvalue(indx);
   5320 
   5321     // copy argument x
   5322     GLMessage_DataType *arg_x = glmsg.add_args();
   5323     arg_x->set_isarray(false);
   5324     arg_x->set_type(GLMessage::DataType::FLOAT);
   5325     arg_x->add_floatvalue(x);
   5326 
   5327     // call function
   5328     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5329     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5330     glContext->hooks->gl.glVertexAttrib1f(indx, x);
   5331     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5332     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5333 
   5334     void *pointerArgs[] = {
   5335     };
   5336 
   5337     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5338                               threadStartTime, threadEndTime,
   5339                               &glmsg, pointerArgs);
   5340     glContext->traceGLMessage(&glmsg);
   5341 }
   5342 
   5343 void GLTrace_glVertexAttrib1fv(GLuint indx, const GLfloat* values) {
   5344     GLMessage glmsg;
   5345     GLTraceContext *glContext = getGLTraceContext();
   5346 
   5347     glmsg.set_function(GLMessage::glVertexAttrib1fv);
   5348 
   5349     // copy argument indx
   5350     GLMessage_DataType *arg_indx = glmsg.add_args();
   5351     arg_indx->set_isarray(false);
   5352     arg_indx->set_type(GLMessage::DataType::INT);
   5353     arg_indx->add_intvalue(indx);
   5354 
   5355     // copy argument values
   5356     GLMessage_DataType *arg_values = glmsg.add_args();
   5357     arg_values->set_isarray(false);
   5358     arg_values->set_type(GLMessage::DataType::INT);
   5359     arg_values->add_intvalue((int)values);
   5360 
   5361     // call function
   5362     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5363     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5364     glContext->hooks->gl.glVertexAttrib1fv(indx, values);
   5365     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5366     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5367 
   5368     void *pointerArgs[] = {
   5369         (void *) values,
   5370     };
   5371 
   5372     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5373                               threadStartTime, threadEndTime,
   5374                               &glmsg, pointerArgs);
   5375     glContext->traceGLMessage(&glmsg);
   5376 }
   5377 
   5378 void GLTrace_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) {
   5379     GLMessage glmsg;
   5380     GLTraceContext *glContext = getGLTraceContext();
   5381 
   5382     glmsg.set_function(GLMessage::glVertexAttrib2f);
   5383 
   5384     // copy argument indx
   5385     GLMessage_DataType *arg_indx = glmsg.add_args();
   5386     arg_indx->set_isarray(false);
   5387     arg_indx->set_type(GLMessage::DataType::INT);
   5388     arg_indx->add_intvalue(indx);
   5389 
   5390     // copy argument x
   5391     GLMessage_DataType *arg_x = glmsg.add_args();
   5392     arg_x->set_isarray(false);
   5393     arg_x->set_type(GLMessage::DataType::FLOAT);
   5394     arg_x->add_floatvalue(x);
   5395 
   5396     // copy argument y
   5397     GLMessage_DataType *arg_y = glmsg.add_args();
   5398     arg_y->set_isarray(false);
   5399     arg_y->set_type(GLMessage::DataType::FLOAT);
   5400     arg_y->add_floatvalue(y);
   5401 
   5402     // call function
   5403     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5404     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5405     glContext->hooks->gl.glVertexAttrib2f(indx, x, y);
   5406     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5407     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5408 
   5409     void *pointerArgs[] = {
   5410     };
   5411 
   5412     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5413                               threadStartTime, threadEndTime,
   5414                               &glmsg, pointerArgs);
   5415     glContext->traceGLMessage(&glmsg);
   5416 }
   5417 
   5418 void GLTrace_glVertexAttrib2fv(GLuint indx, const GLfloat* values) {
   5419     GLMessage glmsg;
   5420     GLTraceContext *glContext = getGLTraceContext();
   5421 
   5422     glmsg.set_function(GLMessage::glVertexAttrib2fv);
   5423 
   5424     // copy argument indx
   5425     GLMessage_DataType *arg_indx = glmsg.add_args();
   5426     arg_indx->set_isarray(false);
   5427     arg_indx->set_type(GLMessage::DataType::INT);
   5428     arg_indx->add_intvalue(indx);
   5429 
   5430     // copy argument values
   5431     GLMessage_DataType *arg_values = glmsg.add_args();
   5432     arg_values->set_isarray(false);
   5433     arg_values->set_type(GLMessage::DataType::INT);
   5434     arg_values->add_intvalue((int)values);
   5435 
   5436     // call function
   5437     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5438     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5439     glContext->hooks->gl.glVertexAttrib2fv(indx, values);
   5440     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5441     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5442 
   5443     void *pointerArgs[] = {
   5444         (void *) values,
   5445     };
   5446 
   5447     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5448                               threadStartTime, threadEndTime,
   5449                               &glmsg, pointerArgs);
   5450     glContext->traceGLMessage(&glmsg);
   5451 }
   5452 
   5453 void GLTrace_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) {
   5454     GLMessage glmsg;
   5455     GLTraceContext *glContext = getGLTraceContext();
   5456 
   5457     glmsg.set_function(GLMessage::glVertexAttrib3f);
   5458 
   5459     // copy argument indx
   5460     GLMessage_DataType *arg_indx = glmsg.add_args();
   5461     arg_indx->set_isarray(false);
   5462     arg_indx->set_type(GLMessage::DataType::INT);
   5463     arg_indx->add_intvalue(indx);
   5464 
   5465     // copy argument x
   5466     GLMessage_DataType *arg_x = glmsg.add_args();
   5467     arg_x->set_isarray(false);
   5468     arg_x->set_type(GLMessage::DataType::FLOAT);
   5469     arg_x->add_floatvalue(x);
   5470 
   5471     // copy argument y
   5472     GLMessage_DataType *arg_y = glmsg.add_args();
   5473     arg_y->set_isarray(false);
   5474     arg_y->set_type(GLMessage::DataType::FLOAT);
   5475     arg_y->add_floatvalue(y);
   5476 
   5477     // copy argument z
   5478     GLMessage_DataType *arg_z = glmsg.add_args();
   5479     arg_z->set_isarray(false);
   5480     arg_z->set_type(GLMessage::DataType::FLOAT);
   5481     arg_z->add_floatvalue(z);
   5482 
   5483     // call function
   5484     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5485     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5486     glContext->hooks->gl.glVertexAttrib3f(indx, x, y, z);
   5487     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5488     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5489 
   5490     void *pointerArgs[] = {
   5491     };
   5492 
   5493     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5494                               threadStartTime, threadEndTime,
   5495                               &glmsg, pointerArgs);
   5496     glContext->traceGLMessage(&glmsg);
   5497 }
   5498 
   5499 void GLTrace_glVertexAttrib3fv(GLuint indx, const GLfloat* values) {
   5500     GLMessage glmsg;
   5501     GLTraceContext *glContext = getGLTraceContext();
   5502 
   5503     glmsg.set_function(GLMessage::glVertexAttrib3fv);
   5504 
   5505     // copy argument indx
   5506     GLMessage_DataType *arg_indx = glmsg.add_args();
   5507     arg_indx->set_isarray(false);
   5508     arg_indx->set_type(GLMessage::DataType::INT);
   5509     arg_indx->add_intvalue(indx);
   5510 
   5511     // copy argument values
   5512     GLMessage_DataType *arg_values = glmsg.add_args();
   5513     arg_values->set_isarray(false);
   5514     arg_values->set_type(GLMessage::DataType::INT);
   5515     arg_values->add_intvalue((int)values);
   5516 
   5517     // call function
   5518     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5519     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5520     glContext->hooks->gl.glVertexAttrib3fv(indx, values);
   5521     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5522     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5523 
   5524     void *pointerArgs[] = {
   5525         (void *) values,
   5526     };
   5527 
   5528     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5529                               threadStartTime, threadEndTime,
   5530                               &glmsg, pointerArgs);
   5531     glContext->traceGLMessage(&glmsg);
   5532 }
   5533 
   5534 void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
   5535     GLMessage glmsg;
   5536     GLTraceContext *glContext = getGLTraceContext();
   5537 
   5538     glmsg.set_function(GLMessage::glVertexAttrib4f);
   5539 
   5540     // copy argument indx
   5541     GLMessage_DataType *arg_indx = glmsg.add_args();
   5542     arg_indx->set_isarray(false);
   5543     arg_indx->set_type(GLMessage::DataType::INT);
   5544     arg_indx->add_intvalue(indx);
   5545 
   5546     // copy argument x
   5547     GLMessage_DataType *arg_x = glmsg.add_args();
   5548     arg_x->set_isarray(false);
   5549     arg_x->set_type(GLMessage::DataType::FLOAT);
   5550     arg_x->add_floatvalue(x);
   5551 
   5552     // copy argument y
   5553     GLMessage_DataType *arg_y = glmsg.add_args();
   5554     arg_y->set_isarray(false);
   5555     arg_y->set_type(GLMessage::DataType::FLOAT);
   5556     arg_y->add_floatvalue(y);
   5557 
   5558     // copy argument z
   5559     GLMessage_DataType *arg_z = glmsg.add_args();
   5560     arg_z->set_isarray(false);
   5561     arg_z->set_type(GLMessage::DataType::FLOAT);
   5562     arg_z->add_floatvalue(z);
   5563 
   5564     // copy argument w
   5565     GLMessage_DataType *arg_w = glmsg.add_args();
   5566     arg_w->set_isarray(false);
   5567     arg_w->set_type(GLMessage::DataType::FLOAT);
   5568     arg_w->add_floatvalue(w);
   5569 
   5570     // call function
   5571     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5572     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5573     glContext->hooks->gl.glVertexAttrib4f(indx, x, y, z, w);
   5574     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5575     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5576 
   5577     void *pointerArgs[] = {
   5578     };
   5579 
   5580     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5581                               threadStartTime, threadEndTime,
   5582                               &glmsg, pointerArgs);
   5583     glContext->traceGLMessage(&glmsg);
   5584 }
   5585 
   5586 void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values) {
   5587     GLMessage glmsg;
   5588     GLTraceContext *glContext = getGLTraceContext();
   5589 
   5590     glmsg.set_function(GLMessage::glVertexAttrib4fv);
   5591 
   5592     // copy argument indx
   5593     GLMessage_DataType *arg_indx = glmsg.add_args();
   5594     arg_indx->set_isarray(false);
   5595     arg_indx->set_type(GLMessage::DataType::INT);
   5596     arg_indx->add_intvalue(indx);
   5597 
   5598     // copy argument values
   5599     GLMessage_DataType *arg_values = glmsg.add_args();
   5600     arg_values->set_isarray(false);
   5601     arg_values->set_type(GLMessage::DataType::INT);
   5602     arg_values->add_intvalue((int)values);
   5603 
   5604     // call function
   5605     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5606     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5607     glContext->hooks->gl.glVertexAttrib4fv(indx, values);
   5608     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5609     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5610 
   5611     void *pointerArgs[] = {
   5612         (void *) values,
   5613     };
   5614 
   5615     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5616                               threadStartTime, threadEndTime,
   5617                               &glmsg, pointerArgs);
   5618     glContext->traceGLMessage(&glmsg);
   5619 }
   5620 
   5621 void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) {
   5622     GLMessage glmsg;
   5623     GLTraceContext *glContext = getGLTraceContext();
   5624 
   5625     glmsg.set_function(GLMessage::glVertexAttribPointer);
   5626 
   5627     // copy argument indx
   5628     GLMessage_DataType *arg_indx = glmsg.add_args();
   5629     arg_indx->set_isarray(false);
   5630     arg_indx->set_type(GLMessage::DataType::INT);
   5631     arg_indx->add_intvalue(indx);
   5632 
   5633     // copy argument size
   5634     GLMessage_DataType *arg_size = glmsg.add_args();
   5635     arg_size->set_isarray(false);
   5636     arg_size->set_type(GLMessage::DataType::INT);
   5637     arg_size->add_intvalue(size);
   5638 
   5639     // copy argument type
   5640     GLMessage_DataType *arg_type = glmsg.add_args();
   5641     arg_type->set_isarray(false);
   5642     arg_type->set_type(GLMessage::DataType::ENUM);
   5643     arg_type->add_intvalue((int)type);
   5644 
   5645     // copy argument normalized
   5646     GLMessage_DataType *arg_normalized = glmsg.add_args();
   5647     arg_normalized->set_isarray(false);
   5648     arg_normalized->set_type(GLMessage::DataType::BOOL);
   5649     arg_normalized->add_boolvalue(normalized);
   5650 
   5651     // copy argument stride
   5652     GLMessage_DataType *arg_stride = glmsg.add_args();
   5653     arg_stride->set_isarray(false);
   5654     arg_stride->set_type(GLMessage::DataType::INT);
   5655     arg_stride->add_intvalue(stride);
   5656 
   5657     // copy argument ptr
   5658     GLMessage_DataType *arg_ptr = glmsg.add_args();
   5659     arg_ptr->set_isarray(false);
   5660     arg_ptr->set_type(GLMessage::DataType::INT);
   5661     arg_ptr->add_intvalue((int)ptr);
   5662 
   5663     // call function
   5664     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5665     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5666     glContext->hooks->gl.glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
   5667     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5668     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5669 
   5670     void *pointerArgs[] = {
   5671         (void *) ptr,
   5672     };
   5673 
   5674     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5675                               threadStartTime, threadEndTime,
   5676                               &glmsg, pointerArgs);
   5677     glContext->traceGLMessage(&glmsg);
   5678 }
   5679 
   5680 void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) {
   5681     GLMessage glmsg;
   5682     GLTraceContext *glContext = getGLTraceContext();
   5683 
   5684     glmsg.set_function(GLMessage::glViewport);
   5685 
   5686     // copy argument x
   5687     GLMessage_DataType *arg_x = glmsg.add_args();
   5688     arg_x->set_isarray(false);
   5689     arg_x->set_type(GLMessage::DataType::INT);
   5690     arg_x->add_intvalue(x);
   5691 
   5692     // copy argument y
   5693     GLMessage_DataType *arg_y = glmsg.add_args();
   5694     arg_y->set_isarray(false);
   5695     arg_y->set_type(GLMessage::DataType::INT);
   5696     arg_y->add_intvalue(y);
   5697 
   5698     // copy argument width
   5699     GLMessage_DataType *arg_width = glmsg.add_args();
   5700     arg_width->set_isarray(false);
   5701     arg_width->set_type(GLMessage::DataType::INT);
   5702     arg_width->add_intvalue(width);
   5703 
   5704     // copy argument height
   5705     GLMessage_DataType *arg_height = glmsg.add_args();
   5706     arg_height->set_isarray(false);
   5707     arg_height->set_type(GLMessage::DataType::INT);
   5708     arg_height->add_intvalue(height);
   5709 
   5710     // call function
   5711     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5712     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5713     glContext->hooks->gl.glViewport(x, y, width, height);
   5714     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5715     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5716 
   5717     void *pointerArgs[] = {
   5718     };
   5719 
   5720     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5721                               threadStartTime, threadEndTime,
   5722                               &glmsg, pointerArgs);
   5723     glContext->traceGLMessage(&glmsg);
   5724 }
   5725 
   5726 
   5727 // Definitions for GL2Ext APIs
   5728 
   5729 void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
   5730     GLMessage glmsg;
   5731     GLTraceContext *glContext = getGLTraceContext();
   5732 
   5733     glmsg.set_function(GLMessage::glEGLImageTargetTexture2DOES);
   5734 
   5735     // copy argument target
   5736     GLMessage_DataType *arg_target = glmsg.add_args();
   5737     arg_target->set_isarray(false);
   5738     arg_target->set_type(GLMessage::DataType::ENUM);
   5739     arg_target->add_intvalue((int)target);
   5740 
   5741     // copy argument image
   5742     GLMessage_DataType *arg_image = glmsg.add_args();
   5743     arg_image->set_isarray(false);
   5744     arg_image->set_type(GLMessage::DataType::INT);
   5745     arg_image->add_intvalue((int)image);
   5746 
   5747     // call function
   5748     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5749     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5750     glContext->hooks->gl.glEGLImageTargetTexture2DOES(target, image);
   5751     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5752     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5753 
   5754     void *pointerArgs[] = {
   5755         (void *) image,
   5756     };
   5757 
   5758     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5759                               threadStartTime, threadEndTime,
   5760                               &glmsg, pointerArgs);
   5761     glContext->traceGLMessage(&glmsg);
   5762 }
   5763 
   5764 void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) {
   5765     GLMessage glmsg;
   5766     GLTraceContext *glContext = getGLTraceContext();
   5767 
   5768     glmsg.set_function(GLMessage::glEGLImageTargetRenderbufferStorageOES);
   5769 
   5770     // copy argument target
   5771     GLMessage_DataType *arg_target = glmsg.add_args();
   5772     arg_target->set_isarray(false);
   5773     arg_target->set_type(GLMessage::DataType::ENUM);
   5774     arg_target->add_intvalue((int)target);
   5775 
   5776     // copy argument image
   5777     GLMessage_DataType *arg_image = glmsg.add_args();
   5778     arg_image->set_isarray(false);
   5779     arg_image->set_type(GLMessage::DataType::INT);
   5780     arg_image->add_intvalue((int)image);
   5781 
   5782     // call function
   5783     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5784     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5785     glContext->hooks->gl.glEGLImageTargetRenderbufferStorageOES(target, image);
   5786     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5787     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5788 
   5789     void *pointerArgs[] = {
   5790         (void *) image,
   5791     };
   5792 
   5793     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5794                               threadStartTime, threadEndTime,
   5795                               &glmsg, pointerArgs);
   5796     glContext->traceGLMessage(&glmsg);
   5797 }
   5798 
   5799 void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
   5800     GLMessage glmsg;
   5801     GLTraceContext *glContext = getGLTraceContext();
   5802 
   5803     glmsg.set_function(GLMessage::glGetProgramBinaryOES);
   5804 
   5805     // copy argument program
   5806     GLMessage_DataType *arg_program = glmsg.add_args();
   5807     arg_program->set_isarray(false);
   5808     arg_program->set_type(GLMessage::DataType::INT);
   5809     arg_program->add_intvalue(program);
   5810 
   5811     // copy argument bufSize
   5812     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   5813     arg_bufSize->set_isarray(false);
   5814     arg_bufSize->set_type(GLMessage::DataType::INT);
   5815     arg_bufSize->add_intvalue(bufSize);
   5816 
   5817     // copy argument length
   5818     GLMessage_DataType *arg_length = glmsg.add_args();
   5819     arg_length->set_isarray(false);
   5820     arg_length->set_type(GLMessage::DataType::INT);
   5821     arg_length->add_intvalue((int)length);
   5822 
   5823     // copy argument binaryFormat
   5824     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
   5825     arg_binaryFormat->set_isarray(false);
   5826     arg_binaryFormat->set_type(GLMessage::DataType::INT);
   5827     arg_binaryFormat->add_intvalue((int)binaryFormat);
   5828 
   5829     // copy argument binary
   5830     GLMessage_DataType *arg_binary = glmsg.add_args();
   5831     arg_binary->set_isarray(false);
   5832     arg_binary->set_type(GLMessage::DataType::INT);
   5833     arg_binary->add_intvalue((int)binary);
   5834 
   5835     // call function
   5836     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5837     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5838     glContext->hooks->gl.glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
   5839     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5840     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5841 
   5842     void *pointerArgs[] = {
   5843         (void *) length,
   5844         (void *) binaryFormat,
   5845         (void *) binary,
   5846     };
   5847 
   5848     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5849                               threadStartTime, threadEndTime,
   5850                               &glmsg, pointerArgs);
   5851     glContext->traceGLMessage(&glmsg);
   5852 }
   5853 
   5854 void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
   5855     GLMessage glmsg;
   5856     GLTraceContext *glContext = getGLTraceContext();
   5857 
   5858     glmsg.set_function(GLMessage::glProgramBinaryOES);
   5859 
   5860     // copy argument program
   5861     GLMessage_DataType *arg_program = glmsg.add_args();
   5862     arg_program->set_isarray(false);
   5863     arg_program->set_type(GLMessage::DataType::INT);
   5864     arg_program->add_intvalue(program);
   5865 
   5866     // copy argument binaryFormat
   5867     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
   5868     arg_binaryFormat->set_isarray(false);
   5869     arg_binaryFormat->set_type(GLMessage::DataType::ENUM);
   5870     arg_binaryFormat->add_intvalue((int)binaryFormat);
   5871 
   5872     // copy argument binary
   5873     GLMessage_DataType *arg_binary = glmsg.add_args();
   5874     arg_binary->set_isarray(false);
   5875     arg_binary->set_type(GLMessage::DataType::INT);
   5876     arg_binary->add_intvalue((int)binary);
   5877 
   5878     // copy argument length
   5879     GLMessage_DataType *arg_length = glmsg.add_args();
   5880     arg_length->set_isarray(false);
   5881     arg_length->set_type(GLMessage::DataType::INT);
   5882     arg_length->add_intvalue(length);
   5883 
   5884     // call function
   5885     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5886     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5887     glContext->hooks->gl.glProgramBinaryOES(program, binaryFormat, binary, length);
   5888     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5889     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5890 
   5891     void *pointerArgs[] = {
   5892         (void *) binary,
   5893     };
   5894 
   5895     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5896                               threadStartTime, threadEndTime,
   5897                               &glmsg, pointerArgs);
   5898     glContext->traceGLMessage(&glmsg);
   5899 }
   5900 
   5901 void* GLTrace_glMapBufferOES(GLenum target, GLenum access) {
   5902     GLMessage glmsg;
   5903     GLTraceContext *glContext = getGLTraceContext();
   5904 
   5905     glmsg.set_function(GLMessage::glMapBufferOES);
   5906 
   5907     // copy argument target
   5908     GLMessage_DataType *arg_target = glmsg.add_args();
   5909     arg_target->set_isarray(false);
   5910     arg_target->set_type(GLMessage::DataType::ENUM);
   5911     arg_target->add_intvalue((int)target);
   5912 
   5913     // copy argument access
   5914     GLMessage_DataType *arg_access = glmsg.add_args();
   5915     arg_access->set_isarray(false);
   5916     arg_access->set_type(GLMessage::DataType::ENUM);
   5917     arg_access->add_intvalue((int)access);
   5918 
   5919     // call function
   5920     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5921     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5922     void* retValue = glContext->hooks->gl.glMapBufferOES(target, access);
   5923     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5924     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5925 
   5926     // set return value
   5927     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   5928     rt->set_isarray(false);
   5929     rt->set_type(GLMessage::DataType::INT);
   5930     rt->add_intvalue((int)retValue);
   5931 
   5932     void *pointerArgs[] = {
   5933         (void *) retValue,
   5934     };
   5935 
   5936     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5937                               threadStartTime, threadEndTime,
   5938                               &glmsg, pointerArgs);
   5939     glContext->traceGLMessage(&glmsg);
   5940 
   5941     return retValue;
   5942 }
   5943 
   5944 GLboolean GLTrace_glUnmapBufferOES(GLenum target) {
   5945     GLMessage glmsg;
   5946     GLTraceContext *glContext = getGLTraceContext();
   5947 
   5948     glmsg.set_function(GLMessage::glUnmapBufferOES);
   5949 
   5950     // copy argument target
   5951     GLMessage_DataType *arg_target = glmsg.add_args();
   5952     arg_target->set_isarray(false);
   5953     arg_target->set_type(GLMessage::DataType::ENUM);
   5954     arg_target->add_intvalue((int)target);
   5955 
   5956     // call function
   5957     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5958     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5959     GLboolean retValue = glContext->hooks->gl.glUnmapBufferOES(target);
   5960     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5961     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5962 
   5963     // set return value
   5964     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   5965     rt->set_isarray(false);
   5966     rt->set_type(GLMessage::DataType::BOOL);
   5967     rt->add_boolvalue(retValue);
   5968 
   5969     void *pointerArgs[] = {
   5970     };
   5971 
   5972     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5973                               threadStartTime, threadEndTime,
   5974                               &glmsg, pointerArgs);
   5975     glContext->traceGLMessage(&glmsg);
   5976 
   5977     return retValue;
   5978 }
   5979 
   5980 void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params) {
   5981     GLMessage glmsg;
   5982     GLTraceContext *glContext = getGLTraceContext();
   5983 
   5984     glmsg.set_function(GLMessage::glGetBufferPointervOES);
   5985 
   5986     // copy argument target
   5987     GLMessage_DataType *arg_target = glmsg.add_args();
   5988     arg_target->set_isarray(false);
   5989     arg_target->set_type(GLMessage::DataType::ENUM);
   5990     arg_target->add_intvalue((int)target);
   5991 
   5992     // copy argument pname
   5993     GLMessage_DataType *arg_pname = glmsg.add_args();
   5994     arg_pname->set_isarray(false);
   5995     arg_pname->set_type(GLMessage::DataType::ENUM);
   5996     arg_pname->add_intvalue((int)pname);
   5997 
   5998     // copy argument params
   5999     GLMessage_DataType *arg_params = glmsg.add_args();
   6000     arg_params->set_isarray(false);
   6001     arg_params->set_type(GLMessage::DataType::INT);
   6002     arg_params->add_intvalue((int)params);
   6003 
   6004     // call function
   6005     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6006     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6007     glContext->hooks->gl.glGetBufferPointervOES(target, pname, params);
   6008     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6009     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6010 
   6011     void *pointerArgs[] = {
   6012         (void *) params,
   6013     };
   6014 
   6015     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6016                               threadStartTime, threadEndTime,
   6017                               &glmsg, pointerArgs);
   6018     glContext->traceGLMessage(&glmsg);
   6019 }
   6020 
   6021 void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
   6022     GLMessage glmsg;
   6023     GLTraceContext *glContext = getGLTraceContext();
   6024 
   6025     glmsg.set_function(GLMessage::glTexImage3DOES);
   6026 
   6027     // copy argument target
   6028     GLMessage_DataType *arg_target = glmsg.add_args();
   6029     arg_target->set_isarray(false);
   6030     arg_target->set_type(GLMessage::DataType::ENUM);
   6031     arg_target->add_intvalue((int)target);
   6032 
   6033     // copy argument level
   6034     GLMessage_DataType *arg_level = glmsg.add_args();
   6035     arg_level->set_isarray(false);
   6036     arg_level->set_type(GLMessage::DataType::INT);
   6037     arg_level->add_intvalue(level);
   6038 
   6039     // copy argument internalformat
   6040     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   6041     arg_internalformat->set_isarray(false);
   6042     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   6043     arg_internalformat->add_intvalue((int)internalformat);
   6044 
   6045     // copy argument width
   6046     GLMessage_DataType *arg_width = glmsg.add_args();
   6047     arg_width->set_isarray(false);
   6048     arg_width->set_type(GLMessage::DataType::INT);
   6049     arg_width->add_intvalue(width);
   6050 
   6051     // copy argument height
   6052     GLMessage_DataType *arg_height = glmsg.add_args();
   6053     arg_height->set_isarray(false);
   6054     arg_height->set_type(GLMessage::DataType::INT);
   6055     arg_height->add_intvalue(height);
   6056 
   6057     // copy argument depth
   6058     GLMessage_DataType *arg_depth = glmsg.add_args();
   6059     arg_depth->set_isarray(false);
   6060     arg_depth->set_type(GLMessage::DataType::INT);
   6061     arg_depth->add_intvalue(depth);
   6062 
   6063     // copy argument border
   6064     GLMessage_DataType *arg_border = glmsg.add_args();
   6065     arg_border->set_isarray(false);
   6066     arg_border->set_type(GLMessage::DataType::INT);
   6067     arg_border->add_intvalue(border);
   6068 
   6069     // copy argument format
   6070     GLMessage_DataType *arg_format = glmsg.add_args();
   6071     arg_format->set_isarray(false);
   6072     arg_format->set_type(GLMessage::DataType::ENUM);
   6073     arg_format->add_intvalue((int)format);
   6074 
   6075     // copy argument type
   6076     GLMessage_DataType *arg_type = glmsg.add_args();
   6077     arg_type->set_isarray(false);
   6078     arg_type->set_type(GLMessage::DataType::ENUM);
   6079     arg_type->add_intvalue((int)type);
   6080 
   6081     // copy argument pixels
   6082     GLMessage_DataType *arg_pixels = glmsg.add_args();
   6083     arg_pixels->set_isarray(false);
   6084     arg_pixels->set_type(GLMessage::DataType::INT);
   6085     arg_pixels->add_intvalue((int)pixels);
   6086 
   6087     // call function
   6088     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6089     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6090     glContext->hooks->gl.glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
   6091     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6092     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6093 
   6094     void *pointerArgs[] = {
   6095         (void *) pixels,
   6096     };
   6097 
   6098     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6099                               threadStartTime, threadEndTime,
   6100                               &glmsg, pointerArgs);
   6101     glContext->traceGLMessage(&glmsg);
   6102 }
   6103 
   6104 void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
   6105     GLMessage glmsg;
   6106     GLTraceContext *glContext = getGLTraceContext();
   6107 
   6108     glmsg.set_function(GLMessage::glTexSubImage3DOES);
   6109 
   6110     // copy argument target
   6111     GLMessage_DataType *arg_target = glmsg.add_args();
   6112     arg_target->set_isarray(false);
   6113     arg_target->set_type(GLMessage::DataType::ENUM);
   6114     arg_target->add_intvalue((int)target);
   6115 
   6116     // copy argument level
   6117     GLMessage_DataType *arg_level = glmsg.add_args();
   6118     arg_level->set_isarray(false);
   6119     arg_level->set_type(GLMessage::DataType::INT);
   6120     arg_level->add_intvalue(level);
   6121 
   6122     // copy argument xoffset
   6123     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   6124     arg_xoffset->set_isarray(false);
   6125     arg_xoffset->set_type(GLMessage::DataType::INT);
   6126     arg_xoffset->add_intvalue(xoffset);
   6127 
   6128     // copy argument yoffset
   6129     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   6130     arg_yoffset->set_isarray(false);
   6131     arg_yoffset->set_type(GLMessage::DataType::INT);
   6132     arg_yoffset->add_intvalue(yoffset);
   6133 
   6134     // copy argument zoffset
   6135     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   6136     arg_zoffset->set_isarray(false);
   6137     arg_zoffset->set_type(GLMessage::DataType::INT);
   6138     arg_zoffset->add_intvalue(zoffset);
   6139 
   6140     // copy argument width
   6141     GLMessage_DataType *arg_width = glmsg.add_args();
   6142     arg_width->set_isarray(false);
   6143     arg_width->set_type(GLMessage::DataType::INT);
   6144     arg_width->add_intvalue(width);
   6145 
   6146     // copy argument height
   6147     GLMessage_DataType *arg_height = glmsg.add_args();
   6148     arg_height->set_isarray(false);
   6149     arg_height->set_type(GLMessage::DataType::INT);
   6150     arg_height->add_intvalue(height);
   6151 
   6152     // copy argument depth
   6153     GLMessage_DataType *arg_depth = glmsg.add_args();
   6154     arg_depth->set_isarray(false);
   6155     arg_depth->set_type(GLMessage::DataType::INT);
   6156     arg_depth->add_intvalue(depth);
   6157 
   6158     // copy argument format
   6159     GLMessage_DataType *arg_format = glmsg.add_args();
   6160     arg_format->set_isarray(false);
   6161     arg_format->set_type(GLMessage::DataType::ENUM);
   6162     arg_format->add_intvalue((int)format);
   6163 
   6164     // copy argument type
   6165     GLMessage_DataType *arg_type = glmsg.add_args();
   6166     arg_type->set_isarray(false);
   6167     arg_type->set_type(GLMessage::DataType::ENUM);
   6168     arg_type->add_intvalue((int)type);
   6169 
   6170     // copy argument pixels
   6171     GLMessage_DataType *arg_pixels = glmsg.add_args();
   6172     arg_pixels->set_isarray(false);
   6173     arg_pixels->set_type(GLMessage::DataType::INT);
   6174     arg_pixels->add_intvalue((int)pixels);
   6175 
   6176     // call function
   6177     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6178     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6179     glContext->hooks->gl.glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
   6180     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6181     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6182 
   6183     void *pointerArgs[] = {
   6184         (void *) pixels,
   6185     };
   6186 
   6187     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6188                               threadStartTime, threadEndTime,
   6189                               &glmsg, pointerArgs);
   6190     glContext->traceGLMessage(&glmsg);
   6191 }
   6192 
   6193 void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
   6194     GLMessage glmsg;
   6195     GLTraceContext *glContext = getGLTraceContext();
   6196 
   6197     glmsg.set_function(GLMessage::glCopyTexSubImage3DOES);
   6198 
   6199     // copy argument target
   6200     GLMessage_DataType *arg_target = glmsg.add_args();
   6201     arg_target->set_isarray(false);
   6202     arg_target->set_type(GLMessage::DataType::ENUM);
   6203     arg_target->add_intvalue((int)target);
   6204 
   6205     // copy argument level
   6206     GLMessage_DataType *arg_level = glmsg.add_args();
   6207     arg_level->set_isarray(false);
   6208     arg_level->set_type(GLMessage::DataType::INT);
   6209     arg_level->add_intvalue(level);
   6210 
   6211     // copy argument xoffset
   6212     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   6213     arg_xoffset->set_isarray(false);
   6214     arg_xoffset->set_type(GLMessage::DataType::INT);
   6215     arg_xoffset->add_intvalue(xoffset);
   6216 
   6217     // copy argument yoffset
   6218     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   6219     arg_yoffset->set_isarray(false);
   6220     arg_yoffset->set_type(GLMessage::DataType::INT);
   6221     arg_yoffset->add_intvalue(yoffset);
   6222 
   6223     // copy argument zoffset
   6224     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   6225     arg_zoffset->set_isarray(false);
   6226     arg_zoffset->set_type(GLMessage::DataType::INT);
   6227     arg_zoffset->add_intvalue(zoffset);
   6228 
   6229     // copy argument x
   6230     GLMessage_DataType *arg_x = glmsg.add_args();
   6231     arg_x->set_isarray(false);
   6232     arg_x->set_type(GLMessage::DataType::INT);
   6233     arg_x->add_intvalue(x);
   6234 
   6235     // copy argument y
   6236     GLMessage_DataType *arg_y = glmsg.add_args();
   6237     arg_y->set_isarray(false);
   6238     arg_y->set_type(GLMessage::DataType::INT);
   6239     arg_y->add_intvalue(y);
   6240 
   6241     // copy argument width
   6242     GLMessage_DataType *arg_width = glmsg.add_args();
   6243     arg_width->set_isarray(false);
   6244     arg_width->set_type(GLMessage::DataType::INT);
   6245     arg_width->add_intvalue(width);
   6246 
   6247     // copy argument height
   6248     GLMessage_DataType *arg_height = glmsg.add_args();
   6249     arg_height->set_isarray(false);
   6250     arg_height->set_type(GLMessage::DataType::INT);
   6251     arg_height->add_intvalue(height);
   6252 
   6253     // call function
   6254     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6255     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6256     glContext->hooks->gl.glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
   6257     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6258     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6259 
   6260     void *pointerArgs[] = {
   6261     };
   6262 
   6263     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6264                               threadStartTime, threadEndTime,
   6265                               &glmsg, pointerArgs);
   6266     glContext->traceGLMessage(&glmsg);
   6267 }
   6268 
   6269 void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
   6270     GLMessage glmsg;
   6271     GLTraceContext *glContext = getGLTraceContext();
   6272 
   6273     glmsg.set_function(GLMessage::glCompressedTexImage3DOES);
   6274 
   6275     // copy argument target
   6276     GLMessage_DataType *arg_target = glmsg.add_args();
   6277     arg_target->set_isarray(false);
   6278     arg_target->set_type(GLMessage::DataType::ENUM);
   6279     arg_target->add_intvalue((int)target);
   6280 
   6281     // copy argument level
   6282     GLMessage_DataType *arg_level = glmsg.add_args();
   6283     arg_level->set_isarray(false);
   6284     arg_level->set_type(GLMessage::DataType::INT);
   6285     arg_level->add_intvalue(level);
   6286 
   6287     // copy argument internalformat
   6288     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   6289     arg_internalformat->set_isarray(false);
   6290     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   6291     arg_internalformat->add_intvalue((int)internalformat);
   6292 
   6293     // copy argument width
   6294     GLMessage_DataType *arg_width = glmsg.add_args();
   6295     arg_width->set_isarray(false);
   6296     arg_width->set_type(GLMessage::DataType::INT);
   6297     arg_width->add_intvalue(width);
   6298 
   6299     // copy argument height
   6300     GLMessage_DataType *arg_height = glmsg.add_args();
   6301     arg_height->set_isarray(false);
   6302     arg_height->set_type(GLMessage::DataType::INT);
   6303     arg_height->add_intvalue(height);
   6304 
   6305     // copy argument depth
   6306     GLMessage_DataType *arg_depth = glmsg.add_args();
   6307     arg_depth->set_isarray(false);
   6308     arg_depth->set_type(GLMessage::DataType::INT);
   6309     arg_depth->add_intvalue(depth);
   6310 
   6311     // copy argument border
   6312     GLMessage_DataType *arg_border = glmsg.add_args();
   6313     arg_border->set_isarray(false);
   6314     arg_border->set_type(GLMessage::DataType::INT);
   6315     arg_border->add_intvalue(border);
   6316 
   6317     // copy argument imageSize
   6318     GLMessage_DataType *arg_imageSize = glmsg.add_args();
   6319     arg_imageSize->set_isarray(false);
   6320     arg_imageSize->set_type(GLMessage::DataType::INT);
   6321     arg_imageSize->add_intvalue(imageSize);
   6322 
   6323     // copy argument data
   6324     GLMessage_DataType *arg_data = glmsg.add_args();
   6325     arg_data->set_isarray(false);
   6326     arg_data->set_type(GLMessage::DataType::INT);
   6327     arg_data->add_intvalue((int)data);
   6328 
   6329     // call function
   6330     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6331     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6332     glContext->hooks->gl.glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data);
   6333     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6334     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6335 
   6336     void *pointerArgs[] = {
   6337         (void *) data,
   6338     };
   6339 
   6340     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6341                               threadStartTime, threadEndTime,
   6342                               &glmsg, pointerArgs);
   6343     glContext->traceGLMessage(&glmsg);
   6344 }
   6345 
   6346 void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
   6347     GLMessage glmsg;
   6348     GLTraceContext *glContext = getGLTraceContext();
   6349 
   6350     glmsg.set_function(GLMessage::glCompressedTexSubImage3DOES);
   6351 
   6352     // copy argument target
   6353     GLMessage_DataType *arg_target = glmsg.add_args();
   6354     arg_target->set_isarray(false);
   6355     arg_target->set_type(GLMessage::DataType::ENUM);
   6356     arg_target->add_intvalue((int)target);
   6357 
   6358     // copy argument level
   6359     GLMessage_DataType *arg_level = glmsg.add_args();
   6360     arg_level->set_isarray(false);
   6361     arg_level->set_type(GLMessage::DataType::INT);
   6362     arg_level->add_intvalue(level);
   6363 
   6364     // copy argument xoffset
   6365     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   6366     arg_xoffset->set_isarray(false);
   6367     arg_xoffset->set_type(GLMessage::DataType::INT);
   6368     arg_xoffset->add_intvalue(xoffset);
   6369 
   6370     // copy argument yoffset
   6371     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   6372     arg_yoffset->set_isarray(false);
   6373     arg_yoffset->set_type(GLMessage::DataType::INT);
   6374     arg_yoffset->add_intvalue(yoffset);
   6375 
   6376     // copy argument zoffset
   6377     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   6378     arg_zoffset->set_isarray(false);
   6379     arg_zoffset->set_type(GLMessage::DataType::INT);
   6380     arg_zoffset->add_intvalue(zoffset);
   6381 
   6382     // copy argument width
   6383     GLMessage_DataType *arg_width = glmsg.add_args();
   6384     arg_width->set_isarray(false);
   6385     arg_width->set_type(GLMessage::DataType::INT);
   6386     arg_width->add_intvalue(width);
   6387 
   6388     // copy argument height
   6389     GLMessage_DataType *arg_height = glmsg.add_args();
   6390     arg_height->set_isarray(false);
   6391     arg_height->set_type(GLMessage::DataType::INT);
   6392     arg_height->add_intvalue(height);
   6393 
   6394     // copy argument depth
   6395     GLMessage_DataType *arg_depth = glmsg.add_args();
   6396     arg_depth->set_isarray(false);
   6397     arg_depth->set_type(GLMessage::DataType::INT);
   6398     arg_depth->add_intvalue(depth);
   6399 
   6400     // copy argument format
   6401     GLMessage_DataType *arg_format = glmsg.add_args();
   6402     arg_format->set_isarray(false);
   6403     arg_format->set_type(GLMessage::DataType::ENUM);
   6404     arg_format->add_intvalue((int)format);
   6405 
   6406     // copy argument imageSize
   6407     GLMessage_DataType *arg_imageSize = glmsg.add_args();
   6408     arg_imageSize->set_isarray(false);
   6409     arg_imageSize->set_type(GLMessage::DataType::INT);
   6410     arg_imageSize->add_intvalue(imageSize);
   6411 
   6412     // copy argument data
   6413     GLMessage_DataType *arg_data = glmsg.add_args();
   6414     arg_data->set_isarray(false);
   6415     arg_data->set_type(GLMessage::DataType::INT);
   6416     arg_data->add_intvalue((int)data);
   6417 
   6418     // call function
   6419     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6420     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6421     glContext->hooks->gl.glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
   6422     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6423     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6424 
   6425     void *pointerArgs[] = {
   6426         (void *) data,
   6427     };
   6428 
   6429     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6430                               threadStartTime, threadEndTime,
   6431                               &glmsg, pointerArgs);
   6432     glContext->traceGLMessage(&glmsg);
   6433 }
   6434 
   6435 void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
   6436     GLMessage glmsg;
   6437     GLTraceContext *glContext = getGLTraceContext();
   6438 
   6439     glmsg.set_function(GLMessage::glFramebufferTexture3DOES);
   6440 
   6441     // copy argument target
   6442     GLMessage_DataType *arg_target = glmsg.add_args();
   6443     arg_target->set_isarray(false);
   6444     arg_target->set_type(GLMessage::DataType::ENUM);
   6445     arg_target->add_intvalue((int)target);
   6446 
   6447     // copy argument attachment
   6448     GLMessage_DataType *arg_attachment = glmsg.add_args();
   6449     arg_attachment->set_isarray(false);
   6450     arg_attachment->set_type(GLMessage::DataType::ENUM);
   6451     arg_attachment->add_intvalue((int)attachment);
   6452 
   6453     // copy argument textarget
   6454     GLMessage_DataType *arg_textarget = glmsg.add_args();
   6455     arg_textarget->set_isarray(false);
   6456     arg_textarget->set_type(GLMessage::DataType::ENUM);
   6457     arg_textarget->add_intvalue((int)textarget);
   6458 
   6459     // copy argument texture
   6460     GLMessage_DataType *arg_texture = glmsg.add_args();
   6461     arg_texture->set_isarray(false);
   6462     arg_texture->set_type(GLMessage::DataType::INT);
   6463     arg_texture->add_intvalue(texture);
   6464 
   6465     // copy argument level
   6466     GLMessage_DataType *arg_level = glmsg.add_args();
   6467     arg_level->set_isarray(false);
   6468     arg_level->set_type(GLMessage::DataType::INT);
   6469     arg_level->add_intvalue(level);
   6470 
   6471     // copy argument zoffset
   6472     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   6473     arg_zoffset->set_isarray(false);
   6474     arg_zoffset->set_type(GLMessage::DataType::INT);
   6475     arg_zoffset->add_intvalue(zoffset);
   6476 
   6477     // call function
   6478     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6479     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6480     glContext->hooks->gl.glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
   6481     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6482     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6483 
   6484     void *pointerArgs[] = {
   6485     };
   6486 
   6487     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6488                               threadStartTime, threadEndTime,
   6489                               &glmsg, pointerArgs);
   6490     glContext->traceGLMessage(&glmsg);
   6491 }
   6492 
   6493 void GLTrace_glBindVertexArrayOES(GLuint array) {
   6494     GLMessage glmsg;
   6495     GLTraceContext *glContext = getGLTraceContext();
   6496 
   6497     glmsg.set_function(GLMessage::glBindVertexArrayOES);
   6498 
   6499     // copy argument array
   6500     GLMessage_DataType *arg_array = glmsg.add_args();
   6501     arg_array->set_isarray(false);
   6502     arg_array->set_type(GLMessage::DataType::INT);
   6503     arg_array->add_intvalue(array);
   6504 
   6505     // call function
   6506     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6507     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6508     glContext->hooks->gl.glBindVertexArrayOES(array);
   6509     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6510     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6511 
   6512     void *pointerArgs[] = {
   6513     };
   6514 
   6515     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6516                               threadStartTime, threadEndTime,
   6517                               &glmsg, pointerArgs);
   6518     glContext->traceGLMessage(&glmsg);
   6519 }
   6520 
   6521 void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) {
   6522     GLMessage glmsg;
   6523     GLTraceContext *glContext = getGLTraceContext();
   6524 
   6525     glmsg.set_function(GLMessage::glDeleteVertexArraysOES);
   6526 
   6527     // copy argument n
   6528     GLMessage_DataType *arg_n = glmsg.add_args();
   6529     arg_n->set_isarray(false);
   6530     arg_n->set_type(GLMessage::DataType::INT);
   6531     arg_n->add_intvalue(n);
   6532 
   6533     // copy argument arrays
   6534     GLMessage_DataType *arg_arrays = glmsg.add_args();
   6535     arg_arrays->set_isarray(false);
   6536     arg_arrays->set_type(GLMessage::DataType::INT);
   6537     arg_arrays->add_intvalue((int)arrays);
   6538 
   6539     // call function
   6540     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6541     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6542     glContext->hooks->gl.glDeleteVertexArraysOES(n, arrays);
   6543     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6544     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6545 
   6546     void *pointerArgs[] = {
   6547         (void *) arrays,
   6548     };
   6549 
   6550     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6551                               threadStartTime, threadEndTime,
   6552                               &glmsg, pointerArgs);
   6553     glContext->traceGLMessage(&glmsg);
   6554 }
   6555 
   6556 void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays) {
   6557     GLMessage glmsg;
   6558     GLTraceContext *glContext = getGLTraceContext();
   6559 
   6560     glmsg.set_function(GLMessage::glGenVertexArraysOES);
   6561 
   6562     // copy argument n
   6563     GLMessage_DataType *arg_n = glmsg.add_args();
   6564     arg_n->set_isarray(false);
   6565     arg_n->set_type(GLMessage::DataType::INT);
   6566     arg_n->add_intvalue(n);
   6567 
   6568     // copy argument arrays
   6569     GLMessage_DataType *arg_arrays = glmsg.add_args();
   6570     arg_arrays->set_isarray(false);
   6571     arg_arrays->set_type(GLMessage::DataType::INT);
   6572     arg_arrays->add_intvalue((int)arrays);
   6573 
   6574     // call function
   6575     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6576     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6577     glContext->hooks->gl.glGenVertexArraysOES(n, arrays);
   6578     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6579     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6580 
   6581     void *pointerArgs[] = {
   6582         (void *) arrays,
   6583     };
   6584 
   6585     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6586                               threadStartTime, threadEndTime,
   6587                               &glmsg, pointerArgs);
   6588     glContext->traceGLMessage(&glmsg);
   6589 }
   6590 
   6591 GLboolean GLTrace_glIsVertexArrayOES(GLuint array) {
   6592     GLMessage glmsg;
   6593     GLTraceContext *glContext = getGLTraceContext();
   6594 
   6595     glmsg.set_function(GLMessage::glIsVertexArrayOES);
   6596 
   6597     // copy argument array
   6598     GLMessage_DataType *arg_array = glmsg.add_args();
   6599     arg_array->set_isarray(false);
   6600     arg_array->set_type(GLMessage::DataType::INT);
   6601     arg_array->add_intvalue(array);
   6602 
   6603     // call function
   6604     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6605     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6606     GLboolean retValue = glContext->hooks->gl.glIsVertexArrayOES(array);
   6607     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6608     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6609 
   6610     // set return value
   6611     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   6612     rt->set_isarray(false);
   6613     rt->set_type(GLMessage::DataType::BOOL);
   6614     rt->add_boolvalue(retValue);
   6615 
   6616     void *pointerArgs[] = {
   6617     };
   6618 
   6619     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6620                               threadStartTime, threadEndTime,
   6621                               &glmsg, pointerArgs);
   6622     glContext->traceGLMessage(&glmsg);
   6623 
   6624     return retValue;
   6625 }
   6626 
   6627 void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
   6628     GLMessage glmsg;
   6629     GLTraceContext *glContext = getGLTraceContext();
   6630 
   6631     glmsg.set_function(GLMessage::glGetPerfMonitorGroupsAMD);
   6632 
   6633     // copy argument numGroups
   6634     GLMessage_DataType *arg_numGroups = glmsg.add_args();
   6635     arg_numGroups->set_isarray(false);
   6636     arg_numGroups->set_type(GLMessage::DataType::INT);
   6637     arg_numGroups->add_intvalue((int)numGroups);
   6638 
   6639     // copy argument groupsSize
   6640     GLMessage_DataType *arg_groupsSize = glmsg.add_args();
   6641     arg_groupsSize->set_isarray(false);
   6642     arg_groupsSize->set_type(GLMessage::DataType::INT);
   6643     arg_groupsSize->add_intvalue(groupsSize);
   6644 
   6645     // copy argument groups
   6646     GLMessage_DataType *arg_groups = glmsg.add_args();
   6647     arg_groups->set_isarray(false);
   6648     arg_groups->set_type(GLMessage::DataType::INT);
   6649     arg_groups->add_intvalue((int)groups);
   6650 
   6651     // call function
   6652     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6653     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6654     glContext->hooks->gl.glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups);
   6655     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6656     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6657 
   6658     void *pointerArgs[] = {
   6659         (void *) numGroups,
   6660         (void *) groups,
   6661     };
   6662 
   6663     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6664                               threadStartTime, threadEndTime,
   6665                               &glmsg, pointerArgs);
   6666     glContext->traceGLMessage(&glmsg);
   6667 }
   6668 
   6669 void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
   6670     GLMessage glmsg;
   6671     GLTraceContext *glContext = getGLTraceContext();
   6672 
   6673     glmsg.set_function(GLMessage::glGetPerfMonitorCountersAMD);
   6674 
   6675     // copy argument group
   6676     GLMessage_DataType *arg_group = glmsg.add_args();
   6677     arg_group->set_isarray(false);
   6678     arg_group->set_type(GLMessage::DataType::INT);
   6679     arg_group->add_intvalue(group);
   6680 
   6681     // copy argument numCounters
   6682     GLMessage_DataType *arg_numCounters = glmsg.add_args();
   6683     arg_numCounters->set_isarray(false);
   6684     arg_numCounters->set_type(GLMessage::DataType::INT);
   6685     arg_numCounters->add_intvalue((int)numCounters);
   6686 
   6687     // copy argument maxActiveCounters
   6688     GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args();
   6689     arg_maxActiveCounters->set_isarray(false);
   6690     arg_maxActiveCounters->set_type(GLMessage::DataType::INT);
   6691     arg_maxActiveCounters->add_intvalue((int)maxActiveCounters);
   6692 
   6693     // copy argument counterSize
   6694     GLMessage_DataType *arg_counterSize = glmsg.add_args();
   6695     arg_counterSize->set_isarray(false);
   6696     arg_counterSize->set_type(GLMessage::DataType::INT);
   6697     arg_counterSize->add_intvalue(counterSize);
   6698 
   6699     // copy argument counters
   6700     GLMessage_DataType *arg_counters = glmsg.add_args();
   6701     arg_counters->set_isarray(false);
   6702     arg_counters->set_type(GLMessage::DataType::INT);
   6703     arg_counters->add_intvalue((int)counters);
   6704 
   6705     // call function
   6706     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6707     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6708     glContext->hooks->gl.glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters);
   6709     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6710     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6711 
   6712     void *pointerArgs[] = {
   6713         (void *) numCounters,
   6714         (void *) maxActiveCounters,
   6715         (void *) counters,
   6716     };
   6717 
   6718     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6719                               threadStartTime, threadEndTime,
   6720                               &glmsg, pointerArgs);
   6721     glContext->traceGLMessage(&glmsg);
   6722 }
   6723 
   6724 void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
   6725     GLMessage glmsg;
   6726     GLTraceContext *glContext = getGLTraceContext();
   6727 
   6728     glmsg.set_function(GLMessage::glGetPerfMonitorGroupStringAMD);
   6729 
   6730     // copy argument group
   6731     GLMessage_DataType *arg_group = glmsg.add_args();
   6732     arg_group->set_isarray(false);
   6733     arg_group->set_type(GLMessage::DataType::INT);
   6734     arg_group->add_intvalue(group);
   6735 
   6736     // copy argument bufSize
   6737     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   6738     arg_bufSize->set_isarray(false);
   6739     arg_bufSize->set_type(GLMessage::DataType::INT);
   6740     arg_bufSize->add_intvalue(bufSize);
   6741 
   6742     // copy argument length
   6743     GLMessage_DataType *arg_length = glmsg.add_args();
   6744     arg_length->set_isarray(false);
   6745     arg_length->set_type(GLMessage::DataType::INT);
   6746     arg_length->add_intvalue((int)length);
   6747 
   6748     // copy argument groupString
   6749     GLMessage_DataType *arg_groupString = glmsg.add_args();
   6750     arg_groupString->set_isarray(false);
   6751     arg_groupString->set_type(GLMessage::DataType::INT);
   6752     arg_groupString->add_intvalue((int)groupString);
   6753 
   6754     // call function
   6755     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6756     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6757     glContext->hooks->gl.glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString);
   6758     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6759     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6760 
   6761     void *pointerArgs[] = {
   6762         (void *) length,
   6763         (void *) groupString,
   6764     };
   6765 
   6766     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6767                               threadStartTime, threadEndTime,
   6768                               &glmsg, pointerArgs);
   6769     glContext->traceGLMessage(&glmsg);
   6770 }
   6771 
   6772 void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
   6773     GLMessage glmsg;
   6774     GLTraceContext *glContext = getGLTraceContext();
   6775 
   6776     glmsg.set_function(GLMessage::glGetPerfMonitorCounterStringAMD);
   6777 
   6778     // copy argument group
   6779     GLMessage_DataType *arg_group = glmsg.add_args();
   6780     arg_group->set_isarray(false);
   6781     arg_group->set_type(GLMessage::DataType::INT);
   6782     arg_group->add_intvalue(group);
   6783 
   6784     // copy argument counter
   6785     GLMessage_DataType *arg_counter = glmsg.add_args();
   6786     arg_counter->set_isarray(false);
   6787     arg_counter->set_type(GLMessage::DataType::INT);
   6788     arg_counter->add_intvalue(counter);
   6789 
   6790     // copy argument bufSize
   6791     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   6792     arg_bufSize->set_isarray(false);
   6793     arg_bufSize->set_type(GLMessage::DataType::INT);
   6794     arg_bufSize->add_intvalue(bufSize);
   6795 
   6796     // copy argument length
   6797     GLMessage_DataType *arg_length = glmsg.add_args();
   6798     arg_length->set_isarray(false);
   6799     arg_length->set_type(GLMessage::DataType::INT);
   6800     arg_length->add_intvalue((int)length);
   6801 
   6802     // copy argument counterString
   6803     GLMessage_DataType *arg_counterString = glmsg.add_args();
   6804     arg_counterString->set_isarray(false);
   6805     arg_counterString->set_type(GLMessage::DataType::INT);
   6806     arg_counterString->add_intvalue((int)counterString);
   6807 
   6808     // call function
   6809     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6810     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6811     glContext->hooks->gl.glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString);
   6812     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6813     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6814 
   6815     void *pointerArgs[] = {
   6816         (void *) length,
   6817         (void *) counterString,
   6818     };
   6819 
   6820     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6821                               threadStartTime, threadEndTime,
   6822                               &glmsg, pointerArgs);
   6823     glContext->traceGLMessage(&glmsg);
   6824 }
   6825 
   6826 void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
   6827     GLMessage glmsg;
   6828     GLTraceContext *glContext = getGLTraceContext();
   6829 
   6830     glmsg.set_function(GLMessage::glGetPerfMonitorCounterInfoAMD);
   6831 
   6832     // copy argument group
   6833     GLMessage_DataType *arg_group = glmsg.add_args();
   6834     arg_group->set_isarray(false);
   6835     arg_group->set_type(GLMessage::DataType::INT);
   6836     arg_group->add_intvalue(group);
   6837 
   6838     // copy argument counter
   6839     GLMessage_DataType *arg_counter = glmsg.add_args();
   6840     arg_counter->set_isarray(false);
   6841     arg_counter->set_type(GLMessage::DataType::INT);
   6842     arg_counter->add_intvalue(counter);
   6843 
   6844     // copy argument pname
   6845     GLMessage_DataType *arg_pname = glmsg.add_args();
   6846     arg_pname->set_isarray(false);
   6847     arg_pname->set_type(GLMessage::DataType::ENUM);
   6848     arg_pname->add_intvalue((int)pname);
   6849 
   6850     // copy argument data
   6851     GLMessage_DataType *arg_data = glmsg.add_args();
   6852     arg_data->set_isarray(false);
   6853     arg_data->set_type(GLMessage::DataType::INT);
   6854     arg_data->add_intvalue((int)data);
   6855 
   6856     // call function
   6857     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6858     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6859     glContext->hooks->gl.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data);
   6860     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6861     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6862 
   6863     void *pointerArgs[] = {
   6864         (void *) data,
   6865     };
   6866 
   6867     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6868                               threadStartTime, threadEndTime,
   6869                               &glmsg, pointerArgs);
   6870     glContext->traceGLMessage(&glmsg);
   6871 }
   6872 
   6873 void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors) {
   6874     GLMessage glmsg;
   6875     GLTraceContext *glContext = getGLTraceContext();
   6876 
   6877     glmsg.set_function(GLMessage::glGenPerfMonitorsAMD);
   6878 
   6879     // copy argument n
   6880     GLMessage_DataType *arg_n = glmsg.add_args();
   6881     arg_n->set_isarray(false);
   6882     arg_n->set_type(GLMessage::DataType::INT);
   6883     arg_n->add_intvalue(n);
   6884 
   6885     // copy argument monitors
   6886     GLMessage_DataType *arg_monitors = glmsg.add_args();
   6887     arg_monitors->set_isarray(false);
   6888     arg_monitors->set_type(GLMessage::DataType::INT);
   6889     arg_monitors->add_intvalue((int)monitors);
   6890 
   6891     // call function
   6892     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6893     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6894     glContext->hooks->gl.glGenPerfMonitorsAMD(n, monitors);
   6895     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6896     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6897 
   6898     void *pointerArgs[] = {
   6899         (void *) monitors,
   6900     };
   6901 
   6902     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6903                               threadStartTime, threadEndTime,
   6904                               &glmsg, pointerArgs);
   6905     glContext->traceGLMessage(&glmsg);
   6906 }
   6907 
   6908 void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors) {
   6909     GLMessage glmsg;
   6910     GLTraceContext *glContext = getGLTraceContext();
   6911 
   6912     glmsg.set_function(GLMessage::glDeletePerfMonitorsAMD);
   6913 
   6914     // copy argument n
   6915     GLMessage_DataType *arg_n = glmsg.add_args();
   6916     arg_n->set_isarray(false);
   6917     arg_n->set_type(GLMessage::DataType::INT);
   6918     arg_n->add_intvalue(n);
   6919 
   6920     // copy argument monitors
   6921     GLMessage_DataType *arg_monitors = glmsg.add_args();
   6922     arg_monitors->set_isarray(false);
   6923     arg_monitors->set_type(GLMessage::DataType::INT);
   6924     arg_monitors->add_intvalue((int)monitors);
   6925 
   6926     // call function
   6927     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6928     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6929     glContext->hooks->gl.glDeletePerfMonitorsAMD(n, monitors);
   6930     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6931     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6932 
   6933     void *pointerArgs[] = {
   6934         (void *) monitors,
   6935     };
   6936 
   6937     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6938                               threadStartTime, threadEndTime,
   6939                               &glmsg, pointerArgs);
   6940     glContext->traceGLMessage(&glmsg);
   6941 }
   6942 
   6943 void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
   6944     GLMessage glmsg;
   6945     GLTraceContext *glContext = getGLTraceContext();
   6946 
   6947     glmsg.set_function(GLMessage::glSelectPerfMonitorCountersAMD);
   6948 
   6949     // copy argument monitor
   6950     GLMessage_DataType *arg_monitor = glmsg.add_args();
   6951     arg_monitor->set_isarray(false);
   6952     arg_monitor->set_type(GLMessage::DataType::INT);
   6953     arg_monitor->add_intvalue(monitor);
   6954 
   6955     // copy argument enable
   6956     GLMessage_DataType *arg_enable = glmsg.add_args();
   6957     arg_enable->set_isarray(false);
   6958     arg_enable->set_type(GLMessage::DataType::BOOL);
   6959     arg_enable->add_boolvalue(enable);
   6960 
   6961     // copy argument group
   6962     GLMessage_DataType *arg_group = glmsg.add_args();
   6963     arg_group->set_isarray(false);
   6964     arg_group->set_type(GLMessage::DataType::INT);
   6965     arg_group->add_intvalue(group);
   6966 
   6967     // copy argument numCounters
   6968     GLMessage_DataType *arg_numCounters = glmsg.add_args();
   6969     arg_numCounters->set_isarray(false);
   6970     arg_numCounters->set_type(GLMessage::DataType::INT);
   6971     arg_numCounters->add_intvalue(numCounters);
   6972 
   6973     // copy argument countersList
   6974     GLMessage_DataType *arg_countersList = glmsg.add_args();
   6975     arg_countersList->set_isarray(false);
   6976     arg_countersList->set_type(GLMessage::DataType::INT);
   6977     arg_countersList->add_intvalue((int)countersList);
   6978 
   6979     // call function
   6980     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6981     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6982     glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, countersList);
   6983     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6984     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6985 
   6986     void *pointerArgs[] = {
   6987         (void *) countersList,
   6988     };
   6989 
   6990     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6991                               threadStartTime, threadEndTime,
   6992                               &glmsg, pointerArgs);
   6993     glContext->traceGLMessage(&glmsg);
   6994 }
   6995 
   6996 void GLTrace_glBeginPerfMonitorAMD(GLuint monitor) {
   6997     GLMessage glmsg;
   6998     GLTraceContext *glContext = getGLTraceContext();
   6999 
   7000     glmsg.set_function(GLMessage::glBeginPerfMonitorAMD);
   7001 
   7002     // copy argument monitor
   7003     GLMessage_DataType *arg_monitor = glmsg.add_args();
   7004     arg_monitor->set_isarray(false);
   7005     arg_monitor->set_type(GLMessage::DataType::INT);
   7006     arg_monitor->add_intvalue(monitor);
   7007 
   7008     // call function
   7009     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7010     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7011     glContext->hooks->gl.glBeginPerfMonitorAMD(monitor);
   7012     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7013     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7014 
   7015     void *pointerArgs[] = {
   7016     };
   7017 
   7018     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7019                               threadStartTime, threadEndTime,
   7020                               &glmsg, pointerArgs);
   7021     glContext->traceGLMessage(&glmsg);
   7022 }
   7023 
   7024 void GLTrace_glEndPerfMonitorAMD(GLuint monitor) {
   7025     GLMessage glmsg;
   7026     GLTraceContext *glContext = getGLTraceContext();
   7027 
   7028     glmsg.set_function(GLMessage::glEndPerfMonitorAMD);
   7029 
   7030     // copy argument monitor
   7031     GLMessage_DataType *arg_monitor = glmsg.add_args();
   7032     arg_monitor->set_isarray(false);
   7033     arg_monitor->set_type(GLMessage::DataType::INT);
   7034     arg_monitor->add_intvalue(monitor);
   7035 
   7036     // call function
   7037     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7038     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7039     glContext->hooks->gl.glEndPerfMonitorAMD(monitor);
   7040     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7041     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7042 
   7043     void *pointerArgs[] = {
   7044     };
   7045 
   7046     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7047                               threadStartTime, threadEndTime,
   7048                               &glmsg, pointerArgs);
   7049     glContext->traceGLMessage(&glmsg);
   7050 }
   7051 
   7052 void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
   7053     GLMessage glmsg;
   7054     GLTraceContext *glContext = getGLTraceContext();
   7055 
   7056     glmsg.set_function(GLMessage::glGetPerfMonitorCounterDataAMD);
   7057 
   7058     // copy argument monitor
   7059     GLMessage_DataType *arg_monitor = glmsg.add_args();
   7060     arg_monitor->set_isarray(false);
   7061     arg_monitor->set_type(GLMessage::DataType::INT);
   7062     arg_monitor->add_intvalue(monitor);
   7063 
   7064     // copy argument pname
   7065     GLMessage_DataType *arg_pname = glmsg.add_args();
   7066     arg_pname->set_isarray(false);
   7067     arg_pname->set_type(GLMessage::DataType::ENUM);
   7068     arg_pname->add_intvalue((int)pname);
   7069 
   7070     // copy argument dataSize
   7071     GLMessage_DataType *arg_dataSize = glmsg.add_args();
   7072     arg_dataSize->set_isarray(false);
   7073     arg_dataSize->set_type(GLMessage::DataType::INT);
   7074     arg_dataSize->add_intvalue(dataSize);
   7075 
   7076     // copy argument data
   7077     GLMessage_DataType *arg_data = glmsg.add_args();
   7078     arg_data->set_isarray(false);
   7079     arg_data->set_type(GLMessage::DataType::INT);
   7080     arg_data->add_intvalue((int)data);
   7081 
   7082     // copy argument bytesWritten
   7083     GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
   7084     arg_bytesWritten->set_isarray(false);
   7085     arg_bytesWritten->set_type(GLMessage::DataType::INT);
   7086     arg_bytesWritten->add_intvalue((int)bytesWritten);
   7087 
   7088     // call function
   7089     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7090     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7091     glContext->hooks->gl.glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten);
   7092     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7093     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7094 
   7095     void *pointerArgs[] = {
   7096         (void *) data,
   7097         (void *) bytesWritten,
   7098     };
   7099 
   7100     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7101                               threadStartTime, threadEndTime,
   7102                               &glmsg, pointerArgs);
   7103     glContext->traceGLMessage(&glmsg);
   7104 }
   7105 
   7106 void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
   7107     GLMessage glmsg;
   7108     GLTraceContext *glContext = getGLTraceContext();
   7109 
   7110     glmsg.set_function(GLMessage::glBlitFramebufferANGLE);
   7111 
   7112     // copy argument srcX0
   7113     GLMessage_DataType *arg_srcX0 = glmsg.add_args();
   7114     arg_srcX0->set_isarray(false);
   7115     arg_srcX0->set_type(GLMessage::DataType::INT);
   7116     arg_srcX0->add_intvalue(srcX0);
   7117 
   7118     // copy argument srcY0
   7119     GLMessage_DataType *arg_srcY0 = glmsg.add_args();
   7120     arg_srcY0->set_isarray(false);
   7121     arg_srcY0->set_type(GLMessage::DataType::INT);
   7122     arg_srcY0->add_intvalue(srcY0);
   7123 
   7124     // copy argument srcX1
   7125     GLMessage_DataType *arg_srcX1 = glmsg.add_args();
   7126     arg_srcX1->set_isarray(false);
   7127     arg_srcX1->set_type(GLMessage::DataType::INT);
   7128     arg_srcX1->add_intvalue(srcX1);
   7129 
   7130     // copy argument srcY1
   7131     GLMessage_DataType *arg_srcY1 = glmsg.add_args();
   7132     arg_srcY1->set_isarray(false);
   7133     arg_srcY1->set_type(GLMessage::DataType::INT);
   7134     arg_srcY1->add_intvalue(srcY1);
   7135 
   7136     // copy argument dstX0
   7137     GLMessage_DataType *arg_dstX0 = glmsg.add_args();
   7138     arg_dstX0->set_isarray(false);
   7139     arg_dstX0->set_type(GLMessage::DataType::INT);
   7140     arg_dstX0->add_intvalue(dstX0);
   7141 
   7142     // copy argument dstY0
   7143     GLMessage_DataType *arg_dstY0 = glmsg.add_args();
   7144     arg_dstY0->set_isarray(false);
   7145     arg_dstY0->set_type(GLMessage::DataType::INT);
   7146     arg_dstY0->add_intvalue(dstY0);
   7147 
   7148     // copy argument dstX1
   7149     GLMessage_DataType *arg_dstX1 = glmsg.add_args();
   7150     arg_dstX1->set_isarray(false);
   7151     arg_dstX1->set_type(GLMessage::DataType::INT);
   7152     arg_dstX1->add_intvalue(dstX1);
   7153 
   7154     // copy argument dstY1
   7155     GLMessage_DataType *arg_dstY1 = glmsg.add_args();
   7156     arg_dstY1->set_isarray(false);
   7157     arg_dstY1->set_type(GLMessage::DataType::INT);
   7158     arg_dstY1->add_intvalue(dstY1);
   7159 
   7160     // copy argument mask
   7161     GLMessage_DataType *arg_mask = glmsg.add_args();
   7162     arg_mask->set_isarray(false);
   7163     arg_mask->set_type(GLMessage::DataType::INT);
   7164     arg_mask->add_intvalue(mask);
   7165 
   7166     // copy argument filter
   7167     GLMessage_DataType *arg_filter = glmsg.add_args();
   7168     arg_filter->set_isarray(false);
   7169     arg_filter->set_type(GLMessage::DataType::ENUM);
   7170     arg_filter->add_intvalue((int)filter);
   7171 
   7172     // call function
   7173     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7174     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7175     glContext->hooks->gl.glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
   7176     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7177     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7178 
   7179     void *pointerArgs[] = {
   7180     };
   7181 
   7182     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7183                               threadStartTime, threadEndTime,
   7184                               &glmsg, pointerArgs);
   7185     glContext->traceGLMessage(&glmsg);
   7186 }
   7187 
   7188 void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   7189     GLMessage glmsg;
   7190     GLTraceContext *glContext = getGLTraceContext();
   7191 
   7192     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleANGLE);
   7193 
   7194     // copy argument target
   7195     GLMessage_DataType *arg_target = glmsg.add_args();
   7196     arg_target->set_isarray(false);
   7197     arg_target->set_type(GLMessage::DataType::ENUM);
   7198     arg_target->add_intvalue((int)target);
   7199 
   7200     // copy argument samples
   7201     GLMessage_DataType *arg_samples = glmsg.add_args();
   7202     arg_samples->set_isarray(false);
   7203     arg_samples->set_type(GLMessage::DataType::INT);
   7204     arg_samples->add_intvalue(samples);
   7205 
   7206     // copy argument internalformat
   7207     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   7208     arg_internalformat->set_isarray(false);
   7209     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   7210     arg_internalformat->add_intvalue((int)internalformat);
   7211 
   7212     // copy argument width
   7213     GLMessage_DataType *arg_width = glmsg.add_args();
   7214     arg_width->set_isarray(false);
   7215     arg_width->set_type(GLMessage::DataType::INT);
   7216     arg_width->add_intvalue(width);
   7217 
   7218     // copy argument height
   7219     GLMessage_DataType *arg_height = glmsg.add_args();
   7220     arg_height->set_isarray(false);
   7221     arg_height->set_type(GLMessage::DataType::INT);
   7222     arg_height->add_intvalue(height);
   7223 
   7224     // call function
   7225     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7226     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7227     glContext->hooks->gl.glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
   7228     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7229     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7230 
   7231     void *pointerArgs[] = {
   7232     };
   7233 
   7234     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7235                               threadStartTime, threadEndTime,
   7236                               &glmsg, pointerArgs);
   7237     glContext->traceGLMessage(&glmsg);
   7238 }
   7239 
   7240 void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   7241     GLMessage glmsg;
   7242     GLTraceContext *glContext = getGLTraceContext();
   7243 
   7244     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleAPPLE);
   7245 
   7246     // copy argument target
   7247     GLMessage_DataType *arg_target = glmsg.add_args();
   7248     arg_target->set_isarray(false);
   7249     arg_target->set_type(GLMessage::DataType::ENUM);
   7250     arg_target->add_intvalue((int)target);
   7251 
   7252     // copy argument samples
   7253     GLMessage_DataType *arg_samples = glmsg.add_args();
   7254     arg_samples->set_isarray(false);
   7255     arg_samples->set_type(GLMessage::DataType::INT);
   7256     arg_samples->add_intvalue(samples);
   7257 
   7258     // copy argument internalformat
   7259     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   7260     arg_internalformat->set_isarray(false);
   7261     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   7262     arg_internalformat->add_intvalue((int)internalformat);
   7263 
   7264     // copy argument width
   7265     GLMessage_DataType *arg_width = glmsg.add_args();
   7266     arg_width->set_isarray(false);
   7267     arg_width->set_type(GLMessage::DataType::INT);
   7268     arg_width->add_intvalue(width);
   7269 
   7270     // copy argument height
   7271     GLMessage_DataType *arg_height = glmsg.add_args();
   7272     arg_height->set_isarray(false);
   7273     arg_height->set_type(GLMessage::DataType::INT);
   7274     arg_height->add_intvalue(height);
   7275 
   7276     // call function
   7277     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7278     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7279     glContext->hooks->gl.glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height);
   7280     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7281     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7282 
   7283     void *pointerArgs[] = {
   7284     };
   7285 
   7286     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7287                               threadStartTime, threadEndTime,
   7288                               &glmsg, pointerArgs);
   7289     glContext->traceGLMessage(&glmsg);
   7290 }
   7291 
   7292 void GLTrace_glResolveMultisampleFramebufferAPPLE(void) {
   7293     GLMessage glmsg;
   7294     GLTraceContext *glContext = getGLTraceContext();
   7295 
   7296     glmsg.set_function(GLMessage::glResolveMultisampleFramebufferAPPLE);
   7297 
   7298     // call function
   7299     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7300     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7301     glContext->hooks->gl.glResolveMultisampleFramebufferAPPLE();
   7302     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7303     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7304 
   7305     void *pointerArgs[] = {
   7306     };
   7307 
   7308     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7309                               threadStartTime, threadEndTime,
   7310                               &glmsg, pointerArgs);
   7311     glContext->traceGLMessage(&glmsg);
   7312 }
   7313 
   7314 void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
   7315     GLMessage glmsg;
   7316     GLTraceContext *glContext = getGLTraceContext();
   7317 
   7318     glmsg.set_function(GLMessage::glLabelObjectEXT);
   7319 
   7320     // copy argument type
   7321     GLMessage_DataType *arg_type = glmsg.add_args();
   7322     arg_type->set_isarray(false);
   7323     arg_type->set_type(GLMessage::DataType::ENUM);
   7324     arg_type->add_intvalue((int)type);
   7325 
   7326     // copy argument object
   7327     GLMessage_DataType *arg_object = glmsg.add_args();
   7328     arg_object->set_isarray(false);
   7329     arg_object->set_type(GLMessage::DataType::INT);
   7330     arg_object->add_intvalue(object);
   7331 
   7332     // copy argument length
   7333     GLMessage_DataType *arg_length = glmsg.add_args();
   7334     arg_length->set_isarray(false);
   7335     arg_length->set_type(GLMessage::DataType::INT);
   7336     arg_length->add_intvalue(length);
   7337 
   7338     // copy argument label
   7339     GLMessage_DataType *arg_label = glmsg.add_args();
   7340     arg_label->set_isarray(false);
   7341     arg_label->set_type(GLMessage::DataType::INT);
   7342     arg_label->add_intvalue((int)label);
   7343 
   7344     // call function
   7345     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7346     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7347     glContext->hooks->gl.glLabelObjectEXT(type, object, length, label);
   7348     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7349     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7350 
   7351     void *pointerArgs[] = {
   7352         (void *) label,
   7353     };
   7354 
   7355     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7356                               threadStartTime, threadEndTime,
   7357                               &glmsg, pointerArgs);
   7358     glContext->traceGLMessage(&glmsg);
   7359 }
   7360 
   7361 void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
   7362     GLMessage glmsg;
   7363     GLTraceContext *glContext = getGLTraceContext();
   7364 
   7365     glmsg.set_function(GLMessage::glGetObjectLabelEXT);
   7366 
   7367     // copy argument type
   7368     GLMessage_DataType *arg_type = glmsg.add_args();
   7369     arg_type->set_isarray(false);
   7370     arg_type->set_type(GLMessage::DataType::ENUM);
   7371     arg_type->add_intvalue((int)type);
   7372 
   7373     // copy argument object
   7374     GLMessage_DataType *arg_object = glmsg.add_args();
   7375     arg_object->set_isarray(false);
   7376     arg_object->set_type(GLMessage::DataType::INT);
   7377     arg_object->add_intvalue(object);
   7378 
   7379     // copy argument bufSize
   7380     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   7381     arg_bufSize->set_isarray(false);
   7382     arg_bufSize->set_type(GLMessage::DataType::INT);
   7383     arg_bufSize->add_intvalue(bufSize);
   7384 
   7385     // copy argument length
   7386     GLMessage_DataType *arg_length = glmsg.add_args();
   7387     arg_length->set_isarray(false);
   7388     arg_length->set_type(GLMessage::DataType::INT);
   7389     arg_length->add_intvalue((int)length);
   7390 
   7391     // copy argument label
   7392     GLMessage_DataType *arg_label = glmsg.add_args();
   7393     arg_label->set_isarray(false);
   7394     arg_label->set_type(GLMessage::DataType::INT);
   7395     arg_label->add_intvalue((int)label);
   7396 
   7397     // call function
   7398     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7399     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7400     glContext->hooks->gl.glGetObjectLabelEXT(type, object, bufSize, length, label);
   7401     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7402     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7403 
   7404     void *pointerArgs[] = {
   7405         (void *) length,
   7406         (void *) label,
   7407     };
   7408 
   7409     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7410                               threadStartTime, threadEndTime,
   7411                               &glmsg, pointerArgs);
   7412     glContext->traceGLMessage(&glmsg);
   7413 }
   7414 
   7415 void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) {
   7416     GLMessage glmsg;
   7417     GLTraceContext *glContext = getGLTraceContext();
   7418 
   7419     glmsg.set_function(GLMessage::glInsertEventMarkerEXT);
   7420 
   7421     // copy argument length
   7422     GLMessage_DataType *arg_length = glmsg.add_args();
   7423     arg_length->set_isarray(false);
   7424     arg_length->set_type(GLMessage::DataType::INT);
   7425     arg_length->add_intvalue(length);
   7426 
   7427     // copy argument marker
   7428     GLMessage_DataType *arg_marker = glmsg.add_args();
   7429     arg_marker->set_isarray(false);
   7430     arg_marker->set_type(GLMessage::DataType::INT);
   7431     arg_marker->add_intvalue((int)marker);
   7432 
   7433     // call function
   7434     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7435     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7436     glContext->hooks->gl.glInsertEventMarkerEXT(length, marker);
   7437     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7438     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7439 
   7440     void *pointerArgs[] = {
   7441         (void *) marker,
   7442     };
   7443 
   7444     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7445                               threadStartTime, threadEndTime,
   7446                               &glmsg, pointerArgs);
   7447     glContext->traceGLMessage(&glmsg);
   7448 }
   7449 
   7450 void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) {
   7451     GLMessage glmsg;
   7452     GLTraceContext *glContext = getGLTraceContext();
   7453 
   7454     glmsg.set_function(GLMessage::glPushGroupMarkerEXT);
   7455 
   7456     // copy argument length
   7457     GLMessage_DataType *arg_length = glmsg.add_args();
   7458     arg_length->set_isarray(false);
   7459     arg_length->set_type(GLMessage::DataType::INT);
   7460     arg_length->add_intvalue(length);
   7461 
   7462     // copy argument marker
   7463     GLMessage_DataType *arg_marker = glmsg.add_args();
   7464     arg_marker->set_isarray(false);
   7465     arg_marker->set_type(GLMessage::DataType::INT);
   7466     arg_marker->add_intvalue((int)marker);
   7467 
   7468     // call function
   7469     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7470     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7471     glContext->hooks->gl.glPushGroupMarkerEXT(length, marker);
   7472     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7473     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7474 
   7475     void *pointerArgs[] = {
   7476         (void *) marker,
   7477     };
   7478 
   7479     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7480                               threadStartTime, threadEndTime,
   7481                               &glmsg, pointerArgs);
   7482     glContext->traceGLMessage(&glmsg);
   7483 }
   7484 
   7485 void GLTrace_glPopGroupMarkerEXT(void) {
   7486     GLMessage glmsg;
   7487     GLTraceContext *glContext = getGLTraceContext();
   7488 
   7489     glmsg.set_function(GLMessage::glPopGroupMarkerEXT);
   7490 
   7491     // call function
   7492     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7493     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7494     glContext->hooks->gl.glPopGroupMarkerEXT();
   7495     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7496     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7497 
   7498     void *pointerArgs[] = {
   7499     };
   7500 
   7501     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7502                               threadStartTime, threadEndTime,
   7503                               &glmsg, pointerArgs);
   7504     glContext->traceGLMessage(&glmsg);
   7505 }
   7506 
   7507 void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
   7508     GLMessage glmsg;
   7509     GLTraceContext *glContext = getGLTraceContext();
   7510 
   7511     glmsg.set_function(GLMessage::glDiscardFramebufferEXT);
   7512 
   7513     // copy argument target
   7514     GLMessage_DataType *arg_target = glmsg.add_args();
   7515     arg_target->set_isarray(false);
   7516     arg_target->set_type(GLMessage::DataType::ENUM);
   7517     arg_target->add_intvalue((int)target);
   7518 
   7519     // copy argument numAttachments
   7520     GLMessage_DataType *arg_numAttachments = glmsg.add_args();
   7521     arg_numAttachments->set_isarray(false);
   7522     arg_numAttachments->set_type(GLMessage::DataType::INT);
   7523     arg_numAttachments->add_intvalue(numAttachments);
   7524 
   7525     // copy argument attachments
   7526     GLMessage_DataType *arg_attachments = glmsg.add_args();
   7527     arg_attachments->set_isarray(false);
   7528     arg_attachments->set_type(GLMessage::DataType::INT);
   7529     arg_attachments->add_intvalue((int)attachments);
   7530 
   7531     // call function
   7532     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7533     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7534     glContext->hooks->gl.glDiscardFramebufferEXT(target, numAttachments, attachments);
   7535     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7536     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7537 
   7538     void *pointerArgs[] = {
   7539         (void *) attachments,
   7540     };
   7541 
   7542     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7543                               threadStartTime, threadEndTime,
   7544                               &glmsg, pointerArgs);
   7545     glContext->traceGLMessage(&glmsg);
   7546 }
   7547 
   7548 void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   7549     GLMessage glmsg;
   7550     GLTraceContext *glContext = getGLTraceContext();
   7551 
   7552     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT);
   7553 
   7554     // copy argument target
   7555     GLMessage_DataType *arg_target = glmsg.add_args();
   7556     arg_target->set_isarray(false);
   7557     arg_target->set_type(GLMessage::DataType::ENUM);
   7558     arg_target->add_intvalue((int)target);
   7559 
   7560     // copy argument samples
   7561     GLMessage_DataType *arg_samples = glmsg.add_args();
   7562     arg_samples->set_isarray(false);
   7563     arg_samples->set_type(GLMessage::DataType::INT);
   7564     arg_samples->add_intvalue(samples);
   7565 
   7566     // copy argument internalformat
   7567     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   7568     arg_internalformat->set_isarray(false);
   7569     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   7570     arg_internalformat->add_intvalue((int)internalformat);
   7571 
   7572     // copy argument width
   7573     GLMessage_DataType *arg_width = glmsg.add_args();
   7574     arg_width->set_isarray(false);
   7575     arg_width->set_type(GLMessage::DataType::INT);
   7576     arg_width->add_intvalue(width);
   7577 
   7578     // copy argument height
   7579     GLMessage_DataType *arg_height = glmsg.add_args();
   7580     arg_height->set_isarray(false);
   7581     arg_height->set_type(GLMessage::DataType::INT);
   7582     arg_height->add_intvalue(height);
   7583 
   7584     // call function
   7585     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7586     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7587     glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
   7588     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7589     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7590 
   7591     void *pointerArgs[] = {
   7592     };
   7593 
   7594     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7595                               threadStartTime, threadEndTime,
   7596                               &glmsg, pointerArgs);
   7597     glContext->traceGLMessage(&glmsg);
   7598 }
   7599 
   7600 void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
   7601     GLMessage glmsg;
   7602     GLTraceContext *glContext = getGLTraceContext();
   7603 
   7604     glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT);
   7605 
   7606     // copy argument target
   7607     GLMessage_DataType *arg_target = glmsg.add_args();
   7608     arg_target->set_isarray(false);
   7609     arg_target->set_type(GLMessage::DataType::ENUM);
   7610     arg_target->add_intvalue((int)target);
   7611 
   7612     // copy argument attachment
   7613     GLMessage_DataType *arg_attachment = glmsg.add_args();
   7614     arg_attachment->set_isarray(false);
   7615     arg_attachment->set_type(GLMessage::DataType::ENUM);
   7616     arg_attachment->add_intvalue((int)attachment);
   7617 
   7618     // copy argument textarget
   7619     GLMessage_DataType *arg_textarget = glmsg.add_args();
   7620     arg_textarget->set_isarray(false);
   7621     arg_textarget->set_type(GLMessage::DataType::ENUM);
   7622     arg_textarget->add_intvalue((int)textarget);
   7623 
   7624     // copy argument texture
   7625     GLMessage_DataType *arg_texture = glmsg.add_args();
   7626     arg_texture->set_isarray(false);
   7627     arg_texture->set_type(GLMessage::DataType::INT);
   7628     arg_texture->add_intvalue(texture);
   7629 
   7630     // copy argument level
   7631     GLMessage_DataType *arg_level = glmsg.add_args();
   7632     arg_level->set_isarray(false);
   7633     arg_level->set_type(GLMessage::DataType::INT);
   7634     arg_level->add_intvalue(level);
   7635 
   7636     // copy argument samples
   7637     GLMessage_DataType *arg_samples = glmsg.add_args();
   7638     arg_samples->set_isarray(false);
   7639     arg_samples->set_type(GLMessage::DataType::INT);
   7640     arg_samples->add_intvalue(samples);
   7641 
   7642     // call function
   7643     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7644     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7645     glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
   7646     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7647     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7648 
   7649     void *pointerArgs[] = {
   7650     };
   7651 
   7652     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7653                               threadStartTime, threadEndTime,
   7654                               &glmsg, pointerArgs);
   7655     glContext->traceGLMessage(&glmsg);
   7656 }
   7657 
   7658 void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
   7659     GLMessage glmsg;
   7660     GLTraceContext *glContext = getGLTraceContext();
   7661 
   7662     glmsg.set_function(GLMessage::glMultiDrawArraysEXT);
   7663 
   7664     // copy argument mode
   7665     GLMessage_DataType *arg_mode = glmsg.add_args();
   7666     arg_mode->set_isarray(false);
   7667     arg_mode->set_type(GLMessage::DataType::ENUM);
   7668     arg_mode->add_intvalue((int)mode);
   7669 
   7670     // copy argument first
   7671     GLMessage_DataType *arg_first = glmsg.add_args();
   7672     arg_first->set_isarray(false);
   7673     arg_first->set_type(GLMessage::DataType::INT);
   7674     arg_first->add_intvalue((int)first);
   7675 
   7676     // copy argument count
   7677     GLMessage_DataType *arg_count = glmsg.add_args();
   7678     arg_count->set_isarray(false);
   7679     arg_count->set_type(GLMessage::DataType::INT);
   7680     arg_count->add_intvalue((int)count);
   7681 
   7682     // copy argument primcount
   7683     GLMessage_DataType *arg_primcount = glmsg.add_args();
   7684     arg_primcount->set_isarray(false);
   7685     arg_primcount->set_type(GLMessage::DataType::INT);
   7686     arg_primcount->add_intvalue(primcount);
   7687 
   7688     // call function
   7689     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7690     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7691     glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount);
   7692     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7693     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7694 
   7695     void *pointerArgs[] = {
   7696         (void *) first,
   7697         (void *) count,
   7698     };
   7699 
   7700     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7701                               threadStartTime, threadEndTime,
   7702                               &glmsg, pointerArgs);
   7703     glContext->traceGLMessage(&glmsg);
   7704 }
   7705 
   7706 void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
   7707     GLMessage glmsg;
   7708     GLTraceContext *glContext = getGLTraceContext();
   7709 
   7710     glmsg.set_function(GLMessage::glMultiDrawElementsEXT);
   7711 
   7712     // copy argument mode
   7713     GLMessage_DataType *arg_mode = glmsg.add_args();
   7714     arg_mode->set_isarray(false);
   7715     arg_mode->set_type(GLMessage::DataType::ENUM);
   7716     arg_mode->add_intvalue((int)mode);
   7717 
   7718     // copy argument count
   7719     GLMessage_DataType *arg_count = glmsg.add_args();
   7720     arg_count->set_isarray(false);
   7721     arg_count->set_type(GLMessage::DataType::INT);
   7722     arg_count->add_intvalue((int)count);
   7723 
   7724     // copy argument type
   7725     GLMessage_DataType *arg_type = glmsg.add_args();
   7726     arg_type->set_isarray(false);
   7727     arg_type->set_type(GLMessage::DataType::ENUM);
   7728     arg_type->add_intvalue((int)type);
   7729 
   7730     // copy argument indices
   7731     GLMessage_DataType *arg_indices = glmsg.add_args();
   7732     arg_indices->set_isarray(false);
   7733     arg_indices->set_type(GLMessage::DataType::INT);
   7734     arg_indices->add_intvalue((int)indices);
   7735 
   7736     // copy argument primcount
   7737     GLMessage_DataType *arg_primcount = glmsg.add_args();
   7738     arg_primcount->set_isarray(false);
   7739     arg_primcount->set_type(GLMessage::DataType::INT);
   7740     arg_primcount->add_intvalue(primcount);
   7741 
   7742     // call function
   7743     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7744     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7745     glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount);
   7746     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7747     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7748 
   7749     void *pointerArgs[] = {
   7750         (void *) count,
   7751         (void *) indices,
   7752     };
   7753 
   7754     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7755                               threadStartTime, threadEndTime,
   7756                               &glmsg, pointerArgs);
   7757     glContext->traceGLMessage(&glmsg);
   7758 }
   7759 
   7760 void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids) {
   7761     GLMessage glmsg;
   7762     GLTraceContext *glContext = getGLTraceContext();
   7763 
   7764     glmsg.set_function(GLMessage::glGenQueriesEXT);
   7765 
   7766     // copy argument n
   7767     GLMessage_DataType *arg_n = glmsg.add_args();
   7768     arg_n->set_isarray(false);
   7769     arg_n->set_type(GLMessage::DataType::INT);
   7770     arg_n->add_intvalue(n);
   7771 
   7772     // copy argument ids
   7773     GLMessage_DataType *arg_ids = glmsg.add_args();
   7774     arg_ids->set_isarray(false);
   7775     arg_ids->set_type(GLMessage::DataType::INT);
   7776     arg_ids->add_intvalue((int)ids);
   7777 
   7778     // call function
   7779     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7780     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7781     glContext->hooks->gl.glGenQueriesEXT(n, ids);
   7782     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7783     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7784 
   7785     void *pointerArgs[] = {
   7786         (void *) ids,
   7787     };
   7788 
   7789     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7790                               threadStartTime, threadEndTime,
   7791                               &glmsg, pointerArgs);
   7792     glContext->traceGLMessage(&glmsg);
   7793 }
   7794 
   7795 void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) {
   7796     GLMessage glmsg;
   7797     GLTraceContext *glContext = getGLTraceContext();
   7798 
   7799     glmsg.set_function(GLMessage::glDeleteQueriesEXT);
   7800 
   7801     // copy argument n
   7802     GLMessage_DataType *arg_n = glmsg.add_args();
   7803     arg_n->set_isarray(false);
   7804     arg_n->set_type(GLMessage::DataType::INT);
   7805     arg_n->add_intvalue(n);
   7806 
   7807     // copy argument ids
   7808     GLMessage_DataType *arg_ids = glmsg.add_args();
   7809     arg_ids->set_isarray(false);
   7810     arg_ids->set_type(GLMessage::DataType::INT);
   7811     arg_ids->add_intvalue((int)ids);
   7812 
   7813     // call function
   7814     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7815     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7816     glContext->hooks->gl.glDeleteQueriesEXT(n, ids);
   7817     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7818     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7819 
   7820     void *pointerArgs[] = {
   7821         (void *) ids,
   7822     };
   7823 
   7824     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7825                               threadStartTime, threadEndTime,
   7826                               &glmsg, pointerArgs);
   7827     glContext->traceGLMessage(&glmsg);
   7828 }
   7829 
   7830 GLboolean GLTrace_glIsQueryEXT(GLuint id) {
   7831     GLMessage glmsg;
   7832     GLTraceContext *glContext = getGLTraceContext();
   7833 
   7834     glmsg.set_function(GLMessage::glIsQueryEXT);
   7835 
   7836     // copy argument id
   7837     GLMessage_DataType *arg_id = glmsg.add_args();
   7838     arg_id->set_isarray(false);
   7839     arg_id->set_type(GLMessage::DataType::INT);
   7840     arg_id->add_intvalue(id);
   7841 
   7842     // call function
   7843     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7844     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7845     GLboolean retValue = glContext->hooks->gl.glIsQueryEXT(id);
   7846     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7847     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7848 
   7849     // set return value
   7850     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   7851     rt->set_isarray(false);
   7852     rt->set_type(GLMessage::DataType::BOOL);
   7853     rt->add_boolvalue(retValue);
   7854 
   7855     void *pointerArgs[] = {
   7856     };
   7857 
   7858     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7859                               threadStartTime, threadEndTime,
   7860                               &glmsg, pointerArgs);
   7861     glContext->traceGLMessage(&glmsg);
   7862 
   7863     return retValue;
   7864 }
   7865 
   7866 void GLTrace_glBeginQueryEXT(GLenum target, GLuint id) {
   7867     GLMessage glmsg;
   7868     GLTraceContext *glContext = getGLTraceContext();
   7869 
   7870     glmsg.set_function(GLMessage::glBeginQueryEXT);
   7871 
   7872     // copy argument target
   7873     GLMessage_DataType *arg_target = glmsg.add_args();
   7874     arg_target->set_isarray(false);
   7875     arg_target->set_type(GLMessage::DataType::ENUM);
   7876     arg_target->add_intvalue((int)target);
   7877 
   7878     // copy argument id
   7879     GLMessage_DataType *arg_id = glmsg.add_args();
   7880     arg_id->set_isarray(false);
   7881     arg_id->set_type(GLMessage::DataType::INT);
   7882     arg_id->add_intvalue(id);
   7883 
   7884     // call function
   7885     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7886     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7887     glContext->hooks->gl.glBeginQueryEXT(target, id);
   7888     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7889     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7890 
   7891     void *pointerArgs[] = {
   7892     };
   7893 
   7894     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7895                               threadStartTime, threadEndTime,
   7896                               &glmsg, pointerArgs);
   7897     glContext->traceGLMessage(&glmsg);
   7898 }
   7899 
   7900 void GLTrace_glEndQueryEXT(GLenum target) {
   7901     GLMessage glmsg;
   7902     GLTraceContext *glContext = getGLTraceContext();
   7903 
   7904     glmsg.set_function(GLMessage::glEndQueryEXT);
   7905 
   7906     // copy argument target
   7907     GLMessage_DataType *arg_target = glmsg.add_args();
   7908     arg_target->set_isarray(false);
   7909     arg_target->set_type(GLMessage::DataType::ENUM);
   7910     arg_target->add_intvalue((int)target);
   7911 
   7912     // call function
   7913     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7914     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7915     glContext->hooks->gl.glEndQueryEXT(target);
   7916     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7917     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7918 
   7919     void *pointerArgs[] = {
   7920     };
   7921 
   7922     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7923                               threadStartTime, threadEndTime,
   7924                               &glmsg, pointerArgs);
   7925     glContext->traceGLMessage(&glmsg);
   7926 }
   7927 
   7928 void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) {
   7929     GLMessage glmsg;
   7930     GLTraceContext *glContext = getGLTraceContext();
   7931 
   7932     glmsg.set_function(GLMessage::glGetQueryivEXT);
   7933 
   7934     // copy argument target
   7935     GLMessage_DataType *arg_target = glmsg.add_args();
   7936     arg_target->set_isarray(false);
   7937     arg_target->set_type(GLMessage::DataType::ENUM);
   7938     arg_target->add_intvalue((int)target);
   7939 
   7940     // copy argument pname
   7941     GLMessage_DataType *arg_pname = glmsg.add_args();
   7942     arg_pname->set_isarray(false);
   7943     arg_pname->set_type(GLMessage::DataType::ENUM);
   7944     arg_pname->add_intvalue((int)pname);
   7945 
   7946     // copy argument params
   7947     GLMessage_DataType *arg_params = glmsg.add_args();
   7948     arg_params->set_isarray(false);
   7949     arg_params->set_type(GLMessage::DataType::INT);
   7950     arg_params->add_intvalue((int)params);
   7951 
   7952     // call function
   7953     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7954     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7955     glContext->hooks->gl.glGetQueryivEXT(target, pname, params);
   7956     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7957     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7958 
   7959     void *pointerArgs[] = {
   7960         (void *) params,
   7961     };
   7962 
   7963     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7964                               threadStartTime, threadEndTime,
   7965                               &glmsg, pointerArgs);
   7966     glContext->traceGLMessage(&glmsg);
   7967 }
   7968 
   7969 void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) {
   7970     GLMessage glmsg;
   7971     GLTraceContext *glContext = getGLTraceContext();
   7972 
   7973     glmsg.set_function(GLMessage::glGetQueryObjectuivEXT);
   7974 
   7975     // copy argument id
   7976     GLMessage_DataType *arg_id = glmsg.add_args();
   7977     arg_id->set_isarray(false);
   7978     arg_id->set_type(GLMessage::DataType::INT);
   7979     arg_id->add_intvalue(id);
   7980 
   7981     // copy argument pname
   7982     GLMessage_DataType *arg_pname = glmsg.add_args();
   7983     arg_pname->set_isarray(false);
   7984     arg_pname->set_type(GLMessage::DataType::ENUM);
   7985     arg_pname->add_intvalue((int)pname);
   7986 
   7987     // copy argument params
   7988     GLMessage_DataType *arg_params = glmsg.add_args();
   7989     arg_params->set_isarray(false);
   7990     arg_params->set_type(GLMessage::DataType::INT);
   7991     arg_params->add_intvalue((int)params);
   7992 
   7993     // call function
   7994     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7995     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7996     glContext->hooks->gl.glGetQueryObjectuivEXT(id, pname, params);
   7997     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7998     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7999 
   8000     void *pointerArgs[] = {
   8001         (void *) params,
   8002     };
   8003 
   8004     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8005                               threadStartTime, threadEndTime,
   8006                               &glmsg, pointerArgs);
   8007     glContext->traceGLMessage(&glmsg);
   8008 }
   8009 
   8010 GLenum GLTrace_glGetGraphicsResetStatusEXT(void) {
   8011     GLMessage glmsg;
   8012     GLTraceContext *glContext = getGLTraceContext();
   8013 
   8014     glmsg.set_function(GLMessage::glGetGraphicsResetStatusEXT);
   8015 
   8016     // call function
   8017     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8018     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8019     GLenum retValue = glContext->hooks->gl.glGetGraphicsResetStatusEXT();
   8020     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8021     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8022 
   8023     // set return value
   8024     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   8025     rt->set_isarray(false);
   8026     rt->set_type(GLMessage::DataType::ENUM);
   8027     rt->add_intvalue((int)retValue);
   8028 
   8029     void *pointerArgs[] = {
   8030     };
   8031 
   8032     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8033                               threadStartTime, threadEndTime,
   8034                               &glmsg, pointerArgs);
   8035     glContext->traceGLMessage(&glmsg);
   8036 
   8037     return retValue;
   8038 }
   8039 
   8040 void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
   8041     GLMessage glmsg;
   8042     GLTraceContext *glContext = getGLTraceContext();
   8043 
   8044     glmsg.set_function(GLMessage::glReadnPixelsEXT);
   8045 
   8046     // copy argument x
   8047     GLMessage_DataType *arg_x = glmsg.add_args();
   8048     arg_x->set_isarray(false);
   8049     arg_x->set_type(GLMessage::DataType::INT);
   8050     arg_x->add_intvalue(x);
   8051 
   8052     // copy argument y
   8053     GLMessage_DataType *arg_y = glmsg.add_args();
   8054     arg_y->set_isarray(false);
   8055     arg_y->set_type(GLMessage::DataType::INT);
   8056     arg_y->add_intvalue(y);
   8057 
   8058     // copy argument width
   8059     GLMessage_DataType *arg_width = glmsg.add_args();
   8060     arg_width->set_isarray(false);
   8061     arg_width->set_type(GLMessage::DataType::INT);
   8062     arg_width->add_intvalue(width);
   8063 
   8064     // copy argument height
   8065     GLMessage_DataType *arg_height = glmsg.add_args();
   8066     arg_height->set_isarray(false);
   8067     arg_height->set_type(GLMessage::DataType::INT);
   8068     arg_height->add_intvalue(height);
   8069 
   8070     // copy argument format
   8071     GLMessage_DataType *arg_format = glmsg.add_args();
   8072     arg_format->set_isarray(false);
   8073     arg_format->set_type(GLMessage::DataType::ENUM);
   8074     arg_format->add_intvalue((int)format);
   8075 
   8076     // copy argument type
   8077     GLMessage_DataType *arg_type = glmsg.add_args();
   8078     arg_type->set_isarray(false);
   8079     arg_type->set_type(GLMessage::DataType::ENUM);
   8080     arg_type->add_intvalue((int)type);
   8081 
   8082     // copy argument bufSize
   8083     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   8084     arg_bufSize->set_isarray(false);
   8085     arg_bufSize->set_type(GLMessage::DataType::INT);
   8086     arg_bufSize->add_intvalue(bufSize);
   8087 
   8088     // copy argument data
   8089     GLMessage_DataType *arg_data = glmsg.add_args();
   8090     arg_data->set_isarray(false);
   8091     arg_data->set_type(GLMessage::DataType::INT);
   8092     arg_data->add_intvalue((int)data);
   8093 
   8094     // call function
   8095     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8096     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8097     glContext->hooks->gl.glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
   8098     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8099     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8100 
   8101     void *pointerArgs[] = {
   8102         (void *) data,
   8103     };
   8104 
   8105     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8106                               threadStartTime, threadEndTime,
   8107                               &glmsg, pointerArgs);
   8108     glContext->traceGLMessage(&glmsg);
   8109 }
   8110 
   8111 void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params) {
   8112     GLMessage glmsg;
   8113     GLTraceContext *glContext = getGLTraceContext();
   8114 
   8115     glmsg.set_function(GLMessage::glGetnUniformfvEXT);
   8116 
   8117     // copy argument program
   8118     GLMessage_DataType *arg_program = glmsg.add_args();
   8119     arg_program->set_isarray(false);
   8120     arg_program->set_type(GLMessage::DataType::INT);
   8121     arg_program->add_intvalue(program);
   8122 
   8123     // copy argument location
   8124     GLMessage_DataType *arg_location = glmsg.add_args();
   8125     arg_location->set_isarray(false);
   8126     arg_location->set_type(GLMessage::DataType::INT);
   8127     arg_location->add_intvalue(location);
   8128 
   8129     // copy argument bufSize
   8130     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   8131     arg_bufSize->set_isarray(false);
   8132     arg_bufSize->set_type(GLMessage::DataType::INT);
   8133     arg_bufSize->add_intvalue(bufSize);
   8134 
   8135     // copy argument params
   8136     GLMessage_DataType *arg_params = glmsg.add_args();
   8137     arg_params->set_isarray(false);
   8138     arg_params->set_type(GLMessage::DataType::INT);
   8139     arg_params->add_intvalue((int)params);
   8140 
   8141     // call function
   8142     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8143     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8144     glContext->hooks->gl.glGetnUniformfvEXT(program, location, bufSize, params);
   8145     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8146     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8147 
   8148     void *pointerArgs[] = {
   8149         (void *) params,
   8150     };
   8151 
   8152     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8153                               threadStartTime, threadEndTime,
   8154                               &glmsg, pointerArgs);
   8155     glContext->traceGLMessage(&glmsg);
   8156 }
   8157 
   8158 void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
   8159     GLMessage glmsg;
   8160     GLTraceContext *glContext = getGLTraceContext();
   8161 
   8162     glmsg.set_function(GLMessage::glGetnUniformivEXT);
   8163 
   8164     // copy argument program
   8165     GLMessage_DataType *arg_program = glmsg.add_args();
   8166     arg_program->set_isarray(false);
   8167     arg_program->set_type(GLMessage::DataType::INT);
   8168     arg_program->add_intvalue(program);
   8169 
   8170     // copy argument location
   8171     GLMessage_DataType *arg_location = glmsg.add_args();
   8172     arg_location->set_isarray(false);
   8173     arg_location->set_type(GLMessage::DataType::INT);
   8174     arg_location->add_intvalue(location);
   8175 
   8176     // copy argument bufSize
   8177     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   8178     arg_bufSize->set_isarray(false);
   8179     arg_bufSize->set_type(GLMessage::DataType::INT);
   8180     arg_bufSize->add_intvalue(bufSize);
   8181 
   8182     // copy argument params
   8183     GLMessage_DataType *arg_params = glmsg.add_args();
   8184     arg_params->set_isarray(false);
   8185     arg_params->set_type(GLMessage::DataType::INT);
   8186     arg_params->add_intvalue((int)params);
   8187 
   8188     // call function
   8189     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8190     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8191     glContext->hooks->gl.glGetnUniformivEXT(program, location, bufSize, params);
   8192     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8193     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8194 
   8195     void *pointerArgs[] = {
   8196         (void *) params,
   8197     };
   8198 
   8199     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8200                               threadStartTime, threadEndTime,
   8201                               &glmsg, pointerArgs);
   8202     glContext->traceGLMessage(&glmsg);
   8203 }
   8204 
   8205 void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) {
   8206     GLMessage glmsg;
   8207     GLTraceContext *glContext = getGLTraceContext();
   8208 
   8209     glmsg.set_function(GLMessage::glUseProgramStagesEXT);
   8210 
   8211     // copy argument pipeline
   8212     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   8213     arg_pipeline->set_isarray(false);
   8214     arg_pipeline->set_type(GLMessage::DataType::INT);
   8215     arg_pipeline->add_intvalue(pipeline);
   8216 
   8217     // copy argument stages
   8218     GLMessage_DataType *arg_stages = glmsg.add_args();
   8219     arg_stages->set_isarray(false);
   8220     arg_stages->set_type(GLMessage::DataType::INT);
   8221     arg_stages->add_intvalue(stages);
   8222 
   8223     // copy argument program
   8224     GLMessage_DataType *arg_program = glmsg.add_args();
   8225     arg_program->set_isarray(false);
   8226     arg_program->set_type(GLMessage::DataType::INT);
   8227     arg_program->add_intvalue(program);
   8228 
   8229     // call function
   8230     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8231     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8232     glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program);
   8233     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8234     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8235 
   8236     void *pointerArgs[] = {
   8237     };
   8238 
   8239     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8240                               threadStartTime, threadEndTime,
   8241                               &glmsg, pointerArgs);
   8242     glContext->traceGLMessage(&glmsg);
   8243 }
   8244 
   8245 void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) {
   8246     GLMessage glmsg;
   8247     GLTraceContext *glContext = getGLTraceContext();
   8248 
   8249     glmsg.set_function(GLMessage::glActiveShaderProgramEXT);
   8250 
   8251     // copy argument pipeline
   8252     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   8253     arg_pipeline->set_isarray(false);
   8254     arg_pipeline->set_type(GLMessage::DataType::INT);
   8255     arg_pipeline->add_intvalue(pipeline);
   8256 
   8257     // copy argument program
   8258     GLMessage_DataType *arg_program = glmsg.add_args();
   8259     arg_program->set_isarray(false);
   8260     arg_program->set_type(GLMessage::DataType::INT);
   8261     arg_program->add_intvalue(program);
   8262 
   8263     // call function
   8264     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8265     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8266     glContext->hooks->gl.glActiveShaderProgramEXT(pipeline, program);
   8267     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8268     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8269 
   8270     void *pointerArgs[] = {
   8271     };
   8272 
   8273     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8274                               threadStartTime, threadEndTime,
   8275                               &glmsg, pointerArgs);
   8276     glContext->traceGLMessage(&glmsg);
   8277 }
   8278 
   8279 GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) {
   8280     GLMessage glmsg;
   8281     GLTraceContext *glContext = getGLTraceContext();
   8282 
   8283     glmsg.set_function(GLMessage::glCreateShaderProgramvEXT);
   8284 
   8285     // copy argument type
   8286     GLMessage_DataType *arg_type = glmsg.add_args();
   8287     arg_type->set_isarray(false);
   8288     arg_type->set_type(GLMessage::DataType::ENUM);
   8289     arg_type->add_intvalue((int)type);
   8290 
   8291     // copy argument count
   8292     GLMessage_DataType *arg_count = glmsg.add_args();
   8293     arg_count->set_isarray(false);
   8294     arg_count->set_type(GLMessage::DataType::INT);
   8295     arg_count->add_intvalue(count);
   8296 
   8297     // copy argument strings
   8298     GLMessage_DataType *arg_strings = glmsg.add_args();
   8299     arg_strings->set_isarray(false);
   8300     arg_strings->set_type(GLMessage::DataType::INT);
   8301     arg_strings->add_intvalue((int)strings);
   8302 
   8303     // call function
   8304     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8305     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8306     GLuint retValue = glContext->hooks->gl.glCreateShaderProgramvEXT(type, count, strings);
   8307     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8308     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8309 
   8310     // set return value
   8311     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   8312     rt->set_isarray(false);
   8313     rt->set_type(GLMessage::DataType::INT);
   8314     rt->add_intvalue(retValue);
   8315 
   8316     void *pointerArgs[] = {
   8317         (void *) strings,
   8318     };
   8319 
   8320     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8321                               threadStartTime, threadEndTime,
   8322                               &glmsg, pointerArgs);
   8323     glContext->traceGLMessage(&glmsg);
   8324 
   8325     return retValue;
   8326 }
   8327 
   8328 void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
   8329     GLMessage glmsg;
   8330     GLTraceContext *glContext = getGLTraceContext();
   8331 
   8332     glmsg.set_function(GLMessage::glBindProgramPipelineEXT);
   8333 
   8334     // copy argument pipeline
   8335     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   8336     arg_pipeline->set_isarray(false);
   8337     arg_pipeline->set_type(GLMessage::DataType::INT);
   8338     arg_pipeline->add_intvalue(pipeline);
   8339 
   8340     // call function
   8341     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8342     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8343     glContext->hooks->gl.glBindProgramPipelineEXT(pipeline);
   8344     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8345     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8346 
   8347     void *pointerArgs[] = {
   8348     };
   8349 
   8350     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8351                               threadStartTime, threadEndTime,
   8352                               &glmsg, pointerArgs);
   8353     glContext->traceGLMessage(&glmsg);
   8354 }
   8355 
   8356 void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) {
   8357     GLMessage glmsg;
   8358     GLTraceContext *glContext = getGLTraceContext();
   8359 
   8360     glmsg.set_function(GLMessage::glDeleteProgramPipelinesEXT);
   8361 
   8362     // copy argument n
   8363     GLMessage_DataType *arg_n = glmsg.add_args();
   8364     arg_n->set_isarray(false);
   8365     arg_n->set_type(GLMessage::DataType::INT);
   8366     arg_n->add_intvalue(n);
   8367 
   8368     // copy argument pipelines
   8369     GLMessage_DataType *arg_pipelines = glmsg.add_args();
   8370     arg_pipelines->set_isarray(false);
   8371     arg_pipelines->set_type(GLMessage::DataType::INT);
   8372     arg_pipelines->add_intvalue((int)pipelines);
   8373 
   8374     // call function
   8375     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8376     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8377     glContext->hooks->gl.glDeleteProgramPipelinesEXT(n, pipelines);
   8378     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8379     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8380 
   8381     void *pointerArgs[] = {
   8382         (void *) pipelines,
   8383     };
   8384 
   8385     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8386                               threadStartTime, threadEndTime,
   8387                               &glmsg, pointerArgs);
   8388     glContext->traceGLMessage(&glmsg);
   8389 }
   8390 
   8391 void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) {
   8392     GLMessage glmsg;
   8393     GLTraceContext *glContext = getGLTraceContext();
   8394 
   8395     glmsg.set_function(GLMessage::glGenProgramPipelinesEXT);
   8396 
   8397     // copy argument n
   8398     GLMessage_DataType *arg_n = glmsg.add_args();
   8399     arg_n->set_isarray(false);
   8400     arg_n->set_type(GLMessage::DataType::INT);
   8401     arg_n->add_intvalue(n);
   8402 
   8403     // copy argument pipelines
   8404     GLMessage_DataType *arg_pipelines = glmsg.add_args();
   8405     arg_pipelines->set_isarray(false);
   8406     arg_pipelines->set_type(GLMessage::DataType::INT);
   8407     arg_pipelines->add_intvalue((int)pipelines);
   8408 
   8409     // call function
   8410     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8411     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8412     glContext->hooks->gl.glGenProgramPipelinesEXT(n, pipelines);
   8413     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8414     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8415 
   8416     void *pointerArgs[] = {
   8417         (void *) pipelines,
   8418     };
   8419 
   8420     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8421                               threadStartTime, threadEndTime,
   8422                               &glmsg, pointerArgs);
   8423     glContext->traceGLMessage(&glmsg);
   8424 }
   8425 
   8426 GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) {
   8427     GLMessage glmsg;
   8428     GLTraceContext *glContext = getGLTraceContext();
   8429 
   8430     glmsg.set_function(GLMessage::glIsProgramPipelineEXT);
   8431 
   8432     // copy argument pipeline
   8433     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   8434     arg_pipeline->set_isarray(false);
   8435     arg_pipeline->set_type(GLMessage::DataType::INT);
   8436     arg_pipeline->add_intvalue(pipeline);
   8437 
   8438     // call function
   8439     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8440     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8441     GLboolean retValue = glContext->hooks->gl.glIsProgramPipelineEXT(pipeline);
   8442     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8443     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8444 
   8445     // set return value
   8446     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   8447     rt->set_isarray(false);
   8448     rt->set_type(GLMessage::DataType::BOOL);
   8449     rt->add_boolvalue(retValue);
   8450 
   8451     void *pointerArgs[] = {
   8452     };
   8453 
   8454     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8455                               threadStartTime, threadEndTime,
   8456                               &glmsg, pointerArgs);
   8457     glContext->traceGLMessage(&glmsg);
   8458 
   8459     return retValue;
   8460 }
   8461 
   8462 void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) {
   8463     GLMessage glmsg;
   8464     GLTraceContext *glContext = getGLTraceContext();
   8465 
   8466     glmsg.set_function(GLMessage::glProgramParameteriEXT);
   8467 
   8468     // copy argument program
   8469     GLMessage_DataType *arg_program = glmsg.add_args();
   8470     arg_program->set_isarray(false);
   8471     arg_program->set_type(GLMessage::DataType::INT);
   8472     arg_program->add_intvalue(program);
   8473 
   8474     // copy argument pname
   8475     GLMessage_DataType *arg_pname = glmsg.add_args();
   8476     arg_pname->set_isarray(false);
   8477     arg_pname->set_type(GLMessage::DataType::ENUM);
   8478     arg_pname->add_intvalue((int)pname);
   8479 
   8480     // copy argument value
   8481     GLMessage_DataType *arg_value = glmsg.add_args();
   8482     arg_value->set_isarray(false);
   8483     arg_value->set_type(GLMessage::DataType::INT);
   8484     arg_value->add_intvalue(value);
   8485 
   8486     // call function
   8487     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8488     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8489     glContext->hooks->gl.glProgramParameteriEXT(program, pname, value);
   8490     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8491     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8492 
   8493     void *pointerArgs[] = {
   8494     };
   8495 
   8496     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8497                               threadStartTime, threadEndTime,
   8498                               &glmsg, pointerArgs);
   8499     glContext->traceGLMessage(&glmsg);
   8500 }
   8501 
   8502 void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) {
   8503     GLMessage glmsg;
   8504     GLTraceContext *glContext = getGLTraceContext();
   8505 
   8506     glmsg.set_function(GLMessage::glGetProgramPipelineivEXT);
   8507 
   8508     // copy argument pipeline
   8509     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   8510     arg_pipeline->set_isarray(false);
   8511     arg_pipeline->set_type(GLMessage::DataType::INT);
   8512     arg_pipeline->add_intvalue(pipeline);
   8513 
   8514     // copy argument pname
   8515     GLMessage_DataType *arg_pname = glmsg.add_args();
   8516     arg_pname->set_isarray(false);
   8517     arg_pname->set_type(GLMessage::DataType::ENUM);
   8518     arg_pname->add_intvalue((int)pname);
   8519 
   8520     // copy argument params
   8521     GLMessage_DataType *arg_params = glmsg.add_args();
   8522     arg_params->set_isarray(false);
   8523     arg_params->set_type(GLMessage::DataType::INT);
   8524     arg_params->add_intvalue((int)params);
   8525 
   8526     // call function
   8527     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8528     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8529     glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params);
   8530     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8531     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8532 
   8533     void *pointerArgs[] = {
   8534         (void *) params,
   8535     };
   8536 
   8537     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8538                               threadStartTime, threadEndTime,
   8539                               &glmsg, pointerArgs);
   8540     glContext->traceGLMessage(&glmsg);
   8541 }
   8542 
   8543 void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) {
   8544     GLMessage glmsg;
   8545     GLTraceContext *glContext = getGLTraceContext();
   8546 
   8547     glmsg.set_function(GLMessage::glProgramUniform1iEXT);
   8548 
   8549     // copy argument program
   8550     GLMessage_DataType *arg_program = glmsg.add_args();
   8551     arg_program->set_isarray(false);
   8552     arg_program->set_type(GLMessage::DataType::INT);
   8553     arg_program->add_intvalue(program);
   8554 
   8555     // copy argument location
   8556     GLMessage_DataType *arg_location = glmsg.add_args();
   8557     arg_location->set_isarray(false);
   8558     arg_location->set_type(GLMessage::DataType::INT);
   8559     arg_location->add_intvalue(location);
   8560 
   8561     // copy argument x
   8562     GLMessage_DataType *arg_x = glmsg.add_args();
   8563     arg_x->set_isarray(false);
   8564     arg_x->set_type(GLMessage::DataType::INT);
   8565     arg_x->add_intvalue(x);
   8566 
   8567     // call function
   8568     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8569     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8570     glContext->hooks->gl.glProgramUniform1iEXT(program, location, x);
   8571     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8572     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8573 
   8574     void *pointerArgs[] = {
   8575     };
   8576 
   8577     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8578                               threadStartTime, threadEndTime,
   8579                               &glmsg, pointerArgs);
   8580     glContext->traceGLMessage(&glmsg);
   8581 }
   8582 
   8583 void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) {
   8584     GLMessage glmsg;
   8585     GLTraceContext *glContext = getGLTraceContext();
   8586 
   8587     glmsg.set_function(GLMessage::glProgramUniform2iEXT);
   8588 
   8589     // copy argument program
   8590     GLMessage_DataType *arg_program = glmsg.add_args();
   8591     arg_program->set_isarray(false);
   8592     arg_program->set_type(GLMessage::DataType::INT);
   8593     arg_program->add_intvalue(program);
   8594 
   8595     // copy argument location
   8596     GLMessage_DataType *arg_location = glmsg.add_args();
   8597     arg_location->set_isarray(false);
   8598     arg_location->set_type(GLMessage::DataType::INT);
   8599     arg_location->add_intvalue(location);
   8600 
   8601     // copy argument x
   8602     GLMessage_DataType *arg_x = glmsg.add_args();
   8603     arg_x->set_isarray(false);
   8604     arg_x->set_type(GLMessage::DataType::INT);
   8605     arg_x->add_intvalue(x);
   8606 
   8607     // copy argument y
   8608     GLMessage_DataType *arg_y = glmsg.add_args();
   8609     arg_y->set_isarray(false);
   8610     arg_y->set_type(GLMessage::DataType::INT);
   8611     arg_y->add_intvalue(y);
   8612 
   8613     // call function
   8614     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8615     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8616     glContext->hooks->gl.glProgramUniform2iEXT(program, location, x, y);
   8617     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8618     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8619 
   8620     void *pointerArgs[] = {
   8621     };
   8622 
   8623     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8624                               threadStartTime, threadEndTime,
   8625                               &glmsg, pointerArgs);
   8626     glContext->traceGLMessage(&glmsg);
   8627 }
   8628 
   8629 void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) {
   8630     GLMessage glmsg;
   8631     GLTraceContext *glContext = getGLTraceContext();
   8632 
   8633     glmsg.set_function(GLMessage::glProgramUniform3iEXT);
   8634 
   8635     // copy argument program
   8636     GLMessage_DataType *arg_program = glmsg.add_args();
   8637     arg_program->set_isarray(false);
   8638     arg_program->set_type(GLMessage::DataType::INT);
   8639     arg_program->add_intvalue(program);
   8640 
   8641     // copy argument location
   8642     GLMessage_DataType *arg_location = glmsg.add_args();
   8643     arg_location->set_isarray(false);
   8644     arg_location->set_type(GLMessage::DataType::INT);
   8645     arg_location->add_intvalue(location);
   8646 
   8647     // copy argument x
   8648     GLMessage_DataType *arg_x = glmsg.add_args();
   8649     arg_x->set_isarray(false);
   8650     arg_x->set_type(GLMessage::DataType::INT);
   8651     arg_x->add_intvalue(x);
   8652 
   8653     // copy argument y
   8654     GLMessage_DataType *arg_y = glmsg.add_args();
   8655     arg_y->set_isarray(false);
   8656     arg_y->set_type(GLMessage::DataType::INT);
   8657     arg_y->add_intvalue(y);
   8658 
   8659     // copy argument z
   8660     GLMessage_DataType *arg_z = glmsg.add_args();
   8661     arg_z->set_isarray(false);
   8662     arg_z->set_type(GLMessage::DataType::INT);
   8663     arg_z->add_intvalue(z);
   8664 
   8665     // call function
   8666     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8667     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8668     glContext->hooks->gl.glProgramUniform3iEXT(program, location, x, y, z);
   8669     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8670     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8671 
   8672     void *pointerArgs[] = {
   8673     };
   8674 
   8675     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8676                               threadStartTime, threadEndTime,
   8677                               &glmsg, pointerArgs);
   8678     glContext->traceGLMessage(&glmsg);
   8679 }
   8680 
   8681 void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
   8682     GLMessage glmsg;
   8683     GLTraceContext *glContext = getGLTraceContext();
   8684 
   8685     glmsg.set_function(GLMessage::glProgramUniform4iEXT);
   8686 
   8687     // copy argument program
   8688     GLMessage_DataType *arg_program = glmsg.add_args();
   8689     arg_program->set_isarray(false);
   8690     arg_program->set_type(GLMessage::DataType::INT);
   8691     arg_program->add_intvalue(program);
   8692 
   8693     // copy argument location
   8694     GLMessage_DataType *arg_location = glmsg.add_args();
   8695     arg_location->set_isarray(false);
   8696     arg_location->set_type(GLMessage::DataType::INT);
   8697     arg_location->add_intvalue(location);
   8698 
   8699     // copy argument x
   8700     GLMessage_DataType *arg_x = glmsg.add_args();
   8701     arg_x->set_isarray(false);
   8702     arg_x->set_type(GLMessage::DataType::INT);
   8703     arg_x->add_intvalue(x);
   8704 
   8705     // copy argument y
   8706     GLMessage_DataType *arg_y = glmsg.add_args();
   8707     arg_y->set_isarray(false);
   8708     arg_y->set_type(GLMessage::DataType::INT);
   8709     arg_y->add_intvalue(y);
   8710 
   8711     // copy argument z
   8712     GLMessage_DataType *arg_z = glmsg.add_args();
   8713     arg_z->set_isarray(false);
   8714     arg_z->set_type(GLMessage::DataType::INT);
   8715     arg_z->add_intvalue(z);
   8716 
   8717     // copy argument w
   8718     GLMessage_DataType *arg_w = glmsg.add_args();
   8719     arg_w->set_isarray(false);
   8720     arg_w->set_type(GLMessage::DataType::INT);
   8721     arg_w->add_intvalue(w);
   8722 
   8723     // call function
   8724     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8725     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8726     glContext->hooks->gl.glProgramUniform4iEXT(program, location, x, y, z, w);
   8727     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8728     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8729 
   8730     void *pointerArgs[] = {
   8731     };
   8732 
   8733     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8734                               threadStartTime, threadEndTime,
   8735                               &glmsg, pointerArgs);
   8736     glContext->traceGLMessage(&glmsg);
   8737 }
   8738 
   8739 void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) {
   8740     GLMessage glmsg;
   8741     GLTraceContext *glContext = getGLTraceContext();
   8742 
   8743     glmsg.set_function(GLMessage::glProgramUniform1fEXT);
   8744 
   8745     // copy argument program
   8746     GLMessage_DataType *arg_program = glmsg.add_args();
   8747     arg_program->set_isarray(false);
   8748     arg_program->set_type(GLMessage::DataType::INT);
   8749     arg_program->add_intvalue(program);
   8750 
   8751     // copy argument location
   8752     GLMessage_DataType *arg_location = glmsg.add_args();
   8753     arg_location->set_isarray(false);
   8754     arg_location->set_type(GLMessage::DataType::INT);
   8755     arg_location->add_intvalue(location);
   8756 
   8757     // copy argument x
   8758     GLMessage_DataType *arg_x = glmsg.add_args();
   8759     arg_x->set_isarray(false);
   8760     arg_x->set_type(GLMessage::DataType::FLOAT);
   8761     arg_x->add_floatvalue(x);
   8762 
   8763     // call function
   8764     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8765     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8766     glContext->hooks->gl.glProgramUniform1fEXT(program, location, x);
   8767     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8768     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8769 
   8770     void *pointerArgs[] = {
   8771     };
   8772 
   8773     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8774                               threadStartTime, threadEndTime,
   8775                               &glmsg, pointerArgs);
   8776     glContext->traceGLMessage(&glmsg);
   8777 }
   8778 
   8779 void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) {
   8780     GLMessage glmsg;
   8781     GLTraceContext *glContext = getGLTraceContext();
   8782 
   8783     glmsg.set_function(GLMessage::glProgramUniform2fEXT);
   8784 
   8785     // copy argument program
   8786     GLMessage_DataType *arg_program = glmsg.add_args();
   8787     arg_program->set_isarray(false);
   8788     arg_program->set_type(GLMessage::DataType::INT);
   8789     arg_program->add_intvalue(program);
   8790 
   8791     // copy argument location
   8792     GLMessage_DataType *arg_location = glmsg.add_args();
   8793     arg_location->set_isarray(false);
   8794     arg_location->set_type(GLMessage::DataType::INT);
   8795     arg_location->add_intvalue(location);
   8796 
   8797     // copy argument x
   8798     GLMessage_DataType *arg_x = glmsg.add_args();
   8799     arg_x->set_isarray(false);
   8800     arg_x->set_type(GLMessage::DataType::FLOAT);
   8801     arg_x->add_floatvalue(x);
   8802 
   8803     // copy argument y
   8804     GLMessage_DataType *arg_y = glmsg.add_args();
   8805     arg_y->set_isarray(false);
   8806     arg_y->set_type(GLMessage::DataType::FLOAT);
   8807     arg_y->add_floatvalue(y);
   8808 
   8809     // call function
   8810     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8811     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8812     glContext->hooks->gl.glProgramUniform2fEXT(program, location, x, y);
   8813     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8814     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8815 
   8816     void *pointerArgs[] = {
   8817     };
   8818 
   8819     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8820                               threadStartTime, threadEndTime,
   8821                               &glmsg, pointerArgs);
   8822     glContext->traceGLMessage(&glmsg);
   8823 }
   8824 
   8825 void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
   8826     GLMessage glmsg;
   8827     GLTraceContext *glContext = getGLTraceContext();
   8828 
   8829     glmsg.set_function(GLMessage::glProgramUniform3fEXT);
   8830 
   8831     // copy argument program
   8832     GLMessage_DataType *arg_program = glmsg.add_args();
   8833     arg_program->set_isarray(false);
   8834     arg_program->set_type(GLMessage::DataType::INT);
   8835     arg_program->add_intvalue(program);
   8836 
   8837     // copy argument location
   8838     GLMessage_DataType *arg_location = glmsg.add_args();
   8839     arg_location->set_isarray(false);
   8840     arg_location->set_type(GLMessage::DataType::INT);
   8841     arg_location->add_intvalue(location);
   8842 
   8843     // copy argument x
   8844     GLMessage_DataType *arg_x = glmsg.add_args();
   8845     arg_x->set_isarray(false);
   8846     arg_x->set_type(GLMessage::DataType::FLOAT);
   8847     arg_x->add_floatvalue(x);
   8848 
   8849     // copy argument y
   8850     GLMessage_DataType *arg_y = glmsg.add_args();
   8851     arg_y->set_isarray(false);
   8852     arg_y->set_type(GLMessage::DataType::FLOAT);
   8853     arg_y->add_floatvalue(y);
   8854 
   8855     // copy argument z
   8856     GLMessage_DataType *arg_z = glmsg.add_args();
   8857     arg_z->set_isarray(false);
   8858     arg_z->set_type(GLMessage::DataType::FLOAT);
   8859     arg_z->add_floatvalue(z);
   8860 
   8861     // call function
   8862     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8863     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8864     glContext->hooks->gl.glProgramUniform3fEXT(program, location, x, y, z);
   8865     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8866     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8867 
   8868     void *pointerArgs[] = {
   8869     };
   8870 
   8871     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8872                               threadStartTime, threadEndTime,
   8873                               &glmsg, pointerArgs);
   8874     glContext->traceGLMessage(&glmsg);
   8875 }
   8876 
   8877 void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
   8878     GLMessage glmsg;
   8879     GLTraceContext *glContext = getGLTraceContext();
   8880 
   8881     glmsg.set_function(GLMessage::glProgramUniform4fEXT);
   8882 
   8883     // copy argument program
   8884     GLMessage_DataType *arg_program = glmsg.add_args();
   8885     arg_program->set_isarray(false);
   8886     arg_program->set_type(GLMessage::DataType::INT);
   8887     arg_program->add_intvalue(program);
   8888 
   8889     // copy argument location
   8890     GLMessage_DataType *arg_location = glmsg.add_args();
   8891     arg_location->set_isarray(false);
   8892     arg_location->set_type(GLMessage::DataType::INT);
   8893     arg_location->add_intvalue(location);
   8894 
   8895     // copy argument x
   8896     GLMessage_DataType *arg_x = glmsg.add_args();
   8897     arg_x->set_isarray(false);
   8898     arg_x->set_type(GLMessage::DataType::FLOAT);
   8899     arg_x->add_floatvalue(x);
   8900 
   8901     // copy argument y
   8902     GLMessage_DataType *arg_y = glmsg.add_args();
   8903     arg_y->set_isarray(false);
   8904     arg_y->set_type(GLMessage::DataType::FLOAT);
   8905     arg_y->add_floatvalue(y);
   8906 
   8907     // copy argument z
   8908     GLMessage_DataType *arg_z = glmsg.add_args();
   8909     arg_z->set_isarray(false);
   8910     arg_z->set_type(GLMessage::DataType::FLOAT);
   8911     arg_z->add_floatvalue(z);
   8912 
   8913     // copy argument w
   8914     GLMessage_DataType *arg_w = glmsg.add_args();
   8915     arg_w->set_isarray(false);
   8916     arg_w->set_type(GLMessage::DataType::FLOAT);
   8917     arg_w->add_floatvalue(w);
   8918 
   8919     // call function
   8920     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8921     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8922     glContext->hooks->gl.glProgramUniform4fEXT(program, location, x, y, z, w);
   8923     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8924     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8925 
   8926     void *pointerArgs[] = {
   8927     };
   8928 
   8929     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8930                               threadStartTime, threadEndTime,
   8931                               &glmsg, pointerArgs);
   8932     glContext->traceGLMessage(&glmsg);
   8933 }
   8934 
   8935 void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   8936     GLMessage glmsg;
   8937     GLTraceContext *glContext = getGLTraceContext();
   8938 
   8939     glmsg.set_function(GLMessage::glProgramUniform1ivEXT);
   8940 
   8941     // copy argument program
   8942     GLMessage_DataType *arg_program = glmsg.add_args();
   8943     arg_program->set_isarray(false);
   8944     arg_program->set_type(GLMessage::DataType::INT);
   8945     arg_program->add_intvalue(program);
   8946 
   8947     // copy argument location
   8948     GLMessage_DataType *arg_location = glmsg.add_args();
   8949     arg_location->set_isarray(false);
   8950     arg_location->set_type(GLMessage::DataType::INT);
   8951     arg_location->add_intvalue(location);
   8952 
   8953     // copy argument count
   8954     GLMessage_DataType *arg_count = glmsg.add_args();
   8955     arg_count->set_isarray(false);
   8956     arg_count->set_type(GLMessage::DataType::INT);
   8957     arg_count->add_intvalue(count);
   8958 
   8959     // copy argument value
   8960     GLMessage_DataType *arg_value = glmsg.add_args();
   8961     arg_value->set_isarray(false);
   8962     arg_value->set_type(GLMessage::DataType::INT);
   8963     arg_value->add_intvalue((int)value);
   8964 
   8965     // call function
   8966     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8967     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8968     glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value);
   8969     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8970     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8971 
   8972     void *pointerArgs[] = {
   8973         (void *) value,
   8974     };
   8975 
   8976     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8977                               threadStartTime, threadEndTime,
   8978                               &glmsg, pointerArgs);
   8979     glContext->traceGLMessage(&glmsg);
   8980 }
   8981 
   8982 void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   8983     GLMessage glmsg;
   8984     GLTraceContext *glContext = getGLTraceContext();
   8985 
   8986     glmsg.set_function(GLMessage::glProgramUniform2ivEXT);
   8987 
   8988     // copy argument program
   8989     GLMessage_DataType *arg_program = glmsg.add_args();
   8990     arg_program->set_isarray(false);
   8991     arg_program->set_type(GLMessage::DataType::INT);
   8992     arg_program->add_intvalue(program);
   8993 
   8994     // copy argument location
   8995     GLMessage_DataType *arg_location = glmsg.add_args();
   8996     arg_location->set_isarray(false);
   8997     arg_location->set_type(GLMessage::DataType::INT);
   8998     arg_location->add_intvalue(location);
   8999 
   9000     // copy argument count
   9001     GLMessage_DataType *arg_count = glmsg.add_args();
   9002     arg_count->set_isarray(false);
   9003     arg_count->set_type(GLMessage::DataType::INT);
   9004     arg_count->add_intvalue(count);
   9005 
   9006     // copy argument value
   9007     GLMessage_DataType *arg_value = glmsg.add_args();
   9008     arg_value->set_isarray(false);
   9009     arg_value->set_type(GLMessage::DataType::INT);
   9010     arg_value->add_intvalue((int)value);
   9011 
   9012     // call function
   9013     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9014     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9015     glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value);
   9016     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9017     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9018 
   9019     void *pointerArgs[] = {
   9020         (void *) value,
   9021     };
   9022 
   9023     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9024                               threadStartTime, threadEndTime,
   9025                               &glmsg, pointerArgs);
   9026     glContext->traceGLMessage(&glmsg);
   9027 }
   9028 
   9029 void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   9030     GLMessage glmsg;
   9031     GLTraceContext *glContext = getGLTraceContext();
   9032 
   9033     glmsg.set_function(GLMessage::glProgramUniform3ivEXT);
   9034 
   9035     // copy argument program
   9036     GLMessage_DataType *arg_program = glmsg.add_args();
   9037     arg_program->set_isarray(false);
   9038     arg_program->set_type(GLMessage::DataType::INT);
   9039     arg_program->add_intvalue(program);
   9040 
   9041     // copy argument location
   9042     GLMessage_DataType *arg_location = glmsg.add_args();
   9043     arg_location->set_isarray(false);
   9044     arg_location->set_type(GLMessage::DataType::INT);
   9045     arg_location->add_intvalue(location);
   9046 
   9047     // copy argument count
   9048     GLMessage_DataType *arg_count = glmsg.add_args();
   9049     arg_count->set_isarray(false);
   9050     arg_count->set_type(GLMessage::DataType::INT);
   9051     arg_count->add_intvalue(count);
   9052 
   9053     // copy argument value
   9054     GLMessage_DataType *arg_value = glmsg.add_args();
   9055     arg_value->set_isarray(false);
   9056     arg_value->set_type(GLMessage::DataType::INT);
   9057     arg_value->add_intvalue((int)value);
   9058 
   9059     // call function
   9060     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9061     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9062     glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value);
   9063     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9064     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9065 
   9066     void *pointerArgs[] = {
   9067         (void *) value,
   9068     };
   9069 
   9070     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9071                               threadStartTime, threadEndTime,
   9072                               &glmsg, pointerArgs);
   9073     glContext->traceGLMessage(&glmsg);
   9074 }
   9075 
   9076 void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   9077     GLMessage glmsg;
   9078     GLTraceContext *glContext = getGLTraceContext();
   9079 
   9080     glmsg.set_function(GLMessage::glProgramUniform4ivEXT);
   9081 
   9082     // copy argument program
   9083     GLMessage_DataType *arg_program = glmsg.add_args();
   9084     arg_program->set_isarray(false);
   9085     arg_program->set_type(GLMessage::DataType::INT);
   9086     arg_program->add_intvalue(program);
   9087 
   9088     // copy argument location
   9089     GLMessage_DataType *arg_location = glmsg.add_args();
   9090     arg_location->set_isarray(false);
   9091     arg_location->set_type(GLMessage::DataType::INT);
   9092     arg_location->add_intvalue(location);
   9093 
   9094     // copy argument count
   9095     GLMessage_DataType *arg_count = glmsg.add_args();
   9096     arg_count->set_isarray(false);
   9097     arg_count->set_type(GLMessage::DataType::INT);
   9098     arg_count->add_intvalue(count);
   9099 
   9100     // copy argument value
   9101     GLMessage_DataType *arg_value = glmsg.add_args();
   9102     arg_value->set_isarray(false);
   9103     arg_value->set_type(GLMessage::DataType::INT);
   9104     arg_value->add_intvalue((int)value);
   9105 
   9106     // call function
   9107     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9108     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9109     glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value);
   9110     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9111     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9112 
   9113     void *pointerArgs[] = {
   9114         (void *) value,
   9115     };
   9116 
   9117     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9118                               threadStartTime, threadEndTime,
   9119                               &glmsg, pointerArgs);
   9120     glContext->traceGLMessage(&glmsg);
   9121 }
   9122 
   9123 void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   9124     GLMessage glmsg;
   9125     GLTraceContext *glContext = getGLTraceContext();
   9126 
   9127     glmsg.set_function(GLMessage::glProgramUniform1fvEXT);
   9128 
   9129     // copy argument program
   9130     GLMessage_DataType *arg_program = glmsg.add_args();
   9131     arg_program->set_isarray(false);
   9132     arg_program->set_type(GLMessage::DataType::INT);
   9133     arg_program->add_intvalue(program);
   9134 
   9135     // copy argument location
   9136     GLMessage_DataType *arg_location = glmsg.add_args();
   9137     arg_location->set_isarray(false);
   9138     arg_location->set_type(GLMessage::DataType::INT);
   9139     arg_location->add_intvalue(location);
   9140 
   9141     // copy argument count
   9142     GLMessage_DataType *arg_count = glmsg.add_args();
   9143     arg_count->set_isarray(false);
   9144     arg_count->set_type(GLMessage::DataType::INT);
   9145     arg_count->add_intvalue(count);
   9146 
   9147     // copy argument value
   9148     GLMessage_DataType *arg_value = glmsg.add_args();
   9149     arg_value->set_isarray(false);
   9150     arg_value->set_type(GLMessage::DataType::INT);
   9151     arg_value->add_intvalue((int)value);
   9152 
   9153     // call function
   9154     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9155     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9156     glContext->hooks->gl.glProgramUniform1fvEXT(program, location, count, value);
   9157     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9158     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9159 
   9160     void *pointerArgs[] = {
   9161         (void *) value,
   9162     };
   9163 
   9164     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9165                               threadStartTime, threadEndTime,
   9166                               &glmsg, pointerArgs);
   9167     glContext->traceGLMessage(&glmsg);
   9168 }
   9169 
   9170 void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   9171     GLMessage glmsg;
   9172     GLTraceContext *glContext = getGLTraceContext();
   9173 
   9174     glmsg.set_function(GLMessage::glProgramUniform2fvEXT);
   9175 
   9176     // copy argument program
   9177     GLMessage_DataType *arg_program = glmsg.add_args();
   9178     arg_program->set_isarray(false);
   9179     arg_program->set_type(GLMessage::DataType::INT);
   9180     arg_program->add_intvalue(program);
   9181 
   9182     // copy argument location
   9183     GLMessage_DataType *arg_location = glmsg.add_args();
   9184     arg_location->set_isarray(false);
   9185     arg_location->set_type(GLMessage::DataType::INT);
   9186     arg_location->add_intvalue(location);
   9187 
   9188     // copy argument count
   9189     GLMessage_DataType *arg_count = glmsg.add_args();
   9190     arg_count->set_isarray(false);
   9191     arg_count->set_type(GLMessage::DataType::INT);
   9192     arg_count->add_intvalue(count);
   9193 
   9194     // copy argument value
   9195     GLMessage_DataType *arg_value = glmsg.add_args();
   9196     arg_value->set_isarray(false);
   9197     arg_value->set_type(GLMessage::DataType::INT);
   9198     arg_value->add_intvalue((int)value);
   9199 
   9200     // call function
   9201     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9202     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9203     glContext->hooks->gl.glProgramUniform2fvEXT(program, location, count, value);
   9204     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9205     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9206 
   9207     void *pointerArgs[] = {
   9208         (void *) value,
   9209     };
   9210 
   9211     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9212                               threadStartTime, threadEndTime,
   9213                               &glmsg, pointerArgs);
   9214     glContext->traceGLMessage(&glmsg);
   9215 }
   9216 
   9217 void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   9218     GLMessage glmsg;
   9219     GLTraceContext *glContext = getGLTraceContext();
   9220 
   9221     glmsg.set_function(GLMessage::glProgramUniform3fvEXT);
   9222 
   9223     // copy argument program
   9224     GLMessage_DataType *arg_program = glmsg.add_args();
   9225     arg_program->set_isarray(false);
   9226     arg_program->set_type(GLMessage::DataType::INT);
   9227     arg_program->add_intvalue(program);
   9228 
   9229     // copy argument location
   9230     GLMessage_DataType *arg_location = glmsg.add_args();
   9231     arg_location->set_isarray(false);
   9232     arg_location->set_type(GLMessage::DataType::INT);
   9233     arg_location->add_intvalue(location);
   9234 
   9235     // copy argument count
   9236     GLMessage_DataType *arg_count = glmsg.add_args();
   9237     arg_count->set_isarray(false);
   9238     arg_count->set_type(GLMessage::DataType::INT);
   9239     arg_count->add_intvalue(count);
   9240 
   9241     // copy argument value
   9242     GLMessage_DataType *arg_value = glmsg.add_args();
   9243     arg_value->set_isarray(false);
   9244     arg_value->set_type(GLMessage::DataType::INT);
   9245     arg_value->add_intvalue((int)value);
   9246 
   9247     // call function
   9248     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9249     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9250     glContext->hooks->gl.glProgramUniform3fvEXT(program, location, count, value);
   9251     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9252     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9253 
   9254     void *pointerArgs[] = {
   9255         (void *) value,
   9256     };
   9257 
   9258     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9259                               threadStartTime, threadEndTime,
   9260                               &glmsg, pointerArgs);
   9261     glContext->traceGLMessage(&glmsg);
   9262 }
   9263 
   9264 void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   9265     GLMessage glmsg;
   9266     GLTraceContext *glContext = getGLTraceContext();
   9267 
   9268     glmsg.set_function(GLMessage::glProgramUniform4fvEXT);
   9269 
   9270     // copy argument program
   9271     GLMessage_DataType *arg_program = glmsg.add_args();
   9272     arg_program->set_isarray(false);
   9273     arg_program->set_type(GLMessage::DataType::INT);
   9274     arg_program->add_intvalue(program);
   9275 
   9276     // copy argument location
   9277     GLMessage_DataType *arg_location = glmsg.add_args();
   9278     arg_location->set_isarray(false);
   9279     arg_location->set_type(GLMessage::DataType::INT);
   9280     arg_location->add_intvalue(location);
   9281 
   9282     // copy argument count
   9283     GLMessage_DataType *arg_count = glmsg.add_args();
   9284     arg_count->set_isarray(false);
   9285     arg_count->set_type(GLMessage::DataType::INT);
   9286     arg_count->add_intvalue(count);
   9287 
   9288     // copy argument value
   9289     GLMessage_DataType *arg_value = glmsg.add_args();
   9290     arg_value->set_isarray(false);
   9291     arg_value->set_type(GLMessage::DataType::INT);
   9292     arg_value->add_intvalue((int)value);
   9293 
   9294     // call function
   9295     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9296     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9297     glContext->hooks->gl.glProgramUniform4fvEXT(program, location, count, value);
   9298     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9299     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9300 
   9301     void *pointerArgs[] = {
   9302         (void *) value,
   9303     };
   9304 
   9305     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9306                               threadStartTime, threadEndTime,
   9307                               &glmsg, pointerArgs);
   9308     glContext->traceGLMessage(&glmsg);
   9309 }
   9310 
   9311 void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
   9312     GLMessage glmsg;
   9313     GLTraceContext *glContext = getGLTraceContext();
   9314 
   9315     glmsg.set_function(GLMessage::glProgramUniformMatrix2fvEXT);
   9316 
   9317     // copy argument program
   9318     GLMessage_DataType *arg_program = glmsg.add_args();
   9319     arg_program->set_isarray(false);
   9320     arg_program->set_type(GLMessage::DataType::INT);
   9321     arg_program->add_intvalue(program);
   9322 
   9323     // copy argument location
   9324     GLMessage_DataType *arg_location = glmsg.add_args();
   9325     arg_location->set_isarray(false);
   9326     arg_location->set_type(GLMessage::DataType::INT);
   9327     arg_location->add_intvalue(location);
   9328 
   9329     // copy argument count
   9330     GLMessage_DataType *arg_count = glmsg.add_args();
   9331     arg_count->set_isarray(false);
   9332     arg_count->set_type(GLMessage::DataType::INT);
   9333     arg_count->add_intvalue(count);
   9334 
   9335     // copy argument transpose
   9336     GLMessage_DataType *arg_transpose = glmsg.add_args();
   9337     arg_transpose->set_isarray(false);
   9338     arg_transpose->set_type(GLMessage::DataType::BOOL);
   9339     arg_transpose->add_boolvalue(transpose);
   9340 
   9341     // copy argument value
   9342     GLMessage_DataType *arg_value = glmsg.add_args();
   9343     arg_value->set_isarray(false);
   9344     arg_value->set_type(GLMessage::DataType::INT);
   9345     arg_value->add_intvalue((int)value);
   9346 
   9347     // call function
   9348     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9349     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9350     glContext->hooks->gl.glProgramUniformMatrix2fvEXT(program, location, count, transpose, value);
   9351     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9352     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9353 
   9354     void *pointerArgs[] = {
   9355         (void *) value,
   9356     };
   9357 
   9358     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9359                               threadStartTime, threadEndTime,
   9360                               &glmsg, pointerArgs);
   9361     glContext->traceGLMessage(&glmsg);
   9362 }
   9363 
   9364 void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
   9365     GLMessage glmsg;
   9366     GLTraceContext *glContext = getGLTraceContext();
   9367 
   9368     glmsg.set_function(GLMessage::glProgramUniformMatrix3fvEXT);
   9369 
   9370     // copy argument program
   9371     GLMessage_DataType *arg_program = glmsg.add_args();
   9372     arg_program->set_isarray(false);
   9373     arg_program->set_type(GLMessage::DataType::INT);
   9374     arg_program->add_intvalue(program);
   9375 
   9376     // copy argument location
   9377     GLMessage_DataType *arg_location = glmsg.add_args();
   9378     arg_location->set_isarray(false);
   9379     arg_location->set_type(GLMessage::DataType::INT);
   9380     arg_location->add_intvalue(location);
   9381 
   9382     // copy argument count
   9383     GLMessage_DataType *arg_count = glmsg.add_args();
   9384     arg_count->set_isarray(false);
   9385     arg_count->set_type(GLMessage::DataType::INT);
   9386     arg_count->add_intvalue(count);
   9387 
   9388     // copy argument transpose
   9389     GLMessage_DataType *arg_transpose = glmsg.add_args();
   9390     arg_transpose->set_isarray(false);
   9391     arg_transpose->set_type(GLMessage::DataType::BOOL);
   9392     arg_transpose->add_boolvalue(transpose);
   9393 
   9394     // copy argument value
   9395     GLMessage_DataType *arg_value = glmsg.add_args();
   9396     arg_value->set_isarray(false);
   9397     arg_value->set_type(GLMessage::DataType::INT);
   9398     arg_value->add_intvalue((int)value);
   9399 
   9400     // call function
   9401     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9402     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9403     glContext->hooks->gl.glProgramUniformMatrix3fvEXT(program, location, count, transpose, value);
   9404     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9405     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9406 
   9407     void *pointerArgs[] = {
   9408         (void *) value,
   9409     };
   9410 
   9411     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9412                               threadStartTime, threadEndTime,
   9413                               &glmsg, pointerArgs);
   9414     glContext->traceGLMessage(&glmsg);
   9415 }
   9416 
   9417 void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
   9418     GLMessage glmsg;
   9419     GLTraceContext *glContext = getGLTraceContext();
   9420 
   9421     glmsg.set_function(GLMessage::glProgramUniformMatrix4fvEXT);
   9422 
   9423     // copy argument program
   9424     GLMessage_DataType *arg_program = glmsg.add_args();
   9425     arg_program->set_isarray(false);
   9426     arg_program->set_type(GLMessage::DataType::INT);
   9427     arg_program->add_intvalue(program);
   9428 
   9429     // copy argument location
   9430     GLMessage_DataType *arg_location = glmsg.add_args();
   9431     arg_location->set_isarray(false);
   9432     arg_location->set_type(GLMessage::DataType::INT);
   9433     arg_location->add_intvalue(location);
   9434 
   9435     // copy argument count
   9436     GLMessage_DataType *arg_count = glmsg.add_args();
   9437     arg_count->set_isarray(false);
   9438     arg_count->set_type(GLMessage::DataType::INT);
   9439     arg_count->add_intvalue(count);
   9440 
   9441     // copy argument transpose
   9442     GLMessage_DataType *arg_transpose = glmsg.add_args();
   9443     arg_transpose->set_isarray(false);
   9444     arg_transpose->set_type(GLMessage::DataType::BOOL);
   9445     arg_transpose->add_boolvalue(transpose);
   9446 
   9447     // copy argument value
   9448     GLMessage_DataType *arg_value = glmsg.add_args();
   9449     arg_value->set_isarray(false);
   9450     arg_value->set_type(GLMessage::DataType::INT);
   9451     arg_value->add_intvalue((int)value);
   9452 
   9453     // call function
   9454     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9455     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9456     glContext->hooks->gl.glProgramUniformMatrix4fvEXT(program, location, count, transpose, value);
   9457     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9458     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9459 
   9460     void *pointerArgs[] = {
   9461         (void *) value,
   9462     };
   9463 
   9464     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9465                               threadStartTime, threadEndTime,
   9466                               &glmsg, pointerArgs);
   9467     glContext->traceGLMessage(&glmsg);
   9468 }
   9469 
   9470 void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) {
   9471     GLMessage glmsg;
   9472     GLTraceContext *glContext = getGLTraceContext();
   9473 
   9474     glmsg.set_function(GLMessage::glValidateProgramPipelineEXT);
   9475 
   9476     // copy argument pipeline
   9477     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   9478     arg_pipeline->set_isarray(false);
   9479     arg_pipeline->set_type(GLMessage::DataType::INT);
   9480     arg_pipeline->add_intvalue(pipeline);
   9481 
   9482     // call function
   9483     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9484     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9485     glContext->hooks->gl.glValidateProgramPipelineEXT(pipeline);
   9486     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9487     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9488 
   9489     void *pointerArgs[] = {
   9490     };
   9491 
   9492     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9493                               threadStartTime, threadEndTime,
   9494                               &glmsg, pointerArgs);
   9495     glContext->traceGLMessage(&glmsg);
   9496 }
   9497 
   9498 void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
   9499     GLMessage glmsg;
   9500     GLTraceContext *glContext = getGLTraceContext();
   9501 
   9502     glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT);
   9503 
   9504     // copy argument pipeline
   9505     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   9506     arg_pipeline->set_isarray(false);
   9507     arg_pipeline->set_type(GLMessage::DataType::INT);
   9508     arg_pipeline->add_intvalue(pipeline);
   9509 
   9510     // copy argument bufSize
   9511     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   9512     arg_bufSize->set_isarray(false);
   9513     arg_bufSize->set_type(GLMessage::DataType::INT);
   9514     arg_bufSize->add_intvalue(bufSize);
   9515 
   9516     // copy argument length
   9517     GLMessage_DataType *arg_length = glmsg.add_args();
   9518     arg_length->set_isarray(false);
   9519     arg_length->set_type(GLMessage::DataType::INT);
   9520     arg_length->add_intvalue((int)length);
   9521 
   9522     // copy argument infoLog
   9523     GLMessage_DataType *arg_infoLog = glmsg.add_args();
   9524     arg_infoLog->set_isarray(false);
   9525     arg_infoLog->set_type(GLMessage::DataType::INT);
   9526     arg_infoLog->add_intvalue((int)infoLog);
   9527 
   9528     // call function
   9529     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9530     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9531     glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog);
   9532     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9533     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9534 
   9535     void *pointerArgs[] = {
   9536         (void *) length,
   9537         (void *) infoLog,
   9538     };
   9539 
   9540     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9541                               threadStartTime, threadEndTime,
   9542                               &glmsg, pointerArgs);
   9543     glContext->traceGLMessage(&glmsg);
   9544 }
   9545 
   9546 void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
   9547     GLMessage glmsg;
   9548     GLTraceContext *glContext = getGLTraceContext();
   9549 
   9550     glmsg.set_function(GLMessage::glTexStorage1DEXT);
   9551 
   9552     // copy argument target
   9553     GLMessage_DataType *arg_target = glmsg.add_args();
   9554     arg_target->set_isarray(false);
   9555     arg_target->set_type(GLMessage::DataType::ENUM);
   9556     arg_target->add_intvalue((int)target);
   9557 
   9558     // copy argument levels
   9559     GLMessage_DataType *arg_levels = glmsg.add_args();
   9560     arg_levels->set_isarray(false);
   9561     arg_levels->set_type(GLMessage::DataType::INT);
   9562     arg_levels->add_intvalue(levels);
   9563 
   9564     // copy argument internalformat
   9565     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9566     arg_internalformat->set_isarray(false);
   9567     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9568     arg_internalformat->add_intvalue((int)internalformat);
   9569 
   9570     // copy argument width
   9571     GLMessage_DataType *arg_width = glmsg.add_args();
   9572     arg_width->set_isarray(false);
   9573     arg_width->set_type(GLMessage::DataType::INT);
   9574     arg_width->add_intvalue(width);
   9575 
   9576     // call function
   9577     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9578     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9579     glContext->hooks->gl.glTexStorage1DEXT(target, levels, internalformat, width);
   9580     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9581     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9582 
   9583     void *pointerArgs[] = {
   9584     };
   9585 
   9586     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9587                               threadStartTime, threadEndTime,
   9588                               &glmsg, pointerArgs);
   9589     glContext->traceGLMessage(&glmsg);
   9590 }
   9591 
   9592 void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
   9593     GLMessage glmsg;
   9594     GLTraceContext *glContext = getGLTraceContext();
   9595 
   9596     glmsg.set_function(GLMessage::glTexStorage2DEXT);
   9597 
   9598     // copy argument target
   9599     GLMessage_DataType *arg_target = glmsg.add_args();
   9600     arg_target->set_isarray(false);
   9601     arg_target->set_type(GLMessage::DataType::ENUM);
   9602     arg_target->add_intvalue((int)target);
   9603 
   9604     // copy argument levels
   9605     GLMessage_DataType *arg_levels = glmsg.add_args();
   9606     arg_levels->set_isarray(false);
   9607     arg_levels->set_type(GLMessage::DataType::INT);
   9608     arg_levels->add_intvalue(levels);
   9609 
   9610     // copy argument internalformat
   9611     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9612     arg_internalformat->set_isarray(false);
   9613     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9614     arg_internalformat->add_intvalue((int)internalformat);
   9615 
   9616     // copy argument width
   9617     GLMessage_DataType *arg_width = glmsg.add_args();
   9618     arg_width->set_isarray(false);
   9619     arg_width->set_type(GLMessage::DataType::INT);
   9620     arg_width->add_intvalue(width);
   9621 
   9622     // copy argument height
   9623     GLMessage_DataType *arg_height = glmsg.add_args();
   9624     arg_height->set_isarray(false);
   9625     arg_height->set_type(GLMessage::DataType::INT);
   9626     arg_height->add_intvalue(height);
   9627 
   9628     // call function
   9629     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9630     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9631     glContext->hooks->gl.glTexStorage2DEXT(target, levels, internalformat, width, height);
   9632     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9633     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9634 
   9635     void *pointerArgs[] = {
   9636     };
   9637 
   9638     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9639                               threadStartTime, threadEndTime,
   9640                               &glmsg, pointerArgs);
   9641     glContext->traceGLMessage(&glmsg);
   9642 }
   9643 
   9644 void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
   9645     GLMessage glmsg;
   9646     GLTraceContext *glContext = getGLTraceContext();
   9647 
   9648     glmsg.set_function(GLMessage::glTexStorage3DEXT);
   9649 
   9650     // copy argument target
   9651     GLMessage_DataType *arg_target = glmsg.add_args();
   9652     arg_target->set_isarray(false);
   9653     arg_target->set_type(GLMessage::DataType::ENUM);
   9654     arg_target->add_intvalue((int)target);
   9655 
   9656     // copy argument levels
   9657     GLMessage_DataType *arg_levels = glmsg.add_args();
   9658     arg_levels->set_isarray(false);
   9659     arg_levels->set_type(GLMessage::DataType::INT);
   9660     arg_levels->add_intvalue(levels);
   9661 
   9662     // copy argument internalformat
   9663     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9664     arg_internalformat->set_isarray(false);
   9665     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9666     arg_internalformat->add_intvalue((int)internalformat);
   9667 
   9668     // copy argument width
   9669     GLMessage_DataType *arg_width = glmsg.add_args();
   9670     arg_width->set_isarray(false);
   9671     arg_width->set_type(GLMessage::DataType::INT);
   9672     arg_width->add_intvalue(width);
   9673 
   9674     // copy argument height
   9675     GLMessage_DataType *arg_height = glmsg.add_args();
   9676     arg_height->set_isarray(false);
   9677     arg_height->set_type(GLMessage::DataType::INT);
   9678     arg_height->add_intvalue(height);
   9679 
   9680     // copy argument depth
   9681     GLMessage_DataType *arg_depth = glmsg.add_args();
   9682     arg_depth->set_isarray(false);
   9683     arg_depth->set_type(GLMessage::DataType::INT);
   9684     arg_depth->add_intvalue(depth);
   9685 
   9686     // call function
   9687     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9688     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9689     glContext->hooks->gl.glTexStorage3DEXT(target, levels, internalformat, width, height, depth);
   9690     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9691     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9692 
   9693     void *pointerArgs[] = {
   9694     };
   9695 
   9696     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9697                               threadStartTime, threadEndTime,
   9698                               &glmsg, pointerArgs);
   9699     glContext->traceGLMessage(&glmsg);
   9700 }
   9701 
   9702 void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
   9703     GLMessage glmsg;
   9704     GLTraceContext *glContext = getGLTraceContext();
   9705 
   9706     glmsg.set_function(GLMessage::glTextureStorage1DEXT);
   9707 
   9708     // copy argument texture
   9709     GLMessage_DataType *arg_texture = glmsg.add_args();
   9710     arg_texture->set_isarray(false);
   9711     arg_texture->set_type(GLMessage::DataType::INT);
   9712     arg_texture->add_intvalue(texture);
   9713 
   9714     // copy argument target
   9715     GLMessage_DataType *arg_target = glmsg.add_args();
   9716     arg_target->set_isarray(false);
   9717     arg_target->set_type(GLMessage::DataType::ENUM);
   9718     arg_target->add_intvalue((int)target);
   9719 
   9720     // copy argument levels
   9721     GLMessage_DataType *arg_levels = glmsg.add_args();
   9722     arg_levels->set_isarray(false);
   9723     arg_levels->set_type(GLMessage::DataType::INT);
   9724     arg_levels->add_intvalue(levels);
   9725 
   9726     // copy argument internalformat
   9727     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9728     arg_internalformat->set_isarray(false);
   9729     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9730     arg_internalformat->add_intvalue((int)internalformat);
   9731 
   9732     // copy argument width
   9733     GLMessage_DataType *arg_width = glmsg.add_args();
   9734     arg_width->set_isarray(false);
   9735     arg_width->set_type(GLMessage::DataType::INT);
   9736     arg_width->add_intvalue(width);
   9737 
   9738     // call function
   9739     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9740     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9741     glContext->hooks->gl.glTextureStorage1DEXT(texture, target, levels, internalformat, width);
   9742     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9743     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9744 
   9745     void *pointerArgs[] = {
   9746     };
   9747 
   9748     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9749                               threadStartTime, threadEndTime,
   9750                               &glmsg, pointerArgs);
   9751     glContext->traceGLMessage(&glmsg);
   9752 }
   9753 
   9754 void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
   9755     GLMessage glmsg;
   9756     GLTraceContext *glContext = getGLTraceContext();
   9757 
   9758     glmsg.set_function(GLMessage::glTextureStorage2DEXT);
   9759 
   9760     // copy argument texture
   9761     GLMessage_DataType *arg_texture = glmsg.add_args();
   9762     arg_texture->set_isarray(false);
   9763     arg_texture->set_type(GLMessage::DataType::INT);
   9764     arg_texture->add_intvalue(texture);
   9765 
   9766     // copy argument target
   9767     GLMessage_DataType *arg_target = glmsg.add_args();
   9768     arg_target->set_isarray(false);
   9769     arg_target->set_type(GLMessage::DataType::ENUM);
   9770     arg_target->add_intvalue((int)target);
   9771 
   9772     // copy argument levels
   9773     GLMessage_DataType *arg_levels = glmsg.add_args();
   9774     arg_levels->set_isarray(false);
   9775     arg_levels->set_type(GLMessage::DataType::INT);
   9776     arg_levels->add_intvalue(levels);
   9777 
   9778     // copy argument internalformat
   9779     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9780     arg_internalformat->set_isarray(false);
   9781     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9782     arg_internalformat->add_intvalue((int)internalformat);
   9783 
   9784     // copy argument width
   9785     GLMessage_DataType *arg_width = glmsg.add_args();
   9786     arg_width->set_isarray(false);
   9787     arg_width->set_type(GLMessage::DataType::INT);
   9788     arg_width->add_intvalue(width);
   9789 
   9790     // copy argument height
   9791     GLMessage_DataType *arg_height = glmsg.add_args();
   9792     arg_height->set_isarray(false);
   9793     arg_height->set_type(GLMessage::DataType::INT);
   9794     arg_height->add_intvalue(height);
   9795 
   9796     // call function
   9797     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9798     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9799     glContext->hooks->gl.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);
   9800     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9801     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9802 
   9803     void *pointerArgs[] = {
   9804     };
   9805 
   9806     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9807                               threadStartTime, threadEndTime,
   9808                               &glmsg, pointerArgs);
   9809     glContext->traceGLMessage(&glmsg);
   9810 }
   9811 
   9812 void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
   9813     GLMessage glmsg;
   9814     GLTraceContext *glContext = getGLTraceContext();
   9815 
   9816     glmsg.set_function(GLMessage::glTextureStorage3DEXT);
   9817 
   9818     // copy argument texture
   9819     GLMessage_DataType *arg_texture = glmsg.add_args();
   9820     arg_texture->set_isarray(false);
   9821     arg_texture->set_type(GLMessage::DataType::INT);
   9822     arg_texture->add_intvalue(texture);
   9823 
   9824     // copy argument target
   9825     GLMessage_DataType *arg_target = glmsg.add_args();
   9826     arg_target->set_isarray(false);
   9827     arg_target->set_type(GLMessage::DataType::ENUM);
   9828     arg_target->add_intvalue((int)target);
   9829 
   9830     // copy argument levels
   9831     GLMessage_DataType *arg_levels = glmsg.add_args();
   9832     arg_levels->set_isarray(false);
   9833     arg_levels->set_type(GLMessage::DataType::INT);
   9834     arg_levels->add_intvalue(levels);
   9835 
   9836     // copy argument internalformat
   9837     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9838     arg_internalformat->set_isarray(false);
   9839     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9840     arg_internalformat->add_intvalue((int)internalformat);
   9841 
   9842     // copy argument width
   9843     GLMessage_DataType *arg_width = glmsg.add_args();
   9844     arg_width->set_isarray(false);
   9845     arg_width->set_type(GLMessage::DataType::INT);
   9846     arg_width->add_intvalue(width);
   9847 
   9848     // copy argument height
   9849     GLMessage_DataType *arg_height = glmsg.add_args();
   9850     arg_height->set_isarray(false);
   9851     arg_height->set_type(GLMessage::DataType::INT);
   9852     arg_height->add_intvalue(height);
   9853 
   9854     // copy argument depth
   9855     GLMessage_DataType *arg_depth = glmsg.add_args();
   9856     arg_depth->set_isarray(false);
   9857     arg_depth->set_type(GLMessage::DataType::INT);
   9858     arg_depth->add_intvalue(depth);
   9859 
   9860     // call function
   9861     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9862     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9863     glContext->hooks->gl.glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth);
   9864     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9865     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9866 
   9867     void *pointerArgs[] = {
   9868     };
   9869 
   9870     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9871                               threadStartTime, threadEndTime,
   9872                               &glmsg, pointerArgs);
   9873     glContext->traceGLMessage(&glmsg);
   9874 }
   9875 
   9876 void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   9877     GLMessage glmsg;
   9878     GLTraceContext *glContext = getGLTraceContext();
   9879 
   9880     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleIMG);
   9881 
   9882     // copy argument target
   9883     GLMessage_DataType *arg_target = glmsg.add_args();
   9884     arg_target->set_isarray(false);
   9885     arg_target->set_type(GLMessage::DataType::ENUM);
   9886     arg_target->add_intvalue((int)target);
   9887 
   9888     // copy argument samples
   9889     GLMessage_DataType *arg_samples = glmsg.add_args();
   9890     arg_samples->set_isarray(false);
   9891     arg_samples->set_type(GLMessage::DataType::INT);
   9892     arg_samples->add_intvalue(samples);
   9893 
   9894     // copy argument internalformat
   9895     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   9896     arg_internalformat->set_isarray(false);
   9897     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   9898     arg_internalformat->add_intvalue((int)internalformat);
   9899 
   9900     // copy argument width
   9901     GLMessage_DataType *arg_width = glmsg.add_args();
   9902     arg_width->set_isarray(false);
   9903     arg_width->set_type(GLMessage::DataType::INT);
   9904     arg_width->add_intvalue(width);
   9905 
   9906     // copy argument height
   9907     GLMessage_DataType *arg_height = glmsg.add_args();
   9908     arg_height->set_isarray(false);
   9909     arg_height->set_type(GLMessage::DataType::INT);
   9910     arg_height->add_intvalue(height);
   9911 
   9912     // call function
   9913     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9914     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9915     glContext->hooks->gl.glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
   9916     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9917     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9918 
   9919     void *pointerArgs[] = {
   9920     };
   9921 
   9922     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9923                               threadStartTime, threadEndTime,
   9924                               &glmsg, pointerArgs);
   9925     glContext->traceGLMessage(&glmsg);
   9926 }
   9927 
   9928 void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
   9929     GLMessage glmsg;
   9930     GLTraceContext *glContext = getGLTraceContext();
   9931 
   9932     glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleIMG);
   9933 
   9934     // copy argument target
   9935     GLMessage_DataType *arg_target = glmsg.add_args();
   9936     arg_target->set_isarray(false);
   9937     arg_target->set_type(GLMessage::DataType::ENUM);
   9938     arg_target->add_intvalue((int)target);
   9939 
   9940     // copy argument attachment
   9941     GLMessage_DataType *arg_attachment = glmsg.add_args();
   9942     arg_attachment->set_isarray(false);
   9943     arg_attachment->set_type(GLMessage::DataType::ENUM);
   9944     arg_attachment->add_intvalue((int)attachment);
   9945 
   9946     // copy argument textarget
   9947     GLMessage_DataType *arg_textarget = glmsg.add_args();
   9948     arg_textarget->set_isarray(false);
   9949     arg_textarget->set_type(GLMessage::DataType::ENUM);
   9950     arg_textarget->add_intvalue((int)textarget);
   9951 
   9952     // copy argument texture
   9953     GLMessage_DataType *arg_texture = glmsg.add_args();
   9954     arg_texture->set_isarray(false);
   9955     arg_texture->set_type(GLMessage::DataType::INT);
   9956     arg_texture->add_intvalue(texture);
   9957 
   9958     // copy argument level
   9959     GLMessage_DataType *arg_level = glmsg.add_args();
   9960     arg_level->set_isarray(false);
   9961     arg_level->set_type(GLMessage::DataType::INT);
   9962     arg_level->add_intvalue(level);
   9963 
   9964     // copy argument samples
   9965     GLMessage_DataType *arg_samples = glmsg.add_args();
   9966     arg_samples->set_isarray(false);
   9967     arg_samples->set_type(GLMessage::DataType::INT);
   9968     arg_samples->add_intvalue(samples);
   9969 
   9970     // call function
   9971     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9972     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9973     glContext->hooks->gl.glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples);
   9974     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9975     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9976 
   9977     void *pointerArgs[] = {
   9978     };
   9979 
   9980     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9981                               threadStartTime, threadEndTime,
   9982                               &glmsg, pointerArgs);
   9983     glContext->traceGLMessage(&glmsg);
   9984 }
   9985 
   9986 void GLTrace_glCoverageMaskNV(GLboolean mask) {
   9987     GLMessage glmsg;
   9988     GLTraceContext *glContext = getGLTraceContext();
   9989 
   9990     glmsg.set_function(GLMessage::glCoverageMaskNV);
   9991 
   9992     // copy argument mask
   9993     GLMessage_DataType *arg_mask = glmsg.add_args();
   9994     arg_mask->set_isarray(false);
   9995     arg_mask->set_type(GLMessage::DataType::BOOL);
   9996     arg_mask->add_boolvalue(mask);
   9997 
   9998     // call function
   9999     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10000     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10001     glContext->hooks->gl.glCoverageMaskNV(mask);
   10002     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10003     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10004 
   10005     void *pointerArgs[] = {
   10006     };
   10007 
   10008     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10009                               threadStartTime, threadEndTime,
   10010                               &glmsg, pointerArgs);
   10011     glContext->traceGLMessage(&glmsg);
   10012 }
   10013 
   10014 void GLTrace_glCoverageOperationNV(GLenum operation) {
   10015     GLMessage glmsg;
   10016     GLTraceContext *glContext = getGLTraceContext();
   10017 
   10018     glmsg.set_function(GLMessage::glCoverageOperationNV);
   10019 
   10020     // copy argument operation
   10021     GLMessage_DataType *arg_operation = glmsg.add_args();
   10022     arg_operation->set_isarray(false);
   10023     arg_operation->set_type(GLMessage::DataType::ENUM);
   10024     arg_operation->add_intvalue((int)operation);
   10025 
   10026     // call function
   10027     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10028     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10029     glContext->hooks->gl.glCoverageOperationNV(operation);
   10030     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10031     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10032 
   10033     void *pointerArgs[] = {
   10034     };
   10035 
   10036     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10037                               threadStartTime, threadEndTime,
   10038                               &glmsg, pointerArgs);
   10039     glContext->traceGLMessage(&glmsg);
   10040 }
   10041 
   10042 void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs) {
   10043     GLMessage glmsg;
   10044     GLTraceContext *glContext = getGLTraceContext();
   10045 
   10046     glmsg.set_function(GLMessage::glDrawBuffersNV);
   10047 
   10048     // copy argument n
   10049     GLMessage_DataType *arg_n = glmsg.add_args();
   10050     arg_n->set_isarray(false);
   10051     arg_n->set_type(GLMessage::DataType::INT);
   10052     arg_n->add_intvalue(n);
   10053 
   10054     // copy argument bufs
   10055     GLMessage_DataType *arg_bufs = glmsg.add_args();
   10056     arg_bufs->set_isarray(false);
   10057     arg_bufs->set_type(GLMessage::DataType::INT);
   10058     arg_bufs->add_intvalue((int)bufs);
   10059 
   10060     // call function
   10061     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10062     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10063     glContext->hooks->gl.glDrawBuffersNV(n, bufs);
   10064     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10065     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10066 
   10067     void *pointerArgs[] = {
   10068         (void *) bufs,
   10069     };
   10070 
   10071     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10072                               threadStartTime, threadEndTime,
   10073                               &glmsg, pointerArgs);
   10074     glContext->traceGLMessage(&glmsg);
   10075 }
   10076 
   10077 void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
   10078     GLMessage glmsg;
   10079     GLTraceContext *glContext = getGLTraceContext();
   10080 
   10081     glmsg.set_function(GLMessage::glDeleteFencesNV);
   10082 
   10083     // copy argument n
   10084     GLMessage_DataType *arg_n = glmsg.add_args();
   10085     arg_n->set_isarray(false);
   10086     arg_n->set_type(GLMessage::DataType::INT);
   10087     arg_n->add_intvalue(n);
   10088 
   10089     // copy argument fences
   10090     GLMessage_DataType *arg_fences = glmsg.add_args();
   10091     arg_fences->set_isarray(false);
   10092     arg_fences->set_type(GLMessage::DataType::INT);
   10093     arg_fences->add_intvalue((int)fences);
   10094 
   10095     // call function
   10096     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10097     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10098     glContext->hooks->gl.glDeleteFencesNV(n, fences);
   10099     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10100     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10101 
   10102     void *pointerArgs[] = {
   10103         (void *) fences,
   10104     };
   10105 
   10106     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10107                               threadStartTime, threadEndTime,
   10108                               &glmsg, pointerArgs);
   10109     glContext->traceGLMessage(&glmsg);
   10110 }
   10111 
   10112 void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences) {
   10113     GLMessage glmsg;
   10114     GLTraceContext *glContext = getGLTraceContext();
   10115 
   10116     glmsg.set_function(GLMessage::glGenFencesNV);
   10117 
   10118     // copy argument n
   10119     GLMessage_DataType *arg_n = glmsg.add_args();
   10120     arg_n->set_isarray(false);
   10121     arg_n->set_type(GLMessage::DataType::INT);
   10122     arg_n->add_intvalue(n);
   10123 
   10124     // copy argument fences
   10125     GLMessage_DataType *arg_fences = glmsg.add_args();
   10126     arg_fences->set_isarray(false);
   10127     arg_fences->set_type(GLMessage::DataType::INT);
   10128     arg_fences->add_intvalue((int)fences);
   10129 
   10130     // call function
   10131     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10132     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10133     glContext->hooks->gl.glGenFencesNV(n, fences);
   10134     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10135     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10136 
   10137     void *pointerArgs[] = {
   10138         (void *) fences,
   10139     };
   10140 
   10141     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10142                               threadStartTime, threadEndTime,
   10143                               &glmsg, pointerArgs);
   10144     glContext->traceGLMessage(&glmsg);
   10145 }
   10146 
   10147 GLboolean GLTrace_glIsFenceNV(GLuint fence) {
   10148     GLMessage glmsg;
   10149     GLTraceContext *glContext = getGLTraceContext();
   10150 
   10151     glmsg.set_function(GLMessage::glIsFenceNV);
   10152 
   10153     // copy argument fence
   10154     GLMessage_DataType *arg_fence = glmsg.add_args();
   10155     arg_fence->set_isarray(false);
   10156     arg_fence->set_type(GLMessage::DataType::INT);
   10157     arg_fence->add_intvalue(fence);
   10158 
   10159     // call function
   10160     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10161     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10162     GLboolean retValue = glContext->hooks->gl.glIsFenceNV(fence);
   10163     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10164     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10165 
   10166     // set return value
   10167     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   10168     rt->set_isarray(false);
   10169     rt->set_type(GLMessage::DataType::BOOL);
   10170     rt->add_boolvalue(retValue);
   10171 
   10172     void *pointerArgs[] = {
   10173     };
   10174 
   10175     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10176                               threadStartTime, threadEndTime,
   10177                               &glmsg, pointerArgs);
   10178     glContext->traceGLMessage(&glmsg);
   10179 
   10180     return retValue;
   10181 }
   10182 
   10183 GLboolean GLTrace_glTestFenceNV(GLuint fence) {
   10184     GLMessage glmsg;
   10185     GLTraceContext *glContext = getGLTraceContext();
   10186 
   10187     glmsg.set_function(GLMessage::glTestFenceNV);
   10188 
   10189     // copy argument fence
   10190     GLMessage_DataType *arg_fence = glmsg.add_args();
   10191     arg_fence->set_isarray(false);
   10192     arg_fence->set_type(GLMessage::DataType::INT);
   10193     arg_fence->add_intvalue(fence);
   10194 
   10195     // call function
   10196     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10197     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10198     GLboolean retValue = glContext->hooks->gl.glTestFenceNV(fence);
   10199     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10200     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10201 
   10202     // set return value
   10203     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   10204     rt->set_isarray(false);
   10205     rt->set_type(GLMessage::DataType::BOOL);
   10206     rt->add_boolvalue(retValue);
   10207 
   10208     void *pointerArgs[] = {
   10209     };
   10210 
   10211     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10212                               threadStartTime, threadEndTime,
   10213                               &glmsg, pointerArgs);
   10214     glContext->traceGLMessage(&glmsg);
   10215 
   10216     return retValue;
   10217 }
   10218 
   10219 void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) {
   10220     GLMessage glmsg;
   10221     GLTraceContext *glContext = getGLTraceContext();
   10222 
   10223     glmsg.set_function(GLMessage::glGetFenceivNV);
   10224 
   10225     // copy argument fence
   10226     GLMessage_DataType *arg_fence = glmsg.add_args();
   10227     arg_fence->set_isarray(false);
   10228     arg_fence->set_type(GLMessage::DataType::INT);
   10229     arg_fence->add_intvalue(fence);
   10230 
   10231     // copy argument pname
   10232     GLMessage_DataType *arg_pname = glmsg.add_args();
   10233     arg_pname->set_isarray(false);
   10234     arg_pname->set_type(GLMessage::DataType::ENUM);
   10235     arg_pname->add_intvalue((int)pname);
   10236 
   10237     // copy argument params
   10238     GLMessage_DataType *arg_params = glmsg.add_args();
   10239     arg_params->set_isarray(false);
   10240     arg_params->set_type(GLMessage::DataType::INT);
   10241     arg_params->add_intvalue((int)params);
   10242 
   10243     // call function
   10244     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10245     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10246     glContext->hooks->gl.glGetFenceivNV(fence, pname, params);
   10247     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10248     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10249 
   10250     void *pointerArgs[] = {
   10251         (void *) params,
   10252     };
   10253 
   10254     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10255                               threadStartTime, threadEndTime,
   10256                               &glmsg, pointerArgs);
   10257     glContext->traceGLMessage(&glmsg);
   10258 }
   10259 
   10260 void GLTrace_glFinishFenceNV(GLuint fence) {
   10261     GLMessage glmsg;
   10262     GLTraceContext *glContext = getGLTraceContext();
   10263 
   10264     glmsg.set_function(GLMessage::glFinishFenceNV);
   10265 
   10266     // copy argument fence
   10267     GLMessage_DataType *arg_fence = glmsg.add_args();
   10268     arg_fence->set_isarray(false);
   10269     arg_fence->set_type(GLMessage::DataType::INT);
   10270     arg_fence->add_intvalue(fence);
   10271 
   10272     // call function
   10273     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10274     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10275     glContext->hooks->gl.glFinishFenceNV(fence);
   10276     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10277     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10278 
   10279     void *pointerArgs[] = {
   10280     };
   10281 
   10282     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10283                               threadStartTime, threadEndTime,
   10284                               &glmsg, pointerArgs);
   10285     glContext->traceGLMessage(&glmsg);
   10286 }
   10287 
   10288 void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) {
   10289     GLMessage glmsg;
   10290     GLTraceContext *glContext = getGLTraceContext();
   10291 
   10292     glmsg.set_function(GLMessage::glSetFenceNV);
   10293 
   10294     // copy argument fence
   10295     GLMessage_DataType *arg_fence = glmsg.add_args();
   10296     arg_fence->set_isarray(false);
   10297     arg_fence->set_type(GLMessage::DataType::INT);
   10298     arg_fence->add_intvalue(fence);
   10299 
   10300     // copy argument condition
   10301     GLMessage_DataType *arg_condition = glmsg.add_args();
   10302     arg_condition->set_isarray(false);
   10303     arg_condition->set_type(GLMessage::DataType::ENUM);
   10304     arg_condition->add_intvalue((int)condition);
   10305 
   10306     // call function
   10307     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10308     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10309     glContext->hooks->gl.glSetFenceNV(fence, condition);
   10310     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10311     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10312 
   10313     void *pointerArgs[] = {
   10314     };
   10315 
   10316     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10317                               threadStartTime, threadEndTime,
   10318                               &glmsg, pointerArgs);
   10319     glContext->traceGLMessage(&glmsg);
   10320 }
   10321 
   10322 void GLTrace_glReadBufferNV(GLenum mode) {
   10323     GLMessage glmsg;
   10324     GLTraceContext *glContext = getGLTraceContext();
   10325 
   10326     glmsg.set_function(GLMessage::glReadBufferNV);
   10327 
   10328     // copy argument mode
   10329     GLMessage_DataType *arg_mode = glmsg.add_args();
   10330     arg_mode->set_isarray(false);
   10331     arg_mode->set_type(GLMessage::DataType::ENUM);
   10332     arg_mode->add_intvalue((int)mode);
   10333 
   10334     // call function
   10335     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10336     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10337     glContext->hooks->gl.glReadBufferNV(mode);
   10338     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10339     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10340 
   10341     void *pointerArgs[] = {
   10342     };
   10343 
   10344     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10345                               threadStartTime, threadEndTime,
   10346                               &glmsg, pointerArgs);
   10347     glContext->traceGLMessage(&glmsg);
   10348 }
   10349 
   10350 void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref) {
   10351     GLMessage glmsg;
   10352     GLTraceContext *glContext = getGLTraceContext();
   10353 
   10354     glmsg.set_function(GLMessage::glAlphaFuncQCOM);
   10355 
   10356     // copy argument func
   10357     GLMessage_DataType *arg_func = glmsg.add_args();
   10358     arg_func->set_isarray(false);
   10359     arg_func->set_type(GLMessage::DataType::ENUM);
   10360     arg_func->add_intvalue((int)func);
   10361 
   10362     // copy argument ref
   10363     GLMessage_DataType *arg_ref = glmsg.add_args();
   10364     arg_ref->set_isarray(false);
   10365     arg_ref->set_type(GLMessage::DataType::FLOAT);
   10366     arg_ref->add_floatvalue(ref);
   10367 
   10368     // call function
   10369     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10370     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10371     glContext->hooks->gl.glAlphaFuncQCOM(func, ref);
   10372     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10373     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10374 
   10375     void *pointerArgs[] = {
   10376     };
   10377 
   10378     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10379                               threadStartTime, threadEndTime,
   10380                               &glmsg, pointerArgs);
   10381     glContext->traceGLMessage(&glmsg);
   10382 }
   10383 
   10384 void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls) {
   10385     GLMessage glmsg;
   10386     GLTraceContext *glContext = getGLTraceContext();
   10387 
   10388     glmsg.set_function(GLMessage::glGetDriverControlsQCOM);
   10389 
   10390     // copy argument num
   10391     GLMessage_DataType *arg_num = glmsg.add_args();
   10392     arg_num->set_isarray(false);
   10393     arg_num->set_type(GLMessage::DataType::INT);
   10394     arg_num->add_intvalue((int)num);
   10395 
   10396     // copy argument size
   10397     GLMessage_DataType *arg_size = glmsg.add_args();
   10398     arg_size->set_isarray(false);
   10399     arg_size->set_type(GLMessage::DataType::INT);
   10400     arg_size->add_intvalue(size);
   10401 
   10402     // copy argument driverControls
   10403     GLMessage_DataType *arg_driverControls = glmsg.add_args();
   10404     arg_driverControls->set_isarray(false);
   10405     arg_driverControls->set_type(GLMessage::DataType::INT);
   10406     arg_driverControls->add_intvalue((int)driverControls);
   10407 
   10408     // call function
   10409     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10410     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10411     glContext->hooks->gl.glGetDriverControlsQCOM(num, size, driverControls);
   10412     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10413     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10414 
   10415     void *pointerArgs[] = {
   10416         (void *) num,
   10417         (void *) driverControls,
   10418     };
   10419 
   10420     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10421                               threadStartTime, threadEndTime,
   10422                               &glmsg, pointerArgs);
   10423     glContext->traceGLMessage(&glmsg);
   10424 }
   10425 
   10426 void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
   10427     GLMessage glmsg;
   10428     GLTraceContext *glContext = getGLTraceContext();
   10429 
   10430     glmsg.set_function(GLMessage::glGetDriverControlStringQCOM);
   10431 
   10432     // copy argument driverControl
   10433     GLMessage_DataType *arg_driverControl = glmsg.add_args();
   10434     arg_driverControl->set_isarray(false);
   10435     arg_driverControl->set_type(GLMessage::DataType::INT);
   10436     arg_driverControl->add_intvalue(driverControl);
   10437 
   10438     // copy argument bufSize
   10439     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   10440     arg_bufSize->set_isarray(false);
   10441     arg_bufSize->set_type(GLMessage::DataType::INT);
   10442     arg_bufSize->add_intvalue(bufSize);
   10443 
   10444     // copy argument length
   10445     GLMessage_DataType *arg_length = glmsg.add_args();
   10446     arg_length->set_isarray(false);
   10447     arg_length->set_type(GLMessage::DataType::INT);
   10448     arg_length->add_intvalue((int)length);
   10449 
   10450     // copy argument driverControlString
   10451     GLMessage_DataType *arg_driverControlString = glmsg.add_args();
   10452     arg_driverControlString->set_isarray(false);
   10453     arg_driverControlString->set_type(GLMessage::DataType::INT);
   10454     arg_driverControlString->add_intvalue((int)driverControlString);
   10455 
   10456     // call function
   10457     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10458     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10459     glContext->hooks->gl.glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString);
   10460     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10461     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10462 
   10463     void *pointerArgs[] = {
   10464         (void *) length,
   10465         (void *) driverControlString,
   10466     };
   10467 
   10468     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10469                               threadStartTime, threadEndTime,
   10470                               &glmsg, pointerArgs);
   10471     glContext->traceGLMessage(&glmsg);
   10472 }
   10473 
   10474 void GLTrace_glEnableDriverControlQCOM(GLuint driverControl) {
   10475     GLMessage glmsg;
   10476     GLTraceContext *glContext = getGLTraceContext();
   10477 
   10478     glmsg.set_function(GLMessage::glEnableDriverControlQCOM);
   10479 
   10480     // copy argument driverControl
   10481     GLMessage_DataType *arg_driverControl = glmsg.add_args();
   10482     arg_driverControl->set_isarray(false);
   10483     arg_driverControl->set_type(GLMessage::DataType::INT);
   10484     arg_driverControl->add_intvalue(driverControl);
   10485 
   10486     // call function
   10487     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10488     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10489     glContext->hooks->gl.glEnableDriverControlQCOM(driverControl);
   10490     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10491     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10492 
   10493     void *pointerArgs[] = {
   10494     };
   10495 
   10496     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10497                               threadStartTime, threadEndTime,
   10498                               &glmsg, pointerArgs);
   10499     glContext->traceGLMessage(&glmsg);
   10500 }
   10501 
   10502 void GLTrace_glDisableDriverControlQCOM(GLuint driverControl) {
   10503     GLMessage glmsg;
   10504     GLTraceContext *glContext = getGLTraceContext();
   10505 
   10506     glmsg.set_function(GLMessage::glDisableDriverControlQCOM);
   10507 
   10508     // copy argument driverControl
   10509     GLMessage_DataType *arg_driverControl = glmsg.add_args();
   10510     arg_driverControl->set_isarray(false);
   10511     arg_driverControl->set_type(GLMessage::DataType::INT);
   10512     arg_driverControl->add_intvalue(driverControl);
   10513 
   10514     // call function
   10515     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10516     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10517     glContext->hooks->gl.glDisableDriverControlQCOM(driverControl);
   10518     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10519     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10520 
   10521     void *pointerArgs[] = {
   10522     };
   10523 
   10524     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10525                               threadStartTime, threadEndTime,
   10526                               &glmsg, pointerArgs);
   10527     glContext->traceGLMessage(&glmsg);
   10528 }
   10529 
   10530 void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures) {
   10531     GLMessage glmsg;
   10532     GLTraceContext *glContext = getGLTraceContext();
   10533 
   10534     glmsg.set_function(GLMessage::glExtGetTexturesQCOM);
   10535 
   10536     // copy argument textures
   10537     GLMessage_DataType *arg_textures = glmsg.add_args();
   10538     arg_textures->set_isarray(false);
   10539     arg_textures->set_type(GLMessage::DataType::INT);
   10540     arg_textures->add_intvalue((int)textures);
   10541 
   10542     // copy argument maxTextures
   10543     GLMessage_DataType *arg_maxTextures = glmsg.add_args();
   10544     arg_maxTextures->set_isarray(false);
   10545     arg_maxTextures->set_type(GLMessage::DataType::INT);
   10546     arg_maxTextures->add_intvalue(maxTextures);
   10547 
   10548     // copy argument numTextures
   10549     GLMessage_DataType *arg_numTextures = glmsg.add_args();
   10550     arg_numTextures->set_isarray(false);
   10551     arg_numTextures->set_type(GLMessage::DataType::INT);
   10552     arg_numTextures->add_intvalue((int)numTextures);
   10553 
   10554     // call function
   10555     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10556     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10557     glContext->hooks->gl.glExtGetTexturesQCOM(textures, maxTextures, numTextures);
   10558     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10559     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10560 
   10561     void *pointerArgs[] = {
   10562         (void *) textures,
   10563         (void *) numTextures,
   10564     };
   10565 
   10566     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10567                               threadStartTime, threadEndTime,
   10568                               &glmsg, pointerArgs);
   10569     glContext->traceGLMessage(&glmsg);
   10570 }
   10571 
   10572 void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
   10573     GLMessage glmsg;
   10574     GLTraceContext *glContext = getGLTraceContext();
   10575 
   10576     glmsg.set_function(GLMessage::glExtGetBuffersQCOM);
   10577 
   10578     // copy argument buffers
   10579     GLMessage_DataType *arg_buffers = glmsg.add_args();
   10580     arg_buffers->set_isarray(false);
   10581     arg_buffers->set_type(GLMessage::DataType::INT);
   10582     arg_buffers->add_intvalue((int)buffers);
   10583 
   10584     // copy argument maxBuffers
   10585     GLMessage_DataType *arg_maxBuffers = glmsg.add_args();
   10586     arg_maxBuffers->set_isarray(false);
   10587     arg_maxBuffers->set_type(GLMessage::DataType::INT);
   10588     arg_maxBuffers->add_intvalue(maxBuffers);
   10589 
   10590     // copy argument numBuffers
   10591     GLMessage_DataType *arg_numBuffers = glmsg.add_args();
   10592     arg_numBuffers->set_isarray(false);
   10593     arg_numBuffers->set_type(GLMessage::DataType::INT);
   10594     arg_numBuffers->add_intvalue((int)numBuffers);
   10595 
   10596     // call function
   10597     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10598     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10599     glContext->hooks->gl.glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers);
   10600     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10601     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10602 
   10603     void *pointerArgs[] = {
   10604         (void *) buffers,
   10605         (void *) numBuffers,
   10606     };
   10607 
   10608     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10609                               threadStartTime, threadEndTime,
   10610                               &glmsg, pointerArgs);
   10611     glContext->traceGLMessage(&glmsg);
   10612 }
   10613 
   10614 void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
   10615     GLMessage glmsg;
   10616     GLTraceContext *glContext = getGLTraceContext();
   10617 
   10618     glmsg.set_function(GLMessage::glExtGetRenderbuffersQCOM);
   10619 
   10620     // copy argument renderbuffers
   10621     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   10622     arg_renderbuffers->set_isarray(false);
   10623     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   10624     arg_renderbuffers->add_intvalue((int)renderbuffers);
   10625 
   10626     // copy argument maxRenderbuffers
   10627     GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args();
   10628     arg_maxRenderbuffers->set_isarray(false);
   10629     arg_maxRenderbuffers->set_type(GLMessage::DataType::INT);
   10630     arg_maxRenderbuffers->add_intvalue(maxRenderbuffers);
   10631 
   10632     // copy argument numRenderbuffers
   10633     GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args();
   10634     arg_numRenderbuffers->set_isarray(false);
   10635     arg_numRenderbuffers->set_type(GLMessage::DataType::INT);
   10636     arg_numRenderbuffers->add_intvalue((int)numRenderbuffers);
   10637 
   10638     // call function
   10639     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10640     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10641     glContext->hooks->gl.glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers);
   10642     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10643     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10644 
   10645     void *pointerArgs[] = {
   10646         (void *) renderbuffers,
   10647         (void *) numRenderbuffers,
   10648     };
   10649 
   10650     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10651                               threadStartTime, threadEndTime,
   10652                               &glmsg, pointerArgs);
   10653     glContext->traceGLMessage(&glmsg);
   10654 }
   10655 
   10656 void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
   10657     GLMessage glmsg;
   10658     GLTraceContext *glContext = getGLTraceContext();
   10659 
   10660     glmsg.set_function(GLMessage::glExtGetFramebuffersQCOM);
   10661 
   10662     // copy argument framebuffers
   10663     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   10664     arg_framebuffers->set_isarray(false);
   10665     arg_framebuffers->set_type(GLMessage::DataType::INT);
   10666     arg_framebuffers->add_intvalue((int)framebuffers);
   10667 
   10668     // copy argument maxFramebuffers
   10669     GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args();
   10670     arg_maxFramebuffers->set_isarray(false);
   10671     arg_maxFramebuffers->set_type(GLMessage::DataType::INT);
   10672     arg_maxFramebuffers->add_intvalue(maxFramebuffers);
   10673 
   10674     // copy argument numFramebuffers
   10675     GLMessage_DataType *arg_numFramebuffers = glmsg.add_args();
   10676     arg_numFramebuffers->set_isarray(false);
   10677     arg_numFramebuffers->set_type(GLMessage::DataType::INT);
   10678     arg_numFramebuffers->add_intvalue((int)numFramebuffers);
   10679 
   10680     // call function
   10681     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10682     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10683     glContext->hooks->gl.glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers);
   10684     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10685     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10686 
   10687     void *pointerArgs[] = {
   10688         (void *) framebuffers,
   10689         (void *) numFramebuffers,
   10690     };
   10691 
   10692     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10693                               threadStartTime, threadEndTime,
   10694                               &glmsg, pointerArgs);
   10695     glContext->traceGLMessage(&glmsg);
   10696 }
   10697 
   10698 void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
   10699     GLMessage glmsg;
   10700     GLTraceContext *glContext = getGLTraceContext();
   10701 
   10702     glmsg.set_function(GLMessage::glExtGetTexLevelParameterivQCOM);
   10703 
   10704     // copy argument texture
   10705     GLMessage_DataType *arg_texture = glmsg.add_args();
   10706     arg_texture->set_isarray(false);
   10707     arg_texture->set_type(GLMessage::DataType::INT);
   10708     arg_texture->add_intvalue(texture);
   10709 
   10710     // copy argument face
   10711     GLMessage_DataType *arg_face = glmsg.add_args();
   10712     arg_face->set_isarray(false);
   10713     arg_face->set_type(GLMessage::DataType::ENUM);
   10714     arg_face->add_intvalue((int)face);
   10715 
   10716     // copy argument level
   10717     GLMessage_DataType *arg_level = glmsg.add_args();
   10718     arg_level->set_isarray(false);
   10719     arg_level->set_type(GLMessage::DataType::INT);
   10720     arg_level->add_intvalue(level);
   10721 
   10722     // copy argument pname
   10723     GLMessage_DataType *arg_pname = glmsg.add_args();
   10724     arg_pname->set_isarray(false);
   10725     arg_pname->set_type(GLMessage::DataType::ENUM);
   10726     arg_pname->add_intvalue((int)pname);
   10727 
   10728     // copy argument params
   10729     GLMessage_DataType *arg_params = glmsg.add_args();
   10730     arg_params->set_isarray(false);
   10731     arg_params->set_type(GLMessage::DataType::INT);
   10732     arg_params->add_intvalue((int)params);
   10733 
   10734     // call function
   10735     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10736     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10737     glContext->hooks->gl.glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params);
   10738     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10739     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10740 
   10741     void *pointerArgs[] = {
   10742         (void *) params,
   10743     };
   10744 
   10745     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10746                               threadStartTime, threadEndTime,
   10747                               &glmsg, pointerArgs);
   10748     glContext->traceGLMessage(&glmsg);
   10749 }
   10750 
   10751 void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) {
   10752     GLMessage glmsg;
   10753     GLTraceContext *glContext = getGLTraceContext();
   10754 
   10755     glmsg.set_function(GLMessage::glExtTexObjectStateOverrideiQCOM);
   10756 
   10757     // copy argument target
   10758     GLMessage_DataType *arg_target = glmsg.add_args();
   10759     arg_target->set_isarray(false);
   10760     arg_target->set_type(GLMessage::DataType::ENUM);
   10761     arg_target->add_intvalue((int)target);
   10762 
   10763     // copy argument pname
   10764     GLMessage_DataType *arg_pname = glmsg.add_args();
   10765     arg_pname->set_isarray(false);
   10766     arg_pname->set_type(GLMessage::DataType::ENUM);
   10767     arg_pname->add_intvalue((int)pname);
   10768 
   10769     // copy argument param
   10770     GLMessage_DataType *arg_param = glmsg.add_args();
   10771     arg_param->set_isarray(false);
   10772     arg_param->set_type(GLMessage::DataType::INT);
   10773     arg_param->add_intvalue(param);
   10774 
   10775     // call function
   10776     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10777     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10778     glContext->hooks->gl.glExtTexObjectStateOverrideiQCOM(target, pname, param);
   10779     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10780     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10781 
   10782     void *pointerArgs[] = {
   10783     };
   10784 
   10785     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10786                               threadStartTime, threadEndTime,
   10787                               &glmsg, pointerArgs);
   10788     glContext->traceGLMessage(&glmsg);
   10789 }
   10790 
   10791 void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) {
   10792     GLMessage glmsg;
   10793     GLTraceContext *glContext = getGLTraceContext();
   10794 
   10795     glmsg.set_function(GLMessage::glExtGetTexSubImageQCOM);
   10796 
   10797     // copy argument target
   10798     GLMessage_DataType *arg_target = glmsg.add_args();
   10799     arg_target->set_isarray(false);
   10800     arg_target->set_type(GLMessage::DataType::ENUM);
   10801     arg_target->add_intvalue((int)target);
   10802 
   10803     // copy argument level
   10804     GLMessage_DataType *arg_level = glmsg.add_args();
   10805     arg_level->set_isarray(false);
   10806     arg_level->set_type(GLMessage::DataType::INT);
   10807     arg_level->add_intvalue(level);
   10808 
   10809     // copy argument xoffset
   10810     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   10811     arg_xoffset->set_isarray(false);
   10812     arg_xoffset->set_type(GLMessage::DataType::INT);
   10813     arg_xoffset->add_intvalue(xoffset);
   10814 
   10815     // copy argument yoffset
   10816     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   10817     arg_yoffset->set_isarray(false);
   10818     arg_yoffset->set_type(GLMessage::DataType::INT);
   10819     arg_yoffset->add_intvalue(yoffset);
   10820 
   10821     // copy argument zoffset
   10822     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   10823     arg_zoffset->set_isarray(false);
   10824     arg_zoffset->set_type(GLMessage::DataType::INT);
   10825     arg_zoffset->add_intvalue(zoffset);
   10826 
   10827     // copy argument width
   10828     GLMessage_DataType *arg_width = glmsg.add_args();
   10829     arg_width->set_isarray(false);
   10830     arg_width->set_type(GLMessage::DataType::INT);
   10831     arg_width->add_intvalue(width);
   10832 
   10833     // copy argument height
   10834     GLMessage_DataType *arg_height = glmsg.add_args();
   10835     arg_height->set_isarray(false);
   10836     arg_height->set_type(GLMessage::DataType::INT);
   10837     arg_height->add_intvalue(height);
   10838 
   10839     // copy argument depth
   10840     GLMessage_DataType *arg_depth = glmsg.add_args();
   10841     arg_depth->set_isarray(false);
   10842     arg_depth->set_type(GLMessage::DataType::INT);
   10843     arg_depth->add_intvalue(depth);
   10844 
   10845     // copy argument format
   10846     GLMessage_DataType *arg_format = glmsg.add_args();
   10847     arg_format->set_isarray(false);
   10848     arg_format->set_type(GLMessage::DataType::ENUM);
   10849     arg_format->add_intvalue((int)format);
   10850 
   10851     // copy argument type
   10852     GLMessage_DataType *arg_type = glmsg.add_args();
   10853     arg_type->set_isarray(false);
   10854     arg_type->set_type(GLMessage::DataType::ENUM);
   10855     arg_type->add_intvalue((int)type);
   10856 
   10857     // copy argument texels
   10858     GLMessage_DataType *arg_texels = glmsg.add_args();
   10859     arg_texels->set_isarray(false);
   10860     arg_texels->set_type(GLMessage::DataType::INT);
   10861     arg_texels->add_intvalue((int)texels);
   10862 
   10863     // call function
   10864     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10865     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10866     glContext->hooks->gl.glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
   10867     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10868     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10869 
   10870     void *pointerArgs[] = {
   10871         (void *) texels,
   10872     };
   10873 
   10874     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10875                               threadStartTime, threadEndTime,
   10876                               &glmsg, pointerArgs);
   10877     glContext->traceGLMessage(&glmsg);
   10878 }
   10879 
   10880 void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) {
   10881     GLMessage glmsg;
   10882     GLTraceContext *glContext = getGLTraceContext();
   10883 
   10884     glmsg.set_function(GLMessage::glExtGetBufferPointervQCOM);
   10885 
   10886     // copy argument target
   10887     GLMessage_DataType *arg_target = glmsg.add_args();
   10888     arg_target->set_isarray(false);
   10889     arg_target->set_type(GLMessage::DataType::ENUM);
   10890     arg_target->add_intvalue((int)target);
   10891 
   10892     // copy argument params
   10893     GLMessage_DataType *arg_params = glmsg.add_args();
   10894     arg_params->set_isarray(false);
   10895     arg_params->set_type(GLMessage::DataType::INT);
   10896     arg_params->add_intvalue((int)params);
   10897 
   10898     // call function
   10899     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10900     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10901     glContext->hooks->gl.glExtGetBufferPointervQCOM(target, params);
   10902     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10903     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10904 
   10905     void *pointerArgs[] = {
   10906         (void *) params,
   10907     };
   10908 
   10909     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10910                               threadStartTime, threadEndTime,
   10911                               &glmsg, pointerArgs);
   10912     glContext->traceGLMessage(&glmsg);
   10913 }
   10914 
   10915 void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
   10916     GLMessage glmsg;
   10917     GLTraceContext *glContext = getGLTraceContext();
   10918 
   10919     glmsg.set_function(GLMessage::glExtGetShadersQCOM);
   10920 
   10921     // copy argument shaders
   10922     GLMessage_DataType *arg_shaders = glmsg.add_args();
   10923     arg_shaders->set_isarray(false);
   10924     arg_shaders->set_type(GLMessage::DataType::INT);
   10925     arg_shaders->add_intvalue((int)shaders);
   10926 
   10927     // copy argument maxShaders
   10928     GLMessage_DataType *arg_maxShaders = glmsg.add_args();
   10929     arg_maxShaders->set_isarray(false);
   10930     arg_maxShaders->set_type(GLMessage::DataType::INT);
   10931     arg_maxShaders->add_intvalue(maxShaders);
   10932 
   10933     // copy argument numShaders
   10934     GLMessage_DataType *arg_numShaders = glmsg.add_args();
   10935     arg_numShaders->set_isarray(false);
   10936     arg_numShaders->set_type(GLMessage::DataType::INT);
   10937     arg_numShaders->add_intvalue((int)numShaders);
   10938 
   10939     // call function
   10940     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10941     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10942     glContext->hooks->gl.glExtGetShadersQCOM(shaders, maxShaders, numShaders);
   10943     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10944     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10945 
   10946     void *pointerArgs[] = {
   10947         (void *) shaders,
   10948         (void *) numShaders,
   10949     };
   10950 
   10951     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10952                               threadStartTime, threadEndTime,
   10953                               &glmsg, pointerArgs);
   10954     glContext->traceGLMessage(&glmsg);
   10955 }
   10956 
   10957 void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
   10958     GLMessage glmsg;
   10959     GLTraceContext *glContext = getGLTraceContext();
   10960 
   10961     glmsg.set_function(GLMessage::glExtGetProgramsQCOM);
   10962 
   10963     // copy argument programs
   10964     GLMessage_DataType *arg_programs = glmsg.add_args();
   10965     arg_programs->set_isarray(false);
   10966     arg_programs->set_type(GLMessage::DataType::INT);
   10967     arg_programs->add_intvalue((int)programs);
   10968 
   10969     // copy argument maxPrograms
   10970     GLMessage_DataType *arg_maxPrograms = glmsg.add_args();
   10971     arg_maxPrograms->set_isarray(false);
   10972     arg_maxPrograms->set_type(GLMessage::DataType::INT);
   10973     arg_maxPrograms->add_intvalue(maxPrograms);
   10974 
   10975     // copy argument numPrograms
   10976     GLMessage_DataType *arg_numPrograms = glmsg.add_args();
   10977     arg_numPrograms->set_isarray(false);
   10978     arg_numPrograms->set_type(GLMessage::DataType::INT);
   10979     arg_numPrograms->add_intvalue((int)numPrograms);
   10980 
   10981     // call function
   10982     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10983     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10984     glContext->hooks->gl.glExtGetProgramsQCOM(programs, maxPrograms, numPrograms);
   10985     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10986     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10987 
   10988     void *pointerArgs[] = {
   10989         (void *) programs,
   10990         (void *) numPrograms,
   10991     };
   10992 
   10993     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10994                               threadStartTime, threadEndTime,
   10995                               &glmsg, pointerArgs);
   10996     glContext->traceGLMessage(&glmsg);
   10997 }
   10998 
   10999 GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program) {
   11000     GLMessage glmsg;
   11001     GLTraceContext *glContext = getGLTraceContext();
   11002 
   11003     glmsg.set_function(GLMessage::glExtIsProgramBinaryQCOM);
   11004 
   11005     // copy argument program
   11006     GLMessage_DataType *arg_program = glmsg.add_args();
   11007     arg_program->set_isarray(false);
   11008     arg_program->set_type(GLMessage::DataType::INT);
   11009     arg_program->add_intvalue(program);
   11010 
   11011     // call function
   11012     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11013     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11014     GLboolean retValue = glContext->hooks->gl.glExtIsProgramBinaryQCOM(program);
   11015     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11016     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11017 
   11018     // set return value
   11019     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   11020     rt->set_isarray(false);
   11021     rt->set_type(GLMessage::DataType::BOOL);
   11022     rt->add_boolvalue(retValue);
   11023 
   11024     void *pointerArgs[] = {
   11025     };
   11026 
   11027     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11028                               threadStartTime, threadEndTime,
   11029                               &glmsg, pointerArgs);
   11030     glContext->traceGLMessage(&glmsg);
   11031 
   11032     return retValue;
   11033 }
   11034 
   11035 void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
   11036     GLMessage glmsg;
   11037     GLTraceContext *glContext = getGLTraceContext();
   11038 
   11039     glmsg.set_function(GLMessage::glExtGetProgramBinarySourceQCOM);
   11040 
   11041     // copy argument program
   11042     GLMessage_DataType *arg_program = glmsg.add_args();
   11043     arg_program->set_isarray(false);
   11044     arg_program->set_type(GLMessage::DataType::INT);
   11045     arg_program->add_intvalue(program);
   11046 
   11047     // copy argument shadertype
   11048     GLMessage_DataType *arg_shadertype = glmsg.add_args();
   11049     arg_shadertype->set_isarray(false);
   11050     arg_shadertype->set_type(GLMessage::DataType::ENUM);
   11051     arg_shadertype->add_intvalue((int)shadertype);
   11052 
   11053     // copy argument source
   11054     GLMessage_DataType *arg_source = glmsg.add_args();
   11055     arg_source->set_isarray(false);
   11056     arg_source->set_type(GLMessage::DataType::INT);
   11057     arg_source->add_intvalue((int)source);
   11058 
   11059     // copy argument length
   11060     GLMessage_DataType *arg_length = glmsg.add_args();
   11061     arg_length->set_isarray(false);
   11062     arg_length->set_type(GLMessage::DataType::INT);
   11063     arg_length->add_intvalue((int)length);
   11064 
   11065     // call function
   11066     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11067     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11068     glContext->hooks->gl.glExtGetProgramBinarySourceQCOM(program, shadertype, source, length);
   11069     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11070     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11071 
   11072     void *pointerArgs[] = {
   11073         (void *) source,
   11074         (void *) length,
   11075     };
   11076 
   11077     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11078                               threadStartTime, threadEndTime,
   11079                               &glmsg, pointerArgs);
   11080     glContext->traceGLMessage(&glmsg);
   11081 }
   11082 
   11083 void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
   11084     GLMessage glmsg;
   11085     GLTraceContext *glContext = getGLTraceContext();
   11086 
   11087     glmsg.set_function(GLMessage::glStartTilingQCOM);
   11088 
   11089     // copy argument x
   11090     GLMessage_DataType *arg_x = glmsg.add_args();
   11091     arg_x->set_isarray(false);
   11092     arg_x->set_type(GLMessage::DataType::INT);
   11093     arg_x->add_intvalue(x);
   11094 
   11095     // copy argument y
   11096     GLMessage_DataType *arg_y = glmsg.add_args();
   11097     arg_y->set_isarray(false);
   11098     arg_y->set_type(GLMessage::DataType::INT);
   11099     arg_y->add_intvalue(y);
   11100 
   11101     // copy argument width
   11102     GLMessage_DataType *arg_width = glmsg.add_args();
   11103     arg_width->set_isarray(false);
   11104     arg_width->set_type(GLMessage::DataType::INT);
   11105     arg_width->add_intvalue(width);
   11106 
   11107     // copy argument height
   11108     GLMessage_DataType *arg_height = glmsg.add_args();
   11109     arg_height->set_isarray(false);
   11110     arg_height->set_type(GLMessage::DataType::INT);
   11111     arg_height->add_intvalue(height);
   11112 
   11113     // copy argument preserveMask
   11114     GLMessage_DataType *arg_preserveMask = glmsg.add_args();
   11115     arg_preserveMask->set_isarray(false);
   11116     arg_preserveMask->set_type(GLMessage::DataType::INT);
   11117     arg_preserveMask->add_intvalue(preserveMask);
   11118 
   11119     // call function
   11120     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11121     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11122     glContext->hooks->gl.glStartTilingQCOM(x, y, width, height, preserveMask);
   11123     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11124     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11125 
   11126     void *pointerArgs[] = {
   11127     };
   11128 
   11129     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11130                               threadStartTime, threadEndTime,
   11131                               &glmsg, pointerArgs);
   11132     glContext->traceGLMessage(&glmsg);
   11133 }
   11134 
   11135 void GLTrace_glEndTilingQCOM(GLbitfield preserveMask) {
   11136     GLMessage glmsg;
   11137     GLTraceContext *glContext = getGLTraceContext();
   11138 
   11139     glmsg.set_function(GLMessage::glEndTilingQCOM);
   11140 
   11141     // copy argument preserveMask
   11142     GLMessage_DataType *arg_preserveMask = glmsg.add_args();
   11143     arg_preserveMask->set_isarray(false);
   11144     arg_preserveMask->set_type(GLMessage::DataType::INT);
   11145     arg_preserveMask->add_intvalue(preserveMask);
   11146 
   11147     // call function
   11148     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11149     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11150     glContext->hooks->gl.glEndTilingQCOM(preserveMask);
   11151     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11152     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11153 
   11154     void *pointerArgs[] = {
   11155     };
   11156 
   11157     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11158                               threadStartTime, threadEndTime,
   11159                               &glmsg, pointerArgs);
   11160     glContext->traceGLMessage(&glmsg);
   11161 }
   11162 
   11163 
   11164 // Definitions for GL1 APIs
   11165 
   11166 void GLTrace_glAlphaFunc(GLenum func, GLclampf ref) {
   11167     GLMessage glmsg;
   11168     GLTraceContext *glContext = getGLTraceContext();
   11169 
   11170     glmsg.set_function(GLMessage::glAlphaFunc);
   11171 
   11172     // copy argument func
   11173     GLMessage_DataType *arg_func = glmsg.add_args();
   11174     arg_func->set_isarray(false);
   11175     arg_func->set_type(GLMessage::DataType::ENUM);
   11176     arg_func->add_intvalue((int)func);
   11177 
   11178     // copy argument ref
   11179     GLMessage_DataType *arg_ref = glmsg.add_args();
   11180     arg_ref->set_isarray(false);
   11181     arg_ref->set_type(GLMessage::DataType::FLOAT);
   11182     arg_ref->add_floatvalue(ref);
   11183 
   11184     // call function
   11185     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11186     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11187     glContext->hooks->gl.glAlphaFunc(func, ref);
   11188     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11189     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11190 
   11191     void *pointerArgs[] = {
   11192     };
   11193 
   11194     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11195                               threadStartTime, threadEndTime,
   11196                               &glmsg, pointerArgs);
   11197     glContext->traceGLMessage(&glmsg);
   11198 }
   11199 
   11200 void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation) {
   11201     GLMessage glmsg;
   11202     GLTraceContext *glContext = getGLTraceContext();
   11203 
   11204     glmsg.set_function(GLMessage::glClipPlanef);
   11205 
   11206     // copy argument plane
   11207     GLMessage_DataType *arg_plane = glmsg.add_args();
   11208     arg_plane->set_isarray(false);
   11209     arg_plane->set_type(GLMessage::DataType::ENUM);
   11210     arg_plane->add_intvalue((int)plane);
   11211 
   11212     // copy argument equation
   11213     GLMessage_DataType *arg_equation = glmsg.add_args();
   11214     arg_equation->set_isarray(false);
   11215     arg_equation->set_type(GLMessage::DataType::INT);
   11216     arg_equation->add_intvalue((int)equation);
   11217 
   11218     // call function
   11219     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11220     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11221     glContext->hooks->gl.glClipPlanef(plane, equation);
   11222     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11223     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11224 
   11225     void *pointerArgs[] = {
   11226         (void *) equation,
   11227     };
   11228 
   11229     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11230                               threadStartTime, threadEndTime,
   11231                               &glmsg, pointerArgs);
   11232     glContext->traceGLMessage(&glmsg);
   11233 }
   11234 
   11235 void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
   11236     GLMessage glmsg;
   11237     GLTraceContext *glContext = getGLTraceContext();
   11238 
   11239     glmsg.set_function(GLMessage::glColor4f);
   11240 
   11241     // copy argument red
   11242     GLMessage_DataType *arg_red = glmsg.add_args();
   11243     arg_red->set_isarray(false);
   11244     arg_red->set_type(GLMessage::DataType::FLOAT);
   11245     arg_red->add_floatvalue(red);
   11246 
   11247     // copy argument green
   11248     GLMessage_DataType *arg_green = glmsg.add_args();
   11249     arg_green->set_isarray(false);
   11250     arg_green->set_type(GLMessage::DataType::FLOAT);
   11251     arg_green->add_floatvalue(green);
   11252 
   11253     // copy argument blue
   11254     GLMessage_DataType *arg_blue = glmsg.add_args();
   11255     arg_blue->set_isarray(false);
   11256     arg_blue->set_type(GLMessage::DataType::FLOAT);
   11257     arg_blue->add_floatvalue(blue);
   11258 
   11259     // copy argument alpha
   11260     GLMessage_DataType *arg_alpha = glmsg.add_args();
   11261     arg_alpha->set_isarray(false);
   11262     arg_alpha->set_type(GLMessage::DataType::FLOAT);
   11263     arg_alpha->add_floatvalue(alpha);
   11264 
   11265     // call function
   11266     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11267     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11268     glContext->hooks->gl.glColor4f(red, green, blue, alpha);
   11269     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11270     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11271 
   11272     void *pointerArgs[] = {
   11273     };
   11274 
   11275     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11276                               threadStartTime, threadEndTime,
   11277                               &glmsg, pointerArgs);
   11278     glContext->traceGLMessage(&glmsg);
   11279 }
   11280 
   11281 void GLTrace_glFogf(GLenum pname, GLfloat param) {
   11282     GLMessage glmsg;
   11283     GLTraceContext *glContext = getGLTraceContext();
   11284 
   11285     glmsg.set_function(GLMessage::glFogf);
   11286 
   11287     // copy argument pname
   11288     GLMessage_DataType *arg_pname = glmsg.add_args();
   11289     arg_pname->set_isarray(false);
   11290     arg_pname->set_type(GLMessage::DataType::ENUM);
   11291     arg_pname->add_intvalue((int)pname);
   11292 
   11293     // copy argument param
   11294     GLMessage_DataType *arg_param = glmsg.add_args();
   11295     arg_param->set_isarray(false);
   11296     arg_param->set_type(GLMessage::DataType::FLOAT);
   11297     arg_param->add_floatvalue(param);
   11298 
   11299     // call function
   11300     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11301     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11302     glContext->hooks->gl.glFogf(pname, param);
   11303     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11304     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11305 
   11306     void *pointerArgs[] = {
   11307     };
   11308 
   11309     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11310                               threadStartTime, threadEndTime,
   11311                               &glmsg, pointerArgs);
   11312     glContext->traceGLMessage(&glmsg);
   11313 }
   11314 
   11315 void GLTrace_glFogfv(GLenum pname, const GLfloat *params) {
   11316     GLMessage glmsg;
   11317     GLTraceContext *glContext = getGLTraceContext();
   11318 
   11319     glmsg.set_function(GLMessage::glFogfv);
   11320 
   11321     // copy argument pname
   11322     GLMessage_DataType *arg_pname = glmsg.add_args();
   11323     arg_pname->set_isarray(false);
   11324     arg_pname->set_type(GLMessage::DataType::ENUM);
   11325     arg_pname->add_intvalue((int)pname);
   11326 
   11327     // copy argument params
   11328     GLMessage_DataType *arg_params = glmsg.add_args();
   11329     arg_params->set_isarray(false);
   11330     arg_params->set_type(GLMessage::DataType::INT);
   11331     arg_params->add_intvalue((int)params);
   11332 
   11333     // call function
   11334     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11335     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11336     glContext->hooks->gl.glFogfv(pname, params);
   11337     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11338     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11339 
   11340     void *pointerArgs[] = {
   11341         (void *) params,
   11342     };
   11343 
   11344     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11345                               threadStartTime, threadEndTime,
   11346                               &glmsg, pointerArgs);
   11347     glContext->traceGLMessage(&glmsg);
   11348 }
   11349 
   11350 void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   11351     GLMessage glmsg;
   11352     GLTraceContext *glContext = getGLTraceContext();
   11353 
   11354     glmsg.set_function(GLMessage::glFrustumf);
   11355 
   11356     // copy argument left
   11357     GLMessage_DataType *arg_left = glmsg.add_args();
   11358     arg_left->set_isarray(false);
   11359     arg_left->set_type(GLMessage::DataType::FLOAT);
   11360     arg_left->add_floatvalue(left);
   11361 
   11362     // copy argument right
   11363     GLMessage_DataType *arg_right = glmsg.add_args();
   11364     arg_right->set_isarray(false);
   11365     arg_right->set_type(GLMessage::DataType::FLOAT);
   11366     arg_right->add_floatvalue(right);
   11367 
   11368     // copy argument bottom
   11369     GLMessage_DataType *arg_bottom = glmsg.add_args();
   11370     arg_bottom->set_isarray(false);
   11371     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   11372     arg_bottom->add_floatvalue(bottom);
   11373 
   11374     // copy argument top
   11375     GLMessage_DataType *arg_top = glmsg.add_args();
   11376     arg_top->set_isarray(false);
   11377     arg_top->set_type(GLMessage::DataType::FLOAT);
   11378     arg_top->add_floatvalue(top);
   11379 
   11380     // copy argument zNear
   11381     GLMessage_DataType *arg_zNear = glmsg.add_args();
   11382     arg_zNear->set_isarray(false);
   11383     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   11384     arg_zNear->add_floatvalue(zNear);
   11385 
   11386     // copy argument zFar
   11387     GLMessage_DataType *arg_zFar = glmsg.add_args();
   11388     arg_zFar->set_isarray(false);
   11389     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   11390     arg_zFar->add_floatvalue(zFar);
   11391 
   11392     // call function
   11393     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11394     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11395     glContext->hooks->gl.glFrustumf(left, right, bottom, top, zNear, zFar);
   11396     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11397     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11398 
   11399     void *pointerArgs[] = {
   11400     };
   11401 
   11402     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11403                               threadStartTime, threadEndTime,
   11404                               &glmsg, pointerArgs);
   11405     glContext->traceGLMessage(&glmsg);
   11406 }
   11407 
   11408 void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
   11409     GLMessage glmsg;
   11410     GLTraceContext *glContext = getGLTraceContext();
   11411 
   11412     glmsg.set_function(GLMessage::glGetClipPlanef);
   11413 
   11414     // copy argument pname
   11415     GLMessage_DataType *arg_pname = glmsg.add_args();
   11416     arg_pname->set_isarray(false);
   11417     arg_pname->set_type(GLMessage::DataType::ENUM);
   11418     arg_pname->add_intvalue((int)pname);
   11419 
   11420     // copy argument eqn
   11421     GLMessage_DataType *arg_eqn = glmsg.add_args();
   11422     arg_eqn->set_isarray(false);
   11423     arg_eqn->set_type(GLMessage::DataType::INT);
   11424     arg_eqn->add_intvalue((int)eqn);
   11425 
   11426     // call function
   11427     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11428     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11429     glContext->hooks->gl.glGetClipPlanef(pname, eqn);
   11430     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11431     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11432 
   11433     void *pointerArgs[] = {
   11434         (void *) eqn,
   11435     };
   11436 
   11437     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11438                               threadStartTime, threadEndTime,
   11439                               &glmsg, pointerArgs);
   11440     glContext->traceGLMessage(&glmsg);
   11441 }
   11442 
   11443 void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
   11444     GLMessage glmsg;
   11445     GLTraceContext *glContext = getGLTraceContext();
   11446 
   11447     glmsg.set_function(GLMessage::glGetLightfv);
   11448 
   11449     // copy argument light
   11450     GLMessage_DataType *arg_light = glmsg.add_args();
   11451     arg_light->set_isarray(false);
   11452     arg_light->set_type(GLMessage::DataType::ENUM);
   11453     arg_light->add_intvalue((int)light);
   11454 
   11455     // copy argument pname
   11456     GLMessage_DataType *arg_pname = glmsg.add_args();
   11457     arg_pname->set_isarray(false);
   11458     arg_pname->set_type(GLMessage::DataType::ENUM);
   11459     arg_pname->add_intvalue((int)pname);
   11460 
   11461     // copy argument params
   11462     GLMessage_DataType *arg_params = glmsg.add_args();
   11463     arg_params->set_isarray(false);
   11464     arg_params->set_type(GLMessage::DataType::INT);
   11465     arg_params->add_intvalue((int)params);
   11466 
   11467     // call function
   11468     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11469     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11470     glContext->hooks->gl.glGetLightfv(light, pname, params);
   11471     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11472     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11473 
   11474     void *pointerArgs[] = {
   11475         (void *) params,
   11476     };
   11477 
   11478     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11479                               threadStartTime, threadEndTime,
   11480                               &glmsg, pointerArgs);
   11481     glContext->traceGLMessage(&glmsg);
   11482 }
   11483 
   11484 void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
   11485     GLMessage glmsg;
   11486     GLTraceContext *glContext = getGLTraceContext();
   11487 
   11488     glmsg.set_function(GLMessage::glGetMaterialfv);
   11489 
   11490     // copy argument face
   11491     GLMessage_DataType *arg_face = glmsg.add_args();
   11492     arg_face->set_isarray(false);
   11493     arg_face->set_type(GLMessage::DataType::ENUM);
   11494     arg_face->add_intvalue((int)face);
   11495 
   11496     // copy argument pname
   11497     GLMessage_DataType *arg_pname = glmsg.add_args();
   11498     arg_pname->set_isarray(false);
   11499     arg_pname->set_type(GLMessage::DataType::ENUM);
   11500     arg_pname->add_intvalue((int)pname);
   11501 
   11502     // copy argument params
   11503     GLMessage_DataType *arg_params = glmsg.add_args();
   11504     arg_params->set_isarray(false);
   11505     arg_params->set_type(GLMessage::DataType::INT);
   11506     arg_params->add_intvalue((int)params);
   11507 
   11508     // call function
   11509     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11510     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11511     glContext->hooks->gl.glGetMaterialfv(face, pname, params);
   11512     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11513     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11514 
   11515     void *pointerArgs[] = {
   11516         (void *) params,
   11517     };
   11518 
   11519     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11520                               threadStartTime, threadEndTime,
   11521                               &glmsg, pointerArgs);
   11522     glContext->traceGLMessage(&glmsg);
   11523 }
   11524 
   11525 void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
   11526     GLMessage glmsg;
   11527     GLTraceContext *glContext = getGLTraceContext();
   11528 
   11529     glmsg.set_function(GLMessage::glGetTexEnvfv);
   11530 
   11531     // copy argument env
   11532     GLMessage_DataType *arg_env = glmsg.add_args();
   11533     arg_env->set_isarray(false);
   11534     arg_env->set_type(GLMessage::DataType::ENUM);
   11535     arg_env->add_intvalue((int)env);
   11536 
   11537     // copy argument pname
   11538     GLMessage_DataType *arg_pname = glmsg.add_args();
   11539     arg_pname->set_isarray(false);
   11540     arg_pname->set_type(GLMessage::DataType::ENUM);
   11541     arg_pname->add_intvalue((int)pname);
   11542 
   11543     // copy argument params
   11544     GLMessage_DataType *arg_params = glmsg.add_args();
   11545     arg_params->set_isarray(false);
   11546     arg_params->set_type(GLMessage::DataType::INT);
   11547     arg_params->add_intvalue((int)params);
   11548 
   11549     // call function
   11550     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11551     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11552     glContext->hooks->gl.glGetTexEnvfv(env, pname, params);
   11553     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11554     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11555 
   11556     void *pointerArgs[] = {
   11557         (void *) params,
   11558     };
   11559 
   11560     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11561                               threadStartTime, threadEndTime,
   11562                               &glmsg, pointerArgs);
   11563     glContext->traceGLMessage(&glmsg);
   11564 }
   11565 
   11566 void GLTrace_glLightModelf(GLenum pname, GLfloat param) {
   11567     GLMessage glmsg;
   11568     GLTraceContext *glContext = getGLTraceContext();
   11569 
   11570     glmsg.set_function(GLMessage::glLightModelf);
   11571 
   11572     // copy argument pname
   11573     GLMessage_DataType *arg_pname = glmsg.add_args();
   11574     arg_pname->set_isarray(false);
   11575     arg_pname->set_type(GLMessage::DataType::ENUM);
   11576     arg_pname->add_intvalue((int)pname);
   11577 
   11578     // copy argument param
   11579     GLMessage_DataType *arg_param = glmsg.add_args();
   11580     arg_param->set_isarray(false);
   11581     arg_param->set_type(GLMessage::DataType::FLOAT);
   11582     arg_param->add_floatvalue(param);
   11583 
   11584     // call function
   11585     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11586     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11587     glContext->hooks->gl.glLightModelf(pname, param);
   11588     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11589     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11590 
   11591     void *pointerArgs[] = {
   11592     };
   11593 
   11594     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11595                               threadStartTime, threadEndTime,
   11596                               &glmsg, pointerArgs);
   11597     glContext->traceGLMessage(&glmsg);
   11598 }
   11599 
   11600 void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params) {
   11601     GLMessage glmsg;
   11602     GLTraceContext *glContext = getGLTraceContext();
   11603 
   11604     glmsg.set_function(GLMessage::glLightModelfv);
   11605 
   11606     // copy argument pname
   11607     GLMessage_DataType *arg_pname = glmsg.add_args();
   11608     arg_pname->set_isarray(false);
   11609     arg_pname->set_type(GLMessage::DataType::ENUM);
   11610     arg_pname->add_intvalue((int)pname);
   11611 
   11612     // copy argument params
   11613     GLMessage_DataType *arg_params = glmsg.add_args();
   11614     arg_params->set_isarray(false);
   11615     arg_params->set_type(GLMessage::DataType::INT);
   11616     arg_params->add_intvalue((int)params);
   11617 
   11618     // call function
   11619     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11620     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11621     glContext->hooks->gl.glLightModelfv(pname, params);
   11622     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11623     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11624 
   11625     void *pointerArgs[] = {
   11626         (void *) params,
   11627     };
   11628 
   11629     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11630                               threadStartTime, threadEndTime,
   11631                               &glmsg, pointerArgs);
   11632     glContext->traceGLMessage(&glmsg);
   11633 }
   11634 
   11635 void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param) {
   11636     GLMessage glmsg;
   11637     GLTraceContext *glContext = getGLTraceContext();
   11638 
   11639     glmsg.set_function(GLMessage::glLightf);
   11640 
   11641     // copy argument light
   11642     GLMessage_DataType *arg_light = glmsg.add_args();
   11643     arg_light->set_isarray(false);
   11644     arg_light->set_type(GLMessage::DataType::ENUM);
   11645     arg_light->add_intvalue((int)light);
   11646 
   11647     // copy argument pname
   11648     GLMessage_DataType *arg_pname = glmsg.add_args();
   11649     arg_pname->set_isarray(false);
   11650     arg_pname->set_type(GLMessage::DataType::ENUM);
   11651     arg_pname->add_intvalue((int)pname);
   11652 
   11653     // copy argument param
   11654     GLMessage_DataType *arg_param = glmsg.add_args();
   11655     arg_param->set_isarray(false);
   11656     arg_param->set_type(GLMessage::DataType::FLOAT);
   11657     arg_param->add_floatvalue(param);
   11658 
   11659     // call function
   11660     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11661     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11662     glContext->hooks->gl.glLightf(light, pname, param);
   11663     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11664     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11665 
   11666     void *pointerArgs[] = {
   11667     };
   11668 
   11669     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11670                               threadStartTime, threadEndTime,
   11671                               &glmsg, pointerArgs);
   11672     glContext->traceGLMessage(&glmsg);
   11673 }
   11674 
   11675 void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
   11676     GLMessage glmsg;
   11677     GLTraceContext *glContext = getGLTraceContext();
   11678 
   11679     glmsg.set_function(GLMessage::glLightfv);
   11680 
   11681     // copy argument light
   11682     GLMessage_DataType *arg_light = glmsg.add_args();
   11683     arg_light->set_isarray(false);
   11684     arg_light->set_type(GLMessage::DataType::ENUM);
   11685     arg_light->add_intvalue((int)light);
   11686 
   11687     // copy argument pname
   11688     GLMessage_DataType *arg_pname = glmsg.add_args();
   11689     arg_pname->set_isarray(false);
   11690     arg_pname->set_type(GLMessage::DataType::ENUM);
   11691     arg_pname->add_intvalue((int)pname);
   11692 
   11693     // copy argument params
   11694     GLMessage_DataType *arg_params = glmsg.add_args();
   11695     arg_params->set_isarray(false);
   11696     arg_params->set_type(GLMessage::DataType::INT);
   11697     arg_params->add_intvalue((int)params);
   11698 
   11699     // call function
   11700     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11701     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11702     glContext->hooks->gl.glLightfv(light, pname, params);
   11703     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11704     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11705 
   11706     void *pointerArgs[] = {
   11707         (void *) params,
   11708     };
   11709 
   11710     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11711                               threadStartTime, threadEndTime,
   11712                               &glmsg, pointerArgs);
   11713     glContext->traceGLMessage(&glmsg);
   11714 }
   11715 
   11716 void GLTrace_glLoadMatrixf(const GLfloat *m) {
   11717     GLMessage glmsg;
   11718     GLTraceContext *glContext = getGLTraceContext();
   11719 
   11720     glmsg.set_function(GLMessage::glLoadMatrixf);
   11721 
   11722     // copy argument m
   11723     GLMessage_DataType *arg_m = glmsg.add_args();
   11724     arg_m->set_isarray(false);
   11725     arg_m->set_type(GLMessage::DataType::INT);
   11726     arg_m->add_intvalue((int)m);
   11727 
   11728     // call function
   11729     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11730     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11731     glContext->hooks->gl.glLoadMatrixf(m);
   11732     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11733     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11734 
   11735     void *pointerArgs[] = {
   11736         (void *) m,
   11737     };
   11738 
   11739     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11740                               threadStartTime, threadEndTime,
   11741                               &glmsg, pointerArgs);
   11742     glContext->traceGLMessage(&glmsg);
   11743 }
   11744 
   11745 void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param) {
   11746     GLMessage glmsg;
   11747     GLTraceContext *glContext = getGLTraceContext();
   11748 
   11749     glmsg.set_function(GLMessage::glMaterialf);
   11750 
   11751     // copy argument face
   11752     GLMessage_DataType *arg_face = glmsg.add_args();
   11753     arg_face->set_isarray(false);
   11754     arg_face->set_type(GLMessage::DataType::ENUM);
   11755     arg_face->add_intvalue((int)face);
   11756 
   11757     // copy argument pname
   11758     GLMessage_DataType *arg_pname = glmsg.add_args();
   11759     arg_pname->set_isarray(false);
   11760     arg_pname->set_type(GLMessage::DataType::ENUM);
   11761     arg_pname->add_intvalue((int)pname);
   11762 
   11763     // copy argument param
   11764     GLMessage_DataType *arg_param = glmsg.add_args();
   11765     arg_param->set_isarray(false);
   11766     arg_param->set_type(GLMessage::DataType::FLOAT);
   11767     arg_param->add_floatvalue(param);
   11768 
   11769     // call function
   11770     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11771     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11772     glContext->hooks->gl.glMaterialf(face, pname, param);
   11773     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11774     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11775 
   11776     void *pointerArgs[] = {
   11777     };
   11778 
   11779     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11780                               threadStartTime, threadEndTime,
   11781                               &glmsg, pointerArgs);
   11782     glContext->traceGLMessage(&glmsg);
   11783 }
   11784 
   11785 void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
   11786     GLMessage glmsg;
   11787     GLTraceContext *glContext = getGLTraceContext();
   11788 
   11789     glmsg.set_function(GLMessage::glMaterialfv);
   11790 
   11791     // copy argument face
   11792     GLMessage_DataType *arg_face = glmsg.add_args();
   11793     arg_face->set_isarray(false);
   11794     arg_face->set_type(GLMessage::DataType::ENUM);
   11795     arg_face->add_intvalue((int)face);
   11796 
   11797     // copy argument pname
   11798     GLMessage_DataType *arg_pname = glmsg.add_args();
   11799     arg_pname->set_isarray(false);
   11800     arg_pname->set_type(GLMessage::DataType::ENUM);
   11801     arg_pname->add_intvalue((int)pname);
   11802 
   11803     // copy argument params
   11804     GLMessage_DataType *arg_params = glmsg.add_args();
   11805     arg_params->set_isarray(false);
   11806     arg_params->set_type(GLMessage::DataType::INT);
   11807     arg_params->add_intvalue((int)params);
   11808 
   11809     // call function
   11810     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11811     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11812     glContext->hooks->gl.glMaterialfv(face, pname, params);
   11813     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11814     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11815 
   11816     void *pointerArgs[] = {
   11817         (void *) params,
   11818     };
   11819 
   11820     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11821                               threadStartTime, threadEndTime,
   11822                               &glmsg, pointerArgs);
   11823     glContext->traceGLMessage(&glmsg);
   11824 }
   11825 
   11826 void GLTrace_glMultMatrixf(const GLfloat *m) {
   11827     GLMessage glmsg;
   11828     GLTraceContext *glContext = getGLTraceContext();
   11829 
   11830     glmsg.set_function(GLMessage::glMultMatrixf);
   11831 
   11832     // copy argument m
   11833     GLMessage_DataType *arg_m = glmsg.add_args();
   11834     arg_m->set_isarray(false);
   11835     arg_m->set_type(GLMessage::DataType::INT);
   11836     arg_m->add_intvalue((int)m);
   11837 
   11838     // call function
   11839     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11840     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11841     glContext->hooks->gl.glMultMatrixf(m);
   11842     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11843     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11844 
   11845     void *pointerArgs[] = {
   11846         (void *) m,
   11847     };
   11848 
   11849     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11850                               threadStartTime, threadEndTime,
   11851                               &glmsg, pointerArgs);
   11852     glContext->traceGLMessage(&glmsg);
   11853 }
   11854 
   11855 void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
   11856     GLMessage glmsg;
   11857     GLTraceContext *glContext = getGLTraceContext();
   11858 
   11859     glmsg.set_function(GLMessage::glMultiTexCoord4f);
   11860 
   11861     // copy argument target
   11862     GLMessage_DataType *arg_target = glmsg.add_args();
   11863     arg_target->set_isarray(false);
   11864     arg_target->set_type(GLMessage::DataType::ENUM);
   11865     arg_target->add_intvalue((int)target);
   11866 
   11867     // copy argument s
   11868     GLMessage_DataType *arg_s = glmsg.add_args();
   11869     arg_s->set_isarray(false);
   11870     arg_s->set_type(GLMessage::DataType::FLOAT);
   11871     arg_s->add_floatvalue(s);
   11872 
   11873     // copy argument t
   11874     GLMessage_DataType *arg_t = glmsg.add_args();
   11875     arg_t->set_isarray(false);
   11876     arg_t->set_type(GLMessage::DataType::FLOAT);
   11877     arg_t->add_floatvalue(t);
   11878 
   11879     // copy argument r
   11880     GLMessage_DataType *arg_r = glmsg.add_args();
   11881     arg_r->set_isarray(false);
   11882     arg_r->set_type(GLMessage::DataType::FLOAT);
   11883     arg_r->add_floatvalue(r);
   11884 
   11885     // copy argument q
   11886     GLMessage_DataType *arg_q = glmsg.add_args();
   11887     arg_q->set_isarray(false);
   11888     arg_q->set_type(GLMessage::DataType::FLOAT);
   11889     arg_q->add_floatvalue(q);
   11890 
   11891     // call function
   11892     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11893     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11894     glContext->hooks->gl.glMultiTexCoord4f(target, s, t, r, q);
   11895     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11896     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11897 
   11898     void *pointerArgs[] = {
   11899     };
   11900 
   11901     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11902                               threadStartTime, threadEndTime,
   11903                               &glmsg, pointerArgs);
   11904     glContext->traceGLMessage(&glmsg);
   11905 }
   11906 
   11907 void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) {
   11908     GLMessage glmsg;
   11909     GLTraceContext *glContext = getGLTraceContext();
   11910 
   11911     glmsg.set_function(GLMessage::glNormal3f);
   11912 
   11913     // copy argument nx
   11914     GLMessage_DataType *arg_nx = glmsg.add_args();
   11915     arg_nx->set_isarray(false);
   11916     arg_nx->set_type(GLMessage::DataType::FLOAT);
   11917     arg_nx->add_floatvalue(nx);
   11918 
   11919     // copy argument ny
   11920     GLMessage_DataType *arg_ny = glmsg.add_args();
   11921     arg_ny->set_isarray(false);
   11922     arg_ny->set_type(GLMessage::DataType::FLOAT);
   11923     arg_ny->add_floatvalue(ny);
   11924 
   11925     // copy argument nz
   11926     GLMessage_DataType *arg_nz = glmsg.add_args();
   11927     arg_nz->set_isarray(false);
   11928     arg_nz->set_type(GLMessage::DataType::FLOAT);
   11929     arg_nz->add_floatvalue(nz);
   11930 
   11931     // call function
   11932     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11933     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11934     glContext->hooks->gl.glNormal3f(nx, ny, nz);
   11935     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11936     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11937 
   11938     void *pointerArgs[] = {
   11939     };
   11940 
   11941     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11942                               threadStartTime, threadEndTime,
   11943                               &glmsg, pointerArgs);
   11944     glContext->traceGLMessage(&glmsg);
   11945 }
   11946 
   11947 void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   11948     GLMessage glmsg;
   11949     GLTraceContext *glContext = getGLTraceContext();
   11950 
   11951     glmsg.set_function(GLMessage::glOrthof);
   11952 
   11953     // copy argument left
   11954     GLMessage_DataType *arg_left = glmsg.add_args();
   11955     arg_left->set_isarray(false);
   11956     arg_left->set_type(GLMessage::DataType::FLOAT);
   11957     arg_left->add_floatvalue(left);
   11958 
   11959     // copy argument right
   11960     GLMessage_DataType *arg_right = glmsg.add_args();
   11961     arg_right->set_isarray(false);
   11962     arg_right->set_type(GLMessage::DataType::FLOAT);
   11963     arg_right->add_floatvalue(right);
   11964 
   11965     // copy argument bottom
   11966     GLMessage_DataType *arg_bottom = glmsg.add_args();
   11967     arg_bottom->set_isarray(false);
   11968     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   11969     arg_bottom->add_floatvalue(bottom);
   11970 
   11971     // copy argument top
   11972     GLMessage_DataType *arg_top = glmsg.add_args();
   11973     arg_top->set_isarray(false);
   11974     arg_top->set_type(GLMessage::DataType::FLOAT);
   11975     arg_top->add_floatvalue(top);
   11976 
   11977     // copy argument zNear
   11978     GLMessage_DataType *arg_zNear = glmsg.add_args();
   11979     arg_zNear->set_isarray(false);
   11980     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   11981     arg_zNear->add_floatvalue(zNear);
   11982 
   11983     // copy argument zFar
   11984     GLMessage_DataType *arg_zFar = glmsg.add_args();
   11985     arg_zFar->set_isarray(false);
   11986     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   11987     arg_zFar->add_floatvalue(zFar);
   11988 
   11989     // call function
   11990     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11991     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11992     glContext->hooks->gl.glOrthof(left, right, bottom, top, zNear, zFar);
   11993     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11994     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11995 
   11996     void *pointerArgs[] = {
   11997     };
   11998 
   11999     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12000                               threadStartTime, threadEndTime,
   12001                               &glmsg, pointerArgs);
   12002     glContext->traceGLMessage(&glmsg);
   12003 }
   12004 
   12005 void GLTrace_glPointParameterf(GLenum pname, GLfloat param) {
   12006     GLMessage glmsg;
   12007     GLTraceContext *glContext = getGLTraceContext();
   12008 
   12009     glmsg.set_function(GLMessage::glPointParameterf);
   12010 
   12011     // copy argument pname
   12012     GLMessage_DataType *arg_pname = glmsg.add_args();
   12013     arg_pname->set_isarray(false);
   12014     arg_pname->set_type(GLMessage::DataType::ENUM);
   12015     arg_pname->add_intvalue((int)pname);
   12016 
   12017     // copy argument param
   12018     GLMessage_DataType *arg_param = glmsg.add_args();
   12019     arg_param->set_isarray(false);
   12020     arg_param->set_type(GLMessage::DataType::FLOAT);
   12021     arg_param->add_floatvalue(param);
   12022 
   12023     // call function
   12024     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12025     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12026     glContext->hooks->gl.glPointParameterf(pname, param);
   12027     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12028     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12029 
   12030     void *pointerArgs[] = {
   12031     };
   12032 
   12033     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12034                               threadStartTime, threadEndTime,
   12035                               &glmsg, pointerArgs);
   12036     glContext->traceGLMessage(&glmsg);
   12037 }
   12038 
   12039 void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params) {
   12040     GLMessage glmsg;
   12041     GLTraceContext *glContext = getGLTraceContext();
   12042 
   12043     glmsg.set_function(GLMessage::glPointParameterfv);
   12044 
   12045     // copy argument pname
   12046     GLMessage_DataType *arg_pname = glmsg.add_args();
   12047     arg_pname->set_isarray(false);
   12048     arg_pname->set_type(GLMessage::DataType::ENUM);
   12049     arg_pname->add_intvalue((int)pname);
   12050 
   12051     // copy argument params
   12052     GLMessage_DataType *arg_params = glmsg.add_args();
   12053     arg_params->set_isarray(false);
   12054     arg_params->set_type(GLMessage::DataType::INT);
   12055     arg_params->add_intvalue((int)params);
   12056 
   12057     // call function
   12058     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12059     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12060     glContext->hooks->gl.glPointParameterfv(pname, params);
   12061     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12062     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12063 
   12064     void *pointerArgs[] = {
   12065         (void *) params,
   12066     };
   12067 
   12068     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12069                               threadStartTime, threadEndTime,
   12070                               &glmsg, pointerArgs);
   12071     glContext->traceGLMessage(&glmsg);
   12072 }
   12073 
   12074 void GLTrace_glPointSize(GLfloat size) {
   12075     GLMessage glmsg;
   12076     GLTraceContext *glContext = getGLTraceContext();
   12077 
   12078     glmsg.set_function(GLMessage::glPointSize);
   12079 
   12080     // copy argument size
   12081     GLMessage_DataType *arg_size = glmsg.add_args();
   12082     arg_size->set_isarray(false);
   12083     arg_size->set_type(GLMessage::DataType::FLOAT);
   12084     arg_size->add_floatvalue(size);
   12085 
   12086     // call function
   12087     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12088     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12089     glContext->hooks->gl.glPointSize(size);
   12090     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12091     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12092 
   12093     void *pointerArgs[] = {
   12094     };
   12095 
   12096     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12097                               threadStartTime, threadEndTime,
   12098                               &glmsg, pointerArgs);
   12099     glContext->traceGLMessage(&glmsg);
   12100 }
   12101 
   12102 void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
   12103     GLMessage glmsg;
   12104     GLTraceContext *glContext = getGLTraceContext();
   12105 
   12106     glmsg.set_function(GLMessage::glRotatef);
   12107 
   12108     // copy argument angle
   12109     GLMessage_DataType *arg_angle = glmsg.add_args();
   12110     arg_angle->set_isarray(false);
   12111     arg_angle->set_type(GLMessage::DataType::FLOAT);
   12112     arg_angle->add_floatvalue(angle);
   12113 
   12114     // copy argument x
   12115     GLMessage_DataType *arg_x = glmsg.add_args();
   12116     arg_x->set_isarray(false);
   12117     arg_x->set_type(GLMessage::DataType::FLOAT);
   12118     arg_x->add_floatvalue(x);
   12119 
   12120     // copy argument y
   12121     GLMessage_DataType *arg_y = glmsg.add_args();
   12122     arg_y->set_isarray(false);
   12123     arg_y->set_type(GLMessage::DataType::FLOAT);
   12124     arg_y->add_floatvalue(y);
   12125 
   12126     // copy argument z
   12127     GLMessage_DataType *arg_z = glmsg.add_args();
   12128     arg_z->set_isarray(false);
   12129     arg_z->set_type(GLMessage::DataType::FLOAT);
   12130     arg_z->add_floatvalue(z);
   12131 
   12132     // call function
   12133     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12134     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12135     glContext->hooks->gl.glRotatef(angle, x, y, z);
   12136     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12137     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12138 
   12139     void *pointerArgs[] = {
   12140     };
   12141 
   12142     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12143                               threadStartTime, threadEndTime,
   12144                               &glmsg, pointerArgs);
   12145     glContext->traceGLMessage(&glmsg);
   12146 }
   12147 
   12148 void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z) {
   12149     GLMessage glmsg;
   12150     GLTraceContext *glContext = getGLTraceContext();
   12151 
   12152     glmsg.set_function(GLMessage::glScalef);
   12153 
   12154     // copy argument x
   12155     GLMessage_DataType *arg_x = glmsg.add_args();
   12156     arg_x->set_isarray(false);
   12157     arg_x->set_type(GLMessage::DataType::FLOAT);
   12158     arg_x->add_floatvalue(x);
   12159 
   12160     // copy argument y
   12161     GLMessage_DataType *arg_y = glmsg.add_args();
   12162     arg_y->set_isarray(false);
   12163     arg_y->set_type(GLMessage::DataType::FLOAT);
   12164     arg_y->add_floatvalue(y);
   12165 
   12166     // copy argument z
   12167     GLMessage_DataType *arg_z = glmsg.add_args();
   12168     arg_z->set_isarray(false);
   12169     arg_z->set_type(GLMessage::DataType::FLOAT);
   12170     arg_z->add_floatvalue(z);
   12171 
   12172     // call function
   12173     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12174     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12175     glContext->hooks->gl.glScalef(x, y, z);
   12176     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12177     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12178 
   12179     void *pointerArgs[] = {
   12180     };
   12181 
   12182     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12183                               threadStartTime, threadEndTime,
   12184                               &glmsg, pointerArgs);
   12185     glContext->traceGLMessage(&glmsg);
   12186 }
   12187 
   12188 void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
   12189     GLMessage glmsg;
   12190     GLTraceContext *glContext = getGLTraceContext();
   12191 
   12192     glmsg.set_function(GLMessage::glTexEnvf);
   12193 
   12194     // copy argument target
   12195     GLMessage_DataType *arg_target = glmsg.add_args();
   12196     arg_target->set_isarray(false);
   12197     arg_target->set_type(GLMessage::DataType::ENUM);
   12198     arg_target->add_intvalue((int)target);
   12199 
   12200     // copy argument pname
   12201     GLMessage_DataType *arg_pname = glmsg.add_args();
   12202     arg_pname->set_isarray(false);
   12203     arg_pname->set_type(GLMessage::DataType::ENUM);
   12204     arg_pname->add_intvalue((int)pname);
   12205 
   12206     // copy argument param
   12207     GLMessage_DataType *arg_param = glmsg.add_args();
   12208     arg_param->set_isarray(false);
   12209     arg_param->set_type(GLMessage::DataType::FLOAT);
   12210     arg_param->add_floatvalue(param);
   12211 
   12212     // call function
   12213     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12214     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12215     glContext->hooks->gl.glTexEnvf(target, pname, param);
   12216     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12217     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12218 
   12219     void *pointerArgs[] = {
   12220     };
   12221 
   12222     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12223                               threadStartTime, threadEndTime,
   12224                               &glmsg, pointerArgs);
   12225     glContext->traceGLMessage(&glmsg);
   12226 }
   12227 
   12228 void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
   12229     GLMessage glmsg;
   12230     GLTraceContext *glContext = getGLTraceContext();
   12231 
   12232     glmsg.set_function(GLMessage::glTexEnvfv);
   12233 
   12234     // copy argument target
   12235     GLMessage_DataType *arg_target = glmsg.add_args();
   12236     arg_target->set_isarray(false);
   12237     arg_target->set_type(GLMessage::DataType::ENUM);
   12238     arg_target->add_intvalue((int)target);
   12239 
   12240     // copy argument pname
   12241     GLMessage_DataType *arg_pname = glmsg.add_args();
   12242     arg_pname->set_isarray(false);
   12243     arg_pname->set_type(GLMessage::DataType::ENUM);
   12244     arg_pname->add_intvalue((int)pname);
   12245 
   12246     // copy argument params
   12247     GLMessage_DataType *arg_params = glmsg.add_args();
   12248     arg_params->set_isarray(false);
   12249     arg_params->set_type(GLMessage::DataType::INT);
   12250     arg_params->add_intvalue((int)params);
   12251 
   12252     // call function
   12253     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12254     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12255     glContext->hooks->gl.glTexEnvfv(target, pname, params);
   12256     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12257     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12258 
   12259     void *pointerArgs[] = {
   12260         (void *) params,
   12261     };
   12262 
   12263     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12264                               threadStartTime, threadEndTime,
   12265                               &glmsg, pointerArgs);
   12266     glContext->traceGLMessage(&glmsg);
   12267 }
   12268 
   12269 void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
   12270     GLMessage glmsg;
   12271     GLTraceContext *glContext = getGLTraceContext();
   12272 
   12273     glmsg.set_function(GLMessage::glTranslatef);
   12274 
   12275     // copy argument x
   12276     GLMessage_DataType *arg_x = glmsg.add_args();
   12277     arg_x->set_isarray(false);
   12278     arg_x->set_type(GLMessage::DataType::FLOAT);
   12279     arg_x->add_floatvalue(x);
   12280 
   12281     // copy argument y
   12282     GLMessage_DataType *arg_y = glmsg.add_args();
   12283     arg_y->set_isarray(false);
   12284     arg_y->set_type(GLMessage::DataType::FLOAT);
   12285     arg_y->add_floatvalue(y);
   12286 
   12287     // copy argument z
   12288     GLMessage_DataType *arg_z = glmsg.add_args();
   12289     arg_z->set_isarray(false);
   12290     arg_z->set_type(GLMessage::DataType::FLOAT);
   12291     arg_z->add_floatvalue(z);
   12292 
   12293     // call function
   12294     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12295     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12296     glContext->hooks->gl.glTranslatef(x, y, z);
   12297     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12298     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12299 
   12300     void *pointerArgs[] = {
   12301     };
   12302 
   12303     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12304                               threadStartTime, threadEndTime,
   12305                               &glmsg, pointerArgs);
   12306     glContext->traceGLMessage(&glmsg);
   12307 }
   12308 
   12309 void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref) {
   12310     GLMessage glmsg;
   12311     GLTraceContext *glContext = getGLTraceContext();
   12312 
   12313     glmsg.set_function(GLMessage::glAlphaFuncx);
   12314 
   12315     // copy argument func
   12316     GLMessage_DataType *arg_func = glmsg.add_args();
   12317     arg_func->set_isarray(false);
   12318     arg_func->set_type(GLMessage::DataType::ENUM);
   12319     arg_func->add_intvalue((int)func);
   12320 
   12321     // copy argument ref
   12322     GLMessage_DataType *arg_ref = glmsg.add_args();
   12323     arg_ref->set_isarray(false);
   12324     arg_ref->set_type(GLMessage::DataType::INT);
   12325     arg_ref->add_intvalue(ref);
   12326 
   12327     // call function
   12328     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12329     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12330     glContext->hooks->gl.glAlphaFuncx(func, ref);
   12331     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12332     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12333 
   12334     void *pointerArgs[] = {
   12335     };
   12336 
   12337     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12338                               threadStartTime, threadEndTime,
   12339                               &glmsg, pointerArgs);
   12340     glContext->traceGLMessage(&glmsg);
   12341 }
   12342 
   12343 void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
   12344     GLMessage glmsg;
   12345     GLTraceContext *glContext = getGLTraceContext();
   12346 
   12347     glmsg.set_function(GLMessage::glClearColorx);
   12348 
   12349     // copy argument red
   12350     GLMessage_DataType *arg_red = glmsg.add_args();
   12351     arg_red->set_isarray(false);
   12352     arg_red->set_type(GLMessage::DataType::INT);
   12353     arg_red->add_intvalue(red);
   12354 
   12355     // copy argument green
   12356     GLMessage_DataType *arg_green = glmsg.add_args();
   12357     arg_green->set_isarray(false);
   12358     arg_green->set_type(GLMessage::DataType::INT);
   12359     arg_green->add_intvalue(green);
   12360 
   12361     // copy argument blue
   12362     GLMessage_DataType *arg_blue = glmsg.add_args();
   12363     arg_blue->set_isarray(false);
   12364     arg_blue->set_type(GLMessage::DataType::INT);
   12365     arg_blue->add_intvalue(blue);
   12366 
   12367     // copy argument alpha
   12368     GLMessage_DataType *arg_alpha = glmsg.add_args();
   12369     arg_alpha->set_isarray(false);
   12370     arg_alpha->set_type(GLMessage::DataType::INT);
   12371     arg_alpha->add_intvalue(alpha);
   12372 
   12373     // call function
   12374     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12375     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12376     glContext->hooks->gl.glClearColorx(red, green, blue, alpha);
   12377     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12378     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12379 
   12380     void *pointerArgs[] = {
   12381     };
   12382 
   12383     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12384                               threadStartTime, threadEndTime,
   12385                               &glmsg, pointerArgs);
   12386     glContext->traceGLMessage(&glmsg);
   12387 }
   12388 
   12389 void GLTrace_glClearDepthx(GLclampx depth) {
   12390     GLMessage glmsg;
   12391     GLTraceContext *glContext = getGLTraceContext();
   12392 
   12393     glmsg.set_function(GLMessage::glClearDepthx);
   12394 
   12395     // copy argument depth
   12396     GLMessage_DataType *arg_depth = glmsg.add_args();
   12397     arg_depth->set_isarray(false);
   12398     arg_depth->set_type(GLMessage::DataType::INT);
   12399     arg_depth->add_intvalue(depth);
   12400 
   12401     // call function
   12402     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12403     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12404     glContext->hooks->gl.glClearDepthx(depth);
   12405     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12406     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12407 
   12408     void *pointerArgs[] = {
   12409     };
   12410 
   12411     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12412                               threadStartTime, threadEndTime,
   12413                               &glmsg, pointerArgs);
   12414     glContext->traceGLMessage(&glmsg);
   12415 }
   12416 
   12417 void GLTrace_glClientActiveTexture(GLenum texture) {
   12418     GLMessage glmsg;
   12419     GLTraceContext *glContext = getGLTraceContext();
   12420 
   12421     glmsg.set_function(GLMessage::glClientActiveTexture);
   12422 
   12423     // copy argument texture
   12424     GLMessage_DataType *arg_texture = glmsg.add_args();
   12425     arg_texture->set_isarray(false);
   12426     arg_texture->set_type(GLMessage::DataType::ENUM);
   12427     arg_texture->add_intvalue((int)texture);
   12428 
   12429     // call function
   12430     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12431     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12432     glContext->hooks->gl.glClientActiveTexture(texture);
   12433     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12434     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12435 
   12436     void *pointerArgs[] = {
   12437     };
   12438 
   12439     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12440                               threadStartTime, threadEndTime,
   12441                               &glmsg, pointerArgs);
   12442     glContext->traceGLMessage(&glmsg);
   12443 }
   12444 
   12445 void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation) {
   12446     GLMessage glmsg;
   12447     GLTraceContext *glContext = getGLTraceContext();
   12448 
   12449     glmsg.set_function(GLMessage::glClipPlanex);
   12450 
   12451     // copy argument plane
   12452     GLMessage_DataType *arg_plane = glmsg.add_args();
   12453     arg_plane->set_isarray(false);
   12454     arg_plane->set_type(GLMessage::DataType::ENUM);
   12455     arg_plane->add_intvalue((int)plane);
   12456 
   12457     // copy argument equation
   12458     GLMessage_DataType *arg_equation = glmsg.add_args();
   12459     arg_equation->set_isarray(false);
   12460     arg_equation->set_type(GLMessage::DataType::INT);
   12461     arg_equation->add_intvalue((int)equation);
   12462 
   12463     // call function
   12464     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12465     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12466     glContext->hooks->gl.glClipPlanex(plane, equation);
   12467     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12468     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12469 
   12470     void *pointerArgs[] = {
   12471         (void *) equation,
   12472     };
   12473 
   12474     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12475                               threadStartTime, threadEndTime,
   12476                               &glmsg, pointerArgs);
   12477     glContext->traceGLMessage(&glmsg);
   12478 }
   12479 
   12480 void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
   12481     GLMessage glmsg;
   12482     GLTraceContext *glContext = getGLTraceContext();
   12483 
   12484     glmsg.set_function(GLMessage::glColor4ub);
   12485 
   12486     // copy argument red
   12487     GLMessage_DataType *arg_red = glmsg.add_args();
   12488     arg_red->set_isarray(false);
   12489     arg_red->set_type(GLMessage::DataType::BYTE);
   12490     arg_red->add_intvalue((int)red);
   12491 
   12492     // copy argument green
   12493     GLMessage_DataType *arg_green = glmsg.add_args();
   12494     arg_green->set_isarray(false);
   12495     arg_green->set_type(GLMessage::DataType::BYTE);
   12496     arg_green->add_intvalue((int)green);
   12497 
   12498     // copy argument blue
   12499     GLMessage_DataType *arg_blue = glmsg.add_args();
   12500     arg_blue->set_isarray(false);
   12501     arg_blue->set_type(GLMessage::DataType::BYTE);
   12502     arg_blue->add_intvalue((int)blue);
   12503 
   12504     // copy argument alpha
   12505     GLMessage_DataType *arg_alpha = glmsg.add_args();
   12506     arg_alpha->set_isarray(false);
   12507     arg_alpha->set_type(GLMessage::DataType::BYTE);
   12508     arg_alpha->add_intvalue((int)alpha);
   12509 
   12510     // call function
   12511     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12512     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12513     glContext->hooks->gl.glColor4ub(red, green, blue, alpha);
   12514     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12515     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12516 
   12517     void *pointerArgs[] = {
   12518     };
   12519 
   12520     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12521                               threadStartTime, threadEndTime,
   12522                               &glmsg, pointerArgs);
   12523     glContext->traceGLMessage(&glmsg);
   12524 }
   12525 
   12526 void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
   12527     GLMessage glmsg;
   12528     GLTraceContext *glContext = getGLTraceContext();
   12529 
   12530     glmsg.set_function(GLMessage::glColor4x);
   12531 
   12532     // copy argument red
   12533     GLMessage_DataType *arg_red = glmsg.add_args();
   12534     arg_red->set_isarray(false);
   12535     arg_red->set_type(GLMessage::DataType::INT);
   12536     arg_red->add_intvalue(red);
   12537 
   12538     // copy argument green
   12539     GLMessage_DataType *arg_green = glmsg.add_args();
   12540     arg_green->set_isarray(false);
   12541     arg_green->set_type(GLMessage::DataType::INT);
   12542     arg_green->add_intvalue(green);
   12543 
   12544     // copy argument blue
   12545     GLMessage_DataType *arg_blue = glmsg.add_args();
   12546     arg_blue->set_isarray(false);
   12547     arg_blue->set_type(GLMessage::DataType::INT);
   12548     arg_blue->add_intvalue(blue);
   12549 
   12550     // copy argument alpha
   12551     GLMessage_DataType *arg_alpha = glmsg.add_args();
   12552     arg_alpha->set_isarray(false);
   12553     arg_alpha->set_type(GLMessage::DataType::INT);
   12554     arg_alpha->add_intvalue(alpha);
   12555 
   12556     // call function
   12557     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12558     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12559     glContext->hooks->gl.glColor4x(red, green, blue, alpha);
   12560     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12561     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12562 
   12563     void *pointerArgs[] = {
   12564     };
   12565 
   12566     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12567                               threadStartTime, threadEndTime,
   12568                               &glmsg, pointerArgs);
   12569     glContext->traceGLMessage(&glmsg);
   12570 }
   12571 
   12572 void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   12573     GLMessage glmsg;
   12574     GLTraceContext *glContext = getGLTraceContext();
   12575 
   12576     glmsg.set_function(GLMessage::glColorPointer);
   12577 
   12578     // copy argument size
   12579     GLMessage_DataType *arg_size = glmsg.add_args();
   12580     arg_size->set_isarray(false);
   12581     arg_size->set_type(GLMessage::DataType::INT);
   12582     arg_size->add_intvalue(size);
   12583 
   12584     // copy argument type
   12585     GLMessage_DataType *arg_type = glmsg.add_args();
   12586     arg_type->set_isarray(false);
   12587     arg_type->set_type(GLMessage::DataType::ENUM);
   12588     arg_type->add_intvalue((int)type);
   12589 
   12590     // copy argument stride
   12591     GLMessage_DataType *arg_stride = glmsg.add_args();
   12592     arg_stride->set_isarray(false);
   12593     arg_stride->set_type(GLMessage::DataType::INT);
   12594     arg_stride->add_intvalue(stride);
   12595 
   12596     // copy argument pointer
   12597     GLMessage_DataType *arg_pointer = glmsg.add_args();
   12598     arg_pointer->set_isarray(false);
   12599     arg_pointer->set_type(GLMessage::DataType::INT);
   12600     arg_pointer->add_intvalue((int)pointer);
   12601 
   12602     // call function
   12603     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12604     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12605     glContext->hooks->gl.glColorPointer(size, type, stride, pointer);
   12606     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12607     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12608 
   12609     void *pointerArgs[] = {
   12610         (void *) pointer,
   12611     };
   12612 
   12613     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12614                               threadStartTime, threadEndTime,
   12615                               &glmsg, pointerArgs);
   12616     glContext->traceGLMessage(&glmsg);
   12617 }
   12618 
   12619 void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar) {
   12620     GLMessage glmsg;
   12621     GLTraceContext *glContext = getGLTraceContext();
   12622 
   12623     glmsg.set_function(GLMessage::glDepthRangex);
   12624 
   12625     // copy argument zNear
   12626     GLMessage_DataType *arg_zNear = glmsg.add_args();
   12627     arg_zNear->set_isarray(false);
   12628     arg_zNear->set_type(GLMessage::DataType::INT);
   12629     arg_zNear->add_intvalue(zNear);
   12630 
   12631     // copy argument zFar
   12632     GLMessage_DataType *arg_zFar = glmsg.add_args();
   12633     arg_zFar->set_isarray(false);
   12634     arg_zFar->set_type(GLMessage::DataType::INT);
   12635     arg_zFar->add_intvalue(zFar);
   12636 
   12637     // call function
   12638     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12639     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12640     glContext->hooks->gl.glDepthRangex(zNear, zFar);
   12641     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12642     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12643 
   12644     void *pointerArgs[] = {
   12645     };
   12646 
   12647     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12648                               threadStartTime, threadEndTime,
   12649                               &glmsg, pointerArgs);
   12650     glContext->traceGLMessage(&glmsg);
   12651 }
   12652 
   12653 void GLTrace_glDisableClientState(GLenum array) {
   12654     GLMessage glmsg;
   12655     GLTraceContext *glContext = getGLTraceContext();
   12656 
   12657     glmsg.set_function(GLMessage::glDisableClientState);
   12658 
   12659     // copy argument array
   12660     GLMessage_DataType *arg_array = glmsg.add_args();
   12661     arg_array->set_isarray(false);
   12662     arg_array->set_type(GLMessage::DataType::ENUM);
   12663     arg_array->add_intvalue((int)array);
   12664 
   12665     // call function
   12666     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12667     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12668     glContext->hooks->gl.glDisableClientState(array);
   12669     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12670     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12671 
   12672     void *pointerArgs[] = {
   12673     };
   12674 
   12675     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12676                               threadStartTime, threadEndTime,
   12677                               &glmsg, pointerArgs);
   12678     glContext->traceGLMessage(&glmsg);
   12679 }
   12680 
   12681 void GLTrace_glEnableClientState(GLenum array) {
   12682     GLMessage glmsg;
   12683     GLTraceContext *glContext = getGLTraceContext();
   12684 
   12685     glmsg.set_function(GLMessage::glEnableClientState);
   12686 
   12687     // copy argument array
   12688     GLMessage_DataType *arg_array = glmsg.add_args();
   12689     arg_array->set_isarray(false);
   12690     arg_array->set_type(GLMessage::DataType::ENUM);
   12691     arg_array->add_intvalue((int)array);
   12692 
   12693     // call function
   12694     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12695     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12696     glContext->hooks->gl.glEnableClientState(array);
   12697     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12698     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12699 
   12700     void *pointerArgs[] = {
   12701     };
   12702 
   12703     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12704                               threadStartTime, threadEndTime,
   12705                               &glmsg, pointerArgs);
   12706     glContext->traceGLMessage(&glmsg);
   12707 }
   12708 
   12709 void GLTrace_glFogx(GLenum pname, GLfixed param) {
   12710     GLMessage glmsg;
   12711     GLTraceContext *glContext = getGLTraceContext();
   12712 
   12713     glmsg.set_function(GLMessage::glFogx);
   12714 
   12715     // copy argument pname
   12716     GLMessage_DataType *arg_pname = glmsg.add_args();
   12717     arg_pname->set_isarray(false);
   12718     arg_pname->set_type(GLMessage::DataType::ENUM);
   12719     arg_pname->add_intvalue((int)pname);
   12720 
   12721     // copy argument param
   12722     GLMessage_DataType *arg_param = glmsg.add_args();
   12723     arg_param->set_isarray(false);
   12724     arg_param->set_type(GLMessage::DataType::INT);
   12725     arg_param->add_intvalue(param);
   12726 
   12727     // call function
   12728     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12729     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12730     glContext->hooks->gl.glFogx(pname, param);
   12731     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12732     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12733 
   12734     void *pointerArgs[] = {
   12735     };
   12736 
   12737     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12738                               threadStartTime, threadEndTime,
   12739                               &glmsg, pointerArgs);
   12740     glContext->traceGLMessage(&glmsg);
   12741 }
   12742 
   12743 void GLTrace_glFogxv(GLenum pname, const GLfixed *params) {
   12744     GLMessage glmsg;
   12745     GLTraceContext *glContext = getGLTraceContext();
   12746 
   12747     glmsg.set_function(GLMessage::glFogxv);
   12748 
   12749     // copy argument pname
   12750     GLMessage_DataType *arg_pname = glmsg.add_args();
   12751     arg_pname->set_isarray(false);
   12752     arg_pname->set_type(GLMessage::DataType::ENUM);
   12753     arg_pname->add_intvalue((int)pname);
   12754 
   12755     // copy argument params
   12756     GLMessage_DataType *arg_params = glmsg.add_args();
   12757     arg_params->set_isarray(false);
   12758     arg_params->set_type(GLMessage::DataType::INT);
   12759     arg_params->add_intvalue((int)params);
   12760 
   12761     // call function
   12762     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12763     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12764     glContext->hooks->gl.glFogxv(pname, params);
   12765     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12766     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12767 
   12768     void *pointerArgs[] = {
   12769         (void *) params,
   12770     };
   12771 
   12772     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12773                               threadStartTime, threadEndTime,
   12774                               &glmsg, pointerArgs);
   12775     glContext->traceGLMessage(&glmsg);
   12776 }
   12777 
   12778 void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   12779     GLMessage glmsg;
   12780     GLTraceContext *glContext = getGLTraceContext();
   12781 
   12782     glmsg.set_function(GLMessage::glFrustumx);
   12783 
   12784     // copy argument left
   12785     GLMessage_DataType *arg_left = glmsg.add_args();
   12786     arg_left->set_isarray(false);
   12787     arg_left->set_type(GLMessage::DataType::INT);
   12788     arg_left->add_intvalue(left);
   12789 
   12790     // copy argument right
   12791     GLMessage_DataType *arg_right = glmsg.add_args();
   12792     arg_right->set_isarray(false);
   12793     arg_right->set_type(GLMessage::DataType::INT);
   12794     arg_right->add_intvalue(right);
   12795 
   12796     // copy argument bottom
   12797     GLMessage_DataType *arg_bottom = glmsg.add_args();
   12798     arg_bottom->set_isarray(false);
   12799     arg_bottom->set_type(GLMessage::DataType::INT);
   12800     arg_bottom->add_intvalue(bottom);
   12801 
   12802     // copy argument top
   12803     GLMessage_DataType *arg_top = glmsg.add_args();
   12804     arg_top->set_isarray(false);
   12805     arg_top->set_type(GLMessage::DataType::INT);
   12806     arg_top->add_intvalue(top);
   12807 
   12808     // copy argument zNear
   12809     GLMessage_DataType *arg_zNear = glmsg.add_args();
   12810     arg_zNear->set_isarray(false);
   12811     arg_zNear->set_type(GLMessage::DataType::INT);
   12812     arg_zNear->add_intvalue(zNear);
   12813 
   12814     // copy argument zFar
   12815     GLMessage_DataType *arg_zFar = glmsg.add_args();
   12816     arg_zFar->set_isarray(false);
   12817     arg_zFar->set_type(GLMessage::DataType::INT);
   12818     arg_zFar->add_intvalue(zFar);
   12819 
   12820     // call function
   12821     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12822     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12823     glContext->hooks->gl.glFrustumx(left, right, bottom, top, zNear, zFar);
   12824     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12825     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12826 
   12827     void *pointerArgs[] = {
   12828     };
   12829 
   12830     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12831                               threadStartTime, threadEndTime,
   12832                               &glmsg, pointerArgs);
   12833     glContext->traceGLMessage(&glmsg);
   12834 }
   12835 
   12836 void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
   12837     GLMessage glmsg;
   12838     GLTraceContext *glContext = getGLTraceContext();
   12839 
   12840     glmsg.set_function(GLMessage::glGetClipPlanex);
   12841 
   12842     // copy argument pname
   12843     GLMessage_DataType *arg_pname = glmsg.add_args();
   12844     arg_pname->set_isarray(false);
   12845     arg_pname->set_type(GLMessage::DataType::ENUM);
   12846     arg_pname->add_intvalue((int)pname);
   12847 
   12848     // copy argument eqn
   12849     GLMessage_DataType *arg_eqn = glmsg.add_args();
   12850     arg_eqn->set_isarray(false);
   12851     arg_eqn->set_type(GLMessage::DataType::INT);
   12852     arg_eqn->add_intvalue((int)eqn);
   12853 
   12854     // call function
   12855     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12856     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12857     glContext->hooks->gl.glGetClipPlanex(pname, eqn);
   12858     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12859     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12860 
   12861     void *pointerArgs[] = {
   12862         (void *) eqn,
   12863     };
   12864 
   12865     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12866                               threadStartTime, threadEndTime,
   12867                               &glmsg, pointerArgs);
   12868     glContext->traceGLMessage(&glmsg);
   12869 }
   12870 
   12871 void GLTrace_glGetFixedv(GLenum pname, GLfixed *params) {
   12872     GLMessage glmsg;
   12873     GLTraceContext *glContext = getGLTraceContext();
   12874 
   12875     glmsg.set_function(GLMessage::glGetFixedv);
   12876 
   12877     // copy argument pname
   12878     GLMessage_DataType *arg_pname = glmsg.add_args();
   12879     arg_pname->set_isarray(false);
   12880     arg_pname->set_type(GLMessage::DataType::ENUM);
   12881     arg_pname->add_intvalue((int)pname);
   12882 
   12883     // copy argument params
   12884     GLMessage_DataType *arg_params = glmsg.add_args();
   12885     arg_params->set_isarray(false);
   12886     arg_params->set_type(GLMessage::DataType::INT);
   12887     arg_params->add_intvalue((int)params);
   12888 
   12889     // call function
   12890     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12891     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12892     glContext->hooks->gl.glGetFixedv(pname, params);
   12893     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12894     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12895 
   12896     void *pointerArgs[] = {
   12897         (void *) params,
   12898     };
   12899 
   12900     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12901                               threadStartTime, threadEndTime,
   12902                               &glmsg, pointerArgs);
   12903     glContext->traceGLMessage(&glmsg);
   12904 }
   12905 
   12906 void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
   12907     GLMessage glmsg;
   12908     GLTraceContext *glContext = getGLTraceContext();
   12909 
   12910     glmsg.set_function(GLMessage::glGetLightxv);
   12911 
   12912     // copy argument light
   12913     GLMessage_DataType *arg_light = glmsg.add_args();
   12914     arg_light->set_isarray(false);
   12915     arg_light->set_type(GLMessage::DataType::ENUM);
   12916     arg_light->add_intvalue((int)light);
   12917 
   12918     // copy argument pname
   12919     GLMessage_DataType *arg_pname = glmsg.add_args();
   12920     arg_pname->set_isarray(false);
   12921     arg_pname->set_type(GLMessage::DataType::ENUM);
   12922     arg_pname->add_intvalue((int)pname);
   12923 
   12924     // copy argument params
   12925     GLMessage_DataType *arg_params = glmsg.add_args();
   12926     arg_params->set_isarray(false);
   12927     arg_params->set_type(GLMessage::DataType::INT);
   12928     arg_params->add_intvalue((int)params);
   12929 
   12930     // call function
   12931     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12932     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12933     glContext->hooks->gl.glGetLightxv(light, pname, params);
   12934     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12935     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12936 
   12937     void *pointerArgs[] = {
   12938         (void *) params,
   12939     };
   12940 
   12941     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12942                               threadStartTime, threadEndTime,
   12943                               &glmsg, pointerArgs);
   12944     glContext->traceGLMessage(&glmsg);
   12945 }
   12946 
   12947 void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
   12948     GLMessage glmsg;
   12949     GLTraceContext *glContext = getGLTraceContext();
   12950 
   12951     glmsg.set_function(GLMessage::glGetMaterialxv);
   12952 
   12953     // copy argument face
   12954     GLMessage_DataType *arg_face = glmsg.add_args();
   12955     arg_face->set_isarray(false);
   12956     arg_face->set_type(GLMessage::DataType::ENUM);
   12957     arg_face->add_intvalue((int)face);
   12958 
   12959     // copy argument pname
   12960     GLMessage_DataType *arg_pname = glmsg.add_args();
   12961     arg_pname->set_isarray(false);
   12962     arg_pname->set_type(GLMessage::DataType::ENUM);
   12963     arg_pname->add_intvalue((int)pname);
   12964 
   12965     // copy argument params
   12966     GLMessage_DataType *arg_params = glmsg.add_args();
   12967     arg_params->set_isarray(false);
   12968     arg_params->set_type(GLMessage::DataType::INT);
   12969     arg_params->add_intvalue((int)params);
   12970 
   12971     // call function
   12972     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12973     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12974     glContext->hooks->gl.glGetMaterialxv(face, pname, params);
   12975     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12976     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12977 
   12978     void *pointerArgs[] = {
   12979         (void *) params,
   12980     };
   12981 
   12982     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12983                               threadStartTime, threadEndTime,
   12984                               &glmsg, pointerArgs);
   12985     glContext->traceGLMessage(&glmsg);
   12986 }
   12987 
   12988 void GLTrace_glGetPointerv(GLenum pname, GLvoid **params) {
   12989     GLMessage glmsg;
   12990     GLTraceContext *glContext = getGLTraceContext();
   12991 
   12992     glmsg.set_function(GLMessage::glGetPointerv);
   12993 
   12994     // copy argument pname
   12995     GLMessage_DataType *arg_pname = glmsg.add_args();
   12996     arg_pname->set_isarray(false);
   12997     arg_pname->set_type(GLMessage::DataType::ENUM);
   12998     arg_pname->add_intvalue((int)pname);
   12999 
   13000     // copy argument params
   13001     GLMessage_DataType *arg_params = glmsg.add_args();
   13002     arg_params->set_isarray(false);
   13003     arg_params->set_type(GLMessage::DataType::INT);
   13004     arg_params->add_intvalue((int)params);
   13005 
   13006     // call function
   13007     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13008     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13009     glContext->hooks->gl.glGetPointerv(pname, params);
   13010     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13011     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13012 
   13013     void *pointerArgs[] = {
   13014         (void *) params,
   13015     };
   13016 
   13017     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13018                               threadStartTime, threadEndTime,
   13019                               &glmsg, pointerArgs);
   13020     glContext->traceGLMessage(&glmsg);
   13021 }
   13022 
   13023 void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
   13024     GLMessage glmsg;
   13025     GLTraceContext *glContext = getGLTraceContext();
   13026 
   13027     glmsg.set_function(GLMessage::glGetTexEnviv);
   13028 
   13029     // copy argument env
   13030     GLMessage_DataType *arg_env = glmsg.add_args();
   13031     arg_env->set_isarray(false);
   13032     arg_env->set_type(GLMessage::DataType::ENUM);
   13033     arg_env->add_intvalue((int)env);
   13034 
   13035     // copy argument pname
   13036     GLMessage_DataType *arg_pname = glmsg.add_args();
   13037     arg_pname->set_isarray(false);
   13038     arg_pname->set_type(GLMessage::DataType::ENUM);
   13039     arg_pname->add_intvalue((int)pname);
   13040 
   13041     // copy argument params
   13042     GLMessage_DataType *arg_params = glmsg.add_args();
   13043     arg_params->set_isarray(false);
   13044     arg_params->set_type(GLMessage::DataType::INT);
   13045     arg_params->add_intvalue((int)params);
   13046 
   13047     // call function
   13048     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13049     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13050     glContext->hooks->gl.glGetTexEnviv(env, pname, params);
   13051     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13052     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13053 
   13054     void *pointerArgs[] = {
   13055         (void *) params,
   13056     };
   13057 
   13058     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13059                               threadStartTime, threadEndTime,
   13060                               &glmsg, pointerArgs);
   13061     glContext->traceGLMessage(&glmsg);
   13062 }
   13063 
   13064 void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
   13065     GLMessage glmsg;
   13066     GLTraceContext *glContext = getGLTraceContext();
   13067 
   13068     glmsg.set_function(GLMessage::glGetTexEnvxv);
   13069 
   13070     // copy argument env
   13071     GLMessage_DataType *arg_env = glmsg.add_args();
   13072     arg_env->set_isarray(false);
   13073     arg_env->set_type(GLMessage::DataType::ENUM);
   13074     arg_env->add_intvalue((int)env);
   13075 
   13076     // copy argument pname
   13077     GLMessage_DataType *arg_pname = glmsg.add_args();
   13078     arg_pname->set_isarray(false);
   13079     arg_pname->set_type(GLMessage::DataType::ENUM);
   13080     arg_pname->add_intvalue((int)pname);
   13081 
   13082     // copy argument params
   13083     GLMessage_DataType *arg_params = glmsg.add_args();
   13084     arg_params->set_isarray(false);
   13085     arg_params->set_type(GLMessage::DataType::INT);
   13086     arg_params->add_intvalue((int)params);
   13087 
   13088     // call function
   13089     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13090     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13091     glContext->hooks->gl.glGetTexEnvxv(env, pname, params);
   13092     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13093     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13094 
   13095     void *pointerArgs[] = {
   13096         (void *) params,
   13097     };
   13098 
   13099     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13100                               threadStartTime, threadEndTime,
   13101                               &glmsg, pointerArgs);
   13102     glContext->traceGLMessage(&glmsg);
   13103 }
   13104 
   13105 void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
   13106     GLMessage glmsg;
   13107     GLTraceContext *glContext = getGLTraceContext();
   13108 
   13109     glmsg.set_function(GLMessage::glGetTexParameterxv);
   13110 
   13111     // copy argument target
   13112     GLMessage_DataType *arg_target = glmsg.add_args();
   13113     arg_target->set_isarray(false);
   13114     arg_target->set_type(GLMessage::DataType::ENUM);
   13115     arg_target->add_intvalue((int)target);
   13116 
   13117     // copy argument pname
   13118     GLMessage_DataType *arg_pname = glmsg.add_args();
   13119     arg_pname->set_isarray(false);
   13120     arg_pname->set_type(GLMessage::DataType::ENUM);
   13121     arg_pname->add_intvalue((int)pname);
   13122 
   13123     // copy argument params
   13124     GLMessage_DataType *arg_params = glmsg.add_args();
   13125     arg_params->set_isarray(false);
   13126     arg_params->set_type(GLMessage::DataType::INT);
   13127     arg_params->add_intvalue((int)params);
   13128 
   13129     // call function
   13130     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13131     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13132     glContext->hooks->gl.glGetTexParameterxv(target, pname, params);
   13133     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13134     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13135 
   13136     void *pointerArgs[] = {
   13137         (void *) params,
   13138     };
   13139 
   13140     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13141                               threadStartTime, threadEndTime,
   13142                               &glmsg, pointerArgs);
   13143     glContext->traceGLMessage(&glmsg);
   13144 }
   13145 
   13146 void GLTrace_glLightModelx(GLenum pname, GLfixed param) {
   13147     GLMessage glmsg;
   13148     GLTraceContext *glContext = getGLTraceContext();
   13149 
   13150     glmsg.set_function(GLMessage::glLightModelx);
   13151 
   13152     // copy argument pname
   13153     GLMessage_DataType *arg_pname = glmsg.add_args();
   13154     arg_pname->set_isarray(false);
   13155     arg_pname->set_type(GLMessage::DataType::ENUM);
   13156     arg_pname->add_intvalue((int)pname);
   13157 
   13158     // copy argument param
   13159     GLMessage_DataType *arg_param = glmsg.add_args();
   13160     arg_param->set_isarray(false);
   13161     arg_param->set_type(GLMessage::DataType::INT);
   13162     arg_param->add_intvalue(param);
   13163 
   13164     // call function
   13165     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13166     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13167     glContext->hooks->gl.glLightModelx(pname, param);
   13168     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13169     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13170 
   13171     void *pointerArgs[] = {
   13172     };
   13173 
   13174     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13175                               threadStartTime, threadEndTime,
   13176                               &glmsg, pointerArgs);
   13177     glContext->traceGLMessage(&glmsg);
   13178 }
   13179 
   13180 void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params) {
   13181     GLMessage glmsg;
   13182     GLTraceContext *glContext = getGLTraceContext();
   13183 
   13184     glmsg.set_function(GLMessage::glLightModelxv);
   13185 
   13186     // copy argument pname
   13187     GLMessage_DataType *arg_pname = glmsg.add_args();
   13188     arg_pname->set_isarray(false);
   13189     arg_pname->set_type(GLMessage::DataType::ENUM);
   13190     arg_pname->add_intvalue((int)pname);
   13191 
   13192     // copy argument params
   13193     GLMessage_DataType *arg_params = glmsg.add_args();
   13194     arg_params->set_isarray(false);
   13195     arg_params->set_type(GLMessage::DataType::INT);
   13196     arg_params->add_intvalue((int)params);
   13197 
   13198     // call function
   13199     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13200     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13201     glContext->hooks->gl.glLightModelxv(pname, params);
   13202     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13203     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13204 
   13205     void *pointerArgs[] = {
   13206         (void *) params,
   13207     };
   13208 
   13209     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13210                               threadStartTime, threadEndTime,
   13211                               &glmsg, pointerArgs);
   13212     glContext->traceGLMessage(&glmsg);
   13213 }
   13214 
   13215 void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param) {
   13216     GLMessage glmsg;
   13217     GLTraceContext *glContext = getGLTraceContext();
   13218 
   13219     glmsg.set_function(GLMessage::glLightx);
   13220 
   13221     // copy argument light
   13222     GLMessage_DataType *arg_light = glmsg.add_args();
   13223     arg_light->set_isarray(false);
   13224     arg_light->set_type(GLMessage::DataType::ENUM);
   13225     arg_light->add_intvalue((int)light);
   13226 
   13227     // copy argument pname
   13228     GLMessage_DataType *arg_pname = glmsg.add_args();
   13229     arg_pname->set_isarray(false);
   13230     arg_pname->set_type(GLMessage::DataType::ENUM);
   13231     arg_pname->add_intvalue((int)pname);
   13232 
   13233     // copy argument param
   13234     GLMessage_DataType *arg_param = glmsg.add_args();
   13235     arg_param->set_isarray(false);
   13236     arg_param->set_type(GLMessage::DataType::INT);
   13237     arg_param->add_intvalue(param);
   13238 
   13239     // call function
   13240     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13241     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13242     glContext->hooks->gl.glLightx(light, pname, param);
   13243     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13244     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13245 
   13246     void *pointerArgs[] = {
   13247     };
   13248 
   13249     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13250                               threadStartTime, threadEndTime,
   13251                               &glmsg, pointerArgs);
   13252     glContext->traceGLMessage(&glmsg);
   13253 }
   13254 
   13255 void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params) {
   13256     GLMessage glmsg;
   13257     GLTraceContext *glContext = getGLTraceContext();
   13258 
   13259     glmsg.set_function(GLMessage::glLightxv);
   13260 
   13261     // copy argument light
   13262     GLMessage_DataType *arg_light = glmsg.add_args();
   13263     arg_light->set_isarray(false);
   13264     arg_light->set_type(GLMessage::DataType::ENUM);
   13265     arg_light->add_intvalue((int)light);
   13266 
   13267     // copy argument pname
   13268     GLMessage_DataType *arg_pname = glmsg.add_args();
   13269     arg_pname->set_isarray(false);
   13270     arg_pname->set_type(GLMessage::DataType::ENUM);
   13271     arg_pname->add_intvalue((int)pname);
   13272 
   13273     // copy argument params
   13274     GLMessage_DataType *arg_params = glmsg.add_args();
   13275     arg_params->set_isarray(false);
   13276     arg_params->set_type(GLMessage::DataType::INT);
   13277     arg_params->add_intvalue((int)params);
   13278 
   13279     // call function
   13280     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13281     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13282     glContext->hooks->gl.glLightxv(light, pname, params);
   13283     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13284     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13285 
   13286     void *pointerArgs[] = {
   13287         (void *) params,
   13288     };
   13289 
   13290     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13291                               threadStartTime, threadEndTime,
   13292                               &glmsg, pointerArgs);
   13293     glContext->traceGLMessage(&glmsg);
   13294 }
   13295 
   13296 void GLTrace_glLineWidthx(GLfixed width) {
   13297     GLMessage glmsg;
   13298     GLTraceContext *glContext = getGLTraceContext();
   13299 
   13300     glmsg.set_function(GLMessage::glLineWidthx);
   13301 
   13302     // copy argument width
   13303     GLMessage_DataType *arg_width = glmsg.add_args();
   13304     arg_width->set_isarray(false);
   13305     arg_width->set_type(GLMessage::DataType::INT);
   13306     arg_width->add_intvalue(width);
   13307 
   13308     // call function
   13309     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13310     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13311     glContext->hooks->gl.glLineWidthx(width);
   13312     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13313     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13314 
   13315     void *pointerArgs[] = {
   13316     };
   13317 
   13318     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13319                               threadStartTime, threadEndTime,
   13320                               &glmsg, pointerArgs);
   13321     glContext->traceGLMessage(&glmsg);
   13322 }
   13323 
   13324 void GLTrace_glLoadIdentity(void) {
   13325     GLMessage glmsg;
   13326     GLTraceContext *glContext = getGLTraceContext();
   13327 
   13328     glmsg.set_function(GLMessage::glLoadIdentity);
   13329 
   13330     // call function
   13331     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13332     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13333     glContext->hooks->gl.glLoadIdentity();
   13334     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13335     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13336 
   13337     void *pointerArgs[] = {
   13338     };
   13339 
   13340     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13341                               threadStartTime, threadEndTime,
   13342                               &glmsg, pointerArgs);
   13343     glContext->traceGLMessage(&glmsg);
   13344 }
   13345 
   13346 void GLTrace_glLoadMatrixx(const GLfixed *m) {
   13347     GLMessage glmsg;
   13348     GLTraceContext *glContext = getGLTraceContext();
   13349 
   13350     glmsg.set_function(GLMessage::glLoadMatrixx);
   13351 
   13352     // copy argument m
   13353     GLMessage_DataType *arg_m = glmsg.add_args();
   13354     arg_m->set_isarray(false);
   13355     arg_m->set_type(GLMessage::DataType::INT);
   13356     arg_m->add_intvalue((int)m);
   13357 
   13358     // call function
   13359     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13360     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13361     glContext->hooks->gl.glLoadMatrixx(m);
   13362     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13363     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13364 
   13365     void *pointerArgs[] = {
   13366         (void *) m,
   13367     };
   13368 
   13369     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13370                               threadStartTime, threadEndTime,
   13371                               &glmsg, pointerArgs);
   13372     glContext->traceGLMessage(&glmsg);
   13373 }
   13374 
   13375 void GLTrace_glLogicOp(GLenum opcode) {
   13376     GLMessage glmsg;
   13377     GLTraceContext *glContext = getGLTraceContext();
   13378 
   13379     glmsg.set_function(GLMessage::glLogicOp);
   13380 
   13381     // copy argument opcode
   13382     GLMessage_DataType *arg_opcode = glmsg.add_args();
   13383     arg_opcode->set_isarray(false);
   13384     arg_opcode->set_type(GLMessage::DataType::ENUM);
   13385     arg_opcode->add_intvalue((int)opcode);
   13386 
   13387     // call function
   13388     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13389     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13390     glContext->hooks->gl.glLogicOp(opcode);
   13391     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13392     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13393 
   13394     void *pointerArgs[] = {
   13395     };
   13396 
   13397     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13398                               threadStartTime, threadEndTime,
   13399                               &glmsg, pointerArgs);
   13400     glContext->traceGLMessage(&glmsg);
   13401 }
   13402 
   13403 void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param) {
   13404     GLMessage glmsg;
   13405     GLTraceContext *glContext = getGLTraceContext();
   13406 
   13407     glmsg.set_function(GLMessage::glMaterialx);
   13408 
   13409     // copy argument face
   13410     GLMessage_DataType *arg_face = glmsg.add_args();
   13411     arg_face->set_isarray(false);
   13412     arg_face->set_type(GLMessage::DataType::ENUM);
   13413     arg_face->add_intvalue((int)face);
   13414 
   13415     // copy argument pname
   13416     GLMessage_DataType *arg_pname = glmsg.add_args();
   13417     arg_pname->set_isarray(false);
   13418     arg_pname->set_type(GLMessage::DataType::ENUM);
   13419     arg_pname->add_intvalue((int)pname);
   13420 
   13421     // copy argument param
   13422     GLMessage_DataType *arg_param = glmsg.add_args();
   13423     arg_param->set_isarray(false);
   13424     arg_param->set_type(GLMessage::DataType::INT);
   13425     arg_param->add_intvalue(param);
   13426 
   13427     // call function
   13428     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13429     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13430     glContext->hooks->gl.glMaterialx(face, pname, param);
   13431     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13432     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13433 
   13434     void *pointerArgs[] = {
   13435     };
   13436 
   13437     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13438                               threadStartTime, threadEndTime,
   13439                               &glmsg, pointerArgs);
   13440     glContext->traceGLMessage(&glmsg);
   13441 }
   13442 
   13443 void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) {
   13444     GLMessage glmsg;
   13445     GLTraceContext *glContext = getGLTraceContext();
   13446 
   13447     glmsg.set_function(GLMessage::glMaterialxv);
   13448 
   13449     // copy argument face
   13450     GLMessage_DataType *arg_face = glmsg.add_args();
   13451     arg_face->set_isarray(false);
   13452     arg_face->set_type(GLMessage::DataType::ENUM);
   13453     arg_face->add_intvalue((int)face);
   13454 
   13455     // copy argument pname
   13456     GLMessage_DataType *arg_pname = glmsg.add_args();
   13457     arg_pname->set_isarray(false);
   13458     arg_pname->set_type(GLMessage::DataType::ENUM);
   13459     arg_pname->add_intvalue((int)pname);
   13460 
   13461     // copy argument params
   13462     GLMessage_DataType *arg_params = glmsg.add_args();
   13463     arg_params->set_isarray(false);
   13464     arg_params->set_type(GLMessage::DataType::INT);
   13465     arg_params->add_intvalue((int)params);
   13466 
   13467     // call function
   13468     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13469     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13470     glContext->hooks->gl.glMaterialxv(face, pname, params);
   13471     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13472     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13473 
   13474     void *pointerArgs[] = {
   13475         (void *) params,
   13476     };
   13477 
   13478     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13479                               threadStartTime, threadEndTime,
   13480                               &glmsg, pointerArgs);
   13481     glContext->traceGLMessage(&glmsg);
   13482 }
   13483 
   13484 void GLTrace_glMatrixMode(GLenum mode) {
   13485     GLMessage glmsg;
   13486     GLTraceContext *glContext = getGLTraceContext();
   13487 
   13488     glmsg.set_function(GLMessage::glMatrixMode);
   13489 
   13490     // copy argument mode
   13491     GLMessage_DataType *arg_mode = glmsg.add_args();
   13492     arg_mode->set_isarray(false);
   13493     arg_mode->set_type(GLMessage::DataType::ENUM);
   13494     arg_mode->add_intvalue((int)mode);
   13495 
   13496     // call function
   13497     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13498     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13499     glContext->hooks->gl.glMatrixMode(mode);
   13500     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13501     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13502 
   13503     void *pointerArgs[] = {
   13504     };
   13505 
   13506     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13507                               threadStartTime, threadEndTime,
   13508                               &glmsg, pointerArgs);
   13509     glContext->traceGLMessage(&glmsg);
   13510 }
   13511 
   13512 void GLTrace_glMultMatrixx(const GLfixed *m) {
   13513     GLMessage glmsg;
   13514     GLTraceContext *glContext = getGLTraceContext();
   13515 
   13516     glmsg.set_function(GLMessage::glMultMatrixx);
   13517 
   13518     // copy argument m
   13519     GLMessage_DataType *arg_m = glmsg.add_args();
   13520     arg_m->set_isarray(false);
   13521     arg_m->set_type(GLMessage::DataType::INT);
   13522     arg_m->add_intvalue((int)m);
   13523 
   13524     // call function
   13525     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13526     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13527     glContext->hooks->gl.glMultMatrixx(m);
   13528     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13529     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13530 
   13531     void *pointerArgs[] = {
   13532         (void *) m,
   13533     };
   13534 
   13535     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13536                               threadStartTime, threadEndTime,
   13537                               &glmsg, pointerArgs);
   13538     glContext->traceGLMessage(&glmsg);
   13539 }
   13540 
   13541 void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
   13542     GLMessage glmsg;
   13543     GLTraceContext *glContext = getGLTraceContext();
   13544 
   13545     glmsg.set_function(GLMessage::glMultiTexCoord4x);
   13546 
   13547     // copy argument target
   13548     GLMessage_DataType *arg_target = glmsg.add_args();
   13549     arg_target->set_isarray(false);
   13550     arg_target->set_type(GLMessage::DataType::ENUM);
   13551     arg_target->add_intvalue((int)target);
   13552 
   13553     // copy argument s
   13554     GLMessage_DataType *arg_s = glmsg.add_args();
   13555     arg_s->set_isarray(false);
   13556     arg_s->set_type(GLMessage::DataType::INT);
   13557     arg_s->add_intvalue(s);
   13558 
   13559     // copy argument t
   13560     GLMessage_DataType *arg_t = glmsg.add_args();
   13561     arg_t->set_isarray(false);
   13562     arg_t->set_type(GLMessage::DataType::INT);
   13563     arg_t->add_intvalue(t);
   13564 
   13565     // copy argument r
   13566     GLMessage_DataType *arg_r = glmsg.add_args();
   13567     arg_r->set_isarray(false);
   13568     arg_r->set_type(GLMessage::DataType::INT);
   13569     arg_r->add_intvalue(r);
   13570 
   13571     // copy argument q
   13572     GLMessage_DataType *arg_q = glmsg.add_args();
   13573     arg_q->set_isarray(false);
   13574     arg_q->set_type(GLMessage::DataType::INT);
   13575     arg_q->add_intvalue(q);
   13576 
   13577     // call function
   13578     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13579     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13580     glContext->hooks->gl.glMultiTexCoord4x(target, s, t, r, q);
   13581     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13582     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13583 
   13584     void *pointerArgs[] = {
   13585     };
   13586 
   13587     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13588                               threadStartTime, threadEndTime,
   13589                               &glmsg, pointerArgs);
   13590     glContext->traceGLMessage(&glmsg);
   13591 }
   13592 
   13593 void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) {
   13594     GLMessage glmsg;
   13595     GLTraceContext *glContext = getGLTraceContext();
   13596 
   13597     glmsg.set_function(GLMessage::glNormal3x);
   13598 
   13599     // copy argument nx
   13600     GLMessage_DataType *arg_nx = glmsg.add_args();
   13601     arg_nx->set_isarray(false);
   13602     arg_nx->set_type(GLMessage::DataType::INT);
   13603     arg_nx->add_intvalue(nx);
   13604 
   13605     // copy argument ny
   13606     GLMessage_DataType *arg_ny = glmsg.add_args();
   13607     arg_ny->set_isarray(false);
   13608     arg_ny->set_type(GLMessage::DataType::INT);
   13609     arg_ny->add_intvalue(ny);
   13610 
   13611     // copy argument nz
   13612     GLMessage_DataType *arg_nz = glmsg.add_args();
   13613     arg_nz->set_isarray(false);
   13614     arg_nz->set_type(GLMessage::DataType::INT);
   13615     arg_nz->add_intvalue(nz);
   13616 
   13617     // call function
   13618     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13619     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13620     glContext->hooks->gl.glNormal3x(nx, ny, nz);
   13621     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13622     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13623 
   13624     void *pointerArgs[] = {
   13625     };
   13626 
   13627     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13628                               threadStartTime, threadEndTime,
   13629                               &glmsg, pointerArgs);
   13630     glContext->traceGLMessage(&glmsg);
   13631 }
   13632 
   13633 void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
   13634     GLMessage glmsg;
   13635     GLTraceContext *glContext = getGLTraceContext();
   13636 
   13637     glmsg.set_function(GLMessage::glNormalPointer);
   13638 
   13639     // copy argument type
   13640     GLMessage_DataType *arg_type = glmsg.add_args();
   13641     arg_type->set_isarray(false);
   13642     arg_type->set_type(GLMessage::DataType::ENUM);
   13643     arg_type->add_intvalue((int)type);
   13644 
   13645     // copy argument stride
   13646     GLMessage_DataType *arg_stride = glmsg.add_args();
   13647     arg_stride->set_isarray(false);
   13648     arg_stride->set_type(GLMessage::DataType::INT);
   13649     arg_stride->add_intvalue(stride);
   13650 
   13651     // copy argument pointer
   13652     GLMessage_DataType *arg_pointer = glmsg.add_args();
   13653     arg_pointer->set_isarray(false);
   13654     arg_pointer->set_type(GLMessage::DataType::INT);
   13655     arg_pointer->add_intvalue((int)pointer);
   13656 
   13657     // call function
   13658     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13659     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13660     glContext->hooks->gl.glNormalPointer(type, stride, pointer);
   13661     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13662     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13663 
   13664     void *pointerArgs[] = {
   13665         (void *) pointer,
   13666     };
   13667 
   13668     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13669                               threadStartTime, threadEndTime,
   13670                               &glmsg, pointerArgs);
   13671     glContext->traceGLMessage(&glmsg);
   13672 }
   13673 
   13674 void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   13675     GLMessage glmsg;
   13676     GLTraceContext *glContext = getGLTraceContext();
   13677 
   13678     glmsg.set_function(GLMessage::glOrthox);
   13679 
   13680     // copy argument left
   13681     GLMessage_DataType *arg_left = glmsg.add_args();
   13682     arg_left->set_isarray(false);
   13683     arg_left->set_type(GLMessage::DataType::INT);
   13684     arg_left->add_intvalue(left);
   13685 
   13686     // copy argument right
   13687     GLMessage_DataType *arg_right = glmsg.add_args();
   13688     arg_right->set_isarray(false);
   13689     arg_right->set_type(GLMessage::DataType::INT);
   13690     arg_right->add_intvalue(right);
   13691 
   13692     // copy argument bottom
   13693     GLMessage_DataType *arg_bottom = glmsg.add_args();
   13694     arg_bottom->set_isarray(false);
   13695     arg_bottom->set_type(GLMessage::DataType::INT);
   13696     arg_bottom->add_intvalue(bottom);
   13697 
   13698     // copy argument top
   13699     GLMessage_DataType *arg_top = glmsg.add_args();
   13700     arg_top->set_isarray(false);
   13701     arg_top->set_type(GLMessage::DataType::INT);
   13702     arg_top->add_intvalue(top);
   13703 
   13704     // copy argument zNear
   13705     GLMessage_DataType *arg_zNear = glmsg.add_args();
   13706     arg_zNear->set_isarray(false);
   13707     arg_zNear->set_type(GLMessage::DataType::INT);
   13708     arg_zNear->add_intvalue(zNear);
   13709 
   13710     // copy argument zFar
   13711     GLMessage_DataType *arg_zFar = glmsg.add_args();
   13712     arg_zFar->set_isarray(false);
   13713     arg_zFar->set_type(GLMessage::DataType::INT);
   13714     arg_zFar->add_intvalue(zFar);
   13715 
   13716     // call function
   13717     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13718     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13719     glContext->hooks->gl.glOrthox(left, right, bottom, top, zNear, zFar);
   13720     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13721     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13722 
   13723     void *pointerArgs[] = {
   13724     };
   13725 
   13726     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13727                               threadStartTime, threadEndTime,
   13728                               &glmsg, pointerArgs);
   13729     glContext->traceGLMessage(&glmsg);
   13730 }
   13731 
   13732 void GLTrace_glPointParameterx(GLenum pname, GLfixed param) {
   13733     GLMessage glmsg;
   13734     GLTraceContext *glContext = getGLTraceContext();
   13735 
   13736     glmsg.set_function(GLMessage::glPointParameterx);
   13737 
   13738     // copy argument pname
   13739     GLMessage_DataType *arg_pname = glmsg.add_args();
   13740     arg_pname->set_isarray(false);
   13741     arg_pname->set_type(GLMessage::DataType::ENUM);
   13742     arg_pname->add_intvalue((int)pname);
   13743 
   13744     // copy argument param
   13745     GLMessage_DataType *arg_param = glmsg.add_args();
   13746     arg_param->set_isarray(false);
   13747     arg_param->set_type(GLMessage::DataType::INT);
   13748     arg_param->add_intvalue(param);
   13749 
   13750     // call function
   13751     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13752     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13753     glContext->hooks->gl.glPointParameterx(pname, param);
   13754     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13755     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13756 
   13757     void *pointerArgs[] = {
   13758     };
   13759 
   13760     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13761                               threadStartTime, threadEndTime,
   13762                               &glmsg, pointerArgs);
   13763     glContext->traceGLMessage(&glmsg);
   13764 }
   13765 
   13766 void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params) {
   13767     GLMessage glmsg;
   13768     GLTraceContext *glContext = getGLTraceContext();
   13769 
   13770     glmsg.set_function(GLMessage::glPointParameterxv);
   13771 
   13772     // copy argument pname
   13773     GLMessage_DataType *arg_pname = glmsg.add_args();
   13774     arg_pname->set_isarray(false);
   13775     arg_pname->set_type(GLMessage::DataType::ENUM);
   13776     arg_pname->add_intvalue((int)pname);
   13777 
   13778     // copy argument params
   13779     GLMessage_DataType *arg_params = glmsg.add_args();
   13780     arg_params->set_isarray(false);
   13781     arg_params->set_type(GLMessage::DataType::INT);
   13782     arg_params->add_intvalue((int)params);
   13783 
   13784     // call function
   13785     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13786     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13787     glContext->hooks->gl.glPointParameterxv(pname, params);
   13788     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13789     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13790 
   13791     void *pointerArgs[] = {
   13792         (void *) params,
   13793     };
   13794 
   13795     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13796                               threadStartTime, threadEndTime,
   13797                               &glmsg, pointerArgs);
   13798     glContext->traceGLMessage(&glmsg);
   13799 }
   13800 
   13801 void GLTrace_glPointSizex(GLfixed size) {
   13802     GLMessage glmsg;
   13803     GLTraceContext *glContext = getGLTraceContext();
   13804 
   13805     glmsg.set_function(GLMessage::glPointSizex);
   13806 
   13807     // copy argument size
   13808     GLMessage_DataType *arg_size = glmsg.add_args();
   13809     arg_size->set_isarray(false);
   13810     arg_size->set_type(GLMessage::DataType::INT);
   13811     arg_size->add_intvalue(size);
   13812 
   13813     // call function
   13814     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13815     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13816     glContext->hooks->gl.glPointSizex(size);
   13817     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13818     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13819 
   13820     void *pointerArgs[] = {
   13821     };
   13822 
   13823     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13824                               threadStartTime, threadEndTime,
   13825                               &glmsg, pointerArgs);
   13826     glContext->traceGLMessage(&glmsg);
   13827 }
   13828 
   13829 void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units) {
   13830     GLMessage glmsg;
   13831     GLTraceContext *glContext = getGLTraceContext();
   13832 
   13833     glmsg.set_function(GLMessage::glPolygonOffsetx);
   13834 
   13835     // copy argument factor
   13836     GLMessage_DataType *arg_factor = glmsg.add_args();
   13837     arg_factor->set_isarray(false);
   13838     arg_factor->set_type(GLMessage::DataType::INT);
   13839     arg_factor->add_intvalue(factor);
   13840 
   13841     // copy argument units
   13842     GLMessage_DataType *arg_units = glmsg.add_args();
   13843     arg_units->set_isarray(false);
   13844     arg_units->set_type(GLMessage::DataType::INT);
   13845     arg_units->add_intvalue(units);
   13846 
   13847     // call function
   13848     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13849     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13850     glContext->hooks->gl.glPolygonOffsetx(factor, units);
   13851     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13852     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13853 
   13854     void *pointerArgs[] = {
   13855     };
   13856 
   13857     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13858                               threadStartTime, threadEndTime,
   13859                               &glmsg, pointerArgs);
   13860     glContext->traceGLMessage(&glmsg);
   13861 }
   13862 
   13863 void GLTrace_glPopMatrix(void) {
   13864     GLMessage glmsg;
   13865     GLTraceContext *glContext = getGLTraceContext();
   13866 
   13867     glmsg.set_function(GLMessage::glPopMatrix);
   13868 
   13869     // call function
   13870     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13871     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13872     glContext->hooks->gl.glPopMatrix();
   13873     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13874     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13875 
   13876     void *pointerArgs[] = {
   13877     };
   13878 
   13879     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13880                               threadStartTime, threadEndTime,
   13881                               &glmsg, pointerArgs);
   13882     glContext->traceGLMessage(&glmsg);
   13883 }
   13884 
   13885 void GLTrace_glPushMatrix(void) {
   13886     GLMessage glmsg;
   13887     GLTraceContext *glContext = getGLTraceContext();
   13888 
   13889     glmsg.set_function(GLMessage::glPushMatrix);
   13890 
   13891     // call function
   13892     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13893     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13894     glContext->hooks->gl.glPushMatrix();
   13895     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13896     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13897 
   13898     void *pointerArgs[] = {
   13899     };
   13900 
   13901     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13902                               threadStartTime, threadEndTime,
   13903                               &glmsg, pointerArgs);
   13904     glContext->traceGLMessage(&glmsg);
   13905 }
   13906 
   13907 void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
   13908     GLMessage glmsg;
   13909     GLTraceContext *glContext = getGLTraceContext();
   13910 
   13911     glmsg.set_function(GLMessage::glRotatex);
   13912 
   13913     // copy argument angle
   13914     GLMessage_DataType *arg_angle = glmsg.add_args();
   13915     arg_angle->set_isarray(false);
   13916     arg_angle->set_type(GLMessage::DataType::INT);
   13917     arg_angle->add_intvalue(angle);
   13918 
   13919     // copy argument x
   13920     GLMessage_DataType *arg_x = glmsg.add_args();
   13921     arg_x->set_isarray(false);
   13922     arg_x->set_type(GLMessage::DataType::INT);
   13923     arg_x->add_intvalue(x);
   13924 
   13925     // copy argument y
   13926     GLMessage_DataType *arg_y = glmsg.add_args();
   13927     arg_y->set_isarray(false);
   13928     arg_y->set_type(GLMessage::DataType::INT);
   13929     arg_y->add_intvalue(y);
   13930 
   13931     // copy argument z
   13932     GLMessage_DataType *arg_z = glmsg.add_args();
   13933     arg_z->set_isarray(false);
   13934     arg_z->set_type(GLMessage::DataType::INT);
   13935     arg_z->add_intvalue(z);
   13936 
   13937     // call function
   13938     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13939     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13940     glContext->hooks->gl.glRotatex(angle, x, y, z);
   13941     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13942     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13943 
   13944     void *pointerArgs[] = {
   13945     };
   13946 
   13947     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13948                               threadStartTime, threadEndTime,
   13949                               &glmsg, pointerArgs);
   13950     glContext->traceGLMessage(&glmsg);
   13951 }
   13952 
   13953 void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert) {
   13954     GLMessage glmsg;
   13955     GLTraceContext *glContext = getGLTraceContext();
   13956 
   13957     glmsg.set_function(GLMessage::glSampleCoveragex);
   13958 
   13959     // copy argument value
   13960     GLMessage_DataType *arg_value = glmsg.add_args();
   13961     arg_value->set_isarray(false);
   13962     arg_value->set_type(GLMessage::DataType::INT);
   13963     arg_value->add_intvalue(value);
   13964 
   13965     // copy argument invert
   13966     GLMessage_DataType *arg_invert = glmsg.add_args();
   13967     arg_invert->set_isarray(false);
   13968     arg_invert->set_type(GLMessage::DataType::BOOL);
   13969     arg_invert->add_boolvalue(invert);
   13970 
   13971     // call function
   13972     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13973     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13974     glContext->hooks->gl.glSampleCoveragex(value, invert);
   13975     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13976     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13977 
   13978     void *pointerArgs[] = {
   13979     };
   13980 
   13981     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13982                               threadStartTime, threadEndTime,
   13983                               &glmsg, pointerArgs);
   13984     glContext->traceGLMessage(&glmsg);
   13985 }
   13986 
   13987 void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z) {
   13988     GLMessage glmsg;
   13989     GLTraceContext *glContext = getGLTraceContext();
   13990 
   13991     glmsg.set_function(GLMessage::glScalex);
   13992 
   13993     // copy argument x
   13994     GLMessage_DataType *arg_x = glmsg.add_args();
   13995     arg_x->set_isarray(false);
   13996     arg_x->set_type(GLMessage::DataType::INT);
   13997     arg_x->add_intvalue(x);
   13998 
   13999     // copy argument y
   14000     GLMessage_DataType *arg_y = glmsg.add_args();
   14001     arg_y->set_isarray(false);
   14002     arg_y->set_type(GLMessage::DataType::INT);
   14003     arg_y->add_intvalue(y);
   14004 
   14005     // copy argument z
   14006     GLMessage_DataType *arg_z = glmsg.add_args();
   14007     arg_z->set_isarray(false);
   14008     arg_z->set_type(GLMessage::DataType::INT);
   14009     arg_z->add_intvalue(z);
   14010 
   14011     // call function
   14012     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14013     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14014     glContext->hooks->gl.glScalex(x, y, z);
   14015     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14016     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14017 
   14018     void *pointerArgs[] = {
   14019     };
   14020 
   14021     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14022                               threadStartTime, threadEndTime,
   14023                               &glmsg, pointerArgs);
   14024     glContext->traceGLMessage(&glmsg);
   14025 }
   14026 
   14027 void GLTrace_glShadeModel(GLenum mode) {
   14028     GLMessage glmsg;
   14029     GLTraceContext *glContext = getGLTraceContext();
   14030 
   14031     glmsg.set_function(GLMessage::glShadeModel);
   14032 
   14033     // copy argument mode
   14034     GLMessage_DataType *arg_mode = glmsg.add_args();
   14035     arg_mode->set_isarray(false);
   14036     arg_mode->set_type(GLMessage::DataType::ENUM);
   14037     arg_mode->add_intvalue((int)mode);
   14038 
   14039     // call function
   14040     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14041     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14042     glContext->hooks->gl.glShadeModel(mode);
   14043     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14044     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14045 
   14046     void *pointerArgs[] = {
   14047     };
   14048 
   14049     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14050                               threadStartTime, threadEndTime,
   14051                               &glmsg, pointerArgs);
   14052     glContext->traceGLMessage(&glmsg);
   14053 }
   14054 
   14055 void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   14056     GLMessage glmsg;
   14057     GLTraceContext *glContext = getGLTraceContext();
   14058 
   14059     glmsg.set_function(GLMessage::glTexCoordPointer);
   14060 
   14061     // copy argument size
   14062     GLMessage_DataType *arg_size = glmsg.add_args();
   14063     arg_size->set_isarray(false);
   14064     arg_size->set_type(GLMessage::DataType::INT);
   14065     arg_size->add_intvalue(size);
   14066 
   14067     // copy argument type
   14068     GLMessage_DataType *arg_type = glmsg.add_args();
   14069     arg_type->set_isarray(false);
   14070     arg_type->set_type(GLMessage::DataType::ENUM);
   14071     arg_type->add_intvalue((int)type);
   14072 
   14073     // copy argument stride
   14074     GLMessage_DataType *arg_stride = glmsg.add_args();
   14075     arg_stride->set_isarray(false);
   14076     arg_stride->set_type(GLMessage::DataType::INT);
   14077     arg_stride->add_intvalue(stride);
   14078 
   14079     // copy argument pointer
   14080     GLMessage_DataType *arg_pointer = glmsg.add_args();
   14081     arg_pointer->set_isarray(false);
   14082     arg_pointer->set_type(GLMessage::DataType::INT);
   14083     arg_pointer->add_intvalue((int)pointer);
   14084 
   14085     // call function
   14086     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14087     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14088     glContext->hooks->gl.glTexCoordPointer(size, type, stride, pointer);
   14089     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14090     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14091 
   14092     void *pointerArgs[] = {
   14093         (void *) pointer,
   14094     };
   14095 
   14096     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14097                               threadStartTime, threadEndTime,
   14098                               &glmsg, pointerArgs);
   14099     glContext->traceGLMessage(&glmsg);
   14100 }
   14101 
   14102 void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param) {
   14103     GLMessage glmsg;
   14104     GLTraceContext *glContext = getGLTraceContext();
   14105 
   14106     glmsg.set_function(GLMessage::glTexEnvi);
   14107 
   14108     // copy argument target
   14109     GLMessage_DataType *arg_target = glmsg.add_args();
   14110     arg_target->set_isarray(false);
   14111     arg_target->set_type(GLMessage::DataType::ENUM);
   14112     arg_target->add_intvalue((int)target);
   14113 
   14114     // copy argument pname
   14115     GLMessage_DataType *arg_pname = glmsg.add_args();
   14116     arg_pname->set_isarray(false);
   14117     arg_pname->set_type(GLMessage::DataType::ENUM);
   14118     arg_pname->add_intvalue((int)pname);
   14119 
   14120     // copy argument param
   14121     GLMessage_DataType *arg_param = glmsg.add_args();
   14122     arg_param->set_isarray(false);
   14123     arg_param->set_type(GLMessage::DataType::INT);
   14124     arg_param->add_intvalue(param);
   14125 
   14126     // call function
   14127     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14128     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14129     glContext->hooks->gl.glTexEnvi(target, pname, param);
   14130     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14131     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14132 
   14133     void *pointerArgs[] = {
   14134     };
   14135 
   14136     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14137                               threadStartTime, threadEndTime,
   14138                               &glmsg, pointerArgs);
   14139     glContext->traceGLMessage(&glmsg);
   14140 }
   14141 
   14142 void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param) {
   14143     GLMessage glmsg;
   14144     GLTraceContext *glContext = getGLTraceContext();
   14145 
   14146     glmsg.set_function(GLMessage::glTexEnvx);
   14147 
   14148     // copy argument target
   14149     GLMessage_DataType *arg_target = glmsg.add_args();
   14150     arg_target->set_isarray(false);
   14151     arg_target->set_type(GLMessage::DataType::ENUM);
   14152     arg_target->add_intvalue((int)target);
   14153 
   14154     // copy argument pname
   14155     GLMessage_DataType *arg_pname = glmsg.add_args();
   14156     arg_pname->set_isarray(false);
   14157     arg_pname->set_type(GLMessage::DataType::ENUM);
   14158     arg_pname->add_intvalue((int)pname);
   14159 
   14160     // copy argument param
   14161     GLMessage_DataType *arg_param = glmsg.add_args();
   14162     arg_param->set_isarray(false);
   14163     arg_param->set_type(GLMessage::DataType::INT);
   14164     arg_param->add_intvalue(param);
   14165 
   14166     // call function
   14167     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14168     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14169     glContext->hooks->gl.glTexEnvx(target, pname, param);
   14170     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14171     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14172 
   14173     void *pointerArgs[] = {
   14174     };
   14175 
   14176     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14177                               threadStartTime, threadEndTime,
   14178                               &glmsg, pointerArgs);
   14179     glContext->traceGLMessage(&glmsg);
   14180 }
   14181 
   14182 void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
   14183     GLMessage glmsg;
   14184     GLTraceContext *glContext = getGLTraceContext();
   14185 
   14186     glmsg.set_function(GLMessage::glTexEnviv);
   14187 
   14188     // copy argument target
   14189     GLMessage_DataType *arg_target = glmsg.add_args();
   14190     arg_target->set_isarray(false);
   14191     arg_target->set_type(GLMessage::DataType::ENUM);
   14192     arg_target->add_intvalue((int)target);
   14193 
   14194     // copy argument pname
   14195     GLMessage_DataType *arg_pname = glmsg.add_args();
   14196     arg_pname->set_isarray(false);
   14197     arg_pname->set_type(GLMessage::DataType::ENUM);
   14198     arg_pname->add_intvalue((int)pname);
   14199 
   14200     // copy argument params
   14201     GLMessage_DataType *arg_params = glmsg.add_args();
   14202     arg_params->set_isarray(false);
   14203     arg_params->set_type(GLMessage::DataType::INT);
   14204     arg_params->add_intvalue((int)params);
   14205 
   14206     // call function
   14207     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14208     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14209     glContext->hooks->gl.glTexEnviv(target, pname, params);
   14210     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14211     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14212 
   14213     void *pointerArgs[] = {
   14214         (void *) params,
   14215     };
   14216 
   14217     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14218                               threadStartTime, threadEndTime,
   14219                               &glmsg, pointerArgs);
   14220     glContext->traceGLMessage(&glmsg);
   14221 }
   14222 
   14223 void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) {
   14224     GLMessage glmsg;
   14225     GLTraceContext *glContext = getGLTraceContext();
   14226 
   14227     glmsg.set_function(GLMessage::glTexEnvxv);
   14228 
   14229     // copy argument target
   14230     GLMessage_DataType *arg_target = glmsg.add_args();
   14231     arg_target->set_isarray(false);
   14232     arg_target->set_type(GLMessage::DataType::ENUM);
   14233     arg_target->add_intvalue((int)target);
   14234 
   14235     // copy argument pname
   14236     GLMessage_DataType *arg_pname = glmsg.add_args();
   14237     arg_pname->set_isarray(false);
   14238     arg_pname->set_type(GLMessage::DataType::ENUM);
   14239     arg_pname->add_intvalue((int)pname);
   14240 
   14241     // copy argument params
   14242     GLMessage_DataType *arg_params = glmsg.add_args();
   14243     arg_params->set_isarray(false);
   14244     arg_params->set_type(GLMessage::DataType::INT);
   14245     arg_params->add_intvalue((int)params);
   14246 
   14247     // call function
   14248     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14249     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14250     glContext->hooks->gl.glTexEnvxv(target, pname, params);
   14251     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14252     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14253 
   14254     void *pointerArgs[] = {
   14255         (void *) params,
   14256     };
   14257 
   14258     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14259                               threadStartTime, threadEndTime,
   14260                               &glmsg, pointerArgs);
   14261     glContext->traceGLMessage(&glmsg);
   14262 }
   14263 
   14264 void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param) {
   14265     GLMessage glmsg;
   14266     GLTraceContext *glContext = getGLTraceContext();
   14267 
   14268     glmsg.set_function(GLMessage::glTexParameterx);
   14269 
   14270     // copy argument target
   14271     GLMessage_DataType *arg_target = glmsg.add_args();
   14272     arg_target->set_isarray(false);
   14273     arg_target->set_type(GLMessage::DataType::ENUM);
   14274     arg_target->add_intvalue((int)target);
   14275 
   14276     // copy argument pname
   14277     GLMessage_DataType *arg_pname = glmsg.add_args();
   14278     arg_pname->set_isarray(false);
   14279     arg_pname->set_type(GLMessage::DataType::ENUM);
   14280     arg_pname->add_intvalue((int)pname);
   14281 
   14282     // copy argument param
   14283     GLMessage_DataType *arg_param = glmsg.add_args();
   14284     arg_param->set_isarray(false);
   14285     arg_param->set_type(GLMessage::DataType::INT);
   14286     arg_param->add_intvalue(param);
   14287 
   14288     // call function
   14289     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14290     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14291     glContext->hooks->gl.glTexParameterx(target, pname, param);
   14292     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14293     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14294 
   14295     void *pointerArgs[] = {
   14296     };
   14297 
   14298     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14299                               threadStartTime, threadEndTime,
   14300                               &glmsg, pointerArgs);
   14301     glContext->traceGLMessage(&glmsg);
   14302 }
   14303 
   14304 void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) {
   14305     GLMessage glmsg;
   14306     GLTraceContext *glContext = getGLTraceContext();
   14307 
   14308     glmsg.set_function(GLMessage::glTexParameterxv);
   14309 
   14310     // copy argument target
   14311     GLMessage_DataType *arg_target = glmsg.add_args();
   14312     arg_target->set_isarray(false);
   14313     arg_target->set_type(GLMessage::DataType::ENUM);
   14314     arg_target->add_intvalue((int)target);
   14315 
   14316     // copy argument pname
   14317     GLMessage_DataType *arg_pname = glmsg.add_args();
   14318     arg_pname->set_isarray(false);
   14319     arg_pname->set_type(GLMessage::DataType::ENUM);
   14320     arg_pname->add_intvalue((int)pname);
   14321 
   14322     // copy argument params
   14323     GLMessage_DataType *arg_params = glmsg.add_args();
   14324     arg_params->set_isarray(false);
   14325     arg_params->set_type(GLMessage::DataType::INT);
   14326     arg_params->add_intvalue((int)params);
   14327 
   14328     // call function
   14329     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14330     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14331     glContext->hooks->gl.glTexParameterxv(target, pname, params);
   14332     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14333     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14334 
   14335     void *pointerArgs[] = {
   14336         (void *) params,
   14337     };
   14338 
   14339     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14340                               threadStartTime, threadEndTime,
   14341                               &glmsg, pointerArgs);
   14342     glContext->traceGLMessage(&glmsg);
   14343 }
   14344 
   14345 void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z) {
   14346     GLMessage glmsg;
   14347     GLTraceContext *glContext = getGLTraceContext();
   14348 
   14349     glmsg.set_function(GLMessage::glTranslatex);
   14350 
   14351     // copy argument x
   14352     GLMessage_DataType *arg_x = glmsg.add_args();
   14353     arg_x->set_isarray(false);
   14354     arg_x->set_type(GLMessage::DataType::INT);
   14355     arg_x->add_intvalue(x);
   14356 
   14357     // copy argument y
   14358     GLMessage_DataType *arg_y = glmsg.add_args();
   14359     arg_y->set_isarray(false);
   14360     arg_y->set_type(GLMessage::DataType::INT);
   14361     arg_y->add_intvalue(y);
   14362 
   14363     // copy argument z
   14364     GLMessage_DataType *arg_z = glmsg.add_args();
   14365     arg_z->set_isarray(false);
   14366     arg_z->set_type(GLMessage::DataType::INT);
   14367     arg_z->add_intvalue(z);
   14368 
   14369     // call function
   14370     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14371     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14372     glContext->hooks->gl.glTranslatex(x, y, z);
   14373     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14374     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14375 
   14376     void *pointerArgs[] = {
   14377     };
   14378 
   14379     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14380                               threadStartTime, threadEndTime,
   14381                               &glmsg, pointerArgs);
   14382     glContext->traceGLMessage(&glmsg);
   14383 }
   14384 
   14385 void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   14386     GLMessage glmsg;
   14387     GLTraceContext *glContext = getGLTraceContext();
   14388 
   14389     glmsg.set_function(GLMessage::glVertexPointer);
   14390 
   14391     // copy argument size
   14392     GLMessage_DataType *arg_size = glmsg.add_args();
   14393     arg_size->set_isarray(false);
   14394     arg_size->set_type(GLMessage::DataType::INT);
   14395     arg_size->add_intvalue(size);
   14396 
   14397     // copy argument type
   14398     GLMessage_DataType *arg_type = glmsg.add_args();
   14399     arg_type->set_isarray(false);
   14400     arg_type->set_type(GLMessage::DataType::ENUM);
   14401     arg_type->add_intvalue((int)type);
   14402 
   14403     // copy argument stride
   14404     GLMessage_DataType *arg_stride = glmsg.add_args();
   14405     arg_stride->set_isarray(false);
   14406     arg_stride->set_type(GLMessage::DataType::INT);
   14407     arg_stride->add_intvalue(stride);
   14408 
   14409     // copy argument pointer
   14410     GLMessage_DataType *arg_pointer = glmsg.add_args();
   14411     arg_pointer->set_isarray(false);
   14412     arg_pointer->set_type(GLMessage::DataType::INT);
   14413     arg_pointer->add_intvalue((int)pointer);
   14414 
   14415     // call function
   14416     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14417     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14418     glContext->hooks->gl.glVertexPointer(size, type, stride, pointer);
   14419     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14420     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14421 
   14422     void *pointerArgs[] = {
   14423         (void *) pointer,
   14424     };
   14425 
   14426     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14427                               threadStartTime, threadEndTime,
   14428                               &glmsg, pointerArgs);
   14429     glContext->traceGLMessage(&glmsg);
   14430 }
   14431 
   14432 void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) {
   14433     GLMessage glmsg;
   14434     GLTraceContext *glContext = getGLTraceContext();
   14435 
   14436     glmsg.set_function(GLMessage::glPointSizePointerOES);
   14437 
   14438     // copy argument type
   14439     GLMessage_DataType *arg_type = glmsg.add_args();
   14440     arg_type->set_isarray(false);
   14441     arg_type->set_type(GLMessage::DataType::ENUM);
   14442     arg_type->add_intvalue((int)type);
   14443 
   14444     // copy argument stride
   14445     GLMessage_DataType *arg_stride = glmsg.add_args();
   14446     arg_stride->set_isarray(false);
   14447     arg_stride->set_type(GLMessage::DataType::INT);
   14448     arg_stride->add_intvalue(stride);
   14449 
   14450     // copy argument pointer
   14451     GLMessage_DataType *arg_pointer = glmsg.add_args();
   14452     arg_pointer->set_isarray(false);
   14453     arg_pointer->set_type(GLMessage::DataType::INT);
   14454     arg_pointer->add_intvalue((int)pointer);
   14455 
   14456     // call function
   14457     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14458     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14459     glContext->hooks->gl.glPointSizePointerOES(type, stride, pointer);
   14460     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14461     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14462 
   14463     void *pointerArgs[] = {
   14464         (void *) pointer,
   14465     };
   14466 
   14467     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14468                               threadStartTime, threadEndTime,
   14469                               &glmsg, pointerArgs);
   14470     glContext->traceGLMessage(&glmsg);
   14471 }
   14472 
   14473 
   14474 // Definitions for GL1Ext APIs
   14475 
   14476 void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) {
   14477     GLMessage glmsg;
   14478     GLTraceContext *glContext = getGLTraceContext();
   14479 
   14480     glmsg.set_function(GLMessage::glBlendEquationSeparateOES);
   14481 
   14482     // copy argument modeRGB
   14483     GLMessage_DataType *arg_modeRGB = glmsg.add_args();
   14484     arg_modeRGB->set_isarray(false);
   14485     arg_modeRGB->set_type(GLMessage::DataType::ENUM);
   14486     arg_modeRGB->add_intvalue((int)modeRGB);
   14487 
   14488     // copy argument modeAlpha
   14489     GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
   14490     arg_modeAlpha->set_isarray(false);
   14491     arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
   14492     arg_modeAlpha->add_intvalue((int)modeAlpha);
   14493 
   14494     // call function
   14495     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14496     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14497     glContext->hooks->gl.glBlendEquationSeparateOES(modeRGB, modeAlpha);
   14498     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14499     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14500 
   14501     void *pointerArgs[] = {
   14502     };
   14503 
   14504     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14505                               threadStartTime, threadEndTime,
   14506                               &glmsg, pointerArgs);
   14507     glContext->traceGLMessage(&glmsg);
   14508 }
   14509 
   14510 void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
   14511     GLMessage glmsg;
   14512     GLTraceContext *glContext = getGLTraceContext();
   14513 
   14514     glmsg.set_function(GLMessage::glBlendFuncSeparateOES);
   14515 
   14516     // copy argument srcRGB
   14517     GLMessage_DataType *arg_srcRGB = glmsg.add_args();
   14518     arg_srcRGB->set_isarray(false);
   14519     arg_srcRGB->set_type(GLMessage::DataType::ENUM);
   14520     arg_srcRGB->add_intvalue((int)srcRGB);
   14521 
   14522     // copy argument dstRGB
   14523     GLMessage_DataType *arg_dstRGB = glmsg.add_args();
   14524     arg_dstRGB->set_isarray(false);
   14525     arg_dstRGB->set_type(GLMessage::DataType::ENUM);
   14526     arg_dstRGB->add_intvalue((int)dstRGB);
   14527 
   14528     // copy argument srcAlpha
   14529     GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
   14530     arg_srcAlpha->set_isarray(false);
   14531     arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
   14532     arg_srcAlpha->add_intvalue((int)srcAlpha);
   14533 
   14534     // copy argument dstAlpha
   14535     GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
   14536     arg_dstAlpha->set_isarray(false);
   14537     arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
   14538     arg_dstAlpha->add_intvalue((int)dstAlpha);
   14539 
   14540     // call function
   14541     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14542     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14543     glContext->hooks->gl.glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
   14544     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14545     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14546 
   14547     void *pointerArgs[] = {
   14548     };
   14549 
   14550     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14551                               threadStartTime, threadEndTime,
   14552                               &glmsg, pointerArgs);
   14553     glContext->traceGLMessage(&glmsg);
   14554 }
   14555 
   14556 void GLTrace_glBlendEquationOES(GLenum mode) {
   14557     GLMessage glmsg;
   14558     GLTraceContext *glContext = getGLTraceContext();
   14559 
   14560     glmsg.set_function(GLMessage::glBlendEquationOES);
   14561 
   14562     // copy argument mode
   14563     GLMessage_DataType *arg_mode = glmsg.add_args();
   14564     arg_mode->set_isarray(false);
   14565     arg_mode->set_type(GLMessage::DataType::ENUM);
   14566     arg_mode->add_intvalue((int)mode);
   14567 
   14568     // call function
   14569     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14570     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14571     glContext->hooks->gl.glBlendEquationOES(mode);
   14572     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14573     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14574 
   14575     void *pointerArgs[] = {
   14576     };
   14577 
   14578     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14579                               threadStartTime, threadEndTime,
   14580                               &glmsg, pointerArgs);
   14581     glContext->traceGLMessage(&glmsg);
   14582 }
   14583 
   14584 void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
   14585     GLMessage glmsg;
   14586     GLTraceContext *glContext = getGLTraceContext();
   14587 
   14588     glmsg.set_function(GLMessage::glDrawTexsOES);
   14589 
   14590     // copy argument x
   14591     GLMessage_DataType *arg_x = glmsg.add_args();
   14592     arg_x->set_isarray(false);
   14593     arg_x->set_type(GLMessage::DataType::INT);
   14594     arg_x->add_intvalue(x);
   14595 
   14596     // copy argument y
   14597     GLMessage_DataType *arg_y = glmsg.add_args();
   14598     arg_y->set_isarray(false);
   14599     arg_y->set_type(GLMessage::DataType::INT);
   14600     arg_y->add_intvalue(y);
   14601 
   14602     // copy argument z
   14603     GLMessage_DataType *arg_z = glmsg.add_args();
   14604     arg_z->set_isarray(false);
   14605     arg_z->set_type(GLMessage::DataType::INT);
   14606     arg_z->add_intvalue(z);
   14607 
   14608     // copy argument width
   14609     GLMessage_DataType *arg_width = glmsg.add_args();
   14610     arg_width->set_isarray(false);
   14611     arg_width->set_type(GLMessage::DataType::INT);
   14612     arg_width->add_intvalue(width);
   14613 
   14614     // copy argument height
   14615     GLMessage_DataType *arg_height = glmsg.add_args();
   14616     arg_height->set_isarray(false);
   14617     arg_height->set_type(GLMessage::DataType::INT);
   14618     arg_height->add_intvalue(height);
   14619 
   14620     // call function
   14621     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14622     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14623     glContext->hooks->gl.glDrawTexsOES(x, y, z, width, height);
   14624     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14625     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14626 
   14627     void *pointerArgs[] = {
   14628     };
   14629 
   14630     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14631                               threadStartTime, threadEndTime,
   14632                               &glmsg, pointerArgs);
   14633     glContext->traceGLMessage(&glmsg);
   14634 }
   14635 
   14636 void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) {
   14637     GLMessage glmsg;
   14638     GLTraceContext *glContext = getGLTraceContext();
   14639 
   14640     glmsg.set_function(GLMessage::glDrawTexiOES);
   14641 
   14642     // copy argument x
   14643     GLMessage_DataType *arg_x = glmsg.add_args();
   14644     arg_x->set_isarray(false);
   14645     arg_x->set_type(GLMessage::DataType::INT);
   14646     arg_x->add_intvalue(x);
   14647 
   14648     // copy argument y
   14649     GLMessage_DataType *arg_y = glmsg.add_args();
   14650     arg_y->set_isarray(false);
   14651     arg_y->set_type(GLMessage::DataType::INT);
   14652     arg_y->add_intvalue(y);
   14653 
   14654     // copy argument z
   14655     GLMessage_DataType *arg_z = glmsg.add_args();
   14656     arg_z->set_isarray(false);
   14657     arg_z->set_type(GLMessage::DataType::INT);
   14658     arg_z->add_intvalue(z);
   14659 
   14660     // copy argument width
   14661     GLMessage_DataType *arg_width = glmsg.add_args();
   14662     arg_width->set_isarray(false);
   14663     arg_width->set_type(GLMessage::DataType::INT);
   14664     arg_width->add_intvalue(width);
   14665 
   14666     // copy argument height
   14667     GLMessage_DataType *arg_height = glmsg.add_args();
   14668     arg_height->set_isarray(false);
   14669     arg_height->set_type(GLMessage::DataType::INT);
   14670     arg_height->add_intvalue(height);
   14671 
   14672     // call function
   14673     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14674     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14675     glContext->hooks->gl.glDrawTexiOES(x, y, z, width, height);
   14676     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14677     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14678 
   14679     void *pointerArgs[] = {
   14680     };
   14681 
   14682     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14683                               threadStartTime, threadEndTime,
   14684                               &glmsg, pointerArgs);
   14685     glContext->traceGLMessage(&glmsg);
   14686 }
   14687 
   14688 void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) {
   14689     GLMessage glmsg;
   14690     GLTraceContext *glContext = getGLTraceContext();
   14691 
   14692     glmsg.set_function(GLMessage::glDrawTexxOES);
   14693 
   14694     // copy argument x
   14695     GLMessage_DataType *arg_x = glmsg.add_args();
   14696     arg_x->set_isarray(false);
   14697     arg_x->set_type(GLMessage::DataType::INT);
   14698     arg_x->add_intvalue(x);
   14699 
   14700     // copy argument y
   14701     GLMessage_DataType *arg_y = glmsg.add_args();
   14702     arg_y->set_isarray(false);
   14703     arg_y->set_type(GLMessage::DataType::INT);
   14704     arg_y->add_intvalue(y);
   14705 
   14706     // copy argument z
   14707     GLMessage_DataType *arg_z = glmsg.add_args();
   14708     arg_z->set_isarray(false);
   14709     arg_z->set_type(GLMessage::DataType::INT);
   14710     arg_z->add_intvalue(z);
   14711 
   14712     // copy argument width
   14713     GLMessage_DataType *arg_width = glmsg.add_args();
   14714     arg_width->set_isarray(false);
   14715     arg_width->set_type(GLMessage::DataType::INT);
   14716     arg_width->add_intvalue(width);
   14717 
   14718     // copy argument height
   14719     GLMessage_DataType *arg_height = glmsg.add_args();
   14720     arg_height->set_isarray(false);
   14721     arg_height->set_type(GLMessage::DataType::INT);
   14722     arg_height->add_intvalue(height);
   14723 
   14724     // call function
   14725     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14726     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14727     glContext->hooks->gl.glDrawTexxOES(x, y, z, width, height);
   14728     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14729     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14730 
   14731     void *pointerArgs[] = {
   14732     };
   14733 
   14734     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14735                               threadStartTime, threadEndTime,
   14736                               &glmsg, pointerArgs);
   14737     glContext->traceGLMessage(&glmsg);
   14738 }
   14739 
   14740 void GLTrace_glDrawTexsvOES(const GLshort *coords) {
   14741     GLMessage glmsg;
   14742     GLTraceContext *glContext = getGLTraceContext();
   14743 
   14744     glmsg.set_function(GLMessage::glDrawTexsvOES);
   14745 
   14746     // copy argument coords
   14747     GLMessage_DataType *arg_coords = glmsg.add_args();
   14748     arg_coords->set_isarray(false);
   14749     arg_coords->set_type(GLMessage::DataType::INT);
   14750     arg_coords->add_intvalue((int)coords);
   14751 
   14752     // call function
   14753     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14754     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14755     glContext->hooks->gl.glDrawTexsvOES(coords);
   14756     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14757     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14758 
   14759     void *pointerArgs[] = {
   14760         (void *) coords,
   14761     };
   14762 
   14763     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14764                               threadStartTime, threadEndTime,
   14765                               &glmsg, pointerArgs);
   14766     glContext->traceGLMessage(&glmsg);
   14767 }
   14768 
   14769 void GLTrace_glDrawTexivOES(const GLint *coords) {
   14770     GLMessage glmsg;
   14771     GLTraceContext *glContext = getGLTraceContext();
   14772 
   14773     glmsg.set_function(GLMessage::glDrawTexivOES);
   14774 
   14775     // copy argument coords
   14776     GLMessage_DataType *arg_coords = glmsg.add_args();
   14777     arg_coords->set_isarray(false);
   14778     arg_coords->set_type(GLMessage::DataType::INT);
   14779     arg_coords->add_intvalue((int)coords);
   14780 
   14781     // call function
   14782     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14783     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14784     glContext->hooks->gl.glDrawTexivOES(coords);
   14785     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14786     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14787 
   14788     void *pointerArgs[] = {
   14789         (void *) coords,
   14790     };
   14791 
   14792     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14793                               threadStartTime, threadEndTime,
   14794                               &glmsg, pointerArgs);
   14795     glContext->traceGLMessage(&glmsg);
   14796 }
   14797 
   14798 void GLTrace_glDrawTexxvOES(const GLfixed *coords) {
   14799     GLMessage glmsg;
   14800     GLTraceContext *glContext = getGLTraceContext();
   14801 
   14802     glmsg.set_function(GLMessage::glDrawTexxvOES);
   14803 
   14804     // copy argument coords
   14805     GLMessage_DataType *arg_coords = glmsg.add_args();
   14806     arg_coords->set_isarray(false);
   14807     arg_coords->set_type(GLMessage::DataType::INT);
   14808     arg_coords->add_intvalue((int)coords);
   14809 
   14810     // call function
   14811     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14812     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14813     glContext->hooks->gl.glDrawTexxvOES(coords);
   14814     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14815     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14816 
   14817     void *pointerArgs[] = {
   14818         (void *) coords,
   14819     };
   14820 
   14821     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14822                               threadStartTime, threadEndTime,
   14823                               &glmsg, pointerArgs);
   14824     glContext->traceGLMessage(&glmsg);
   14825 }
   14826 
   14827 void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
   14828     GLMessage glmsg;
   14829     GLTraceContext *glContext = getGLTraceContext();
   14830 
   14831     glmsg.set_function(GLMessage::glDrawTexfOES);
   14832 
   14833     // copy argument x
   14834     GLMessage_DataType *arg_x = glmsg.add_args();
   14835     arg_x->set_isarray(false);
   14836     arg_x->set_type(GLMessage::DataType::FLOAT);
   14837     arg_x->add_floatvalue(x);
   14838 
   14839     // copy argument y
   14840     GLMessage_DataType *arg_y = glmsg.add_args();
   14841     arg_y->set_isarray(false);
   14842     arg_y->set_type(GLMessage::DataType::FLOAT);
   14843     arg_y->add_floatvalue(y);
   14844 
   14845     // copy argument z
   14846     GLMessage_DataType *arg_z = glmsg.add_args();
   14847     arg_z->set_isarray(false);
   14848     arg_z->set_type(GLMessage::DataType::FLOAT);
   14849     arg_z->add_floatvalue(z);
   14850 
   14851     // copy argument width
   14852     GLMessage_DataType *arg_width = glmsg.add_args();
   14853     arg_width->set_isarray(false);
   14854     arg_width->set_type(GLMessage::DataType::FLOAT);
   14855     arg_width->add_floatvalue(width);
   14856 
   14857     // copy argument height
   14858     GLMessage_DataType *arg_height = glmsg.add_args();
   14859     arg_height->set_isarray(false);
   14860     arg_height->set_type(GLMessage::DataType::FLOAT);
   14861     arg_height->add_floatvalue(height);
   14862 
   14863     // call function
   14864     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14865     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14866     glContext->hooks->gl.glDrawTexfOES(x, y, z, width, height);
   14867     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14868     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14869 
   14870     void *pointerArgs[] = {
   14871     };
   14872 
   14873     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14874                               threadStartTime, threadEndTime,
   14875                               &glmsg, pointerArgs);
   14876     glContext->traceGLMessage(&glmsg);
   14877 }
   14878 
   14879 void GLTrace_glDrawTexfvOES(const GLfloat *coords) {
   14880     GLMessage glmsg;
   14881     GLTraceContext *glContext = getGLTraceContext();
   14882 
   14883     glmsg.set_function(GLMessage::glDrawTexfvOES);
   14884 
   14885     // copy argument coords
   14886     GLMessage_DataType *arg_coords = glmsg.add_args();
   14887     arg_coords->set_isarray(false);
   14888     arg_coords->set_type(GLMessage::DataType::INT);
   14889     arg_coords->add_intvalue((int)coords);
   14890 
   14891     // call function
   14892     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14893     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14894     glContext->hooks->gl.glDrawTexfvOES(coords);
   14895     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14896     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14897 
   14898     void *pointerArgs[] = {
   14899         (void *) coords,
   14900     };
   14901 
   14902     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14903                               threadStartTime, threadEndTime,
   14904                               &glmsg, pointerArgs);
   14905     glContext->traceGLMessage(&glmsg);
   14906 }
   14907 
   14908 void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref) {
   14909     GLMessage glmsg;
   14910     GLTraceContext *glContext = getGLTraceContext();
   14911 
   14912     glmsg.set_function(GLMessage::glAlphaFuncxOES);
   14913 
   14914     // copy argument func
   14915     GLMessage_DataType *arg_func = glmsg.add_args();
   14916     arg_func->set_isarray(false);
   14917     arg_func->set_type(GLMessage::DataType::ENUM);
   14918     arg_func->add_intvalue((int)func);
   14919 
   14920     // copy argument ref
   14921     GLMessage_DataType *arg_ref = glmsg.add_args();
   14922     arg_ref->set_isarray(false);
   14923     arg_ref->set_type(GLMessage::DataType::INT);
   14924     arg_ref->add_intvalue(ref);
   14925 
   14926     // call function
   14927     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14928     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14929     glContext->hooks->gl.glAlphaFuncxOES(func, ref);
   14930     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14931     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14932 
   14933     void *pointerArgs[] = {
   14934     };
   14935 
   14936     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14937                               threadStartTime, threadEndTime,
   14938                               &glmsg, pointerArgs);
   14939     glContext->traceGLMessage(&glmsg);
   14940 }
   14941 
   14942 void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
   14943     GLMessage glmsg;
   14944     GLTraceContext *glContext = getGLTraceContext();
   14945 
   14946     glmsg.set_function(GLMessage::glClearColorxOES);
   14947 
   14948     // copy argument red
   14949     GLMessage_DataType *arg_red = glmsg.add_args();
   14950     arg_red->set_isarray(false);
   14951     arg_red->set_type(GLMessage::DataType::INT);
   14952     arg_red->add_intvalue(red);
   14953 
   14954     // copy argument green
   14955     GLMessage_DataType *arg_green = glmsg.add_args();
   14956     arg_green->set_isarray(false);
   14957     arg_green->set_type(GLMessage::DataType::INT);
   14958     arg_green->add_intvalue(green);
   14959 
   14960     // copy argument blue
   14961     GLMessage_DataType *arg_blue = glmsg.add_args();
   14962     arg_blue->set_isarray(false);
   14963     arg_blue->set_type(GLMessage::DataType::INT);
   14964     arg_blue->add_intvalue(blue);
   14965 
   14966     // copy argument alpha
   14967     GLMessage_DataType *arg_alpha = glmsg.add_args();
   14968     arg_alpha->set_isarray(false);
   14969     arg_alpha->set_type(GLMessage::DataType::INT);
   14970     arg_alpha->add_intvalue(alpha);
   14971 
   14972     // call function
   14973     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14974     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14975     glContext->hooks->gl.glClearColorxOES(red, green, blue, alpha);
   14976     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14977     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14978 
   14979     void *pointerArgs[] = {
   14980     };
   14981 
   14982     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14983                               threadStartTime, threadEndTime,
   14984                               &glmsg, pointerArgs);
   14985     glContext->traceGLMessage(&glmsg);
   14986 }
   14987 
   14988 void GLTrace_glClearDepthxOES(GLclampx depth) {
   14989     GLMessage glmsg;
   14990     GLTraceContext *glContext = getGLTraceContext();
   14991 
   14992     glmsg.set_function(GLMessage::glClearDepthxOES);
   14993 
   14994     // copy argument depth
   14995     GLMessage_DataType *arg_depth = glmsg.add_args();
   14996     arg_depth->set_isarray(false);
   14997     arg_depth->set_type(GLMessage::DataType::INT);
   14998     arg_depth->add_intvalue(depth);
   14999 
   15000     // call function
   15001     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15002     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15003     glContext->hooks->gl.glClearDepthxOES(depth);
   15004     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15005     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15006 
   15007     void *pointerArgs[] = {
   15008     };
   15009 
   15010     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15011                               threadStartTime, threadEndTime,
   15012                               &glmsg, pointerArgs);
   15013     glContext->traceGLMessage(&glmsg);
   15014 }
   15015 
   15016 void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation) {
   15017     GLMessage glmsg;
   15018     GLTraceContext *glContext = getGLTraceContext();
   15019 
   15020     glmsg.set_function(GLMessage::glClipPlanexOES);
   15021 
   15022     // copy argument plane
   15023     GLMessage_DataType *arg_plane = glmsg.add_args();
   15024     arg_plane->set_isarray(false);
   15025     arg_plane->set_type(GLMessage::DataType::ENUM);
   15026     arg_plane->add_intvalue((int)plane);
   15027 
   15028     // copy argument equation
   15029     GLMessage_DataType *arg_equation = glmsg.add_args();
   15030     arg_equation->set_isarray(false);
   15031     arg_equation->set_type(GLMessage::DataType::INT);
   15032     arg_equation->add_intvalue((int)equation);
   15033 
   15034     // call function
   15035     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15036     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15037     glContext->hooks->gl.glClipPlanexOES(plane, equation);
   15038     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15039     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15040 
   15041     void *pointerArgs[] = {
   15042         (void *) equation,
   15043     };
   15044 
   15045     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15046                               threadStartTime, threadEndTime,
   15047                               &glmsg, pointerArgs);
   15048     glContext->traceGLMessage(&glmsg);
   15049 }
   15050 
   15051 void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
   15052     GLMessage glmsg;
   15053     GLTraceContext *glContext = getGLTraceContext();
   15054 
   15055     glmsg.set_function(GLMessage::glColor4xOES);
   15056 
   15057     // copy argument red
   15058     GLMessage_DataType *arg_red = glmsg.add_args();
   15059     arg_red->set_isarray(false);
   15060     arg_red->set_type(GLMessage::DataType::INT);
   15061     arg_red->add_intvalue(red);
   15062 
   15063     // copy argument green
   15064     GLMessage_DataType *arg_green = glmsg.add_args();
   15065     arg_green->set_isarray(false);
   15066     arg_green->set_type(GLMessage::DataType::INT);
   15067     arg_green->add_intvalue(green);
   15068 
   15069     // copy argument blue
   15070     GLMessage_DataType *arg_blue = glmsg.add_args();
   15071     arg_blue->set_isarray(false);
   15072     arg_blue->set_type(GLMessage::DataType::INT);
   15073     arg_blue->add_intvalue(blue);
   15074 
   15075     // copy argument alpha
   15076     GLMessage_DataType *arg_alpha = glmsg.add_args();
   15077     arg_alpha->set_isarray(false);
   15078     arg_alpha->set_type(GLMessage::DataType::INT);
   15079     arg_alpha->add_intvalue(alpha);
   15080 
   15081     // call function
   15082     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15083     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15084     glContext->hooks->gl.glColor4xOES(red, green, blue, alpha);
   15085     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15086     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15087 
   15088     void *pointerArgs[] = {
   15089     };
   15090 
   15091     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15092                               threadStartTime, threadEndTime,
   15093                               &glmsg, pointerArgs);
   15094     glContext->traceGLMessage(&glmsg);
   15095 }
   15096 
   15097 void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar) {
   15098     GLMessage glmsg;
   15099     GLTraceContext *glContext = getGLTraceContext();
   15100 
   15101     glmsg.set_function(GLMessage::glDepthRangexOES);
   15102 
   15103     // copy argument zNear
   15104     GLMessage_DataType *arg_zNear = glmsg.add_args();
   15105     arg_zNear->set_isarray(false);
   15106     arg_zNear->set_type(GLMessage::DataType::INT);
   15107     arg_zNear->add_intvalue(zNear);
   15108 
   15109     // copy argument zFar
   15110     GLMessage_DataType *arg_zFar = glmsg.add_args();
   15111     arg_zFar->set_isarray(false);
   15112     arg_zFar->set_type(GLMessage::DataType::INT);
   15113     arg_zFar->add_intvalue(zFar);
   15114 
   15115     // call function
   15116     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15117     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15118     glContext->hooks->gl.glDepthRangexOES(zNear, zFar);
   15119     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15120     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15121 
   15122     void *pointerArgs[] = {
   15123     };
   15124 
   15125     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15126                               threadStartTime, threadEndTime,
   15127                               &glmsg, pointerArgs);
   15128     glContext->traceGLMessage(&glmsg);
   15129 }
   15130 
   15131 void GLTrace_glFogxOES(GLenum pname, GLfixed param) {
   15132     GLMessage glmsg;
   15133     GLTraceContext *glContext = getGLTraceContext();
   15134 
   15135     glmsg.set_function(GLMessage::glFogxOES);
   15136 
   15137     // copy argument pname
   15138     GLMessage_DataType *arg_pname = glmsg.add_args();
   15139     arg_pname->set_isarray(false);
   15140     arg_pname->set_type(GLMessage::DataType::ENUM);
   15141     arg_pname->add_intvalue((int)pname);
   15142 
   15143     // copy argument param
   15144     GLMessage_DataType *arg_param = glmsg.add_args();
   15145     arg_param->set_isarray(false);
   15146     arg_param->set_type(GLMessage::DataType::INT);
   15147     arg_param->add_intvalue(param);
   15148 
   15149     // call function
   15150     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15151     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15152     glContext->hooks->gl.glFogxOES(pname, param);
   15153     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15154     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15155 
   15156     void *pointerArgs[] = {
   15157     };
   15158 
   15159     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15160                               threadStartTime, threadEndTime,
   15161                               &glmsg, pointerArgs);
   15162     glContext->traceGLMessage(&glmsg);
   15163 }
   15164 
   15165 void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params) {
   15166     GLMessage glmsg;
   15167     GLTraceContext *glContext = getGLTraceContext();
   15168 
   15169     glmsg.set_function(GLMessage::glFogxvOES);
   15170 
   15171     // copy argument pname
   15172     GLMessage_DataType *arg_pname = glmsg.add_args();
   15173     arg_pname->set_isarray(false);
   15174     arg_pname->set_type(GLMessage::DataType::ENUM);
   15175     arg_pname->add_intvalue((int)pname);
   15176 
   15177     // copy argument params
   15178     GLMessage_DataType *arg_params = glmsg.add_args();
   15179     arg_params->set_isarray(false);
   15180     arg_params->set_type(GLMessage::DataType::INT);
   15181     arg_params->add_intvalue((int)params);
   15182 
   15183     // call function
   15184     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15185     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15186     glContext->hooks->gl.glFogxvOES(pname, params);
   15187     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15188     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15189 
   15190     void *pointerArgs[] = {
   15191         (void *) params,
   15192     };
   15193 
   15194     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15195                               threadStartTime, threadEndTime,
   15196                               &glmsg, pointerArgs);
   15197     glContext->traceGLMessage(&glmsg);
   15198 }
   15199 
   15200 void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   15201     GLMessage glmsg;
   15202     GLTraceContext *glContext = getGLTraceContext();
   15203 
   15204     glmsg.set_function(GLMessage::glFrustumxOES);
   15205 
   15206     // copy argument left
   15207     GLMessage_DataType *arg_left = glmsg.add_args();
   15208     arg_left->set_isarray(false);
   15209     arg_left->set_type(GLMessage::DataType::INT);
   15210     arg_left->add_intvalue(left);
   15211 
   15212     // copy argument right
   15213     GLMessage_DataType *arg_right = glmsg.add_args();
   15214     arg_right->set_isarray(false);
   15215     arg_right->set_type(GLMessage::DataType::INT);
   15216     arg_right->add_intvalue(right);
   15217 
   15218     // copy argument bottom
   15219     GLMessage_DataType *arg_bottom = glmsg.add_args();
   15220     arg_bottom->set_isarray(false);
   15221     arg_bottom->set_type(GLMessage::DataType::INT);
   15222     arg_bottom->add_intvalue(bottom);
   15223 
   15224     // copy argument top
   15225     GLMessage_DataType *arg_top = glmsg.add_args();
   15226     arg_top->set_isarray(false);
   15227     arg_top->set_type(GLMessage::DataType::INT);
   15228     arg_top->add_intvalue(top);
   15229 
   15230     // copy argument zNear
   15231     GLMessage_DataType *arg_zNear = glmsg.add_args();
   15232     arg_zNear->set_isarray(false);
   15233     arg_zNear->set_type(GLMessage::DataType::INT);
   15234     arg_zNear->add_intvalue(zNear);
   15235 
   15236     // copy argument zFar
   15237     GLMessage_DataType *arg_zFar = glmsg.add_args();
   15238     arg_zFar->set_isarray(false);
   15239     arg_zFar->set_type(GLMessage::DataType::INT);
   15240     arg_zFar->add_intvalue(zFar);
   15241 
   15242     // call function
   15243     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15244     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15245     glContext->hooks->gl.glFrustumxOES(left, right, bottom, top, zNear, zFar);
   15246     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15247     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15248 
   15249     void *pointerArgs[] = {
   15250     };
   15251 
   15252     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15253                               threadStartTime, threadEndTime,
   15254                               &glmsg, pointerArgs);
   15255     glContext->traceGLMessage(&glmsg);
   15256 }
   15257 
   15258 void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) {
   15259     GLMessage glmsg;
   15260     GLTraceContext *glContext = getGLTraceContext();
   15261 
   15262     glmsg.set_function(GLMessage::glGetClipPlanexOES);
   15263 
   15264     // copy argument pname
   15265     GLMessage_DataType *arg_pname = glmsg.add_args();
   15266     arg_pname->set_isarray(false);
   15267     arg_pname->set_type(GLMessage::DataType::ENUM);
   15268     arg_pname->add_intvalue((int)pname);
   15269 
   15270     // copy argument eqn
   15271     GLMessage_DataType *arg_eqn = glmsg.add_args();
   15272     arg_eqn->set_isarray(false);
   15273     arg_eqn->set_type(GLMessage::DataType::INT);
   15274     arg_eqn->add_intvalue((int)eqn);
   15275 
   15276     // call function
   15277     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15278     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15279     glContext->hooks->gl.glGetClipPlanexOES(pname, eqn);
   15280     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15281     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15282 
   15283     void *pointerArgs[] = {
   15284         (void *) eqn,
   15285     };
   15286 
   15287     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15288                               threadStartTime, threadEndTime,
   15289                               &glmsg, pointerArgs);
   15290     glContext->traceGLMessage(&glmsg);
   15291 }
   15292 
   15293 void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params) {
   15294     GLMessage glmsg;
   15295     GLTraceContext *glContext = getGLTraceContext();
   15296 
   15297     glmsg.set_function(GLMessage::glGetFixedvOES);
   15298 
   15299     // copy argument pname
   15300     GLMessage_DataType *arg_pname = glmsg.add_args();
   15301     arg_pname->set_isarray(false);
   15302     arg_pname->set_type(GLMessage::DataType::ENUM);
   15303     arg_pname->add_intvalue((int)pname);
   15304 
   15305     // copy argument params
   15306     GLMessage_DataType *arg_params = glmsg.add_args();
   15307     arg_params->set_isarray(false);
   15308     arg_params->set_type(GLMessage::DataType::INT);
   15309     arg_params->add_intvalue((int)params);
   15310 
   15311     // call function
   15312     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15313     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15314     glContext->hooks->gl.glGetFixedvOES(pname, params);
   15315     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15316     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15317 
   15318     void *pointerArgs[] = {
   15319         (void *) params,
   15320     };
   15321 
   15322     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15323                               threadStartTime, threadEndTime,
   15324                               &glmsg, pointerArgs);
   15325     glContext->traceGLMessage(&glmsg);
   15326 }
   15327 
   15328 void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) {
   15329     GLMessage glmsg;
   15330     GLTraceContext *glContext = getGLTraceContext();
   15331 
   15332     glmsg.set_function(GLMessage::glGetLightxvOES);
   15333 
   15334     // copy argument light
   15335     GLMessage_DataType *arg_light = glmsg.add_args();
   15336     arg_light->set_isarray(false);
   15337     arg_light->set_type(GLMessage::DataType::ENUM);
   15338     arg_light->add_intvalue((int)light);
   15339 
   15340     // copy argument pname
   15341     GLMessage_DataType *arg_pname = glmsg.add_args();
   15342     arg_pname->set_isarray(false);
   15343     arg_pname->set_type(GLMessage::DataType::ENUM);
   15344     arg_pname->add_intvalue((int)pname);
   15345 
   15346     // copy argument params
   15347     GLMessage_DataType *arg_params = glmsg.add_args();
   15348     arg_params->set_isarray(false);
   15349     arg_params->set_type(GLMessage::DataType::INT);
   15350     arg_params->add_intvalue((int)params);
   15351 
   15352     // call function
   15353     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15354     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15355     glContext->hooks->gl.glGetLightxvOES(light, pname, params);
   15356     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15357     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15358 
   15359     void *pointerArgs[] = {
   15360         (void *) params,
   15361     };
   15362 
   15363     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15364                               threadStartTime, threadEndTime,
   15365                               &glmsg, pointerArgs);
   15366     glContext->traceGLMessage(&glmsg);
   15367 }
   15368 
   15369 void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) {
   15370     GLMessage glmsg;
   15371     GLTraceContext *glContext = getGLTraceContext();
   15372 
   15373     glmsg.set_function(GLMessage::glGetMaterialxvOES);
   15374 
   15375     // copy argument face
   15376     GLMessage_DataType *arg_face = glmsg.add_args();
   15377     arg_face->set_isarray(false);
   15378     arg_face->set_type(GLMessage::DataType::ENUM);
   15379     arg_face->add_intvalue((int)face);
   15380 
   15381     // copy argument pname
   15382     GLMessage_DataType *arg_pname = glmsg.add_args();
   15383     arg_pname->set_isarray(false);
   15384     arg_pname->set_type(GLMessage::DataType::ENUM);
   15385     arg_pname->add_intvalue((int)pname);
   15386 
   15387     // copy argument params
   15388     GLMessage_DataType *arg_params = glmsg.add_args();
   15389     arg_params->set_isarray(false);
   15390     arg_params->set_type(GLMessage::DataType::INT);
   15391     arg_params->add_intvalue((int)params);
   15392 
   15393     // call function
   15394     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15395     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15396     glContext->hooks->gl.glGetMaterialxvOES(face, pname, params);
   15397     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15398     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15399 
   15400     void *pointerArgs[] = {
   15401         (void *) params,
   15402     };
   15403 
   15404     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15405                               threadStartTime, threadEndTime,
   15406                               &glmsg, pointerArgs);
   15407     glContext->traceGLMessage(&glmsg);
   15408 }
   15409 
   15410 void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) {
   15411     GLMessage glmsg;
   15412     GLTraceContext *glContext = getGLTraceContext();
   15413 
   15414     glmsg.set_function(GLMessage::glGetTexEnvxvOES);
   15415 
   15416     // copy argument env
   15417     GLMessage_DataType *arg_env = glmsg.add_args();
   15418     arg_env->set_isarray(false);
   15419     arg_env->set_type(GLMessage::DataType::ENUM);
   15420     arg_env->add_intvalue((int)env);
   15421 
   15422     // copy argument pname
   15423     GLMessage_DataType *arg_pname = glmsg.add_args();
   15424     arg_pname->set_isarray(false);
   15425     arg_pname->set_type(GLMessage::DataType::ENUM);
   15426     arg_pname->add_intvalue((int)pname);
   15427 
   15428     // copy argument params
   15429     GLMessage_DataType *arg_params = glmsg.add_args();
   15430     arg_params->set_isarray(false);
   15431     arg_params->set_type(GLMessage::DataType::INT);
   15432     arg_params->add_intvalue((int)params);
   15433 
   15434     // call function
   15435     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15436     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15437     glContext->hooks->gl.glGetTexEnvxvOES(env, pname, params);
   15438     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15439     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15440 
   15441     void *pointerArgs[] = {
   15442         (void *) params,
   15443     };
   15444 
   15445     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15446                               threadStartTime, threadEndTime,
   15447                               &glmsg, pointerArgs);
   15448     glContext->traceGLMessage(&glmsg);
   15449 }
   15450 
   15451 void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) {
   15452     GLMessage glmsg;
   15453     GLTraceContext *glContext = getGLTraceContext();
   15454 
   15455     glmsg.set_function(GLMessage::glGetTexParameterxvOES);
   15456 
   15457     // copy argument target
   15458     GLMessage_DataType *arg_target = glmsg.add_args();
   15459     arg_target->set_isarray(false);
   15460     arg_target->set_type(GLMessage::DataType::ENUM);
   15461     arg_target->add_intvalue((int)target);
   15462 
   15463     // copy argument pname
   15464     GLMessage_DataType *arg_pname = glmsg.add_args();
   15465     arg_pname->set_isarray(false);
   15466     arg_pname->set_type(GLMessage::DataType::ENUM);
   15467     arg_pname->add_intvalue((int)pname);
   15468 
   15469     // copy argument params
   15470     GLMessage_DataType *arg_params = glmsg.add_args();
   15471     arg_params->set_isarray(false);
   15472     arg_params->set_type(GLMessage::DataType::INT);
   15473     arg_params->add_intvalue((int)params);
   15474 
   15475     // call function
   15476     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15477     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15478     glContext->hooks->gl.glGetTexParameterxvOES(target, pname, params);
   15479     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15480     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15481 
   15482     void *pointerArgs[] = {
   15483         (void *) params,
   15484     };
   15485 
   15486     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15487                               threadStartTime, threadEndTime,
   15488                               &glmsg, pointerArgs);
   15489     glContext->traceGLMessage(&glmsg);
   15490 }
   15491 
   15492 void GLTrace_glLightModelxOES(GLenum pname, GLfixed param) {
   15493     GLMessage glmsg;
   15494     GLTraceContext *glContext = getGLTraceContext();
   15495 
   15496     glmsg.set_function(GLMessage::glLightModelxOES);
   15497 
   15498     // copy argument pname
   15499     GLMessage_DataType *arg_pname = glmsg.add_args();
   15500     arg_pname->set_isarray(false);
   15501     arg_pname->set_type(GLMessage::DataType::ENUM);
   15502     arg_pname->add_intvalue((int)pname);
   15503 
   15504     // copy argument param
   15505     GLMessage_DataType *arg_param = glmsg.add_args();
   15506     arg_param->set_isarray(false);
   15507     arg_param->set_type(GLMessage::DataType::INT);
   15508     arg_param->add_intvalue(param);
   15509 
   15510     // call function
   15511     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15512     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15513     glContext->hooks->gl.glLightModelxOES(pname, param);
   15514     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15515     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15516 
   15517     void *pointerArgs[] = {
   15518     };
   15519 
   15520     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15521                               threadStartTime, threadEndTime,
   15522                               &glmsg, pointerArgs);
   15523     glContext->traceGLMessage(&glmsg);
   15524 }
   15525 
   15526 void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params) {
   15527     GLMessage glmsg;
   15528     GLTraceContext *glContext = getGLTraceContext();
   15529 
   15530     glmsg.set_function(GLMessage::glLightModelxvOES);
   15531 
   15532     // copy argument pname
   15533     GLMessage_DataType *arg_pname = glmsg.add_args();
   15534     arg_pname->set_isarray(false);
   15535     arg_pname->set_type(GLMessage::DataType::ENUM);
   15536     arg_pname->add_intvalue((int)pname);
   15537 
   15538     // copy argument params
   15539     GLMessage_DataType *arg_params = glmsg.add_args();
   15540     arg_params->set_isarray(false);
   15541     arg_params->set_type(GLMessage::DataType::INT);
   15542     arg_params->add_intvalue((int)params);
   15543 
   15544     // call function
   15545     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15546     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15547     glContext->hooks->gl.glLightModelxvOES(pname, params);
   15548     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15549     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15550 
   15551     void *pointerArgs[] = {
   15552         (void *) params,
   15553     };
   15554 
   15555     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15556                               threadStartTime, threadEndTime,
   15557                               &glmsg, pointerArgs);
   15558     glContext->traceGLMessage(&glmsg);
   15559 }
   15560 
   15561 void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param) {
   15562     GLMessage glmsg;
   15563     GLTraceContext *glContext = getGLTraceContext();
   15564 
   15565     glmsg.set_function(GLMessage::glLightxOES);
   15566 
   15567     // copy argument light
   15568     GLMessage_DataType *arg_light = glmsg.add_args();
   15569     arg_light->set_isarray(false);
   15570     arg_light->set_type(GLMessage::DataType::ENUM);
   15571     arg_light->add_intvalue((int)light);
   15572 
   15573     // copy argument pname
   15574     GLMessage_DataType *arg_pname = glmsg.add_args();
   15575     arg_pname->set_isarray(false);
   15576     arg_pname->set_type(GLMessage::DataType::ENUM);
   15577     arg_pname->add_intvalue((int)pname);
   15578 
   15579     // copy argument param
   15580     GLMessage_DataType *arg_param = glmsg.add_args();
   15581     arg_param->set_isarray(false);
   15582     arg_param->set_type(GLMessage::DataType::INT);
   15583     arg_param->add_intvalue(param);
   15584 
   15585     // call function
   15586     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15587     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15588     glContext->hooks->gl.glLightxOES(light, pname, param);
   15589     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15590     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15591 
   15592     void *pointerArgs[] = {
   15593     };
   15594 
   15595     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15596                               threadStartTime, threadEndTime,
   15597                               &glmsg, pointerArgs);
   15598     glContext->traceGLMessage(&glmsg);
   15599 }
   15600 
   15601 void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) {
   15602     GLMessage glmsg;
   15603     GLTraceContext *glContext = getGLTraceContext();
   15604 
   15605     glmsg.set_function(GLMessage::glLightxvOES);
   15606 
   15607     // copy argument light
   15608     GLMessage_DataType *arg_light = glmsg.add_args();
   15609     arg_light->set_isarray(false);
   15610     arg_light->set_type(GLMessage::DataType::ENUM);
   15611     arg_light->add_intvalue((int)light);
   15612 
   15613     // copy argument pname
   15614     GLMessage_DataType *arg_pname = glmsg.add_args();
   15615     arg_pname->set_isarray(false);
   15616     arg_pname->set_type(GLMessage::DataType::ENUM);
   15617     arg_pname->add_intvalue((int)pname);
   15618 
   15619     // copy argument params
   15620     GLMessage_DataType *arg_params = glmsg.add_args();
   15621     arg_params->set_isarray(false);
   15622     arg_params->set_type(GLMessage::DataType::INT);
   15623     arg_params->add_intvalue((int)params);
   15624 
   15625     // call function
   15626     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15627     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15628     glContext->hooks->gl.glLightxvOES(light, pname, params);
   15629     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15630     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15631 
   15632     void *pointerArgs[] = {
   15633         (void *) params,
   15634     };
   15635 
   15636     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15637                               threadStartTime, threadEndTime,
   15638                               &glmsg, pointerArgs);
   15639     glContext->traceGLMessage(&glmsg);
   15640 }
   15641 
   15642 void GLTrace_glLineWidthxOES(GLfixed width) {
   15643     GLMessage glmsg;
   15644     GLTraceContext *glContext = getGLTraceContext();
   15645 
   15646     glmsg.set_function(GLMessage::glLineWidthxOES);
   15647 
   15648     // copy argument width
   15649     GLMessage_DataType *arg_width = glmsg.add_args();
   15650     arg_width->set_isarray(false);
   15651     arg_width->set_type(GLMessage::DataType::INT);
   15652     arg_width->add_intvalue(width);
   15653 
   15654     // call function
   15655     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15656     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15657     glContext->hooks->gl.glLineWidthxOES(width);
   15658     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15659     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15660 
   15661     void *pointerArgs[] = {
   15662     };
   15663 
   15664     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15665                               threadStartTime, threadEndTime,
   15666                               &glmsg, pointerArgs);
   15667     glContext->traceGLMessage(&glmsg);
   15668 }
   15669 
   15670 void GLTrace_glLoadMatrixxOES(const GLfixed *m) {
   15671     GLMessage glmsg;
   15672     GLTraceContext *glContext = getGLTraceContext();
   15673 
   15674     glmsg.set_function(GLMessage::glLoadMatrixxOES);
   15675 
   15676     // copy argument m
   15677     GLMessage_DataType *arg_m = glmsg.add_args();
   15678     arg_m->set_isarray(false);
   15679     arg_m->set_type(GLMessage::DataType::INT);
   15680     arg_m->add_intvalue((int)m);
   15681 
   15682     // call function
   15683     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15684     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15685     glContext->hooks->gl.glLoadMatrixxOES(m);
   15686     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15687     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15688 
   15689     void *pointerArgs[] = {
   15690         (void *) m,
   15691     };
   15692 
   15693     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15694                               threadStartTime, threadEndTime,
   15695                               &glmsg, pointerArgs);
   15696     glContext->traceGLMessage(&glmsg);
   15697 }
   15698 
   15699 void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param) {
   15700     GLMessage glmsg;
   15701     GLTraceContext *glContext = getGLTraceContext();
   15702 
   15703     glmsg.set_function(GLMessage::glMaterialxOES);
   15704 
   15705     // copy argument face
   15706     GLMessage_DataType *arg_face = glmsg.add_args();
   15707     arg_face->set_isarray(false);
   15708     arg_face->set_type(GLMessage::DataType::ENUM);
   15709     arg_face->add_intvalue((int)face);
   15710 
   15711     // copy argument pname
   15712     GLMessage_DataType *arg_pname = glmsg.add_args();
   15713     arg_pname->set_isarray(false);
   15714     arg_pname->set_type(GLMessage::DataType::ENUM);
   15715     arg_pname->add_intvalue((int)pname);
   15716 
   15717     // copy argument param
   15718     GLMessage_DataType *arg_param = glmsg.add_args();
   15719     arg_param->set_isarray(false);
   15720     arg_param->set_type(GLMessage::DataType::INT);
   15721     arg_param->add_intvalue(param);
   15722 
   15723     // call function
   15724     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15725     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15726     glContext->hooks->gl.glMaterialxOES(face, pname, param);
   15727     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15728     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15729 
   15730     void *pointerArgs[] = {
   15731     };
   15732 
   15733     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15734                               threadStartTime, threadEndTime,
   15735                               &glmsg, pointerArgs);
   15736     glContext->traceGLMessage(&glmsg);
   15737 }
   15738 
   15739 void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) {
   15740     GLMessage glmsg;
   15741     GLTraceContext *glContext = getGLTraceContext();
   15742 
   15743     glmsg.set_function(GLMessage::glMaterialxvOES);
   15744 
   15745     // copy argument face
   15746     GLMessage_DataType *arg_face = glmsg.add_args();
   15747     arg_face->set_isarray(false);
   15748     arg_face->set_type(GLMessage::DataType::ENUM);
   15749     arg_face->add_intvalue((int)face);
   15750 
   15751     // copy argument pname
   15752     GLMessage_DataType *arg_pname = glmsg.add_args();
   15753     arg_pname->set_isarray(false);
   15754     arg_pname->set_type(GLMessage::DataType::ENUM);
   15755     arg_pname->add_intvalue((int)pname);
   15756 
   15757     // copy argument params
   15758     GLMessage_DataType *arg_params = glmsg.add_args();
   15759     arg_params->set_isarray(false);
   15760     arg_params->set_type(GLMessage::DataType::INT);
   15761     arg_params->add_intvalue((int)params);
   15762 
   15763     // call function
   15764     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15765     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15766     glContext->hooks->gl.glMaterialxvOES(face, pname, params);
   15767     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15768     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15769 
   15770     void *pointerArgs[] = {
   15771         (void *) params,
   15772     };
   15773 
   15774     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15775                               threadStartTime, threadEndTime,
   15776                               &glmsg, pointerArgs);
   15777     glContext->traceGLMessage(&glmsg);
   15778 }
   15779 
   15780 void GLTrace_glMultMatrixxOES(const GLfixed *m) {
   15781     GLMessage glmsg;
   15782     GLTraceContext *glContext = getGLTraceContext();
   15783 
   15784     glmsg.set_function(GLMessage::glMultMatrixxOES);
   15785 
   15786     // copy argument m
   15787     GLMessage_DataType *arg_m = glmsg.add_args();
   15788     arg_m->set_isarray(false);
   15789     arg_m->set_type(GLMessage::DataType::INT);
   15790     arg_m->add_intvalue((int)m);
   15791 
   15792     // call function
   15793     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15794     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15795     glContext->hooks->gl.glMultMatrixxOES(m);
   15796     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15797     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15798 
   15799     void *pointerArgs[] = {
   15800         (void *) m,
   15801     };
   15802 
   15803     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15804                               threadStartTime, threadEndTime,
   15805                               &glmsg, pointerArgs);
   15806     glContext->traceGLMessage(&glmsg);
   15807 }
   15808 
   15809 void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
   15810     GLMessage glmsg;
   15811     GLTraceContext *glContext = getGLTraceContext();
   15812 
   15813     glmsg.set_function(GLMessage::glMultiTexCoord4xOES);
   15814 
   15815     // copy argument target
   15816     GLMessage_DataType *arg_target = glmsg.add_args();
   15817     arg_target->set_isarray(false);
   15818     arg_target->set_type(GLMessage::DataType::ENUM);
   15819     arg_target->add_intvalue((int)target);
   15820 
   15821     // copy argument s
   15822     GLMessage_DataType *arg_s = glmsg.add_args();
   15823     arg_s->set_isarray(false);
   15824     arg_s->set_type(GLMessage::DataType::INT);
   15825     arg_s->add_intvalue(s);
   15826 
   15827     // copy argument t
   15828     GLMessage_DataType *arg_t = glmsg.add_args();
   15829     arg_t->set_isarray(false);
   15830     arg_t->set_type(GLMessage::DataType::INT);
   15831     arg_t->add_intvalue(t);
   15832 
   15833     // copy argument r
   15834     GLMessage_DataType *arg_r = glmsg.add_args();
   15835     arg_r->set_isarray(false);
   15836     arg_r->set_type(GLMessage::DataType::INT);
   15837     arg_r->add_intvalue(r);
   15838 
   15839     // copy argument q
   15840     GLMessage_DataType *arg_q = glmsg.add_args();
   15841     arg_q->set_isarray(false);
   15842     arg_q->set_type(GLMessage::DataType::INT);
   15843     arg_q->add_intvalue(q);
   15844 
   15845     // call function
   15846     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15847     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15848     glContext->hooks->gl.glMultiTexCoord4xOES(target, s, t, r, q);
   15849     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15850     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15851 
   15852     void *pointerArgs[] = {
   15853     };
   15854 
   15855     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15856                               threadStartTime, threadEndTime,
   15857                               &glmsg, pointerArgs);
   15858     glContext->traceGLMessage(&glmsg);
   15859 }
   15860 
   15861 void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz) {
   15862     GLMessage glmsg;
   15863     GLTraceContext *glContext = getGLTraceContext();
   15864 
   15865     glmsg.set_function(GLMessage::glNormal3xOES);
   15866 
   15867     // copy argument nx
   15868     GLMessage_DataType *arg_nx = glmsg.add_args();
   15869     arg_nx->set_isarray(false);
   15870     arg_nx->set_type(GLMessage::DataType::INT);
   15871     arg_nx->add_intvalue(nx);
   15872 
   15873     // copy argument ny
   15874     GLMessage_DataType *arg_ny = glmsg.add_args();
   15875     arg_ny->set_isarray(false);
   15876     arg_ny->set_type(GLMessage::DataType::INT);
   15877     arg_ny->add_intvalue(ny);
   15878 
   15879     // copy argument nz
   15880     GLMessage_DataType *arg_nz = glmsg.add_args();
   15881     arg_nz->set_isarray(false);
   15882     arg_nz->set_type(GLMessage::DataType::INT);
   15883     arg_nz->add_intvalue(nz);
   15884 
   15885     // call function
   15886     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15887     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15888     glContext->hooks->gl.glNormal3xOES(nx, ny, nz);
   15889     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15890     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15891 
   15892     void *pointerArgs[] = {
   15893     };
   15894 
   15895     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15896                               threadStartTime, threadEndTime,
   15897                               &glmsg, pointerArgs);
   15898     glContext->traceGLMessage(&glmsg);
   15899 }
   15900 
   15901 void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   15902     GLMessage glmsg;
   15903     GLTraceContext *glContext = getGLTraceContext();
   15904 
   15905     glmsg.set_function(GLMessage::glOrthoxOES);
   15906 
   15907     // copy argument left
   15908     GLMessage_DataType *arg_left = glmsg.add_args();
   15909     arg_left->set_isarray(false);
   15910     arg_left->set_type(GLMessage::DataType::INT);
   15911     arg_left->add_intvalue(left);
   15912 
   15913     // copy argument right
   15914     GLMessage_DataType *arg_right = glmsg.add_args();
   15915     arg_right->set_isarray(false);
   15916     arg_right->set_type(GLMessage::DataType::INT);
   15917     arg_right->add_intvalue(right);
   15918 
   15919     // copy argument bottom
   15920     GLMessage_DataType *arg_bottom = glmsg.add_args();
   15921     arg_bottom->set_isarray(false);
   15922     arg_bottom->set_type(GLMessage::DataType::INT);
   15923     arg_bottom->add_intvalue(bottom);
   15924 
   15925     // copy argument top
   15926     GLMessage_DataType *arg_top = glmsg.add_args();
   15927     arg_top->set_isarray(false);
   15928     arg_top->set_type(GLMessage::DataType::INT);
   15929     arg_top->add_intvalue(top);
   15930 
   15931     // copy argument zNear
   15932     GLMessage_DataType *arg_zNear = glmsg.add_args();
   15933     arg_zNear->set_isarray(false);
   15934     arg_zNear->set_type(GLMessage::DataType::INT);
   15935     arg_zNear->add_intvalue(zNear);
   15936 
   15937     // copy argument zFar
   15938     GLMessage_DataType *arg_zFar = glmsg.add_args();
   15939     arg_zFar->set_isarray(false);
   15940     arg_zFar->set_type(GLMessage::DataType::INT);
   15941     arg_zFar->add_intvalue(zFar);
   15942 
   15943     // call function
   15944     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15945     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15946     glContext->hooks->gl.glOrthoxOES(left, right, bottom, top, zNear, zFar);
   15947     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15948     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15949 
   15950     void *pointerArgs[] = {
   15951     };
   15952 
   15953     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15954                               threadStartTime, threadEndTime,
   15955                               &glmsg, pointerArgs);
   15956     glContext->traceGLMessage(&glmsg);
   15957 }
   15958 
   15959 void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
   15960     GLMessage glmsg;
   15961     GLTraceContext *glContext = getGLTraceContext();
   15962 
   15963     glmsg.set_function(GLMessage::glPointParameterxOES);
   15964 
   15965     // copy argument pname
   15966     GLMessage_DataType *arg_pname = glmsg.add_args();
   15967     arg_pname->set_isarray(false);
   15968     arg_pname->set_type(GLMessage::DataType::ENUM);
   15969     arg_pname->add_intvalue((int)pname);
   15970 
   15971     // copy argument param
   15972     GLMessage_DataType *arg_param = glmsg.add_args();
   15973     arg_param->set_isarray(false);
   15974     arg_param->set_type(GLMessage::DataType::INT);
   15975     arg_param->add_intvalue(param);
   15976 
   15977     // call function
   15978     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15979     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15980     glContext->hooks->gl.glPointParameterxOES(pname, param);
   15981     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15982     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15983 
   15984     void *pointerArgs[] = {
   15985     };
   15986 
   15987     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15988                               threadStartTime, threadEndTime,
   15989                               &glmsg, pointerArgs);
   15990     glContext->traceGLMessage(&glmsg);
   15991 }
   15992 
   15993 void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params) {
   15994     GLMessage glmsg;
   15995     GLTraceContext *glContext = getGLTraceContext();
   15996 
   15997     glmsg.set_function(GLMessage::glPointParameterxvOES);
   15998 
   15999     // copy argument pname
   16000     GLMessage_DataType *arg_pname = glmsg.add_args();
   16001     arg_pname->set_isarray(false);
   16002     arg_pname->set_type(GLMessage::DataType::ENUM);
   16003     arg_pname->add_intvalue((int)pname);
   16004 
   16005     // copy argument params
   16006     GLMessage_DataType *arg_params = glmsg.add_args();
   16007     arg_params->set_isarray(false);
   16008     arg_params->set_type(GLMessage::DataType::INT);
   16009     arg_params->add_intvalue((int)params);
   16010 
   16011     // call function
   16012     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16013     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16014     glContext->hooks->gl.glPointParameterxvOES(pname, params);
   16015     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16016     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16017 
   16018     void *pointerArgs[] = {
   16019         (void *) params,
   16020     };
   16021 
   16022     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16023                               threadStartTime, threadEndTime,
   16024                               &glmsg, pointerArgs);
   16025     glContext->traceGLMessage(&glmsg);
   16026 }
   16027 
   16028 void GLTrace_glPointSizexOES(GLfixed size) {
   16029     GLMessage glmsg;
   16030     GLTraceContext *glContext = getGLTraceContext();
   16031 
   16032     glmsg.set_function(GLMessage::glPointSizexOES);
   16033 
   16034     // copy argument size
   16035     GLMessage_DataType *arg_size = glmsg.add_args();
   16036     arg_size->set_isarray(false);
   16037     arg_size->set_type(GLMessage::DataType::INT);
   16038     arg_size->add_intvalue(size);
   16039 
   16040     // call function
   16041     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16042     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16043     glContext->hooks->gl.glPointSizexOES(size);
   16044     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16045     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16046 
   16047     void *pointerArgs[] = {
   16048     };
   16049 
   16050     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16051                               threadStartTime, threadEndTime,
   16052                               &glmsg, pointerArgs);
   16053     glContext->traceGLMessage(&glmsg);
   16054 }
   16055 
   16056 void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units) {
   16057     GLMessage glmsg;
   16058     GLTraceContext *glContext = getGLTraceContext();
   16059 
   16060     glmsg.set_function(GLMessage::glPolygonOffsetxOES);
   16061 
   16062     // copy argument factor
   16063     GLMessage_DataType *arg_factor = glmsg.add_args();
   16064     arg_factor->set_isarray(false);
   16065     arg_factor->set_type(GLMessage::DataType::INT);
   16066     arg_factor->add_intvalue(factor);
   16067 
   16068     // copy argument units
   16069     GLMessage_DataType *arg_units = glmsg.add_args();
   16070     arg_units->set_isarray(false);
   16071     arg_units->set_type(GLMessage::DataType::INT);
   16072     arg_units->add_intvalue(units);
   16073 
   16074     // call function
   16075     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16076     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16077     glContext->hooks->gl.glPolygonOffsetxOES(factor, units);
   16078     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16079     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16080 
   16081     void *pointerArgs[] = {
   16082     };
   16083 
   16084     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16085                               threadStartTime, threadEndTime,
   16086                               &glmsg, pointerArgs);
   16087     glContext->traceGLMessage(&glmsg);
   16088 }
   16089 
   16090 void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
   16091     GLMessage glmsg;
   16092     GLTraceContext *glContext = getGLTraceContext();
   16093 
   16094     glmsg.set_function(GLMessage::glRotatexOES);
   16095 
   16096     // copy argument angle
   16097     GLMessage_DataType *arg_angle = glmsg.add_args();
   16098     arg_angle->set_isarray(false);
   16099     arg_angle->set_type(GLMessage::DataType::INT);
   16100     arg_angle->add_intvalue(angle);
   16101 
   16102     // copy argument x
   16103     GLMessage_DataType *arg_x = glmsg.add_args();
   16104     arg_x->set_isarray(false);
   16105     arg_x->set_type(GLMessage::DataType::INT);
   16106     arg_x->add_intvalue(x);
   16107 
   16108     // copy argument y
   16109     GLMessage_DataType *arg_y = glmsg.add_args();
   16110     arg_y->set_isarray(false);
   16111     arg_y->set_type(GLMessage::DataType::INT);
   16112     arg_y->add_intvalue(y);
   16113 
   16114     // copy argument z
   16115     GLMessage_DataType *arg_z = glmsg.add_args();
   16116     arg_z->set_isarray(false);
   16117     arg_z->set_type(GLMessage::DataType::INT);
   16118     arg_z->add_intvalue(z);
   16119 
   16120     // call function
   16121     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16122     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16123     glContext->hooks->gl.glRotatexOES(angle, x, y, z);
   16124     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16125     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16126 
   16127     void *pointerArgs[] = {
   16128     };
   16129 
   16130     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16131                               threadStartTime, threadEndTime,
   16132                               &glmsg, pointerArgs);
   16133     glContext->traceGLMessage(&glmsg);
   16134 }
   16135 
   16136 void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
   16137     GLMessage glmsg;
   16138     GLTraceContext *glContext = getGLTraceContext();
   16139 
   16140     glmsg.set_function(GLMessage::glSampleCoveragexOES);
   16141 
   16142     // copy argument value
   16143     GLMessage_DataType *arg_value = glmsg.add_args();
   16144     arg_value->set_isarray(false);
   16145     arg_value->set_type(GLMessage::DataType::INT);
   16146     arg_value->add_intvalue(value);
   16147 
   16148     // copy argument invert
   16149     GLMessage_DataType *arg_invert = glmsg.add_args();
   16150     arg_invert->set_isarray(false);
   16151     arg_invert->set_type(GLMessage::DataType::BOOL);
   16152     arg_invert->add_boolvalue(invert);
   16153 
   16154     // call function
   16155     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16156     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16157     glContext->hooks->gl.glSampleCoveragexOES(value, invert);
   16158     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16159     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16160 
   16161     void *pointerArgs[] = {
   16162     };
   16163 
   16164     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16165                               threadStartTime, threadEndTime,
   16166                               &glmsg, pointerArgs);
   16167     glContext->traceGLMessage(&glmsg);
   16168 }
   16169 
   16170 void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z) {
   16171     GLMessage glmsg;
   16172     GLTraceContext *glContext = getGLTraceContext();
   16173 
   16174     glmsg.set_function(GLMessage::glScalexOES);
   16175 
   16176     // copy argument x
   16177     GLMessage_DataType *arg_x = glmsg.add_args();
   16178     arg_x->set_isarray(false);
   16179     arg_x->set_type(GLMessage::DataType::INT);
   16180     arg_x->add_intvalue(x);
   16181 
   16182     // copy argument y
   16183     GLMessage_DataType *arg_y = glmsg.add_args();
   16184     arg_y->set_isarray(false);
   16185     arg_y->set_type(GLMessage::DataType::INT);
   16186     arg_y->add_intvalue(y);
   16187 
   16188     // copy argument z
   16189     GLMessage_DataType *arg_z = glmsg.add_args();
   16190     arg_z->set_isarray(false);
   16191     arg_z->set_type(GLMessage::DataType::INT);
   16192     arg_z->add_intvalue(z);
   16193 
   16194     // call function
   16195     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16196     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16197     glContext->hooks->gl.glScalexOES(x, y, z);
   16198     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16199     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16200 
   16201     void *pointerArgs[] = {
   16202     };
   16203 
   16204     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16205                               threadStartTime, threadEndTime,
   16206                               &glmsg, pointerArgs);
   16207     glContext->traceGLMessage(&glmsg);
   16208 }
   16209 
   16210 void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param) {
   16211     GLMessage glmsg;
   16212     GLTraceContext *glContext = getGLTraceContext();
   16213 
   16214     glmsg.set_function(GLMessage::glTexEnvxOES);
   16215 
   16216     // copy argument target
   16217     GLMessage_DataType *arg_target = glmsg.add_args();
   16218     arg_target->set_isarray(false);
   16219     arg_target->set_type(GLMessage::DataType::ENUM);
   16220     arg_target->add_intvalue((int)target);
   16221 
   16222     // copy argument pname
   16223     GLMessage_DataType *arg_pname = glmsg.add_args();
   16224     arg_pname->set_isarray(false);
   16225     arg_pname->set_type(GLMessage::DataType::ENUM);
   16226     arg_pname->add_intvalue((int)pname);
   16227 
   16228     // copy argument param
   16229     GLMessage_DataType *arg_param = glmsg.add_args();
   16230     arg_param->set_isarray(false);
   16231     arg_param->set_type(GLMessage::DataType::INT);
   16232     arg_param->add_intvalue(param);
   16233 
   16234     // call function
   16235     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16236     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16237     glContext->hooks->gl.glTexEnvxOES(target, pname, param);
   16238     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16239     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16240 
   16241     void *pointerArgs[] = {
   16242     };
   16243 
   16244     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16245                               threadStartTime, threadEndTime,
   16246                               &glmsg, pointerArgs);
   16247     glContext->traceGLMessage(&glmsg);
   16248 }
   16249 
   16250 void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) {
   16251     GLMessage glmsg;
   16252     GLTraceContext *glContext = getGLTraceContext();
   16253 
   16254     glmsg.set_function(GLMessage::glTexEnvxvOES);
   16255 
   16256     // copy argument target
   16257     GLMessage_DataType *arg_target = glmsg.add_args();
   16258     arg_target->set_isarray(false);
   16259     arg_target->set_type(GLMessage::DataType::ENUM);
   16260     arg_target->add_intvalue((int)target);
   16261 
   16262     // copy argument pname
   16263     GLMessage_DataType *arg_pname = glmsg.add_args();
   16264     arg_pname->set_isarray(false);
   16265     arg_pname->set_type(GLMessage::DataType::ENUM);
   16266     arg_pname->add_intvalue((int)pname);
   16267 
   16268     // copy argument params
   16269     GLMessage_DataType *arg_params = glmsg.add_args();
   16270     arg_params->set_isarray(false);
   16271     arg_params->set_type(GLMessage::DataType::INT);
   16272     arg_params->add_intvalue((int)params);
   16273 
   16274     // call function
   16275     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16276     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16277     glContext->hooks->gl.glTexEnvxvOES(target, pname, params);
   16278     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16279     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16280 
   16281     void *pointerArgs[] = {
   16282         (void *) params,
   16283     };
   16284 
   16285     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16286                               threadStartTime, threadEndTime,
   16287                               &glmsg, pointerArgs);
   16288     glContext->traceGLMessage(&glmsg);
   16289 }
   16290 
   16291 void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param) {
   16292     GLMessage glmsg;
   16293     GLTraceContext *glContext = getGLTraceContext();
   16294 
   16295     glmsg.set_function(GLMessage::glTexParameterxOES);
   16296 
   16297     // copy argument target
   16298     GLMessage_DataType *arg_target = glmsg.add_args();
   16299     arg_target->set_isarray(false);
   16300     arg_target->set_type(GLMessage::DataType::ENUM);
   16301     arg_target->add_intvalue((int)target);
   16302 
   16303     // copy argument pname
   16304     GLMessage_DataType *arg_pname = glmsg.add_args();
   16305     arg_pname->set_isarray(false);
   16306     arg_pname->set_type(GLMessage::DataType::ENUM);
   16307     arg_pname->add_intvalue((int)pname);
   16308 
   16309     // copy argument param
   16310     GLMessage_DataType *arg_param = glmsg.add_args();
   16311     arg_param->set_isarray(false);
   16312     arg_param->set_type(GLMessage::DataType::INT);
   16313     arg_param->add_intvalue(param);
   16314 
   16315     // call function
   16316     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16317     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16318     glContext->hooks->gl.glTexParameterxOES(target, pname, param);
   16319     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16320     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16321 
   16322     void *pointerArgs[] = {
   16323     };
   16324 
   16325     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16326                               threadStartTime, threadEndTime,
   16327                               &glmsg, pointerArgs);
   16328     glContext->traceGLMessage(&glmsg);
   16329 }
   16330 
   16331 void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params) {
   16332     GLMessage glmsg;
   16333     GLTraceContext *glContext = getGLTraceContext();
   16334 
   16335     glmsg.set_function(GLMessage::glTexParameterxvOES);
   16336 
   16337     // copy argument target
   16338     GLMessage_DataType *arg_target = glmsg.add_args();
   16339     arg_target->set_isarray(false);
   16340     arg_target->set_type(GLMessage::DataType::ENUM);
   16341     arg_target->add_intvalue((int)target);
   16342 
   16343     // copy argument pname
   16344     GLMessage_DataType *arg_pname = glmsg.add_args();
   16345     arg_pname->set_isarray(false);
   16346     arg_pname->set_type(GLMessage::DataType::ENUM);
   16347     arg_pname->add_intvalue((int)pname);
   16348 
   16349     // copy argument params
   16350     GLMessage_DataType *arg_params = glmsg.add_args();
   16351     arg_params->set_isarray(false);
   16352     arg_params->set_type(GLMessage::DataType::INT);
   16353     arg_params->add_intvalue((int)params);
   16354 
   16355     // call function
   16356     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16357     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16358     glContext->hooks->gl.glTexParameterxvOES(target, pname, params);
   16359     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16360     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16361 
   16362     void *pointerArgs[] = {
   16363         (void *) params,
   16364     };
   16365 
   16366     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16367                               threadStartTime, threadEndTime,
   16368                               &glmsg, pointerArgs);
   16369     glContext->traceGLMessage(&glmsg);
   16370 }
   16371 
   16372 void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z) {
   16373     GLMessage glmsg;
   16374     GLTraceContext *glContext = getGLTraceContext();
   16375 
   16376     glmsg.set_function(GLMessage::glTranslatexOES);
   16377 
   16378     // copy argument x
   16379     GLMessage_DataType *arg_x = glmsg.add_args();
   16380     arg_x->set_isarray(false);
   16381     arg_x->set_type(GLMessage::DataType::INT);
   16382     arg_x->add_intvalue(x);
   16383 
   16384     // copy argument y
   16385     GLMessage_DataType *arg_y = glmsg.add_args();
   16386     arg_y->set_isarray(false);
   16387     arg_y->set_type(GLMessage::DataType::INT);
   16388     arg_y->add_intvalue(y);
   16389 
   16390     // copy argument z
   16391     GLMessage_DataType *arg_z = glmsg.add_args();
   16392     arg_z->set_isarray(false);
   16393     arg_z->set_type(GLMessage::DataType::INT);
   16394     arg_z->add_intvalue(z);
   16395 
   16396     // call function
   16397     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16398     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16399     glContext->hooks->gl.glTranslatexOES(x, y, z);
   16400     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16401     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16402 
   16403     void *pointerArgs[] = {
   16404     };
   16405 
   16406     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16407                               threadStartTime, threadEndTime,
   16408                               &glmsg, pointerArgs);
   16409     glContext->traceGLMessage(&glmsg);
   16410 }
   16411 
   16412 GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer) {
   16413     GLMessage glmsg;
   16414     GLTraceContext *glContext = getGLTraceContext();
   16415 
   16416     glmsg.set_function(GLMessage::glIsRenderbufferOES);
   16417 
   16418     // copy argument renderbuffer
   16419     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   16420     arg_renderbuffer->set_isarray(false);
   16421     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   16422     arg_renderbuffer->add_intvalue(renderbuffer);
   16423 
   16424     // call function
   16425     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16426     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16427     GLboolean retValue = glContext->hooks->gl.glIsRenderbufferOES(renderbuffer);
   16428     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16429     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16430 
   16431     // set return value
   16432     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   16433     rt->set_isarray(false);
   16434     rt->set_type(GLMessage::DataType::BOOL);
   16435     rt->add_boolvalue(retValue);
   16436 
   16437     void *pointerArgs[] = {
   16438     };
   16439 
   16440     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16441                               threadStartTime, threadEndTime,
   16442                               &glmsg, pointerArgs);
   16443     glContext->traceGLMessage(&glmsg);
   16444 
   16445     return retValue;
   16446 }
   16447 
   16448 void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) {
   16449     GLMessage glmsg;
   16450     GLTraceContext *glContext = getGLTraceContext();
   16451 
   16452     glmsg.set_function(GLMessage::glBindRenderbufferOES);
   16453 
   16454     // copy argument target
   16455     GLMessage_DataType *arg_target = glmsg.add_args();
   16456     arg_target->set_isarray(false);
   16457     arg_target->set_type(GLMessage::DataType::ENUM);
   16458     arg_target->add_intvalue((int)target);
   16459 
   16460     // copy argument renderbuffer
   16461     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   16462     arg_renderbuffer->set_isarray(false);
   16463     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   16464     arg_renderbuffer->add_intvalue(renderbuffer);
   16465 
   16466     // call function
   16467     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16468     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16469     glContext->hooks->gl.glBindRenderbufferOES(target, renderbuffer);
   16470     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16471     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16472 
   16473     void *pointerArgs[] = {
   16474     };
   16475 
   16476     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16477                               threadStartTime, threadEndTime,
   16478                               &glmsg, pointerArgs);
   16479     glContext->traceGLMessage(&glmsg);
   16480 }
   16481 
   16482 void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) {
   16483     GLMessage glmsg;
   16484     GLTraceContext *glContext = getGLTraceContext();
   16485 
   16486     glmsg.set_function(GLMessage::glDeleteRenderbuffersOES);
   16487 
   16488     // copy argument n
   16489     GLMessage_DataType *arg_n = glmsg.add_args();
   16490     arg_n->set_isarray(false);
   16491     arg_n->set_type(GLMessage::DataType::INT);
   16492     arg_n->add_intvalue(n);
   16493 
   16494     // copy argument renderbuffers
   16495     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   16496     arg_renderbuffers->set_isarray(false);
   16497     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   16498     arg_renderbuffers->add_intvalue((int)renderbuffers);
   16499 
   16500     // call function
   16501     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16502     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16503     glContext->hooks->gl.glDeleteRenderbuffersOES(n, renderbuffers);
   16504     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16505     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16506 
   16507     void *pointerArgs[] = {
   16508         (void *) renderbuffers,
   16509     };
   16510 
   16511     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16512                               threadStartTime, threadEndTime,
   16513                               &glmsg, pointerArgs);
   16514     glContext->traceGLMessage(&glmsg);
   16515 }
   16516 
   16517 void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) {
   16518     GLMessage glmsg;
   16519     GLTraceContext *glContext = getGLTraceContext();
   16520 
   16521     glmsg.set_function(GLMessage::glGenRenderbuffersOES);
   16522 
   16523     // copy argument n
   16524     GLMessage_DataType *arg_n = glmsg.add_args();
   16525     arg_n->set_isarray(false);
   16526     arg_n->set_type(GLMessage::DataType::INT);
   16527     arg_n->add_intvalue(n);
   16528 
   16529     // copy argument renderbuffers
   16530     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   16531     arg_renderbuffers->set_isarray(false);
   16532     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   16533     arg_renderbuffers->add_intvalue((int)renderbuffers);
   16534 
   16535     // call function
   16536     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16537     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16538     glContext->hooks->gl.glGenRenderbuffersOES(n, renderbuffers);
   16539     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16540     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16541 
   16542     void *pointerArgs[] = {
   16543         (void *) renderbuffers,
   16544     };
   16545 
   16546     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16547                               threadStartTime, threadEndTime,
   16548                               &glmsg, pointerArgs);
   16549     glContext->traceGLMessage(&glmsg);
   16550 }
   16551 
   16552 void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
   16553     GLMessage glmsg;
   16554     GLTraceContext *glContext = getGLTraceContext();
   16555 
   16556     glmsg.set_function(GLMessage::glRenderbufferStorageOES);
   16557 
   16558     // copy argument target
   16559     GLMessage_DataType *arg_target = glmsg.add_args();
   16560     arg_target->set_isarray(false);
   16561     arg_target->set_type(GLMessage::DataType::ENUM);
   16562     arg_target->add_intvalue((int)target);
   16563 
   16564     // copy argument internalformat
   16565     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   16566     arg_internalformat->set_isarray(false);
   16567     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   16568     arg_internalformat->add_intvalue((int)internalformat);
   16569 
   16570     // copy argument width
   16571     GLMessage_DataType *arg_width = glmsg.add_args();
   16572     arg_width->set_isarray(false);
   16573     arg_width->set_type(GLMessage::DataType::INT);
   16574     arg_width->add_intvalue(width);
   16575 
   16576     // copy argument height
   16577     GLMessage_DataType *arg_height = glmsg.add_args();
   16578     arg_height->set_isarray(false);
   16579     arg_height->set_type(GLMessage::DataType::INT);
   16580     arg_height->add_intvalue(height);
   16581 
   16582     // call function
   16583     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16584     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16585     glContext->hooks->gl.glRenderbufferStorageOES(target, internalformat, width, height);
   16586     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16587     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16588 
   16589     void *pointerArgs[] = {
   16590     };
   16591 
   16592     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16593                               threadStartTime, threadEndTime,
   16594                               &glmsg, pointerArgs);
   16595     glContext->traceGLMessage(&glmsg);
   16596 }
   16597 
   16598 void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params) {
   16599     GLMessage glmsg;
   16600     GLTraceContext *glContext = getGLTraceContext();
   16601 
   16602     glmsg.set_function(GLMessage::glGetRenderbufferParameterivOES);
   16603 
   16604     // copy argument target
   16605     GLMessage_DataType *arg_target = glmsg.add_args();
   16606     arg_target->set_isarray(false);
   16607     arg_target->set_type(GLMessage::DataType::ENUM);
   16608     arg_target->add_intvalue((int)target);
   16609 
   16610     // copy argument pname
   16611     GLMessage_DataType *arg_pname = glmsg.add_args();
   16612     arg_pname->set_isarray(false);
   16613     arg_pname->set_type(GLMessage::DataType::ENUM);
   16614     arg_pname->add_intvalue((int)pname);
   16615 
   16616     // copy argument params
   16617     GLMessage_DataType *arg_params = glmsg.add_args();
   16618     arg_params->set_isarray(false);
   16619     arg_params->set_type(GLMessage::DataType::INT);
   16620     arg_params->add_intvalue((int)params);
   16621 
   16622     // call function
   16623     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16624     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16625     glContext->hooks->gl.glGetRenderbufferParameterivOES(target, pname, params);
   16626     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16627     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16628 
   16629     void *pointerArgs[] = {
   16630         (void *) params,
   16631     };
   16632 
   16633     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16634                               threadStartTime, threadEndTime,
   16635                               &glmsg, pointerArgs);
   16636     glContext->traceGLMessage(&glmsg);
   16637 }
   16638 
   16639 GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer) {
   16640     GLMessage glmsg;
   16641     GLTraceContext *glContext = getGLTraceContext();
   16642 
   16643     glmsg.set_function(GLMessage::glIsFramebufferOES);
   16644 
   16645     // copy argument framebuffer
   16646     GLMessage_DataType *arg_framebuffer = glmsg.add_args();
   16647     arg_framebuffer->set_isarray(false);
   16648     arg_framebuffer->set_type(GLMessage::DataType::INT);
   16649     arg_framebuffer->add_intvalue(framebuffer);
   16650 
   16651     // call function
   16652     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16653     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16654     GLboolean retValue = glContext->hooks->gl.glIsFramebufferOES(framebuffer);
   16655     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16656     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16657 
   16658     // set return value
   16659     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   16660     rt->set_isarray(false);
   16661     rt->set_type(GLMessage::DataType::BOOL);
   16662     rt->add_boolvalue(retValue);
   16663 
   16664     void *pointerArgs[] = {
   16665     };
   16666 
   16667     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16668                               threadStartTime, threadEndTime,
   16669                               &glmsg, pointerArgs);
   16670     glContext->traceGLMessage(&glmsg);
   16671 
   16672     return retValue;
   16673 }
   16674 
   16675 void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer) {
   16676     GLMessage glmsg;
   16677     GLTraceContext *glContext = getGLTraceContext();
   16678 
   16679     glmsg.set_function(GLMessage::glBindFramebufferOES);
   16680 
   16681     // copy argument target
   16682     GLMessage_DataType *arg_target = glmsg.add_args();
   16683     arg_target->set_isarray(false);
   16684     arg_target->set_type(GLMessage::DataType::ENUM);
   16685     arg_target->add_intvalue((int)target);
   16686 
   16687     // copy argument framebuffer
   16688     GLMessage_DataType *arg_framebuffer = glmsg.add_args();
   16689     arg_framebuffer->set_isarray(false);
   16690     arg_framebuffer->set_type(GLMessage::DataType::INT);
   16691     arg_framebuffer->add_intvalue(framebuffer);
   16692 
   16693     // call function
   16694     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16695     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16696     glContext->hooks->gl.glBindFramebufferOES(target, framebuffer);
   16697     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16698     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16699 
   16700     void *pointerArgs[] = {
   16701     };
   16702 
   16703     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16704                               threadStartTime, threadEndTime,
   16705                               &glmsg, pointerArgs);
   16706     glContext->traceGLMessage(&glmsg);
   16707 }
   16708 
   16709 void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) {
   16710     GLMessage glmsg;
   16711     GLTraceContext *glContext = getGLTraceContext();
   16712 
   16713     glmsg.set_function(GLMessage::glDeleteFramebuffersOES);
   16714 
   16715     // copy argument n
   16716     GLMessage_DataType *arg_n = glmsg.add_args();
   16717     arg_n->set_isarray(false);
   16718     arg_n->set_type(GLMessage::DataType::INT);
   16719     arg_n->add_intvalue(n);
   16720 
   16721     // copy argument framebuffers
   16722     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   16723     arg_framebuffers->set_isarray(false);
   16724     arg_framebuffers->set_type(GLMessage::DataType::INT);
   16725     arg_framebuffers->add_intvalue((int)framebuffers);
   16726 
   16727     // call function
   16728     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16729     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16730     glContext->hooks->gl.glDeleteFramebuffersOES(n, framebuffers);
   16731     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16732     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16733 
   16734     void *pointerArgs[] = {
   16735         (void *) framebuffers,
   16736     };
   16737 
   16738     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16739                               threadStartTime, threadEndTime,
   16740                               &glmsg, pointerArgs);
   16741     glContext->traceGLMessage(&glmsg);
   16742 }
   16743 
   16744 void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) {
   16745     GLMessage glmsg;
   16746     GLTraceContext *glContext = getGLTraceContext();
   16747 
   16748     glmsg.set_function(GLMessage::glGenFramebuffersOES);
   16749 
   16750     // copy argument n
   16751     GLMessage_DataType *arg_n = glmsg.add_args();
   16752     arg_n->set_isarray(false);
   16753     arg_n->set_type(GLMessage::DataType::INT);
   16754     arg_n->add_intvalue(n);
   16755 
   16756     // copy argument framebuffers
   16757     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   16758     arg_framebuffers->set_isarray(false);
   16759     arg_framebuffers->set_type(GLMessage::DataType::INT);
   16760     arg_framebuffers->add_intvalue((int)framebuffers);
   16761 
   16762     // call function
   16763     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16764     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16765     glContext->hooks->gl.glGenFramebuffersOES(n, framebuffers);
   16766     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16767     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16768 
   16769     void *pointerArgs[] = {
   16770         (void *) framebuffers,
   16771     };
   16772 
   16773     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16774                               threadStartTime, threadEndTime,
   16775                               &glmsg, pointerArgs);
   16776     glContext->traceGLMessage(&glmsg);
   16777 }
   16778 
   16779 GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target) {
   16780     GLMessage glmsg;
   16781     GLTraceContext *glContext = getGLTraceContext();
   16782 
   16783     glmsg.set_function(GLMessage::glCheckFramebufferStatusOES);
   16784 
   16785     // copy argument target
   16786     GLMessage_DataType *arg_target = glmsg.add_args();
   16787     arg_target->set_isarray(false);
   16788     arg_target->set_type(GLMessage::DataType::ENUM);
   16789     arg_target->add_intvalue((int)target);
   16790 
   16791     // call function
   16792     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16793     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16794     GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatusOES(target);
   16795     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16796     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16797 
   16798     // set return value
   16799     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   16800     rt->set_isarray(false);
   16801     rt->set_type(GLMessage::DataType::ENUM);
   16802     rt->add_intvalue((int)retValue);
   16803 
   16804     void *pointerArgs[] = {
   16805     };
   16806 
   16807     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16808                               threadStartTime, threadEndTime,
   16809                               &glmsg, pointerArgs);
   16810     glContext->traceGLMessage(&glmsg);
   16811 
   16812     return retValue;
   16813 }
   16814 
   16815 void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
   16816     GLMessage glmsg;
   16817     GLTraceContext *glContext = getGLTraceContext();
   16818 
   16819     glmsg.set_function(GLMessage::glFramebufferRenderbufferOES);
   16820 
   16821     // copy argument target
   16822     GLMessage_DataType *arg_target = glmsg.add_args();
   16823     arg_target->set_isarray(false);
   16824     arg_target->set_type(GLMessage::DataType::ENUM);
   16825     arg_target->add_intvalue((int)target);
   16826 
   16827     // copy argument attachment
   16828     GLMessage_DataType *arg_attachment = glmsg.add_args();
   16829     arg_attachment->set_isarray(false);
   16830     arg_attachment->set_type(GLMessage::DataType::ENUM);
   16831     arg_attachment->add_intvalue((int)attachment);
   16832 
   16833     // copy argument renderbuffertarget
   16834     GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
   16835     arg_renderbuffertarget->set_isarray(false);
   16836     arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
   16837     arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
   16838 
   16839     // copy argument renderbuffer
   16840     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   16841     arg_renderbuffer->set_isarray(false);
   16842     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   16843     arg_renderbuffer->add_intvalue(renderbuffer);
   16844 
   16845     // call function
   16846     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16847     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16848     glContext->hooks->gl.glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer);
   16849     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16850     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16851 
   16852     void *pointerArgs[] = {
   16853     };
   16854 
   16855     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16856                               threadStartTime, threadEndTime,
   16857                               &glmsg, pointerArgs);
   16858     glContext->traceGLMessage(&glmsg);
   16859 }
   16860 
   16861 void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
   16862     GLMessage glmsg;
   16863     GLTraceContext *glContext = getGLTraceContext();
   16864 
   16865     glmsg.set_function(GLMessage::glFramebufferTexture2DOES);
   16866 
   16867     // copy argument target
   16868     GLMessage_DataType *arg_target = glmsg.add_args();
   16869     arg_target->set_isarray(false);
   16870     arg_target->set_type(GLMessage::DataType::ENUM);
   16871     arg_target->add_intvalue((int)target);
   16872 
   16873     // copy argument attachment
   16874     GLMessage_DataType *arg_attachment = glmsg.add_args();
   16875     arg_attachment->set_isarray(false);
   16876     arg_attachment->set_type(GLMessage::DataType::ENUM);
   16877     arg_attachment->add_intvalue((int)attachment);
   16878 
   16879     // copy argument textarget
   16880     GLMessage_DataType *arg_textarget = glmsg.add_args();
   16881     arg_textarget->set_isarray(false);
   16882     arg_textarget->set_type(GLMessage::DataType::ENUM);
   16883     arg_textarget->add_intvalue((int)textarget);
   16884 
   16885     // copy argument texture
   16886     GLMessage_DataType *arg_texture = glmsg.add_args();
   16887     arg_texture->set_isarray(false);
   16888     arg_texture->set_type(GLMessage::DataType::INT);
   16889     arg_texture->add_intvalue(texture);
   16890 
   16891     // copy argument level
   16892     GLMessage_DataType *arg_level = glmsg.add_args();
   16893     arg_level->set_isarray(false);
   16894     arg_level->set_type(GLMessage::DataType::INT);
   16895     arg_level->add_intvalue(level);
   16896 
   16897     // call function
   16898     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16899     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16900     glContext->hooks->gl.glFramebufferTexture2DOES(target, attachment, textarget, texture, level);
   16901     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16902     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16903 
   16904     void *pointerArgs[] = {
   16905     };
   16906 
   16907     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16908                               threadStartTime, threadEndTime,
   16909                               &glmsg, pointerArgs);
   16910     glContext->traceGLMessage(&glmsg);
   16911 }
   16912 
   16913 void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
   16914     GLMessage glmsg;
   16915     GLTraceContext *glContext = getGLTraceContext();
   16916 
   16917     glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameterivOES);
   16918 
   16919     // copy argument target
   16920     GLMessage_DataType *arg_target = glmsg.add_args();
   16921     arg_target->set_isarray(false);
   16922     arg_target->set_type(GLMessage::DataType::ENUM);
   16923     arg_target->add_intvalue((int)target);
   16924 
   16925     // copy argument attachment
   16926     GLMessage_DataType *arg_attachment = glmsg.add_args();
   16927     arg_attachment->set_isarray(false);
   16928     arg_attachment->set_type(GLMessage::DataType::ENUM);
   16929     arg_attachment->add_intvalue((int)attachment);
   16930 
   16931     // copy argument pname
   16932     GLMessage_DataType *arg_pname = glmsg.add_args();
   16933     arg_pname->set_isarray(false);
   16934     arg_pname->set_type(GLMessage::DataType::ENUM);
   16935     arg_pname->add_intvalue((int)pname);
   16936 
   16937     // copy argument params
   16938     GLMessage_DataType *arg_params = glmsg.add_args();
   16939     arg_params->set_isarray(false);
   16940     arg_params->set_type(GLMessage::DataType::INT);
   16941     arg_params->add_intvalue((int)params);
   16942 
   16943     // call function
   16944     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16945     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16946     glContext->hooks->gl.glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params);
   16947     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16948     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16949 
   16950     void *pointerArgs[] = {
   16951         (void *) params,
   16952     };
   16953 
   16954     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16955                               threadStartTime, threadEndTime,
   16956                               &glmsg, pointerArgs);
   16957     glContext->traceGLMessage(&glmsg);
   16958 }
   16959 
   16960 void GLTrace_glGenerateMipmapOES(GLenum target) {
   16961     GLMessage glmsg;
   16962     GLTraceContext *glContext = getGLTraceContext();
   16963 
   16964     glmsg.set_function(GLMessage::glGenerateMipmapOES);
   16965 
   16966     // copy argument target
   16967     GLMessage_DataType *arg_target = glmsg.add_args();
   16968     arg_target->set_isarray(false);
   16969     arg_target->set_type(GLMessage::DataType::ENUM);
   16970     arg_target->add_intvalue((int)target);
   16971 
   16972     // call function
   16973     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16974     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16975     glContext->hooks->gl.glGenerateMipmapOES(target);
   16976     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16977     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16978 
   16979     void *pointerArgs[] = {
   16980     };
   16981 
   16982     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16983                               threadStartTime, threadEndTime,
   16984                               &glmsg, pointerArgs);
   16985     glContext->traceGLMessage(&glmsg);
   16986 }
   16987 
   16988 void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) {
   16989     GLMessage glmsg;
   16990     GLTraceContext *glContext = getGLTraceContext();
   16991 
   16992     glmsg.set_function(GLMessage::glCurrentPaletteMatrixOES);
   16993 
   16994     // copy argument matrixpaletteindex
   16995     GLMessage_DataType *arg_matrixpaletteindex = glmsg.add_args();
   16996     arg_matrixpaletteindex->set_isarray(false);
   16997     arg_matrixpaletteindex->set_type(GLMessage::DataType::INT);
   16998     arg_matrixpaletteindex->add_intvalue(matrixpaletteindex);
   16999 
   17000     // call function
   17001     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17002     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17003     glContext->hooks->gl.glCurrentPaletteMatrixOES(matrixpaletteindex);
   17004     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17005     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17006 
   17007     void *pointerArgs[] = {
   17008     };
   17009 
   17010     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17011                               threadStartTime, threadEndTime,
   17012                               &glmsg, pointerArgs);
   17013     glContext->traceGLMessage(&glmsg);
   17014 }
   17015 
   17016 void GLTrace_glLoadPaletteFromModelViewMatrixOES(void) {
   17017     GLMessage glmsg;
   17018     GLTraceContext *glContext = getGLTraceContext();
   17019 
   17020     glmsg.set_function(GLMessage::glLoadPaletteFromModelViewMatrixOES);
   17021 
   17022     // call function
   17023     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17024     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17025     glContext->hooks->gl.glLoadPaletteFromModelViewMatrixOES();
   17026     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17027     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17028 
   17029     void *pointerArgs[] = {
   17030     };
   17031 
   17032     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17033                               threadStartTime, threadEndTime,
   17034                               &glmsg, pointerArgs);
   17035     glContext->traceGLMessage(&glmsg);
   17036 }
   17037 
   17038 void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   17039     GLMessage glmsg;
   17040     GLTraceContext *glContext = getGLTraceContext();
   17041 
   17042     glmsg.set_function(GLMessage::glMatrixIndexPointerOES);
   17043 
   17044     // copy argument size
   17045     GLMessage_DataType *arg_size = glmsg.add_args();
   17046     arg_size->set_isarray(false);
   17047     arg_size->set_type(GLMessage::DataType::INT);
   17048     arg_size->add_intvalue(size);
   17049 
   17050     // copy argument type
   17051     GLMessage_DataType *arg_type = glmsg.add_args();
   17052     arg_type->set_isarray(false);
   17053     arg_type->set_type(GLMessage::DataType::ENUM);
   17054     arg_type->add_intvalue((int)type);
   17055 
   17056     // copy argument stride
   17057     GLMessage_DataType *arg_stride = glmsg.add_args();
   17058     arg_stride->set_isarray(false);
   17059     arg_stride->set_type(GLMessage::DataType::INT);
   17060     arg_stride->add_intvalue(stride);
   17061 
   17062     // copy argument pointer
   17063     GLMessage_DataType *arg_pointer = glmsg.add_args();
   17064     arg_pointer->set_isarray(false);
   17065     arg_pointer->set_type(GLMessage::DataType::INT);
   17066     arg_pointer->add_intvalue((int)pointer);
   17067 
   17068     // call function
   17069     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17070     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17071     glContext->hooks->gl.glMatrixIndexPointerOES(size, type, stride, pointer);
   17072     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17073     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17074 
   17075     void *pointerArgs[] = {
   17076         (void *) pointer,
   17077     };
   17078 
   17079     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17080                               threadStartTime, threadEndTime,
   17081                               &glmsg, pointerArgs);
   17082     glContext->traceGLMessage(&glmsg);
   17083 }
   17084 
   17085 void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   17086     GLMessage glmsg;
   17087     GLTraceContext *glContext = getGLTraceContext();
   17088 
   17089     glmsg.set_function(GLMessage::glWeightPointerOES);
   17090 
   17091     // copy argument size
   17092     GLMessage_DataType *arg_size = glmsg.add_args();
   17093     arg_size->set_isarray(false);
   17094     arg_size->set_type(GLMessage::DataType::INT);
   17095     arg_size->add_intvalue(size);
   17096 
   17097     // copy argument type
   17098     GLMessage_DataType *arg_type = glmsg.add_args();
   17099     arg_type->set_isarray(false);
   17100     arg_type->set_type(GLMessage::DataType::ENUM);
   17101     arg_type->add_intvalue((int)type);
   17102 
   17103     // copy argument stride
   17104     GLMessage_DataType *arg_stride = glmsg.add_args();
   17105     arg_stride->set_isarray(false);
   17106     arg_stride->set_type(GLMessage::DataType::INT);
   17107     arg_stride->add_intvalue(stride);
   17108 
   17109     // copy argument pointer
   17110     GLMessage_DataType *arg_pointer = glmsg.add_args();
   17111     arg_pointer->set_isarray(false);
   17112     arg_pointer->set_type(GLMessage::DataType::INT);
   17113     arg_pointer->add_intvalue((int)pointer);
   17114 
   17115     // call function
   17116     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17117     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17118     glContext->hooks->gl.glWeightPointerOES(size, type, stride, pointer);
   17119     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17120     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17121 
   17122     void *pointerArgs[] = {
   17123         (void *) pointer,
   17124     };
   17125 
   17126     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17127                               threadStartTime, threadEndTime,
   17128                               &glmsg, pointerArgs);
   17129     glContext->traceGLMessage(&glmsg);
   17130 }
   17131 
   17132 GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
   17133     GLMessage glmsg;
   17134     GLTraceContext *glContext = getGLTraceContext();
   17135 
   17136     glmsg.set_function(GLMessage::glQueryMatrixxOES);
   17137 
   17138     // copy argument mantissa
   17139     GLMessage_DataType *arg_mantissa = glmsg.add_args();
   17140     arg_mantissa->set_isarray(false);
   17141     arg_mantissa->set_type(GLMessage::DataType::INT);
   17142     arg_mantissa->add_intvalue((int)mantissa);
   17143 
   17144     // copy argument exponent
   17145     GLMessage_DataType *arg_exponent = glmsg.add_args();
   17146     arg_exponent->set_isarray(false);
   17147     arg_exponent->set_type(GLMessage::DataType::INT);
   17148     arg_exponent->add_intvalue((int)exponent);
   17149 
   17150     // call function
   17151     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17152     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17153     GLbitfield retValue = glContext->hooks->gl.glQueryMatrixxOES(mantissa, exponent);
   17154     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17155     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17156 
   17157     // set return value
   17158     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   17159     rt->set_isarray(false);
   17160     rt->set_type(GLMessage::DataType::INT);
   17161     rt->add_intvalue(retValue);
   17162 
   17163     void *pointerArgs[] = {
   17164         (void *) mantissa,
   17165         (void *) exponent,
   17166     };
   17167 
   17168     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17169                               threadStartTime, threadEndTime,
   17170                               &glmsg, pointerArgs);
   17171     glContext->traceGLMessage(&glmsg);
   17172 
   17173     return retValue;
   17174 }
   17175 
   17176 void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar) {
   17177     GLMessage glmsg;
   17178     GLTraceContext *glContext = getGLTraceContext();
   17179 
   17180     glmsg.set_function(GLMessage::glDepthRangefOES);
   17181 
   17182     // copy argument zNear
   17183     GLMessage_DataType *arg_zNear = glmsg.add_args();
   17184     arg_zNear->set_isarray(false);
   17185     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   17186     arg_zNear->add_floatvalue(zNear);
   17187 
   17188     // copy argument zFar
   17189     GLMessage_DataType *arg_zFar = glmsg.add_args();
   17190     arg_zFar->set_isarray(false);
   17191     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   17192     arg_zFar->add_floatvalue(zFar);
   17193 
   17194     // call function
   17195     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17196     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17197     glContext->hooks->gl.glDepthRangefOES(zNear, zFar);
   17198     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17199     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17200 
   17201     void *pointerArgs[] = {
   17202     };
   17203 
   17204     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17205                               threadStartTime, threadEndTime,
   17206                               &glmsg, pointerArgs);
   17207     glContext->traceGLMessage(&glmsg);
   17208 }
   17209 
   17210 void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   17211     GLMessage glmsg;
   17212     GLTraceContext *glContext = getGLTraceContext();
   17213 
   17214     glmsg.set_function(GLMessage::glFrustumfOES);
   17215 
   17216     // copy argument left
   17217     GLMessage_DataType *arg_left = glmsg.add_args();
   17218     arg_left->set_isarray(false);
   17219     arg_left->set_type(GLMessage::DataType::FLOAT);
   17220     arg_left->add_floatvalue(left);
   17221 
   17222     // copy argument right
   17223     GLMessage_DataType *arg_right = glmsg.add_args();
   17224     arg_right->set_isarray(false);
   17225     arg_right->set_type(GLMessage::DataType::FLOAT);
   17226     arg_right->add_floatvalue(right);
   17227 
   17228     // copy argument bottom
   17229     GLMessage_DataType *arg_bottom = glmsg.add_args();
   17230     arg_bottom->set_isarray(false);
   17231     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   17232     arg_bottom->add_floatvalue(bottom);
   17233 
   17234     // copy argument top
   17235     GLMessage_DataType *arg_top = glmsg.add_args();
   17236     arg_top->set_isarray(false);
   17237     arg_top->set_type(GLMessage::DataType::FLOAT);
   17238     arg_top->add_floatvalue(top);
   17239 
   17240     // copy argument zNear
   17241     GLMessage_DataType *arg_zNear = glmsg.add_args();
   17242     arg_zNear->set_isarray(false);
   17243     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   17244     arg_zNear->add_floatvalue(zNear);
   17245 
   17246     // copy argument zFar
   17247     GLMessage_DataType *arg_zFar = glmsg.add_args();
   17248     arg_zFar->set_isarray(false);
   17249     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   17250     arg_zFar->add_floatvalue(zFar);
   17251 
   17252     // call function
   17253     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17254     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17255     glContext->hooks->gl.glFrustumfOES(left, right, bottom, top, zNear, zFar);
   17256     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17257     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17258 
   17259     void *pointerArgs[] = {
   17260     };
   17261 
   17262     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17263                               threadStartTime, threadEndTime,
   17264                               &glmsg, pointerArgs);
   17265     glContext->traceGLMessage(&glmsg);
   17266 }
   17267 
   17268 void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   17269     GLMessage glmsg;
   17270     GLTraceContext *glContext = getGLTraceContext();
   17271 
   17272     glmsg.set_function(GLMessage::glOrthofOES);
   17273 
   17274     // copy argument left
   17275     GLMessage_DataType *arg_left = glmsg.add_args();
   17276     arg_left->set_isarray(false);
   17277     arg_left->set_type(GLMessage::DataType::FLOAT);
   17278     arg_left->add_floatvalue(left);
   17279 
   17280     // copy argument right
   17281     GLMessage_DataType *arg_right = glmsg.add_args();
   17282     arg_right->set_isarray(false);
   17283     arg_right->set_type(GLMessage::DataType::FLOAT);
   17284     arg_right->add_floatvalue(right);
   17285 
   17286     // copy argument bottom
   17287     GLMessage_DataType *arg_bottom = glmsg.add_args();
   17288     arg_bottom->set_isarray(false);
   17289     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   17290     arg_bottom->add_floatvalue(bottom);
   17291 
   17292     // copy argument top
   17293     GLMessage_DataType *arg_top = glmsg.add_args();
   17294     arg_top->set_isarray(false);
   17295     arg_top->set_type(GLMessage::DataType::FLOAT);
   17296     arg_top->add_floatvalue(top);
   17297 
   17298     // copy argument zNear
   17299     GLMessage_DataType *arg_zNear = glmsg.add_args();
   17300     arg_zNear->set_isarray(false);
   17301     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   17302     arg_zNear->add_floatvalue(zNear);
   17303 
   17304     // copy argument zFar
   17305     GLMessage_DataType *arg_zFar = glmsg.add_args();
   17306     arg_zFar->set_isarray(false);
   17307     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   17308     arg_zFar->add_floatvalue(zFar);
   17309 
   17310     // call function
   17311     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17312     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17313     glContext->hooks->gl.glOrthofOES(left, right, bottom, top, zNear, zFar);
   17314     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17315     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17316 
   17317     void *pointerArgs[] = {
   17318     };
   17319 
   17320     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17321                               threadStartTime, threadEndTime,
   17322                               &glmsg, pointerArgs);
   17323     glContext->traceGLMessage(&glmsg);
   17324 }
   17325 
   17326 void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation) {
   17327     GLMessage glmsg;
   17328     GLTraceContext *glContext = getGLTraceContext();
   17329 
   17330     glmsg.set_function(GLMessage::glClipPlanefOES);
   17331 
   17332     // copy argument plane
   17333     GLMessage_DataType *arg_plane = glmsg.add_args();
   17334     arg_plane->set_isarray(false);
   17335     arg_plane->set_type(GLMessage::DataType::ENUM);
   17336     arg_plane->add_intvalue((int)plane);
   17337 
   17338     // copy argument equation
   17339     GLMessage_DataType *arg_equation = glmsg.add_args();
   17340     arg_equation->set_isarray(false);
   17341     arg_equation->set_type(GLMessage::DataType::INT);
   17342     arg_equation->add_intvalue((int)equation);
   17343 
   17344     // call function
   17345     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17346     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17347     glContext->hooks->gl.glClipPlanefOES(plane, equation);
   17348     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17349     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17350 
   17351     void *pointerArgs[] = {
   17352         (void *) equation,
   17353     };
   17354 
   17355     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17356                               threadStartTime, threadEndTime,
   17357                               &glmsg, pointerArgs);
   17358     glContext->traceGLMessage(&glmsg);
   17359 }
   17360 
   17361 void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) {
   17362     GLMessage glmsg;
   17363     GLTraceContext *glContext = getGLTraceContext();
   17364 
   17365     glmsg.set_function(GLMessage::glGetClipPlanefOES);
   17366 
   17367     // copy argument pname
   17368     GLMessage_DataType *arg_pname = glmsg.add_args();
   17369     arg_pname->set_isarray(false);
   17370     arg_pname->set_type(GLMessage::DataType::ENUM);
   17371     arg_pname->add_intvalue((int)pname);
   17372 
   17373     // copy argument eqn
   17374     GLMessage_DataType *arg_eqn = glmsg.add_args();
   17375     arg_eqn->set_isarray(false);
   17376     arg_eqn->set_type(GLMessage::DataType::INT);
   17377     arg_eqn->add_intvalue((int)eqn);
   17378 
   17379     // call function
   17380     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17381     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17382     glContext->hooks->gl.glGetClipPlanefOES(pname, eqn);
   17383     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17384     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17385 
   17386     void *pointerArgs[] = {
   17387         (void *) eqn,
   17388     };
   17389 
   17390     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17391                               threadStartTime, threadEndTime,
   17392                               &glmsg, pointerArgs);
   17393     glContext->traceGLMessage(&glmsg);
   17394 }
   17395 
   17396 void GLTrace_glClearDepthfOES(GLclampf depth) {
   17397     GLMessage glmsg;
   17398     GLTraceContext *glContext = getGLTraceContext();
   17399 
   17400     glmsg.set_function(GLMessage::glClearDepthfOES);
   17401 
   17402     // copy argument depth
   17403     GLMessage_DataType *arg_depth = glmsg.add_args();
   17404     arg_depth->set_isarray(false);
   17405     arg_depth->set_type(GLMessage::DataType::FLOAT);
   17406     arg_depth->add_floatvalue(depth);
   17407 
   17408     // call function
   17409     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17410     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17411     glContext->hooks->gl.glClearDepthfOES(depth);
   17412     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17413     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17414 
   17415     void *pointerArgs[] = {
   17416     };
   17417 
   17418     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17419                               threadStartTime, threadEndTime,
   17420                               &glmsg, pointerArgs);
   17421     glContext->traceGLMessage(&glmsg);
   17422 }
   17423 
   17424 void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) {
   17425     GLMessage glmsg;
   17426     GLTraceContext *glContext = getGLTraceContext();
   17427 
   17428     glmsg.set_function(GLMessage::glTexGenfOES);
   17429 
   17430     // copy argument coord
   17431     GLMessage_DataType *arg_coord = glmsg.add_args();
   17432     arg_coord->set_isarray(false);
   17433     arg_coord->set_type(GLMessage::DataType::ENUM);
   17434     arg_coord->add_intvalue((int)coord);
   17435 
   17436     // copy argument pname
   17437     GLMessage_DataType *arg_pname = glmsg.add_args();
   17438     arg_pname->set_isarray(false);
   17439     arg_pname->set_type(GLMessage::DataType::ENUM);
   17440     arg_pname->add_intvalue((int)pname);
   17441 
   17442     // copy argument param
   17443     GLMessage_DataType *arg_param = glmsg.add_args();
   17444     arg_param->set_isarray(false);
   17445     arg_param->set_type(GLMessage::DataType::FLOAT);
   17446     arg_param->add_floatvalue(param);
   17447 
   17448     // call function
   17449     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17450     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17451     glContext->hooks->gl.glTexGenfOES(coord, pname, param);
   17452     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17453     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17454 
   17455     void *pointerArgs[] = {
   17456     };
   17457 
   17458     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17459                               threadStartTime, threadEndTime,
   17460                               &glmsg, pointerArgs);
   17461     glContext->traceGLMessage(&glmsg);
   17462 }
   17463 
   17464 void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) {
   17465     GLMessage glmsg;
   17466     GLTraceContext *glContext = getGLTraceContext();
   17467 
   17468     glmsg.set_function(GLMessage::glTexGenfvOES);
   17469 
   17470     // copy argument coord
   17471     GLMessage_DataType *arg_coord = glmsg.add_args();
   17472     arg_coord->set_isarray(false);
   17473     arg_coord->set_type(GLMessage::DataType::ENUM);
   17474     arg_coord->add_intvalue((int)coord);
   17475 
   17476     // copy argument pname
   17477     GLMessage_DataType *arg_pname = glmsg.add_args();
   17478     arg_pname->set_isarray(false);
   17479     arg_pname->set_type(GLMessage::DataType::ENUM);
   17480     arg_pname->add_intvalue((int)pname);
   17481 
   17482     // copy argument params
   17483     GLMessage_DataType *arg_params = glmsg.add_args();
   17484     arg_params->set_isarray(false);
   17485     arg_params->set_type(GLMessage::DataType::INT);
   17486     arg_params->add_intvalue((int)params);
   17487 
   17488     // call function
   17489     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17490     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17491     glContext->hooks->gl.glTexGenfvOES(coord, pname, params);
   17492     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17493     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17494 
   17495     void *pointerArgs[] = {
   17496         (void *) params,
   17497     };
   17498 
   17499     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17500                               threadStartTime, threadEndTime,
   17501                               &glmsg, pointerArgs);
   17502     glContext->traceGLMessage(&glmsg);
   17503 }
   17504 
   17505 void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param) {
   17506     GLMessage glmsg;
   17507     GLTraceContext *glContext = getGLTraceContext();
   17508 
   17509     glmsg.set_function(GLMessage::glTexGeniOES);
   17510 
   17511     // copy argument coord
   17512     GLMessage_DataType *arg_coord = glmsg.add_args();
   17513     arg_coord->set_isarray(false);
   17514     arg_coord->set_type(GLMessage::DataType::ENUM);
   17515     arg_coord->add_intvalue((int)coord);
   17516 
   17517     // copy argument pname
   17518     GLMessage_DataType *arg_pname = glmsg.add_args();
   17519     arg_pname->set_isarray(false);
   17520     arg_pname->set_type(GLMessage::DataType::ENUM);
   17521     arg_pname->add_intvalue((int)pname);
   17522 
   17523     // copy argument param
   17524     GLMessage_DataType *arg_param = glmsg.add_args();
   17525     arg_param->set_isarray(false);
   17526     arg_param->set_type(GLMessage::DataType::INT);
   17527     arg_param->add_intvalue(param);
   17528 
   17529     // call function
   17530     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17531     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17532     glContext->hooks->gl.glTexGeniOES(coord, pname, param);
   17533     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17534     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17535 
   17536     void *pointerArgs[] = {
   17537     };
   17538 
   17539     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17540                               threadStartTime, threadEndTime,
   17541                               &glmsg, pointerArgs);
   17542     glContext->traceGLMessage(&glmsg);
   17543 }
   17544 
   17545 void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) {
   17546     GLMessage glmsg;
   17547     GLTraceContext *glContext = getGLTraceContext();
   17548 
   17549     glmsg.set_function(GLMessage::glTexGenivOES);
   17550 
   17551     // copy argument coord
   17552     GLMessage_DataType *arg_coord = glmsg.add_args();
   17553     arg_coord->set_isarray(false);
   17554     arg_coord->set_type(GLMessage::DataType::ENUM);
   17555     arg_coord->add_intvalue((int)coord);
   17556 
   17557     // copy argument pname
   17558     GLMessage_DataType *arg_pname = glmsg.add_args();
   17559     arg_pname->set_isarray(false);
   17560     arg_pname->set_type(GLMessage::DataType::ENUM);
   17561     arg_pname->add_intvalue((int)pname);
   17562 
   17563     // copy argument params
   17564     GLMessage_DataType *arg_params = glmsg.add_args();
   17565     arg_params->set_isarray(false);
   17566     arg_params->set_type(GLMessage::DataType::INT);
   17567     arg_params->add_intvalue((int)params);
   17568 
   17569     // call function
   17570     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17571     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17572     glContext->hooks->gl.glTexGenivOES(coord, pname, params);
   17573     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17574     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17575 
   17576     void *pointerArgs[] = {
   17577         (void *) params,
   17578     };
   17579 
   17580     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17581                               threadStartTime, threadEndTime,
   17582                               &glmsg, pointerArgs);
   17583     glContext->traceGLMessage(&glmsg);
   17584 }
   17585 
   17586 void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
   17587     GLMessage glmsg;
   17588     GLTraceContext *glContext = getGLTraceContext();
   17589 
   17590     glmsg.set_function(GLMessage::glTexGenxOES);
   17591 
   17592     // copy argument coord
   17593     GLMessage_DataType *arg_coord = glmsg.add_args();
   17594     arg_coord->set_isarray(false);
   17595     arg_coord->set_type(GLMessage::DataType::ENUM);
   17596     arg_coord->add_intvalue((int)coord);
   17597 
   17598     // copy argument pname
   17599     GLMessage_DataType *arg_pname = glmsg.add_args();
   17600     arg_pname->set_isarray(false);
   17601     arg_pname->set_type(GLMessage::DataType::ENUM);
   17602     arg_pname->add_intvalue((int)pname);
   17603 
   17604     // copy argument param
   17605     GLMessage_DataType *arg_param = glmsg.add_args();
   17606     arg_param->set_isarray(false);
   17607     arg_param->set_type(GLMessage::DataType::INT);
   17608     arg_param->add_intvalue(param);
   17609 
   17610     // call function
   17611     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17612     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17613     glContext->hooks->gl.glTexGenxOES(coord, pname, param);
   17614     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17615     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17616 
   17617     void *pointerArgs[] = {
   17618     };
   17619 
   17620     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17621                               threadStartTime, threadEndTime,
   17622                               &glmsg, pointerArgs);
   17623     glContext->traceGLMessage(&glmsg);
   17624 }
   17625 
   17626 void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) {
   17627     GLMessage glmsg;
   17628     GLTraceContext *glContext = getGLTraceContext();
   17629 
   17630     glmsg.set_function(GLMessage::glTexGenxvOES);
   17631 
   17632     // copy argument coord
   17633     GLMessage_DataType *arg_coord = glmsg.add_args();
   17634     arg_coord->set_isarray(false);
   17635     arg_coord->set_type(GLMessage::DataType::ENUM);
   17636     arg_coord->add_intvalue((int)coord);
   17637 
   17638     // copy argument pname
   17639     GLMessage_DataType *arg_pname = glmsg.add_args();
   17640     arg_pname->set_isarray(false);
   17641     arg_pname->set_type(GLMessage::DataType::ENUM);
   17642     arg_pname->add_intvalue((int)pname);
   17643 
   17644     // copy argument params
   17645     GLMessage_DataType *arg_params = glmsg.add_args();
   17646     arg_params->set_isarray(false);
   17647     arg_params->set_type(GLMessage::DataType::INT);
   17648     arg_params->add_intvalue((int)params);
   17649 
   17650     // call function
   17651     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17652     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17653     glContext->hooks->gl.glTexGenxvOES(coord, pname, params);
   17654     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17655     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17656 
   17657     void *pointerArgs[] = {
   17658         (void *) params,
   17659     };
   17660 
   17661     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17662                               threadStartTime, threadEndTime,
   17663                               &glmsg, pointerArgs);
   17664     glContext->traceGLMessage(&glmsg);
   17665 }
   17666 
   17667 void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) {
   17668     GLMessage glmsg;
   17669     GLTraceContext *glContext = getGLTraceContext();
   17670 
   17671     glmsg.set_function(GLMessage::glGetTexGenfvOES);
   17672 
   17673     // copy argument coord
   17674     GLMessage_DataType *arg_coord = glmsg.add_args();
   17675     arg_coord->set_isarray(false);
   17676     arg_coord->set_type(GLMessage::DataType::ENUM);
   17677     arg_coord->add_intvalue((int)coord);
   17678 
   17679     // copy argument pname
   17680     GLMessage_DataType *arg_pname = glmsg.add_args();
   17681     arg_pname->set_isarray(false);
   17682     arg_pname->set_type(GLMessage::DataType::ENUM);
   17683     arg_pname->add_intvalue((int)pname);
   17684 
   17685     // copy argument params
   17686     GLMessage_DataType *arg_params = glmsg.add_args();
   17687     arg_params->set_isarray(false);
   17688     arg_params->set_type(GLMessage::DataType::INT);
   17689     arg_params->add_intvalue((int)params);
   17690 
   17691     // call function
   17692     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17693     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17694     glContext->hooks->gl.glGetTexGenfvOES(coord, pname, params);
   17695     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17696     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17697 
   17698     void *pointerArgs[] = {
   17699         (void *) params,
   17700     };
   17701 
   17702     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17703                               threadStartTime, threadEndTime,
   17704                               &glmsg, pointerArgs);
   17705     glContext->traceGLMessage(&glmsg);
   17706 }
   17707 
   17708 void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) {
   17709     GLMessage glmsg;
   17710     GLTraceContext *glContext = getGLTraceContext();
   17711 
   17712     glmsg.set_function(GLMessage::glGetTexGenivOES);
   17713 
   17714     // copy argument coord
   17715     GLMessage_DataType *arg_coord = glmsg.add_args();
   17716     arg_coord->set_isarray(false);
   17717     arg_coord->set_type(GLMessage::DataType::ENUM);
   17718     arg_coord->add_intvalue((int)coord);
   17719 
   17720     // copy argument pname
   17721     GLMessage_DataType *arg_pname = glmsg.add_args();
   17722     arg_pname->set_isarray(false);
   17723     arg_pname->set_type(GLMessage::DataType::ENUM);
   17724     arg_pname->add_intvalue((int)pname);
   17725 
   17726     // copy argument params
   17727     GLMessage_DataType *arg_params = glmsg.add_args();
   17728     arg_params->set_isarray(false);
   17729     arg_params->set_type(GLMessage::DataType::INT);
   17730     arg_params->add_intvalue((int)params);
   17731 
   17732     // call function
   17733     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17734     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17735     glContext->hooks->gl.glGetTexGenivOES(coord, pname, params);
   17736     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17737     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17738 
   17739     void *pointerArgs[] = {
   17740         (void *) params,
   17741     };
   17742 
   17743     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17744                               threadStartTime, threadEndTime,
   17745                               &glmsg, pointerArgs);
   17746     glContext->traceGLMessage(&glmsg);
   17747 }
   17748 
   17749 void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) {
   17750     GLMessage glmsg;
   17751     GLTraceContext *glContext = getGLTraceContext();
   17752 
   17753     glmsg.set_function(GLMessage::glGetTexGenxvOES);
   17754 
   17755     // copy argument coord
   17756     GLMessage_DataType *arg_coord = glmsg.add_args();
   17757     arg_coord->set_isarray(false);
   17758     arg_coord->set_type(GLMessage::DataType::ENUM);
   17759     arg_coord->add_intvalue((int)coord);
   17760 
   17761     // copy argument pname
   17762     GLMessage_DataType *arg_pname = glmsg.add_args();
   17763     arg_pname->set_isarray(false);
   17764     arg_pname->set_type(GLMessage::DataType::ENUM);
   17765     arg_pname->add_intvalue((int)pname);
   17766 
   17767     // copy argument params
   17768     GLMessage_DataType *arg_params = glmsg.add_args();
   17769     arg_params->set_isarray(false);
   17770     arg_params->set_type(GLMessage::DataType::INT);
   17771     arg_params->add_intvalue((int)params);
   17772 
   17773     // call function
   17774     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17775     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17776     glContext->hooks->gl.glGetTexGenxvOES(coord, pname, params);
   17777     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17778     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17779 
   17780     void *pointerArgs[] = {
   17781         (void *) params,
   17782     };
   17783 
   17784     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17785                               threadStartTime, threadEndTime,
   17786                               &glmsg, pointerArgs);
   17787     glContext->traceGLMessage(&glmsg);
   17788 }
   17789 
   17790 void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn) {
   17791     GLMessage glmsg;
   17792     GLTraceContext *glContext = getGLTraceContext();
   17793 
   17794     glmsg.set_function(GLMessage::glClipPlanefIMG);
   17795 
   17796     // copy argument p
   17797     GLMessage_DataType *arg_p = glmsg.add_args();
   17798     arg_p->set_isarray(false);
   17799     arg_p->set_type(GLMessage::DataType::ENUM);
   17800     arg_p->add_intvalue((int)p);
   17801 
   17802     // copy argument eqn
   17803     GLMessage_DataType *arg_eqn = glmsg.add_args();
   17804     arg_eqn->set_isarray(false);
   17805     arg_eqn->set_type(GLMessage::DataType::INT);
   17806     arg_eqn->add_intvalue((int)eqn);
   17807 
   17808     // call function
   17809     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17810     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17811     glContext->hooks->gl.glClipPlanefIMG(p, eqn);
   17812     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17813     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17814 
   17815     void *pointerArgs[] = {
   17816         (void *) eqn,
   17817     };
   17818 
   17819     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17820                               threadStartTime, threadEndTime,
   17821                               &glmsg, pointerArgs);
   17822     glContext->traceGLMessage(&glmsg);
   17823 }
   17824 
   17825 void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn) {
   17826     GLMessage glmsg;
   17827     GLTraceContext *glContext = getGLTraceContext();
   17828 
   17829     glmsg.set_function(GLMessage::glClipPlanexIMG);
   17830 
   17831     // copy argument p
   17832     GLMessage_DataType *arg_p = glmsg.add_args();
   17833     arg_p->set_isarray(false);
   17834     arg_p->set_type(GLMessage::DataType::ENUM);
   17835     arg_p->add_intvalue((int)p);
   17836 
   17837     // copy argument eqn
   17838     GLMessage_DataType *arg_eqn = glmsg.add_args();
   17839     arg_eqn->set_isarray(false);
   17840     arg_eqn->set_type(GLMessage::DataType::INT);
   17841     arg_eqn->add_intvalue((int)eqn);
   17842 
   17843     // call function
   17844     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17845     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17846     glContext->hooks->gl.glClipPlanexIMG(p, eqn);
   17847     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17848     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17849 
   17850     void *pointerArgs[] = {
   17851         (void *) eqn,
   17852     };
   17853 
   17854     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17855                               threadStartTime, threadEndTime,
   17856                               &glmsg, pointerArgs);
   17857     glContext->traceGLMessage(&glmsg);
   17858 }
   17859 
   17860 
   17861 }; // namespace gltrace
   17862 }; // namespace android
   17863