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 <GLES3/gl3.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 GL3 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(GLfloat red, GLfloat green, GLfloat blue, GLfloat 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(GLfloat red, GLfloat green, GLfloat blue, GLfloat 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(GLfloat 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(GLfloat n, GLfloat f) {
   1429     GLMessage glmsg;
   1430     GLTraceContext *glContext = getGLTraceContext();
   1431 
   1432     glmsg.set_function(GLMessage::glDepthRangef);
   1433 
   1434     // copy argument n
   1435     GLMessage_DataType *arg_n = glmsg.add_args();
   1436     arg_n->set_isarray(false);
   1437     arg_n->set_type(GLMessage::DataType::FLOAT);
   1438     arg_n->add_floatvalue(n);
   1439 
   1440     // copy argument f
   1441     GLMessage_DataType *arg_f = glmsg.add_args();
   1442     arg_f->set_isarray(false);
   1443     arg_f->set_type(GLMessage::DataType::FLOAT);
   1444     arg_f->add_floatvalue(f);
   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(n, f);
   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 GLint 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     GLint 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 GLint 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     GLint 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(GLfloat 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* const* 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 void GLTrace_glReadBuffer(GLenum mode) {
   5727     GLMessage glmsg;
   5728     GLTraceContext *glContext = getGLTraceContext();
   5729 
   5730     glmsg.set_function(GLMessage::glReadBuffer);
   5731 
   5732     // copy argument mode
   5733     GLMessage_DataType *arg_mode = glmsg.add_args();
   5734     arg_mode->set_isarray(false);
   5735     arg_mode->set_type(GLMessage::DataType::ENUM);
   5736     arg_mode->add_intvalue((int)mode);
   5737 
   5738     // call function
   5739     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5740     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5741     glContext->hooks->gl.glReadBuffer(mode);
   5742     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5743     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5744 
   5745     void *pointerArgs[] = {
   5746     };
   5747 
   5748     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5749                               threadStartTime, threadEndTime,
   5750                               &glmsg, pointerArgs);
   5751     glContext->traceGLMessage(&glmsg);
   5752 }
   5753 
   5754 void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) {
   5755     GLMessage glmsg;
   5756     GLTraceContext *glContext = getGLTraceContext();
   5757 
   5758     glmsg.set_function(GLMessage::glDrawRangeElements);
   5759 
   5760     // copy argument mode
   5761     GLMessage_DataType *arg_mode = glmsg.add_args();
   5762     arg_mode->set_isarray(false);
   5763     arg_mode->set_type(GLMessage::DataType::ENUM);
   5764     arg_mode->add_intvalue((int)mode);
   5765 
   5766     // copy argument start
   5767     GLMessage_DataType *arg_start = glmsg.add_args();
   5768     arg_start->set_isarray(false);
   5769     arg_start->set_type(GLMessage::DataType::INT);
   5770     arg_start->add_intvalue(start);
   5771 
   5772     // copy argument end
   5773     GLMessage_DataType *arg_end = glmsg.add_args();
   5774     arg_end->set_isarray(false);
   5775     arg_end->set_type(GLMessage::DataType::INT);
   5776     arg_end->add_intvalue(end);
   5777 
   5778     // copy argument count
   5779     GLMessage_DataType *arg_count = glmsg.add_args();
   5780     arg_count->set_isarray(false);
   5781     arg_count->set_type(GLMessage::DataType::INT);
   5782     arg_count->add_intvalue(count);
   5783 
   5784     // copy argument type
   5785     GLMessage_DataType *arg_type = glmsg.add_args();
   5786     arg_type->set_isarray(false);
   5787     arg_type->set_type(GLMessage::DataType::ENUM);
   5788     arg_type->add_intvalue((int)type);
   5789 
   5790     // copy argument indices
   5791     GLMessage_DataType *arg_indices = glmsg.add_args();
   5792     arg_indices->set_isarray(false);
   5793     arg_indices->set_type(GLMessage::DataType::INT);
   5794     arg_indices->add_intvalue((int)indices);
   5795 
   5796     // call function
   5797     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5798     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5799     glContext->hooks->gl.glDrawRangeElements(mode, start, end, count, type, indices);
   5800     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5801     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5802 
   5803     void *pointerArgs[] = {
   5804         (void *) indices,
   5805     };
   5806 
   5807     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5808                               threadStartTime, threadEndTime,
   5809                               &glmsg, pointerArgs);
   5810     glContext->traceGLMessage(&glmsg);
   5811 }
   5812 
   5813 void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
   5814     GLMessage glmsg;
   5815     GLTraceContext *glContext = getGLTraceContext();
   5816 
   5817     glmsg.set_function(GLMessage::glTexImage3D);
   5818 
   5819     // copy argument target
   5820     GLMessage_DataType *arg_target = glmsg.add_args();
   5821     arg_target->set_isarray(false);
   5822     arg_target->set_type(GLMessage::DataType::ENUM);
   5823     arg_target->add_intvalue((int)target);
   5824 
   5825     // copy argument level
   5826     GLMessage_DataType *arg_level = glmsg.add_args();
   5827     arg_level->set_isarray(false);
   5828     arg_level->set_type(GLMessage::DataType::INT);
   5829     arg_level->add_intvalue(level);
   5830 
   5831     // copy argument internalformat
   5832     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   5833     arg_internalformat->set_isarray(false);
   5834     arg_internalformat->set_type(GLMessage::DataType::INT);
   5835     arg_internalformat->add_intvalue(internalformat);
   5836 
   5837     // copy argument width
   5838     GLMessage_DataType *arg_width = glmsg.add_args();
   5839     arg_width->set_isarray(false);
   5840     arg_width->set_type(GLMessage::DataType::INT);
   5841     arg_width->add_intvalue(width);
   5842 
   5843     // copy argument height
   5844     GLMessage_DataType *arg_height = glmsg.add_args();
   5845     arg_height->set_isarray(false);
   5846     arg_height->set_type(GLMessage::DataType::INT);
   5847     arg_height->add_intvalue(height);
   5848 
   5849     // copy argument depth
   5850     GLMessage_DataType *arg_depth = glmsg.add_args();
   5851     arg_depth->set_isarray(false);
   5852     arg_depth->set_type(GLMessage::DataType::INT);
   5853     arg_depth->add_intvalue(depth);
   5854 
   5855     // copy argument border
   5856     GLMessage_DataType *arg_border = glmsg.add_args();
   5857     arg_border->set_isarray(false);
   5858     arg_border->set_type(GLMessage::DataType::INT);
   5859     arg_border->add_intvalue(border);
   5860 
   5861     // copy argument format
   5862     GLMessage_DataType *arg_format = glmsg.add_args();
   5863     arg_format->set_isarray(false);
   5864     arg_format->set_type(GLMessage::DataType::ENUM);
   5865     arg_format->add_intvalue((int)format);
   5866 
   5867     // copy argument type
   5868     GLMessage_DataType *arg_type = glmsg.add_args();
   5869     arg_type->set_isarray(false);
   5870     arg_type->set_type(GLMessage::DataType::ENUM);
   5871     arg_type->add_intvalue((int)type);
   5872 
   5873     // copy argument pixels
   5874     GLMessage_DataType *arg_pixels = glmsg.add_args();
   5875     arg_pixels->set_isarray(false);
   5876     arg_pixels->set_type(GLMessage::DataType::INT);
   5877     arg_pixels->add_intvalue((int)pixels);
   5878 
   5879     // call function
   5880     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5881     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5882     glContext->hooks->gl.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels);
   5883     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5884     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5885 
   5886     void *pointerArgs[] = {
   5887         (void *) pixels,
   5888     };
   5889 
   5890     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5891                               threadStartTime, threadEndTime,
   5892                               &glmsg, pointerArgs);
   5893     glContext->traceGLMessage(&glmsg);
   5894 }
   5895 
   5896 void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) {
   5897     GLMessage glmsg;
   5898     GLTraceContext *glContext = getGLTraceContext();
   5899 
   5900     glmsg.set_function(GLMessage::glTexSubImage3D);
   5901 
   5902     // copy argument target
   5903     GLMessage_DataType *arg_target = glmsg.add_args();
   5904     arg_target->set_isarray(false);
   5905     arg_target->set_type(GLMessage::DataType::ENUM);
   5906     arg_target->add_intvalue((int)target);
   5907 
   5908     // copy argument level
   5909     GLMessage_DataType *arg_level = glmsg.add_args();
   5910     arg_level->set_isarray(false);
   5911     arg_level->set_type(GLMessage::DataType::INT);
   5912     arg_level->add_intvalue(level);
   5913 
   5914     // copy argument xoffset
   5915     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   5916     arg_xoffset->set_isarray(false);
   5917     arg_xoffset->set_type(GLMessage::DataType::INT);
   5918     arg_xoffset->add_intvalue(xoffset);
   5919 
   5920     // copy argument yoffset
   5921     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   5922     arg_yoffset->set_isarray(false);
   5923     arg_yoffset->set_type(GLMessage::DataType::INT);
   5924     arg_yoffset->add_intvalue(yoffset);
   5925 
   5926     // copy argument zoffset
   5927     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   5928     arg_zoffset->set_isarray(false);
   5929     arg_zoffset->set_type(GLMessage::DataType::INT);
   5930     arg_zoffset->add_intvalue(zoffset);
   5931 
   5932     // copy argument width
   5933     GLMessage_DataType *arg_width = glmsg.add_args();
   5934     arg_width->set_isarray(false);
   5935     arg_width->set_type(GLMessage::DataType::INT);
   5936     arg_width->add_intvalue(width);
   5937 
   5938     // copy argument height
   5939     GLMessage_DataType *arg_height = glmsg.add_args();
   5940     arg_height->set_isarray(false);
   5941     arg_height->set_type(GLMessage::DataType::INT);
   5942     arg_height->add_intvalue(height);
   5943 
   5944     // copy argument depth
   5945     GLMessage_DataType *arg_depth = glmsg.add_args();
   5946     arg_depth->set_isarray(false);
   5947     arg_depth->set_type(GLMessage::DataType::INT);
   5948     arg_depth->add_intvalue(depth);
   5949 
   5950     // copy argument format
   5951     GLMessage_DataType *arg_format = glmsg.add_args();
   5952     arg_format->set_isarray(false);
   5953     arg_format->set_type(GLMessage::DataType::ENUM);
   5954     arg_format->add_intvalue((int)format);
   5955 
   5956     // copy argument type
   5957     GLMessage_DataType *arg_type = glmsg.add_args();
   5958     arg_type->set_isarray(false);
   5959     arg_type->set_type(GLMessage::DataType::ENUM);
   5960     arg_type->add_intvalue((int)type);
   5961 
   5962     // copy argument pixels
   5963     GLMessage_DataType *arg_pixels = glmsg.add_args();
   5964     arg_pixels->set_isarray(false);
   5965     arg_pixels->set_type(GLMessage::DataType::INT);
   5966     arg_pixels->add_intvalue((int)pixels);
   5967 
   5968     // call function
   5969     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5970     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   5971     glContext->hooks->gl.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
   5972     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   5973     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   5974 
   5975     void *pointerArgs[] = {
   5976         (void *) pixels,
   5977     };
   5978 
   5979     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   5980                               threadStartTime, threadEndTime,
   5981                               &glmsg, pointerArgs);
   5982     glContext->traceGLMessage(&glmsg);
   5983 }
   5984 
   5985 void GLTrace_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
   5986     GLMessage glmsg;
   5987     GLTraceContext *glContext = getGLTraceContext();
   5988 
   5989     glmsg.set_function(GLMessage::glCopyTexSubImage3D);
   5990 
   5991     // copy argument target
   5992     GLMessage_DataType *arg_target = glmsg.add_args();
   5993     arg_target->set_isarray(false);
   5994     arg_target->set_type(GLMessage::DataType::ENUM);
   5995     arg_target->add_intvalue((int)target);
   5996 
   5997     // copy argument level
   5998     GLMessage_DataType *arg_level = glmsg.add_args();
   5999     arg_level->set_isarray(false);
   6000     arg_level->set_type(GLMessage::DataType::INT);
   6001     arg_level->add_intvalue(level);
   6002 
   6003     // copy argument xoffset
   6004     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   6005     arg_xoffset->set_isarray(false);
   6006     arg_xoffset->set_type(GLMessage::DataType::INT);
   6007     arg_xoffset->add_intvalue(xoffset);
   6008 
   6009     // copy argument yoffset
   6010     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   6011     arg_yoffset->set_isarray(false);
   6012     arg_yoffset->set_type(GLMessage::DataType::INT);
   6013     arg_yoffset->add_intvalue(yoffset);
   6014 
   6015     // copy argument zoffset
   6016     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   6017     arg_zoffset->set_isarray(false);
   6018     arg_zoffset->set_type(GLMessage::DataType::INT);
   6019     arg_zoffset->add_intvalue(zoffset);
   6020 
   6021     // copy argument x
   6022     GLMessage_DataType *arg_x = glmsg.add_args();
   6023     arg_x->set_isarray(false);
   6024     arg_x->set_type(GLMessage::DataType::INT);
   6025     arg_x->add_intvalue(x);
   6026 
   6027     // copy argument y
   6028     GLMessage_DataType *arg_y = glmsg.add_args();
   6029     arg_y->set_isarray(false);
   6030     arg_y->set_type(GLMessage::DataType::INT);
   6031     arg_y->add_intvalue(y);
   6032 
   6033     // copy argument width
   6034     GLMessage_DataType *arg_width = glmsg.add_args();
   6035     arg_width->set_isarray(false);
   6036     arg_width->set_type(GLMessage::DataType::INT);
   6037     arg_width->add_intvalue(width);
   6038 
   6039     // copy argument height
   6040     GLMessage_DataType *arg_height = glmsg.add_args();
   6041     arg_height->set_isarray(false);
   6042     arg_height->set_type(GLMessage::DataType::INT);
   6043     arg_height->add_intvalue(height);
   6044 
   6045     // call function
   6046     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6047     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6048     glContext->hooks->gl.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height);
   6049     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6050     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6051 
   6052     void *pointerArgs[] = {
   6053     };
   6054 
   6055     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6056                               threadStartTime, threadEndTime,
   6057                               &glmsg, pointerArgs);
   6058     glContext->traceGLMessage(&glmsg);
   6059 }
   6060 
   6061 void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
   6062     GLMessage glmsg;
   6063     GLTraceContext *glContext = getGLTraceContext();
   6064 
   6065     glmsg.set_function(GLMessage::glCompressedTexImage3D);
   6066 
   6067     // copy argument target
   6068     GLMessage_DataType *arg_target = glmsg.add_args();
   6069     arg_target->set_isarray(false);
   6070     arg_target->set_type(GLMessage::DataType::ENUM);
   6071     arg_target->add_intvalue((int)target);
   6072 
   6073     // copy argument level
   6074     GLMessage_DataType *arg_level = glmsg.add_args();
   6075     arg_level->set_isarray(false);
   6076     arg_level->set_type(GLMessage::DataType::INT);
   6077     arg_level->add_intvalue(level);
   6078 
   6079     // copy argument internalformat
   6080     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   6081     arg_internalformat->set_isarray(false);
   6082     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   6083     arg_internalformat->add_intvalue((int)internalformat);
   6084 
   6085     // copy argument width
   6086     GLMessage_DataType *arg_width = glmsg.add_args();
   6087     arg_width->set_isarray(false);
   6088     arg_width->set_type(GLMessage::DataType::INT);
   6089     arg_width->add_intvalue(width);
   6090 
   6091     // copy argument height
   6092     GLMessage_DataType *arg_height = glmsg.add_args();
   6093     arg_height->set_isarray(false);
   6094     arg_height->set_type(GLMessage::DataType::INT);
   6095     arg_height->add_intvalue(height);
   6096 
   6097     // copy argument depth
   6098     GLMessage_DataType *arg_depth = glmsg.add_args();
   6099     arg_depth->set_isarray(false);
   6100     arg_depth->set_type(GLMessage::DataType::INT);
   6101     arg_depth->add_intvalue(depth);
   6102 
   6103     // copy argument border
   6104     GLMessage_DataType *arg_border = glmsg.add_args();
   6105     arg_border->set_isarray(false);
   6106     arg_border->set_type(GLMessage::DataType::INT);
   6107     arg_border->add_intvalue(border);
   6108 
   6109     // copy argument imageSize
   6110     GLMessage_DataType *arg_imageSize = glmsg.add_args();
   6111     arg_imageSize->set_isarray(false);
   6112     arg_imageSize->set_type(GLMessage::DataType::INT);
   6113     arg_imageSize->add_intvalue(imageSize);
   6114 
   6115     // copy argument data
   6116     GLMessage_DataType *arg_data = glmsg.add_args();
   6117     arg_data->set_isarray(false);
   6118     arg_data->set_type(GLMessage::DataType::INT);
   6119     arg_data->add_intvalue((int)data);
   6120 
   6121     // call function
   6122     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6123     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6124     glContext->hooks->gl.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data);
   6125     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6126     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6127 
   6128     void *pointerArgs[] = {
   6129         (void *) data,
   6130     };
   6131 
   6132     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6133                               threadStartTime, threadEndTime,
   6134                               &glmsg, pointerArgs);
   6135     glContext->traceGLMessage(&glmsg);
   6136 }
   6137 
   6138 void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) {
   6139     GLMessage glmsg;
   6140     GLTraceContext *glContext = getGLTraceContext();
   6141 
   6142     glmsg.set_function(GLMessage::glCompressedTexSubImage3D);
   6143 
   6144     // copy argument target
   6145     GLMessage_DataType *arg_target = glmsg.add_args();
   6146     arg_target->set_isarray(false);
   6147     arg_target->set_type(GLMessage::DataType::ENUM);
   6148     arg_target->add_intvalue((int)target);
   6149 
   6150     // copy argument level
   6151     GLMessage_DataType *arg_level = glmsg.add_args();
   6152     arg_level->set_isarray(false);
   6153     arg_level->set_type(GLMessage::DataType::INT);
   6154     arg_level->add_intvalue(level);
   6155 
   6156     // copy argument xoffset
   6157     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   6158     arg_xoffset->set_isarray(false);
   6159     arg_xoffset->set_type(GLMessage::DataType::INT);
   6160     arg_xoffset->add_intvalue(xoffset);
   6161 
   6162     // copy argument yoffset
   6163     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   6164     arg_yoffset->set_isarray(false);
   6165     arg_yoffset->set_type(GLMessage::DataType::INT);
   6166     arg_yoffset->add_intvalue(yoffset);
   6167 
   6168     // copy argument zoffset
   6169     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   6170     arg_zoffset->set_isarray(false);
   6171     arg_zoffset->set_type(GLMessage::DataType::INT);
   6172     arg_zoffset->add_intvalue(zoffset);
   6173 
   6174     // copy argument width
   6175     GLMessage_DataType *arg_width = glmsg.add_args();
   6176     arg_width->set_isarray(false);
   6177     arg_width->set_type(GLMessage::DataType::INT);
   6178     arg_width->add_intvalue(width);
   6179 
   6180     // copy argument height
   6181     GLMessage_DataType *arg_height = glmsg.add_args();
   6182     arg_height->set_isarray(false);
   6183     arg_height->set_type(GLMessage::DataType::INT);
   6184     arg_height->add_intvalue(height);
   6185 
   6186     // copy argument depth
   6187     GLMessage_DataType *arg_depth = glmsg.add_args();
   6188     arg_depth->set_isarray(false);
   6189     arg_depth->set_type(GLMessage::DataType::INT);
   6190     arg_depth->add_intvalue(depth);
   6191 
   6192     // copy argument format
   6193     GLMessage_DataType *arg_format = glmsg.add_args();
   6194     arg_format->set_isarray(false);
   6195     arg_format->set_type(GLMessage::DataType::ENUM);
   6196     arg_format->add_intvalue((int)format);
   6197 
   6198     // copy argument imageSize
   6199     GLMessage_DataType *arg_imageSize = glmsg.add_args();
   6200     arg_imageSize->set_isarray(false);
   6201     arg_imageSize->set_type(GLMessage::DataType::INT);
   6202     arg_imageSize->add_intvalue(imageSize);
   6203 
   6204     // copy argument data
   6205     GLMessage_DataType *arg_data = glmsg.add_args();
   6206     arg_data->set_isarray(false);
   6207     arg_data->set_type(GLMessage::DataType::INT);
   6208     arg_data->add_intvalue((int)data);
   6209 
   6210     // call function
   6211     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6212     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6213     glContext->hooks->gl.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
   6214     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6215     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6216 
   6217     void *pointerArgs[] = {
   6218         (void *) data,
   6219     };
   6220 
   6221     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6222                               threadStartTime, threadEndTime,
   6223                               &glmsg, pointerArgs);
   6224     glContext->traceGLMessage(&glmsg);
   6225 }
   6226 
   6227 void GLTrace_glGenQueries(GLsizei n, GLuint* ids) {
   6228     GLMessage glmsg;
   6229     GLTraceContext *glContext = getGLTraceContext();
   6230 
   6231     glmsg.set_function(GLMessage::glGenQueries);
   6232 
   6233     // copy argument n
   6234     GLMessage_DataType *arg_n = glmsg.add_args();
   6235     arg_n->set_isarray(false);
   6236     arg_n->set_type(GLMessage::DataType::INT);
   6237     arg_n->add_intvalue(n);
   6238 
   6239     // copy argument ids
   6240     GLMessage_DataType *arg_ids = glmsg.add_args();
   6241     arg_ids->set_isarray(false);
   6242     arg_ids->set_type(GLMessage::DataType::INT);
   6243     arg_ids->add_intvalue((int)ids);
   6244 
   6245     // call function
   6246     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6247     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6248     glContext->hooks->gl.glGenQueries(n, ids);
   6249     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6250     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6251 
   6252     void *pointerArgs[] = {
   6253         (void *) ids,
   6254     };
   6255 
   6256     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6257                               threadStartTime, threadEndTime,
   6258                               &glmsg, pointerArgs);
   6259     glContext->traceGLMessage(&glmsg);
   6260 }
   6261 
   6262 void GLTrace_glDeleteQueries(GLsizei n, const GLuint* ids) {
   6263     GLMessage glmsg;
   6264     GLTraceContext *glContext = getGLTraceContext();
   6265 
   6266     glmsg.set_function(GLMessage::glDeleteQueries);
   6267 
   6268     // copy argument n
   6269     GLMessage_DataType *arg_n = glmsg.add_args();
   6270     arg_n->set_isarray(false);
   6271     arg_n->set_type(GLMessage::DataType::INT);
   6272     arg_n->add_intvalue(n);
   6273 
   6274     // copy argument ids
   6275     GLMessage_DataType *arg_ids = glmsg.add_args();
   6276     arg_ids->set_isarray(false);
   6277     arg_ids->set_type(GLMessage::DataType::INT);
   6278     arg_ids->add_intvalue((int)ids);
   6279 
   6280     // call function
   6281     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6282     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6283     glContext->hooks->gl.glDeleteQueries(n, ids);
   6284     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6285     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6286 
   6287     void *pointerArgs[] = {
   6288         (void *) ids,
   6289     };
   6290 
   6291     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6292                               threadStartTime, threadEndTime,
   6293                               &glmsg, pointerArgs);
   6294     glContext->traceGLMessage(&glmsg);
   6295 }
   6296 
   6297 GLboolean GLTrace_glIsQuery(GLuint id) {
   6298     GLMessage glmsg;
   6299     GLTraceContext *glContext = getGLTraceContext();
   6300 
   6301     glmsg.set_function(GLMessage::glIsQuery);
   6302 
   6303     // copy argument id
   6304     GLMessage_DataType *arg_id = glmsg.add_args();
   6305     arg_id->set_isarray(false);
   6306     arg_id->set_type(GLMessage::DataType::INT);
   6307     arg_id->add_intvalue(id);
   6308 
   6309     // call function
   6310     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6311     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6312     GLboolean retValue = glContext->hooks->gl.glIsQuery(id);
   6313     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6314     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6315 
   6316     // set return value
   6317     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   6318     rt->set_isarray(false);
   6319     rt->set_type(GLMessage::DataType::BOOL);
   6320     rt->add_boolvalue(retValue);
   6321 
   6322     void *pointerArgs[] = {
   6323     };
   6324 
   6325     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6326                               threadStartTime, threadEndTime,
   6327                               &glmsg, pointerArgs);
   6328     glContext->traceGLMessage(&glmsg);
   6329 
   6330     return retValue;
   6331 }
   6332 
   6333 void GLTrace_glBeginQuery(GLenum target, GLuint id) {
   6334     GLMessage glmsg;
   6335     GLTraceContext *glContext = getGLTraceContext();
   6336 
   6337     glmsg.set_function(GLMessage::glBeginQuery);
   6338 
   6339     // copy argument target
   6340     GLMessage_DataType *arg_target = glmsg.add_args();
   6341     arg_target->set_isarray(false);
   6342     arg_target->set_type(GLMessage::DataType::ENUM);
   6343     arg_target->add_intvalue((int)target);
   6344 
   6345     // copy argument id
   6346     GLMessage_DataType *arg_id = glmsg.add_args();
   6347     arg_id->set_isarray(false);
   6348     arg_id->set_type(GLMessage::DataType::INT);
   6349     arg_id->add_intvalue(id);
   6350 
   6351     // call function
   6352     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6353     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6354     glContext->hooks->gl.glBeginQuery(target, id);
   6355     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6356     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6357 
   6358     void *pointerArgs[] = {
   6359     };
   6360 
   6361     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6362                               threadStartTime, threadEndTime,
   6363                               &glmsg, pointerArgs);
   6364     glContext->traceGLMessage(&glmsg);
   6365 }
   6366 
   6367 void GLTrace_glEndQuery(GLenum target) {
   6368     GLMessage glmsg;
   6369     GLTraceContext *glContext = getGLTraceContext();
   6370 
   6371     glmsg.set_function(GLMessage::glEndQuery);
   6372 
   6373     // copy argument target
   6374     GLMessage_DataType *arg_target = glmsg.add_args();
   6375     arg_target->set_isarray(false);
   6376     arg_target->set_type(GLMessage::DataType::ENUM);
   6377     arg_target->add_intvalue((int)target);
   6378 
   6379     // call function
   6380     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6381     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6382     glContext->hooks->gl.glEndQuery(target);
   6383     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6384     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6385 
   6386     void *pointerArgs[] = {
   6387     };
   6388 
   6389     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6390                               threadStartTime, threadEndTime,
   6391                               &glmsg, pointerArgs);
   6392     glContext->traceGLMessage(&glmsg);
   6393 }
   6394 
   6395 void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint* params) {
   6396     GLMessage glmsg;
   6397     GLTraceContext *glContext = getGLTraceContext();
   6398 
   6399     glmsg.set_function(GLMessage::glGetQueryiv);
   6400 
   6401     // copy argument target
   6402     GLMessage_DataType *arg_target = glmsg.add_args();
   6403     arg_target->set_isarray(false);
   6404     arg_target->set_type(GLMessage::DataType::ENUM);
   6405     arg_target->add_intvalue((int)target);
   6406 
   6407     // copy argument pname
   6408     GLMessage_DataType *arg_pname = glmsg.add_args();
   6409     arg_pname->set_isarray(false);
   6410     arg_pname->set_type(GLMessage::DataType::ENUM);
   6411     arg_pname->add_intvalue((int)pname);
   6412 
   6413     // copy argument params
   6414     GLMessage_DataType *arg_params = glmsg.add_args();
   6415     arg_params->set_isarray(false);
   6416     arg_params->set_type(GLMessage::DataType::INT);
   6417     arg_params->add_intvalue((int)params);
   6418 
   6419     // call function
   6420     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6421     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6422     glContext->hooks->gl.glGetQueryiv(target, pname, params);
   6423     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6424     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6425 
   6426     void *pointerArgs[] = {
   6427         (void *) params,
   6428     };
   6429 
   6430     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6431                               threadStartTime, threadEndTime,
   6432                               &glmsg, pointerArgs);
   6433     glContext->traceGLMessage(&glmsg);
   6434 }
   6435 
   6436 void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) {
   6437     GLMessage glmsg;
   6438     GLTraceContext *glContext = getGLTraceContext();
   6439 
   6440     glmsg.set_function(GLMessage::glGetQueryObjectuiv);
   6441 
   6442     // copy argument id
   6443     GLMessage_DataType *arg_id = glmsg.add_args();
   6444     arg_id->set_isarray(false);
   6445     arg_id->set_type(GLMessage::DataType::INT);
   6446     arg_id->add_intvalue(id);
   6447 
   6448     // copy argument pname
   6449     GLMessage_DataType *arg_pname = glmsg.add_args();
   6450     arg_pname->set_isarray(false);
   6451     arg_pname->set_type(GLMessage::DataType::ENUM);
   6452     arg_pname->add_intvalue((int)pname);
   6453 
   6454     // copy argument params
   6455     GLMessage_DataType *arg_params = glmsg.add_args();
   6456     arg_params->set_isarray(false);
   6457     arg_params->set_type(GLMessage::DataType::INT);
   6458     arg_params->add_intvalue((int)params);
   6459 
   6460     // call function
   6461     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6462     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6463     glContext->hooks->gl.glGetQueryObjectuiv(id, pname, params);
   6464     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6465     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6466 
   6467     void *pointerArgs[] = {
   6468         (void *) params,
   6469     };
   6470 
   6471     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6472                               threadStartTime, threadEndTime,
   6473                               &glmsg, pointerArgs);
   6474     glContext->traceGLMessage(&glmsg);
   6475 }
   6476 
   6477 GLboolean GLTrace_glUnmapBuffer(GLenum target) {
   6478     GLMessage glmsg;
   6479     GLTraceContext *glContext = getGLTraceContext();
   6480 
   6481     glmsg.set_function(GLMessage::glUnmapBuffer);
   6482 
   6483     // copy argument target
   6484     GLMessage_DataType *arg_target = glmsg.add_args();
   6485     arg_target->set_isarray(false);
   6486     arg_target->set_type(GLMessage::DataType::ENUM);
   6487     arg_target->add_intvalue((int)target);
   6488 
   6489     // call function
   6490     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6491     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6492     GLboolean retValue = glContext->hooks->gl.glUnmapBuffer(target);
   6493     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6494     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6495 
   6496     // set return value
   6497     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   6498     rt->set_isarray(false);
   6499     rt->set_type(GLMessage::DataType::BOOL);
   6500     rt->add_boolvalue(retValue);
   6501 
   6502     void *pointerArgs[] = {
   6503     };
   6504 
   6505     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6506                               threadStartTime, threadEndTime,
   6507                               &glmsg, pointerArgs);
   6508     glContext->traceGLMessage(&glmsg);
   6509 
   6510     return retValue;
   6511 }
   6512 
   6513 void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) {
   6514     GLMessage glmsg;
   6515     GLTraceContext *glContext = getGLTraceContext();
   6516 
   6517     glmsg.set_function(GLMessage::glGetBufferPointerv);
   6518 
   6519     // copy argument target
   6520     GLMessage_DataType *arg_target = glmsg.add_args();
   6521     arg_target->set_isarray(false);
   6522     arg_target->set_type(GLMessage::DataType::ENUM);
   6523     arg_target->add_intvalue((int)target);
   6524 
   6525     // copy argument pname
   6526     GLMessage_DataType *arg_pname = glmsg.add_args();
   6527     arg_pname->set_isarray(false);
   6528     arg_pname->set_type(GLMessage::DataType::ENUM);
   6529     arg_pname->add_intvalue((int)pname);
   6530 
   6531     // copy argument params
   6532     GLMessage_DataType *arg_params = glmsg.add_args();
   6533     arg_params->set_isarray(false);
   6534     arg_params->set_type(GLMessage::DataType::INT);
   6535     arg_params->add_intvalue((int)params);
   6536 
   6537     // call function
   6538     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6539     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6540     glContext->hooks->gl.glGetBufferPointerv(target, pname, params);
   6541     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6542     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6543 
   6544     void *pointerArgs[] = {
   6545         (void *) params,
   6546     };
   6547 
   6548     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6549                               threadStartTime, threadEndTime,
   6550                               &glmsg, pointerArgs);
   6551     glContext->traceGLMessage(&glmsg);
   6552 }
   6553 
   6554 void GLTrace_glDrawBuffers(GLsizei n, const GLenum* bufs) {
   6555     GLMessage glmsg;
   6556     GLTraceContext *glContext = getGLTraceContext();
   6557 
   6558     glmsg.set_function(GLMessage::glDrawBuffers);
   6559 
   6560     // copy argument n
   6561     GLMessage_DataType *arg_n = glmsg.add_args();
   6562     arg_n->set_isarray(false);
   6563     arg_n->set_type(GLMessage::DataType::INT);
   6564     arg_n->add_intvalue(n);
   6565 
   6566     // copy argument bufs
   6567     GLMessage_DataType *arg_bufs = glmsg.add_args();
   6568     arg_bufs->set_isarray(false);
   6569     arg_bufs->set_type(GLMessage::DataType::INT);
   6570     arg_bufs->add_intvalue((int)bufs);
   6571 
   6572     // call function
   6573     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6574     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6575     glContext->hooks->gl.glDrawBuffers(n, bufs);
   6576     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6577     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6578 
   6579     void *pointerArgs[] = {
   6580         (void *) bufs,
   6581     };
   6582 
   6583     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6584                               threadStartTime, threadEndTime,
   6585                               &glmsg, pointerArgs);
   6586     glContext->traceGLMessage(&glmsg);
   6587 }
   6588 
   6589 void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   6590     GLMessage glmsg;
   6591     GLTraceContext *glContext = getGLTraceContext();
   6592 
   6593     glmsg.set_function(GLMessage::glUniformMatrix2x3fv);
   6594 
   6595     // copy argument location
   6596     GLMessage_DataType *arg_location = glmsg.add_args();
   6597     arg_location->set_isarray(false);
   6598     arg_location->set_type(GLMessage::DataType::INT);
   6599     arg_location->add_intvalue(location);
   6600 
   6601     // copy argument count
   6602     GLMessage_DataType *arg_count = glmsg.add_args();
   6603     arg_count->set_isarray(false);
   6604     arg_count->set_type(GLMessage::DataType::INT);
   6605     arg_count->add_intvalue(count);
   6606 
   6607     // copy argument transpose
   6608     GLMessage_DataType *arg_transpose = glmsg.add_args();
   6609     arg_transpose->set_isarray(false);
   6610     arg_transpose->set_type(GLMessage::DataType::BOOL);
   6611     arg_transpose->add_boolvalue(transpose);
   6612 
   6613     // copy argument value
   6614     GLMessage_DataType *arg_value = glmsg.add_args();
   6615     arg_value->set_isarray(false);
   6616     arg_value->set_type(GLMessage::DataType::INT);
   6617     arg_value->add_intvalue((int)value);
   6618 
   6619     // call function
   6620     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6621     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6622     glContext->hooks->gl.glUniformMatrix2x3fv(location, count, transpose, value);
   6623     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6624     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6625 
   6626     void *pointerArgs[] = {
   6627         (void *) value,
   6628     };
   6629 
   6630     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6631                               threadStartTime, threadEndTime,
   6632                               &glmsg, pointerArgs);
   6633     glContext->traceGLMessage(&glmsg);
   6634 }
   6635 
   6636 void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   6637     GLMessage glmsg;
   6638     GLTraceContext *glContext = getGLTraceContext();
   6639 
   6640     glmsg.set_function(GLMessage::glUniformMatrix3x2fv);
   6641 
   6642     // copy argument location
   6643     GLMessage_DataType *arg_location = glmsg.add_args();
   6644     arg_location->set_isarray(false);
   6645     arg_location->set_type(GLMessage::DataType::INT);
   6646     arg_location->add_intvalue(location);
   6647 
   6648     // copy argument count
   6649     GLMessage_DataType *arg_count = glmsg.add_args();
   6650     arg_count->set_isarray(false);
   6651     arg_count->set_type(GLMessage::DataType::INT);
   6652     arg_count->add_intvalue(count);
   6653 
   6654     // copy argument transpose
   6655     GLMessage_DataType *arg_transpose = glmsg.add_args();
   6656     arg_transpose->set_isarray(false);
   6657     arg_transpose->set_type(GLMessage::DataType::BOOL);
   6658     arg_transpose->add_boolvalue(transpose);
   6659 
   6660     // copy argument value
   6661     GLMessage_DataType *arg_value = glmsg.add_args();
   6662     arg_value->set_isarray(false);
   6663     arg_value->set_type(GLMessage::DataType::INT);
   6664     arg_value->add_intvalue((int)value);
   6665 
   6666     // call function
   6667     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6668     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6669     glContext->hooks->gl.glUniformMatrix3x2fv(location, count, transpose, value);
   6670     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6671     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6672 
   6673     void *pointerArgs[] = {
   6674         (void *) value,
   6675     };
   6676 
   6677     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6678                               threadStartTime, threadEndTime,
   6679                               &glmsg, pointerArgs);
   6680     glContext->traceGLMessage(&glmsg);
   6681 }
   6682 
   6683 void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   6684     GLMessage glmsg;
   6685     GLTraceContext *glContext = getGLTraceContext();
   6686 
   6687     glmsg.set_function(GLMessage::glUniformMatrix2x4fv);
   6688 
   6689     // copy argument location
   6690     GLMessage_DataType *arg_location = glmsg.add_args();
   6691     arg_location->set_isarray(false);
   6692     arg_location->set_type(GLMessage::DataType::INT);
   6693     arg_location->add_intvalue(location);
   6694 
   6695     // copy argument count
   6696     GLMessage_DataType *arg_count = glmsg.add_args();
   6697     arg_count->set_isarray(false);
   6698     arg_count->set_type(GLMessage::DataType::INT);
   6699     arg_count->add_intvalue(count);
   6700 
   6701     // copy argument transpose
   6702     GLMessage_DataType *arg_transpose = glmsg.add_args();
   6703     arg_transpose->set_isarray(false);
   6704     arg_transpose->set_type(GLMessage::DataType::BOOL);
   6705     arg_transpose->add_boolvalue(transpose);
   6706 
   6707     // copy argument value
   6708     GLMessage_DataType *arg_value = glmsg.add_args();
   6709     arg_value->set_isarray(false);
   6710     arg_value->set_type(GLMessage::DataType::INT);
   6711     arg_value->add_intvalue((int)value);
   6712 
   6713     // call function
   6714     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6715     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6716     glContext->hooks->gl.glUniformMatrix2x4fv(location, count, transpose, value);
   6717     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6718     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6719 
   6720     void *pointerArgs[] = {
   6721         (void *) value,
   6722     };
   6723 
   6724     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6725                               threadStartTime, threadEndTime,
   6726                               &glmsg, pointerArgs);
   6727     glContext->traceGLMessage(&glmsg);
   6728 }
   6729 
   6730 void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   6731     GLMessage glmsg;
   6732     GLTraceContext *glContext = getGLTraceContext();
   6733 
   6734     glmsg.set_function(GLMessage::glUniformMatrix4x2fv);
   6735 
   6736     // copy argument location
   6737     GLMessage_DataType *arg_location = glmsg.add_args();
   6738     arg_location->set_isarray(false);
   6739     arg_location->set_type(GLMessage::DataType::INT);
   6740     arg_location->add_intvalue(location);
   6741 
   6742     // copy argument count
   6743     GLMessage_DataType *arg_count = glmsg.add_args();
   6744     arg_count->set_isarray(false);
   6745     arg_count->set_type(GLMessage::DataType::INT);
   6746     arg_count->add_intvalue(count);
   6747 
   6748     // copy argument transpose
   6749     GLMessage_DataType *arg_transpose = glmsg.add_args();
   6750     arg_transpose->set_isarray(false);
   6751     arg_transpose->set_type(GLMessage::DataType::BOOL);
   6752     arg_transpose->add_boolvalue(transpose);
   6753 
   6754     // copy argument value
   6755     GLMessage_DataType *arg_value = glmsg.add_args();
   6756     arg_value->set_isarray(false);
   6757     arg_value->set_type(GLMessage::DataType::INT);
   6758     arg_value->add_intvalue((int)value);
   6759 
   6760     // call function
   6761     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6762     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6763     glContext->hooks->gl.glUniformMatrix4x2fv(location, count, transpose, value);
   6764     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6765     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6766 
   6767     void *pointerArgs[] = {
   6768         (void *) value,
   6769     };
   6770 
   6771     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6772                               threadStartTime, threadEndTime,
   6773                               &glmsg, pointerArgs);
   6774     glContext->traceGLMessage(&glmsg);
   6775 }
   6776 
   6777 void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   6778     GLMessage glmsg;
   6779     GLTraceContext *glContext = getGLTraceContext();
   6780 
   6781     glmsg.set_function(GLMessage::glUniformMatrix3x4fv);
   6782 
   6783     // copy argument location
   6784     GLMessage_DataType *arg_location = glmsg.add_args();
   6785     arg_location->set_isarray(false);
   6786     arg_location->set_type(GLMessage::DataType::INT);
   6787     arg_location->add_intvalue(location);
   6788 
   6789     // copy argument count
   6790     GLMessage_DataType *arg_count = glmsg.add_args();
   6791     arg_count->set_isarray(false);
   6792     arg_count->set_type(GLMessage::DataType::INT);
   6793     arg_count->add_intvalue(count);
   6794 
   6795     // copy argument transpose
   6796     GLMessage_DataType *arg_transpose = glmsg.add_args();
   6797     arg_transpose->set_isarray(false);
   6798     arg_transpose->set_type(GLMessage::DataType::BOOL);
   6799     arg_transpose->add_boolvalue(transpose);
   6800 
   6801     // copy argument value
   6802     GLMessage_DataType *arg_value = glmsg.add_args();
   6803     arg_value->set_isarray(false);
   6804     arg_value->set_type(GLMessage::DataType::INT);
   6805     arg_value->add_intvalue((int)value);
   6806 
   6807     // call function
   6808     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6809     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6810     glContext->hooks->gl.glUniformMatrix3x4fv(location, count, transpose, value);
   6811     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6812     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6813 
   6814     void *pointerArgs[] = {
   6815         (void *) value,
   6816     };
   6817 
   6818     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6819                               threadStartTime, threadEndTime,
   6820                               &glmsg, pointerArgs);
   6821     glContext->traceGLMessage(&glmsg);
   6822 }
   6823 
   6824 void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
   6825     GLMessage glmsg;
   6826     GLTraceContext *glContext = getGLTraceContext();
   6827 
   6828     glmsg.set_function(GLMessage::glUniformMatrix4x3fv);
   6829 
   6830     // copy argument location
   6831     GLMessage_DataType *arg_location = glmsg.add_args();
   6832     arg_location->set_isarray(false);
   6833     arg_location->set_type(GLMessage::DataType::INT);
   6834     arg_location->add_intvalue(location);
   6835 
   6836     // copy argument count
   6837     GLMessage_DataType *arg_count = glmsg.add_args();
   6838     arg_count->set_isarray(false);
   6839     arg_count->set_type(GLMessage::DataType::INT);
   6840     arg_count->add_intvalue(count);
   6841 
   6842     // copy argument transpose
   6843     GLMessage_DataType *arg_transpose = glmsg.add_args();
   6844     arg_transpose->set_isarray(false);
   6845     arg_transpose->set_type(GLMessage::DataType::BOOL);
   6846     arg_transpose->add_boolvalue(transpose);
   6847 
   6848     // copy argument value
   6849     GLMessage_DataType *arg_value = glmsg.add_args();
   6850     arg_value->set_isarray(false);
   6851     arg_value->set_type(GLMessage::DataType::INT);
   6852     arg_value->add_intvalue((int)value);
   6853 
   6854     // call function
   6855     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6856     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6857     glContext->hooks->gl.glUniformMatrix4x3fv(location, count, transpose, value);
   6858     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6859     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6860 
   6861     void *pointerArgs[] = {
   6862         (void *) value,
   6863     };
   6864 
   6865     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6866                               threadStartTime, threadEndTime,
   6867                               &glmsg, pointerArgs);
   6868     glContext->traceGLMessage(&glmsg);
   6869 }
   6870 
   6871 void GLTrace_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
   6872     GLMessage glmsg;
   6873     GLTraceContext *glContext = getGLTraceContext();
   6874 
   6875     glmsg.set_function(GLMessage::glBlitFramebuffer);
   6876 
   6877     // copy argument srcX0
   6878     GLMessage_DataType *arg_srcX0 = glmsg.add_args();
   6879     arg_srcX0->set_isarray(false);
   6880     arg_srcX0->set_type(GLMessage::DataType::INT);
   6881     arg_srcX0->add_intvalue(srcX0);
   6882 
   6883     // copy argument srcY0
   6884     GLMessage_DataType *arg_srcY0 = glmsg.add_args();
   6885     arg_srcY0->set_isarray(false);
   6886     arg_srcY0->set_type(GLMessage::DataType::INT);
   6887     arg_srcY0->add_intvalue(srcY0);
   6888 
   6889     // copy argument srcX1
   6890     GLMessage_DataType *arg_srcX1 = glmsg.add_args();
   6891     arg_srcX1->set_isarray(false);
   6892     arg_srcX1->set_type(GLMessage::DataType::INT);
   6893     arg_srcX1->add_intvalue(srcX1);
   6894 
   6895     // copy argument srcY1
   6896     GLMessage_DataType *arg_srcY1 = glmsg.add_args();
   6897     arg_srcY1->set_isarray(false);
   6898     arg_srcY1->set_type(GLMessage::DataType::INT);
   6899     arg_srcY1->add_intvalue(srcY1);
   6900 
   6901     // copy argument dstX0
   6902     GLMessage_DataType *arg_dstX0 = glmsg.add_args();
   6903     arg_dstX0->set_isarray(false);
   6904     arg_dstX0->set_type(GLMessage::DataType::INT);
   6905     arg_dstX0->add_intvalue(dstX0);
   6906 
   6907     // copy argument dstY0
   6908     GLMessage_DataType *arg_dstY0 = glmsg.add_args();
   6909     arg_dstY0->set_isarray(false);
   6910     arg_dstY0->set_type(GLMessage::DataType::INT);
   6911     arg_dstY0->add_intvalue(dstY0);
   6912 
   6913     // copy argument dstX1
   6914     GLMessage_DataType *arg_dstX1 = glmsg.add_args();
   6915     arg_dstX1->set_isarray(false);
   6916     arg_dstX1->set_type(GLMessage::DataType::INT);
   6917     arg_dstX1->add_intvalue(dstX1);
   6918 
   6919     // copy argument dstY1
   6920     GLMessage_DataType *arg_dstY1 = glmsg.add_args();
   6921     arg_dstY1->set_isarray(false);
   6922     arg_dstY1->set_type(GLMessage::DataType::INT);
   6923     arg_dstY1->add_intvalue(dstY1);
   6924 
   6925     // copy argument mask
   6926     GLMessage_DataType *arg_mask = glmsg.add_args();
   6927     arg_mask->set_isarray(false);
   6928     arg_mask->set_type(GLMessage::DataType::INT);
   6929     arg_mask->add_intvalue(mask);
   6930 
   6931     // copy argument filter
   6932     GLMessage_DataType *arg_filter = glmsg.add_args();
   6933     arg_filter->set_isarray(false);
   6934     arg_filter->set_type(GLMessage::DataType::ENUM);
   6935     arg_filter->add_intvalue((int)filter);
   6936 
   6937     // call function
   6938     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6939     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6940     glContext->hooks->gl.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
   6941     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6942     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6943 
   6944     void *pointerArgs[] = {
   6945     };
   6946 
   6947     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   6948                               threadStartTime, threadEndTime,
   6949                               &glmsg, pointerArgs);
   6950     glContext->traceGLMessage(&glmsg);
   6951 }
   6952 
   6953 void GLTrace_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   6954     GLMessage glmsg;
   6955     GLTraceContext *glContext = getGLTraceContext();
   6956 
   6957     glmsg.set_function(GLMessage::glRenderbufferStorageMultisample);
   6958 
   6959     // copy argument target
   6960     GLMessage_DataType *arg_target = glmsg.add_args();
   6961     arg_target->set_isarray(false);
   6962     arg_target->set_type(GLMessage::DataType::ENUM);
   6963     arg_target->add_intvalue((int)target);
   6964 
   6965     // copy argument samples
   6966     GLMessage_DataType *arg_samples = glmsg.add_args();
   6967     arg_samples->set_isarray(false);
   6968     arg_samples->set_type(GLMessage::DataType::INT);
   6969     arg_samples->add_intvalue(samples);
   6970 
   6971     // copy argument internalformat
   6972     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   6973     arg_internalformat->set_isarray(false);
   6974     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   6975     arg_internalformat->add_intvalue((int)internalformat);
   6976 
   6977     // copy argument width
   6978     GLMessage_DataType *arg_width = glmsg.add_args();
   6979     arg_width->set_isarray(false);
   6980     arg_width->set_type(GLMessage::DataType::INT);
   6981     arg_width->add_intvalue(width);
   6982 
   6983     // copy argument height
   6984     GLMessage_DataType *arg_height = glmsg.add_args();
   6985     arg_height->set_isarray(false);
   6986     arg_height->set_type(GLMessage::DataType::INT);
   6987     arg_height->add_intvalue(height);
   6988 
   6989     // call function
   6990     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6991     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   6992     glContext->hooks->gl.glRenderbufferStorageMultisample(target, samples, internalformat, width, height);
   6993     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   6994     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   6995 
   6996     void *pointerArgs[] = {
   6997     };
   6998 
   6999     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7000                               threadStartTime, threadEndTime,
   7001                               &glmsg, pointerArgs);
   7002     glContext->traceGLMessage(&glmsg);
   7003 }
   7004 
   7005 void GLTrace_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) {
   7006     GLMessage glmsg;
   7007     GLTraceContext *glContext = getGLTraceContext();
   7008 
   7009     glmsg.set_function(GLMessage::glFramebufferTextureLayer);
   7010 
   7011     // copy argument target
   7012     GLMessage_DataType *arg_target = glmsg.add_args();
   7013     arg_target->set_isarray(false);
   7014     arg_target->set_type(GLMessage::DataType::ENUM);
   7015     arg_target->add_intvalue((int)target);
   7016 
   7017     // copy argument attachment
   7018     GLMessage_DataType *arg_attachment = glmsg.add_args();
   7019     arg_attachment->set_isarray(false);
   7020     arg_attachment->set_type(GLMessage::DataType::ENUM);
   7021     arg_attachment->add_intvalue((int)attachment);
   7022 
   7023     // copy argument texture
   7024     GLMessage_DataType *arg_texture = glmsg.add_args();
   7025     arg_texture->set_isarray(false);
   7026     arg_texture->set_type(GLMessage::DataType::INT);
   7027     arg_texture->add_intvalue(texture);
   7028 
   7029     // copy argument level
   7030     GLMessage_DataType *arg_level = glmsg.add_args();
   7031     arg_level->set_isarray(false);
   7032     arg_level->set_type(GLMessage::DataType::INT);
   7033     arg_level->add_intvalue(level);
   7034 
   7035     // copy argument layer
   7036     GLMessage_DataType *arg_layer = glmsg.add_args();
   7037     arg_layer->set_isarray(false);
   7038     arg_layer->set_type(GLMessage::DataType::INT);
   7039     arg_layer->add_intvalue(layer);
   7040 
   7041     // call function
   7042     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7043     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7044     glContext->hooks->gl.glFramebufferTextureLayer(target, attachment, texture, level, layer);
   7045     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7046     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7047 
   7048     void *pointerArgs[] = {
   7049     };
   7050 
   7051     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7052                               threadStartTime, threadEndTime,
   7053                               &glmsg, pointerArgs);
   7054     glContext->traceGLMessage(&glmsg);
   7055 }
   7056 
   7057 GLvoid* GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) {
   7058     GLMessage glmsg;
   7059     GLTraceContext *glContext = getGLTraceContext();
   7060 
   7061     glmsg.set_function(GLMessage::glMapBufferRange);
   7062 
   7063     // copy argument target
   7064     GLMessage_DataType *arg_target = glmsg.add_args();
   7065     arg_target->set_isarray(false);
   7066     arg_target->set_type(GLMessage::DataType::ENUM);
   7067     arg_target->add_intvalue((int)target);
   7068 
   7069     // copy argument offset
   7070     GLMessage_DataType *arg_offset = glmsg.add_args();
   7071     arg_offset->set_isarray(false);
   7072     arg_offset->set_type(GLMessage::DataType::INT);
   7073     arg_offset->add_intvalue(offset);
   7074 
   7075     // copy argument length
   7076     GLMessage_DataType *arg_length = glmsg.add_args();
   7077     arg_length->set_isarray(false);
   7078     arg_length->set_type(GLMessage::DataType::INT);
   7079     arg_length->add_intvalue(length);
   7080 
   7081     // copy argument access
   7082     GLMessage_DataType *arg_access = glmsg.add_args();
   7083     arg_access->set_isarray(false);
   7084     arg_access->set_type(GLMessage::DataType::INT);
   7085     arg_access->add_intvalue(access);
   7086 
   7087     // call function
   7088     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7089     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7090     GLvoid* retValue = glContext->hooks->gl.glMapBufferRange(target, offset, length, access);
   7091     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7092     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7093 
   7094     // set return value
   7095     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   7096     rt->set_isarray(false);
   7097     rt->set_type(GLMessage::DataType::INT);
   7098     rt->add_intvalue((int)retValue);
   7099 
   7100     void *pointerArgs[] = {
   7101         (void *) retValue,
   7102     };
   7103 
   7104     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7105                               threadStartTime, threadEndTime,
   7106                               &glmsg, pointerArgs);
   7107     glContext->traceGLMessage(&glmsg);
   7108 
   7109     return retValue;
   7110 }
   7111 
   7112 void GLTrace_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) {
   7113     GLMessage glmsg;
   7114     GLTraceContext *glContext = getGLTraceContext();
   7115 
   7116     glmsg.set_function(GLMessage::glFlushMappedBufferRange);
   7117 
   7118     // copy argument target
   7119     GLMessage_DataType *arg_target = glmsg.add_args();
   7120     arg_target->set_isarray(false);
   7121     arg_target->set_type(GLMessage::DataType::ENUM);
   7122     arg_target->add_intvalue((int)target);
   7123 
   7124     // copy argument offset
   7125     GLMessage_DataType *arg_offset = glmsg.add_args();
   7126     arg_offset->set_isarray(false);
   7127     arg_offset->set_type(GLMessage::DataType::INT);
   7128     arg_offset->add_intvalue(offset);
   7129 
   7130     // copy argument length
   7131     GLMessage_DataType *arg_length = glmsg.add_args();
   7132     arg_length->set_isarray(false);
   7133     arg_length->set_type(GLMessage::DataType::INT);
   7134     arg_length->add_intvalue(length);
   7135 
   7136     // call function
   7137     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7138     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7139     glContext->hooks->gl.glFlushMappedBufferRange(target, offset, length);
   7140     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7141     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7142 
   7143     void *pointerArgs[] = {
   7144     };
   7145 
   7146     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7147                               threadStartTime, threadEndTime,
   7148                               &glmsg, pointerArgs);
   7149     glContext->traceGLMessage(&glmsg);
   7150 }
   7151 
   7152 void GLTrace_glBindVertexArray(GLuint array) {
   7153     GLMessage glmsg;
   7154     GLTraceContext *glContext = getGLTraceContext();
   7155 
   7156     glmsg.set_function(GLMessage::glBindVertexArray);
   7157 
   7158     // copy argument array
   7159     GLMessage_DataType *arg_array = glmsg.add_args();
   7160     arg_array->set_isarray(false);
   7161     arg_array->set_type(GLMessage::DataType::INT);
   7162     arg_array->add_intvalue(array);
   7163 
   7164     // call function
   7165     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7166     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7167     glContext->hooks->gl.glBindVertexArray(array);
   7168     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7169     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7170 
   7171     void *pointerArgs[] = {
   7172     };
   7173 
   7174     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7175                               threadStartTime, threadEndTime,
   7176                               &glmsg, pointerArgs);
   7177     glContext->traceGLMessage(&glmsg);
   7178 }
   7179 
   7180 void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) {
   7181     GLMessage glmsg;
   7182     GLTraceContext *glContext = getGLTraceContext();
   7183 
   7184     glmsg.set_function(GLMessage::glDeleteVertexArrays);
   7185 
   7186     // copy argument n
   7187     GLMessage_DataType *arg_n = glmsg.add_args();
   7188     arg_n->set_isarray(false);
   7189     arg_n->set_type(GLMessage::DataType::INT);
   7190     arg_n->add_intvalue(n);
   7191 
   7192     // copy argument arrays
   7193     GLMessage_DataType *arg_arrays = glmsg.add_args();
   7194     arg_arrays->set_isarray(false);
   7195     arg_arrays->set_type(GLMessage::DataType::INT);
   7196     arg_arrays->add_intvalue((int)arrays);
   7197 
   7198     // call function
   7199     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7200     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7201     glContext->hooks->gl.glDeleteVertexArrays(n, arrays);
   7202     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7203     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7204 
   7205     void *pointerArgs[] = {
   7206         (void *) arrays,
   7207     };
   7208 
   7209     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7210                               threadStartTime, threadEndTime,
   7211                               &glmsg, pointerArgs);
   7212     glContext->traceGLMessage(&glmsg);
   7213 }
   7214 
   7215 void GLTrace_glGenVertexArrays(GLsizei n, GLuint* arrays) {
   7216     GLMessage glmsg;
   7217     GLTraceContext *glContext = getGLTraceContext();
   7218 
   7219     glmsg.set_function(GLMessage::glGenVertexArrays);
   7220 
   7221     // copy argument n
   7222     GLMessage_DataType *arg_n = glmsg.add_args();
   7223     arg_n->set_isarray(false);
   7224     arg_n->set_type(GLMessage::DataType::INT);
   7225     arg_n->add_intvalue(n);
   7226 
   7227     // copy argument arrays
   7228     GLMessage_DataType *arg_arrays = glmsg.add_args();
   7229     arg_arrays->set_isarray(false);
   7230     arg_arrays->set_type(GLMessage::DataType::INT);
   7231     arg_arrays->add_intvalue((int)arrays);
   7232 
   7233     // call function
   7234     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7235     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7236     glContext->hooks->gl.glGenVertexArrays(n, arrays);
   7237     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7238     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7239 
   7240     void *pointerArgs[] = {
   7241         (void *) arrays,
   7242     };
   7243 
   7244     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7245                               threadStartTime, threadEndTime,
   7246                               &glmsg, pointerArgs);
   7247     glContext->traceGLMessage(&glmsg);
   7248 }
   7249 
   7250 GLboolean GLTrace_glIsVertexArray(GLuint array) {
   7251     GLMessage glmsg;
   7252     GLTraceContext *glContext = getGLTraceContext();
   7253 
   7254     glmsg.set_function(GLMessage::glIsVertexArray);
   7255 
   7256     // copy argument array
   7257     GLMessage_DataType *arg_array = glmsg.add_args();
   7258     arg_array->set_isarray(false);
   7259     arg_array->set_type(GLMessage::DataType::INT);
   7260     arg_array->add_intvalue(array);
   7261 
   7262     // call function
   7263     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7264     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7265     GLboolean retValue = glContext->hooks->gl.glIsVertexArray(array);
   7266     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7267     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7268 
   7269     // set return value
   7270     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   7271     rt->set_isarray(false);
   7272     rt->set_type(GLMessage::DataType::BOOL);
   7273     rt->add_boolvalue(retValue);
   7274 
   7275     void *pointerArgs[] = {
   7276     };
   7277 
   7278     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7279                               threadStartTime, threadEndTime,
   7280                               &glmsg, pointerArgs);
   7281     glContext->traceGLMessage(&glmsg);
   7282 
   7283     return retValue;
   7284 }
   7285 
   7286 void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) {
   7287     GLMessage glmsg;
   7288     GLTraceContext *glContext = getGLTraceContext();
   7289 
   7290     glmsg.set_function(GLMessage::glGetIntegeri_v);
   7291 
   7292     // copy argument target
   7293     GLMessage_DataType *arg_target = glmsg.add_args();
   7294     arg_target->set_isarray(false);
   7295     arg_target->set_type(GLMessage::DataType::ENUM);
   7296     arg_target->add_intvalue((int)target);
   7297 
   7298     // copy argument index
   7299     GLMessage_DataType *arg_index = glmsg.add_args();
   7300     arg_index->set_isarray(false);
   7301     arg_index->set_type(GLMessage::DataType::INT);
   7302     arg_index->add_intvalue(index);
   7303 
   7304     // copy argument data
   7305     GLMessage_DataType *arg_data = glmsg.add_args();
   7306     arg_data->set_isarray(false);
   7307     arg_data->set_type(GLMessage::DataType::INT);
   7308     arg_data->add_intvalue((int)data);
   7309 
   7310     // call function
   7311     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7312     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7313     glContext->hooks->gl.glGetIntegeri_v(target, index, data);
   7314     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7315     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7316 
   7317     void *pointerArgs[] = {
   7318         (void *) data,
   7319     };
   7320 
   7321     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7322                               threadStartTime, threadEndTime,
   7323                               &glmsg, pointerArgs);
   7324     glContext->traceGLMessage(&glmsg);
   7325 }
   7326 
   7327 void GLTrace_glBeginTransformFeedback(GLenum primitiveMode) {
   7328     GLMessage glmsg;
   7329     GLTraceContext *glContext = getGLTraceContext();
   7330 
   7331     glmsg.set_function(GLMessage::glBeginTransformFeedback);
   7332 
   7333     // copy argument primitiveMode
   7334     GLMessage_DataType *arg_primitiveMode = glmsg.add_args();
   7335     arg_primitiveMode->set_isarray(false);
   7336     arg_primitiveMode->set_type(GLMessage::DataType::ENUM);
   7337     arg_primitiveMode->add_intvalue((int)primitiveMode);
   7338 
   7339     // call function
   7340     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7341     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7342     glContext->hooks->gl.glBeginTransformFeedback(primitiveMode);
   7343     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7344     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7345 
   7346     void *pointerArgs[] = {
   7347     };
   7348 
   7349     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7350                               threadStartTime, threadEndTime,
   7351                               &glmsg, pointerArgs);
   7352     glContext->traceGLMessage(&glmsg);
   7353 }
   7354 
   7355 void GLTrace_glEndTransformFeedback(void) {
   7356     GLMessage glmsg;
   7357     GLTraceContext *glContext = getGLTraceContext();
   7358 
   7359     glmsg.set_function(GLMessage::glEndTransformFeedback);
   7360 
   7361     // call function
   7362     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7363     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7364     glContext->hooks->gl.glEndTransformFeedback();
   7365     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7366     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7367 
   7368     void *pointerArgs[] = {
   7369     };
   7370 
   7371     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7372                               threadStartTime, threadEndTime,
   7373                               &glmsg, pointerArgs);
   7374     glContext->traceGLMessage(&glmsg);
   7375 }
   7376 
   7377 void GLTrace_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) {
   7378     GLMessage glmsg;
   7379     GLTraceContext *glContext = getGLTraceContext();
   7380 
   7381     glmsg.set_function(GLMessage::glBindBufferRange);
   7382 
   7383     // copy argument target
   7384     GLMessage_DataType *arg_target = glmsg.add_args();
   7385     arg_target->set_isarray(false);
   7386     arg_target->set_type(GLMessage::DataType::ENUM);
   7387     arg_target->add_intvalue((int)target);
   7388 
   7389     // copy argument index
   7390     GLMessage_DataType *arg_index = glmsg.add_args();
   7391     arg_index->set_isarray(false);
   7392     arg_index->set_type(GLMessage::DataType::INT);
   7393     arg_index->add_intvalue(index);
   7394 
   7395     // copy argument buffer
   7396     GLMessage_DataType *arg_buffer = glmsg.add_args();
   7397     arg_buffer->set_isarray(false);
   7398     arg_buffer->set_type(GLMessage::DataType::INT);
   7399     arg_buffer->add_intvalue(buffer);
   7400 
   7401     // copy argument offset
   7402     GLMessage_DataType *arg_offset = glmsg.add_args();
   7403     arg_offset->set_isarray(false);
   7404     arg_offset->set_type(GLMessage::DataType::INT);
   7405     arg_offset->add_intvalue(offset);
   7406 
   7407     // copy argument size
   7408     GLMessage_DataType *arg_size = glmsg.add_args();
   7409     arg_size->set_isarray(false);
   7410     arg_size->set_type(GLMessage::DataType::INT);
   7411     arg_size->add_intvalue(size);
   7412 
   7413     // call function
   7414     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7415     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7416     glContext->hooks->gl.glBindBufferRange(target, index, buffer, offset, size);
   7417     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7418     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7419 
   7420     void *pointerArgs[] = {
   7421     };
   7422 
   7423     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7424                               threadStartTime, threadEndTime,
   7425                               &glmsg, pointerArgs);
   7426     glContext->traceGLMessage(&glmsg);
   7427 }
   7428 
   7429 void GLTrace_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) {
   7430     GLMessage glmsg;
   7431     GLTraceContext *glContext = getGLTraceContext();
   7432 
   7433     glmsg.set_function(GLMessage::glBindBufferBase);
   7434 
   7435     // copy argument target
   7436     GLMessage_DataType *arg_target = glmsg.add_args();
   7437     arg_target->set_isarray(false);
   7438     arg_target->set_type(GLMessage::DataType::ENUM);
   7439     arg_target->add_intvalue((int)target);
   7440 
   7441     // copy argument index
   7442     GLMessage_DataType *arg_index = glmsg.add_args();
   7443     arg_index->set_isarray(false);
   7444     arg_index->set_type(GLMessage::DataType::INT);
   7445     arg_index->add_intvalue(index);
   7446 
   7447     // copy argument buffer
   7448     GLMessage_DataType *arg_buffer = glmsg.add_args();
   7449     arg_buffer->set_isarray(false);
   7450     arg_buffer->set_type(GLMessage::DataType::INT);
   7451     arg_buffer->add_intvalue(buffer);
   7452 
   7453     // call function
   7454     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7455     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7456     glContext->hooks->gl.glBindBufferBase(target, index, buffer);
   7457     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7458     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7459 
   7460     void *pointerArgs[] = {
   7461     };
   7462 
   7463     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7464                               threadStartTime, threadEndTime,
   7465                               &glmsg, pointerArgs);
   7466     glContext->traceGLMessage(&glmsg);
   7467 }
   7468 
   7469 void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) {
   7470     GLMessage glmsg;
   7471     GLTraceContext *glContext = getGLTraceContext();
   7472 
   7473     glmsg.set_function(GLMessage::glTransformFeedbackVaryings);
   7474 
   7475     // copy argument program
   7476     GLMessage_DataType *arg_program = glmsg.add_args();
   7477     arg_program->set_isarray(false);
   7478     arg_program->set_type(GLMessage::DataType::INT);
   7479     arg_program->add_intvalue(program);
   7480 
   7481     // copy argument count
   7482     GLMessage_DataType *arg_count = glmsg.add_args();
   7483     arg_count->set_isarray(false);
   7484     arg_count->set_type(GLMessage::DataType::INT);
   7485     arg_count->add_intvalue(count);
   7486 
   7487     // copy argument varyings
   7488     GLMessage_DataType *arg_varyings = glmsg.add_args();
   7489     arg_varyings->set_isarray(false);
   7490     arg_varyings->set_type(GLMessage::DataType::INT);
   7491     arg_varyings->add_intvalue((int)varyings);
   7492 
   7493     // copy argument bufferMode
   7494     GLMessage_DataType *arg_bufferMode = glmsg.add_args();
   7495     arg_bufferMode->set_isarray(false);
   7496     arg_bufferMode->set_type(GLMessage::DataType::ENUM);
   7497     arg_bufferMode->add_intvalue((int)bufferMode);
   7498 
   7499     // call function
   7500     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7501     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7502     glContext->hooks->gl.glTransformFeedbackVaryings(program, count, varyings, bufferMode);
   7503     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7504     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7505 
   7506     void *pointerArgs[] = {
   7507         (void *) varyings,
   7508     };
   7509 
   7510     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7511                               threadStartTime, threadEndTime,
   7512                               &glmsg, pointerArgs);
   7513     glContext->traceGLMessage(&glmsg);
   7514 }
   7515 
   7516 void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) {
   7517     GLMessage glmsg;
   7518     GLTraceContext *glContext = getGLTraceContext();
   7519 
   7520     glmsg.set_function(GLMessage::glGetTransformFeedbackVarying);
   7521 
   7522     // copy argument program
   7523     GLMessage_DataType *arg_program = glmsg.add_args();
   7524     arg_program->set_isarray(false);
   7525     arg_program->set_type(GLMessage::DataType::INT);
   7526     arg_program->add_intvalue(program);
   7527 
   7528     // copy argument index
   7529     GLMessage_DataType *arg_index = glmsg.add_args();
   7530     arg_index->set_isarray(false);
   7531     arg_index->set_type(GLMessage::DataType::INT);
   7532     arg_index->add_intvalue(index);
   7533 
   7534     // copy argument bufSize
   7535     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   7536     arg_bufSize->set_isarray(false);
   7537     arg_bufSize->set_type(GLMessage::DataType::INT);
   7538     arg_bufSize->add_intvalue(bufSize);
   7539 
   7540     // copy argument length
   7541     GLMessage_DataType *arg_length = glmsg.add_args();
   7542     arg_length->set_isarray(false);
   7543     arg_length->set_type(GLMessage::DataType::INT);
   7544     arg_length->add_intvalue((int)length);
   7545 
   7546     // copy argument size
   7547     GLMessage_DataType *arg_size = glmsg.add_args();
   7548     arg_size->set_isarray(false);
   7549     arg_size->set_type(GLMessage::DataType::INT);
   7550     arg_size->add_intvalue((int)size);
   7551 
   7552     // copy argument type
   7553     GLMessage_DataType *arg_type = glmsg.add_args();
   7554     arg_type->set_isarray(false);
   7555     arg_type->set_type(GLMessage::DataType::INT);
   7556     arg_type->add_intvalue((int)type);
   7557 
   7558     // copy argument name
   7559     GLMessage_DataType *arg_name = glmsg.add_args();
   7560     arg_name->set_isarray(false);
   7561     arg_name->set_type(GLMessage::DataType::INT);
   7562     arg_name->add_intvalue((int)name);
   7563 
   7564     // call function
   7565     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7566     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7567     glContext->hooks->gl.glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name);
   7568     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7569     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7570 
   7571     void *pointerArgs[] = {
   7572         (void *) length,
   7573         (void *) size,
   7574         (void *) type,
   7575         (void *) name,
   7576     };
   7577 
   7578     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7579                               threadStartTime, threadEndTime,
   7580                               &glmsg, pointerArgs);
   7581     glContext->traceGLMessage(&glmsg);
   7582 }
   7583 
   7584 void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) {
   7585     GLMessage glmsg;
   7586     GLTraceContext *glContext = getGLTraceContext();
   7587 
   7588     glmsg.set_function(GLMessage::glVertexAttribIPointer);
   7589 
   7590     // copy argument index
   7591     GLMessage_DataType *arg_index = glmsg.add_args();
   7592     arg_index->set_isarray(false);
   7593     arg_index->set_type(GLMessage::DataType::INT);
   7594     arg_index->add_intvalue(index);
   7595 
   7596     // copy argument size
   7597     GLMessage_DataType *arg_size = glmsg.add_args();
   7598     arg_size->set_isarray(false);
   7599     arg_size->set_type(GLMessage::DataType::INT);
   7600     arg_size->add_intvalue(size);
   7601 
   7602     // copy argument type
   7603     GLMessage_DataType *arg_type = glmsg.add_args();
   7604     arg_type->set_isarray(false);
   7605     arg_type->set_type(GLMessage::DataType::ENUM);
   7606     arg_type->add_intvalue((int)type);
   7607 
   7608     // copy argument stride
   7609     GLMessage_DataType *arg_stride = glmsg.add_args();
   7610     arg_stride->set_isarray(false);
   7611     arg_stride->set_type(GLMessage::DataType::INT);
   7612     arg_stride->add_intvalue(stride);
   7613 
   7614     // copy argument pointer
   7615     GLMessage_DataType *arg_pointer = glmsg.add_args();
   7616     arg_pointer->set_isarray(false);
   7617     arg_pointer->set_type(GLMessage::DataType::INT);
   7618     arg_pointer->add_intvalue((int)pointer);
   7619 
   7620     // call function
   7621     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7622     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7623     glContext->hooks->gl.glVertexAttribIPointer(index, size, type, stride, pointer);
   7624     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7625     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7626 
   7627     void *pointerArgs[] = {
   7628         (void *) pointer,
   7629     };
   7630 
   7631     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7632                               threadStartTime, threadEndTime,
   7633                               &glmsg, pointerArgs);
   7634     glContext->traceGLMessage(&glmsg);
   7635 }
   7636 
   7637 void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) {
   7638     GLMessage glmsg;
   7639     GLTraceContext *glContext = getGLTraceContext();
   7640 
   7641     glmsg.set_function(GLMessage::glGetVertexAttribIiv);
   7642 
   7643     // copy argument index
   7644     GLMessage_DataType *arg_index = glmsg.add_args();
   7645     arg_index->set_isarray(false);
   7646     arg_index->set_type(GLMessage::DataType::INT);
   7647     arg_index->add_intvalue(index);
   7648 
   7649     // copy argument pname
   7650     GLMessage_DataType *arg_pname = glmsg.add_args();
   7651     arg_pname->set_isarray(false);
   7652     arg_pname->set_type(GLMessage::DataType::ENUM);
   7653     arg_pname->add_intvalue((int)pname);
   7654 
   7655     // copy argument params
   7656     GLMessage_DataType *arg_params = glmsg.add_args();
   7657     arg_params->set_isarray(false);
   7658     arg_params->set_type(GLMessage::DataType::INT);
   7659     arg_params->add_intvalue((int)params);
   7660 
   7661     // call function
   7662     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7663     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7664     glContext->hooks->gl.glGetVertexAttribIiv(index, pname, params);
   7665     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7666     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7667 
   7668     void *pointerArgs[] = {
   7669         (void *) params,
   7670     };
   7671 
   7672     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7673                               threadStartTime, threadEndTime,
   7674                               &glmsg, pointerArgs);
   7675     glContext->traceGLMessage(&glmsg);
   7676 }
   7677 
   7678 void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) {
   7679     GLMessage glmsg;
   7680     GLTraceContext *glContext = getGLTraceContext();
   7681 
   7682     glmsg.set_function(GLMessage::glGetVertexAttribIuiv);
   7683 
   7684     // copy argument index
   7685     GLMessage_DataType *arg_index = glmsg.add_args();
   7686     arg_index->set_isarray(false);
   7687     arg_index->set_type(GLMessage::DataType::INT);
   7688     arg_index->add_intvalue(index);
   7689 
   7690     // copy argument pname
   7691     GLMessage_DataType *arg_pname = glmsg.add_args();
   7692     arg_pname->set_isarray(false);
   7693     arg_pname->set_type(GLMessage::DataType::ENUM);
   7694     arg_pname->add_intvalue((int)pname);
   7695 
   7696     // copy argument params
   7697     GLMessage_DataType *arg_params = glmsg.add_args();
   7698     arg_params->set_isarray(false);
   7699     arg_params->set_type(GLMessage::DataType::INT);
   7700     arg_params->add_intvalue((int)params);
   7701 
   7702     // call function
   7703     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7704     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7705     glContext->hooks->gl.glGetVertexAttribIuiv(index, pname, params);
   7706     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7707     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7708 
   7709     void *pointerArgs[] = {
   7710         (void *) params,
   7711     };
   7712 
   7713     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7714                               threadStartTime, threadEndTime,
   7715                               &glmsg, pointerArgs);
   7716     glContext->traceGLMessage(&glmsg);
   7717 }
   7718 
   7719 void GLTrace_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) {
   7720     GLMessage glmsg;
   7721     GLTraceContext *glContext = getGLTraceContext();
   7722 
   7723     glmsg.set_function(GLMessage::glVertexAttribI4i);
   7724 
   7725     // copy argument index
   7726     GLMessage_DataType *arg_index = glmsg.add_args();
   7727     arg_index->set_isarray(false);
   7728     arg_index->set_type(GLMessage::DataType::INT);
   7729     arg_index->add_intvalue(index);
   7730 
   7731     // copy argument x
   7732     GLMessage_DataType *arg_x = glmsg.add_args();
   7733     arg_x->set_isarray(false);
   7734     arg_x->set_type(GLMessage::DataType::INT);
   7735     arg_x->add_intvalue(x);
   7736 
   7737     // copy argument y
   7738     GLMessage_DataType *arg_y = glmsg.add_args();
   7739     arg_y->set_isarray(false);
   7740     arg_y->set_type(GLMessage::DataType::INT);
   7741     arg_y->add_intvalue(y);
   7742 
   7743     // copy argument z
   7744     GLMessage_DataType *arg_z = glmsg.add_args();
   7745     arg_z->set_isarray(false);
   7746     arg_z->set_type(GLMessage::DataType::INT);
   7747     arg_z->add_intvalue(z);
   7748 
   7749     // copy argument w
   7750     GLMessage_DataType *arg_w = glmsg.add_args();
   7751     arg_w->set_isarray(false);
   7752     arg_w->set_type(GLMessage::DataType::INT);
   7753     arg_w->add_intvalue(w);
   7754 
   7755     // call function
   7756     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7757     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7758     glContext->hooks->gl.glVertexAttribI4i(index, x, y, z, w);
   7759     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7760     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7761 
   7762     void *pointerArgs[] = {
   7763     };
   7764 
   7765     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7766                               threadStartTime, threadEndTime,
   7767                               &glmsg, pointerArgs);
   7768     glContext->traceGLMessage(&glmsg);
   7769 }
   7770 
   7771 void GLTrace_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) {
   7772     GLMessage glmsg;
   7773     GLTraceContext *glContext = getGLTraceContext();
   7774 
   7775     glmsg.set_function(GLMessage::glVertexAttribI4ui);
   7776 
   7777     // copy argument index
   7778     GLMessage_DataType *arg_index = glmsg.add_args();
   7779     arg_index->set_isarray(false);
   7780     arg_index->set_type(GLMessage::DataType::INT);
   7781     arg_index->add_intvalue(index);
   7782 
   7783     // copy argument x
   7784     GLMessage_DataType *arg_x = glmsg.add_args();
   7785     arg_x->set_isarray(false);
   7786     arg_x->set_type(GLMessage::DataType::INT);
   7787     arg_x->add_intvalue(x);
   7788 
   7789     // copy argument y
   7790     GLMessage_DataType *arg_y = glmsg.add_args();
   7791     arg_y->set_isarray(false);
   7792     arg_y->set_type(GLMessage::DataType::INT);
   7793     arg_y->add_intvalue(y);
   7794 
   7795     // copy argument z
   7796     GLMessage_DataType *arg_z = glmsg.add_args();
   7797     arg_z->set_isarray(false);
   7798     arg_z->set_type(GLMessage::DataType::INT);
   7799     arg_z->add_intvalue(z);
   7800 
   7801     // copy argument w
   7802     GLMessage_DataType *arg_w = glmsg.add_args();
   7803     arg_w->set_isarray(false);
   7804     arg_w->set_type(GLMessage::DataType::INT);
   7805     arg_w->add_intvalue(w);
   7806 
   7807     // call function
   7808     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7809     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7810     glContext->hooks->gl.glVertexAttribI4ui(index, x, y, z, w);
   7811     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7812     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7813 
   7814     void *pointerArgs[] = {
   7815     };
   7816 
   7817     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7818                               threadStartTime, threadEndTime,
   7819                               &glmsg, pointerArgs);
   7820     glContext->traceGLMessage(&glmsg);
   7821 }
   7822 
   7823 void GLTrace_glVertexAttribI4iv(GLuint index, const GLint* v) {
   7824     GLMessage glmsg;
   7825     GLTraceContext *glContext = getGLTraceContext();
   7826 
   7827     glmsg.set_function(GLMessage::glVertexAttribI4iv);
   7828 
   7829     // copy argument index
   7830     GLMessage_DataType *arg_index = glmsg.add_args();
   7831     arg_index->set_isarray(false);
   7832     arg_index->set_type(GLMessage::DataType::INT);
   7833     arg_index->add_intvalue(index);
   7834 
   7835     // copy argument v
   7836     GLMessage_DataType *arg_v = glmsg.add_args();
   7837     arg_v->set_isarray(false);
   7838     arg_v->set_type(GLMessage::DataType::INT);
   7839     arg_v->add_intvalue((int)v);
   7840 
   7841     // call function
   7842     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7843     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7844     glContext->hooks->gl.glVertexAttribI4iv(index, v);
   7845     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7846     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7847 
   7848     void *pointerArgs[] = {
   7849         (void *) v,
   7850     };
   7851 
   7852     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7853                               threadStartTime, threadEndTime,
   7854                               &glmsg, pointerArgs);
   7855     glContext->traceGLMessage(&glmsg);
   7856 }
   7857 
   7858 void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint* v) {
   7859     GLMessage glmsg;
   7860     GLTraceContext *glContext = getGLTraceContext();
   7861 
   7862     glmsg.set_function(GLMessage::glVertexAttribI4uiv);
   7863 
   7864     // copy argument index
   7865     GLMessage_DataType *arg_index = glmsg.add_args();
   7866     arg_index->set_isarray(false);
   7867     arg_index->set_type(GLMessage::DataType::INT);
   7868     arg_index->add_intvalue(index);
   7869 
   7870     // copy argument v
   7871     GLMessage_DataType *arg_v = glmsg.add_args();
   7872     arg_v->set_isarray(false);
   7873     arg_v->set_type(GLMessage::DataType::INT);
   7874     arg_v->add_intvalue((int)v);
   7875 
   7876     // call function
   7877     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7878     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7879     glContext->hooks->gl.glVertexAttribI4uiv(index, v);
   7880     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7881     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7882 
   7883     void *pointerArgs[] = {
   7884         (void *) v,
   7885     };
   7886 
   7887     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7888                               threadStartTime, threadEndTime,
   7889                               &glmsg, pointerArgs);
   7890     glContext->traceGLMessage(&glmsg);
   7891 }
   7892 
   7893 void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint* params) {
   7894     GLMessage glmsg;
   7895     GLTraceContext *glContext = getGLTraceContext();
   7896 
   7897     glmsg.set_function(GLMessage::glGetUniformuiv);
   7898 
   7899     // copy argument program
   7900     GLMessage_DataType *arg_program = glmsg.add_args();
   7901     arg_program->set_isarray(false);
   7902     arg_program->set_type(GLMessage::DataType::INT);
   7903     arg_program->add_intvalue(program);
   7904 
   7905     // copy argument location
   7906     GLMessage_DataType *arg_location = glmsg.add_args();
   7907     arg_location->set_isarray(false);
   7908     arg_location->set_type(GLMessage::DataType::INT);
   7909     arg_location->add_intvalue(location);
   7910 
   7911     // copy argument params
   7912     GLMessage_DataType *arg_params = glmsg.add_args();
   7913     arg_params->set_isarray(false);
   7914     arg_params->set_type(GLMessage::DataType::INT);
   7915     arg_params->add_intvalue((int)params);
   7916 
   7917     // call function
   7918     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7919     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7920     glContext->hooks->gl.glGetUniformuiv(program, location, params);
   7921     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7922     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7923 
   7924     void *pointerArgs[] = {
   7925         (void *) params,
   7926     };
   7927 
   7928     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7929                               threadStartTime, threadEndTime,
   7930                               &glmsg, pointerArgs);
   7931     glContext->traceGLMessage(&glmsg);
   7932 }
   7933 
   7934 GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar *name) {
   7935     GLMessage glmsg;
   7936     GLTraceContext *glContext = getGLTraceContext();
   7937 
   7938     glmsg.set_function(GLMessage::glGetFragDataLocation);
   7939 
   7940     // copy argument program
   7941     GLMessage_DataType *arg_program = glmsg.add_args();
   7942     arg_program->set_isarray(false);
   7943     arg_program->set_type(GLMessage::DataType::INT);
   7944     arg_program->add_intvalue(program);
   7945 
   7946     // copy argument name
   7947     GLMessage_DataType *arg_name = glmsg.add_args();
   7948     arg_name->set_isarray(false);
   7949     arg_name->set_type(GLMessage::DataType::INT);
   7950     arg_name->add_intvalue((int)name);
   7951 
   7952     // call function
   7953     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7954     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7955     GLint retValue = glContext->hooks->gl.glGetFragDataLocation(program, name);
   7956     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   7957     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7958 
   7959     // set return value
   7960     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   7961     rt->set_isarray(false);
   7962     rt->set_type(GLMessage::DataType::INT);
   7963     rt->add_intvalue(retValue);
   7964 
   7965     void *pointerArgs[] = {
   7966         (void *) name,
   7967     };
   7968 
   7969     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   7970                               threadStartTime, threadEndTime,
   7971                               &glmsg, pointerArgs);
   7972     glContext->traceGLMessage(&glmsg);
   7973 
   7974     return retValue;
   7975 }
   7976 
   7977 void GLTrace_glUniform1ui(GLint location, GLuint v0) {
   7978     GLMessage glmsg;
   7979     GLTraceContext *glContext = getGLTraceContext();
   7980 
   7981     glmsg.set_function(GLMessage::glUniform1ui);
   7982 
   7983     // copy argument location
   7984     GLMessage_DataType *arg_location = glmsg.add_args();
   7985     arg_location->set_isarray(false);
   7986     arg_location->set_type(GLMessage::DataType::INT);
   7987     arg_location->add_intvalue(location);
   7988 
   7989     // copy argument v0
   7990     GLMessage_DataType *arg_v0 = glmsg.add_args();
   7991     arg_v0->set_isarray(false);
   7992     arg_v0->set_type(GLMessage::DataType::INT);
   7993     arg_v0->add_intvalue(v0);
   7994 
   7995     // call function
   7996     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   7997     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   7998     glContext->hooks->gl.glUniform1ui(location, v0);
   7999     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8000     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8001 
   8002     void *pointerArgs[] = {
   8003     };
   8004 
   8005     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8006                               threadStartTime, threadEndTime,
   8007                               &glmsg, pointerArgs);
   8008     glContext->traceGLMessage(&glmsg);
   8009 }
   8010 
   8011 void GLTrace_glUniform2ui(GLint location, GLuint v0, GLuint v1) {
   8012     GLMessage glmsg;
   8013     GLTraceContext *glContext = getGLTraceContext();
   8014 
   8015     glmsg.set_function(GLMessage::glUniform2ui);
   8016 
   8017     // copy argument location
   8018     GLMessage_DataType *arg_location = glmsg.add_args();
   8019     arg_location->set_isarray(false);
   8020     arg_location->set_type(GLMessage::DataType::INT);
   8021     arg_location->add_intvalue(location);
   8022 
   8023     // copy argument v0
   8024     GLMessage_DataType *arg_v0 = glmsg.add_args();
   8025     arg_v0->set_isarray(false);
   8026     arg_v0->set_type(GLMessage::DataType::INT);
   8027     arg_v0->add_intvalue(v0);
   8028 
   8029     // copy argument v1
   8030     GLMessage_DataType *arg_v1 = glmsg.add_args();
   8031     arg_v1->set_isarray(false);
   8032     arg_v1->set_type(GLMessage::DataType::INT);
   8033     arg_v1->add_intvalue(v1);
   8034 
   8035     // call function
   8036     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8037     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8038     glContext->hooks->gl.glUniform2ui(location, v0, v1);
   8039     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8040     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8041 
   8042     void *pointerArgs[] = {
   8043     };
   8044 
   8045     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8046                               threadStartTime, threadEndTime,
   8047                               &glmsg, pointerArgs);
   8048     glContext->traceGLMessage(&glmsg);
   8049 }
   8050 
   8051 void GLTrace_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) {
   8052     GLMessage glmsg;
   8053     GLTraceContext *glContext = getGLTraceContext();
   8054 
   8055     glmsg.set_function(GLMessage::glUniform3ui);
   8056 
   8057     // copy argument location
   8058     GLMessage_DataType *arg_location = glmsg.add_args();
   8059     arg_location->set_isarray(false);
   8060     arg_location->set_type(GLMessage::DataType::INT);
   8061     arg_location->add_intvalue(location);
   8062 
   8063     // copy argument v0
   8064     GLMessage_DataType *arg_v0 = glmsg.add_args();
   8065     arg_v0->set_isarray(false);
   8066     arg_v0->set_type(GLMessage::DataType::INT);
   8067     arg_v0->add_intvalue(v0);
   8068 
   8069     // copy argument v1
   8070     GLMessage_DataType *arg_v1 = glmsg.add_args();
   8071     arg_v1->set_isarray(false);
   8072     arg_v1->set_type(GLMessage::DataType::INT);
   8073     arg_v1->add_intvalue(v1);
   8074 
   8075     // copy argument v2
   8076     GLMessage_DataType *arg_v2 = glmsg.add_args();
   8077     arg_v2->set_isarray(false);
   8078     arg_v2->set_type(GLMessage::DataType::INT);
   8079     arg_v2->add_intvalue(v2);
   8080 
   8081     // call function
   8082     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8083     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8084     glContext->hooks->gl.glUniform3ui(location, v0, v1, v2);
   8085     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8086     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8087 
   8088     void *pointerArgs[] = {
   8089     };
   8090 
   8091     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8092                               threadStartTime, threadEndTime,
   8093                               &glmsg, pointerArgs);
   8094     glContext->traceGLMessage(&glmsg);
   8095 }
   8096 
   8097 void GLTrace_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) {
   8098     GLMessage glmsg;
   8099     GLTraceContext *glContext = getGLTraceContext();
   8100 
   8101     glmsg.set_function(GLMessage::glUniform4ui);
   8102 
   8103     // copy argument location
   8104     GLMessage_DataType *arg_location = glmsg.add_args();
   8105     arg_location->set_isarray(false);
   8106     arg_location->set_type(GLMessage::DataType::INT);
   8107     arg_location->add_intvalue(location);
   8108 
   8109     // copy argument v0
   8110     GLMessage_DataType *arg_v0 = glmsg.add_args();
   8111     arg_v0->set_isarray(false);
   8112     arg_v0->set_type(GLMessage::DataType::INT);
   8113     arg_v0->add_intvalue(v0);
   8114 
   8115     // copy argument v1
   8116     GLMessage_DataType *arg_v1 = glmsg.add_args();
   8117     arg_v1->set_isarray(false);
   8118     arg_v1->set_type(GLMessage::DataType::INT);
   8119     arg_v1->add_intvalue(v1);
   8120 
   8121     // copy argument v2
   8122     GLMessage_DataType *arg_v2 = glmsg.add_args();
   8123     arg_v2->set_isarray(false);
   8124     arg_v2->set_type(GLMessage::DataType::INT);
   8125     arg_v2->add_intvalue(v2);
   8126 
   8127     // copy argument v3
   8128     GLMessage_DataType *arg_v3 = glmsg.add_args();
   8129     arg_v3->set_isarray(false);
   8130     arg_v3->set_type(GLMessage::DataType::INT);
   8131     arg_v3->add_intvalue(v3);
   8132 
   8133     // call function
   8134     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8135     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8136     glContext->hooks->gl.glUniform4ui(location, v0, v1, v2, v3);
   8137     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8138     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8139 
   8140     void *pointerArgs[] = {
   8141     };
   8142 
   8143     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8144                               threadStartTime, threadEndTime,
   8145                               &glmsg, pointerArgs);
   8146     glContext->traceGLMessage(&glmsg);
   8147 }
   8148 
   8149 void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint* value) {
   8150     GLMessage glmsg;
   8151     GLTraceContext *glContext = getGLTraceContext();
   8152 
   8153     glmsg.set_function(GLMessage::glUniform1uiv);
   8154 
   8155     // copy argument location
   8156     GLMessage_DataType *arg_location = glmsg.add_args();
   8157     arg_location->set_isarray(false);
   8158     arg_location->set_type(GLMessage::DataType::INT);
   8159     arg_location->add_intvalue(location);
   8160 
   8161     // copy argument count
   8162     GLMessage_DataType *arg_count = glmsg.add_args();
   8163     arg_count->set_isarray(false);
   8164     arg_count->set_type(GLMessage::DataType::INT);
   8165     arg_count->add_intvalue(count);
   8166 
   8167     // copy argument value
   8168     GLMessage_DataType *arg_value = glmsg.add_args();
   8169     arg_value->set_isarray(false);
   8170     arg_value->set_type(GLMessage::DataType::INT);
   8171     arg_value->add_intvalue((int)value);
   8172 
   8173     // call function
   8174     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8175     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8176     glContext->hooks->gl.glUniform1uiv(location, count, value);
   8177     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8178     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8179 
   8180     void *pointerArgs[] = {
   8181         (void *) value,
   8182     };
   8183 
   8184     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8185                               threadStartTime, threadEndTime,
   8186                               &glmsg, pointerArgs);
   8187     glContext->traceGLMessage(&glmsg);
   8188 }
   8189 
   8190 void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint* value) {
   8191     GLMessage glmsg;
   8192     GLTraceContext *glContext = getGLTraceContext();
   8193 
   8194     glmsg.set_function(GLMessage::glUniform2uiv);
   8195 
   8196     // copy argument location
   8197     GLMessage_DataType *arg_location = glmsg.add_args();
   8198     arg_location->set_isarray(false);
   8199     arg_location->set_type(GLMessage::DataType::INT);
   8200     arg_location->add_intvalue(location);
   8201 
   8202     // copy argument count
   8203     GLMessage_DataType *arg_count = glmsg.add_args();
   8204     arg_count->set_isarray(false);
   8205     arg_count->set_type(GLMessage::DataType::INT);
   8206     arg_count->add_intvalue(count);
   8207 
   8208     // copy argument value
   8209     GLMessage_DataType *arg_value = glmsg.add_args();
   8210     arg_value->set_isarray(false);
   8211     arg_value->set_type(GLMessage::DataType::INT);
   8212     arg_value->add_intvalue((int)value);
   8213 
   8214     // call function
   8215     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8216     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8217     glContext->hooks->gl.glUniform2uiv(location, count, value);
   8218     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8219     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8220 
   8221     void *pointerArgs[] = {
   8222         (void *) value,
   8223     };
   8224 
   8225     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8226                               threadStartTime, threadEndTime,
   8227                               &glmsg, pointerArgs);
   8228     glContext->traceGLMessage(&glmsg);
   8229 }
   8230 
   8231 void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint* value) {
   8232     GLMessage glmsg;
   8233     GLTraceContext *glContext = getGLTraceContext();
   8234 
   8235     glmsg.set_function(GLMessage::glUniform3uiv);
   8236 
   8237     // copy argument location
   8238     GLMessage_DataType *arg_location = glmsg.add_args();
   8239     arg_location->set_isarray(false);
   8240     arg_location->set_type(GLMessage::DataType::INT);
   8241     arg_location->add_intvalue(location);
   8242 
   8243     // copy argument count
   8244     GLMessage_DataType *arg_count = glmsg.add_args();
   8245     arg_count->set_isarray(false);
   8246     arg_count->set_type(GLMessage::DataType::INT);
   8247     arg_count->add_intvalue(count);
   8248 
   8249     // copy argument value
   8250     GLMessage_DataType *arg_value = glmsg.add_args();
   8251     arg_value->set_isarray(false);
   8252     arg_value->set_type(GLMessage::DataType::INT);
   8253     arg_value->add_intvalue((int)value);
   8254 
   8255     // call function
   8256     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8257     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8258     glContext->hooks->gl.glUniform3uiv(location, count, value);
   8259     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8260     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8261 
   8262     void *pointerArgs[] = {
   8263         (void *) value,
   8264     };
   8265 
   8266     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8267                               threadStartTime, threadEndTime,
   8268                               &glmsg, pointerArgs);
   8269     glContext->traceGLMessage(&glmsg);
   8270 }
   8271 
   8272 void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint* value) {
   8273     GLMessage glmsg;
   8274     GLTraceContext *glContext = getGLTraceContext();
   8275 
   8276     glmsg.set_function(GLMessage::glUniform4uiv);
   8277 
   8278     // copy argument location
   8279     GLMessage_DataType *arg_location = glmsg.add_args();
   8280     arg_location->set_isarray(false);
   8281     arg_location->set_type(GLMessage::DataType::INT);
   8282     arg_location->add_intvalue(location);
   8283 
   8284     // copy argument count
   8285     GLMessage_DataType *arg_count = glmsg.add_args();
   8286     arg_count->set_isarray(false);
   8287     arg_count->set_type(GLMessage::DataType::INT);
   8288     arg_count->add_intvalue(count);
   8289 
   8290     // copy argument value
   8291     GLMessage_DataType *arg_value = glmsg.add_args();
   8292     arg_value->set_isarray(false);
   8293     arg_value->set_type(GLMessage::DataType::INT);
   8294     arg_value->add_intvalue((int)value);
   8295 
   8296     // call function
   8297     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8298     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8299     glContext->hooks->gl.glUniform4uiv(location, count, value);
   8300     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8301     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8302 
   8303     void *pointerArgs[] = {
   8304         (void *) value,
   8305     };
   8306 
   8307     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8308                               threadStartTime, threadEndTime,
   8309                               &glmsg, pointerArgs);
   8310     glContext->traceGLMessage(&glmsg);
   8311 }
   8312 
   8313 void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) {
   8314     GLMessage glmsg;
   8315     GLTraceContext *glContext = getGLTraceContext();
   8316 
   8317     glmsg.set_function(GLMessage::glClearBufferiv);
   8318 
   8319     // copy argument buffer
   8320     GLMessage_DataType *arg_buffer = glmsg.add_args();
   8321     arg_buffer->set_isarray(false);
   8322     arg_buffer->set_type(GLMessage::DataType::ENUM);
   8323     arg_buffer->add_intvalue((int)buffer);
   8324 
   8325     // copy argument drawbuffer
   8326     GLMessage_DataType *arg_drawbuffer = glmsg.add_args();
   8327     arg_drawbuffer->set_isarray(false);
   8328     arg_drawbuffer->set_type(GLMessage::DataType::INT);
   8329     arg_drawbuffer->add_intvalue(drawbuffer);
   8330 
   8331     // copy argument value
   8332     GLMessage_DataType *arg_value = glmsg.add_args();
   8333     arg_value->set_isarray(false);
   8334     arg_value->set_type(GLMessage::DataType::INT);
   8335     arg_value->add_intvalue((int)value);
   8336 
   8337     // call function
   8338     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8339     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8340     glContext->hooks->gl.glClearBufferiv(buffer, drawbuffer, value);
   8341     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8342     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8343 
   8344     void *pointerArgs[] = {
   8345         (void *) value,
   8346     };
   8347 
   8348     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8349                               threadStartTime, threadEndTime,
   8350                               &glmsg, pointerArgs);
   8351     glContext->traceGLMessage(&glmsg);
   8352 }
   8353 
   8354 void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) {
   8355     GLMessage glmsg;
   8356     GLTraceContext *glContext = getGLTraceContext();
   8357 
   8358     glmsg.set_function(GLMessage::glClearBufferuiv);
   8359 
   8360     // copy argument buffer
   8361     GLMessage_DataType *arg_buffer = glmsg.add_args();
   8362     arg_buffer->set_isarray(false);
   8363     arg_buffer->set_type(GLMessage::DataType::ENUM);
   8364     arg_buffer->add_intvalue((int)buffer);
   8365 
   8366     // copy argument drawbuffer
   8367     GLMessage_DataType *arg_drawbuffer = glmsg.add_args();
   8368     arg_drawbuffer->set_isarray(false);
   8369     arg_drawbuffer->set_type(GLMessage::DataType::INT);
   8370     arg_drawbuffer->add_intvalue(drawbuffer);
   8371 
   8372     // copy argument value
   8373     GLMessage_DataType *arg_value = glmsg.add_args();
   8374     arg_value->set_isarray(false);
   8375     arg_value->set_type(GLMessage::DataType::INT);
   8376     arg_value->add_intvalue((int)value);
   8377 
   8378     // call function
   8379     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8380     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8381     glContext->hooks->gl.glClearBufferuiv(buffer, drawbuffer, value);
   8382     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8383     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8384 
   8385     void *pointerArgs[] = {
   8386         (void *) value,
   8387     };
   8388 
   8389     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8390                               threadStartTime, threadEndTime,
   8391                               &glmsg, pointerArgs);
   8392     glContext->traceGLMessage(&glmsg);
   8393 }
   8394 
   8395 void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) {
   8396     GLMessage glmsg;
   8397     GLTraceContext *glContext = getGLTraceContext();
   8398 
   8399     glmsg.set_function(GLMessage::glClearBufferfv);
   8400 
   8401     // copy argument buffer
   8402     GLMessage_DataType *arg_buffer = glmsg.add_args();
   8403     arg_buffer->set_isarray(false);
   8404     arg_buffer->set_type(GLMessage::DataType::ENUM);
   8405     arg_buffer->add_intvalue((int)buffer);
   8406 
   8407     // copy argument drawbuffer
   8408     GLMessage_DataType *arg_drawbuffer = glmsg.add_args();
   8409     arg_drawbuffer->set_isarray(false);
   8410     arg_drawbuffer->set_type(GLMessage::DataType::INT);
   8411     arg_drawbuffer->add_intvalue(drawbuffer);
   8412 
   8413     // copy argument value
   8414     GLMessage_DataType *arg_value = glmsg.add_args();
   8415     arg_value->set_isarray(false);
   8416     arg_value->set_type(GLMessage::DataType::INT);
   8417     arg_value->add_intvalue((int)value);
   8418 
   8419     // call function
   8420     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8421     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8422     glContext->hooks->gl.glClearBufferfv(buffer, drawbuffer, value);
   8423     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8424     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8425 
   8426     void *pointerArgs[] = {
   8427         (void *) value,
   8428     };
   8429 
   8430     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8431                               threadStartTime, threadEndTime,
   8432                               &glmsg, pointerArgs);
   8433     glContext->traceGLMessage(&glmsg);
   8434 }
   8435 
   8436 void GLTrace_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) {
   8437     GLMessage glmsg;
   8438     GLTraceContext *glContext = getGLTraceContext();
   8439 
   8440     glmsg.set_function(GLMessage::glClearBufferfi);
   8441 
   8442     // copy argument buffer
   8443     GLMessage_DataType *arg_buffer = glmsg.add_args();
   8444     arg_buffer->set_isarray(false);
   8445     arg_buffer->set_type(GLMessage::DataType::ENUM);
   8446     arg_buffer->add_intvalue((int)buffer);
   8447 
   8448     // copy argument drawbuffer
   8449     GLMessage_DataType *arg_drawbuffer = glmsg.add_args();
   8450     arg_drawbuffer->set_isarray(false);
   8451     arg_drawbuffer->set_type(GLMessage::DataType::INT);
   8452     arg_drawbuffer->add_intvalue(drawbuffer);
   8453 
   8454     // copy argument depth
   8455     GLMessage_DataType *arg_depth = glmsg.add_args();
   8456     arg_depth->set_isarray(false);
   8457     arg_depth->set_type(GLMessage::DataType::FLOAT);
   8458     arg_depth->add_floatvalue(depth);
   8459 
   8460     // copy argument stencil
   8461     GLMessage_DataType *arg_stencil = glmsg.add_args();
   8462     arg_stencil->set_isarray(false);
   8463     arg_stencil->set_type(GLMessage::DataType::INT);
   8464     arg_stencil->add_intvalue(stencil);
   8465 
   8466     // call function
   8467     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8468     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8469     glContext->hooks->gl.glClearBufferfi(buffer, drawbuffer, depth, stencil);
   8470     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8471     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8472 
   8473     void *pointerArgs[] = {
   8474     };
   8475 
   8476     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8477                               threadStartTime, threadEndTime,
   8478                               &glmsg, pointerArgs);
   8479     glContext->traceGLMessage(&glmsg);
   8480 }
   8481 
   8482 const GLubyte* GLTrace_glGetStringi(GLenum name, GLuint index) {
   8483     GLMessage glmsg;
   8484     GLTraceContext *glContext = getGLTraceContext();
   8485 
   8486     glmsg.set_function(GLMessage::glGetStringi);
   8487 
   8488     // copy argument name
   8489     GLMessage_DataType *arg_name = glmsg.add_args();
   8490     arg_name->set_isarray(false);
   8491     arg_name->set_type(GLMessage::DataType::ENUM);
   8492     arg_name->add_intvalue((int)name);
   8493 
   8494     // copy argument index
   8495     GLMessage_DataType *arg_index = glmsg.add_args();
   8496     arg_index->set_isarray(false);
   8497     arg_index->set_type(GLMessage::DataType::INT);
   8498     arg_index->add_intvalue(index);
   8499 
   8500     // call function
   8501     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8502     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8503     const GLubyte* retValue = glContext->hooks->gl.glGetStringi(name, index);
   8504     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8505     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8506 
   8507     // set return value
   8508     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   8509     rt->set_isarray(false);
   8510     rt->set_type(GLMessage::DataType::INT);
   8511     rt->add_intvalue((int)retValue);
   8512 
   8513     void *pointerArgs[] = {
   8514         (void *) retValue,
   8515     };
   8516 
   8517     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8518                               threadStartTime, threadEndTime,
   8519                               &glmsg, pointerArgs);
   8520     glContext->traceGLMessage(&glmsg);
   8521 
   8522     return retValue;
   8523 }
   8524 
   8525 void GLTrace_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) {
   8526     GLMessage glmsg;
   8527     GLTraceContext *glContext = getGLTraceContext();
   8528 
   8529     glmsg.set_function(GLMessage::glCopyBufferSubData);
   8530 
   8531     // copy argument readTarget
   8532     GLMessage_DataType *arg_readTarget = glmsg.add_args();
   8533     arg_readTarget->set_isarray(false);
   8534     arg_readTarget->set_type(GLMessage::DataType::ENUM);
   8535     arg_readTarget->add_intvalue((int)readTarget);
   8536 
   8537     // copy argument writeTarget
   8538     GLMessage_DataType *arg_writeTarget = glmsg.add_args();
   8539     arg_writeTarget->set_isarray(false);
   8540     arg_writeTarget->set_type(GLMessage::DataType::ENUM);
   8541     arg_writeTarget->add_intvalue((int)writeTarget);
   8542 
   8543     // copy argument readOffset
   8544     GLMessage_DataType *arg_readOffset = glmsg.add_args();
   8545     arg_readOffset->set_isarray(false);
   8546     arg_readOffset->set_type(GLMessage::DataType::INT);
   8547     arg_readOffset->add_intvalue(readOffset);
   8548 
   8549     // copy argument writeOffset
   8550     GLMessage_DataType *arg_writeOffset = glmsg.add_args();
   8551     arg_writeOffset->set_isarray(false);
   8552     arg_writeOffset->set_type(GLMessage::DataType::INT);
   8553     arg_writeOffset->add_intvalue(writeOffset);
   8554 
   8555     // copy argument size
   8556     GLMessage_DataType *arg_size = glmsg.add_args();
   8557     arg_size->set_isarray(false);
   8558     arg_size->set_type(GLMessage::DataType::INT);
   8559     arg_size->add_intvalue(size);
   8560 
   8561     // call function
   8562     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8563     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8564     glContext->hooks->gl.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
   8565     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8566     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8567 
   8568     void *pointerArgs[] = {
   8569     };
   8570 
   8571     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8572                               threadStartTime, threadEndTime,
   8573                               &glmsg, pointerArgs);
   8574     glContext->traceGLMessage(&glmsg);
   8575 }
   8576 
   8577 void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) {
   8578     GLMessage glmsg;
   8579     GLTraceContext *glContext = getGLTraceContext();
   8580 
   8581     glmsg.set_function(GLMessage::glGetUniformIndices);
   8582 
   8583     // copy argument program
   8584     GLMessage_DataType *arg_program = glmsg.add_args();
   8585     arg_program->set_isarray(false);
   8586     arg_program->set_type(GLMessage::DataType::INT);
   8587     arg_program->add_intvalue(program);
   8588 
   8589     // copy argument uniformCount
   8590     GLMessage_DataType *arg_uniformCount = glmsg.add_args();
   8591     arg_uniformCount->set_isarray(false);
   8592     arg_uniformCount->set_type(GLMessage::DataType::INT);
   8593     arg_uniformCount->add_intvalue(uniformCount);
   8594 
   8595     // copy argument uniformNames
   8596     GLMessage_DataType *arg_uniformNames = glmsg.add_args();
   8597     arg_uniformNames->set_isarray(false);
   8598     arg_uniformNames->set_type(GLMessage::DataType::INT);
   8599     arg_uniformNames->add_intvalue((int)uniformNames);
   8600 
   8601     // copy argument uniformIndices
   8602     GLMessage_DataType *arg_uniformIndices = glmsg.add_args();
   8603     arg_uniformIndices->set_isarray(false);
   8604     arg_uniformIndices->set_type(GLMessage::DataType::INT);
   8605     arg_uniformIndices->add_intvalue((int)uniformIndices);
   8606 
   8607     // call function
   8608     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8609     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8610     glContext->hooks->gl.glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices);
   8611     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8612     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8613 
   8614     void *pointerArgs[] = {
   8615         (void *) uniformNames,
   8616         (void *) uniformIndices,
   8617     };
   8618 
   8619     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8620                               threadStartTime, threadEndTime,
   8621                               &glmsg, pointerArgs);
   8622     glContext->traceGLMessage(&glmsg);
   8623 }
   8624 
   8625 void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) {
   8626     GLMessage glmsg;
   8627     GLTraceContext *glContext = getGLTraceContext();
   8628 
   8629     glmsg.set_function(GLMessage::glGetActiveUniformsiv);
   8630 
   8631     // copy argument program
   8632     GLMessage_DataType *arg_program = glmsg.add_args();
   8633     arg_program->set_isarray(false);
   8634     arg_program->set_type(GLMessage::DataType::INT);
   8635     arg_program->add_intvalue(program);
   8636 
   8637     // copy argument uniformCount
   8638     GLMessage_DataType *arg_uniformCount = glmsg.add_args();
   8639     arg_uniformCount->set_isarray(false);
   8640     arg_uniformCount->set_type(GLMessage::DataType::INT);
   8641     arg_uniformCount->add_intvalue(uniformCount);
   8642 
   8643     // copy argument uniformIndices
   8644     GLMessage_DataType *arg_uniformIndices = glmsg.add_args();
   8645     arg_uniformIndices->set_isarray(false);
   8646     arg_uniformIndices->set_type(GLMessage::DataType::INT);
   8647     arg_uniformIndices->add_intvalue((int)uniformIndices);
   8648 
   8649     // copy argument pname
   8650     GLMessage_DataType *arg_pname = glmsg.add_args();
   8651     arg_pname->set_isarray(false);
   8652     arg_pname->set_type(GLMessage::DataType::ENUM);
   8653     arg_pname->add_intvalue((int)pname);
   8654 
   8655     // copy argument params
   8656     GLMessage_DataType *arg_params = glmsg.add_args();
   8657     arg_params->set_isarray(false);
   8658     arg_params->set_type(GLMessage::DataType::INT);
   8659     arg_params->add_intvalue((int)params);
   8660 
   8661     // call function
   8662     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8663     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8664     glContext->hooks->gl.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params);
   8665     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8666     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8667 
   8668     void *pointerArgs[] = {
   8669         (void *) uniformIndices,
   8670         (void *) params,
   8671     };
   8672 
   8673     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8674                               threadStartTime, threadEndTime,
   8675                               &glmsg, pointerArgs);
   8676     glContext->traceGLMessage(&glmsg);
   8677 }
   8678 
   8679 GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) {
   8680     GLMessage glmsg;
   8681     GLTraceContext *glContext = getGLTraceContext();
   8682 
   8683     glmsg.set_function(GLMessage::glGetUniformBlockIndex);
   8684 
   8685     // copy argument program
   8686     GLMessage_DataType *arg_program = glmsg.add_args();
   8687     arg_program->set_isarray(false);
   8688     arg_program->set_type(GLMessage::DataType::INT);
   8689     arg_program->add_intvalue(program);
   8690 
   8691     // copy argument uniformBlockName
   8692     GLMessage_DataType *arg_uniformBlockName = glmsg.add_args();
   8693     arg_uniformBlockName->set_isarray(false);
   8694     arg_uniformBlockName->set_type(GLMessage::DataType::INT);
   8695     arg_uniformBlockName->add_intvalue((int)uniformBlockName);
   8696 
   8697     // call function
   8698     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8699     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8700     GLuint retValue = glContext->hooks->gl.glGetUniformBlockIndex(program, uniformBlockName);
   8701     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8702     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8703 
   8704     // set return value
   8705     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   8706     rt->set_isarray(false);
   8707     rt->set_type(GLMessage::DataType::INT);
   8708     rt->add_intvalue(retValue);
   8709 
   8710     void *pointerArgs[] = {
   8711         (void *) uniformBlockName,
   8712     };
   8713 
   8714     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8715                               threadStartTime, threadEndTime,
   8716                               &glmsg, pointerArgs);
   8717     glContext->traceGLMessage(&glmsg);
   8718 
   8719     return retValue;
   8720 }
   8721 
   8722 void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) {
   8723     GLMessage glmsg;
   8724     GLTraceContext *glContext = getGLTraceContext();
   8725 
   8726     glmsg.set_function(GLMessage::glGetActiveUniformBlockiv);
   8727 
   8728     // copy argument program
   8729     GLMessage_DataType *arg_program = glmsg.add_args();
   8730     arg_program->set_isarray(false);
   8731     arg_program->set_type(GLMessage::DataType::INT);
   8732     arg_program->add_intvalue(program);
   8733 
   8734     // copy argument uniformBlockIndex
   8735     GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args();
   8736     arg_uniformBlockIndex->set_isarray(false);
   8737     arg_uniformBlockIndex->set_type(GLMessage::DataType::INT);
   8738     arg_uniformBlockIndex->add_intvalue(uniformBlockIndex);
   8739 
   8740     // copy argument pname
   8741     GLMessage_DataType *arg_pname = glmsg.add_args();
   8742     arg_pname->set_isarray(false);
   8743     arg_pname->set_type(GLMessage::DataType::ENUM);
   8744     arg_pname->add_intvalue((int)pname);
   8745 
   8746     // copy argument params
   8747     GLMessage_DataType *arg_params = glmsg.add_args();
   8748     arg_params->set_isarray(false);
   8749     arg_params->set_type(GLMessage::DataType::INT);
   8750     arg_params->add_intvalue((int)params);
   8751 
   8752     // call function
   8753     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8754     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8755     glContext->hooks->gl.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params);
   8756     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8757     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8758 
   8759     void *pointerArgs[] = {
   8760         (void *) params,
   8761     };
   8762 
   8763     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8764                               threadStartTime, threadEndTime,
   8765                               &glmsg, pointerArgs);
   8766     glContext->traceGLMessage(&glmsg);
   8767 }
   8768 
   8769 void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) {
   8770     GLMessage glmsg;
   8771     GLTraceContext *glContext = getGLTraceContext();
   8772 
   8773     glmsg.set_function(GLMessage::glGetActiveUniformBlockName);
   8774 
   8775     // copy argument program
   8776     GLMessage_DataType *arg_program = glmsg.add_args();
   8777     arg_program->set_isarray(false);
   8778     arg_program->set_type(GLMessage::DataType::INT);
   8779     arg_program->add_intvalue(program);
   8780 
   8781     // copy argument uniformBlockIndex
   8782     GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args();
   8783     arg_uniformBlockIndex->set_isarray(false);
   8784     arg_uniformBlockIndex->set_type(GLMessage::DataType::INT);
   8785     arg_uniformBlockIndex->add_intvalue(uniformBlockIndex);
   8786 
   8787     // copy argument bufSize
   8788     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   8789     arg_bufSize->set_isarray(false);
   8790     arg_bufSize->set_type(GLMessage::DataType::INT);
   8791     arg_bufSize->add_intvalue(bufSize);
   8792 
   8793     // copy argument length
   8794     GLMessage_DataType *arg_length = glmsg.add_args();
   8795     arg_length->set_isarray(false);
   8796     arg_length->set_type(GLMessage::DataType::INT);
   8797     arg_length->add_intvalue((int)length);
   8798 
   8799     // copy argument uniformBlockName
   8800     GLMessage_DataType *arg_uniformBlockName = glmsg.add_args();
   8801     arg_uniformBlockName->set_isarray(false);
   8802     arg_uniformBlockName->set_type(GLMessage::DataType::INT);
   8803     arg_uniformBlockName->add_intvalue((int)uniformBlockName);
   8804 
   8805     // call function
   8806     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8807     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8808     glContext->hooks->gl.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName);
   8809     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8810     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8811 
   8812     void *pointerArgs[] = {
   8813         (void *) length,
   8814         (void *) uniformBlockName,
   8815     };
   8816 
   8817     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8818                               threadStartTime, threadEndTime,
   8819                               &glmsg, pointerArgs);
   8820     glContext->traceGLMessage(&glmsg);
   8821 }
   8822 
   8823 void GLTrace_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) {
   8824     GLMessage glmsg;
   8825     GLTraceContext *glContext = getGLTraceContext();
   8826 
   8827     glmsg.set_function(GLMessage::glUniformBlockBinding);
   8828 
   8829     // copy argument program
   8830     GLMessage_DataType *arg_program = glmsg.add_args();
   8831     arg_program->set_isarray(false);
   8832     arg_program->set_type(GLMessage::DataType::INT);
   8833     arg_program->add_intvalue(program);
   8834 
   8835     // copy argument uniformBlockIndex
   8836     GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args();
   8837     arg_uniformBlockIndex->set_isarray(false);
   8838     arg_uniformBlockIndex->set_type(GLMessage::DataType::INT);
   8839     arg_uniformBlockIndex->add_intvalue(uniformBlockIndex);
   8840 
   8841     // copy argument uniformBlockBinding
   8842     GLMessage_DataType *arg_uniformBlockBinding = glmsg.add_args();
   8843     arg_uniformBlockBinding->set_isarray(false);
   8844     arg_uniformBlockBinding->set_type(GLMessage::DataType::INT);
   8845     arg_uniformBlockBinding->add_intvalue(uniformBlockBinding);
   8846 
   8847     // call function
   8848     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8849     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8850     glContext->hooks->gl.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
   8851     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8852     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8853 
   8854     void *pointerArgs[] = {
   8855     };
   8856 
   8857     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8858                               threadStartTime, threadEndTime,
   8859                               &glmsg, pointerArgs);
   8860     glContext->traceGLMessage(&glmsg);
   8861 }
   8862 
   8863 void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) {
   8864     GLMessage glmsg;
   8865     GLTraceContext *glContext = getGLTraceContext();
   8866 
   8867     glmsg.set_function(GLMessage::glDrawArraysInstanced);
   8868 
   8869     // copy argument mode
   8870     GLMessage_DataType *arg_mode = glmsg.add_args();
   8871     arg_mode->set_isarray(false);
   8872     arg_mode->set_type(GLMessage::DataType::ENUM);
   8873     arg_mode->add_intvalue((int)mode);
   8874 
   8875     // copy argument first
   8876     GLMessage_DataType *arg_first = glmsg.add_args();
   8877     arg_first->set_isarray(false);
   8878     arg_first->set_type(GLMessage::DataType::INT);
   8879     arg_first->add_intvalue(first);
   8880 
   8881     // copy argument count
   8882     GLMessage_DataType *arg_count = glmsg.add_args();
   8883     arg_count->set_isarray(false);
   8884     arg_count->set_type(GLMessage::DataType::INT);
   8885     arg_count->add_intvalue(count);
   8886 
   8887     // copy argument instanceCount
   8888     GLMessage_DataType *arg_instanceCount = glmsg.add_args();
   8889     arg_instanceCount->set_isarray(false);
   8890     arg_instanceCount->set_type(GLMessage::DataType::INT);
   8891     arg_instanceCount->add_intvalue(instanceCount);
   8892 
   8893     // call function
   8894     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8895     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8896     glContext->hooks->gl.glDrawArraysInstanced(mode, first, count, instanceCount);
   8897     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8898     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8899 
   8900     void *pointerArgs[] = {
   8901     };
   8902 
   8903     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8904                               threadStartTime, threadEndTime,
   8905                               &glmsg, pointerArgs);
   8906     glContext->traceGLMessage(&glmsg);
   8907 }
   8908 
   8909 void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) {
   8910     GLMessage glmsg;
   8911     GLTraceContext *glContext = getGLTraceContext();
   8912 
   8913     glmsg.set_function(GLMessage::glDrawElementsInstanced);
   8914 
   8915     // copy argument mode
   8916     GLMessage_DataType *arg_mode = glmsg.add_args();
   8917     arg_mode->set_isarray(false);
   8918     arg_mode->set_type(GLMessage::DataType::ENUM);
   8919     arg_mode->add_intvalue((int)mode);
   8920 
   8921     // copy argument count
   8922     GLMessage_DataType *arg_count = glmsg.add_args();
   8923     arg_count->set_isarray(false);
   8924     arg_count->set_type(GLMessage::DataType::INT);
   8925     arg_count->add_intvalue(count);
   8926 
   8927     // copy argument type
   8928     GLMessage_DataType *arg_type = glmsg.add_args();
   8929     arg_type->set_isarray(false);
   8930     arg_type->set_type(GLMessage::DataType::ENUM);
   8931     arg_type->add_intvalue((int)type);
   8932 
   8933     // copy argument indices
   8934     GLMessage_DataType *arg_indices = glmsg.add_args();
   8935     arg_indices->set_isarray(false);
   8936     arg_indices->set_type(GLMessage::DataType::INT);
   8937     arg_indices->add_intvalue((int)indices);
   8938 
   8939     // copy argument instanceCount
   8940     GLMessage_DataType *arg_instanceCount = glmsg.add_args();
   8941     arg_instanceCount->set_isarray(false);
   8942     arg_instanceCount->set_type(GLMessage::DataType::INT);
   8943     arg_instanceCount->add_intvalue(instanceCount);
   8944 
   8945     // call function
   8946     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8947     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8948     glContext->hooks->gl.glDrawElementsInstanced(mode, count, type, indices, instanceCount);
   8949     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8950     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8951 
   8952     void *pointerArgs[] = {
   8953         (void *) indices,
   8954     };
   8955 
   8956     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8957                               threadStartTime, threadEndTime,
   8958                               &glmsg, pointerArgs);
   8959     glContext->traceGLMessage(&glmsg);
   8960 }
   8961 
   8962 GLsync GLTrace_glFenceSync(GLenum condition, GLbitfield flags) {
   8963     GLMessage glmsg;
   8964     GLTraceContext *glContext = getGLTraceContext();
   8965 
   8966     glmsg.set_function(GLMessage::glFenceSync);
   8967 
   8968     // copy argument condition
   8969     GLMessage_DataType *arg_condition = glmsg.add_args();
   8970     arg_condition->set_isarray(false);
   8971     arg_condition->set_type(GLMessage::DataType::ENUM);
   8972     arg_condition->add_intvalue((int)condition);
   8973 
   8974     // copy argument flags
   8975     GLMessage_DataType *arg_flags = glmsg.add_args();
   8976     arg_flags->set_isarray(false);
   8977     arg_flags->set_type(GLMessage::DataType::INT);
   8978     arg_flags->add_intvalue(flags);
   8979 
   8980     // call function
   8981     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8982     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   8983     GLsync retValue = glContext->hooks->gl.glFenceSync(condition, flags);
   8984     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   8985     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   8986 
   8987     // set return value
   8988     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   8989     rt->set_isarray(false);
   8990     rt->set_type(GLMessage::DataType::INT);
   8991     rt->add_intvalue((int)retValue);
   8992 
   8993     void *pointerArgs[] = {
   8994         (void *) retValue,
   8995     };
   8996 
   8997     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   8998                               threadStartTime, threadEndTime,
   8999                               &glmsg, pointerArgs);
   9000     glContext->traceGLMessage(&glmsg);
   9001 
   9002     return retValue;
   9003 }
   9004 
   9005 GLboolean GLTrace_glIsSync(GLsync sync) {
   9006     GLMessage glmsg;
   9007     GLTraceContext *glContext = getGLTraceContext();
   9008 
   9009     glmsg.set_function(GLMessage::glIsSync);
   9010 
   9011     // copy argument sync
   9012     GLMessage_DataType *arg_sync = glmsg.add_args();
   9013     arg_sync->set_isarray(false);
   9014     arg_sync->set_type(GLMessage::DataType::INT);
   9015     arg_sync->add_intvalue((int)sync);
   9016 
   9017     // call function
   9018     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9019     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9020     GLboolean retValue = glContext->hooks->gl.glIsSync(sync);
   9021     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9022     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9023 
   9024     // set return value
   9025     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   9026     rt->set_isarray(false);
   9027     rt->set_type(GLMessage::DataType::BOOL);
   9028     rt->add_boolvalue(retValue);
   9029 
   9030     void *pointerArgs[] = {
   9031         (void *) sync,
   9032     };
   9033 
   9034     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9035                               threadStartTime, threadEndTime,
   9036                               &glmsg, pointerArgs);
   9037     glContext->traceGLMessage(&glmsg);
   9038 
   9039     return retValue;
   9040 }
   9041 
   9042 void GLTrace_glDeleteSync(GLsync sync) {
   9043     GLMessage glmsg;
   9044     GLTraceContext *glContext = getGLTraceContext();
   9045 
   9046     glmsg.set_function(GLMessage::glDeleteSync);
   9047 
   9048     // copy argument sync
   9049     GLMessage_DataType *arg_sync = glmsg.add_args();
   9050     arg_sync->set_isarray(false);
   9051     arg_sync->set_type(GLMessage::DataType::INT);
   9052     arg_sync->add_intvalue((int)sync);
   9053 
   9054     // call function
   9055     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9056     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9057     glContext->hooks->gl.glDeleteSync(sync);
   9058     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9059     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9060 
   9061     void *pointerArgs[] = {
   9062         (void *) sync,
   9063     };
   9064 
   9065     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9066                               threadStartTime, threadEndTime,
   9067                               &glmsg, pointerArgs);
   9068     glContext->traceGLMessage(&glmsg);
   9069 }
   9070 
   9071 GLenum GLTrace_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) {
   9072     GLMessage glmsg;
   9073     GLTraceContext *glContext = getGLTraceContext();
   9074 
   9075     glmsg.set_function(GLMessage::glClientWaitSync);
   9076 
   9077     // copy argument sync
   9078     GLMessage_DataType *arg_sync = glmsg.add_args();
   9079     arg_sync->set_isarray(false);
   9080     arg_sync->set_type(GLMessage::DataType::INT);
   9081     arg_sync->add_intvalue((int)sync);
   9082 
   9083     // copy argument flags
   9084     GLMessage_DataType *arg_flags = glmsg.add_args();
   9085     arg_flags->set_isarray(false);
   9086     arg_flags->set_type(GLMessage::DataType::INT);
   9087     arg_flags->add_intvalue(flags);
   9088 
   9089     // copy argument timeout
   9090     GLMessage_DataType *arg_timeout = glmsg.add_args();
   9091     arg_timeout->set_isarray(false);
   9092     arg_timeout->set_type(GLMessage::DataType::INT64);
   9093     arg_timeout->add_int64value(timeout);
   9094 
   9095     // call function
   9096     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9097     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9098     GLenum retValue = glContext->hooks->gl.glClientWaitSync(sync, flags, timeout);
   9099     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9100     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9101 
   9102     // set return value
   9103     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   9104     rt->set_isarray(false);
   9105     rt->set_type(GLMessage::DataType::ENUM);
   9106     rt->add_intvalue((int)retValue);
   9107 
   9108     void *pointerArgs[] = {
   9109         (void *) sync,
   9110     };
   9111 
   9112     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9113                               threadStartTime, threadEndTime,
   9114                               &glmsg, pointerArgs);
   9115     glContext->traceGLMessage(&glmsg);
   9116 
   9117     return retValue;
   9118 }
   9119 
   9120 void GLTrace_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) {
   9121     GLMessage glmsg;
   9122     GLTraceContext *glContext = getGLTraceContext();
   9123 
   9124     glmsg.set_function(GLMessage::glWaitSync);
   9125 
   9126     // copy argument sync
   9127     GLMessage_DataType *arg_sync = glmsg.add_args();
   9128     arg_sync->set_isarray(false);
   9129     arg_sync->set_type(GLMessage::DataType::INT);
   9130     arg_sync->add_intvalue((int)sync);
   9131 
   9132     // copy argument flags
   9133     GLMessage_DataType *arg_flags = glmsg.add_args();
   9134     arg_flags->set_isarray(false);
   9135     arg_flags->set_type(GLMessage::DataType::INT);
   9136     arg_flags->add_intvalue(flags);
   9137 
   9138     // copy argument timeout
   9139     GLMessage_DataType *arg_timeout = glmsg.add_args();
   9140     arg_timeout->set_isarray(false);
   9141     arg_timeout->set_type(GLMessage::DataType::INT64);
   9142     arg_timeout->add_int64value(timeout);
   9143 
   9144     // call function
   9145     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9146     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9147     glContext->hooks->gl.glWaitSync(sync, flags, timeout);
   9148     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9149     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9150 
   9151     void *pointerArgs[] = {
   9152         (void *) sync,
   9153     };
   9154 
   9155     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9156                               threadStartTime, threadEndTime,
   9157                               &glmsg, pointerArgs);
   9158     glContext->traceGLMessage(&glmsg);
   9159 }
   9160 
   9161 void GLTrace_glGetInteger64v(GLenum pname, GLint64* params) {
   9162     GLMessage glmsg;
   9163     GLTraceContext *glContext = getGLTraceContext();
   9164 
   9165     glmsg.set_function(GLMessage::glGetInteger64v);
   9166 
   9167     // copy argument pname
   9168     GLMessage_DataType *arg_pname = glmsg.add_args();
   9169     arg_pname->set_isarray(false);
   9170     arg_pname->set_type(GLMessage::DataType::ENUM);
   9171     arg_pname->add_intvalue((int)pname);
   9172 
   9173     // copy argument params
   9174     GLMessage_DataType *arg_params = glmsg.add_args();
   9175     arg_params->set_isarray(false);
   9176     arg_params->set_type(GLMessage::DataType::INT);
   9177     arg_params->add_intvalue((int)params);
   9178 
   9179     // call function
   9180     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9181     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9182     glContext->hooks->gl.glGetInteger64v(pname, params);
   9183     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9184     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9185 
   9186     void *pointerArgs[] = {
   9187         (void *) params,
   9188     };
   9189 
   9190     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9191                               threadStartTime, threadEndTime,
   9192                               &glmsg, pointerArgs);
   9193     glContext->traceGLMessage(&glmsg);
   9194 }
   9195 
   9196 void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) {
   9197     GLMessage glmsg;
   9198     GLTraceContext *glContext = getGLTraceContext();
   9199 
   9200     glmsg.set_function(GLMessage::glGetSynciv);
   9201 
   9202     // copy argument sync
   9203     GLMessage_DataType *arg_sync = glmsg.add_args();
   9204     arg_sync->set_isarray(false);
   9205     arg_sync->set_type(GLMessage::DataType::INT);
   9206     arg_sync->add_intvalue((int)sync);
   9207 
   9208     // copy argument pname
   9209     GLMessage_DataType *arg_pname = glmsg.add_args();
   9210     arg_pname->set_isarray(false);
   9211     arg_pname->set_type(GLMessage::DataType::ENUM);
   9212     arg_pname->add_intvalue((int)pname);
   9213 
   9214     // copy argument bufSize
   9215     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   9216     arg_bufSize->set_isarray(false);
   9217     arg_bufSize->set_type(GLMessage::DataType::INT);
   9218     arg_bufSize->add_intvalue(bufSize);
   9219 
   9220     // copy argument length
   9221     GLMessage_DataType *arg_length = glmsg.add_args();
   9222     arg_length->set_isarray(false);
   9223     arg_length->set_type(GLMessage::DataType::INT);
   9224     arg_length->add_intvalue((int)length);
   9225 
   9226     // copy argument values
   9227     GLMessage_DataType *arg_values = glmsg.add_args();
   9228     arg_values->set_isarray(false);
   9229     arg_values->set_type(GLMessage::DataType::INT);
   9230     arg_values->add_intvalue((int)values);
   9231 
   9232     // call function
   9233     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9234     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9235     glContext->hooks->gl.glGetSynciv(sync, pname, bufSize, length, values);
   9236     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9237     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9238 
   9239     void *pointerArgs[] = {
   9240         (void *) sync,
   9241         (void *) length,
   9242         (void *) values,
   9243     };
   9244 
   9245     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9246                               threadStartTime, threadEndTime,
   9247                               &glmsg, pointerArgs);
   9248     glContext->traceGLMessage(&glmsg);
   9249 }
   9250 
   9251 void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) {
   9252     GLMessage glmsg;
   9253     GLTraceContext *glContext = getGLTraceContext();
   9254 
   9255     glmsg.set_function(GLMessage::glGetInteger64i_v);
   9256 
   9257     // copy argument target
   9258     GLMessage_DataType *arg_target = glmsg.add_args();
   9259     arg_target->set_isarray(false);
   9260     arg_target->set_type(GLMessage::DataType::ENUM);
   9261     arg_target->add_intvalue((int)target);
   9262 
   9263     // copy argument index
   9264     GLMessage_DataType *arg_index = glmsg.add_args();
   9265     arg_index->set_isarray(false);
   9266     arg_index->set_type(GLMessage::DataType::INT);
   9267     arg_index->add_intvalue(index);
   9268 
   9269     // copy argument data
   9270     GLMessage_DataType *arg_data = glmsg.add_args();
   9271     arg_data->set_isarray(false);
   9272     arg_data->set_type(GLMessage::DataType::INT);
   9273     arg_data->add_intvalue((int)data);
   9274 
   9275     // call function
   9276     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9277     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9278     glContext->hooks->gl.glGetInteger64i_v(target, index, data);
   9279     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9280     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9281 
   9282     void *pointerArgs[] = {
   9283         (void *) data,
   9284     };
   9285 
   9286     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9287                               threadStartTime, threadEndTime,
   9288                               &glmsg, pointerArgs);
   9289     glContext->traceGLMessage(&glmsg);
   9290 }
   9291 
   9292 void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) {
   9293     GLMessage glmsg;
   9294     GLTraceContext *glContext = getGLTraceContext();
   9295 
   9296     glmsg.set_function(GLMessage::glGetBufferParameteri64v);
   9297 
   9298     // copy argument target
   9299     GLMessage_DataType *arg_target = glmsg.add_args();
   9300     arg_target->set_isarray(false);
   9301     arg_target->set_type(GLMessage::DataType::ENUM);
   9302     arg_target->add_intvalue((int)target);
   9303 
   9304     // copy argument pname
   9305     GLMessage_DataType *arg_pname = glmsg.add_args();
   9306     arg_pname->set_isarray(false);
   9307     arg_pname->set_type(GLMessage::DataType::ENUM);
   9308     arg_pname->add_intvalue((int)pname);
   9309 
   9310     // copy argument params
   9311     GLMessage_DataType *arg_params = glmsg.add_args();
   9312     arg_params->set_isarray(false);
   9313     arg_params->set_type(GLMessage::DataType::INT);
   9314     arg_params->add_intvalue((int)params);
   9315 
   9316     // call function
   9317     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9318     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9319     glContext->hooks->gl.glGetBufferParameteri64v(target, pname, params);
   9320     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9321     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9322 
   9323     void *pointerArgs[] = {
   9324         (void *) params,
   9325     };
   9326 
   9327     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9328                               threadStartTime, threadEndTime,
   9329                               &glmsg, pointerArgs);
   9330     glContext->traceGLMessage(&glmsg);
   9331 }
   9332 
   9333 void GLTrace_glGenSamplers(GLsizei count, GLuint* samplers) {
   9334     GLMessage glmsg;
   9335     GLTraceContext *glContext = getGLTraceContext();
   9336 
   9337     glmsg.set_function(GLMessage::glGenSamplers);
   9338 
   9339     // copy argument count
   9340     GLMessage_DataType *arg_count = glmsg.add_args();
   9341     arg_count->set_isarray(false);
   9342     arg_count->set_type(GLMessage::DataType::INT);
   9343     arg_count->add_intvalue(count);
   9344 
   9345     // copy argument samplers
   9346     GLMessage_DataType *arg_samplers = glmsg.add_args();
   9347     arg_samplers->set_isarray(false);
   9348     arg_samplers->set_type(GLMessage::DataType::INT);
   9349     arg_samplers->add_intvalue((int)samplers);
   9350 
   9351     // call function
   9352     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9353     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9354     glContext->hooks->gl.glGenSamplers(count, samplers);
   9355     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9356     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9357 
   9358     void *pointerArgs[] = {
   9359         (void *) samplers,
   9360     };
   9361 
   9362     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9363                               threadStartTime, threadEndTime,
   9364                               &glmsg, pointerArgs);
   9365     glContext->traceGLMessage(&glmsg);
   9366 }
   9367 
   9368 void GLTrace_glDeleteSamplers(GLsizei count, const GLuint* samplers) {
   9369     GLMessage glmsg;
   9370     GLTraceContext *glContext = getGLTraceContext();
   9371 
   9372     glmsg.set_function(GLMessage::glDeleteSamplers);
   9373 
   9374     // copy argument count
   9375     GLMessage_DataType *arg_count = glmsg.add_args();
   9376     arg_count->set_isarray(false);
   9377     arg_count->set_type(GLMessage::DataType::INT);
   9378     arg_count->add_intvalue(count);
   9379 
   9380     // copy argument samplers
   9381     GLMessage_DataType *arg_samplers = glmsg.add_args();
   9382     arg_samplers->set_isarray(false);
   9383     arg_samplers->set_type(GLMessage::DataType::INT);
   9384     arg_samplers->add_intvalue((int)samplers);
   9385 
   9386     // call function
   9387     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9388     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9389     glContext->hooks->gl.glDeleteSamplers(count, samplers);
   9390     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9391     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9392 
   9393     void *pointerArgs[] = {
   9394         (void *) samplers,
   9395     };
   9396 
   9397     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9398                               threadStartTime, threadEndTime,
   9399                               &glmsg, pointerArgs);
   9400     glContext->traceGLMessage(&glmsg);
   9401 }
   9402 
   9403 GLboolean GLTrace_glIsSampler(GLuint sampler) {
   9404     GLMessage glmsg;
   9405     GLTraceContext *glContext = getGLTraceContext();
   9406 
   9407     glmsg.set_function(GLMessage::glIsSampler);
   9408 
   9409     // copy argument sampler
   9410     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9411     arg_sampler->set_isarray(false);
   9412     arg_sampler->set_type(GLMessage::DataType::INT);
   9413     arg_sampler->add_intvalue(sampler);
   9414 
   9415     // call function
   9416     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9417     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9418     GLboolean retValue = glContext->hooks->gl.glIsSampler(sampler);
   9419     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9420     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9421 
   9422     // set return value
   9423     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   9424     rt->set_isarray(false);
   9425     rt->set_type(GLMessage::DataType::BOOL);
   9426     rt->add_boolvalue(retValue);
   9427 
   9428     void *pointerArgs[] = {
   9429     };
   9430 
   9431     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9432                               threadStartTime, threadEndTime,
   9433                               &glmsg, pointerArgs);
   9434     glContext->traceGLMessage(&glmsg);
   9435 
   9436     return retValue;
   9437 }
   9438 
   9439 void GLTrace_glBindSampler(GLuint unit, GLuint sampler) {
   9440     GLMessage glmsg;
   9441     GLTraceContext *glContext = getGLTraceContext();
   9442 
   9443     glmsg.set_function(GLMessage::glBindSampler);
   9444 
   9445     // copy argument unit
   9446     GLMessage_DataType *arg_unit = glmsg.add_args();
   9447     arg_unit->set_isarray(false);
   9448     arg_unit->set_type(GLMessage::DataType::INT);
   9449     arg_unit->add_intvalue(unit);
   9450 
   9451     // copy argument sampler
   9452     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9453     arg_sampler->set_isarray(false);
   9454     arg_sampler->set_type(GLMessage::DataType::INT);
   9455     arg_sampler->add_intvalue(sampler);
   9456 
   9457     // call function
   9458     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9459     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9460     glContext->hooks->gl.glBindSampler(unit, sampler);
   9461     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9462     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9463 
   9464     void *pointerArgs[] = {
   9465     };
   9466 
   9467     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9468                               threadStartTime, threadEndTime,
   9469                               &glmsg, pointerArgs);
   9470     glContext->traceGLMessage(&glmsg);
   9471 }
   9472 
   9473 void GLTrace_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) {
   9474     GLMessage glmsg;
   9475     GLTraceContext *glContext = getGLTraceContext();
   9476 
   9477     glmsg.set_function(GLMessage::glSamplerParameteri);
   9478 
   9479     // copy argument sampler
   9480     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9481     arg_sampler->set_isarray(false);
   9482     arg_sampler->set_type(GLMessage::DataType::INT);
   9483     arg_sampler->add_intvalue(sampler);
   9484 
   9485     // copy argument pname
   9486     GLMessage_DataType *arg_pname = glmsg.add_args();
   9487     arg_pname->set_isarray(false);
   9488     arg_pname->set_type(GLMessage::DataType::ENUM);
   9489     arg_pname->add_intvalue((int)pname);
   9490 
   9491     // copy argument param
   9492     GLMessage_DataType *arg_param = glmsg.add_args();
   9493     arg_param->set_isarray(false);
   9494     arg_param->set_type(GLMessage::DataType::INT);
   9495     arg_param->add_intvalue(param);
   9496 
   9497     // call function
   9498     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9499     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9500     glContext->hooks->gl.glSamplerParameteri(sampler, pname, param);
   9501     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9502     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9503 
   9504     void *pointerArgs[] = {
   9505     };
   9506 
   9507     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9508                               threadStartTime, threadEndTime,
   9509                               &glmsg, pointerArgs);
   9510     glContext->traceGLMessage(&glmsg);
   9511 }
   9512 
   9513 void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) {
   9514     GLMessage glmsg;
   9515     GLTraceContext *glContext = getGLTraceContext();
   9516 
   9517     glmsg.set_function(GLMessage::glSamplerParameteriv);
   9518 
   9519     // copy argument sampler
   9520     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9521     arg_sampler->set_isarray(false);
   9522     arg_sampler->set_type(GLMessage::DataType::INT);
   9523     arg_sampler->add_intvalue(sampler);
   9524 
   9525     // copy argument pname
   9526     GLMessage_DataType *arg_pname = glmsg.add_args();
   9527     arg_pname->set_isarray(false);
   9528     arg_pname->set_type(GLMessage::DataType::ENUM);
   9529     arg_pname->add_intvalue((int)pname);
   9530 
   9531     // copy argument param
   9532     GLMessage_DataType *arg_param = glmsg.add_args();
   9533     arg_param->set_isarray(false);
   9534     arg_param->set_type(GLMessage::DataType::INT);
   9535     arg_param->add_intvalue((int)param);
   9536 
   9537     // call function
   9538     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9539     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9540     glContext->hooks->gl.glSamplerParameteriv(sampler, pname, param);
   9541     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9542     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9543 
   9544     void *pointerArgs[] = {
   9545         (void *) param,
   9546     };
   9547 
   9548     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9549                               threadStartTime, threadEndTime,
   9550                               &glmsg, pointerArgs);
   9551     glContext->traceGLMessage(&glmsg);
   9552 }
   9553 
   9554 void GLTrace_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) {
   9555     GLMessage glmsg;
   9556     GLTraceContext *glContext = getGLTraceContext();
   9557 
   9558     glmsg.set_function(GLMessage::glSamplerParameterf);
   9559 
   9560     // copy argument sampler
   9561     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9562     arg_sampler->set_isarray(false);
   9563     arg_sampler->set_type(GLMessage::DataType::INT);
   9564     arg_sampler->add_intvalue(sampler);
   9565 
   9566     // copy argument pname
   9567     GLMessage_DataType *arg_pname = glmsg.add_args();
   9568     arg_pname->set_isarray(false);
   9569     arg_pname->set_type(GLMessage::DataType::ENUM);
   9570     arg_pname->add_intvalue((int)pname);
   9571 
   9572     // copy argument param
   9573     GLMessage_DataType *arg_param = glmsg.add_args();
   9574     arg_param->set_isarray(false);
   9575     arg_param->set_type(GLMessage::DataType::FLOAT);
   9576     arg_param->add_floatvalue(param);
   9577 
   9578     // call function
   9579     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9580     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9581     glContext->hooks->gl.glSamplerParameterf(sampler, pname, param);
   9582     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9583     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9584 
   9585     void *pointerArgs[] = {
   9586     };
   9587 
   9588     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9589                               threadStartTime, threadEndTime,
   9590                               &glmsg, pointerArgs);
   9591     glContext->traceGLMessage(&glmsg);
   9592 }
   9593 
   9594 void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) {
   9595     GLMessage glmsg;
   9596     GLTraceContext *glContext = getGLTraceContext();
   9597 
   9598     glmsg.set_function(GLMessage::glSamplerParameterfv);
   9599 
   9600     // copy argument sampler
   9601     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9602     arg_sampler->set_isarray(false);
   9603     arg_sampler->set_type(GLMessage::DataType::INT);
   9604     arg_sampler->add_intvalue(sampler);
   9605 
   9606     // copy argument pname
   9607     GLMessage_DataType *arg_pname = glmsg.add_args();
   9608     arg_pname->set_isarray(false);
   9609     arg_pname->set_type(GLMessage::DataType::ENUM);
   9610     arg_pname->add_intvalue((int)pname);
   9611 
   9612     // copy argument param
   9613     GLMessage_DataType *arg_param = glmsg.add_args();
   9614     arg_param->set_isarray(false);
   9615     arg_param->set_type(GLMessage::DataType::INT);
   9616     arg_param->add_intvalue((int)param);
   9617 
   9618     // call function
   9619     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9620     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9621     glContext->hooks->gl.glSamplerParameterfv(sampler, pname, param);
   9622     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9623     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9624 
   9625     void *pointerArgs[] = {
   9626         (void *) param,
   9627     };
   9628 
   9629     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9630                               threadStartTime, threadEndTime,
   9631                               &glmsg, pointerArgs);
   9632     glContext->traceGLMessage(&glmsg);
   9633 }
   9634 
   9635 void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) {
   9636     GLMessage glmsg;
   9637     GLTraceContext *glContext = getGLTraceContext();
   9638 
   9639     glmsg.set_function(GLMessage::glGetSamplerParameteriv);
   9640 
   9641     // copy argument sampler
   9642     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9643     arg_sampler->set_isarray(false);
   9644     arg_sampler->set_type(GLMessage::DataType::INT);
   9645     arg_sampler->add_intvalue(sampler);
   9646 
   9647     // copy argument pname
   9648     GLMessage_DataType *arg_pname = glmsg.add_args();
   9649     arg_pname->set_isarray(false);
   9650     arg_pname->set_type(GLMessage::DataType::ENUM);
   9651     arg_pname->add_intvalue((int)pname);
   9652 
   9653     // copy argument params
   9654     GLMessage_DataType *arg_params = glmsg.add_args();
   9655     arg_params->set_isarray(false);
   9656     arg_params->set_type(GLMessage::DataType::INT);
   9657     arg_params->add_intvalue((int)params);
   9658 
   9659     // call function
   9660     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9661     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9662     glContext->hooks->gl.glGetSamplerParameteriv(sampler, pname, params);
   9663     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9664     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9665 
   9666     void *pointerArgs[] = {
   9667         (void *) params,
   9668     };
   9669 
   9670     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9671                               threadStartTime, threadEndTime,
   9672                               &glmsg, pointerArgs);
   9673     glContext->traceGLMessage(&glmsg);
   9674 }
   9675 
   9676 void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) {
   9677     GLMessage glmsg;
   9678     GLTraceContext *glContext = getGLTraceContext();
   9679 
   9680     glmsg.set_function(GLMessage::glGetSamplerParameterfv);
   9681 
   9682     // copy argument sampler
   9683     GLMessage_DataType *arg_sampler = glmsg.add_args();
   9684     arg_sampler->set_isarray(false);
   9685     arg_sampler->set_type(GLMessage::DataType::INT);
   9686     arg_sampler->add_intvalue(sampler);
   9687 
   9688     // copy argument pname
   9689     GLMessage_DataType *arg_pname = glmsg.add_args();
   9690     arg_pname->set_isarray(false);
   9691     arg_pname->set_type(GLMessage::DataType::ENUM);
   9692     arg_pname->add_intvalue((int)pname);
   9693 
   9694     // copy argument params
   9695     GLMessage_DataType *arg_params = glmsg.add_args();
   9696     arg_params->set_isarray(false);
   9697     arg_params->set_type(GLMessage::DataType::INT);
   9698     arg_params->add_intvalue((int)params);
   9699 
   9700     // call function
   9701     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9702     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9703     glContext->hooks->gl.glGetSamplerParameterfv(sampler, pname, params);
   9704     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9705     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9706 
   9707     void *pointerArgs[] = {
   9708         (void *) params,
   9709     };
   9710 
   9711     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9712                               threadStartTime, threadEndTime,
   9713                               &glmsg, pointerArgs);
   9714     glContext->traceGLMessage(&glmsg);
   9715 }
   9716 
   9717 void GLTrace_glVertexAttribDivisor(GLuint index, GLuint divisor) {
   9718     GLMessage glmsg;
   9719     GLTraceContext *glContext = getGLTraceContext();
   9720 
   9721     glmsg.set_function(GLMessage::glVertexAttribDivisor);
   9722 
   9723     // copy argument index
   9724     GLMessage_DataType *arg_index = glmsg.add_args();
   9725     arg_index->set_isarray(false);
   9726     arg_index->set_type(GLMessage::DataType::INT);
   9727     arg_index->add_intvalue(index);
   9728 
   9729     // copy argument divisor
   9730     GLMessage_DataType *arg_divisor = glmsg.add_args();
   9731     arg_divisor->set_isarray(false);
   9732     arg_divisor->set_type(GLMessage::DataType::INT);
   9733     arg_divisor->add_intvalue(divisor);
   9734 
   9735     // call function
   9736     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9737     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9738     glContext->hooks->gl.glVertexAttribDivisor(index, divisor);
   9739     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9740     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9741 
   9742     void *pointerArgs[] = {
   9743     };
   9744 
   9745     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9746                               threadStartTime, threadEndTime,
   9747                               &glmsg, pointerArgs);
   9748     glContext->traceGLMessage(&glmsg);
   9749 }
   9750 
   9751 void GLTrace_glBindTransformFeedback(GLenum target, GLuint id) {
   9752     GLMessage glmsg;
   9753     GLTraceContext *glContext = getGLTraceContext();
   9754 
   9755     glmsg.set_function(GLMessage::glBindTransformFeedback);
   9756 
   9757     // copy argument target
   9758     GLMessage_DataType *arg_target = glmsg.add_args();
   9759     arg_target->set_isarray(false);
   9760     arg_target->set_type(GLMessage::DataType::ENUM);
   9761     arg_target->add_intvalue((int)target);
   9762 
   9763     // copy argument id
   9764     GLMessage_DataType *arg_id = glmsg.add_args();
   9765     arg_id->set_isarray(false);
   9766     arg_id->set_type(GLMessage::DataType::INT);
   9767     arg_id->add_intvalue(id);
   9768 
   9769     // call function
   9770     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9771     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9772     glContext->hooks->gl.glBindTransformFeedback(target, id);
   9773     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9774     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9775 
   9776     void *pointerArgs[] = {
   9777     };
   9778 
   9779     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9780                               threadStartTime, threadEndTime,
   9781                               &glmsg, pointerArgs);
   9782     glContext->traceGLMessage(&glmsg);
   9783 }
   9784 
   9785 void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) {
   9786     GLMessage glmsg;
   9787     GLTraceContext *glContext = getGLTraceContext();
   9788 
   9789     glmsg.set_function(GLMessage::glDeleteTransformFeedbacks);
   9790 
   9791     // copy argument n
   9792     GLMessage_DataType *arg_n = glmsg.add_args();
   9793     arg_n->set_isarray(false);
   9794     arg_n->set_type(GLMessage::DataType::INT);
   9795     arg_n->add_intvalue(n);
   9796 
   9797     // copy argument ids
   9798     GLMessage_DataType *arg_ids = glmsg.add_args();
   9799     arg_ids->set_isarray(false);
   9800     arg_ids->set_type(GLMessage::DataType::INT);
   9801     arg_ids->add_intvalue((int)ids);
   9802 
   9803     // call function
   9804     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9805     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9806     glContext->hooks->gl.glDeleteTransformFeedbacks(n, ids);
   9807     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9808     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9809 
   9810     void *pointerArgs[] = {
   9811         (void *) ids,
   9812     };
   9813 
   9814     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9815                               threadStartTime, threadEndTime,
   9816                               &glmsg, pointerArgs);
   9817     glContext->traceGLMessage(&glmsg);
   9818 }
   9819 
   9820 void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint* ids) {
   9821     GLMessage glmsg;
   9822     GLTraceContext *glContext = getGLTraceContext();
   9823 
   9824     glmsg.set_function(GLMessage::glGenTransformFeedbacks);
   9825 
   9826     // copy argument n
   9827     GLMessage_DataType *arg_n = glmsg.add_args();
   9828     arg_n->set_isarray(false);
   9829     arg_n->set_type(GLMessage::DataType::INT);
   9830     arg_n->add_intvalue(n);
   9831 
   9832     // copy argument ids
   9833     GLMessage_DataType *arg_ids = glmsg.add_args();
   9834     arg_ids->set_isarray(false);
   9835     arg_ids->set_type(GLMessage::DataType::INT);
   9836     arg_ids->add_intvalue((int)ids);
   9837 
   9838     // call function
   9839     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9840     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9841     glContext->hooks->gl.glGenTransformFeedbacks(n, ids);
   9842     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9843     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9844 
   9845     void *pointerArgs[] = {
   9846         (void *) ids,
   9847     };
   9848 
   9849     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9850                               threadStartTime, threadEndTime,
   9851                               &glmsg, pointerArgs);
   9852     glContext->traceGLMessage(&glmsg);
   9853 }
   9854 
   9855 GLboolean GLTrace_glIsTransformFeedback(GLuint id) {
   9856     GLMessage glmsg;
   9857     GLTraceContext *glContext = getGLTraceContext();
   9858 
   9859     glmsg.set_function(GLMessage::glIsTransformFeedback);
   9860 
   9861     // copy argument id
   9862     GLMessage_DataType *arg_id = glmsg.add_args();
   9863     arg_id->set_isarray(false);
   9864     arg_id->set_type(GLMessage::DataType::INT);
   9865     arg_id->add_intvalue(id);
   9866 
   9867     // call function
   9868     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9869     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9870     GLboolean retValue = glContext->hooks->gl.glIsTransformFeedback(id);
   9871     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9872     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9873 
   9874     // set return value
   9875     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   9876     rt->set_isarray(false);
   9877     rt->set_type(GLMessage::DataType::BOOL);
   9878     rt->add_boolvalue(retValue);
   9879 
   9880     void *pointerArgs[] = {
   9881     };
   9882 
   9883     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9884                               threadStartTime, threadEndTime,
   9885                               &glmsg, pointerArgs);
   9886     glContext->traceGLMessage(&glmsg);
   9887 
   9888     return retValue;
   9889 }
   9890 
   9891 void GLTrace_glPauseTransformFeedback(void) {
   9892     GLMessage glmsg;
   9893     GLTraceContext *glContext = getGLTraceContext();
   9894 
   9895     glmsg.set_function(GLMessage::glPauseTransformFeedback);
   9896 
   9897     // call function
   9898     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9899     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9900     glContext->hooks->gl.glPauseTransformFeedback();
   9901     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9902     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9903 
   9904     void *pointerArgs[] = {
   9905     };
   9906 
   9907     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9908                               threadStartTime, threadEndTime,
   9909                               &glmsg, pointerArgs);
   9910     glContext->traceGLMessage(&glmsg);
   9911 }
   9912 
   9913 void GLTrace_glResumeTransformFeedback(void) {
   9914     GLMessage glmsg;
   9915     GLTraceContext *glContext = getGLTraceContext();
   9916 
   9917     glmsg.set_function(GLMessage::glResumeTransformFeedback);
   9918 
   9919     // call function
   9920     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9921     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9922     glContext->hooks->gl.glResumeTransformFeedback();
   9923     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9924     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9925 
   9926     void *pointerArgs[] = {
   9927     };
   9928 
   9929     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9930                               threadStartTime, threadEndTime,
   9931                               &glmsg, pointerArgs);
   9932     glContext->traceGLMessage(&glmsg);
   9933 }
   9934 
   9935 void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) {
   9936     GLMessage glmsg;
   9937     GLTraceContext *glContext = getGLTraceContext();
   9938 
   9939     glmsg.set_function(GLMessage::glGetProgramBinary);
   9940 
   9941     // copy argument program
   9942     GLMessage_DataType *arg_program = glmsg.add_args();
   9943     arg_program->set_isarray(false);
   9944     arg_program->set_type(GLMessage::DataType::INT);
   9945     arg_program->add_intvalue(program);
   9946 
   9947     // copy argument bufSize
   9948     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   9949     arg_bufSize->set_isarray(false);
   9950     arg_bufSize->set_type(GLMessage::DataType::INT);
   9951     arg_bufSize->add_intvalue(bufSize);
   9952 
   9953     // copy argument length
   9954     GLMessage_DataType *arg_length = glmsg.add_args();
   9955     arg_length->set_isarray(false);
   9956     arg_length->set_type(GLMessage::DataType::INT);
   9957     arg_length->add_intvalue((int)length);
   9958 
   9959     // copy argument binaryFormat
   9960     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
   9961     arg_binaryFormat->set_isarray(false);
   9962     arg_binaryFormat->set_type(GLMessage::DataType::INT);
   9963     arg_binaryFormat->add_intvalue((int)binaryFormat);
   9964 
   9965     // copy argument binary
   9966     GLMessage_DataType *arg_binary = glmsg.add_args();
   9967     arg_binary->set_isarray(false);
   9968     arg_binary->set_type(GLMessage::DataType::INT);
   9969     arg_binary->add_intvalue((int)binary);
   9970 
   9971     // call function
   9972     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9973     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   9974     glContext->hooks->gl.glGetProgramBinary(program, bufSize, length, binaryFormat, binary);
   9975     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   9976     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   9977 
   9978     void *pointerArgs[] = {
   9979         (void *) length,
   9980         (void *) binaryFormat,
   9981         (void *) binary,
   9982     };
   9983 
   9984     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   9985                               threadStartTime, threadEndTime,
   9986                               &glmsg, pointerArgs);
   9987     glContext->traceGLMessage(&glmsg);
   9988 }
   9989 
   9990 void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) {
   9991     GLMessage glmsg;
   9992     GLTraceContext *glContext = getGLTraceContext();
   9993 
   9994     glmsg.set_function(GLMessage::glProgramBinary);
   9995 
   9996     // copy argument program
   9997     GLMessage_DataType *arg_program = glmsg.add_args();
   9998     arg_program->set_isarray(false);
   9999     arg_program->set_type(GLMessage::DataType::INT);
   10000     arg_program->add_intvalue(program);
   10001 
   10002     // copy argument binaryFormat
   10003     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
   10004     arg_binaryFormat->set_isarray(false);
   10005     arg_binaryFormat->set_type(GLMessage::DataType::ENUM);
   10006     arg_binaryFormat->add_intvalue((int)binaryFormat);
   10007 
   10008     // copy argument binary
   10009     GLMessage_DataType *arg_binary = glmsg.add_args();
   10010     arg_binary->set_isarray(false);
   10011     arg_binary->set_type(GLMessage::DataType::INT);
   10012     arg_binary->add_intvalue((int)binary);
   10013 
   10014     // copy argument length
   10015     GLMessage_DataType *arg_length = glmsg.add_args();
   10016     arg_length->set_isarray(false);
   10017     arg_length->set_type(GLMessage::DataType::INT);
   10018     arg_length->add_intvalue(length);
   10019 
   10020     // call function
   10021     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10022     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10023     glContext->hooks->gl.glProgramBinary(program, binaryFormat, binary, length);
   10024     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10025     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10026 
   10027     void *pointerArgs[] = {
   10028         (void *) binary,
   10029     };
   10030 
   10031     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10032                               threadStartTime, threadEndTime,
   10033                               &glmsg, pointerArgs);
   10034     glContext->traceGLMessage(&glmsg);
   10035 }
   10036 
   10037 void GLTrace_glProgramParameteri(GLuint program, GLenum pname, GLint value) {
   10038     GLMessage glmsg;
   10039     GLTraceContext *glContext = getGLTraceContext();
   10040 
   10041     glmsg.set_function(GLMessage::glProgramParameteri);
   10042 
   10043     // copy argument program
   10044     GLMessage_DataType *arg_program = glmsg.add_args();
   10045     arg_program->set_isarray(false);
   10046     arg_program->set_type(GLMessage::DataType::INT);
   10047     arg_program->add_intvalue(program);
   10048 
   10049     // copy argument pname
   10050     GLMessage_DataType *arg_pname = glmsg.add_args();
   10051     arg_pname->set_isarray(false);
   10052     arg_pname->set_type(GLMessage::DataType::ENUM);
   10053     arg_pname->add_intvalue((int)pname);
   10054 
   10055     // copy argument value
   10056     GLMessage_DataType *arg_value = glmsg.add_args();
   10057     arg_value->set_isarray(false);
   10058     arg_value->set_type(GLMessage::DataType::INT);
   10059     arg_value->add_intvalue(value);
   10060 
   10061     // call function
   10062     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10063     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10064     glContext->hooks->gl.glProgramParameteri(program, pname, value);
   10065     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10066     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10067 
   10068     void *pointerArgs[] = {
   10069     };
   10070 
   10071     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10072                               threadStartTime, threadEndTime,
   10073                               &glmsg, pointerArgs);
   10074     glContext->traceGLMessage(&glmsg);
   10075 }
   10076 
   10077 void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) {
   10078     GLMessage glmsg;
   10079     GLTraceContext *glContext = getGLTraceContext();
   10080 
   10081     glmsg.set_function(GLMessage::glInvalidateFramebuffer);
   10082 
   10083     // copy argument target
   10084     GLMessage_DataType *arg_target = glmsg.add_args();
   10085     arg_target->set_isarray(false);
   10086     arg_target->set_type(GLMessage::DataType::ENUM);
   10087     arg_target->add_intvalue((int)target);
   10088 
   10089     // copy argument numAttachments
   10090     GLMessage_DataType *arg_numAttachments = glmsg.add_args();
   10091     arg_numAttachments->set_isarray(false);
   10092     arg_numAttachments->set_type(GLMessage::DataType::INT);
   10093     arg_numAttachments->add_intvalue(numAttachments);
   10094 
   10095     // copy argument attachments
   10096     GLMessage_DataType *arg_attachments = glmsg.add_args();
   10097     arg_attachments->set_isarray(false);
   10098     arg_attachments->set_type(GLMessage::DataType::INT);
   10099     arg_attachments->add_intvalue((int)attachments);
   10100 
   10101     // call function
   10102     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10103     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10104     glContext->hooks->gl.glInvalidateFramebuffer(target, numAttachments, attachments);
   10105     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10106     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10107 
   10108     void *pointerArgs[] = {
   10109         (void *) attachments,
   10110     };
   10111 
   10112     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10113                               threadStartTime, threadEndTime,
   10114                               &glmsg, pointerArgs);
   10115     glContext->traceGLMessage(&glmsg);
   10116 }
   10117 
   10118 void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) {
   10119     GLMessage glmsg;
   10120     GLTraceContext *glContext = getGLTraceContext();
   10121 
   10122     glmsg.set_function(GLMessage::glInvalidateSubFramebuffer);
   10123 
   10124     // copy argument target
   10125     GLMessage_DataType *arg_target = glmsg.add_args();
   10126     arg_target->set_isarray(false);
   10127     arg_target->set_type(GLMessage::DataType::ENUM);
   10128     arg_target->add_intvalue((int)target);
   10129 
   10130     // copy argument numAttachments
   10131     GLMessage_DataType *arg_numAttachments = glmsg.add_args();
   10132     arg_numAttachments->set_isarray(false);
   10133     arg_numAttachments->set_type(GLMessage::DataType::INT);
   10134     arg_numAttachments->add_intvalue(numAttachments);
   10135 
   10136     // copy argument attachments
   10137     GLMessage_DataType *arg_attachments = glmsg.add_args();
   10138     arg_attachments->set_isarray(false);
   10139     arg_attachments->set_type(GLMessage::DataType::INT);
   10140     arg_attachments->add_intvalue((int)attachments);
   10141 
   10142     // copy argument x
   10143     GLMessage_DataType *arg_x = glmsg.add_args();
   10144     arg_x->set_isarray(false);
   10145     arg_x->set_type(GLMessage::DataType::INT);
   10146     arg_x->add_intvalue(x);
   10147 
   10148     // copy argument y
   10149     GLMessage_DataType *arg_y = glmsg.add_args();
   10150     arg_y->set_isarray(false);
   10151     arg_y->set_type(GLMessage::DataType::INT);
   10152     arg_y->add_intvalue(y);
   10153 
   10154     // copy argument width
   10155     GLMessage_DataType *arg_width = glmsg.add_args();
   10156     arg_width->set_isarray(false);
   10157     arg_width->set_type(GLMessage::DataType::INT);
   10158     arg_width->add_intvalue(width);
   10159 
   10160     // copy argument height
   10161     GLMessage_DataType *arg_height = glmsg.add_args();
   10162     arg_height->set_isarray(false);
   10163     arg_height->set_type(GLMessage::DataType::INT);
   10164     arg_height->add_intvalue(height);
   10165 
   10166     // call function
   10167     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10168     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10169     glContext->hooks->gl.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height);
   10170     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10171     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10172 
   10173     void *pointerArgs[] = {
   10174         (void *) attachments,
   10175     };
   10176 
   10177     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10178                               threadStartTime, threadEndTime,
   10179                               &glmsg, pointerArgs);
   10180     glContext->traceGLMessage(&glmsg);
   10181 }
   10182 
   10183 void GLTrace_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
   10184     GLMessage glmsg;
   10185     GLTraceContext *glContext = getGLTraceContext();
   10186 
   10187     glmsg.set_function(GLMessage::glTexStorage2D);
   10188 
   10189     // copy argument target
   10190     GLMessage_DataType *arg_target = glmsg.add_args();
   10191     arg_target->set_isarray(false);
   10192     arg_target->set_type(GLMessage::DataType::ENUM);
   10193     arg_target->add_intvalue((int)target);
   10194 
   10195     // copy argument levels
   10196     GLMessage_DataType *arg_levels = glmsg.add_args();
   10197     arg_levels->set_isarray(false);
   10198     arg_levels->set_type(GLMessage::DataType::INT);
   10199     arg_levels->add_intvalue(levels);
   10200 
   10201     // copy argument internalformat
   10202     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   10203     arg_internalformat->set_isarray(false);
   10204     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   10205     arg_internalformat->add_intvalue((int)internalformat);
   10206 
   10207     // copy argument width
   10208     GLMessage_DataType *arg_width = glmsg.add_args();
   10209     arg_width->set_isarray(false);
   10210     arg_width->set_type(GLMessage::DataType::INT);
   10211     arg_width->add_intvalue(width);
   10212 
   10213     // copy argument height
   10214     GLMessage_DataType *arg_height = glmsg.add_args();
   10215     arg_height->set_isarray(false);
   10216     arg_height->set_type(GLMessage::DataType::INT);
   10217     arg_height->add_intvalue(height);
   10218 
   10219     // call function
   10220     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10221     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10222     glContext->hooks->gl.glTexStorage2D(target, levels, internalformat, width, height);
   10223     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10224     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10225 
   10226     void *pointerArgs[] = {
   10227     };
   10228 
   10229     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10230                               threadStartTime, threadEndTime,
   10231                               &glmsg, pointerArgs);
   10232     glContext->traceGLMessage(&glmsg);
   10233 }
   10234 
   10235 void GLTrace_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
   10236     GLMessage glmsg;
   10237     GLTraceContext *glContext = getGLTraceContext();
   10238 
   10239     glmsg.set_function(GLMessage::glTexStorage3D);
   10240 
   10241     // copy argument target
   10242     GLMessage_DataType *arg_target = glmsg.add_args();
   10243     arg_target->set_isarray(false);
   10244     arg_target->set_type(GLMessage::DataType::ENUM);
   10245     arg_target->add_intvalue((int)target);
   10246 
   10247     // copy argument levels
   10248     GLMessage_DataType *arg_levels = glmsg.add_args();
   10249     arg_levels->set_isarray(false);
   10250     arg_levels->set_type(GLMessage::DataType::INT);
   10251     arg_levels->add_intvalue(levels);
   10252 
   10253     // copy argument internalformat
   10254     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   10255     arg_internalformat->set_isarray(false);
   10256     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   10257     arg_internalformat->add_intvalue((int)internalformat);
   10258 
   10259     // copy argument width
   10260     GLMessage_DataType *arg_width = glmsg.add_args();
   10261     arg_width->set_isarray(false);
   10262     arg_width->set_type(GLMessage::DataType::INT);
   10263     arg_width->add_intvalue(width);
   10264 
   10265     // copy argument height
   10266     GLMessage_DataType *arg_height = glmsg.add_args();
   10267     arg_height->set_isarray(false);
   10268     arg_height->set_type(GLMessage::DataType::INT);
   10269     arg_height->add_intvalue(height);
   10270 
   10271     // copy argument depth
   10272     GLMessage_DataType *arg_depth = glmsg.add_args();
   10273     arg_depth->set_isarray(false);
   10274     arg_depth->set_type(GLMessage::DataType::INT);
   10275     arg_depth->add_intvalue(depth);
   10276 
   10277     // call function
   10278     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10279     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10280     glContext->hooks->gl.glTexStorage3D(target, levels, internalformat, width, height, depth);
   10281     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10282     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10283 
   10284     void *pointerArgs[] = {
   10285     };
   10286 
   10287     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10288                               threadStartTime, threadEndTime,
   10289                               &glmsg, pointerArgs);
   10290     glContext->traceGLMessage(&glmsg);
   10291 }
   10292 
   10293 void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) {
   10294     GLMessage glmsg;
   10295     GLTraceContext *glContext = getGLTraceContext();
   10296 
   10297     glmsg.set_function(GLMessage::glGetInternalformativ);
   10298 
   10299     // copy argument target
   10300     GLMessage_DataType *arg_target = glmsg.add_args();
   10301     arg_target->set_isarray(false);
   10302     arg_target->set_type(GLMessage::DataType::ENUM);
   10303     arg_target->add_intvalue((int)target);
   10304 
   10305     // copy argument internalformat
   10306     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   10307     arg_internalformat->set_isarray(false);
   10308     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   10309     arg_internalformat->add_intvalue((int)internalformat);
   10310 
   10311     // copy argument pname
   10312     GLMessage_DataType *arg_pname = glmsg.add_args();
   10313     arg_pname->set_isarray(false);
   10314     arg_pname->set_type(GLMessage::DataType::ENUM);
   10315     arg_pname->add_intvalue((int)pname);
   10316 
   10317     // copy argument bufSize
   10318     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   10319     arg_bufSize->set_isarray(false);
   10320     arg_bufSize->set_type(GLMessage::DataType::INT);
   10321     arg_bufSize->add_intvalue(bufSize);
   10322 
   10323     // copy argument params
   10324     GLMessage_DataType *arg_params = glmsg.add_args();
   10325     arg_params->set_isarray(false);
   10326     arg_params->set_type(GLMessage::DataType::INT);
   10327     arg_params->add_intvalue((int)params);
   10328 
   10329     // call function
   10330     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10331     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10332     glContext->hooks->gl.glGetInternalformativ(target, internalformat, pname, bufSize, params);
   10333     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10334     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10335 
   10336     void *pointerArgs[] = {
   10337         (void *) params,
   10338     };
   10339 
   10340     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10341                               threadStartTime, threadEndTime,
   10342                               &glmsg, pointerArgs);
   10343     glContext->traceGLMessage(&glmsg);
   10344 }
   10345 
   10346 
   10347 // Definitions for GL2Ext APIs
   10348 
   10349 void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) {
   10350     GLMessage glmsg;
   10351     GLTraceContext *glContext = getGLTraceContext();
   10352 
   10353     glmsg.set_function(GLMessage::glEGLImageTargetTexture2DOES);
   10354 
   10355     // copy argument target
   10356     GLMessage_DataType *arg_target = glmsg.add_args();
   10357     arg_target->set_isarray(false);
   10358     arg_target->set_type(GLMessage::DataType::ENUM);
   10359     arg_target->add_intvalue((int)target);
   10360 
   10361     // copy argument image
   10362     GLMessage_DataType *arg_image = glmsg.add_args();
   10363     arg_image->set_isarray(false);
   10364     arg_image->set_type(GLMessage::DataType::INT);
   10365     arg_image->add_intvalue((int)image);
   10366 
   10367     // call function
   10368     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10369     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10370     glContext->hooks->gl.glEGLImageTargetTexture2DOES(target, image);
   10371     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10372     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10373 
   10374     void *pointerArgs[] = {
   10375         (void *) image,
   10376     };
   10377 
   10378     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10379                               threadStartTime, threadEndTime,
   10380                               &glmsg, pointerArgs);
   10381     glContext->traceGLMessage(&glmsg);
   10382 }
   10383 
   10384 void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) {
   10385     GLMessage glmsg;
   10386     GLTraceContext *glContext = getGLTraceContext();
   10387 
   10388     glmsg.set_function(GLMessage::glEGLImageTargetRenderbufferStorageOES);
   10389 
   10390     // copy argument target
   10391     GLMessage_DataType *arg_target = glmsg.add_args();
   10392     arg_target->set_isarray(false);
   10393     arg_target->set_type(GLMessage::DataType::ENUM);
   10394     arg_target->add_intvalue((int)target);
   10395 
   10396     // copy argument image
   10397     GLMessage_DataType *arg_image = glmsg.add_args();
   10398     arg_image->set_isarray(false);
   10399     arg_image->set_type(GLMessage::DataType::INT);
   10400     arg_image->add_intvalue((int)image);
   10401 
   10402     // call function
   10403     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10404     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10405     glContext->hooks->gl.glEGLImageTargetRenderbufferStorageOES(target, image);
   10406     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10407     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10408 
   10409     void *pointerArgs[] = {
   10410         (void *) image,
   10411     };
   10412 
   10413     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10414                               threadStartTime, threadEndTime,
   10415                               &glmsg, pointerArgs);
   10416     glContext->traceGLMessage(&glmsg);
   10417 }
   10418 
   10419 void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) {
   10420     GLMessage glmsg;
   10421     GLTraceContext *glContext = getGLTraceContext();
   10422 
   10423     glmsg.set_function(GLMessage::glGetProgramBinaryOES);
   10424 
   10425     // copy argument program
   10426     GLMessage_DataType *arg_program = glmsg.add_args();
   10427     arg_program->set_isarray(false);
   10428     arg_program->set_type(GLMessage::DataType::INT);
   10429     arg_program->add_intvalue(program);
   10430 
   10431     // copy argument bufSize
   10432     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   10433     arg_bufSize->set_isarray(false);
   10434     arg_bufSize->set_type(GLMessage::DataType::INT);
   10435     arg_bufSize->add_intvalue(bufSize);
   10436 
   10437     // copy argument length
   10438     GLMessage_DataType *arg_length = glmsg.add_args();
   10439     arg_length->set_isarray(false);
   10440     arg_length->set_type(GLMessage::DataType::INT);
   10441     arg_length->add_intvalue((int)length);
   10442 
   10443     // copy argument binaryFormat
   10444     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
   10445     arg_binaryFormat->set_isarray(false);
   10446     arg_binaryFormat->set_type(GLMessage::DataType::INT);
   10447     arg_binaryFormat->add_intvalue((int)binaryFormat);
   10448 
   10449     // copy argument binary
   10450     GLMessage_DataType *arg_binary = glmsg.add_args();
   10451     arg_binary->set_isarray(false);
   10452     arg_binary->set_type(GLMessage::DataType::INT);
   10453     arg_binary->add_intvalue((int)binary);
   10454 
   10455     // call function
   10456     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10457     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10458     glContext->hooks->gl.glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary);
   10459     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10460     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10461 
   10462     void *pointerArgs[] = {
   10463         (void *) length,
   10464         (void *) binaryFormat,
   10465         (void *) binary,
   10466     };
   10467 
   10468     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10469                               threadStartTime, threadEndTime,
   10470                               &glmsg, pointerArgs);
   10471     glContext->traceGLMessage(&glmsg);
   10472 }
   10473 
   10474 void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) {
   10475     GLMessage glmsg;
   10476     GLTraceContext *glContext = getGLTraceContext();
   10477 
   10478     glmsg.set_function(GLMessage::glProgramBinaryOES);
   10479 
   10480     // copy argument program
   10481     GLMessage_DataType *arg_program = glmsg.add_args();
   10482     arg_program->set_isarray(false);
   10483     arg_program->set_type(GLMessage::DataType::INT);
   10484     arg_program->add_intvalue(program);
   10485 
   10486     // copy argument binaryFormat
   10487     GLMessage_DataType *arg_binaryFormat = glmsg.add_args();
   10488     arg_binaryFormat->set_isarray(false);
   10489     arg_binaryFormat->set_type(GLMessage::DataType::ENUM);
   10490     arg_binaryFormat->add_intvalue((int)binaryFormat);
   10491 
   10492     // copy argument binary
   10493     GLMessage_DataType *arg_binary = glmsg.add_args();
   10494     arg_binary->set_isarray(false);
   10495     arg_binary->set_type(GLMessage::DataType::INT);
   10496     arg_binary->add_intvalue((int)binary);
   10497 
   10498     // copy argument length
   10499     GLMessage_DataType *arg_length = glmsg.add_args();
   10500     arg_length->set_isarray(false);
   10501     arg_length->set_type(GLMessage::DataType::INT);
   10502     arg_length->add_intvalue(length);
   10503 
   10504     // call function
   10505     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10506     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10507     glContext->hooks->gl.glProgramBinaryOES(program, binaryFormat, binary, length);
   10508     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10509     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10510 
   10511     void *pointerArgs[] = {
   10512         (void *) binary,
   10513     };
   10514 
   10515     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10516                               threadStartTime, threadEndTime,
   10517                               &glmsg, pointerArgs);
   10518     glContext->traceGLMessage(&glmsg);
   10519 }
   10520 
   10521 void* GLTrace_glMapBufferOES(GLenum target, GLenum access) {
   10522     GLMessage glmsg;
   10523     GLTraceContext *glContext = getGLTraceContext();
   10524 
   10525     glmsg.set_function(GLMessage::glMapBufferOES);
   10526 
   10527     // copy argument target
   10528     GLMessage_DataType *arg_target = glmsg.add_args();
   10529     arg_target->set_isarray(false);
   10530     arg_target->set_type(GLMessage::DataType::ENUM);
   10531     arg_target->add_intvalue((int)target);
   10532 
   10533     // copy argument access
   10534     GLMessage_DataType *arg_access = glmsg.add_args();
   10535     arg_access->set_isarray(false);
   10536     arg_access->set_type(GLMessage::DataType::ENUM);
   10537     arg_access->add_intvalue((int)access);
   10538 
   10539     // call function
   10540     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10541     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10542     void* retValue = glContext->hooks->gl.glMapBufferOES(target, access);
   10543     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10544     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10545 
   10546     // set return value
   10547     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   10548     rt->set_isarray(false);
   10549     rt->set_type(GLMessage::DataType::INT);
   10550     rt->add_intvalue((int)retValue);
   10551 
   10552     void *pointerArgs[] = {
   10553         (void *) retValue,
   10554     };
   10555 
   10556     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10557                               threadStartTime, threadEndTime,
   10558                               &glmsg, pointerArgs);
   10559     glContext->traceGLMessage(&glmsg);
   10560 
   10561     return retValue;
   10562 }
   10563 
   10564 GLboolean GLTrace_glUnmapBufferOES(GLenum target) {
   10565     GLMessage glmsg;
   10566     GLTraceContext *glContext = getGLTraceContext();
   10567 
   10568     glmsg.set_function(GLMessage::glUnmapBufferOES);
   10569 
   10570     // copy argument target
   10571     GLMessage_DataType *arg_target = glmsg.add_args();
   10572     arg_target->set_isarray(false);
   10573     arg_target->set_type(GLMessage::DataType::ENUM);
   10574     arg_target->add_intvalue((int)target);
   10575 
   10576     // call function
   10577     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10578     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10579     GLboolean retValue = glContext->hooks->gl.glUnmapBufferOES(target);
   10580     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10581     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10582 
   10583     // set return value
   10584     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   10585     rt->set_isarray(false);
   10586     rt->set_type(GLMessage::DataType::BOOL);
   10587     rt->add_boolvalue(retValue);
   10588 
   10589     void *pointerArgs[] = {
   10590     };
   10591 
   10592     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10593                               threadStartTime, threadEndTime,
   10594                               &glmsg, pointerArgs);
   10595     glContext->traceGLMessage(&glmsg);
   10596 
   10597     return retValue;
   10598 }
   10599 
   10600 void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid** params) {
   10601     GLMessage glmsg;
   10602     GLTraceContext *glContext = getGLTraceContext();
   10603 
   10604     glmsg.set_function(GLMessage::glGetBufferPointervOES);
   10605 
   10606     // copy argument target
   10607     GLMessage_DataType *arg_target = glmsg.add_args();
   10608     arg_target->set_isarray(false);
   10609     arg_target->set_type(GLMessage::DataType::ENUM);
   10610     arg_target->add_intvalue((int)target);
   10611 
   10612     // copy argument pname
   10613     GLMessage_DataType *arg_pname = glmsg.add_args();
   10614     arg_pname->set_isarray(false);
   10615     arg_pname->set_type(GLMessage::DataType::ENUM);
   10616     arg_pname->add_intvalue((int)pname);
   10617 
   10618     // copy argument params
   10619     GLMessage_DataType *arg_params = glmsg.add_args();
   10620     arg_params->set_isarray(false);
   10621     arg_params->set_type(GLMessage::DataType::INT);
   10622     arg_params->add_intvalue((int)params);
   10623 
   10624     // call function
   10625     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10626     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10627     glContext->hooks->gl.glGetBufferPointervOES(target, pname, params);
   10628     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10629     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10630 
   10631     void *pointerArgs[] = {
   10632         (void *) params,
   10633     };
   10634 
   10635     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10636                               threadStartTime, threadEndTime,
   10637                               &glmsg, pointerArgs);
   10638     glContext->traceGLMessage(&glmsg);
   10639 }
   10640 
   10641 void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) {
   10642     GLMessage glmsg;
   10643     GLTraceContext *glContext = getGLTraceContext();
   10644 
   10645     glmsg.set_function(GLMessage::glTexImage3DOES);
   10646 
   10647     // copy argument target
   10648     GLMessage_DataType *arg_target = glmsg.add_args();
   10649     arg_target->set_isarray(false);
   10650     arg_target->set_type(GLMessage::DataType::ENUM);
   10651     arg_target->add_intvalue((int)target);
   10652 
   10653     // copy argument level
   10654     GLMessage_DataType *arg_level = glmsg.add_args();
   10655     arg_level->set_isarray(false);
   10656     arg_level->set_type(GLMessage::DataType::INT);
   10657     arg_level->add_intvalue(level);
   10658 
   10659     // copy argument internalformat
   10660     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   10661     arg_internalformat->set_isarray(false);
   10662     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   10663     arg_internalformat->add_intvalue((int)internalformat);
   10664 
   10665     // copy argument width
   10666     GLMessage_DataType *arg_width = glmsg.add_args();
   10667     arg_width->set_isarray(false);
   10668     arg_width->set_type(GLMessage::DataType::INT);
   10669     arg_width->add_intvalue(width);
   10670 
   10671     // copy argument height
   10672     GLMessage_DataType *arg_height = glmsg.add_args();
   10673     arg_height->set_isarray(false);
   10674     arg_height->set_type(GLMessage::DataType::INT);
   10675     arg_height->add_intvalue(height);
   10676 
   10677     // copy argument depth
   10678     GLMessage_DataType *arg_depth = glmsg.add_args();
   10679     arg_depth->set_isarray(false);
   10680     arg_depth->set_type(GLMessage::DataType::INT);
   10681     arg_depth->add_intvalue(depth);
   10682 
   10683     // copy argument border
   10684     GLMessage_DataType *arg_border = glmsg.add_args();
   10685     arg_border->set_isarray(false);
   10686     arg_border->set_type(GLMessage::DataType::INT);
   10687     arg_border->add_intvalue(border);
   10688 
   10689     // copy argument format
   10690     GLMessage_DataType *arg_format = glmsg.add_args();
   10691     arg_format->set_isarray(false);
   10692     arg_format->set_type(GLMessage::DataType::ENUM);
   10693     arg_format->add_intvalue((int)format);
   10694 
   10695     // copy argument type
   10696     GLMessage_DataType *arg_type = glmsg.add_args();
   10697     arg_type->set_isarray(false);
   10698     arg_type->set_type(GLMessage::DataType::ENUM);
   10699     arg_type->add_intvalue((int)type);
   10700 
   10701     // copy argument pixels
   10702     GLMessage_DataType *arg_pixels = glmsg.add_args();
   10703     arg_pixels->set_isarray(false);
   10704     arg_pixels->set_type(GLMessage::DataType::INT);
   10705     arg_pixels->add_intvalue((int)pixels);
   10706 
   10707     // call function
   10708     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10709     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10710     glContext->hooks->gl.glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels);
   10711     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10712     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10713 
   10714     void *pointerArgs[] = {
   10715         (void *) pixels,
   10716     };
   10717 
   10718     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10719                               threadStartTime, threadEndTime,
   10720                               &glmsg, pointerArgs);
   10721     glContext->traceGLMessage(&glmsg);
   10722 }
   10723 
   10724 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) {
   10725     GLMessage glmsg;
   10726     GLTraceContext *glContext = getGLTraceContext();
   10727 
   10728     glmsg.set_function(GLMessage::glTexSubImage3DOES);
   10729 
   10730     // copy argument target
   10731     GLMessage_DataType *arg_target = glmsg.add_args();
   10732     arg_target->set_isarray(false);
   10733     arg_target->set_type(GLMessage::DataType::ENUM);
   10734     arg_target->add_intvalue((int)target);
   10735 
   10736     // copy argument level
   10737     GLMessage_DataType *arg_level = glmsg.add_args();
   10738     arg_level->set_isarray(false);
   10739     arg_level->set_type(GLMessage::DataType::INT);
   10740     arg_level->add_intvalue(level);
   10741 
   10742     // copy argument xoffset
   10743     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   10744     arg_xoffset->set_isarray(false);
   10745     arg_xoffset->set_type(GLMessage::DataType::INT);
   10746     arg_xoffset->add_intvalue(xoffset);
   10747 
   10748     // copy argument yoffset
   10749     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   10750     arg_yoffset->set_isarray(false);
   10751     arg_yoffset->set_type(GLMessage::DataType::INT);
   10752     arg_yoffset->add_intvalue(yoffset);
   10753 
   10754     // copy argument zoffset
   10755     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   10756     arg_zoffset->set_isarray(false);
   10757     arg_zoffset->set_type(GLMessage::DataType::INT);
   10758     arg_zoffset->add_intvalue(zoffset);
   10759 
   10760     // copy argument width
   10761     GLMessage_DataType *arg_width = glmsg.add_args();
   10762     arg_width->set_isarray(false);
   10763     arg_width->set_type(GLMessage::DataType::INT);
   10764     arg_width->add_intvalue(width);
   10765 
   10766     // copy argument height
   10767     GLMessage_DataType *arg_height = glmsg.add_args();
   10768     arg_height->set_isarray(false);
   10769     arg_height->set_type(GLMessage::DataType::INT);
   10770     arg_height->add_intvalue(height);
   10771 
   10772     // copy argument depth
   10773     GLMessage_DataType *arg_depth = glmsg.add_args();
   10774     arg_depth->set_isarray(false);
   10775     arg_depth->set_type(GLMessage::DataType::INT);
   10776     arg_depth->add_intvalue(depth);
   10777 
   10778     // copy argument format
   10779     GLMessage_DataType *arg_format = glmsg.add_args();
   10780     arg_format->set_isarray(false);
   10781     arg_format->set_type(GLMessage::DataType::ENUM);
   10782     arg_format->add_intvalue((int)format);
   10783 
   10784     // copy argument type
   10785     GLMessage_DataType *arg_type = glmsg.add_args();
   10786     arg_type->set_isarray(false);
   10787     arg_type->set_type(GLMessage::DataType::ENUM);
   10788     arg_type->add_intvalue((int)type);
   10789 
   10790     // copy argument pixels
   10791     GLMessage_DataType *arg_pixels = glmsg.add_args();
   10792     arg_pixels->set_isarray(false);
   10793     arg_pixels->set_type(GLMessage::DataType::INT);
   10794     arg_pixels->add_intvalue((int)pixels);
   10795 
   10796     // call function
   10797     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10798     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10799     glContext->hooks->gl.glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels);
   10800     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10801     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10802 
   10803     void *pointerArgs[] = {
   10804         (void *) pixels,
   10805     };
   10806 
   10807     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10808                               threadStartTime, threadEndTime,
   10809                               &glmsg, pointerArgs);
   10810     glContext->traceGLMessage(&glmsg);
   10811 }
   10812 
   10813 void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) {
   10814     GLMessage glmsg;
   10815     GLTraceContext *glContext = getGLTraceContext();
   10816 
   10817     glmsg.set_function(GLMessage::glCopyTexSubImage3DOES);
   10818 
   10819     // copy argument target
   10820     GLMessage_DataType *arg_target = glmsg.add_args();
   10821     arg_target->set_isarray(false);
   10822     arg_target->set_type(GLMessage::DataType::ENUM);
   10823     arg_target->add_intvalue((int)target);
   10824 
   10825     // copy argument level
   10826     GLMessage_DataType *arg_level = glmsg.add_args();
   10827     arg_level->set_isarray(false);
   10828     arg_level->set_type(GLMessage::DataType::INT);
   10829     arg_level->add_intvalue(level);
   10830 
   10831     // copy argument xoffset
   10832     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   10833     arg_xoffset->set_isarray(false);
   10834     arg_xoffset->set_type(GLMessage::DataType::INT);
   10835     arg_xoffset->add_intvalue(xoffset);
   10836 
   10837     // copy argument yoffset
   10838     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   10839     arg_yoffset->set_isarray(false);
   10840     arg_yoffset->set_type(GLMessage::DataType::INT);
   10841     arg_yoffset->add_intvalue(yoffset);
   10842 
   10843     // copy argument zoffset
   10844     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   10845     arg_zoffset->set_isarray(false);
   10846     arg_zoffset->set_type(GLMessage::DataType::INT);
   10847     arg_zoffset->add_intvalue(zoffset);
   10848 
   10849     // copy argument x
   10850     GLMessage_DataType *arg_x = glmsg.add_args();
   10851     arg_x->set_isarray(false);
   10852     arg_x->set_type(GLMessage::DataType::INT);
   10853     arg_x->add_intvalue(x);
   10854 
   10855     // copy argument y
   10856     GLMessage_DataType *arg_y = glmsg.add_args();
   10857     arg_y->set_isarray(false);
   10858     arg_y->set_type(GLMessage::DataType::INT);
   10859     arg_y->add_intvalue(y);
   10860 
   10861     // copy argument width
   10862     GLMessage_DataType *arg_width = glmsg.add_args();
   10863     arg_width->set_isarray(false);
   10864     arg_width->set_type(GLMessage::DataType::INT);
   10865     arg_width->add_intvalue(width);
   10866 
   10867     // copy argument height
   10868     GLMessage_DataType *arg_height = glmsg.add_args();
   10869     arg_height->set_isarray(false);
   10870     arg_height->set_type(GLMessage::DataType::INT);
   10871     arg_height->add_intvalue(height);
   10872 
   10873     // call function
   10874     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10875     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10876     glContext->hooks->gl.glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height);
   10877     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10878     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10879 
   10880     void *pointerArgs[] = {
   10881     };
   10882 
   10883     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10884                               threadStartTime, threadEndTime,
   10885                               &glmsg, pointerArgs);
   10886     glContext->traceGLMessage(&glmsg);
   10887 }
   10888 
   10889 void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) {
   10890     GLMessage glmsg;
   10891     GLTraceContext *glContext = getGLTraceContext();
   10892 
   10893     glmsg.set_function(GLMessage::glCompressedTexImage3DOES);
   10894 
   10895     // copy argument target
   10896     GLMessage_DataType *arg_target = glmsg.add_args();
   10897     arg_target->set_isarray(false);
   10898     arg_target->set_type(GLMessage::DataType::ENUM);
   10899     arg_target->add_intvalue((int)target);
   10900 
   10901     // copy argument level
   10902     GLMessage_DataType *arg_level = glmsg.add_args();
   10903     arg_level->set_isarray(false);
   10904     arg_level->set_type(GLMessage::DataType::INT);
   10905     arg_level->add_intvalue(level);
   10906 
   10907     // copy argument internalformat
   10908     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   10909     arg_internalformat->set_isarray(false);
   10910     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   10911     arg_internalformat->add_intvalue((int)internalformat);
   10912 
   10913     // copy argument width
   10914     GLMessage_DataType *arg_width = glmsg.add_args();
   10915     arg_width->set_isarray(false);
   10916     arg_width->set_type(GLMessage::DataType::INT);
   10917     arg_width->add_intvalue(width);
   10918 
   10919     // copy argument height
   10920     GLMessage_DataType *arg_height = glmsg.add_args();
   10921     arg_height->set_isarray(false);
   10922     arg_height->set_type(GLMessage::DataType::INT);
   10923     arg_height->add_intvalue(height);
   10924 
   10925     // copy argument depth
   10926     GLMessage_DataType *arg_depth = glmsg.add_args();
   10927     arg_depth->set_isarray(false);
   10928     arg_depth->set_type(GLMessage::DataType::INT);
   10929     arg_depth->add_intvalue(depth);
   10930 
   10931     // copy argument border
   10932     GLMessage_DataType *arg_border = glmsg.add_args();
   10933     arg_border->set_isarray(false);
   10934     arg_border->set_type(GLMessage::DataType::INT);
   10935     arg_border->add_intvalue(border);
   10936 
   10937     // copy argument imageSize
   10938     GLMessage_DataType *arg_imageSize = glmsg.add_args();
   10939     arg_imageSize->set_isarray(false);
   10940     arg_imageSize->set_type(GLMessage::DataType::INT);
   10941     arg_imageSize->add_intvalue(imageSize);
   10942 
   10943     // copy argument data
   10944     GLMessage_DataType *arg_data = glmsg.add_args();
   10945     arg_data->set_isarray(false);
   10946     arg_data->set_type(GLMessage::DataType::INT);
   10947     arg_data->add_intvalue((int)data);
   10948 
   10949     // call function
   10950     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10951     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   10952     glContext->hooks->gl.glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data);
   10953     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   10954     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   10955 
   10956     void *pointerArgs[] = {
   10957         (void *) data,
   10958     };
   10959 
   10960     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   10961                               threadStartTime, threadEndTime,
   10962                               &glmsg, pointerArgs);
   10963     glContext->traceGLMessage(&glmsg);
   10964 }
   10965 
   10966 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) {
   10967     GLMessage glmsg;
   10968     GLTraceContext *glContext = getGLTraceContext();
   10969 
   10970     glmsg.set_function(GLMessage::glCompressedTexSubImage3DOES);
   10971 
   10972     // copy argument target
   10973     GLMessage_DataType *arg_target = glmsg.add_args();
   10974     arg_target->set_isarray(false);
   10975     arg_target->set_type(GLMessage::DataType::ENUM);
   10976     arg_target->add_intvalue((int)target);
   10977 
   10978     // copy argument level
   10979     GLMessage_DataType *arg_level = glmsg.add_args();
   10980     arg_level->set_isarray(false);
   10981     arg_level->set_type(GLMessage::DataType::INT);
   10982     arg_level->add_intvalue(level);
   10983 
   10984     // copy argument xoffset
   10985     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   10986     arg_xoffset->set_isarray(false);
   10987     arg_xoffset->set_type(GLMessage::DataType::INT);
   10988     arg_xoffset->add_intvalue(xoffset);
   10989 
   10990     // copy argument yoffset
   10991     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   10992     arg_yoffset->set_isarray(false);
   10993     arg_yoffset->set_type(GLMessage::DataType::INT);
   10994     arg_yoffset->add_intvalue(yoffset);
   10995 
   10996     // copy argument zoffset
   10997     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   10998     arg_zoffset->set_isarray(false);
   10999     arg_zoffset->set_type(GLMessage::DataType::INT);
   11000     arg_zoffset->add_intvalue(zoffset);
   11001 
   11002     // copy argument width
   11003     GLMessage_DataType *arg_width = glmsg.add_args();
   11004     arg_width->set_isarray(false);
   11005     arg_width->set_type(GLMessage::DataType::INT);
   11006     arg_width->add_intvalue(width);
   11007 
   11008     // copy argument height
   11009     GLMessage_DataType *arg_height = glmsg.add_args();
   11010     arg_height->set_isarray(false);
   11011     arg_height->set_type(GLMessage::DataType::INT);
   11012     arg_height->add_intvalue(height);
   11013 
   11014     // copy argument depth
   11015     GLMessage_DataType *arg_depth = glmsg.add_args();
   11016     arg_depth->set_isarray(false);
   11017     arg_depth->set_type(GLMessage::DataType::INT);
   11018     arg_depth->add_intvalue(depth);
   11019 
   11020     // copy argument format
   11021     GLMessage_DataType *arg_format = glmsg.add_args();
   11022     arg_format->set_isarray(false);
   11023     arg_format->set_type(GLMessage::DataType::ENUM);
   11024     arg_format->add_intvalue((int)format);
   11025 
   11026     // copy argument imageSize
   11027     GLMessage_DataType *arg_imageSize = glmsg.add_args();
   11028     arg_imageSize->set_isarray(false);
   11029     arg_imageSize->set_type(GLMessage::DataType::INT);
   11030     arg_imageSize->add_intvalue(imageSize);
   11031 
   11032     // copy argument data
   11033     GLMessage_DataType *arg_data = glmsg.add_args();
   11034     arg_data->set_isarray(false);
   11035     arg_data->set_type(GLMessage::DataType::INT);
   11036     arg_data->add_intvalue((int)data);
   11037 
   11038     // call function
   11039     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11040     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11041     glContext->hooks->gl.glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
   11042     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11043     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11044 
   11045     void *pointerArgs[] = {
   11046         (void *) data,
   11047     };
   11048 
   11049     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11050                               threadStartTime, threadEndTime,
   11051                               &glmsg, pointerArgs);
   11052     glContext->traceGLMessage(&glmsg);
   11053 }
   11054 
   11055 void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) {
   11056     GLMessage glmsg;
   11057     GLTraceContext *glContext = getGLTraceContext();
   11058 
   11059     glmsg.set_function(GLMessage::glFramebufferTexture3DOES);
   11060 
   11061     // copy argument target
   11062     GLMessage_DataType *arg_target = glmsg.add_args();
   11063     arg_target->set_isarray(false);
   11064     arg_target->set_type(GLMessage::DataType::ENUM);
   11065     arg_target->add_intvalue((int)target);
   11066 
   11067     // copy argument attachment
   11068     GLMessage_DataType *arg_attachment = glmsg.add_args();
   11069     arg_attachment->set_isarray(false);
   11070     arg_attachment->set_type(GLMessage::DataType::ENUM);
   11071     arg_attachment->add_intvalue((int)attachment);
   11072 
   11073     // copy argument textarget
   11074     GLMessage_DataType *arg_textarget = glmsg.add_args();
   11075     arg_textarget->set_isarray(false);
   11076     arg_textarget->set_type(GLMessage::DataType::ENUM);
   11077     arg_textarget->add_intvalue((int)textarget);
   11078 
   11079     // copy argument texture
   11080     GLMessage_DataType *arg_texture = glmsg.add_args();
   11081     arg_texture->set_isarray(false);
   11082     arg_texture->set_type(GLMessage::DataType::INT);
   11083     arg_texture->add_intvalue(texture);
   11084 
   11085     // copy argument level
   11086     GLMessage_DataType *arg_level = glmsg.add_args();
   11087     arg_level->set_isarray(false);
   11088     arg_level->set_type(GLMessage::DataType::INT);
   11089     arg_level->add_intvalue(level);
   11090 
   11091     // copy argument zoffset
   11092     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   11093     arg_zoffset->set_isarray(false);
   11094     arg_zoffset->set_type(GLMessage::DataType::INT);
   11095     arg_zoffset->add_intvalue(zoffset);
   11096 
   11097     // call function
   11098     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11099     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11100     glContext->hooks->gl.glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset);
   11101     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11102     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11103 
   11104     void *pointerArgs[] = {
   11105     };
   11106 
   11107     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11108                               threadStartTime, threadEndTime,
   11109                               &glmsg, pointerArgs);
   11110     glContext->traceGLMessage(&glmsg);
   11111 }
   11112 
   11113 void GLTrace_glBindVertexArrayOES(GLuint array) {
   11114     GLMessage glmsg;
   11115     GLTraceContext *glContext = getGLTraceContext();
   11116 
   11117     glmsg.set_function(GLMessage::glBindVertexArrayOES);
   11118 
   11119     // copy argument array
   11120     GLMessage_DataType *arg_array = glmsg.add_args();
   11121     arg_array->set_isarray(false);
   11122     arg_array->set_type(GLMessage::DataType::INT);
   11123     arg_array->add_intvalue(array);
   11124 
   11125     // call function
   11126     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11127     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11128     glContext->hooks->gl.glBindVertexArrayOES(array);
   11129     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11130     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11131 
   11132     void *pointerArgs[] = {
   11133     };
   11134 
   11135     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11136                               threadStartTime, threadEndTime,
   11137                               &glmsg, pointerArgs);
   11138     glContext->traceGLMessage(&glmsg);
   11139 }
   11140 
   11141 void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) {
   11142     GLMessage glmsg;
   11143     GLTraceContext *glContext = getGLTraceContext();
   11144 
   11145     glmsg.set_function(GLMessage::glDeleteVertexArraysOES);
   11146 
   11147     // copy argument n
   11148     GLMessage_DataType *arg_n = glmsg.add_args();
   11149     arg_n->set_isarray(false);
   11150     arg_n->set_type(GLMessage::DataType::INT);
   11151     arg_n->add_intvalue(n);
   11152 
   11153     // copy argument arrays
   11154     GLMessage_DataType *arg_arrays = glmsg.add_args();
   11155     arg_arrays->set_isarray(false);
   11156     arg_arrays->set_type(GLMessage::DataType::INT);
   11157     arg_arrays->add_intvalue((int)arrays);
   11158 
   11159     // call function
   11160     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11161     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11162     glContext->hooks->gl.glDeleteVertexArraysOES(n, arrays);
   11163     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11164     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11165 
   11166     void *pointerArgs[] = {
   11167         (void *) arrays,
   11168     };
   11169 
   11170     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11171                               threadStartTime, threadEndTime,
   11172                               &glmsg, pointerArgs);
   11173     glContext->traceGLMessage(&glmsg);
   11174 }
   11175 
   11176 void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint *arrays) {
   11177     GLMessage glmsg;
   11178     GLTraceContext *glContext = getGLTraceContext();
   11179 
   11180     glmsg.set_function(GLMessage::glGenVertexArraysOES);
   11181 
   11182     // copy argument n
   11183     GLMessage_DataType *arg_n = glmsg.add_args();
   11184     arg_n->set_isarray(false);
   11185     arg_n->set_type(GLMessage::DataType::INT);
   11186     arg_n->add_intvalue(n);
   11187 
   11188     // copy argument arrays
   11189     GLMessage_DataType *arg_arrays = glmsg.add_args();
   11190     arg_arrays->set_isarray(false);
   11191     arg_arrays->set_type(GLMessage::DataType::INT);
   11192     arg_arrays->add_intvalue((int)arrays);
   11193 
   11194     // call function
   11195     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11196     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11197     glContext->hooks->gl.glGenVertexArraysOES(n, arrays);
   11198     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11199     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11200 
   11201     void *pointerArgs[] = {
   11202         (void *) arrays,
   11203     };
   11204 
   11205     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11206                               threadStartTime, threadEndTime,
   11207                               &glmsg, pointerArgs);
   11208     glContext->traceGLMessage(&glmsg);
   11209 }
   11210 
   11211 GLboolean GLTrace_glIsVertexArrayOES(GLuint array) {
   11212     GLMessage glmsg;
   11213     GLTraceContext *glContext = getGLTraceContext();
   11214 
   11215     glmsg.set_function(GLMessage::glIsVertexArrayOES);
   11216 
   11217     // copy argument array
   11218     GLMessage_DataType *arg_array = glmsg.add_args();
   11219     arg_array->set_isarray(false);
   11220     arg_array->set_type(GLMessage::DataType::INT);
   11221     arg_array->add_intvalue(array);
   11222 
   11223     // call function
   11224     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11225     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11226     GLboolean retValue = glContext->hooks->gl.glIsVertexArrayOES(array);
   11227     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11228     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11229 
   11230     // set return value
   11231     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   11232     rt->set_isarray(false);
   11233     rt->set_type(GLMessage::DataType::BOOL);
   11234     rt->add_boolvalue(retValue);
   11235 
   11236     void *pointerArgs[] = {
   11237     };
   11238 
   11239     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11240                               threadStartTime, threadEndTime,
   11241                               &glmsg, pointerArgs);
   11242     glContext->traceGLMessage(&glmsg);
   11243 
   11244     return retValue;
   11245 }
   11246 
   11247 void GLTrace_glGetPerfMonitorGroupsAMD(GLint *numGroups, GLsizei groupsSize, GLuint *groups) {
   11248     GLMessage glmsg;
   11249     GLTraceContext *glContext = getGLTraceContext();
   11250 
   11251     glmsg.set_function(GLMessage::glGetPerfMonitorGroupsAMD);
   11252 
   11253     // copy argument numGroups
   11254     GLMessage_DataType *arg_numGroups = glmsg.add_args();
   11255     arg_numGroups->set_isarray(false);
   11256     arg_numGroups->set_type(GLMessage::DataType::INT);
   11257     arg_numGroups->add_intvalue((int)numGroups);
   11258 
   11259     // copy argument groupsSize
   11260     GLMessage_DataType *arg_groupsSize = glmsg.add_args();
   11261     arg_groupsSize->set_isarray(false);
   11262     arg_groupsSize->set_type(GLMessage::DataType::INT);
   11263     arg_groupsSize->add_intvalue(groupsSize);
   11264 
   11265     // copy argument groups
   11266     GLMessage_DataType *arg_groups = glmsg.add_args();
   11267     arg_groups->set_isarray(false);
   11268     arg_groups->set_type(GLMessage::DataType::INT);
   11269     arg_groups->add_intvalue((int)groups);
   11270 
   11271     // call function
   11272     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11273     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11274     glContext->hooks->gl.glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups);
   11275     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11276     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11277 
   11278     void *pointerArgs[] = {
   11279         (void *) numGroups,
   11280         (void *) groups,
   11281     };
   11282 
   11283     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11284                               threadStartTime, threadEndTime,
   11285                               &glmsg, pointerArgs);
   11286     glContext->traceGLMessage(&glmsg);
   11287 }
   11288 
   11289 void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) {
   11290     GLMessage glmsg;
   11291     GLTraceContext *glContext = getGLTraceContext();
   11292 
   11293     glmsg.set_function(GLMessage::glGetPerfMonitorCountersAMD);
   11294 
   11295     // copy argument group
   11296     GLMessage_DataType *arg_group = glmsg.add_args();
   11297     arg_group->set_isarray(false);
   11298     arg_group->set_type(GLMessage::DataType::INT);
   11299     arg_group->add_intvalue(group);
   11300 
   11301     // copy argument numCounters
   11302     GLMessage_DataType *arg_numCounters = glmsg.add_args();
   11303     arg_numCounters->set_isarray(false);
   11304     arg_numCounters->set_type(GLMessage::DataType::INT);
   11305     arg_numCounters->add_intvalue((int)numCounters);
   11306 
   11307     // copy argument maxActiveCounters
   11308     GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args();
   11309     arg_maxActiveCounters->set_isarray(false);
   11310     arg_maxActiveCounters->set_type(GLMessage::DataType::INT);
   11311     arg_maxActiveCounters->add_intvalue((int)maxActiveCounters);
   11312 
   11313     // copy argument counterSize
   11314     GLMessage_DataType *arg_counterSize = glmsg.add_args();
   11315     arg_counterSize->set_isarray(false);
   11316     arg_counterSize->set_type(GLMessage::DataType::INT);
   11317     arg_counterSize->add_intvalue(counterSize);
   11318 
   11319     // copy argument counters
   11320     GLMessage_DataType *arg_counters = glmsg.add_args();
   11321     arg_counters->set_isarray(false);
   11322     arg_counters->set_type(GLMessage::DataType::INT);
   11323     arg_counters->add_intvalue((int)counters);
   11324 
   11325     // call function
   11326     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11327     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11328     glContext->hooks->gl.glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters);
   11329     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11330     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11331 
   11332     void *pointerArgs[] = {
   11333         (void *) numCounters,
   11334         (void *) maxActiveCounters,
   11335         (void *) counters,
   11336     };
   11337 
   11338     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11339                               threadStartTime, threadEndTime,
   11340                               &glmsg, pointerArgs);
   11341     glContext->traceGLMessage(&glmsg);
   11342 }
   11343 
   11344 void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) {
   11345     GLMessage glmsg;
   11346     GLTraceContext *glContext = getGLTraceContext();
   11347 
   11348     glmsg.set_function(GLMessage::glGetPerfMonitorGroupStringAMD);
   11349 
   11350     // copy argument group
   11351     GLMessage_DataType *arg_group = glmsg.add_args();
   11352     arg_group->set_isarray(false);
   11353     arg_group->set_type(GLMessage::DataType::INT);
   11354     arg_group->add_intvalue(group);
   11355 
   11356     // copy argument bufSize
   11357     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   11358     arg_bufSize->set_isarray(false);
   11359     arg_bufSize->set_type(GLMessage::DataType::INT);
   11360     arg_bufSize->add_intvalue(bufSize);
   11361 
   11362     // copy argument length
   11363     GLMessage_DataType *arg_length = glmsg.add_args();
   11364     arg_length->set_isarray(false);
   11365     arg_length->set_type(GLMessage::DataType::INT);
   11366     arg_length->add_intvalue((int)length);
   11367 
   11368     // copy argument groupString
   11369     GLMessage_DataType *arg_groupString = glmsg.add_args();
   11370     arg_groupString->set_isarray(false);
   11371     arg_groupString->set_type(GLMessage::DataType::INT);
   11372     arg_groupString->add_intvalue((int)groupString);
   11373 
   11374     // call function
   11375     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11376     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11377     glContext->hooks->gl.glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString);
   11378     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11379     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11380 
   11381     void *pointerArgs[] = {
   11382         (void *) length,
   11383         (void *) groupString,
   11384     };
   11385 
   11386     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11387                               threadStartTime, threadEndTime,
   11388                               &glmsg, pointerArgs);
   11389     glContext->traceGLMessage(&glmsg);
   11390 }
   11391 
   11392 void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) {
   11393     GLMessage glmsg;
   11394     GLTraceContext *glContext = getGLTraceContext();
   11395 
   11396     glmsg.set_function(GLMessage::glGetPerfMonitorCounterStringAMD);
   11397 
   11398     // copy argument group
   11399     GLMessage_DataType *arg_group = glmsg.add_args();
   11400     arg_group->set_isarray(false);
   11401     arg_group->set_type(GLMessage::DataType::INT);
   11402     arg_group->add_intvalue(group);
   11403 
   11404     // copy argument counter
   11405     GLMessage_DataType *arg_counter = glmsg.add_args();
   11406     arg_counter->set_isarray(false);
   11407     arg_counter->set_type(GLMessage::DataType::INT);
   11408     arg_counter->add_intvalue(counter);
   11409 
   11410     // copy argument bufSize
   11411     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   11412     arg_bufSize->set_isarray(false);
   11413     arg_bufSize->set_type(GLMessage::DataType::INT);
   11414     arg_bufSize->add_intvalue(bufSize);
   11415 
   11416     // copy argument length
   11417     GLMessage_DataType *arg_length = glmsg.add_args();
   11418     arg_length->set_isarray(false);
   11419     arg_length->set_type(GLMessage::DataType::INT);
   11420     arg_length->add_intvalue((int)length);
   11421 
   11422     // copy argument counterString
   11423     GLMessage_DataType *arg_counterString = glmsg.add_args();
   11424     arg_counterString->set_isarray(false);
   11425     arg_counterString->set_type(GLMessage::DataType::INT);
   11426     arg_counterString->add_intvalue((int)counterString);
   11427 
   11428     // call function
   11429     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11430     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11431     glContext->hooks->gl.glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString);
   11432     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11433     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11434 
   11435     void *pointerArgs[] = {
   11436         (void *) length,
   11437         (void *) counterString,
   11438     };
   11439 
   11440     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11441                               threadStartTime, threadEndTime,
   11442                               &glmsg, pointerArgs);
   11443     glContext->traceGLMessage(&glmsg);
   11444 }
   11445 
   11446 void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, GLvoid *data) {
   11447     GLMessage glmsg;
   11448     GLTraceContext *glContext = getGLTraceContext();
   11449 
   11450     glmsg.set_function(GLMessage::glGetPerfMonitorCounterInfoAMD);
   11451 
   11452     // copy argument group
   11453     GLMessage_DataType *arg_group = glmsg.add_args();
   11454     arg_group->set_isarray(false);
   11455     arg_group->set_type(GLMessage::DataType::INT);
   11456     arg_group->add_intvalue(group);
   11457 
   11458     // copy argument counter
   11459     GLMessage_DataType *arg_counter = glmsg.add_args();
   11460     arg_counter->set_isarray(false);
   11461     arg_counter->set_type(GLMessage::DataType::INT);
   11462     arg_counter->add_intvalue(counter);
   11463 
   11464     // copy argument pname
   11465     GLMessage_DataType *arg_pname = glmsg.add_args();
   11466     arg_pname->set_isarray(false);
   11467     arg_pname->set_type(GLMessage::DataType::ENUM);
   11468     arg_pname->add_intvalue((int)pname);
   11469 
   11470     // copy argument data
   11471     GLMessage_DataType *arg_data = glmsg.add_args();
   11472     arg_data->set_isarray(false);
   11473     arg_data->set_type(GLMessage::DataType::INT);
   11474     arg_data->add_intvalue((int)data);
   11475 
   11476     // call function
   11477     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11478     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11479     glContext->hooks->gl.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data);
   11480     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11481     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11482 
   11483     void *pointerArgs[] = {
   11484         (void *) data,
   11485     };
   11486 
   11487     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11488                               threadStartTime, threadEndTime,
   11489                               &glmsg, pointerArgs);
   11490     glContext->traceGLMessage(&glmsg);
   11491 }
   11492 
   11493 void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint *monitors) {
   11494     GLMessage glmsg;
   11495     GLTraceContext *glContext = getGLTraceContext();
   11496 
   11497     glmsg.set_function(GLMessage::glGenPerfMonitorsAMD);
   11498 
   11499     // copy argument n
   11500     GLMessage_DataType *arg_n = glmsg.add_args();
   11501     arg_n->set_isarray(false);
   11502     arg_n->set_type(GLMessage::DataType::INT);
   11503     arg_n->add_intvalue(n);
   11504 
   11505     // copy argument monitors
   11506     GLMessage_DataType *arg_monitors = glmsg.add_args();
   11507     arg_monitors->set_isarray(false);
   11508     arg_monitors->set_type(GLMessage::DataType::INT);
   11509     arg_monitors->add_intvalue((int)monitors);
   11510 
   11511     // call function
   11512     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11513     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11514     glContext->hooks->gl.glGenPerfMonitorsAMD(n, monitors);
   11515     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11516     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11517 
   11518     void *pointerArgs[] = {
   11519         (void *) monitors,
   11520     };
   11521 
   11522     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11523                               threadStartTime, threadEndTime,
   11524                               &glmsg, pointerArgs);
   11525     glContext->traceGLMessage(&glmsg);
   11526 }
   11527 
   11528 void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint *monitors) {
   11529     GLMessage glmsg;
   11530     GLTraceContext *glContext = getGLTraceContext();
   11531 
   11532     glmsg.set_function(GLMessage::glDeletePerfMonitorsAMD);
   11533 
   11534     // copy argument n
   11535     GLMessage_DataType *arg_n = glmsg.add_args();
   11536     arg_n->set_isarray(false);
   11537     arg_n->set_type(GLMessage::DataType::INT);
   11538     arg_n->add_intvalue(n);
   11539 
   11540     // copy argument monitors
   11541     GLMessage_DataType *arg_monitors = glmsg.add_args();
   11542     arg_monitors->set_isarray(false);
   11543     arg_monitors->set_type(GLMessage::DataType::INT);
   11544     arg_monitors->add_intvalue((int)monitors);
   11545 
   11546     // call function
   11547     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11548     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11549     glContext->hooks->gl.glDeletePerfMonitorsAMD(n, monitors);
   11550     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11551     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11552 
   11553     void *pointerArgs[] = {
   11554         (void *) monitors,
   11555     };
   11556 
   11557     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11558                               threadStartTime, threadEndTime,
   11559                               &glmsg, pointerArgs);
   11560     glContext->traceGLMessage(&glmsg);
   11561 }
   11562 
   11563 void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) {
   11564     GLMessage glmsg;
   11565     GLTraceContext *glContext = getGLTraceContext();
   11566 
   11567     glmsg.set_function(GLMessage::glSelectPerfMonitorCountersAMD);
   11568 
   11569     // copy argument monitor
   11570     GLMessage_DataType *arg_monitor = glmsg.add_args();
   11571     arg_monitor->set_isarray(false);
   11572     arg_monitor->set_type(GLMessage::DataType::INT);
   11573     arg_monitor->add_intvalue(monitor);
   11574 
   11575     // copy argument enable
   11576     GLMessage_DataType *arg_enable = glmsg.add_args();
   11577     arg_enable->set_isarray(false);
   11578     arg_enable->set_type(GLMessage::DataType::BOOL);
   11579     arg_enable->add_boolvalue(enable);
   11580 
   11581     // copy argument group
   11582     GLMessage_DataType *arg_group = glmsg.add_args();
   11583     arg_group->set_isarray(false);
   11584     arg_group->set_type(GLMessage::DataType::INT);
   11585     arg_group->add_intvalue(group);
   11586 
   11587     // copy argument numCounters
   11588     GLMessage_DataType *arg_numCounters = glmsg.add_args();
   11589     arg_numCounters->set_isarray(false);
   11590     arg_numCounters->set_type(GLMessage::DataType::INT);
   11591     arg_numCounters->add_intvalue(numCounters);
   11592 
   11593     // copy argument countersList
   11594     GLMessage_DataType *arg_countersList = glmsg.add_args();
   11595     arg_countersList->set_isarray(false);
   11596     arg_countersList->set_type(GLMessage::DataType::INT);
   11597     arg_countersList->add_intvalue((int)countersList);
   11598 
   11599     // call function
   11600     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11601     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11602     glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, countersList);
   11603     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11604     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11605 
   11606     void *pointerArgs[] = {
   11607         (void *) countersList,
   11608     };
   11609 
   11610     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11611                               threadStartTime, threadEndTime,
   11612                               &glmsg, pointerArgs);
   11613     glContext->traceGLMessage(&glmsg);
   11614 }
   11615 
   11616 void GLTrace_glBeginPerfMonitorAMD(GLuint monitor) {
   11617     GLMessage glmsg;
   11618     GLTraceContext *glContext = getGLTraceContext();
   11619 
   11620     glmsg.set_function(GLMessage::glBeginPerfMonitorAMD);
   11621 
   11622     // copy argument monitor
   11623     GLMessage_DataType *arg_monitor = glmsg.add_args();
   11624     arg_monitor->set_isarray(false);
   11625     arg_monitor->set_type(GLMessage::DataType::INT);
   11626     arg_monitor->add_intvalue(monitor);
   11627 
   11628     // call function
   11629     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11630     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11631     glContext->hooks->gl.glBeginPerfMonitorAMD(monitor);
   11632     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11633     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11634 
   11635     void *pointerArgs[] = {
   11636     };
   11637 
   11638     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11639                               threadStartTime, threadEndTime,
   11640                               &glmsg, pointerArgs);
   11641     glContext->traceGLMessage(&glmsg);
   11642 }
   11643 
   11644 void GLTrace_glEndPerfMonitorAMD(GLuint monitor) {
   11645     GLMessage glmsg;
   11646     GLTraceContext *glContext = getGLTraceContext();
   11647 
   11648     glmsg.set_function(GLMessage::glEndPerfMonitorAMD);
   11649 
   11650     // copy argument monitor
   11651     GLMessage_DataType *arg_monitor = glmsg.add_args();
   11652     arg_monitor->set_isarray(false);
   11653     arg_monitor->set_type(GLMessage::DataType::INT);
   11654     arg_monitor->add_intvalue(monitor);
   11655 
   11656     // call function
   11657     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11658     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11659     glContext->hooks->gl.glEndPerfMonitorAMD(monitor);
   11660     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11661     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11662 
   11663     void *pointerArgs[] = {
   11664     };
   11665 
   11666     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11667                               threadStartTime, threadEndTime,
   11668                               &glmsg, pointerArgs);
   11669     glContext->traceGLMessage(&glmsg);
   11670 }
   11671 
   11672 void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) {
   11673     GLMessage glmsg;
   11674     GLTraceContext *glContext = getGLTraceContext();
   11675 
   11676     glmsg.set_function(GLMessage::glGetPerfMonitorCounterDataAMD);
   11677 
   11678     // copy argument monitor
   11679     GLMessage_DataType *arg_monitor = glmsg.add_args();
   11680     arg_monitor->set_isarray(false);
   11681     arg_monitor->set_type(GLMessage::DataType::INT);
   11682     arg_monitor->add_intvalue(monitor);
   11683 
   11684     // copy argument pname
   11685     GLMessage_DataType *arg_pname = glmsg.add_args();
   11686     arg_pname->set_isarray(false);
   11687     arg_pname->set_type(GLMessage::DataType::ENUM);
   11688     arg_pname->add_intvalue((int)pname);
   11689 
   11690     // copy argument dataSize
   11691     GLMessage_DataType *arg_dataSize = glmsg.add_args();
   11692     arg_dataSize->set_isarray(false);
   11693     arg_dataSize->set_type(GLMessage::DataType::INT);
   11694     arg_dataSize->add_intvalue(dataSize);
   11695 
   11696     // copy argument data
   11697     GLMessage_DataType *arg_data = glmsg.add_args();
   11698     arg_data->set_isarray(false);
   11699     arg_data->set_type(GLMessage::DataType::INT);
   11700     arg_data->add_intvalue((int)data);
   11701 
   11702     // copy argument bytesWritten
   11703     GLMessage_DataType *arg_bytesWritten = glmsg.add_args();
   11704     arg_bytesWritten->set_isarray(false);
   11705     arg_bytesWritten->set_type(GLMessage::DataType::INT);
   11706     arg_bytesWritten->add_intvalue((int)bytesWritten);
   11707 
   11708     // call function
   11709     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11710     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11711     glContext->hooks->gl.glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten);
   11712     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11713     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11714 
   11715     void *pointerArgs[] = {
   11716         (void *) data,
   11717         (void *) bytesWritten,
   11718     };
   11719 
   11720     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11721                               threadStartTime, threadEndTime,
   11722                               &glmsg, pointerArgs);
   11723     glContext->traceGLMessage(&glmsg);
   11724 }
   11725 
   11726 void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) {
   11727     GLMessage glmsg;
   11728     GLTraceContext *glContext = getGLTraceContext();
   11729 
   11730     glmsg.set_function(GLMessage::glBlitFramebufferANGLE);
   11731 
   11732     // copy argument srcX0
   11733     GLMessage_DataType *arg_srcX0 = glmsg.add_args();
   11734     arg_srcX0->set_isarray(false);
   11735     arg_srcX0->set_type(GLMessage::DataType::INT);
   11736     arg_srcX0->add_intvalue(srcX0);
   11737 
   11738     // copy argument srcY0
   11739     GLMessage_DataType *arg_srcY0 = glmsg.add_args();
   11740     arg_srcY0->set_isarray(false);
   11741     arg_srcY0->set_type(GLMessage::DataType::INT);
   11742     arg_srcY0->add_intvalue(srcY0);
   11743 
   11744     // copy argument srcX1
   11745     GLMessage_DataType *arg_srcX1 = glmsg.add_args();
   11746     arg_srcX1->set_isarray(false);
   11747     arg_srcX1->set_type(GLMessage::DataType::INT);
   11748     arg_srcX1->add_intvalue(srcX1);
   11749 
   11750     // copy argument srcY1
   11751     GLMessage_DataType *arg_srcY1 = glmsg.add_args();
   11752     arg_srcY1->set_isarray(false);
   11753     arg_srcY1->set_type(GLMessage::DataType::INT);
   11754     arg_srcY1->add_intvalue(srcY1);
   11755 
   11756     // copy argument dstX0
   11757     GLMessage_DataType *arg_dstX0 = glmsg.add_args();
   11758     arg_dstX0->set_isarray(false);
   11759     arg_dstX0->set_type(GLMessage::DataType::INT);
   11760     arg_dstX0->add_intvalue(dstX0);
   11761 
   11762     // copy argument dstY0
   11763     GLMessage_DataType *arg_dstY0 = glmsg.add_args();
   11764     arg_dstY0->set_isarray(false);
   11765     arg_dstY0->set_type(GLMessage::DataType::INT);
   11766     arg_dstY0->add_intvalue(dstY0);
   11767 
   11768     // copy argument dstX1
   11769     GLMessage_DataType *arg_dstX1 = glmsg.add_args();
   11770     arg_dstX1->set_isarray(false);
   11771     arg_dstX1->set_type(GLMessage::DataType::INT);
   11772     arg_dstX1->add_intvalue(dstX1);
   11773 
   11774     // copy argument dstY1
   11775     GLMessage_DataType *arg_dstY1 = glmsg.add_args();
   11776     arg_dstY1->set_isarray(false);
   11777     arg_dstY1->set_type(GLMessage::DataType::INT);
   11778     arg_dstY1->add_intvalue(dstY1);
   11779 
   11780     // copy argument mask
   11781     GLMessage_DataType *arg_mask = glmsg.add_args();
   11782     arg_mask->set_isarray(false);
   11783     arg_mask->set_type(GLMessage::DataType::INT);
   11784     arg_mask->add_intvalue(mask);
   11785 
   11786     // copy argument filter
   11787     GLMessage_DataType *arg_filter = glmsg.add_args();
   11788     arg_filter->set_isarray(false);
   11789     arg_filter->set_type(GLMessage::DataType::ENUM);
   11790     arg_filter->add_intvalue((int)filter);
   11791 
   11792     // call function
   11793     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11794     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11795     glContext->hooks->gl.glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
   11796     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11797     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11798 
   11799     void *pointerArgs[] = {
   11800     };
   11801 
   11802     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11803                               threadStartTime, threadEndTime,
   11804                               &glmsg, pointerArgs);
   11805     glContext->traceGLMessage(&glmsg);
   11806 }
   11807 
   11808 void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   11809     GLMessage glmsg;
   11810     GLTraceContext *glContext = getGLTraceContext();
   11811 
   11812     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleANGLE);
   11813 
   11814     // copy argument target
   11815     GLMessage_DataType *arg_target = glmsg.add_args();
   11816     arg_target->set_isarray(false);
   11817     arg_target->set_type(GLMessage::DataType::ENUM);
   11818     arg_target->add_intvalue((int)target);
   11819 
   11820     // copy argument samples
   11821     GLMessage_DataType *arg_samples = glmsg.add_args();
   11822     arg_samples->set_isarray(false);
   11823     arg_samples->set_type(GLMessage::DataType::INT);
   11824     arg_samples->add_intvalue(samples);
   11825 
   11826     // copy argument internalformat
   11827     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   11828     arg_internalformat->set_isarray(false);
   11829     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   11830     arg_internalformat->add_intvalue((int)internalformat);
   11831 
   11832     // copy argument width
   11833     GLMessage_DataType *arg_width = glmsg.add_args();
   11834     arg_width->set_isarray(false);
   11835     arg_width->set_type(GLMessage::DataType::INT);
   11836     arg_width->add_intvalue(width);
   11837 
   11838     // copy argument height
   11839     GLMessage_DataType *arg_height = glmsg.add_args();
   11840     arg_height->set_isarray(false);
   11841     arg_height->set_type(GLMessage::DataType::INT);
   11842     arg_height->add_intvalue(height);
   11843 
   11844     // call function
   11845     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11846     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11847     glContext->hooks->gl.glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height);
   11848     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11849     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11850 
   11851     void *pointerArgs[] = {
   11852     };
   11853 
   11854     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11855                               threadStartTime, threadEndTime,
   11856                               &glmsg, pointerArgs);
   11857     glContext->traceGLMessage(&glmsg);
   11858 }
   11859 
   11860 void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   11861     GLMessage glmsg;
   11862     GLTraceContext *glContext = getGLTraceContext();
   11863 
   11864     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleAPPLE);
   11865 
   11866     // copy argument target
   11867     GLMessage_DataType *arg_target = glmsg.add_args();
   11868     arg_target->set_isarray(false);
   11869     arg_target->set_type(GLMessage::DataType::ENUM);
   11870     arg_target->add_intvalue((int)target);
   11871 
   11872     // copy argument samples
   11873     GLMessage_DataType *arg_samples = glmsg.add_args();
   11874     arg_samples->set_isarray(false);
   11875     arg_samples->set_type(GLMessage::DataType::INT);
   11876     arg_samples->add_intvalue(samples);
   11877 
   11878     // copy argument internalformat
   11879     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   11880     arg_internalformat->set_isarray(false);
   11881     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   11882     arg_internalformat->add_intvalue((int)internalformat);
   11883 
   11884     // copy argument width
   11885     GLMessage_DataType *arg_width = glmsg.add_args();
   11886     arg_width->set_isarray(false);
   11887     arg_width->set_type(GLMessage::DataType::INT);
   11888     arg_width->add_intvalue(width);
   11889 
   11890     // copy argument height
   11891     GLMessage_DataType *arg_height = glmsg.add_args();
   11892     arg_height->set_isarray(false);
   11893     arg_height->set_type(GLMessage::DataType::INT);
   11894     arg_height->add_intvalue(height);
   11895 
   11896     // call function
   11897     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11898     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11899     glContext->hooks->gl.glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height);
   11900     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11901     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11902 
   11903     void *pointerArgs[] = {
   11904     };
   11905 
   11906     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11907                               threadStartTime, threadEndTime,
   11908                               &glmsg, pointerArgs);
   11909     glContext->traceGLMessage(&glmsg);
   11910 }
   11911 
   11912 void GLTrace_glResolveMultisampleFramebufferAPPLE(void) {
   11913     GLMessage glmsg;
   11914     GLTraceContext *glContext = getGLTraceContext();
   11915 
   11916     glmsg.set_function(GLMessage::glResolveMultisampleFramebufferAPPLE);
   11917 
   11918     // call function
   11919     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11920     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11921     glContext->hooks->gl.glResolveMultisampleFramebufferAPPLE();
   11922     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11923     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11924 
   11925     void *pointerArgs[] = {
   11926     };
   11927 
   11928     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11929                               threadStartTime, threadEndTime,
   11930                               &glmsg, pointerArgs);
   11931     glContext->traceGLMessage(&glmsg);
   11932 }
   11933 
   11934 void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar *label) {
   11935     GLMessage glmsg;
   11936     GLTraceContext *glContext = getGLTraceContext();
   11937 
   11938     glmsg.set_function(GLMessage::glLabelObjectEXT);
   11939 
   11940     // copy argument type
   11941     GLMessage_DataType *arg_type = glmsg.add_args();
   11942     arg_type->set_isarray(false);
   11943     arg_type->set_type(GLMessage::DataType::ENUM);
   11944     arg_type->add_intvalue((int)type);
   11945 
   11946     // copy argument object
   11947     GLMessage_DataType *arg_object = glmsg.add_args();
   11948     arg_object->set_isarray(false);
   11949     arg_object->set_type(GLMessage::DataType::INT);
   11950     arg_object->add_intvalue(object);
   11951 
   11952     // copy argument length
   11953     GLMessage_DataType *arg_length = glmsg.add_args();
   11954     arg_length->set_isarray(false);
   11955     arg_length->set_type(GLMessage::DataType::INT);
   11956     arg_length->add_intvalue(length);
   11957 
   11958     // copy argument label
   11959     GLMessage_DataType *arg_label = glmsg.add_args();
   11960     arg_label->set_isarray(false);
   11961     arg_label->set_type(GLMessage::DataType::INT);
   11962     arg_label->add_intvalue((int)label);
   11963 
   11964     // call function
   11965     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11966     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   11967     glContext->hooks->gl.glLabelObjectEXT(type, object, length, label);
   11968     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   11969     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   11970 
   11971     void *pointerArgs[] = {
   11972         (void *) label,
   11973     };
   11974 
   11975     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   11976                               threadStartTime, threadEndTime,
   11977                               &glmsg, pointerArgs);
   11978     glContext->traceGLMessage(&glmsg);
   11979 }
   11980 
   11981 void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei *length, GLchar *label) {
   11982     GLMessage glmsg;
   11983     GLTraceContext *glContext = getGLTraceContext();
   11984 
   11985     glmsg.set_function(GLMessage::glGetObjectLabelEXT);
   11986 
   11987     // copy argument type
   11988     GLMessage_DataType *arg_type = glmsg.add_args();
   11989     arg_type->set_isarray(false);
   11990     arg_type->set_type(GLMessage::DataType::ENUM);
   11991     arg_type->add_intvalue((int)type);
   11992 
   11993     // copy argument object
   11994     GLMessage_DataType *arg_object = glmsg.add_args();
   11995     arg_object->set_isarray(false);
   11996     arg_object->set_type(GLMessage::DataType::INT);
   11997     arg_object->add_intvalue(object);
   11998 
   11999     // copy argument bufSize
   12000     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   12001     arg_bufSize->set_isarray(false);
   12002     arg_bufSize->set_type(GLMessage::DataType::INT);
   12003     arg_bufSize->add_intvalue(bufSize);
   12004 
   12005     // copy argument length
   12006     GLMessage_DataType *arg_length = glmsg.add_args();
   12007     arg_length->set_isarray(false);
   12008     arg_length->set_type(GLMessage::DataType::INT);
   12009     arg_length->add_intvalue((int)length);
   12010 
   12011     // copy argument label
   12012     GLMessage_DataType *arg_label = glmsg.add_args();
   12013     arg_label->set_isarray(false);
   12014     arg_label->set_type(GLMessage::DataType::INT);
   12015     arg_label->add_intvalue((int)label);
   12016 
   12017     // call function
   12018     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12019     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12020     glContext->hooks->gl.glGetObjectLabelEXT(type, object, bufSize, length, label);
   12021     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12022     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12023 
   12024     void *pointerArgs[] = {
   12025         (void *) length,
   12026         (void *) label,
   12027     };
   12028 
   12029     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12030                               threadStartTime, threadEndTime,
   12031                               &glmsg, pointerArgs);
   12032     glContext->traceGLMessage(&glmsg);
   12033 }
   12034 
   12035 void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar *marker) {
   12036     GLMessage glmsg;
   12037     GLTraceContext *glContext = getGLTraceContext();
   12038 
   12039     glmsg.set_function(GLMessage::glInsertEventMarkerEXT);
   12040 
   12041     // copy argument length
   12042     GLMessage_DataType *arg_length = glmsg.add_args();
   12043     arg_length->set_isarray(false);
   12044     arg_length->set_type(GLMessage::DataType::INT);
   12045     arg_length->add_intvalue(length);
   12046 
   12047     // copy argument marker
   12048     GLMessage_DataType *arg_marker = glmsg.add_args();
   12049     arg_marker->set_isarray(false);
   12050     arg_marker->set_type(GLMessage::DataType::INT);
   12051     arg_marker->add_intvalue((int)marker);
   12052 
   12053     // call function
   12054     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12055     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12056     glContext->hooks->gl.glInsertEventMarkerEXT(length, marker);
   12057     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12058     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12059 
   12060     void *pointerArgs[] = {
   12061         (void *) marker,
   12062     };
   12063 
   12064     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12065                               threadStartTime, threadEndTime,
   12066                               &glmsg, pointerArgs);
   12067     glContext->traceGLMessage(&glmsg);
   12068 }
   12069 
   12070 void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar *marker) {
   12071     GLMessage glmsg;
   12072     GLTraceContext *glContext = getGLTraceContext();
   12073 
   12074     glmsg.set_function(GLMessage::glPushGroupMarkerEXT);
   12075 
   12076     // copy argument length
   12077     GLMessage_DataType *arg_length = glmsg.add_args();
   12078     arg_length->set_isarray(false);
   12079     arg_length->set_type(GLMessage::DataType::INT);
   12080     arg_length->add_intvalue(length);
   12081 
   12082     // copy argument marker
   12083     GLMessage_DataType *arg_marker = glmsg.add_args();
   12084     arg_marker->set_isarray(false);
   12085     arg_marker->set_type(GLMessage::DataType::INT);
   12086     arg_marker->add_intvalue((int)marker);
   12087 
   12088     // call function
   12089     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12090     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12091     glContext->hooks->gl.glPushGroupMarkerEXT(length, marker);
   12092     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12093     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12094 
   12095     void *pointerArgs[] = {
   12096         (void *) marker,
   12097     };
   12098 
   12099     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12100                               threadStartTime, threadEndTime,
   12101                               &glmsg, pointerArgs);
   12102     glContext->traceGLMessage(&glmsg);
   12103 }
   12104 
   12105 void GLTrace_glPopGroupMarkerEXT(void) {
   12106     GLMessage glmsg;
   12107     GLTraceContext *glContext = getGLTraceContext();
   12108 
   12109     glmsg.set_function(GLMessage::glPopGroupMarkerEXT);
   12110 
   12111     // call function
   12112     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12113     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12114     glContext->hooks->gl.glPopGroupMarkerEXT();
   12115     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12116     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12117 
   12118     void *pointerArgs[] = {
   12119     };
   12120 
   12121     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12122                               threadStartTime, threadEndTime,
   12123                               &glmsg, pointerArgs);
   12124     glContext->traceGLMessage(&glmsg);
   12125 }
   12126 
   12127 void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) {
   12128     GLMessage glmsg;
   12129     GLTraceContext *glContext = getGLTraceContext();
   12130 
   12131     glmsg.set_function(GLMessage::glDiscardFramebufferEXT);
   12132 
   12133     // copy argument target
   12134     GLMessage_DataType *arg_target = glmsg.add_args();
   12135     arg_target->set_isarray(false);
   12136     arg_target->set_type(GLMessage::DataType::ENUM);
   12137     arg_target->add_intvalue((int)target);
   12138 
   12139     // copy argument numAttachments
   12140     GLMessage_DataType *arg_numAttachments = glmsg.add_args();
   12141     arg_numAttachments->set_isarray(false);
   12142     arg_numAttachments->set_type(GLMessage::DataType::INT);
   12143     arg_numAttachments->add_intvalue(numAttachments);
   12144 
   12145     // copy argument attachments
   12146     GLMessage_DataType *arg_attachments = glmsg.add_args();
   12147     arg_attachments->set_isarray(false);
   12148     arg_attachments->set_type(GLMessage::DataType::INT);
   12149     arg_attachments->add_intvalue((int)attachments);
   12150 
   12151     // call function
   12152     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12153     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12154     glContext->hooks->gl.glDiscardFramebufferEXT(target, numAttachments, attachments);
   12155     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12156     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12157 
   12158     void *pointerArgs[] = {
   12159         (void *) attachments,
   12160     };
   12161 
   12162     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12163                               threadStartTime, threadEndTime,
   12164                               &glmsg, pointerArgs);
   12165     glContext->traceGLMessage(&glmsg);
   12166 }
   12167 
   12168 void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   12169     GLMessage glmsg;
   12170     GLTraceContext *glContext = getGLTraceContext();
   12171 
   12172     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT);
   12173 
   12174     // copy argument target
   12175     GLMessage_DataType *arg_target = glmsg.add_args();
   12176     arg_target->set_isarray(false);
   12177     arg_target->set_type(GLMessage::DataType::ENUM);
   12178     arg_target->add_intvalue((int)target);
   12179 
   12180     // copy argument samples
   12181     GLMessage_DataType *arg_samples = glmsg.add_args();
   12182     arg_samples->set_isarray(false);
   12183     arg_samples->set_type(GLMessage::DataType::INT);
   12184     arg_samples->add_intvalue(samples);
   12185 
   12186     // copy argument internalformat
   12187     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   12188     arg_internalformat->set_isarray(false);
   12189     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   12190     arg_internalformat->add_intvalue((int)internalformat);
   12191 
   12192     // copy argument width
   12193     GLMessage_DataType *arg_width = glmsg.add_args();
   12194     arg_width->set_isarray(false);
   12195     arg_width->set_type(GLMessage::DataType::INT);
   12196     arg_width->add_intvalue(width);
   12197 
   12198     // copy argument height
   12199     GLMessage_DataType *arg_height = glmsg.add_args();
   12200     arg_height->set_isarray(false);
   12201     arg_height->set_type(GLMessage::DataType::INT);
   12202     arg_height->add_intvalue(height);
   12203 
   12204     // call function
   12205     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12206     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12207     glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height);
   12208     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12209     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12210 
   12211     void *pointerArgs[] = {
   12212     };
   12213 
   12214     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12215                               threadStartTime, threadEndTime,
   12216                               &glmsg, pointerArgs);
   12217     glContext->traceGLMessage(&glmsg);
   12218 }
   12219 
   12220 void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
   12221     GLMessage glmsg;
   12222     GLTraceContext *glContext = getGLTraceContext();
   12223 
   12224     glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT);
   12225 
   12226     // copy argument target
   12227     GLMessage_DataType *arg_target = glmsg.add_args();
   12228     arg_target->set_isarray(false);
   12229     arg_target->set_type(GLMessage::DataType::ENUM);
   12230     arg_target->add_intvalue((int)target);
   12231 
   12232     // copy argument attachment
   12233     GLMessage_DataType *arg_attachment = glmsg.add_args();
   12234     arg_attachment->set_isarray(false);
   12235     arg_attachment->set_type(GLMessage::DataType::ENUM);
   12236     arg_attachment->add_intvalue((int)attachment);
   12237 
   12238     // copy argument textarget
   12239     GLMessage_DataType *arg_textarget = glmsg.add_args();
   12240     arg_textarget->set_isarray(false);
   12241     arg_textarget->set_type(GLMessage::DataType::ENUM);
   12242     arg_textarget->add_intvalue((int)textarget);
   12243 
   12244     // copy argument texture
   12245     GLMessage_DataType *arg_texture = glmsg.add_args();
   12246     arg_texture->set_isarray(false);
   12247     arg_texture->set_type(GLMessage::DataType::INT);
   12248     arg_texture->add_intvalue(texture);
   12249 
   12250     // copy argument level
   12251     GLMessage_DataType *arg_level = glmsg.add_args();
   12252     arg_level->set_isarray(false);
   12253     arg_level->set_type(GLMessage::DataType::INT);
   12254     arg_level->add_intvalue(level);
   12255 
   12256     // copy argument samples
   12257     GLMessage_DataType *arg_samples = glmsg.add_args();
   12258     arg_samples->set_isarray(false);
   12259     arg_samples->set_type(GLMessage::DataType::INT);
   12260     arg_samples->add_intvalue(samples);
   12261 
   12262     // call function
   12263     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12264     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12265     glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples);
   12266     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12267     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12268 
   12269     void *pointerArgs[] = {
   12270     };
   12271 
   12272     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12273                               threadStartTime, threadEndTime,
   12274                               &glmsg, pointerArgs);
   12275     glContext->traceGLMessage(&glmsg);
   12276 }
   12277 
   12278 void GLTrace_glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) {
   12279     GLMessage glmsg;
   12280     GLTraceContext *glContext = getGLTraceContext();
   12281 
   12282     glmsg.set_function(GLMessage::glMultiDrawArraysEXT);
   12283 
   12284     // copy argument mode
   12285     GLMessage_DataType *arg_mode = glmsg.add_args();
   12286     arg_mode->set_isarray(false);
   12287     arg_mode->set_type(GLMessage::DataType::ENUM);
   12288     arg_mode->add_intvalue((int)mode);
   12289 
   12290     // copy argument first
   12291     GLMessage_DataType *arg_first = glmsg.add_args();
   12292     arg_first->set_isarray(false);
   12293     arg_first->set_type(GLMessage::DataType::INT);
   12294     arg_first->add_intvalue((int)first);
   12295 
   12296     // copy argument count
   12297     GLMessage_DataType *arg_count = glmsg.add_args();
   12298     arg_count->set_isarray(false);
   12299     arg_count->set_type(GLMessage::DataType::INT);
   12300     arg_count->add_intvalue((int)count);
   12301 
   12302     // copy argument primcount
   12303     GLMessage_DataType *arg_primcount = glmsg.add_args();
   12304     arg_primcount->set_isarray(false);
   12305     arg_primcount->set_type(GLMessage::DataType::INT);
   12306     arg_primcount->add_intvalue(primcount);
   12307 
   12308     // call function
   12309     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12310     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12311     glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount);
   12312     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12313     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12314 
   12315     void *pointerArgs[] = {
   12316         (void *) first,
   12317         (void *) count,
   12318     };
   12319 
   12320     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12321                               threadStartTime, threadEndTime,
   12322                               &glmsg, pointerArgs);
   12323     glContext->traceGLMessage(&glmsg);
   12324 }
   12325 
   12326 void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) {
   12327     GLMessage glmsg;
   12328     GLTraceContext *glContext = getGLTraceContext();
   12329 
   12330     glmsg.set_function(GLMessage::glMultiDrawElementsEXT);
   12331 
   12332     // copy argument mode
   12333     GLMessage_DataType *arg_mode = glmsg.add_args();
   12334     arg_mode->set_isarray(false);
   12335     arg_mode->set_type(GLMessage::DataType::ENUM);
   12336     arg_mode->add_intvalue((int)mode);
   12337 
   12338     // copy argument count
   12339     GLMessage_DataType *arg_count = glmsg.add_args();
   12340     arg_count->set_isarray(false);
   12341     arg_count->set_type(GLMessage::DataType::INT);
   12342     arg_count->add_intvalue((int)count);
   12343 
   12344     // copy argument type
   12345     GLMessage_DataType *arg_type = glmsg.add_args();
   12346     arg_type->set_isarray(false);
   12347     arg_type->set_type(GLMessage::DataType::ENUM);
   12348     arg_type->add_intvalue((int)type);
   12349 
   12350     // copy argument indices
   12351     GLMessage_DataType *arg_indices = glmsg.add_args();
   12352     arg_indices->set_isarray(false);
   12353     arg_indices->set_type(GLMessage::DataType::INT);
   12354     arg_indices->add_intvalue((int)indices);
   12355 
   12356     // copy argument primcount
   12357     GLMessage_DataType *arg_primcount = glmsg.add_args();
   12358     arg_primcount->set_isarray(false);
   12359     arg_primcount->set_type(GLMessage::DataType::INT);
   12360     arg_primcount->add_intvalue(primcount);
   12361 
   12362     // call function
   12363     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12364     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12365     glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount);
   12366     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12367     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12368 
   12369     void *pointerArgs[] = {
   12370         (void *) count,
   12371         (void *) indices,
   12372     };
   12373 
   12374     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12375                               threadStartTime, threadEndTime,
   12376                               &glmsg, pointerArgs);
   12377     glContext->traceGLMessage(&glmsg);
   12378 }
   12379 
   12380 void GLTrace_glGenQueriesEXT(GLsizei n, GLuint *ids) {
   12381     GLMessage glmsg;
   12382     GLTraceContext *glContext = getGLTraceContext();
   12383 
   12384     glmsg.set_function(GLMessage::glGenQueriesEXT);
   12385 
   12386     // copy argument n
   12387     GLMessage_DataType *arg_n = glmsg.add_args();
   12388     arg_n->set_isarray(false);
   12389     arg_n->set_type(GLMessage::DataType::INT);
   12390     arg_n->add_intvalue(n);
   12391 
   12392     // copy argument ids
   12393     GLMessage_DataType *arg_ids = glmsg.add_args();
   12394     arg_ids->set_isarray(false);
   12395     arg_ids->set_type(GLMessage::DataType::INT);
   12396     arg_ids->add_intvalue((int)ids);
   12397 
   12398     // call function
   12399     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12400     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12401     glContext->hooks->gl.glGenQueriesEXT(n, ids);
   12402     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12403     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12404 
   12405     void *pointerArgs[] = {
   12406         (void *) ids,
   12407     };
   12408 
   12409     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12410                               threadStartTime, threadEndTime,
   12411                               &glmsg, pointerArgs);
   12412     glContext->traceGLMessage(&glmsg);
   12413 }
   12414 
   12415 void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint *ids) {
   12416     GLMessage glmsg;
   12417     GLTraceContext *glContext = getGLTraceContext();
   12418 
   12419     glmsg.set_function(GLMessage::glDeleteQueriesEXT);
   12420 
   12421     // copy argument n
   12422     GLMessage_DataType *arg_n = glmsg.add_args();
   12423     arg_n->set_isarray(false);
   12424     arg_n->set_type(GLMessage::DataType::INT);
   12425     arg_n->add_intvalue(n);
   12426 
   12427     // copy argument ids
   12428     GLMessage_DataType *arg_ids = glmsg.add_args();
   12429     arg_ids->set_isarray(false);
   12430     arg_ids->set_type(GLMessage::DataType::INT);
   12431     arg_ids->add_intvalue((int)ids);
   12432 
   12433     // call function
   12434     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12435     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12436     glContext->hooks->gl.glDeleteQueriesEXT(n, ids);
   12437     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12438     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12439 
   12440     void *pointerArgs[] = {
   12441         (void *) ids,
   12442     };
   12443 
   12444     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12445                               threadStartTime, threadEndTime,
   12446                               &glmsg, pointerArgs);
   12447     glContext->traceGLMessage(&glmsg);
   12448 }
   12449 
   12450 GLboolean GLTrace_glIsQueryEXT(GLuint id) {
   12451     GLMessage glmsg;
   12452     GLTraceContext *glContext = getGLTraceContext();
   12453 
   12454     glmsg.set_function(GLMessage::glIsQueryEXT);
   12455 
   12456     // copy argument id
   12457     GLMessage_DataType *arg_id = glmsg.add_args();
   12458     arg_id->set_isarray(false);
   12459     arg_id->set_type(GLMessage::DataType::INT);
   12460     arg_id->add_intvalue(id);
   12461 
   12462     // call function
   12463     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12464     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12465     GLboolean retValue = glContext->hooks->gl.glIsQueryEXT(id);
   12466     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12467     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12468 
   12469     // set return value
   12470     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   12471     rt->set_isarray(false);
   12472     rt->set_type(GLMessage::DataType::BOOL);
   12473     rt->add_boolvalue(retValue);
   12474 
   12475     void *pointerArgs[] = {
   12476     };
   12477 
   12478     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12479                               threadStartTime, threadEndTime,
   12480                               &glmsg, pointerArgs);
   12481     glContext->traceGLMessage(&glmsg);
   12482 
   12483     return retValue;
   12484 }
   12485 
   12486 void GLTrace_glBeginQueryEXT(GLenum target, GLuint id) {
   12487     GLMessage glmsg;
   12488     GLTraceContext *glContext = getGLTraceContext();
   12489 
   12490     glmsg.set_function(GLMessage::glBeginQueryEXT);
   12491 
   12492     // copy argument target
   12493     GLMessage_DataType *arg_target = glmsg.add_args();
   12494     arg_target->set_isarray(false);
   12495     arg_target->set_type(GLMessage::DataType::ENUM);
   12496     arg_target->add_intvalue((int)target);
   12497 
   12498     // copy argument id
   12499     GLMessage_DataType *arg_id = glmsg.add_args();
   12500     arg_id->set_isarray(false);
   12501     arg_id->set_type(GLMessage::DataType::INT);
   12502     arg_id->add_intvalue(id);
   12503 
   12504     // call function
   12505     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12506     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12507     glContext->hooks->gl.glBeginQueryEXT(target, id);
   12508     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12509     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12510 
   12511     void *pointerArgs[] = {
   12512     };
   12513 
   12514     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12515                               threadStartTime, threadEndTime,
   12516                               &glmsg, pointerArgs);
   12517     glContext->traceGLMessage(&glmsg);
   12518 }
   12519 
   12520 void GLTrace_glEndQueryEXT(GLenum target) {
   12521     GLMessage glmsg;
   12522     GLTraceContext *glContext = getGLTraceContext();
   12523 
   12524     glmsg.set_function(GLMessage::glEndQueryEXT);
   12525 
   12526     // copy argument target
   12527     GLMessage_DataType *arg_target = glmsg.add_args();
   12528     arg_target->set_isarray(false);
   12529     arg_target->set_type(GLMessage::DataType::ENUM);
   12530     arg_target->add_intvalue((int)target);
   12531 
   12532     // call function
   12533     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12534     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12535     glContext->hooks->gl.glEndQueryEXT(target);
   12536     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12537     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12538 
   12539     void *pointerArgs[] = {
   12540     };
   12541 
   12542     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12543                               threadStartTime, threadEndTime,
   12544                               &glmsg, pointerArgs);
   12545     glContext->traceGLMessage(&glmsg);
   12546 }
   12547 
   12548 void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint *params) {
   12549     GLMessage glmsg;
   12550     GLTraceContext *glContext = getGLTraceContext();
   12551 
   12552     glmsg.set_function(GLMessage::glGetQueryivEXT);
   12553 
   12554     // copy argument target
   12555     GLMessage_DataType *arg_target = glmsg.add_args();
   12556     arg_target->set_isarray(false);
   12557     arg_target->set_type(GLMessage::DataType::ENUM);
   12558     arg_target->add_intvalue((int)target);
   12559 
   12560     // copy argument pname
   12561     GLMessage_DataType *arg_pname = glmsg.add_args();
   12562     arg_pname->set_isarray(false);
   12563     arg_pname->set_type(GLMessage::DataType::ENUM);
   12564     arg_pname->add_intvalue((int)pname);
   12565 
   12566     // copy argument params
   12567     GLMessage_DataType *arg_params = glmsg.add_args();
   12568     arg_params->set_isarray(false);
   12569     arg_params->set_type(GLMessage::DataType::INT);
   12570     arg_params->add_intvalue((int)params);
   12571 
   12572     // call function
   12573     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12574     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12575     glContext->hooks->gl.glGetQueryivEXT(target, pname, params);
   12576     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12577     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12578 
   12579     void *pointerArgs[] = {
   12580         (void *) params,
   12581     };
   12582 
   12583     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12584                               threadStartTime, threadEndTime,
   12585                               &glmsg, pointerArgs);
   12586     glContext->traceGLMessage(&glmsg);
   12587 }
   12588 
   12589 void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint *params) {
   12590     GLMessage glmsg;
   12591     GLTraceContext *glContext = getGLTraceContext();
   12592 
   12593     glmsg.set_function(GLMessage::glGetQueryObjectuivEXT);
   12594 
   12595     // copy argument id
   12596     GLMessage_DataType *arg_id = glmsg.add_args();
   12597     arg_id->set_isarray(false);
   12598     arg_id->set_type(GLMessage::DataType::INT);
   12599     arg_id->add_intvalue(id);
   12600 
   12601     // copy argument pname
   12602     GLMessage_DataType *arg_pname = glmsg.add_args();
   12603     arg_pname->set_isarray(false);
   12604     arg_pname->set_type(GLMessage::DataType::ENUM);
   12605     arg_pname->add_intvalue((int)pname);
   12606 
   12607     // copy argument params
   12608     GLMessage_DataType *arg_params = glmsg.add_args();
   12609     arg_params->set_isarray(false);
   12610     arg_params->set_type(GLMessage::DataType::INT);
   12611     arg_params->add_intvalue((int)params);
   12612 
   12613     // call function
   12614     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12615     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12616     glContext->hooks->gl.glGetQueryObjectuivEXT(id, pname, params);
   12617     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12618     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12619 
   12620     void *pointerArgs[] = {
   12621         (void *) params,
   12622     };
   12623 
   12624     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12625                               threadStartTime, threadEndTime,
   12626                               &glmsg, pointerArgs);
   12627     glContext->traceGLMessage(&glmsg);
   12628 }
   12629 
   12630 GLenum GLTrace_glGetGraphicsResetStatusEXT(void) {
   12631     GLMessage glmsg;
   12632     GLTraceContext *glContext = getGLTraceContext();
   12633 
   12634     glmsg.set_function(GLMessage::glGetGraphicsResetStatusEXT);
   12635 
   12636     // call function
   12637     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12638     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12639     GLenum retValue = glContext->hooks->gl.glGetGraphicsResetStatusEXT();
   12640     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12641     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12642 
   12643     // set return value
   12644     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   12645     rt->set_isarray(false);
   12646     rt->set_type(GLMessage::DataType::ENUM);
   12647     rt->add_intvalue((int)retValue);
   12648 
   12649     void *pointerArgs[] = {
   12650     };
   12651 
   12652     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12653                               threadStartTime, threadEndTime,
   12654                               &glmsg, pointerArgs);
   12655     glContext->traceGLMessage(&glmsg);
   12656 
   12657     return retValue;
   12658 }
   12659 
   12660 void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) {
   12661     GLMessage glmsg;
   12662     GLTraceContext *glContext = getGLTraceContext();
   12663 
   12664     glmsg.set_function(GLMessage::glReadnPixelsEXT);
   12665 
   12666     // copy argument x
   12667     GLMessage_DataType *arg_x = glmsg.add_args();
   12668     arg_x->set_isarray(false);
   12669     arg_x->set_type(GLMessage::DataType::INT);
   12670     arg_x->add_intvalue(x);
   12671 
   12672     // copy argument y
   12673     GLMessage_DataType *arg_y = glmsg.add_args();
   12674     arg_y->set_isarray(false);
   12675     arg_y->set_type(GLMessage::DataType::INT);
   12676     arg_y->add_intvalue(y);
   12677 
   12678     // copy argument width
   12679     GLMessage_DataType *arg_width = glmsg.add_args();
   12680     arg_width->set_isarray(false);
   12681     arg_width->set_type(GLMessage::DataType::INT);
   12682     arg_width->add_intvalue(width);
   12683 
   12684     // copy argument height
   12685     GLMessage_DataType *arg_height = glmsg.add_args();
   12686     arg_height->set_isarray(false);
   12687     arg_height->set_type(GLMessage::DataType::INT);
   12688     arg_height->add_intvalue(height);
   12689 
   12690     // copy argument format
   12691     GLMessage_DataType *arg_format = glmsg.add_args();
   12692     arg_format->set_isarray(false);
   12693     arg_format->set_type(GLMessage::DataType::ENUM);
   12694     arg_format->add_intvalue((int)format);
   12695 
   12696     // copy argument type
   12697     GLMessage_DataType *arg_type = glmsg.add_args();
   12698     arg_type->set_isarray(false);
   12699     arg_type->set_type(GLMessage::DataType::ENUM);
   12700     arg_type->add_intvalue((int)type);
   12701 
   12702     // copy argument bufSize
   12703     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   12704     arg_bufSize->set_isarray(false);
   12705     arg_bufSize->set_type(GLMessage::DataType::INT);
   12706     arg_bufSize->add_intvalue(bufSize);
   12707 
   12708     // copy argument data
   12709     GLMessage_DataType *arg_data = glmsg.add_args();
   12710     arg_data->set_isarray(false);
   12711     arg_data->set_type(GLMessage::DataType::INT);
   12712     arg_data->add_intvalue((int)data);
   12713 
   12714     // call function
   12715     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12716     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12717     glContext->hooks->gl.glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data);
   12718     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12719     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12720 
   12721     void *pointerArgs[] = {
   12722         (void *) data,
   12723     };
   12724 
   12725     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12726                               threadStartTime, threadEndTime,
   12727                               &glmsg, pointerArgs);
   12728     glContext->traceGLMessage(&glmsg);
   12729 }
   12730 
   12731 void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, float *params) {
   12732     GLMessage glmsg;
   12733     GLTraceContext *glContext = getGLTraceContext();
   12734 
   12735     glmsg.set_function(GLMessage::glGetnUniformfvEXT);
   12736 
   12737     // copy argument program
   12738     GLMessage_DataType *arg_program = glmsg.add_args();
   12739     arg_program->set_isarray(false);
   12740     arg_program->set_type(GLMessage::DataType::INT);
   12741     arg_program->add_intvalue(program);
   12742 
   12743     // copy argument location
   12744     GLMessage_DataType *arg_location = glmsg.add_args();
   12745     arg_location->set_isarray(false);
   12746     arg_location->set_type(GLMessage::DataType::INT);
   12747     arg_location->add_intvalue(location);
   12748 
   12749     // copy argument bufSize
   12750     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   12751     arg_bufSize->set_isarray(false);
   12752     arg_bufSize->set_type(GLMessage::DataType::INT);
   12753     arg_bufSize->add_intvalue(bufSize);
   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.glGetnUniformfvEXT(program, location, bufSize, 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_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint *params) {
   12779     GLMessage glmsg;
   12780     GLTraceContext *glContext = getGLTraceContext();
   12781 
   12782     glmsg.set_function(GLMessage::glGetnUniformivEXT);
   12783 
   12784     // copy argument program
   12785     GLMessage_DataType *arg_program = glmsg.add_args();
   12786     arg_program->set_isarray(false);
   12787     arg_program->set_type(GLMessage::DataType::INT);
   12788     arg_program->add_intvalue(program);
   12789 
   12790     // copy argument location
   12791     GLMessage_DataType *arg_location = glmsg.add_args();
   12792     arg_location->set_isarray(false);
   12793     arg_location->set_type(GLMessage::DataType::INT);
   12794     arg_location->add_intvalue(location);
   12795 
   12796     // copy argument bufSize
   12797     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   12798     arg_bufSize->set_isarray(false);
   12799     arg_bufSize->set_type(GLMessage::DataType::INT);
   12800     arg_bufSize->add_intvalue(bufSize);
   12801 
   12802     // copy argument params
   12803     GLMessage_DataType *arg_params = glmsg.add_args();
   12804     arg_params->set_isarray(false);
   12805     arg_params->set_type(GLMessage::DataType::INT);
   12806     arg_params->add_intvalue((int)params);
   12807 
   12808     // call function
   12809     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12810     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12811     glContext->hooks->gl.glGetnUniformivEXT(program, location, bufSize, params);
   12812     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12813     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12814 
   12815     void *pointerArgs[] = {
   12816         (void *) params,
   12817     };
   12818 
   12819     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12820                               threadStartTime, threadEndTime,
   12821                               &glmsg, pointerArgs);
   12822     glContext->traceGLMessage(&glmsg);
   12823 }
   12824 
   12825 void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) {
   12826     GLMessage glmsg;
   12827     GLTraceContext *glContext = getGLTraceContext();
   12828 
   12829     glmsg.set_function(GLMessage::glUseProgramStagesEXT);
   12830 
   12831     // copy argument pipeline
   12832     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   12833     arg_pipeline->set_isarray(false);
   12834     arg_pipeline->set_type(GLMessage::DataType::INT);
   12835     arg_pipeline->add_intvalue(pipeline);
   12836 
   12837     // copy argument stages
   12838     GLMessage_DataType *arg_stages = glmsg.add_args();
   12839     arg_stages->set_isarray(false);
   12840     arg_stages->set_type(GLMessage::DataType::INT);
   12841     arg_stages->add_intvalue(stages);
   12842 
   12843     // copy argument program
   12844     GLMessage_DataType *arg_program = glmsg.add_args();
   12845     arg_program->set_isarray(false);
   12846     arg_program->set_type(GLMessage::DataType::INT);
   12847     arg_program->add_intvalue(program);
   12848 
   12849     // call function
   12850     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12851     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12852     glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program);
   12853     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12854     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12855 
   12856     void *pointerArgs[] = {
   12857     };
   12858 
   12859     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12860                               threadStartTime, threadEndTime,
   12861                               &glmsg, pointerArgs);
   12862     glContext->traceGLMessage(&glmsg);
   12863 }
   12864 
   12865 void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) {
   12866     GLMessage glmsg;
   12867     GLTraceContext *glContext = getGLTraceContext();
   12868 
   12869     glmsg.set_function(GLMessage::glActiveShaderProgramEXT);
   12870 
   12871     // copy argument pipeline
   12872     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   12873     arg_pipeline->set_isarray(false);
   12874     arg_pipeline->set_type(GLMessage::DataType::INT);
   12875     arg_pipeline->add_intvalue(pipeline);
   12876 
   12877     // copy argument program
   12878     GLMessage_DataType *arg_program = glmsg.add_args();
   12879     arg_program->set_isarray(false);
   12880     arg_program->set_type(GLMessage::DataType::INT);
   12881     arg_program->add_intvalue(program);
   12882 
   12883     // call function
   12884     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12885     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12886     glContext->hooks->gl.glActiveShaderProgramEXT(pipeline, program);
   12887     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12888     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12889 
   12890     void *pointerArgs[] = {
   12891     };
   12892 
   12893     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12894                               threadStartTime, threadEndTime,
   12895                               &glmsg, pointerArgs);
   12896     glContext->traceGLMessage(&glmsg);
   12897 }
   12898 
   12899 GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar **strings) {
   12900     GLMessage glmsg;
   12901     GLTraceContext *glContext = getGLTraceContext();
   12902 
   12903     glmsg.set_function(GLMessage::glCreateShaderProgramvEXT);
   12904 
   12905     // copy argument type
   12906     GLMessage_DataType *arg_type = glmsg.add_args();
   12907     arg_type->set_isarray(false);
   12908     arg_type->set_type(GLMessage::DataType::ENUM);
   12909     arg_type->add_intvalue((int)type);
   12910 
   12911     // copy argument count
   12912     GLMessage_DataType *arg_count = glmsg.add_args();
   12913     arg_count->set_isarray(false);
   12914     arg_count->set_type(GLMessage::DataType::INT);
   12915     arg_count->add_intvalue(count);
   12916 
   12917     // copy argument strings
   12918     GLMessage_DataType *arg_strings = glmsg.add_args();
   12919     arg_strings->set_isarray(false);
   12920     arg_strings->set_type(GLMessage::DataType::INT);
   12921     arg_strings->add_intvalue((int)strings);
   12922 
   12923     // call function
   12924     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12925     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12926     GLuint retValue = glContext->hooks->gl.glCreateShaderProgramvEXT(type, count, strings);
   12927     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12928     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12929 
   12930     // set return value
   12931     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   12932     rt->set_isarray(false);
   12933     rt->set_type(GLMessage::DataType::INT);
   12934     rt->add_intvalue(retValue);
   12935 
   12936     void *pointerArgs[] = {
   12937         (void *) strings,
   12938     };
   12939 
   12940     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12941                               threadStartTime, threadEndTime,
   12942                               &glmsg, pointerArgs);
   12943     glContext->traceGLMessage(&glmsg);
   12944 
   12945     return retValue;
   12946 }
   12947 
   12948 void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) {
   12949     GLMessage glmsg;
   12950     GLTraceContext *glContext = getGLTraceContext();
   12951 
   12952     glmsg.set_function(GLMessage::glBindProgramPipelineEXT);
   12953 
   12954     // copy argument pipeline
   12955     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   12956     arg_pipeline->set_isarray(false);
   12957     arg_pipeline->set_type(GLMessage::DataType::INT);
   12958     arg_pipeline->add_intvalue(pipeline);
   12959 
   12960     // call function
   12961     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12962     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12963     glContext->hooks->gl.glBindProgramPipelineEXT(pipeline);
   12964     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12965     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12966 
   12967     void *pointerArgs[] = {
   12968     };
   12969 
   12970     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   12971                               threadStartTime, threadEndTime,
   12972                               &glmsg, pointerArgs);
   12973     glContext->traceGLMessage(&glmsg);
   12974 }
   12975 
   12976 void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint *pipelines) {
   12977     GLMessage glmsg;
   12978     GLTraceContext *glContext = getGLTraceContext();
   12979 
   12980     glmsg.set_function(GLMessage::glDeleteProgramPipelinesEXT);
   12981 
   12982     // copy argument n
   12983     GLMessage_DataType *arg_n = glmsg.add_args();
   12984     arg_n->set_isarray(false);
   12985     arg_n->set_type(GLMessage::DataType::INT);
   12986     arg_n->add_intvalue(n);
   12987 
   12988     // copy argument pipelines
   12989     GLMessage_DataType *arg_pipelines = glmsg.add_args();
   12990     arg_pipelines->set_isarray(false);
   12991     arg_pipelines->set_type(GLMessage::DataType::INT);
   12992     arg_pipelines->add_intvalue((int)pipelines);
   12993 
   12994     // call function
   12995     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   12996     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   12997     glContext->hooks->gl.glDeleteProgramPipelinesEXT(n, pipelines);
   12998     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   12999     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13000 
   13001     void *pointerArgs[] = {
   13002         (void *) pipelines,
   13003     };
   13004 
   13005     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13006                               threadStartTime, threadEndTime,
   13007                               &glmsg, pointerArgs);
   13008     glContext->traceGLMessage(&glmsg);
   13009 }
   13010 
   13011 void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint *pipelines) {
   13012     GLMessage glmsg;
   13013     GLTraceContext *glContext = getGLTraceContext();
   13014 
   13015     glmsg.set_function(GLMessage::glGenProgramPipelinesEXT);
   13016 
   13017     // copy argument n
   13018     GLMessage_DataType *arg_n = glmsg.add_args();
   13019     arg_n->set_isarray(false);
   13020     arg_n->set_type(GLMessage::DataType::INT);
   13021     arg_n->add_intvalue(n);
   13022 
   13023     // copy argument pipelines
   13024     GLMessage_DataType *arg_pipelines = glmsg.add_args();
   13025     arg_pipelines->set_isarray(false);
   13026     arg_pipelines->set_type(GLMessage::DataType::INT);
   13027     arg_pipelines->add_intvalue((int)pipelines);
   13028 
   13029     // call function
   13030     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13031     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13032     glContext->hooks->gl.glGenProgramPipelinesEXT(n, pipelines);
   13033     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13034     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13035 
   13036     void *pointerArgs[] = {
   13037         (void *) pipelines,
   13038     };
   13039 
   13040     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13041                               threadStartTime, threadEndTime,
   13042                               &glmsg, pointerArgs);
   13043     glContext->traceGLMessage(&glmsg);
   13044 }
   13045 
   13046 GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) {
   13047     GLMessage glmsg;
   13048     GLTraceContext *glContext = getGLTraceContext();
   13049 
   13050     glmsg.set_function(GLMessage::glIsProgramPipelineEXT);
   13051 
   13052     // copy argument pipeline
   13053     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   13054     arg_pipeline->set_isarray(false);
   13055     arg_pipeline->set_type(GLMessage::DataType::INT);
   13056     arg_pipeline->add_intvalue(pipeline);
   13057 
   13058     // call function
   13059     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13060     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13061     GLboolean retValue = glContext->hooks->gl.glIsProgramPipelineEXT(pipeline);
   13062     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13063     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13064 
   13065     // set return value
   13066     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   13067     rt->set_isarray(false);
   13068     rt->set_type(GLMessage::DataType::BOOL);
   13069     rt->add_boolvalue(retValue);
   13070 
   13071     void *pointerArgs[] = {
   13072     };
   13073 
   13074     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13075                               threadStartTime, threadEndTime,
   13076                               &glmsg, pointerArgs);
   13077     glContext->traceGLMessage(&glmsg);
   13078 
   13079     return retValue;
   13080 }
   13081 
   13082 void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) {
   13083     GLMessage glmsg;
   13084     GLTraceContext *glContext = getGLTraceContext();
   13085 
   13086     glmsg.set_function(GLMessage::glProgramParameteriEXT);
   13087 
   13088     // copy argument program
   13089     GLMessage_DataType *arg_program = glmsg.add_args();
   13090     arg_program->set_isarray(false);
   13091     arg_program->set_type(GLMessage::DataType::INT);
   13092     arg_program->add_intvalue(program);
   13093 
   13094     // copy argument pname
   13095     GLMessage_DataType *arg_pname = glmsg.add_args();
   13096     arg_pname->set_isarray(false);
   13097     arg_pname->set_type(GLMessage::DataType::ENUM);
   13098     arg_pname->add_intvalue((int)pname);
   13099 
   13100     // copy argument value
   13101     GLMessage_DataType *arg_value = glmsg.add_args();
   13102     arg_value->set_isarray(false);
   13103     arg_value->set_type(GLMessage::DataType::INT);
   13104     arg_value->add_intvalue(value);
   13105 
   13106     // call function
   13107     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13108     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13109     glContext->hooks->gl.glProgramParameteriEXT(program, pname, value);
   13110     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13111     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13112 
   13113     void *pointerArgs[] = {
   13114     };
   13115 
   13116     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13117                               threadStartTime, threadEndTime,
   13118                               &glmsg, pointerArgs);
   13119     glContext->traceGLMessage(&glmsg);
   13120 }
   13121 
   13122 void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint *params) {
   13123     GLMessage glmsg;
   13124     GLTraceContext *glContext = getGLTraceContext();
   13125 
   13126     glmsg.set_function(GLMessage::glGetProgramPipelineivEXT);
   13127 
   13128     // copy argument pipeline
   13129     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   13130     arg_pipeline->set_isarray(false);
   13131     arg_pipeline->set_type(GLMessage::DataType::INT);
   13132     arg_pipeline->add_intvalue(pipeline);
   13133 
   13134     // copy argument pname
   13135     GLMessage_DataType *arg_pname = glmsg.add_args();
   13136     arg_pname->set_isarray(false);
   13137     arg_pname->set_type(GLMessage::DataType::ENUM);
   13138     arg_pname->add_intvalue((int)pname);
   13139 
   13140     // copy argument params
   13141     GLMessage_DataType *arg_params = glmsg.add_args();
   13142     arg_params->set_isarray(false);
   13143     arg_params->set_type(GLMessage::DataType::INT);
   13144     arg_params->add_intvalue((int)params);
   13145 
   13146     // call function
   13147     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13148     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13149     glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params);
   13150     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13151     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13152 
   13153     void *pointerArgs[] = {
   13154         (void *) params,
   13155     };
   13156 
   13157     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13158                               threadStartTime, threadEndTime,
   13159                               &glmsg, pointerArgs);
   13160     glContext->traceGLMessage(&glmsg);
   13161 }
   13162 
   13163 void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint x) {
   13164     GLMessage glmsg;
   13165     GLTraceContext *glContext = getGLTraceContext();
   13166 
   13167     glmsg.set_function(GLMessage::glProgramUniform1iEXT);
   13168 
   13169     // copy argument program
   13170     GLMessage_DataType *arg_program = glmsg.add_args();
   13171     arg_program->set_isarray(false);
   13172     arg_program->set_type(GLMessage::DataType::INT);
   13173     arg_program->add_intvalue(program);
   13174 
   13175     // copy argument location
   13176     GLMessage_DataType *arg_location = glmsg.add_args();
   13177     arg_location->set_isarray(false);
   13178     arg_location->set_type(GLMessage::DataType::INT);
   13179     arg_location->add_intvalue(location);
   13180 
   13181     // copy argument x
   13182     GLMessage_DataType *arg_x = glmsg.add_args();
   13183     arg_x->set_isarray(false);
   13184     arg_x->set_type(GLMessage::DataType::INT);
   13185     arg_x->add_intvalue(x);
   13186 
   13187     // call function
   13188     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13189     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13190     glContext->hooks->gl.glProgramUniform1iEXT(program, location, x);
   13191     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13192     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13193 
   13194     void *pointerArgs[] = {
   13195     };
   13196 
   13197     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13198                               threadStartTime, threadEndTime,
   13199                               &glmsg, pointerArgs);
   13200     glContext->traceGLMessage(&glmsg);
   13201 }
   13202 
   13203 void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint x, GLint y) {
   13204     GLMessage glmsg;
   13205     GLTraceContext *glContext = getGLTraceContext();
   13206 
   13207     glmsg.set_function(GLMessage::glProgramUniform2iEXT);
   13208 
   13209     // copy argument program
   13210     GLMessage_DataType *arg_program = glmsg.add_args();
   13211     arg_program->set_isarray(false);
   13212     arg_program->set_type(GLMessage::DataType::INT);
   13213     arg_program->add_intvalue(program);
   13214 
   13215     // copy argument location
   13216     GLMessage_DataType *arg_location = glmsg.add_args();
   13217     arg_location->set_isarray(false);
   13218     arg_location->set_type(GLMessage::DataType::INT);
   13219     arg_location->add_intvalue(location);
   13220 
   13221     // copy argument x
   13222     GLMessage_DataType *arg_x = glmsg.add_args();
   13223     arg_x->set_isarray(false);
   13224     arg_x->set_type(GLMessage::DataType::INT);
   13225     arg_x->add_intvalue(x);
   13226 
   13227     // copy argument y
   13228     GLMessage_DataType *arg_y = glmsg.add_args();
   13229     arg_y->set_isarray(false);
   13230     arg_y->set_type(GLMessage::DataType::INT);
   13231     arg_y->add_intvalue(y);
   13232 
   13233     // call function
   13234     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13235     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13236     glContext->hooks->gl.glProgramUniform2iEXT(program, location, x, y);
   13237     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13238     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13239 
   13240     void *pointerArgs[] = {
   13241     };
   13242 
   13243     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13244                               threadStartTime, threadEndTime,
   13245                               &glmsg, pointerArgs);
   13246     glContext->traceGLMessage(&glmsg);
   13247 }
   13248 
   13249 void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z) {
   13250     GLMessage glmsg;
   13251     GLTraceContext *glContext = getGLTraceContext();
   13252 
   13253     glmsg.set_function(GLMessage::glProgramUniform3iEXT);
   13254 
   13255     // copy argument program
   13256     GLMessage_DataType *arg_program = glmsg.add_args();
   13257     arg_program->set_isarray(false);
   13258     arg_program->set_type(GLMessage::DataType::INT);
   13259     arg_program->add_intvalue(program);
   13260 
   13261     // copy argument location
   13262     GLMessage_DataType *arg_location = glmsg.add_args();
   13263     arg_location->set_isarray(false);
   13264     arg_location->set_type(GLMessage::DataType::INT);
   13265     arg_location->add_intvalue(location);
   13266 
   13267     // copy argument x
   13268     GLMessage_DataType *arg_x = glmsg.add_args();
   13269     arg_x->set_isarray(false);
   13270     arg_x->set_type(GLMessage::DataType::INT);
   13271     arg_x->add_intvalue(x);
   13272 
   13273     // copy argument y
   13274     GLMessage_DataType *arg_y = glmsg.add_args();
   13275     arg_y->set_isarray(false);
   13276     arg_y->set_type(GLMessage::DataType::INT);
   13277     arg_y->add_intvalue(y);
   13278 
   13279     // copy argument z
   13280     GLMessage_DataType *arg_z = glmsg.add_args();
   13281     arg_z->set_isarray(false);
   13282     arg_z->set_type(GLMessage::DataType::INT);
   13283     arg_z->add_intvalue(z);
   13284 
   13285     // call function
   13286     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13287     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13288     glContext->hooks->gl.glProgramUniform3iEXT(program, location, x, y, z);
   13289     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13290     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13291 
   13292     void *pointerArgs[] = {
   13293     };
   13294 
   13295     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13296                               threadStartTime, threadEndTime,
   13297                               &glmsg, pointerArgs);
   13298     glContext->traceGLMessage(&glmsg);
   13299 }
   13300 
   13301 void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint x, GLint y, GLint z, GLint w) {
   13302     GLMessage glmsg;
   13303     GLTraceContext *glContext = getGLTraceContext();
   13304 
   13305     glmsg.set_function(GLMessage::glProgramUniform4iEXT);
   13306 
   13307     // copy argument program
   13308     GLMessage_DataType *arg_program = glmsg.add_args();
   13309     arg_program->set_isarray(false);
   13310     arg_program->set_type(GLMessage::DataType::INT);
   13311     arg_program->add_intvalue(program);
   13312 
   13313     // copy argument location
   13314     GLMessage_DataType *arg_location = glmsg.add_args();
   13315     arg_location->set_isarray(false);
   13316     arg_location->set_type(GLMessage::DataType::INT);
   13317     arg_location->add_intvalue(location);
   13318 
   13319     // copy argument x
   13320     GLMessage_DataType *arg_x = glmsg.add_args();
   13321     arg_x->set_isarray(false);
   13322     arg_x->set_type(GLMessage::DataType::INT);
   13323     arg_x->add_intvalue(x);
   13324 
   13325     // copy argument y
   13326     GLMessage_DataType *arg_y = glmsg.add_args();
   13327     arg_y->set_isarray(false);
   13328     arg_y->set_type(GLMessage::DataType::INT);
   13329     arg_y->add_intvalue(y);
   13330 
   13331     // copy argument z
   13332     GLMessage_DataType *arg_z = glmsg.add_args();
   13333     arg_z->set_isarray(false);
   13334     arg_z->set_type(GLMessage::DataType::INT);
   13335     arg_z->add_intvalue(z);
   13336 
   13337     // copy argument w
   13338     GLMessage_DataType *arg_w = glmsg.add_args();
   13339     arg_w->set_isarray(false);
   13340     arg_w->set_type(GLMessage::DataType::INT);
   13341     arg_w->add_intvalue(w);
   13342 
   13343     // call function
   13344     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13345     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13346     glContext->hooks->gl.glProgramUniform4iEXT(program, location, x, y, z, w);
   13347     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13348     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13349 
   13350     void *pointerArgs[] = {
   13351     };
   13352 
   13353     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13354                               threadStartTime, threadEndTime,
   13355                               &glmsg, pointerArgs);
   13356     glContext->traceGLMessage(&glmsg);
   13357 }
   13358 
   13359 void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat x) {
   13360     GLMessage glmsg;
   13361     GLTraceContext *glContext = getGLTraceContext();
   13362 
   13363     glmsg.set_function(GLMessage::glProgramUniform1fEXT);
   13364 
   13365     // copy argument program
   13366     GLMessage_DataType *arg_program = glmsg.add_args();
   13367     arg_program->set_isarray(false);
   13368     arg_program->set_type(GLMessage::DataType::INT);
   13369     arg_program->add_intvalue(program);
   13370 
   13371     // copy argument location
   13372     GLMessage_DataType *arg_location = glmsg.add_args();
   13373     arg_location->set_isarray(false);
   13374     arg_location->set_type(GLMessage::DataType::INT);
   13375     arg_location->add_intvalue(location);
   13376 
   13377     // copy argument x
   13378     GLMessage_DataType *arg_x = glmsg.add_args();
   13379     arg_x->set_isarray(false);
   13380     arg_x->set_type(GLMessage::DataType::FLOAT);
   13381     arg_x->add_floatvalue(x);
   13382 
   13383     // call function
   13384     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13385     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13386     glContext->hooks->gl.glProgramUniform1fEXT(program, location, x);
   13387     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13388     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13389 
   13390     void *pointerArgs[] = {
   13391     };
   13392 
   13393     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13394                               threadStartTime, threadEndTime,
   13395                               &glmsg, pointerArgs);
   13396     glContext->traceGLMessage(&glmsg);
   13397 }
   13398 
   13399 void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat x, GLfloat y) {
   13400     GLMessage glmsg;
   13401     GLTraceContext *glContext = getGLTraceContext();
   13402 
   13403     glmsg.set_function(GLMessage::glProgramUniform2fEXT);
   13404 
   13405     // copy argument program
   13406     GLMessage_DataType *arg_program = glmsg.add_args();
   13407     arg_program->set_isarray(false);
   13408     arg_program->set_type(GLMessage::DataType::INT);
   13409     arg_program->add_intvalue(program);
   13410 
   13411     // copy argument location
   13412     GLMessage_DataType *arg_location = glmsg.add_args();
   13413     arg_location->set_isarray(false);
   13414     arg_location->set_type(GLMessage::DataType::INT);
   13415     arg_location->add_intvalue(location);
   13416 
   13417     // copy argument x
   13418     GLMessage_DataType *arg_x = glmsg.add_args();
   13419     arg_x->set_isarray(false);
   13420     arg_x->set_type(GLMessage::DataType::FLOAT);
   13421     arg_x->add_floatvalue(x);
   13422 
   13423     // copy argument y
   13424     GLMessage_DataType *arg_y = glmsg.add_args();
   13425     arg_y->set_isarray(false);
   13426     arg_y->set_type(GLMessage::DataType::FLOAT);
   13427     arg_y->add_floatvalue(y);
   13428 
   13429     // call function
   13430     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13431     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13432     glContext->hooks->gl.glProgramUniform2fEXT(program, location, x, y);
   13433     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13434     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13435 
   13436     void *pointerArgs[] = {
   13437     };
   13438 
   13439     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13440                               threadStartTime, threadEndTime,
   13441                               &glmsg, pointerArgs);
   13442     glContext->traceGLMessage(&glmsg);
   13443 }
   13444 
   13445 void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z) {
   13446     GLMessage glmsg;
   13447     GLTraceContext *glContext = getGLTraceContext();
   13448 
   13449     glmsg.set_function(GLMessage::glProgramUniform3fEXT);
   13450 
   13451     // copy argument program
   13452     GLMessage_DataType *arg_program = glmsg.add_args();
   13453     arg_program->set_isarray(false);
   13454     arg_program->set_type(GLMessage::DataType::INT);
   13455     arg_program->add_intvalue(program);
   13456 
   13457     // copy argument location
   13458     GLMessage_DataType *arg_location = glmsg.add_args();
   13459     arg_location->set_isarray(false);
   13460     arg_location->set_type(GLMessage::DataType::INT);
   13461     arg_location->add_intvalue(location);
   13462 
   13463     // copy argument x
   13464     GLMessage_DataType *arg_x = glmsg.add_args();
   13465     arg_x->set_isarray(false);
   13466     arg_x->set_type(GLMessage::DataType::FLOAT);
   13467     arg_x->add_floatvalue(x);
   13468 
   13469     // copy argument y
   13470     GLMessage_DataType *arg_y = glmsg.add_args();
   13471     arg_y->set_isarray(false);
   13472     arg_y->set_type(GLMessage::DataType::FLOAT);
   13473     arg_y->add_floatvalue(y);
   13474 
   13475     // copy argument z
   13476     GLMessage_DataType *arg_z = glmsg.add_args();
   13477     arg_z->set_isarray(false);
   13478     arg_z->set_type(GLMessage::DataType::FLOAT);
   13479     arg_z->add_floatvalue(z);
   13480 
   13481     // call function
   13482     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13483     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13484     glContext->hooks->gl.glProgramUniform3fEXT(program, location, x, y, z);
   13485     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13486     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13487 
   13488     void *pointerArgs[] = {
   13489     };
   13490 
   13491     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13492                               threadStartTime, threadEndTime,
   13493                               &glmsg, pointerArgs);
   13494     glContext->traceGLMessage(&glmsg);
   13495 }
   13496 
   13497 void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) {
   13498     GLMessage glmsg;
   13499     GLTraceContext *glContext = getGLTraceContext();
   13500 
   13501     glmsg.set_function(GLMessage::glProgramUniform4fEXT);
   13502 
   13503     // copy argument program
   13504     GLMessage_DataType *arg_program = glmsg.add_args();
   13505     arg_program->set_isarray(false);
   13506     arg_program->set_type(GLMessage::DataType::INT);
   13507     arg_program->add_intvalue(program);
   13508 
   13509     // copy argument location
   13510     GLMessage_DataType *arg_location = glmsg.add_args();
   13511     arg_location->set_isarray(false);
   13512     arg_location->set_type(GLMessage::DataType::INT);
   13513     arg_location->add_intvalue(location);
   13514 
   13515     // copy argument x
   13516     GLMessage_DataType *arg_x = glmsg.add_args();
   13517     arg_x->set_isarray(false);
   13518     arg_x->set_type(GLMessage::DataType::FLOAT);
   13519     arg_x->add_floatvalue(x);
   13520 
   13521     // copy argument y
   13522     GLMessage_DataType *arg_y = glmsg.add_args();
   13523     arg_y->set_isarray(false);
   13524     arg_y->set_type(GLMessage::DataType::FLOAT);
   13525     arg_y->add_floatvalue(y);
   13526 
   13527     // copy argument z
   13528     GLMessage_DataType *arg_z = glmsg.add_args();
   13529     arg_z->set_isarray(false);
   13530     arg_z->set_type(GLMessage::DataType::FLOAT);
   13531     arg_z->add_floatvalue(z);
   13532 
   13533     // copy argument w
   13534     GLMessage_DataType *arg_w = glmsg.add_args();
   13535     arg_w->set_isarray(false);
   13536     arg_w->set_type(GLMessage::DataType::FLOAT);
   13537     arg_w->add_floatvalue(w);
   13538 
   13539     // call function
   13540     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13541     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13542     glContext->hooks->gl.glProgramUniform4fEXT(program, location, x, y, z, w);
   13543     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13544     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13545 
   13546     void *pointerArgs[] = {
   13547     };
   13548 
   13549     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13550                               threadStartTime, threadEndTime,
   13551                               &glmsg, pointerArgs);
   13552     glContext->traceGLMessage(&glmsg);
   13553 }
   13554 
   13555 void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   13556     GLMessage glmsg;
   13557     GLTraceContext *glContext = getGLTraceContext();
   13558 
   13559     glmsg.set_function(GLMessage::glProgramUniform1ivEXT);
   13560 
   13561     // copy argument program
   13562     GLMessage_DataType *arg_program = glmsg.add_args();
   13563     arg_program->set_isarray(false);
   13564     arg_program->set_type(GLMessage::DataType::INT);
   13565     arg_program->add_intvalue(program);
   13566 
   13567     // copy argument location
   13568     GLMessage_DataType *arg_location = glmsg.add_args();
   13569     arg_location->set_isarray(false);
   13570     arg_location->set_type(GLMessage::DataType::INT);
   13571     arg_location->add_intvalue(location);
   13572 
   13573     // copy argument count
   13574     GLMessage_DataType *arg_count = glmsg.add_args();
   13575     arg_count->set_isarray(false);
   13576     arg_count->set_type(GLMessage::DataType::INT);
   13577     arg_count->add_intvalue(count);
   13578 
   13579     // copy argument value
   13580     GLMessage_DataType *arg_value = glmsg.add_args();
   13581     arg_value->set_isarray(false);
   13582     arg_value->set_type(GLMessage::DataType::INT);
   13583     arg_value->add_intvalue((int)value);
   13584 
   13585     // call function
   13586     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13587     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13588     glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value);
   13589     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13590     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13591 
   13592     void *pointerArgs[] = {
   13593         (void *) value,
   13594     };
   13595 
   13596     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13597                               threadStartTime, threadEndTime,
   13598                               &glmsg, pointerArgs);
   13599     glContext->traceGLMessage(&glmsg);
   13600 }
   13601 
   13602 void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   13603     GLMessage glmsg;
   13604     GLTraceContext *glContext = getGLTraceContext();
   13605 
   13606     glmsg.set_function(GLMessage::glProgramUniform2ivEXT);
   13607 
   13608     // copy argument program
   13609     GLMessage_DataType *arg_program = glmsg.add_args();
   13610     arg_program->set_isarray(false);
   13611     arg_program->set_type(GLMessage::DataType::INT);
   13612     arg_program->add_intvalue(program);
   13613 
   13614     // copy argument location
   13615     GLMessage_DataType *arg_location = glmsg.add_args();
   13616     arg_location->set_isarray(false);
   13617     arg_location->set_type(GLMessage::DataType::INT);
   13618     arg_location->add_intvalue(location);
   13619 
   13620     // copy argument count
   13621     GLMessage_DataType *arg_count = glmsg.add_args();
   13622     arg_count->set_isarray(false);
   13623     arg_count->set_type(GLMessage::DataType::INT);
   13624     arg_count->add_intvalue(count);
   13625 
   13626     // copy argument value
   13627     GLMessage_DataType *arg_value = glmsg.add_args();
   13628     arg_value->set_isarray(false);
   13629     arg_value->set_type(GLMessage::DataType::INT);
   13630     arg_value->add_intvalue((int)value);
   13631 
   13632     // call function
   13633     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13634     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13635     glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value);
   13636     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13637     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13638 
   13639     void *pointerArgs[] = {
   13640         (void *) value,
   13641     };
   13642 
   13643     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13644                               threadStartTime, threadEndTime,
   13645                               &glmsg, pointerArgs);
   13646     glContext->traceGLMessage(&glmsg);
   13647 }
   13648 
   13649 void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   13650     GLMessage glmsg;
   13651     GLTraceContext *glContext = getGLTraceContext();
   13652 
   13653     glmsg.set_function(GLMessage::glProgramUniform3ivEXT);
   13654 
   13655     // copy argument program
   13656     GLMessage_DataType *arg_program = glmsg.add_args();
   13657     arg_program->set_isarray(false);
   13658     arg_program->set_type(GLMessage::DataType::INT);
   13659     arg_program->add_intvalue(program);
   13660 
   13661     // copy argument location
   13662     GLMessage_DataType *arg_location = glmsg.add_args();
   13663     arg_location->set_isarray(false);
   13664     arg_location->set_type(GLMessage::DataType::INT);
   13665     arg_location->add_intvalue(location);
   13666 
   13667     // copy argument count
   13668     GLMessage_DataType *arg_count = glmsg.add_args();
   13669     arg_count->set_isarray(false);
   13670     arg_count->set_type(GLMessage::DataType::INT);
   13671     arg_count->add_intvalue(count);
   13672 
   13673     // copy argument value
   13674     GLMessage_DataType *arg_value = glmsg.add_args();
   13675     arg_value->set_isarray(false);
   13676     arg_value->set_type(GLMessage::DataType::INT);
   13677     arg_value->add_intvalue((int)value);
   13678 
   13679     // call function
   13680     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13681     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13682     glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value);
   13683     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13684     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13685 
   13686     void *pointerArgs[] = {
   13687         (void *) value,
   13688     };
   13689 
   13690     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13691                               threadStartTime, threadEndTime,
   13692                               &glmsg, pointerArgs);
   13693     glContext->traceGLMessage(&glmsg);
   13694 }
   13695 
   13696 void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint *value) {
   13697     GLMessage glmsg;
   13698     GLTraceContext *glContext = getGLTraceContext();
   13699 
   13700     glmsg.set_function(GLMessage::glProgramUniform4ivEXT);
   13701 
   13702     // copy argument program
   13703     GLMessage_DataType *arg_program = glmsg.add_args();
   13704     arg_program->set_isarray(false);
   13705     arg_program->set_type(GLMessage::DataType::INT);
   13706     arg_program->add_intvalue(program);
   13707 
   13708     // copy argument location
   13709     GLMessage_DataType *arg_location = glmsg.add_args();
   13710     arg_location->set_isarray(false);
   13711     arg_location->set_type(GLMessage::DataType::INT);
   13712     arg_location->add_intvalue(location);
   13713 
   13714     // copy argument count
   13715     GLMessage_DataType *arg_count = glmsg.add_args();
   13716     arg_count->set_isarray(false);
   13717     arg_count->set_type(GLMessage::DataType::INT);
   13718     arg_count->add_intvalue(count);
   13719 
   13720     // copy argument value
   13721     GLMessage_DataType *arg_value = glmsg.add_args();
   13722     arg_value->set_isarray(false);
   13723     arg_value->set_type(GLMessage::DataType::INT);
   13724     arg_value->add_intvalue((int)value);
   13725 
   13726     // call function
   13727     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13728     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13729     glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value);
   13730     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13731     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13732 
   13733     void *pointerArgs[] = {
   13734         (void *) value,
   13735     };
   13736 
   13737     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13738                               threadStartTime, threadEndTime,
   13739                               &glmsg, pointerArgs);
   13740     glContext->traceGLMessage(&glmsg);
   13741 }
   13742 
   13743 void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   13744     GLMessage glmsg;
   13745     GLTraceContext *glContext = getGLTraceContext();
   13746 
   13747     glmsg.set_function(GLMessage::glProgramUniform1fvEXT);
   13748 
   13749     // copy argument program
   13750     GLMessage_DataType *arg_program = glmsg.add_args();
   13751     arg_program->set_isarray(false);
   13752     arg_program->set_type(GLMessage::DataType::INT);
   13753     arg_program->add_intvalue(program);
   13754 
   13755     // copy argument location
   13756     GLMessage_DataType *arg_location = glmsg.add_args();
   13757     arg_location->set_isarray(false);
   13758     arg_location->set_type(GLMessage::DataType::INT);
   13759     arg_location->add_intvalue(location);
   13760 
   13761     // copy argument count
   13762     GLMessage_DataType *arg_count = glmsg.add_args();
   13763     arg_count->set_isarray(false);
   13764     arg_count->set_type(GLMessage::DataType::INT);
   13765     arg_count->add_intvalue(count);
   13766 
   13767     // copy argument value
   13768     GLMessage_DataType *arg_value = glmsg.add_args();
   13769     arg_value->set_isarray(false);
   13770     arg_value->set_type(GLMessage::DataType::INT);
   13771     arg_value->add_intvalue((int)value);
   13772 
   13773     // call function
   13774     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13775     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13776     glContext->hooks->gl.glProgramUniform1fvEXT(program, location, count, value);
   13777     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13778     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13779 
   13780     void *pointerArgs[] = {
   13781         (void *) value,
   13782     };
   13783 
   13784     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13785                               threadStartTime, threadEndTime,
   13786                               &glmsg, pointerArgs);
   13787     glContext->traceGLMessage(&glmsg);
   13788 }
   13789 
   13790 void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   13791     GLMessage glmsg;
   13792     GLTraceContext *glContext = getGLTraceContext();
   13793 
   13794     glmsg.set_function(GLMessage::glProgramUniform2fvEXT);
   13795 
   13796     // copy argument program
   13797     GLMessage_DataType *arg_program = glmsg.add_args();
   13798     arg_program->set_isarray(false);
   13799     arg_program->set_type(GLMessage::DataType::INT);
   13800     arg_program->add_intvalue(program);
   13801 
   13802     // copy argument location
   13803     GLMessage_DataType *arg_location = glmsg.add_args();
   13804     arg_location->set_isarray(false);
   13805     arg_location->set_type(GLMessage::DataType::INT);
   13806     arg_location->add_intvalue(location);
   13807 
   13808     // copy argument count
   13809     GLMessage_DataType *arg_count = glmsg.add_args();
   13810     arg_count->set_isarray(false);
   13811     arg_count->set_type(GLMessage::DataType::INT);
   13812     arg_count->add_intvalue(count);
   13813 
   13814     // copy argument value
   13815     GLMessage_DataType *arg_value = glmsg.add_args();
   13816     arg_value->set_isarray(false);
   13817     arg_value->set_type(GLMessage::DataType::INT);
   13818     arg_value->add_intvalue((int)value);
   13819 
   13820     // call function
   13821     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13822     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13823     glContext->hooks->gl.glProgramUniform2fvEXT(program, location, count, value);
   13824     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13825     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13826 
   13827     void *pointerArgs[] = {
   13828         (void *) value,
   13829     };
   13830 
   13831     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13832                               threadStartTime, threadEndTime,
   13833                               &glmsg, pointerArgs);
   13834     glContext->traceGLMessage(&glmsg);
   13835 }
   13836 
   13837 void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   13838     GLMessage glmsg;
   13839     GLTraceContext *glContext = getGLTraceContext();
   13840 
   13841     glmsg.set_function(GLMessage::glProgramUniform3fvEXT);
   13842 
   13843     // copy argument program
   13844     GLMessage_DataType *arg_program = glmsg.add_args();
   13845     arg_program->set_isarray(false);
   13846     arg_program->set_type(GLMessage::DataType::INT);
   13847     arg_program->add_intvalue(program);
   13848 
   13849     // copy argument location
   13850     GLMessage_DataType *arg_location = glmsg.add_args();
   13851     arg_location->set_isarray(false);
   13852     arg_location->set_type(GLMessage::DataType::INT);
   13853     arg_location->add_intvalue(location);
   13854 
   13855     // copy argument count
   13856     GLMessage_DataType *arg_count = glmsg.add_args();
   13857     arg_count->set_isarray(false);
   13858     arg_count->set_type(GLMessage::DataType::INT);
   13859     arg_count->add_intvalue(count);
   13860 
   13861     // copy argument value
   13862     GLMessage_DataType *arg_value = glmsg.add_args();
   13863     arg_value->set_isarray(false);
   13864     arg_value->set_type(GLMessage::DataType::INT);
   13865     arg_value->add_intvalue((int)value);
   13866 
   13867     // call function
   13868     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13869     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13870     glContext->hooks->gl.glProgramUniform3fvEXT(program, location, count, value);
   13871     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13872     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13873 
   13874     void *pointerArgs[] = {
   13875         (void *) value,
   13876     };
   13877 
   13878     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13879                               threadStartTime, threadEndTime,
   13880                               &glmsg, pointerArgs);
   13881     glContext->traceGLMessage(&glmsg);
   13882 }
   13883 
   13884 void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat *value) {
   13885     GLMessage glmsg;
   13886     GLTraceContext *glContext = getGLTraceContext();
   13887 
   13888     glmsg.set_function(GLMessage::glProgramUniform4fvEXT);
   13889 
   13890     // copy argument program
   13891     GLMessage_DataType *arg_program = glmsg.add_args();
   13892     arg_program->set_isarray(false);
   13893     arg_program->set_type(GLMessage::DataType::INT);
   13894     arg_program->add_intvalue(program);
   13895 
   13896     // copy argument location
   13897     GLMessage_DataType *arg_location = glmsg.add_args();
   13898     arg_location->set_isarray(false);
   13899     arg_location->set_type(GLMessage::DataType::INT);
   13900     arg_location->add_intvalue(location);
   13901 
   13902     // copy argument count
   13903     GLMessage_DataType *arg_count = glmsg.add_args();
   13904     arg_count->set_isarray(false);
   13905     arg_count->set_type(GLMessage::DataType::INT);
   13906     arg_count->add_intvalue(count);
   13907 
   13908     // copy argument value
   13909     GLMessage_DataType *arg_value = glmsg.add_args();
   13910     arg_value->set_isarray(false);
   13911     arg_value->set_type(GLMessage::DataType::INT);
   13912     arg_value->add_intvalue((int)value);
   13913 
   13914     // call function
   13915     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13916     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13917     glContext->hooks->gl.glProgramUniform4fvEXT(program, location, count, value);
   13918     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13919     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13920 
   13921     void *pointerArgs[] = {
   13922         (void *) value,
   13923     };
   13924 
   13925     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13926                               threadStartTime, threadEndTime,
   13927                               &glmsg, pointerArgs);
   13928     glContext->traceGLMessage(&glmsg);
   13929 }
   13930 
   13931 void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
   13932     GLMessage glmsg;
   13933     GLTraceContext *glContext = getGLTraceContext();
   13934 
   13935     glmsg.set_function(GLMessage::glProgramUniformMatrix2fvEXT);
   13936 
   13937     // copy argument program
   13938     GLMessage_DataType *arg_program = glmsg.add_args();
   13939     arg_program->set_isarray(false);
   13940     arg_program->set_type(GLMessage::DataType::INT);
   13941     arg_program->add_intvalue(program);
   13942 
   13943     // copy argument location
   13944     GLMessage_DataType *arg_location = glmsg.add_args();
   13945     arg_location->set_isarray(false);
   13946     arg_location->set_type(GLMessage::DataType::INT);
   13947     arg_location->add_intvalue(location);
   13948 
   13949     // copy argument count
   13950     GLMessage_DataType *arg_count = glmsg.add_args();
   13951     arg_count->set_isarray(false);
   13952     arg_count->set_type(GLMessage::DataType::INT);
   13953     arg_count->add_intvalue(count);
   13954 
   13955     // copy argument transpose
   13956     GLMessage_DataType *arg_transpose = glmsg.add_args();
   13957     arg_transpose->set_isarray(false);
   13958     arg_transpose->set_type(GLMessage::DataType::BOOL);
   13959     arg_transpose->add_boolvalue(transpose);
   13960 
   13961     // copy argument value
   13962     GLMessage_DataType *arg_value = glmsg.add_args();
   13963     arg_value->set_isarray(false);
   13964     arg_value->set_type(GLMessage::DataType::INT);
   13965     arg_value->add_intvalue((int)value);
   13966 
   13967     // call function
   13968     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13969     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   13970     glContext->hooks->gl.glProgramUniformMatrix2fvEXT(program, location, count, transpose, value);
   13971     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   13972     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   13973 
   13974     void *pointerArgs[] = {
   13975         (void *) value,
   13976     };
   13977 
   13978     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   13979                               threadStartTime, threadEndTime,
   13980                               &glmsg, pointerArgs);
   13981     glContext->traceGLMessage(&glmsg);
   13982 }
   13983 
   13984 void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
   13985     GLMessage glmsg;
   13986     GLTraceContext *glContext = getGLTraceContext();
   13987 
   13988     glmsg.set_function(GLMessage::glProgramUniformMatrix3fvEXT);
   13989 
   13990     // copy argument program
   13991     GLMessage_DataType *arg_program = glmsg.add_args();
   13992     arg_program->set_isarray(false);
   13993     arg_program->set_type(GLMessage::DataType::INT);
   13994     arg_program->add_intvalue(program);
   13995 
   13996     // copy argument location
   13997     GLMessage_DataType *arg_location = glmsg.add_args();
   13998     arg_location->set_isarray(false);
   13999     arg_location->set_type(GLMessage::DataType::INT);
   14000     arg_location->add_intvalue(location);
   14001 
   14002     // copy argument count
   14003     GLMessage_DataType *arg_count = glmsg.add_args();
   14004     arg_count->set_isarray(false);
   14005     arg_count->set_type(GLMessage::DataType::INT);
   14006     arg_count->add_intvalue(count);
   14007 
   14008     // copy argument transpose
   14009     GLMessage_DataType *arg_transpose = glmsg.add_args();
   14010     arg_transpose->set_isarray(false);
   14011     arg_transpose->set_type(GLMessage::DataType::BOOL);
   14012     arg_transpose->add_boolvalue(transpose);
   14013 
   14014     // copy argument value
   14015     GLMessage_DataType *arg_value = glmsg.add_args();
   14016     arg_value->set_isarray(false);
   14017     arg_value->set_type(GLMessage::DataType::INT);
   14018     arg_value->add_intvalue((int)value);
   14019 
   14020     // call function
   14021     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14022     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14023     glContext->hooks->gl.glProgramUniformMatrix3fvEXT(program, location, count, transpose, value);
   14024     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14025     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14026 
   14027     void *pointerArgs[] = {
   14028         (void *) value,
   14029     };
   14030 
   14031     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14032                               threadStartTime, threadEndTime,
   14033                               &glmsg, pointerArgs);
   14034     glContext->traceGLMessage(&glmsg);
   14035 }
   14036 
   14037 void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) {
   14038     GLMessage glmsg;
   14039     GLTraceContext *glContext = getGLTraceContext();
   14040 
   14041     glmsg.set_function(GLMessage::glProgramUniformMatrix4fvEXT);
   14042 
   14043     // copy argument program
   14044     GLMessage_DataType *arg_program = glmsg.add_args();
   14045     arg_program->set_isarray(false);
   14046     arg_program->set_type(GLMessage::DataType::INT);
   14047     arg_program->add_intvalue(program);
   14048 
   14049     // copy argument location
   14050     GLMessage_DataType *arg_location = glmsg.add_args();
   14051     arg_location->set_isarray(false);
   14052     arg_location->set_type(GLMessage::DataType::INT);
   14053     arg_location->add_intvalue(location);
   14054 
   14055     // copy argument count
   14056     GLMessage_DataType *arg_count = glmsg.add_args();
   14057     arg_count->set_isarray(false);
   14058     arg_count->set_type(GLMessage::DataType::INT);
   14059     arg_count->add_intvalue(count);
   14060 
   14061     // copy argument transpose
   14062     GLMessage_DataType *arg_transpose = glmsg.add_args();
   14063     arg_transpose->set_isarray(false);
   14064     arg_transpose->set_type(GLMessage::DataType::BOOL);
   14065     arg_transpose->add_boolvalue(transpose);
   14066 
   14067     // copy argument value
   14068     GLMessage_DataType *arg_value = glmsg.add_args();
   14069     arg_value->set_isarray(false);
   14070     arg_value->set_type(GLMessage::DataType::INT);
   14071     arg_value->add_intvalue((int)value);
   14072 
   14073     // call function
   14074     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14075     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14076     glContext->hooks->gl.glProgramUniformMatrix4fvEXT(program, location, count, transpose, value);
   14077     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14078     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14079 
   14080     void *pointerArgs[] = {
   14081         (void *) value,
   14082     };
   14083 
   14084     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14085                               threadStartTime, threadEndTime,
   14086                               &glmsg, pointerArgs);
   14087     glContext->traceGLMessage(&glmsg);
   14088 }
   14089 
   14090 void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) {
   14091     GLMessage glmsg;
   14092     GLTraceContext *glContext = getGLTraceContext();
   14093 
   14094     glmsg.set_function(GLMessage::glValidateProgramPipelineEXT);
   14095 
   14096     // copy argument pipeline
   14097     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   14098     arg_pipeline->set_isarray(false);
   14099     arg_pipeline->set_type(GLMessage::DataType::INT);
   14100     arg_pipeline->add_intvalue(pipeline);
   14101 
   14102     // call function
   14103     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14104     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14105     glContext->hooks->gl.glValidateProgramPipelineEXT(pipeline);
   14106     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14107     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14108 
   14109     void *pointerArgs[] = {
   14110     };
   14111 
   14112     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14113                               threadStartTime, threadEndTime,
   14114                               &glmsg, pointerArgs);
   14115     glContext->traceGLMessage(&glmsg);
   14116 }
   14117 
   14118 void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) {
   14119     GLMessage glmsg;
   14120     GLTraceContext *glContext = getGLTraceContext();
   14121 
   14122     glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT);
   14123 
   14124     // copy argument pipeline
   14125     GLMessage_DataType *arg_pipeline = glmsg.add_args();
   14126     arg_pipeline->set_isarray(false);
   14127     arg_pipeline->set_type(GLMessage::DataType::INT);
   14128     arg_pipeline->add_intvalue(pipeline);
   14129 
   14130     // copy argument bufSize
   14131     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   14132     arg_bufSize->set_isarray(false);
   14133     arg_bufSize->set_type(GLMessage::DataType::INT);
   14134     arg_bufSize->add_intvalue(bufSize);
   14135 
   14136     // copy argument length
   14137     GLMessage_DataType *arg_length = glmsg.add_args();
   14138     arg_length->set_isarray(false);
   14139     arg_length->set_type(GLMessage::DataType::INT);
   14140     arg_length->add_intvalue((int)length);
   14141 
   14142     // copy argument infoLog
   14143     GLMessage_DataType *arg_infoLog = glmsg.add_args();
   14144     arg_infoLog->set_isarray(false);
   14145     arg_infoLog->set_type(GLMessage::DataType::INT);
   14146     arg_infoLog->add_intvalue((int)infoLog);
   14147 
   14148     // call function
   14149     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14150     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14151     glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog);
   14152     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14153     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14154 
   14155     void *pointerArgs[] = {
   14156         (void *) length,
   14157         (void *) infoLog,
   14158     };
   14159 
   14160     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14161                               threadStartTime, threadEndTime,
   14162                               &glmsg, pointerArgs);
   14163     glContext->traceGLMessage(&glmsg);
   14164 }
   14165 
   14166 void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
   14167     GLMessage glmsg;
   14168     GLTraceContext *glContext = getGLTraceContext();
   14169 
   14170     glmsg.set_function(GLMessage::glTexStorage1DEXT);
   14171 
   14172     // copy argument target
   14173     GLMessage_DataType *arg_target = glmsg.add_args();
   14174     arg_target->set_isarray(false);
   14175     arg_target->set_type(GLMessage::DataType::ENUM);
   14176     arg_target->add_intvalue((int)target);
   14177 
   14178     // copy argument levels
   14179     GLMessage_DataType *arg_levels = glmsg.add_args();
   14180     arg_levels->set_isarray(false);
   14181     arg_levels->set_type(GLMessage::DataType::INT);
   14182     arg_levels->add_intvalue(levels);
   14183 
   14184     // copy argument internalformat
   14185     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14186     arg_internalformat->set_isarray(false);
   14187     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14188     arg_internalformat->add_intvalue((int)internalformat);
   14189 
   14190     // copy argument width
   14191     GLMessage_DataType *arg_width = glmsg.add_args();
   14192     arg_width->set_isarray(false);
   14193     arg_width->set_type(GLMessage::DataType::INT);
   14194     arg_width->add_intvalue(width);
   14195 
   14196     // call function
   14197     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14198     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14199     glContext->hooks->gl.glTexStorage1DEXT(target, levels, internalformat, width);
   14200     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14201     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14202 
   14203     void *pointerArgs[] = {
   14204     };
   14205 
   14206     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14207                               threadStartTime, threadEndTime,
   14208                               &glmsg, pointerArgs);
   14209     glContext->traceGLMessage(&glmsg);
   14210 }
   14211 
   14212 void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
   14213     GLMessage glmsg;
   14214     GLTraceContext *glContext = getGLTraceContext();
   14215 
   14216     glmsg.set_function(GLMessage::glTexStorage2DEXT);
   14217 
   14218     // copy argument target
   14219     GLMessage_DataType *arg_target = glmsg.add_args();
   14220     arg_target->set_isarray(false);
   14221     arg_target->set_type(GLMessage::DataType::ENUM);
   14222     arg_target->add_intvalue((int)target);
   14223 
   14224     // copy argument levels
   14225     GLMessage_DataType *arg_levels = glmsg.add_args();
   14226     arg_levels->set_isarray(false);
   14227     arg_levels->set_type(GLMessage::DataType::INT);
   14228     arg_levels->add_intvalue(levels);
   14229 
   14230     // copy argument internalformat
   14231     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14232     arg_internalformat->set_isarray(false);
   14233     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14234     arg_internalformat->add_intvalue((int)internalformat);
   14235 
   14236     // copy argument width
   14237     GLMessage_DataType *arg_width = glmsg.add_args();
   14238     arg_width->set_isarray(false);
   14239     arg_width->set_type(GLMessage::DataType::INT);
   14240     arg_width->add_intvalue(width);
   14241 
   14242     // copy argument height
   14243     GLMessage_DataType *arg_height = glmsg.add_args();
   14244     arg_height->set_isarray(false);
   14245     arg_height->set_type(GLMessage::DataType::INT);
   14246     arg_height->add_intvalue(height);
   14247 
   14248     // call function
   14249     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14250     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14251     glContext->hooks->gl.glTexStorage2DEXT(target, levels, internalformat, width, height);
   14252     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14253     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14254 
   14255     void *pointerArgs[] = {
   14256     };
   14257 
   14258     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14259                               threadStartTime, threadEndTime,
   14260                               &glmsg, pointerArgs);
   14261     glContext->traceGLMessage(&glmsg);
   14262 }
   14263 
   14264 void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
   14265     GLMessage glmsg;
   14266     GLTraceContext *glContext = getGLTraceContext();
   14267 
   14268     glmsg.set_function(GLMessage::glTexStorage3DEXT);
   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 levels
   14277     GLMessage_DataType *arg_levels = glmsg.add_args();
   14278     arg_levels->set_isarray(false);
   14279     arg_levels->set_type(GLMessage::DataType::INT);
   14280     arg_levels->add_intvalue(levels);
   14281 
   14282     // copy argument internalformat
   14283     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14284     arg_internalformat->set_isarray(false);
   14285     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14286     arg_internalformat->add_intvalue((int)internalformat);
   14287 
   14288     // copy argument width
   14289     GLMessage_DataType *arg_width = glmsg.add_args();
   14290     arg_width->set_isarray(false);
   14291     arg_width->set_type(GLMessage::DataType::INT);
   14292     arg_width->add_intvalue(width);
   14293 
   14294     // copy argument height
   14295     GLMessage_DataType *arg_height = glmsg.add_args();
   14296     arg_height->set_isarray(false);
   14297     arg_height->set_type(GLMessage::DataType::INT);
   14298     arg_height->add_intvalue(height);
   14299 
   14300     // copy argument depth
   14301     GLMessage_DataType *arg_depth = glmsg.add_args();
   14302     arg_depth->set_isarray(false);
   14303     arg_depth->set_type(GLMessage::DataType::INT);
   14304     arg_depth->add_intvalue(depth);
   14305 
   14306     // call function
   14307     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14308     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14309     glContext->hooks->gl.glTexStorage3DEXT(target, levels, internalformat, width, height, depth);
   14310     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14311     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14312 
   14313     void *pointerArgs[] = {
   14314     };
   14315 
   14316     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14317                               threadStartTime, threadEndTime,
   14318                               &glmsg, pointerArgs);
   14319     glContext->traceGLMessage(&glmsg);
   14320 }
   14321 
   14322 void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) {
   14323     GLMessage glmsg;
   14324     GLTraceContext *glContext = getGLTraceContext();
   14325 
   14326     glmsg.set_function(GLMessage::glTextureStorage1DEXT);
   14327 
   14328     // copy argument texture
   14329     GLMessage_DataType *arg_texture = glmsg.add_args();
   14330     arg_texture->set_isarray(false);
   14331     arg_texture->set_type(GLMessage::DataType::INT);
   14332     arg_texture->add_intvalue(texture);
   14333 
   14334     // copy argument target
   14335     GLMessage_DataType *arg_target = glmsg.add_args();
   14336     arg_target->set_isarray(false);
   14337     arg_target->set_type(GLMessage::DataType::ENUM);
   14338     arg_target->add_intvalue((int)target);
   14339 
   14340     // copy argument levels
   14341     GLMessage_DataType *arg_levels = glmsg.add_args();
   14342     arg_levels->set_isarray(false);
   14343     arg_levels->set_type(GLMessage::DataType::INT);
   14344     arg_levels->add_intvalue(levels);
   14345 
   14346     // copy argument internalformat
   14347     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14348     arg_internalformat->set_isarray(false);
   14349     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14350     arg_internalformat->add_intvalue((int)internalformat);
   14351 
   14352     // copy argument width
   14353     GLMessage_DataType *arg_width = glmsg.add_args();
   14354     arg_width->set_isarray(false);
   14355     arg_width->set_type(GLMessage::DataType::INT);
   14356     arg_width->add_intvalue(width);
   14357 
   14358     // call function
   14359     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14360     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14361     glContext->hooks->gl.glTextureStorage1DEXT(texture, target, levels, internalformat, width);
   14362     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14363     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14364 
   14365     void *pointerArgs[] = {
   14366     };
   14367 
   14368     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14369                               threadStartTime, threadEndTime,
   14370                               &glmsg, pointerArgs);
   14371     glContext->traceGLMessage(&glmsg);
   14372 }
   14373 
   14374 void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) {
   14375     GLMessage glmsg;
   14376     GLTraceContext *glContext = getGLTraceContext();
   14377 
   14378     glmsg.set_function(GLMessage::glTextureStorage2DEXT);
   14379 
   14380     // copy argument texture
   14381     GLMessage_DataType *arg_texture = glmsg.add_args();
   14382     arg_texture->set_isarray(false);
   14383     arg_texture->set_type(GLMessage::DataType::INT);
   14384     arg_texture->add_intvalue(texture);
   14385 
   14386     // copy argument target
   14387     GLMessage_DataType *arg_target = glmsg.add_args();
   14388     arg_target->set_isarray(false);
   14389     arg_target->set_type(GLMessage::DataType::ENUM);
   14390     arg_target->add_intvalue((int)target);
   14391 
   14392     // copy argument levels
   14393     GLMessage_DataType *arg_levels = glmsg.add_args();
   14394     arg_levels->set_isarray(false);
   14395     arg_levels->set_type(GLMessage::DataType::INT);
   14396     arg_levels->add_intvalue(levels);
   14397 
   14398     // copy argument internalformat
   14399     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14400     arg_internalformat->set_isarray(false);
   14401     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14402     arg_internalformat->add_intvalue((int)internalformat);
   14403 
   14404     // copy argument width
   14405     GLMessage_DataType *arg_width = glmsg.add_args();
   14406     arg_width->set_isarray(false);
   14407     arg_width->set_type(GLMessage::DataType::INT);
   14408     arg_width->add_intvalue(width);
   14409 
   14410     // copy argument height
   14411     GLMessage_DataType *arg_height = glmsg.add_args();
   14412     arg_height->set_isarray(false);
   14413     arg_height->set_type(GLMessage::DataType::INT);
   14414     arg_height->add_intvalue(height);
   14415 
   14416     // call function
   14417     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14418     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14419     glContext->hooks->gl.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height);
   14420     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14421     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14422 
   14423     void *pointerArgs[] = {
   14424     };
   14425 
   14426     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14427                               threadStartTime, threadEndTime,
   14428                               &glmsg, pointerArgs);
   14429     glContext->traceGLMessage(&glmsg);
   14430 }
   14431 
   14432 void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) {
   14433     GLMessage glmsg;
   14434     GLTraceContext *glContext = getGLTraceContext();
   14435 
   14436     glmsg.set_function(GLMessage::glTextureStorage3DEXT);
   14437 
   14438     // copy argument texture
   14439     GLMessage_DataType *arg_texture = glmsg.add_args();
   14440     arg_texture->set_isarray(false);
   14441     arg_texture->set_type(GLMessage::DataType::INT);
   14442     arg_texture->add_intvalue(texture);
   14443 
   14444     // copy argument target
   14445     GLMessage_DataType *arg_target = glmsg.add_args();
   14446     arg_target->set_isarray(false);
   14447     arg_target->set_type(GLMessage::DataType::ENUM);
   14448     arg_target->add_intvalue((int)target);
   14449 
   14450     // copy argument levels
   14451     GLMessage_DataType *arg_levels = glmsg.add_args();
   14452     arg_levels->set_isarray(false);
   14453     arg_levels->set_type(GLMessage::DataType::INT);
   14454     arg_levels->add_intvalue(levels);
   14455 
   14456     // copy argument internalformat
   14457     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14458     arg_internalformat->set_isarray(false);
   14459     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14460     arg_internalformat->add_intvalue((int)internalformat);
   14461 
   14462     // copy argument width
   14463     GLMessage_DataType *arg_width = glmsg.add_args();
   14464     arg_width->set_isarray(false);
   14465     arg_width->set_type(GLMessage::DataType::INT);
   14466     arg_width->add_intvalue(width);
   14467 
   14468     // copy argument height
   14469     GLMessage_DataType *arg_height = glmsg.add_args();
   14470     arg_height->set_isarray(false);
   14471     arg_height->set_type(GLMessage::DataType::INT);
   14472     arg_height->add_intvalue(height);
   14473 
   14474     // copy argument depth
   14475     GLMessage_DataType *arg_depth = glmsg.add_args();
   14476     arg_depth->set_isarray(false);
   14477     arg_depth->set_type(GLMessage::DataType::INT);
   14478     arg_depth->add_intvalue(depth);
   14479 
   14480     // call function
   14481     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14482     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14483     glContext->hooks->gl.glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth);
   14484     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14485     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14486 
   14487     void *pointerArgs[] = {
   14488     };
   14489 
   14490     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14491                               threadStartTime, threadEndTime,
   14492                               &glmsg, pointerArgs);
   14493     glContext->traceGLMessage(&glmsg);
   14494 }
   14495 
   14496 void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) {
   14497     GLMessage glmsg;
   14498     GLTraceContext *glContext = getGLTraceContext();
   14499 
   14500     glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleIMG);
   14501 
   14502     // copy argument target
   14503     GLMessage_DataType *arg_target = glmsg.add_args();
   14504     arg_target->set_isarray(false);
   14505     arg_target->set_type(GLMessage::DataType::ENUM);
   14506     arg_target->add_intvalue((int)target);
   14507 
   14508     // copy argument samples
   14509     GLMessage_DataType *arg_samples = glmsg.add_args();
   14510     arg_samples->set_isarray(false);
   14511     arg_samples->set_type(GLMessage::DataType::INT);
   14512     arg_samples->add_intvalue(samples);
   14513 
   14514     // copy argument internalformat
   14515     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   14516     arg_internalformat->set_isarray(false);
   14517     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   14518     arg_internalformat->add_intvalue((int)internalformat);
   14519 
   14520     // copy argument width
   14521     GLMessage_DataType *arg_width = glmsg.add_args();
   14522     arg_width->set_isarray(false);
   14523     arg_width->set_type(GLMessage::DataType::INT);
   14524     arg_width->add_intvalue(width);
   14525 
   14526     // copy argument height
   14527     GLMessage_DataType *arg_height = glmsg.add_args();
   14528     arg_height->set_isarray(false);
   14529     arg_height->set_type(GLMessage::DataType::INT);
   14530     arg_height->add_intvalue(height);
   14531 
   14532     // call function
   14533     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14534     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14535     glContext->hooks->gl.glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height);
   14536     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14537     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14538 
   14539     void *pointerArgs[] = {
   14540     };
   14541 
   14542     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14543                               threadStartTime, threadEndTime,
   14544                               &glmsg, pointerArgs);
   14545     glContext->traceGLMessage(&glmsg);
   14546 }
   14547 
   14548 void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) {
   14549     GLMessage glmsg;
   14550     GLTraceContext *glContext = getGLTraceContext();
   14551 
   14552     glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleIMG);
   14553 
   14554     // copy argument target
   14555     GLMessage_DataType *arg_target = glmsg.add_args();
   14556     arg_target->set_isarray(false);
   14557     arg_target->set_type(GLMessage::DataType::ENUM);
   14558     arg_target->add_intvalue((int)target);
   14559 
   14560     // copy argument attachment
   14561     GLMessage_DataType *arg_attachment = glmsg.add_args();
   14562     arg_attachment->set_isarray(false);
   14563     arg_attachment->set_type(GLMessage::DataType::ENUM);
   14564     arg_attachment->add_intvalue((int)attachment);
   14565 
   14566     // copy argument textarget
   14567     GLMessage_DataType *arg_textarget = glmsg.add_args();
   14568     arg_textarget->set_isarray(false);
   14569     arg_textarget->set_type(GLMessage::DataType::ENUM);
   14570     arg_textarget->add_intvalue((int)textarget);
   14571 
   14572     // copy argument texture
   14573     GLMessage_DataType *arg_texture = glmsg.add_args();
   14574     arg_texture->set_isarray(false);
   14575     arg_texture->set_type(GLMessage::DataType::INT);
   14576     arg_texture->add_intvalue(texture);
   14577 
   14578     // copy argument level
   14579     GLMessage_DataType *arg_level = glmsg.add_args();
   14580     arg_level->set_isarray(false);
   14581     arg_level->set_type(GLMessage::DataType::INT);
   14582     arg_level->add_intvalue(level);
   14583 
   14584     // copy argument samples
   14585     GLMessage_DataType *arg_samples = glmsg.add_args();
   14586     arg_samples->set_isarray(false);
   14587     arg_samples->set_type(GLMessage::DataType::INT);
   14588     arg_samples->add_intvalue(samples);
   14589 
   14590     // call function
   14591     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14592     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14593     glContext->hooks->gl.glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples);
   14594     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14595     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14596 
   14597     void *pointerArgs[] = {
   14598     };
   14599 
   14600     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14601                               threadStartTime, threadEndTime,
   14602                               &glmsg, pointerArgs);
   14603     glContext->traceGLMessage(&glmsg);
   14604 }
   14605 
   14606 void GLTrace_glCoverageMaskNV(GLboolean mask) {
   14607     GLMessage glmsg;
   14608     GLTraceContext *glContext = getGLTraceContext();
   14609 
   14610     glmsg.set_function(GLMessage::glCoverageMaskNV);
   14611 
   14612     // copy argument mask
   14613     GLMessage_DataType *arg_mask = glmsg.add_args();
   14614     arg_mask->set_isarray(false);
   14615     arg_mask->set_type(GLMessage::DataType::BOOL);
   14616     arg_mask->add_boolvalue(mask);
   14617 
   14618     // call function
   14619     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14620     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14621     glContext->hooks->gl.glCoverageMaskNV(mask);
   14622     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14623     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14624 
   14625     void *pointerArgs[] = {
   14626     };
   14627 
   14628     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14629                               threadStartTime, threadEndTime,
   14630                               &glmsg, pointerArgs);
   14631     glContext->traceGLMessage(&glmsg);
   14632 }
   14633 
   14634 void GLTrace_glCoverageOperationNV(GLenum operation) {
   14635     GLMessage glmsg;
   14636     GLTraceContext *glContext = getGLTraceContext();
   14637 
   14638     glmsg.set_function(GLMessage::glCoverageOperationNV);
   14639 
   14640     // copy argument operation
   14641     GLMessage_DataType *arg_operation = glmsg.add_args();
   14642     arg_operation->set_isarray(false);
   14643     arg_operation->set_type(GLMessage::DataType::ENUM);
   14644     arg_operation->add_intvalue((int)operation);
   14645 
   14646     // call function
   14647     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14648     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14649     glContext->hooks->gl.glCoverageOperationNV(operation);
   14650     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14651     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14652 
   14653     void *pointerArgs[] = {
   14654     };
   14655 
   14656     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14657                               threadStartTime, threadEndTime,
   14658                               &glmsg, pointerArgs);
   14659     glContext->traceGLMessage(&glmsg);
   14660 }
   14661 
   14662 void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum *bufs) {
   14663     GLMessage glmsg;
   14664     GLTraceContext *glContext = getGLTraceContext();
   14665 
   14666     glmsg.set_function(GLMessage::glDrawBuffersNV);
   14667 
   14668     // copy argument n
   14669     GLMessage_DataType *arg_n = glmsg.add_args();
   14670     arg_n->set_isarray(false);
   14671     arg_n->set_type(GLMessage::DataType::INT);
   14672     arg_n->add_intvalue(n);
   14673 
   14674     // copy argument bufs
   14675     GLMessage_DataType *arg_bufs = glmsg.add_args();
   14676     arg_bufs->set_isarray(false);
   14677     arg_bufs->set_type(GLMessage::DataType::INT);
   14678     arg_bufs->add_intvalue((int)bufs);
   14679 
   14680     // call function
   14681     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14682     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14683     glContext->hooks->gl.glDrawBuffersNV(n, bufs);
   14684     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14685     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14686 
   14687     void *pointerArgs[] = {
   14688         (void *) bufs,
   14689     };
   14690 
   14691     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14692                               threadStartTime, threadEndTime,
   14693                               &glmsg, pointerArgs);
   14694     glContext->traceGLMessage(&glmsg);
   14695 }
   14696 
   14697 void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint *fences) {
   14698     GLMessage glmsg;
   14699     GLTraceContext *glContext = getGLTraceContext();
   14700 
   14701     glmsg.set_function(GLMessage::glDeleteFencesNV);
   14702 
   14703     // copy argument n
   14704     GLMessage_DataType *arg_n = glmsg.add_args();
   14705     arg_n->set_isarray(false);
   14706     arg_n->set_type(GLMessage::DataType::INT);
   14707     arg_n->add_intvalue(n);
   14708 
   14709     // copy argument fences
   14710     GLMessage_DataType *arg_fences = glmsg.add_args();
   14711     arg_fences->set_isarray(false);
   14712     arg_fences->set_type(GLMessage::DataType::INT);
   14713     arg_fences->add_intvalue((int)fences);
   14714 
   14715     // call function
   14716     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14717     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14718     glContext->hooks->gl.glDeleteFencesNV(n, fences);
   14719     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14720     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14721 
   14722     void *pointerArgs[] = {
   14723         (void *) fences,
   14724     };
   14725 
   14726     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14727                               threadStartTime, threadEndTime,
   14728                               &glmsg, pointerArgs);
   14729     glContext->traceGLMessage(&glmsg);
   14730 }
   14731 
   14732 void GLTrace_glGenFencesNV(GLsizei n, GLuint *fences) {
   14733     GLMessage glmsg;
   14734     GLTraceContext *glContext = getGLTraceContext();
   14735 
   14736     glmsg.set_function(GLMessage::glGenFencesNV);
   14737 
   14738     // copy argument n
   14739     GLMessage_DataType *arg_n = glmsg.add_args();
   14740     arg_n->set_isarray(false);
   14741     arg_n->set_type(GLMessage::DataType::INT);
   14742     arg_n->add_intvalue(n);
   14743 
   14744     // copy argument fences
   14745     GLMessage_DataType *arg_fences = glmsg.add_args();
   14746     arg_fences->set_isarray(false);
   14747     arg_fences->set_type(GLMessage::DataType::INT);
   14748     arg_fences->add_intvalue((int)fences);
   14749 
   14750     // call function
   14751     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14752     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14753     glContext->hooks->gl.glGenFencesNV(n, fences);
   14754     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14755     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14756 
   14757     void *pointerArgs[] = {
   14758         (void *) fences,
   14759     };
   14760 
   14761     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14762                               threadStartTime, threadEndTime,
   14763                               &glmsg, pointerArgs);
   14764     glContext->traceGLMessage(&glmsg);
   14765 }
   14766 
   14767 GLboolean GLTrace_glIsFenceNV(GLuint fence) {
   14768     GLMessage glmsg;
   14769     GLTraceContext *glContext = getGLTraceContext();
   14770 
   14771     glmsg.set_function(GLMessage::glIsFenceNV);
   14772 
   14773     // copy argument fence
   14774     GLMessage_DataType *arg_fence = glmsg.add_args();
   14775     arg_fence->set_isarray(false);
   14776     arg_fence->set_type(GLMessage::DataType::INT);
   14777     arg_fence->add_intvalue(fence);
   14778 
   14779     // call function
   14780     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14781     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14782     GLboolean retValue = glContext->hooks->gl.glIsFenceNV(fence);
   14783     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14784     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14785 
   14786     // set return value
   14787     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   14788     rt->set_isarray(false);
   14789     rt->set_type(GLMessage::DataType::BOOL);
   14790     rt->add_boolvalue(retValue);
   14791 
   14792     void *pointerArgs[] = {
   14793     };
   14794 
   14795     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14796                               threadStartTime, threadEndTime,
   14797                               &glmsg, pointerArgs);
   14798     glContext->traceGLMessage(&glmsg);
   14799 
   14800     return retValue;
   14801 }
   14802 
   14803 GLboolean GLTrace_glTestFenceNV(GLuint fence) {
   14804     GLMessage glmsg;
   14805     GLTraceContext *glContext = getGLTraceContext();
   14806 
   14807     glmsg.set_function(GLMessage::glTestFenceNV);
   14808 
   14809     // copy argument fence
   14810     GLMessage_DataType *arg_fence = glmsg.add_args();
   14811     arg_fence->set_isarray(false);
   14812     arg_fence->set_type(GLMessage::DataType::INT);
   14813     arg_fence->add_intvalue(fence);
   14814 
   14815     // call function
   14816     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14817     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14818     GLboolean retValue = glContext->hooks->gl.glTestFenceNV(fence);
   14819     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14820     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14821 
   14822     // set return value
   14823     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   14824     rt->set_isarray(false);
   14825     rt->set_type(GLMessage::DataType::BOOL);
   14826     rt->add_boolvalue(retValue);
   14827 
   14828     void *pointerArgs[] = {
   14829     };
   14830 
   14831     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14832                               threadStartTime, threadEndTime,
   14833                               &glmsg, pointerArgs);
   14834     glContext->traceGLMessage(&glmsg);
   14835 
   14836     return retValue;
   14837 }
   14838 
   14839 void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) {
   14840     GLMessage glmsg;
   14841     GLTraceContext *glContext = getGLTraceContext();
   14842 
   14843     glmsg.set_function(GLMessage::glGetFenceivNV);
   14844 
   14845     // copy argument fence
   14846     GLMessage_DataType *arg_fence = glmsg.add_args();
   14847     arg_fence->set_isarray(false);
   14848     arg_fence->set_type(GLMessage::DataType::INT);
   14849     arg_fence->add_intvalue(fence);
   14850 
   14851     // copy argument pname
   14852     GLMessage_DataType *arg_pname = glmsg.add_args();
   14853     arg_pname->set_isarray(false);
   14854     arg_pname->set_type(GLMessage::DataType::ENUM);
   14855     arg_pname->add_intvalue((int)pname);
   14856 
   14857     // copy argument params
   14858     GLMessage_DataType *arg_params = glmsg.add_args();
   14859     arg_params->set_isarray(false);
   14860     arg_params->set_type(GLMessage::DataType::INT);
   14861     arg_params->add_intvalue((int)params);
   14862 
   14863     // call function
   14864     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14865     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14866     glContext->hooks->gl.glGetFenceivNV(fence, pname, params);
   14867     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14868     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14869 
   14870     void *pointerArgs[] = {
   14871         (void *) params,
   14872     };
   14873 
   14874     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14875                               threadStartTime, threadEndTime,
   14876                               &glmsg, pointerArgs);
   14877     glContext->traceGLMessage(&glmsg);
   14878 }
   14879 
   14880 void GLTrace_glFinishFenceNV(GLuint fence) {
   14881     GLMessage glmsg;
   14882     GLTraceContext *glContext = getGLTraceContext();
   14883 
   14884     glmsg.set_function(GLMessage::glFinishFenceNV);
   14885 
   14886     // copy argument fence
   14887     GLMessage_DataType *arg_fence = glmsg.add_args();
   14888     arg_fence->set_isarray(false);
   14889     arg_fence->set_type(GLMessage::DataType::INT);
   14890     arg_fence->add_intvalue(fence);
   14891 
   14892     // call function
   14893     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14894     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14895     glContext->hooks->gl.glFinishFenceNV(fence);
   14896     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14897     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14898 
   14899     void *pointerArgs[] = {
   14900     };
   14901 
   14902     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14903                               threadStartTime, threadEndTime,
   14904                               &glmsg, pointerArgs);
   14905     glContext->traceGLMessage(&glmsg);
   14906 }
   14907 
   14908 void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) {
   14909     GLMessage glmsg;
   14910     GLTraceContext *glContext = getGLTraceContext();
   14911 
   14912     glmsg.set_function(GLMessage::glSetFenceNV);
   14913 
   14914     // copy argument fence
   14915     GLMessage_DataType *arg_fence = glmsg.add_args();
   14916     arg_fence->set_isarray(false);
   14917     arg_fence->set_type(GLMessage::DataType::INT);
   14918     arg_fence->add_intvalue(fence);
   14919 
   14920     // copy argument condition
   14921     GLMessage_DataType *arg_condition = glmsg.add_args();
   14922     arg_condition->set_isarray(false);
   14923     arg_condition->set_type(GLMessage::DataType::ENUM);
   14924     arg_condition->add_intvalue((int)condition);
   14925 
   14926     // call function
   14927     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14928     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14929     glContext->hooks->gl.glSetFenceNV(fence, condition);
   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_glReadBufferNV(GLenum mode) {
   14943     GLMessage glmsg;
   14944     GLTraceContext *glContext = getGLTraceContext();
   14945 
   14946     glmsg.set_function(GLMessage::glReadBufferNV);
   14947 
   14948     // copy argument mode
   14949     GLMessage_DataType *arg_mode = glmsg.add_args();
   14950     arg_mode->set_isarray(false);
   14951     arg_mode->set_type(GLMessage::DataType::ENUM);
   14952     arg_mode->add_intvalue((int)mode);
   14953 
   14954     // call function
   14955     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14956     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14957     glContext->hooks->gl.glReadBufferNV(mode);
   14958     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14959     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14960 
   14961     void *pointerArgs[] = {
   14962     };
   14963 
   14964     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14965                               threadStartTime, threadEndTime,
   14966                               &glmsg, pointerArgs);
   14967     glContext->traceGLMessage(&glmsg);
   14968 }
   14969 
   14970 void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref) {
   14971     GLMessage glmsg;
   14972     GLTraceContext *glContext = getGLTraceContext();
   14973 
   14974     glmsg.set_function(GLMessage::glAlphaFuncQCOM);
   14975 
   14976     // copy argument func
   14977     GLMessage_DataType *arg_func = glmsg.add_args();
   14978     arg_func->set_isarray(false);
   14979     arg_func->set_type(GLMessage::DataType::ENUM);
   14980     arg_func->add_intvalue((int)func);
   14981 
   14982     // copy argument ref
   14983     GLMessage_DataType *arg_ref = glmsg.add_args();
   14984     arg_ref->set_isarray(false);
   14985     arg_ref->set_type(GLMessage::DataType::FLOAT);
   14986     arg_ref->add_floatvalue(ref);
   14987 
   14988     // call function
   14989     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14990     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   14991     glContext->hooks->gl.glAlphaFuncQCOM(func, ref);
   14992     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   14993     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   14994 
   14995     void *pointerArgs[] = {
   14996     };
   14997 
   14998     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   14999                               threadStartTime, threadEndTime,
   15000                               &glmsg, pointerArgs);
   15001     glContext->traceGLMessage(&glmsg);
   15002 }
   15003 
   15004 void GLTrace_glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls) {
   15005     GLMessage glmsg;
   15006     GLTraceContext *glContext = getGLTraceContext();
   15007 
   15008     glmsg.set_function(GLMessage::glGetDriverControlsQCOM);
   15009 
   15010     // copy argument num
   15011     GLMessage_DataType *arg_num = glmsg.add_args();
   15012     arg_num->set_isarray(false);
   15013     arg_num->set_type(GLMessage::DataType::INT);
   15014     arg_num->add_intvalue((int)num);
   15015 
   15016     // copy argument size
   15017     GLMessage_DataType *arg_size = glmsg.add_args();
   15018     arg_size->set_isarray(false);
   15019     arg_size->set_type(GLMessage::DataType::INT);
   15020     arg_size->add_intvalue(size);
   15021 
   15022     // copy argument driverControls
   15023     GLMessage_DataType *arg_driverControls = glmsg.add_args();
   15024     arg_driverControls->set_isarray(false);
   15025     arg_driverControls->set_type(GLMessage::DataType::INT);
   15026     arg_driverControls->add_intvalue((int)driverControls);
   15027 
   15028     // call function
   15029     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15030     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15031     glContext->hooks->gl.glGetDriverControlsQCOM(num, size, driverControls);
   15032     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15033     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15034 
   15035     void *pointerArgs[] = {
   15036         (void *) num,
   15037         (void *) driverControls,
   15038     };
   15039 
   15040     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15041                               threadStartTime, threadEndTime,
   15042                               &glmsg, pointerArgs);
   15043     glContext->traceGLMessage(&glmsg);
   15044 }
   15045 
   15046 void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) {
   15047     GLMessage glmsg;
   15048     GLTraceContext *glContext = getGLTraceContext();
   15049 
   15050     glmsg.set_function(GLMessage::glGetDriverControlStringQCOM);
   15051 
   15052     // copy argument driverControl
   15053     GLMessage_DataType *arg_driverControl = glmsg.add_args();
   15054     arg_driverControl->set_isarray(false);
   15055     arg_driverControl->set_type(GLMessage::DataType::INT);
   15056     arg_driverControl->add_intvalue(driverControl);
   15057 
   15058     // copy argument bufSize
   15059     GLMessage_DataType *arg_bufSize = glmsg.add_args();
   15060     arg_bufSize->set_isarray(false);
   15061     arg_bufSize->set_type(GLMessage::DataType::INT);
   15062     arg_bufSize->add_intvalue(bufSize);
   15063 
   15064     // copy argument length
   15065     GLMessage_DataType *arg_length = glmsg.add_args();
   15066     arg_length->set_isarray(false);
   15067     arg_length->set_type(GLMessage::DataType::INT);
   15068     arg_length->add_intvalue((int)length);
   15069 
   15070     // copy argument driverControlString
   15071     GLMessage_DataType *arg_driverControlString = glmsg.add_args();
   15072     arg_driverControlString->set_isarray(false);
   15073     arg_driverControlString->set_type(GLMessage::DataType::INT);
   15074     arg_driverControlString->add_intvalue((int)driverControlString);
   15075 
   15076     // call function
   15077     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15078     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15079     glContext->hooks->gl.glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString);
   15080     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15081     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15082 
   15083     void *pointerArgs[] = {
   15084         (void *) length,
   15085         (void *) driverControlString,
   15086     };
   15087 
   15088     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15089                               threadStartTime, threadEndTime,
   15090                               &glmsg, pointerArgs);
   15091     glContext->traceGLMessage(&glmsg);
   15092 }
   15093 
   15094 void GLTrace_glEnableDriverControlQCOM(GLuint driverControl) {
   15095     GLMessage glmsg;
   15096     GLTraceContext *glContext = getGLTraceContext();
   15097 
   15098     glmsg.set_function(GLMessage::glEnableDriverControlQCOM);
   15099 
   15100     // copy argument driverControl
   15101     GLMessage_DataType *arg_driverControl = glmsg.add_args();
   15102     arg_driverControl->set_isarray(false);
   15103     arg_driverControl->set_type(GLMessage::DataType::INT);
   15104     arg_driverControl->add_intvalue(driverControl);
   15105 
   15106     // call function
   15107     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15108     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15109     glContext->hooks->gl.glEnableDriverControlQCOM(driverControl);
   15110     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15111     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15112 
   15113     void *pointerArgs[] = {
   15114     };
   15115 
   15116     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15117                               threadStartTime, threadEndTime,
   15118                               &glmsg, pointerArgs);
   15119     glContext->traceGLMessage(&glmsg);
   15120 }
   15121 
   15122 void GLTrace_glDisableDriverControlQCOM(GLuint driverControl) {
   15123     GLMessage glmsg;
   15124     GLTraceContext *glContext = getGLTraceContext();
   15125 
   15126     glmsg.set_function(GLMessage::glDisableDriverControlQCOM);
   15127 
   15128     // copy argument driverControl
   15129     GLMessage_DataType *arg_driverControl = glmsg.add_args();
   15130     arg_driverControl->set_isarray(false);
   15131     arg_driverControl->set_type(GLMessage::DataType::INT);
   15132     arg_driverControl->add_intvalue(driverControl);
   15133 
   15134     // call function
   15135     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15136     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15137     glContext->hooks->gl.glDisableDriverControlQCOM(driverControl);
   15138     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15139     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15140 
   15141     void *pointerArgs[] = {
   15142     };
   15143 
   15144     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15145                               threadStartTime, threadEndTime,
   15146                               &glmsg, pointerArgs);
   15147     glContext->traceGLMessage(&glmsg);
   15148 }
   15149 
   15150 void GLTrace_glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures) {
   15151     GLMessage glmsg;
   15152     GLTraceContext *glContext = getGLTraceContext();
   15153 
   15154     glmsg.set_function(GLMessage::glExtGetTexturesQCOM);
   15155 
   15156     // copy argument textures
   15157     GLMessage_DataType *arg_textures = glmsg.add_args();
   15158     arg_textures->set_isarray(false);
   15159     arg_textures->set_type(GLMessage::DataType::INT);
   15160     arg_textures->add_intvalue((int)textures);
   15161 
   15162     // copy argument maxTextures
   15163     GLMessage_DataType *arg_maxTextures = glmsg.add_args();
   15164     arg_maxTextures->set_isarray(false);
   15165     arg_maxTextures->set_type(GLMessage::DataType::INT);
   15166     arg_maxTextures->add_intvalue(maxTextures);
   15167 
   15168     // copy argument numTextures
   15169     GLMessage_DataType *arg_numTextures = glmsg.add_args();
   15170     arg_numTextures->set_isarray(false);
   15171     arg_numTextures->set_type(GLMessage::DataType::INT);
   15172     arg_numTextures->add_intvalue((int)numTextures);
   15173 
   15174     // call function
   15175     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15176     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15177     glContext->hooks->gl.glExtGetTexturesQCOM(textures, maxTextures, numTextures);
   15178     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15179     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15180 
   15181     void *pointerArgs[] = {
   15182         (void *) textures,
   15183         (void *) numTextures,
   15184     };
   15185 
   15186     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15187                               threadStartTime, threadEndTime,
   15188                               &glmsg, pointerArgs);
   15189     glContext->traceGLMessage(&glmsg);
   15190 }
   15191 
   15192 void GLTrace_glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) {
   15193     GLMessage glmsg;
   15194     GLTraceContext *glContext = getGLTraceContext();
   15195 
   15196     glmsg.set_function(GLMessage::glExtGetBuffersQCOM);
   15197 
   15198     // copy argument buffers
   15199     GLMessage_DataType *arg_buffers = glmsg.add_args();
   15200     arg_buffers->set_isarray(false);
   15201     arg_buffers->set_type(GLMessage::DataType::INT);
   15202     arg_buffers->add_intvalue((int)buffers);
   15203 
   15204     // copy argument maxBuffers
   15205     GLMessage_DataType *arg_maxBuffers = glmsg.add_args();
   15206     arg_maxBuffers->set_isarray(false);
   15207     arg_maxBuffers->set_type(GLMessage::DataType::INT);
   15208     arg_maxBuffers->add_intvalue(maxBuffers);
   15209 
   15210     // copy argument numBuffers
   15211     GLMessage_DataType *arg_numBuffers = glmsg.add_args();
   15212     arg_numBuffers->set_isarray(false);
   15213     arg_numBuffers->set_type(GLMessage::DataType::INT);
   15214     arg_numBuffers->add_intvalue((int)numBuffers);
   15215 
   15216     // call function
   15217     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15218     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15219     glContext->hooks->gl.glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers);
   15220     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15221     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15222 
   15223     void *pointerArgs[] = {
   15224         (void *) buffers,
   15225         (void *) numBuffers,
   15226     };
   15227 
   15228     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15229                               threadStartTime, threadEndTime,
   15230                               &glmsg, pointerArgs);
   15231     glContext->traceGLMessage(&glmsg);
   15232 }
   15233 
   15234 void GLTrace_glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) {
   15235     GLMessage glmsg;
   15236     GLTraceContext *glContext = getGLTraceContext();
   15237 
   15238     glmsg.set_function(GLMessage::glExtGetRenderbuffersQCOM);
   15239 
   15240     // copy argument renderbuffers
   15241     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   15242     arg_renderbuffers->set_isarray(false);
   15243     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   15244     arg_renderbuffers->add_intvalue((int)renderbuffers);
   15245 
   15246     // copy argument maxRenderbuffers
   15247     GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args();
   15248     arg_maxRenderbuffers->set_isarray(false);
   15249     arg_maxRenderbuffers->set_type(GLMessage::DataType::INT);
   15250     arg_maxRenderbuffers->add_intvalue(maxRenderbuffers);
   15251 
   15252     // copy argument numRenderbuffers
   15253     GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args();
   15254     arg_numRenderbuffers->set_isarray(false);
   15255     arg_numRenderbuffers->set_type(GLMessage::DataType::INT);
   15256     arg_numRenderbuffers->add_intvalue((int)numRenderbuffers);
   15257 
   15258     // call function
   15259     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15260     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15261     glContext->hooks->gl.glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers);
   15262     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15263     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15264 
   15265     void *pointerArgs[] = {
   15266         (void *) renderbuffers,
   15267         (void *) numRenderbuffers,
   15268     };
   15269 
   15270     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15271                               threadStartTime, threadEndTime,
   15272                               &glmsg, pointerArgs);
   15273     glContext->traceGLMessage(&glmsg);
   15274 }
   15275 
   15276 void GLTrace_glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) {
   15277     GLMessage glmsg;
   15278     GLTraceContext *glContext = getGLTraceContext();
   15279 
   15280     glmsg.set_function(GLMessage::glExtGetFramebuffersQCOM);
   15281 
   15282     // copy argument framebuffers
   15283     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   15284     arg_framebuffers->set_isarray(false);
   15285     arg_framebuffers->set_type(GLMessage::DataType::INT);
   15286     arg_framebuffers->add_intvalue((int)framebuffers);
   15287 
   15288     // copy argument maxFramebuffers
   15289     GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args();
   15290     arg_maxFramebuffers->set_isarray(false);
   15291     arg_maxFramebuffers->set_type(GLMessage::DataType::INT);
   15292     arg_maxFramebuffers->add_intvalue(maxFramebuffers);
   15293 
   15294     // copy argument numFramebuffers
   15295     GLMessage_DataType *arg_numFramebuffers = glmsg.add_args();
   15296     arg_numFramebuffers->set_isarray(false);
   15297     arg_numFramebuffers->set_type(GLMessage::DataType::INT);
   15298     arg_numFramebuffers->add_intvalue((int)numFramebuffers);
   15299 
   15300     // call function
   15301     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15302     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15303     glContext->hooks->gl.glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers);
   15304     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15305     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15306 
   15307     void *pointerArgs[] = {
   15308         (void *) framebuffers,
   15309         (void *) numFramebuffers,
   15310     };
   15311 
   15312     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15313                               threadStartTime, threadEndTime,
   15314                               &glmsg, pointerArgs);
   15315     glContext->traceGLMessage(&glmsg);
   15316 }
   15317 
   15318 void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) {
   15319     GLMessage glmsg;
   15320     GLTraceContext *glContext = getGLTraceContext();
   15321 
   15322     glmsg.set_function(GLMessage::glExtGetTexLevelParameterivQCOM);
   15323 
   15324     // copy argument texture
   15325     GLMessage_DataType *arg_texture = glmsg.add_args();
   15326     arg_texture->set_isarray(false);
   15327     arg_texture->set_type(GLMessage::DataType::INT);
   15328     arg_texture->add_intvalue(texture);
   15329 
   15330     // copy argument face
   15331     GLMessage_DataType *arg_face = glmsg.add_args();
   15332     arg_face->set_isarray(false);
   15333     arg_face->set_type(GLMessage::DataType::ENUM);
   15334     arg_face->add_intvalue((int)face);
   15335 
   15336     // copy argument level
   15337     GLMessage_DataType *arg_level = glmsg.add_args();
   15338     arg_level->set_isarray(false);
   15339     arg_level->set_type(GLMessage::DataType::INT);
   15340     arg_level->add_intvalue(level);
   15341 
   15342     // copy argument pname
   15343     GLMessage_DataType *arg_pname = glmsg.add_args();
   15344     arg_pname->set_isarray(false);
   15345     arg_pname->set_type(GLMessage::DataType::ENUM);
   15346     arg_pname->add_intvalue((int)pname);
   15347 
   15348     // copy argument params
   15349     GLMessage_DataType *arg_params = glmsg.add_args();
   15350     arg_params->set_isarray(false);
   15351     arg_params->set_type(GLMessage::DataType::INT);
   15352     arg_params->add_intvalue((int)params);
   15353 
   15354     // call function
   15355     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15356     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15357     glContext->hooks->gl.glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params);
   15358     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15359     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15360 
   15361     void *pointerArgs[] = {
   15362         (void *) params,
   15363     };
   15364 
   15365     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15366                               threadStartTime, threadEndTime,
   15367                               &glmsg, pointerArgs);
   15368     glContext->traceGLMessage(&glmsg);
   15369 }
   15370 
   15371 void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) {
   15372     GLMessage glmsg;
   15373     GLTraceContext *glContext = getGLTraceContext();
   15374 
   15375     glmsg.set_function(GLMessage::glExtTexObjectStateOverrideiQCOM);
   15376 
   15377     // copy argument target
   15378     GLMessage_DataType *arg_target = glmsg.add_args();
   15379     arg_target->set_isarray(false);
   15380     arg_target->set_type(GLMessage::DataType::ENUM);
   15381     arg_target->add_intvalue((int)target);
   15382 
   15383     // copy argument pname
   15384     GLMessage_DataType *arg_pname = glmsg.add_args();
   15385     arg_pname->set_isarray(false);
   15386     arg_pname->set_type(GLMessage::DataType::ENUM);
   15387     arg_pname->add_intvalue((int)pname);
   15388 
   15389     // copy argument param
   15390     GLMessage_DataType *arg_param = glmsg.add_args();
   15391     arg_param->set_isarray(false);
   15392     arg_param->set_type(GLMessage::DataType::INT);
   15393     arg_param->add_intvalue(param);
   15394 
   15395     // call function
   15396     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15397     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15398     glContext->hooks->gl.glExtTexObjectStateOverrideiQCOM(target, pname, param);
   15399     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15400     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15401 
   15402     void *pointerArgs[] = {
   15403     };
   15404 
   15405     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15406                               threadStartTime, threadEndTime,
   15407                               &glmsg, pointerArgs);
   15408     glContext->traceGLMessage(&glmsg);
   15409 }
   15410 
   15411 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) {
   15412     GLMessage glmsg;
   15413     GLTraceContext *glContext = getGLTraceContext();
   15414 
   15415     glmsg.set_function(GLMessage::glExtGetTexSubImageQCOM);
   15416 
   15417     // copy argument target
   15418     GLMessage_DataType *arg_target = glmsg.add_args();
   15419     arg_target->set_isarray(false);
   15420     arg_target->set_type(GLMessage::DataType::ENUM);
   15421     arg_target->add_intvalue((int)target);
   15422 
   15423     // copy argument level
   15424     GLMessage_DataType *arg_level = glmsg.add_args();
   15425     arg_level->set_isarray(false);
   15426     arg_level->set_type(GLMessage::DataType::INT);
   15427     arg_level->add_intvalue(level);
   15428 
   15429     // copy argument xoffset
   15430     GLMessage_DataType *arg_xoffset = glmsg.add_args();
   15431     arg_xoffset->set_isarray(false);
   15432     arg_xoffset->set_type(GLMessage::DataType::INT);
   15433     arg_xoffset->add_intvalue(xoffset);
   15434 
   15435     // copy argument yoffset
   15436     GLMessage_DataType *arg_yoffset = glmsg.add_args();
   15437     arg_yoffset->set_isarray(false);
   15438     arg_yoffset->set_type(GLMessage::DataType::INT);
   15439     arg_yoffset->add_intvalue(yoffset);
   15440 
   15441     // copy argument zoffset
   15442     GLMessage_DataType *arg_zoffset = glmsg.add_args();
   15443     arg_zoffset->set_isarray(false);
   15444     arg_zoffset->set_type(GLMessage::DataType::INT);
   15445     arg_zoffset->add_intvalue(zoffset);
   15446 
   15447     // copy argument width
   15448     GLMessage_DataType *arg_width = glmsg.add_args();
   15449     arg_width->set_isarray(false);
   15450     arg_width->set_type(GLMessage::DataType::INT);
   15451     arg_width->add_intvalue(width);
   15452 
   15453     // copy argument height
   15454     GLMessage_DataType *arg_height = glmsg.add_args();
   15455     arg_height->set_isarray(false);
   15456     arg_height->set_type(GLMessage::DataType::INT);
   15457     arg_height->add_intvalue(height);
   15458 
   15459     // copy argument depth
   15460     GLMessage_DataType *arg_depth = glmsg.add_args();
   15461     arg_depth->set_isarray(false);
   15462     arg_depth->set_type(GLMessage::DataType::INT);
   15463     arg_depth->add_intvalue(depth);
   15464 
   15465     // copy argument format
   15466     GLMessage_DataType *arg_format = glmsg.add_args();
   15467     arg_format->set_isarray(false);
   15468     arg_format->set_type(GLMessage::DataType::ENUM);
   15469     arg_format->add_intvalue((int)format);
   15470 
   15471     // copy argument type
   15472     GLMessage_DataType *arg_type = glmsg.add_args();
   15473     arg_type->set_isarray(false);
   15474     arg_type->set_type(GLMessage::DataType::ENUM);
   15475     arg_type->add_intvalue((int)type);
   15476 
   15477     // copy argument texels
   15478     GLMessage_DataType *arg_texels = glmsg.add_args();
   15479     arg_texels->set_isarray(false);
   15480     arg_texels->set_type(GLMessage::DataType::INT);
   15481     arg_texels->add_intvalue((int)texels);
   15482 
   15483     // call function
   15484     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15485     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15486     glContext->hooks->gl.glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels);
   15487     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15488     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15489 
   15490     void *pointerArgs[] = {
   15491         (void *) texels,
   15492     };
   15493 
   15494     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15495                               threadStartTime, threadEndTime,
   15496                               &glmsg, pointerArgs);
   15497     glContext->traceGLMessage(&glmsg);
   15498 }
   15499 
   15500 void GLTrace_glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) {
   15501     GLMessage glmsg;
   15502     GLTraceContext *glContext = getGLTraceContext();
   15503 
   15504     glmsg.set_function(GLMessage::glExtGetBufferPointervQCOM);
   15505 
   15506     // copy argument target
   15507     GLMessage_DataType *arg_target = glmsg.add_args();
   15508     arg_target->set_isarray(false);
   15509     arg_target->set_type(GLMessage::DataType::ENUM);
   15510     arg_target->add_intvalue((int)target);
   15511 
   15512     // copy argument params
   15513     GLMessage_DataType *arg_params = glmsg.add_args();
   15514     arg_params->set_isarray(false);
   15515     arg_params->set_type(GLMessage::DataType::INT);
   15516     arg_params->add_intvalue((int)params);
   15517 
   15518     // call function
   15519     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15520     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15521     glContext->hooks->gl.glExtGetBufferPointervQCOM(target, params);
   15522     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15523     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15524 
   15525     void *pointerArgs[] = {
   15526         (void *) params,
   15527     };
   15528 
   15529     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15530                               threadStartTime, threadEndTime,
   15531                               &glmsg, pointerArgs);
   15532     glContext->traceGLMessage(&glmsg);
   15533 }
   15534 
   15535 void GLTrace_glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders) {
   15536     GLMessage glmsg;
   15537     GLTraceContext *glContext = getGLTraceContext();
   15538 
   15539     glmsg.set_function(GLMessage::glExtGetShadersQCOM);
   15540 
   15541     // copy argument shaders
   15542     GLMessage_DataType *arg_shaders = glmsg.add_args();
   15543     arg_shaders->set_isarray(false);
   15544     arg_shaders->set_type(GLMessage::DataType::INT);
   15545     arg_shaders->add_intvalue((int)shaders);
   15546 
   15547     // copy argument maxShaders
   15548     GLMessage_DataType *arg_maxShaders = glmsg.add_args();
   15549     arg_maxShaders->set_isarray(false);
   15550     arg_maxShaders->set_type(GLMessage::DataType::INT);
   15551     arg_maxShaders->add_intvalue(maxShaders);
   15552 
   15553     // copy argument numShaders
   15554     GLMessage_DataType *arg_numShaders = glmsg.add_args();
   15555     arg_numShaders->set_isarray(false);
   15556     arg_numShaders->set_type(GLMessage::DataType::INT);
   15557     arg_numShaders->add_intvalue((int)numShaders);
   15558 
   15559     // call function
   15560     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15561     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15562     glContext->hooks->gl.glExtGetShadersQCOM(shaders, maxShaders, numShaders);
   15563     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15564     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15565 
   15566     void *pointerArgs[] = {
   15567         (void *) shaders,
   15568         (void *) numShaders,
   15569     };
   15570 
   15571     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15572                               threadStartTime, threadEndTime,
   15573                               &glmsg, pointerArgs);
   15574     glContext->traceGLMessage(&glmsg);
   15575 }
   15576 
   15577 void GLTrace_glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms) {
   15578     GLMessage glmsg;
   15579     GLTraceContext *glContext = getGLTraceContext();
   15580 
   15581     glmsg.set_function(GLMessage::glExtGetProgramsQCOM);
   15582 
   15583     // copy argument programs
   15584     GLMessage_DataType *arg_programs = glmsg.add_args();
   15585     arg_programs->set_isarray(false);
   15586     arg_programs->set_type(GLMessage::DataType::INT);
   15587     arg_programs->add_intvalue((int)programs);
   15588 
   15589     // copy argument maxPrograms
   15590     GLMessage_DataType *arg_maxPrograms = glmsg.add_args();
   15591     arg_maxPrograms->set_isarray(false);
   15592     arg_maxPrograms->set_type(GLMessage::DataType::INT);
   15593     arg_maxPrograms->add_intvalue(maxPrograms);
   15594 
   15595     // copy argument numPrograms
   15596     GLMessage_DataType *arg_numPrograms = glmsg.add_args();
   15597     arg_numPrograms->set_isarray(false);
   15598     arg_numPrograms->set_type(GLMessage::DataType::INT);
   15599     arg_numPrograms->add_intvalue((int)numPrograms);
   15600 
   15601     // call function
   15602     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15603     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15604     glContext->hooks->gl.glExtGetProgramsQCOM(programs, maxPrograms, numPrograms);
   15605     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15606     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15607 
   15608     void *pointerArgs[] = {
   15609         (void *) programs,
   15610         (void *) numPrograms,
   15611     };
   15612 
   15613     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15614                               threadStartTime, threadEndTime,
   15615                               &glmsg, pointerArgs);
   15616     glContext->traceGLMessage(&glmsg);
   15617 }
   15618 
   15619 GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program) {
   15620     GLMessage glmsg;
   15621     GLTraceContext *glContext = getGLTraceContext();
   15622 
   15623     glmsg.set_function(GLMessage::glExtIsProgramBinaryQCOM);
   15624 
   15625     // copy argument program
   15626     GLMessage_DataType *arg_program = glmsg.add_args();
   15627     arg_program->set_isarray(false);
   15628     arg_program->set_type(GLMessage::DataType::INT);
   15629     arg_program->add_intvalue(program);
   15630 
   15631     // call function
   15632     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15633     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15634     GLboolean retValue = glContext->hooks->gl.glExtIsProgramBinaryQCOM(program);
   15635     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15636     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15637 
   15638     // set return value
   15639     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   15640     rt->set_isarray(false);
   15641     rt->set_type(GLMessage::DataType::BOOL);
   15642     rt->add_boolvalue(retValue);
   15643 
   15644     void *pointerArgs[] = {
   15645     };
   15646 
   15647     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15648                               threadStartTime, threadEndTime,
   15649                               &glmsg, pointerArgs);
   15650     glContext->traceGLMessage(&glmsg);
   15651 
   15652     return retValue;
   15653 }
   15654 
   15655 void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length) {
   15656     GLMessage glmsg;
   15657     GLTraceContext *glContext = getGLTraceContext();
   15658 
   15659     glmsg.set_function(GLMessage::glExtGetProgramBinarySourceQCOM);
   15660 
   15661     // copy argument program
   15662     GLMessage_DataType *arg_program = glmsg.add_args();
   15663     arg_program->set_isarray(false);
   15664     arg_program->set_type(GLMessage::DataType::INT);
   15665     arg_program->add_intvalue(program);
   15666 
   15667     // copy argument shadertype
   15668     GLMessage_DataType *arg_shadertype = glmsg.add_args();
   15669     arg_shadertype->set_isarray(false);
   15670     arg_shadertype->set_type(GLMessage::DataType::ENUM);
   15671     arg_shadertype->add_intvalue((int)shadertype);
   15672 
   15673     // copy argument source
   15674     GLMessage_DataType *arg_source = glmsg.add_args();
   15675     arg_source->set_isarray(false);
   15676     arg_source->set_type(GLMessage::DataType::INT);
   15677     arg_source->add_intvalue((int)source);
   15678 
   15679     // copy argument length
   15680     GLMessage_DataType *arg_length = glmsg.add_args();
   15681     arg_length->set_isarray(false);
   15682     arg_length->set_type(GLMessage::DataType::INT);
   15683     arg_length->add_intvalue((int)length);
   15684 
   15685     // call function
   15686     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15687     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15688     glContext->hooks->gl.glExtGetProgramBinarySourceQCOM(program, shadertype, source, length);
   15689     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15690     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15691 
   15692     void *pointerArgs[] = {
   15693         (void *) source,
   15694         (void *) length,
   15695     };
   15696 
   15697     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15698                               threadStartTime, threadEndTime,
   15699                               &glmsg, pointerArgs);
   15700     glContext->traceGLMessage(&glmsg);
   15701 }
   15702 
   15703 void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) {
   15704     GLMessage glmsg;
   15705     GLTraceContext *glContext = getGLTraceContext();
   15706 
   15707     glmsg.set_function(GLMessage::glStartTilingQCOM);
   15708 
   15709     // copy argument x
   15710     GLMessage_DataType *arg_x = glmsg.add_args();
   15711     arg_x->set_isarray(false);
   15712     arg_x->set_type(GLMessage::DataType::INT);
   15713     arg_x->add_intvalue(x);
   15714 
   15715     // copy argument y
   15716     GLMessage_DataType *arg_y = glmsg.add_args();
   15717     arg_y->set_isarray(false);
   15718     arg_y->set_type(GLMessage::DataType::INT);
   15719     arg_y->add_intvalue(y);
   15720 
   15721     // copy argument width
   15722     GLMessage_DataType *arg_width = glmsg.add_args();
   15723     arg_width->set_isarray(false);
   15724     arg_width->set_type(GLMessage::DataType::INT);
   15725     arg_width->add_intvalue(width);
   15726 
   15727     // copy argument height
   15728     GLMessage_DataType *arg_height = glmsg.add_args();
   15729     arg_height->set_isarray(false);
   15730     arg_height->set_type(GLMessage::DataType::INT);
   15731     arg_height->add_intvalue(height);
   15732 
   15733     // copy argument preserveMask
   15734     GLMessage_DataType *arg_preserveMask = glmsg.add_args();
   15735     arg_preserveMask->set_isarray(false);
   15736     arg_preserveMask->set_type(GLMessage::DataType::INT);
   15737     arg_preserveMask->add_intvalue(preserveMask);
   15738 
   15739     // call function
   15740     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15741     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15742     glContext->hooks->gl.glStartTilingQCOM(x, y, width, height, preserveMask);
   15743     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15744     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15745 
   15746     void *pointerArgs[] = {
   15747     };
   15748 
   15749     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15750                               threadStartTime, threadEndTime,
   15751                               &glmsg, pointerArgs);
   15752     glContext->traceGLMessage(&glmsg);
   15753 }
   15754 
   15755 void GLTrace_glEndTilingQCOM(GLbitfield preserveMask) {
   15756     GLMessage glmsg;
   15757     GLTraceContext *glContext = getGLTraceContext();
   15758 
   15759     glmsg.set_function(GLMessage::glEndTilingQCOM);
   15760 
   15761     // copy argument preserveMask
   15762     GLMessage_DataType *arg_preserveMask = glmsg.add_args();
   15763     arg_preserveMask->set_isarray(false);
   15764     arg_preserveMask->set_type(GLMessage::DataType::INT);
   15765     arg_preserveMask->add_intvalue(preserveMask);
   15766 
   15767     // call function
   15768     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15769     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15770     glContext->hooks->gl.glEndTilingQCOM(preserveMask);
   15771     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15772     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15773 
   15774     void *pointerArgs[] = {
   15775     };
   15776 
   15777     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15778                               threadStartTime, threadEndTime,
   15779                               &glmsg, pointerArgs);
   15780     glContext->traceGLMessage(&glmsg);
   15781 }
   15782 
   15783 
   15784 // Definitions for GL1 APIs
   15785 
   15786 void GLTrace_glAlphaFunc(GLenum func, GLclampf ref) {
   15787     GLMessage glmsg;
   15788     GLTraceContext *glContext = getGLTraceContext();
   15789 
   15790     glmsg.set_function(GLMessage::glAlphaFunc);
   15791 
   15792     // copy argument func
   15793     GLMessage_DataType *arg_func = glmsg.add_args();
   15794     arg_func->set_isarray(false);
   15795     arg_func->set_type(GLMessage::DataType::ENUM);
   15796     arg_func->add_intvalue((int)func);
   15797 
   15798     // copy argument ref
   15799     GLMessage_DataType *arg_ref = glmsg.add_args();
   15800     arg_ref->set_isarray(false);
   15801     arg_ref->set_type(GLMessage::DataType::FLOAT);
   15802     arg_ref->add_floatvalue(ref);
   15803 
   15804     // call function
   15805     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15806     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15807     glContext->hooks->gl.glAlphaFunc(func, ref);
   15808     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15809     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15810 
   15811     void *pointerArgs[] = {
   15812     };
   15813 
   15814     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15815                               threadStartTime, threadEndTime,
   15816                               &glmsg, pointerArgs);
   15817     glContext->traceGLMessage(&glmsg);
   15818 }
   15819 
   15820 void GLTrace_glClipPlanef(GLenum plane, const GLfloat *equation) {
   15821     GLMessage glmsg;
   15822     GLTraceContext *glContext = getGLTraceContext();
   15823 
   15824     glmsg.set_function(GLMessage::glClipPlanef);
   15825 
   15826     // copy argument plane
   15827     GLMessage_DataType *arg_plane = glmsg.add_args();
   15828     arg_plane->set_isarray(false);
   15829     arg_plane->set_type(GLMessage::DataType::ENUM);
   15830     arg_plane->add_intvalue((int)plane);
   15831 
   15832     // copy argument equation
   15833     GLMessage_DataType *arg_equation = glmsg.add_args();
   15834     arg_equation->set_isarray(false);
   15835     arg_equation->set_type(GLMessage::DataType::INT);
   15836     arg_equation->add_intvalue((int)equation);
   15837 
   15838     // call function
   15839     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15840     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15841     glContext->hooks->gl.glClipPlanef(plane, equation);
   15842     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15843     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15844 
   15845     void *pointerArgs[] = {
   15846         (void *) equation,
   15847     };
   15848 
   15849     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15850                               threadStartTime, threadEndTime,
   15851                               &glmsg, pointerArgs);
   15852     glContext->traceGLMessage(&glmsg);
   15853 }
   15854 
   15855 void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
   15856     GLMessage glmsg;
   15857     GLTraceContext *glContext = getGLTraceContext();
   15858 
   15859     glmsg.set_function(GLMessage::glColor4f);
   15860 
   15861     // copy argument red
   15862     GLMessage_DataType *arg_red = glmsg.add_args();
   15863     arg_red->set_isarray(false);
   15864     arg_red->set_type(GLMessage::DataType::FLOAT);
   15865     arg_red->add_floatvalue(red);
   15866 
   15867     // copy argument green
   15868     GLMessage_DataType *arg_green = glmsg.add_args();
   15869     arg_green->set_isarray(false);
   15870     arg_green->set_type(GLMessage::DataType::FLOAT);
   15871     arg_green->add_floatvalue(green);
   15872 
   15873     // copy argument blue
   15874     GLMessage_DataType *arg_blue = glmsg.add_args();
   15875     arg_blue->set_isarray(false);
   15876     arg_blue->set_type(GLMessage::DataType::FLOAT);
   15877     arg_blue->add_floatvalue(blue);
   15878 
   15879     // copy argument alpha
   15880     GLMessage_DataType *arg_alpha = glmsg.add_args();
   15881     arg_alpha->set_isarray(false);
   15882     arg_alpha->set_type(GLMessage::DataType::FLOAT);
   15883     arg_alpha->add_floatvalue(alpha);
   15884 
   15885     // call function
   15886     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15887     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15888     glContext->hooks->gl.glColor4f(red, green, blue, alpha);
   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_glFogf(GLenum pname, GLfloat param) {
   15902     GLMessage glmsg;
   15903     GLTraceContext *glContext = getGLTraceContext();
   15904 
   15905     glmsg.set_function(GLMessage::glFogf);
   15906 
   15907     // copy argument pname
   15908     GLMessage_DataType *arg_pname = glmsg.add_args();
   15909     arg_pname->set_isarray(false);
   15910     arg_pname->set_type(GLMessage::DataType::ENUM);
   15911     arg_pname->add_intvalue((int)pname);
   15912 
   15913     // copy argument param
   15914     GLMessage_DataType *arg_param = glmsg.add_args();
   15915     arg_param->set_isarray(false);
   15916     arg_param->set_type(GLMessage::DataType::FLOAT);
   15917     arg_param->add_floatvalue(param);
   15918 
   15919     // call function
   15920     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15921     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15922     glContext->hooks->gl.glFogf(pname, param);
   15923     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15924     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15925 
   15926     void *pointerArgs[] = {
   15927     };
   15928 
   15929     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15930                               threadStartTime, threadEndTime,
   15931                               &glmsg, pointerArgs);
   15932     glContext->traceGLMessage(&glmsg);
   15933 }
   15934 
   15935 void GLTrace_glFogfv(GLenum pname, const GLfloat *params) {
   15936     GLMessage glmsg;
   15937     GLTraceContext *glContext = getGLTraceContext();
   15938 
   15939     glmsg.set_function(GLMessage::glFogfv);
   15940 
   15941     // copy argument pname
   15942     GLMessage_DataType *arg_pname = glmsg.add_args();
   15943     arg_pname->set_isarray(false);
   15944     arg_pname->set_type(GLMessage::DataType::ENUM);
   15945     arg_pname->add_intvalue((int)pname);
   15946 
   15947     // copy argument params
   15948     GLMessage_DataType *arg_params = glmsg.add_args();
   15949     arg_params->set_isarray(false);
   15950     arg_params->set_type(GLMessage::DataType::INT);
   15951     arg_params->add_intvalue((int)params);
   15952 
   15953     // call function
   15954     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15955     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   15956     glContext->hooks->gl.glFogfv(pname, params);
   15957     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   15958     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   15959 
   15960     void *pointerArgs[] = {
   15961         (void *) params,
   15962     };
   15963 
   15964     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   15965                               threadStartTime, threadEndTime,
   15966                               &glmsg, pointerArgs);
   15967     glContext->traceGLMessage(&glmsg);
   15968 }
   15969 
   15970 void GLTrace_glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   15971     GLMessage glmsg;
   15972     GLTraceContext *glContext = getGLTraceContext();
   15973 
   15974     glmsg.set_function(GLMessage::glFrustumf);
   15975 
   15976     // copy argument left
   15977     GLMessage_DataType *arg_left = glmsg.add_args();
   15978     arg_left->set_isarray(false);
   15979     arg_left->set_type(GLMessage::DataType::FLOAT);
   15980     arg_left->add_floatvalue(left);
   15981 
   15982     // copy argument right
   15983     GLMessage_DataType *arg_right = glmsg.add_args();
   15984     arg_right->set_isarray(false);
   15985     arg_right->set_type(GLMessage::DataType::FLOAT);
   15986     arg_right->add_floatvalue(right);
   15987 
   15988     // copy argument bottom
   15989     GLMessage_DataType *arg_bottom = glmsg.add_args();
   15990     arg_bottom->set_isarray(false);
   15991     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   15992     arg_bottom->add_floatvalue(bottom);
   15993 
   15994     // copy argument top
   15995     GLMessage_DataType *arg_top = glmsg.add_args();
   15996     arg_top->set_isarray(false);
   15997     arg_top->set_type(GLMessage::DataType::FLOAT);
   15998     arg_top->add_floatvalue(top);
   15999 
   16000     // copy argument zNear
   16001     GLMessage_DataType *arg_zNear = glmsg.add_args();
   16002     arg_zNear->set_isarray(false);
   16003     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   16004     arg_zNear->add_floatvalue(zNear);
   16005 
   16006     // copy argument zFar
   16007     GLMessage_DataType *arg_zFar = glmsg.add_args();
   16008     arg_zFar->set_isarray(false);
   16009     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   16010     arg_zFar->add_floatvalue(zFar);
   16011 
   16012     // call function
   16013     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16014     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16015     glContext->hooks->gl.glFrustumf(left, right, bottom, top, zNear, zFar);
   16016     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16017     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16018 
   16019     void *pointerArgs[] = {
   16020     };
   16021 
   16022     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16023                               threadStartTime, threadEndTime,
   16024                               &glmsg, pointerArgs);
   16025     glContext->traceGLMessage(&glmsg);
   16026 }
   16027 
   16028 void GLTrace_glGetClipPlanef(GLenum pname, GLfloat eqn[4]) {
   16029     GLMessage glmsg;
   16030     GLTraceContext *glContext = getGLTraceContext();
   16031 
   16032     glmsg.set_function(GLMessage::glGetClipPlanef);
   16033 
   16034     // copy argument pname
   16035     GLMessage_DataType *arg_pname = glmsg.add_args();
   16036     arg_pname->set_isarray(false);
   16037     arg_pname->set_type(GLMessage::DataType::ENUM);
   16038     arg_pname->add_intvalue((int)pname);
   16039 
   16040     // copy argument eqn
   16041     GLMessage_DataType *arg_eqn = glmsg.add_args();
   16042     arg_eqn->set_isarray(false);
   16043     arg_eqn->set_type(GLMessage::DataType::INT);
   16044     arg_eqn->add_intvalue((int)eqn);
   16045 
   16046     // call function
   16047     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16048     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16049     glContext->hooks->gl.glGetClipPlanef(pname, eqn);
   16050     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16051     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16052 
   16053     void *pointerArgs[] = {
   16054         (void *) eqn,
   16055     };
   16056 
   16057     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16058                               threadStartTime, threadEndTime,
   16059                               &glmsg, pointerArgs);
   16060     glContext->traceGLMessage(&glmsg);
   16061 }
   16062 
   16063 void GLTrace_glGetLightfv(GLenum light, GLenum pname, GLfloat *params) {
   16064     GLMessage glmsg;
   16065     GLTraceContext *glContext = getGLTraceContext();
   16066 
   16067     glmsg.set_function(GLMessage::glGetLightfv);
   16068 
   16069     // copy argument light
   16070     GLMessage_DataType *arg_light = glmsg.add_args();
   16071     arg_light->set_isarray(false);
   16072     arg_light->set_type(GLMessage::DataType::ENUM);
   16073     arg_light->add_intvalue((int)light);
   16074 
   16075     // copy argument pname
   16076     GLMessage_DataType *arg_pname = glmsg.add_args();
   16077     arg_pname->set_isarray(false);
   16078     arg_pname->set_type(GLMessage::DataType::ENUM);
   16079     arg_pname->add_intvalue((int)pname);
   16080 
   16081     // copy argument params
   16082     GLMessage_DataType *arg_params = glmsg.add_args();
   16083     arg_params->set_isarray(false);
   16084     arg_params->set_type(GLMessage::DataType::INT);
   16085     arg_params->add_intvalue((int)params);
   16086 
   16087     // call function
   16088     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16089     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16090     glContext->hooks->gl.glGetLightfv(light, pname, params);
   16091     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16092     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16093 
   16094     void *pointerArgs[] = {
   16095         (void *) params,
   16096     };
   16097 
   16098     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16099                               threadStartTime, threadEndTime,
   16100                               &glmsg, pointerArgs);
   16101     glContext->traceGLMessage(&glmsg);
   16102 }
   16103 
   16104 void GLTrace_glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) {
   16105     GLMessage glmsg;
   16106     GLTraceContext *glContext = getGLTraceContext();
   16107 
   16108     glmsg.set_function(GLMessage::glGetMaterialfv);
   16109 
   16110     // copy argument face
   16111     GLMessage_DataType *arg_face = glmsg.add_args();
   16112     arg_face->set_isarray(false);
   16113     arg_face->set_type(GLMessage::DataType::ENUM);
   16114     arg_face->add_intvalue((int)face);
   16115 
   16116     // copy argument pname
   16117     GLMessage_DataType *arg_pname = glmsg.add_args();
   16118     arg_pname->set_isarray(false);
   16119     arg_pname->set_type(GLMessage::DataType::ENUM);
   16120     arg_pname->add_intvalue((int)pname);
   16121 
   16122     // copy argument params
   16123     GLMessage_DataType *arg_params = glmsg.add_args();
   16124     arg_params->set_isarray(false);
   16125     arg_params->set_type(GLMessage::DataType::INT);
   16126     arg_params->add_intvalue((int)params);
   16127 
   16128     // call function
   16129     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16130     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16131     glContext->hooks->gl.glGetMaterialfv(face, pname, params);
   16132     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16133     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16134 
   16135     void *pointerArgs[] = {
   16136         (void *) params,
   16137     };
   16138 
   16139     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16140                               threadStartTime, threadEndTime,
   16141                               &glmsg, pointerArgs);
   16142     glContext->traceGLMessage(&glmsg);
   16143 }
   16144 
   16145 void GLTrace_glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) {
   16146     GLMessage glmsg;
   16147     GLTraceContext *glContext = getGLTraceContext();
   16148 
   16149     glmsg.set_function(GLMessage::glGetTexEnvfv);
   16150 
   16151     // copy argument env
   16152     GLMessage_DataType *arg_env = glmsg.add_args();
   16153     arg_env->set_isarray(false);
   16154     arg_env->set_type(GLMessage::DataType::ENUM);
   16155     arg_env->add_intvalue((int)env);
   16156 
   16157     // copy argument pname
   16158     GLMessage_DataType *arg_pname = glmsg.add_args();
   16159     arg_pname->set_isarray(false);
   16160     arg_pname->set_type(GLMessage::DataType::ENUM);
   16161     arg_pname->add_intvalue((int)pname);
   16162 
   16163     // copy argument params
   16164     GLMessage_DataType *arg_params = glmsg.add_args();
   16165     arg_params->set_isarray(false);
   16166     arg_params->set_type(GLMessage::DataType::INT);
   16167     arg_params->add_intvalue((int)params);
   16168 
   16169     // call function
   16170     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16171     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16172     glContext->hooks->gl.glGetTexEnvfv(env, pname, params);
   16173     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16174     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16175 
   16176     void *pointerArgs[] = {
   16177         (void *) params,
   16178     };
   16179 
   16180     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16181                               threadStartTime, threadEndTime,
   16182                               &glmsg, pointerArgs);
   16183     glContext->traceGLMessage(&glmsg);
   16184 }
   16185 
   16186 void GLTrace_glLightModelf(GLenum pname, GLfloat param) {
   16187     GLMessage glmsg;
   16188     GLTraceContext *glContext = getGLTraceContext();
   16189 
   16190     glmsg.set_function(GLMessage::glLightModelf);
   16191 
   16192     // copy argument pname
   16193     GLMessage_DataType *arg_pname = glmsg.add_args();
   16194     arg_pname->set_isarray(false);
   16195     arg_pname->set_type(GLMessage::DataType::ENUM);
   16196     arg_pname->add_intvalue((int)pname);
   16197 
   16198     // copy argument param
   16199     GLMessage_DataType *arg_param = glmsg.add_args();
   16200     arg_param->set_isarray(false);
   16201     arg_param->set_type(GLMessage::DataType::FLOAT);
   16202     arg_param->add_floatvalue(param);
   16203 
   16204     // call function
   16205     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16206     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16207     glContext->hooks->gl.glLightModelf(pname, param);
   16208     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16209     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16210 
   16211     void *pointerArgs[] = {
   16212     };
   16213 
   16214     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16215                               threadStartTime, threadEndTime,
   16216                               &glmsg, pointerArgs);
   16217     glContext->traceGLMessage(&glmsg);
   16218 }
   16219 
   16220 void GLTrace_glLightModelfv(GLenum pname, const GLfloat *params) {
   16221     GLMessage glmsg;
   16222     GLTraceContext *glContext = getGLTraceContext();
   16223 
   16224     glmsg.set_function(GLMessage::glLightModelfv);
   16225 
   16226     // copy argument pname
   16227     GLMessage_DataType *arg_pname = glmsg.add_args();
   16228     arg_pname->set_isarray(false);
   16229     arg_pname->set_type(GLMessage::DataType::ENUM);
   16230     arg_pname->add_intvalue((int)pname);
   16231 
   16232     // copy argument params
   16233     GLMessage_DataType *arg_params = glmsg.add_args();
   16234     arg_params->set_isarray(false);
   16235     arg_params->set_type(GLMessage::DataType::INT);
   16236     arg_params->add_intvalue((int)params);
   16237 
   16238     // call function
   16239     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16240     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16241     glContext->hooks->gl.glLightModelfv(pname, params);
   16242     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16243     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16244 
   16245     void *pointerArgs[] = {
   16246         (void *) params,
   16247     };
   16248 
   16249     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16250                               threadStartTime, threadEndTime,
   16251                               &glmsg, pointerArgs);
   16252     glContext->traceGLMessage(&glmsg);
   16253 }
   16254 
   16255 void GLTrace_glLightf(GLenum light, GLenum pname, GLfloat param) {
   16256     GLMessage glmsg;
   16257     GLTraceContext *glContext = getGLTraceContext();
   16258 
   16259     glmsg.set_function(GLMessage::glLightf);
   16260 
   16261     // copy argument light
   16262     GLMessage_DataType *arg_light = glmsg.add_args();
   16263     arg_light->set_isarray(false);
   16264     arg_light->set_type(GLMessage::DataType::ENUM);
   16265     arg_light->add_intvalue((int)light);
   16266 
   16267     // copy argument pname
   16268     GLMessage_DataType *arg_pname = glmsg.add_args();
   16269     arg_pname->set_isarray(false);
   16270     arg_pname->set_type(GLMessage::DataType::ENUM);
   16271     arg_pname->add_intvalue((int)pname);
   16272 
   16273     // copy argument param
   16274     GLMessage_DataType *arg_param = glmsg.add_args();
   16275     arg_param->set_isarray(false);
   16276     arg_param->set_type(GLMessage::DataType::FLOAT);
   16277     arg_param->add_floatvalue(param);
   16278 
   16279     // call function
   16280     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16281     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16282     glContext->hooks->gl.glLightf(light, pname, param);
   16283     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16284     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16285 
   16286     void *pointerArgs[] = {
   16287     };
   16288 
   16289     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16290                               threadStartTime, threadEndTime,
   16291                               &glmsg, pointerArgs);
   16292     glContext->traceGLMessage(&glmsg);
   16293 }
   16294 
   16295 void GLTrace_glLightfv(GLenum light, GLenum pname, const GLfloat *params) {
   16296     GLMessage glmsg;
   16297     GLTraceContext *glContext = getGLTraceContext();
   16298 
   16299     glmsg.set_function(GLMessage::glLightfv);
   16300 
   16301     // copy argument light
   16302     GLMessage_DataType *arg_light = glmsg.add_args();
   16303     arg_light->set_isarray(false);
   16304     arg_light->set_type(GLMessage::DataType::ENUM);
   16305     arg_light->add_intvalue((int)light);
   16306 
   16307     // copy argument pname
   16308     GLMessage_DataType *arg_pname = glmsg.add_args();
   16309     arg_pname->set_isarray(false);
   16310     arg_pname->set_type(GLMessage::DataType::ENUM);
   16311     arg_pname->add_intvalue((int)pname);
   16312 
   16313     // copy argument params
   16314     GLMessage_DataType *arg_params = glmsg.add_args();
   16315     arg_params->set_isarray(false);
   16316     arg_params->set_type(GLMessage::DataType::INT);
   16317     arg_params->add_intvalue((int)params);
   16318 
   16319     // call function
   16320     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16321     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16322     glContext->hooks->gl.glLightfv(light, pname, params);
   16323     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16324     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16325 
   16326     void *pointerArgs[] = {
   16327         (void *) params,
   16328     };
   16329 
   16330     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16331                               threadStartTime, threadEndTime,
   16332                               &glmsg, pointerArgs);
   16333     glContext->traceGLMessage(&glmsg);
   16334 }
   16335 
   16336 void GLTrace_glLoadMatrixf(const GLfloat *m) {
   16337     GLMessage glmsg;
   16338     GLTraceContext *glContext = getGLTraceContext();
   16339 
   16340     glmsg.set_function(GLMessage::glLoadMatrixf);
   16341 
   16342     // copy argument m
   16343     GLMessage_DataType *arg_m = glmsg.add_args();
   16344     arg_m->set_isarray(false);
   16345     arg_m->set_type(GLMessage::DataType::INT);
   16346     arg_m->add_intvalue((int)m);
   16347 
   16348     // call function
   16349     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16350     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16351     glContext->hooks->gl.glLoadMatrixf(m);
   16352     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16353     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16354 
   16355     void *pointerArgs[] = {
   16356         (void *) m,
   16357     };
   16358 
   16359     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16360                               threadStartTime, threadEndTime,
   16361                               &glmsg, pointerArgs);
   16362     glContext->traceGLMessage(&glmsg);
   16363 }
   16364 
   16365 void GLTrace_glMaterialf(GLenum face, GLenum pname, GLfloat param) {
   16366     GLMessage glmsg;
   16367     GLTraceContext *glContext = getGLTraceContext();
   16368 
   16369     glmsg.set_function(GLMessage::glMaterialf);
   16370 
   16371     // copy argument face
   16372     GLMessage_DataType *arg_face = glmsg.add_args();
   16373     arg_face->set_isarray(false);
   16374     arg_face->set_type(GLMessage::DataType::ENUM);
   16375     arg_face->add_intvalue((int)face);
   16376 
   16377     // copy argument pname
   16378     GLMessage_DataType *arg_pname = glmsg.add_args();
   16379     arg_pname->set_isarray(false);
   16380     arg_pname->set_type(GLMessage::DataType::ENUM);
   16381     arg_pname->add_intvalue((int)pname);
   16382 
   16383     // copy argument param
   16384     GLMessage_DataType *arg_param = glmsg.add_args();
   16385     arg_param->set_isarray(false);
   16386     arg_param->set_type(GLMessage::DataType::FLOAT);
   16387     arg_param->add_floatvalue(param);
   16388 
   16389     // call function
   16390     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16391     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16392     glContext->hooks->gl.glMaterialf(face, pname, param);
   16393     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16394     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16395 
   16396     void *pointerArgs[] = {
   16397     };
   16398 
   16399     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16400                               threadStartTime, threadEndTime,
   16401                               &glmsg, pointerArgs);
   16402     glContext->traceGLMessage(&glmsg);
   16403 }
   16404 
   16405 void GLTrace_glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) {
   16406     GLMessage glmsg;
   16407     GLTraceContext *glContext = getGLTraceContext();
   16408 
   16409     glmsg.set_function(GLMessage::glMaterialfv);
   16410 
   16411     // copy argument face
   16412     GLMessage_DataType *arg_face = glmsg.add_args();
   16413     arg_face->set_isarray(false);
   16414     arg_face->set_type(GLMessage::DataType::ENUM);
   16415     arg_face->add_intvalue((int)face);
   16416 
   16417     // copy argument pname
   16418     GLMessage_DataType *arg_pname = glmsg.add_args();
   16419     arg_pname->set_isarray(false);
   16420     arg_pname->set_type(GLMessage::DataType::ENUM);
   16421     arg_pname->add_intvalue((int)pname);
   16422 
   16423     // copy argument params
   16424     GLMessage_DataType *arg_params = glmsg.add_args();
   16425     arg_params->set_isarray(false);
   16426     arg_params->set_type(GLMessage::DataType::INT);
   16427     arg_params->add_intvalue((int)params);
   16428 
   16429     // call function
   16430     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16431     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16432     glContext->hooks->gl.glMaterialfv(face, pname, params);
   16433     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16434     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16435 
   16436     void *pointerArgs[] = {
   16437         (void *) params,
   16438     };
   16439 
   16440     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16441                               threadStartTime, threadEndTime,
   16442                               &glmsg, pointerArgs);
   16443     glContext->traceGLMessage(&glmsg);
   16444 }
   16445 
   16446 void GLTrace_glMultMatrixf(const GLfloat *m) {
   16447     GLMessage glmsg;
   16448     GLTraceContext *glContext = getGLTraceContext();
   16449 
   16450     glmsg.set_function(GLMessage::glMultMatrixf);
   16451 
   16452     // copy argument m
   16453     GLMessage_DataType *arg_m = glmsg.add_args();
   16454     arg_m->set_isarray(false);
   16455     arg_m->set_type(GLMessage::DataType::INT);
   16456     arg_m->add_intvalue((int)m);
   16457 
   16458     // call function
   16459     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16460     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16461     glContext->hooks->gl.glMultMatrixf(m);
   16462     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16463     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16464 
   16465     void *pointerArgs[] = {
   16466         (void *) m,
   16467     };
   16468 
   16469     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16470                               threadStartTime, threadEndTime,
   16471                               &glmsg, pointerArgs);
   16472     glContext->traceGLMessage(&glmsg);
   16473 }
   16474 
   16475 void GLTrace_glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
   16476     GLMessage glmsg;
   16477     GLTraceContext *glContext = getGLTraceContext();
   16478 
   16479     glmsg.set_function(GLMessage::glMultiTexCoord4f);
   16480 
   16481     // copy argument target
   16482     GLMessage_DataType *arg_target = glmsg.add_args();
   16483     arg_target->set_isarray(false);
   16484     arg_target->set_type(GLMessage::DataType::ENUM);
   16485     arg_target->add_intvalue((int)target);
   16486 
   16487     // copy argument s
   16488     GLMessage_DataType *arg_s = glmsg.add_args();
   16489     arg_s->set_isarray(false);
   16490     arg_s->set_type(GLMessage::DataType::FLOAT);
   16491     arg_s->add_floatvalue(s);
   16492 
   16493     // copy argument t
   16494     GLMessage_DataType *arg_t = glmsg.add_args();
   16495     arg_t->set_isarray(false);
   16496     arg_t->set_type(GLMessage::DataType::FLOAT);
   16497     arg_t->add_floatvalue(t);
   16498 
   16499     // copy argument r
   16500     GLMessage_DataType *arg_r = glmsg.add_args();
   16501     arg_r->set_isarray(false);
   16502     arg_r->set_type(GLMessage::DataType::FLOAT);
   16503     arg_r->add_floatvalue(r);
   16504 
   16505     // copy argument q
   16506     GLMessage_DataType *arg_q = glmsg.add_args();
   16507     arg_q->set_isarray(false);
   16508     arg_q->set_type(GLMessage::DataType::FLOAT);
   16509     arg_q->add_floatvalue(q);
   16510 
   16511     // call function
   16512     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16513     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16514     glContext->hooks->gl.glMultiTexCoord4f(target, s, t, r, q);
   16515     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16516     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16517 
   16518     void *pointerArgs[] = {
   16519     };
   16520 
   16521     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16522                               threadStartTime, threadEndTime,
   16523                               &glmsg, pointerArgs);
   16524     glContext->traceGLMessage(&glmsg);
   16525 }
   16526 
   16527 void GLTrace_glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) {
   16528     GLMessage glmsg;
   16529     GLTraceContext *glContext = getGLTraceContext();
   16530 
   16531     glmsg.set_function(GLMessage::glNormal3f);
   16532 
   16533     // copy argument nx
   16534     GLMessage_DataType *arg_nx = glmsg.add_args();
   16535     arg_nx->set_isarray(false);
   16536     arg_nx->set_type(GLMessage::DataType::FLOAT);
   16537     arg_nx->add_floatvalue(nx);
   16538 
   16539     // copy argument ny
   16540     GLMessage_DataType *arg_ny = glmsg.add_args();
   16541     arg_ny->set_isarray(false);
   16542     arg_ny->set_type(GLMessage::DataType::FLOAT);
   16543     arg_ny->add_floatvalue(ny);
   16544 
   16545     // copy argument nz
   16546     GLMessage_DataType *arg_nz = glmsg.add_args();
   16547     arg_nz->set_isarray(false);
   16548     arg_nz->set_type(GLMessage::DataType::FLOAT);
   16549     arg_nz->add_floatvalue(nz);
   16550 
   16551     // call function
   16552     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16553     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16554     glContext->hooks->gl.glNormal3f(nx, ny, nz);
   16555     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16556     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16557 
   16558     void *pointerArgs[] = {
   16559     };
   16560 
   16561     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16562                               threadStartTime, threadEndTime,
   16563                               &glmsg, pointerArgs);
   16564     glContext->traceGLMessage(&glmsg);
   16565 }
   16566 
   16567 void GLTrace_glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   16568     GLMessage glmsg;
   16569     GLTraceContext *glContext = getGLTraceContext();
   16570 
   16571     glmsg.set_function(GLMessage::glOrthof);
   16572 
   16573     // copy argument left
   16574     GLMessage_DataType *arg_left = glmsg.add_args();
   16575     arg_left->set_isarray(false);
   16576     arg_left->set_type(GLMessage::DataType::FLOAT);
   16577     arg_left->add_floatvalue(left);
   16578 
   16579     // copy argument right
   16580     GLMessage_DataType *arg_right = glmsg.add_args();
   16581     arg_right->set_isarray(false);
   16582     arg_right->set_type(GLMessage::DataType::FLOAT);
   16583     arg_right->add_floatvalue(right);
   16584 
   16585     // copy argument bottom
   16586     GLMessage_DataType *arg_bottom = glmsg.add_args();
   16587     arg_bottom->set_isarray(false);
   16588     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   16589     arg_bottom->add_floatvalue(bottom);
   16590 
   16591     // copy argument top
   16592     GLMessage_DataType *arg_top = glmsg.add_args();
   16593     arg_top->set_isarray(false);
   16594     arg_top->set_type(GLMessage::DataType::FLOAT);
   16595     arg_top->add_floatvalue(top);
   16596 
   16597     // copy argument zNear
   16598     GLMessage_DataType *arg_zNear = glmsg.add_args();
   16599     arg_zNear->set_isarray(false);
   16600     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   16601     arg_zNear->add_floatvalue(zNear);
   16602 
   16603     // copy argument zFar
   16604     GLMessage_DataType *arg_zFar = glmsg.add_args();
   16605     arg_zFar->set_isarray(false);
   16606     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   16607     arg_zFar->add_floatvalue(zFar);
   16608 
   16609     // call function
   16610     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16611     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16612     glContext->hooks->gl.glOrthof(left, right, bottom, top, zNear, zFar);
   16613     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16614     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16615 
   16616     void *pointerArgs[] = {
   16617     };
   16618 
   16619     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16620                               threadStartTime, threadEndTime,
   16621                               &glmsg, pointerArgs);
   16622     glContext->traceGLMessage(&glmsg);
   16623 }
   16624 
   16625 void GLTrace_glPointParameterf(GLenum pname, GLfloat param) {
   16626     GLMessage glmsg;
   16627     GLTraceContext *glContext = getGLTraceContext();
   16628 
   16629     glmsg.set_function(GLMessage::glPointParameterf);
   16630 
   16631     // copy argument pname
   16632     GLMessage_DataType *arg_pname = glmsg.add_args();
   16633     arg_pname->set_isarray(false);
   16634     arg_pname->set_type(GLMessage::DataType::ENUM);
   16635     arg_pname->add_intvalue((int)pname);
   16636 
   16637     // copy argument param
   16638     GLMessage_DataType *arg_param = glmsg.add_args();
   16639     arg_param->set_isarray(false);
   16640     arg_param->set_type(GLMessage::DataType::FLOAT);
   16641     arg_param->add_floatvalue(param);
   16642 
   16643     // call function
   16644     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16645     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16646     glContext->hooks->gl.glPointParameterf(pname, param);
   16647     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16648     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16649 
   16650     void *pointerArgs[] = {
   16651     };
   16652 
   16653     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16654                               threadStartTime, threadEndTime,
   16655                               &glmsg, pointerArgs);
   16656     glContext->traceGLMessage(&glmsg);
   16657 }
   16658 
   16659 void GLTrace_glPointParameterfv(GLenum pname, const GLfloat *params) {
   16660     GLMessage glmsg;
   16661     GLTraceContext *glContext = getGLTraceContext();
   16662 
   16663     glmsg.set_function(GLMessage::glPointParameterfv);
   16664 
   16665     // copy argument pname
   16666     GLMessage_DataType *arg_pname = glmsg.add_args();
   16667     arg_pname->set_isarray(false);
   16668     arg_pname->set_type(GLMessage::DataType::ENUM);
   16669     arg_pname->add_intvalue((int)pname);
   16670 
   16671     // copy argument params
   16672     GLMessage_DataType *arg_params = glmsg.add_args();
   16673     arg_params->set_isarray(false);
   16674     arg_params->set_type(GLMessage::DataType::INT);
   16675     arg_params->add_intvalue((int)params);
   16676 
   16677     // call function
   16678     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16679     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16680     glContext->hooks->gl.glPointParameterfv(pname, params);
   16681     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16682     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16683 
   16684     void *pointerArgs[] = {
   16685         (void *) params,
   16686     };
   16687 
   16688     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16689                               threadStartTime, threadEndTime,
   16690                               &glmsg, pointerArgs);
   16691     glContext->traceGLMessage(&glmsg);
   16692 }
   16693 
   16694 void GLTrace_glPointSize(GLfloat size) {
   16695     GLMessage glmsg;
   16696     GLTraceContext *glContext = getGLTraceContext();
   16697 
   16698     glmsg.set_function(GLMessage::glPointSize);
   16699 
   16700     // copy argument size
   16701     GLMessage_DataType *arg_size = glmsg.add_args();
   16702     arg_size->set_isarray(false);
   16703     arg_size->set_type(GLMessage::DataType::FLOAT);
   16704     arg_size->add_floatvalue(size);
   16705 
   16706     // call function
   16707     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16708     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16709     glContext->hooks->gl.glPointSize(size);
   16710     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16711     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16712 
   16713     void *pointerArgs[] = {
   16714     };
   16715 
   16716     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16717                               threadStartTime, threadEndTime,
   16718                               &glmsg, pointerArgs);
   16719     glContext->traceGLMessage(&glmsg);
   16720 }
   16721 
   16722 void GLTrace_glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
   16723     GLMessage glmsg;
   16724     GLTraceContext *glContext = getGLTraceContext();
   16725 
   16726     glmsg.set_function(GLMessage::glRotatef);
   16727 
   16728     // copy argument angle
   16729     GLMessage_DataType *arg_angle = glmsg.add_args();
   16730     arg_angle->set_isarray(false);
   16731     arg_angle->set_type(GLMessage::DataType::FLOAT);
   16732     arg_angle->add_floatvalue(angle);
   16733 
   16734     // copy argument x
   16735     GLMessage_DataType *arg_x = glmsg.add_args();
   16736     arg_x->set_isarray(false);
   16737     arg_x->set_type(GLMessage::DataType::FLOAT);
   16738     arg_x->add_floatvalue(x);
   16739 
   16740     // copy argument y
   16741     GLMessage_DataType *arg_y = glmsg.add_args();
   16742     arg_y->set_isarray(false);
   16743     arg_y->set_type(GLMessage::DataType::FLOAT);
   16744     arg_y->add_floatvalue(y);
   16745 
   16746     // copy argument z
   16747     GLMessage_DataType *arg_z = glmsg.add_args();
   16748     arg_z->set_isarray(false);
   16749     arg_z->set_type(GLMessage::DataType::FLOAT);
   16750     arg_z->add_floatvalue(z);
   16751 
   16752     // call function
   16753     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16754     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16755     glContext->hooks->gl.glRotatef(angle, x, y, z);
   16756     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16757     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16758 
   16759     void *pointerArgs[] = {
   16760     };
   16761 
   16762     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16763                               threadStartTime, threadEndTime,
   16764                               &glmsg, pointerArgs);
   16765     glContext->traceGLMessage(&glmsg);
   16766 }
   16767 
   16768 void GLTrace_glScalef(GLfloat x, GLfloat y, GLfloat z) {
   16769     GLMessage glmsg;
   16770     GLTraceContext *glContext = getGLTraceContext();
   16771 
   16772     glmsg.set_function(GLMessage::glScalef);
   16773 
   16774     // copy argument x
   16775     GLMessage_DataType *arg_x = glmsg.add_args();
   16776     arg_x->set_isarray(false);
   16777     arg_x->set_type(GLMessage::DataType::FLOAT);
   16778     arg_x->add_floatvalue(x);
   16779 
   16780     // copy argument y
   16781     GLMessage_DataType *arg_y = glmsg.add_args();
   16782     arg_y->set_isarray(false);
   16783     arg_y->set_type(GLMessage::DataType::FLOAT);
   16784     arg_y->add_floatvalue(y);
   16785 
   16786     // copy argument z
   16787     GLMessage_DataType *arg_z = glmsg.add_args();
   16788     arg_z->set_isarray(false);
   16789     arg_z->set_type(GLMessage::DataType::FLOAT);
   16790     arg_z->add_floatvalue(z);
   16791 
   16792     // call function
   16793     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16794     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16795     glContext->hooks->gl.glScalef(x, y, z);
   16796     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16797     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16798 
   16799     void *pointerArgs[] = {
   16800     };
   16801 
   16802     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16803                               threadStartTime, threadEndTime,
   16804                               &glmsg, pointerArgs);
   16805     glContext->traceGLMessage(&glmsg);
   16806 }
   16807 
   16808 void GLTrace_glTexEnvf(GLenum target, GLenum pname, GLfloat param) {
   16809     GLMessage glmsg;
   16810     GLTraceContext *glContext = getGLTraceContext();
   16811 
   16812     glmsg.set_function(GLMessage::glTexEnvf);
   16813 
   16814     // copy argument target
   16815     GLMessage_DataType *arg_target = glmsg.add_args();
   16816     arg_target->set_isarray(false);
   16817     arg_target->set_type(GLMessage::DataType::ENUM);
   16818     arg_target->add_intvalue((int)target);
   16819 
   16820     // copy argument pname
   16821     GLMessage_DataType *arg_pname = glmsg.add_args();
   16822     arg_pname->set_isarray(false);
   16823     arg_pname->set_type(GLMessage::DataType::ENUM);
   16824     arg_pname->add_intvalue((int)pname);
   16825 
   16826     // copy argument param
   16827     GLMessage_DataType *arg_param = glmsg.add_args();
   16828     arg_param->set_isarray(false);
   16829     arg_param->set_type(GLMessage::DataType::FLOAT);
   16830     arg_param->add_floatvalue(param);
   16831 
   16832     // call function
   16833     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16834     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16835     glContext->hooks->gl.glTexEnvf(target, pname, param);
   16836     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16837     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16838 
   16839     void *pointerArgs[] = {
   16840     };
   16841 
   16842     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16843                               threadStartTime, threadEndTime,
   16844                               &glmsg, pointerArgs);
   16845     glContext->traceGLMessage(&glmsg);
   16846 }
   16847 
   16848 void GLTrace_glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) {
   16849     GLMessage glmsg;
   16850     GLTraceContext *glContext = getGLTraceContext();
   16851 
   16852     glmsg.set_function(GLMessage::glTexEnvfv);
   16853 
   16854     // copy argument target
   16855     GLMessage_DataType *arg_target = glmsg.add_args();
   16856     arg_target->set_isarray(false);
   16857     arg_target->set_type(GLMessage::DataType::ENUM);
   16858     arg_target->add_intvalue((int)target);
   16859 
   16860     // copy argument pname
   16861     GLMessage_DataType *arg_pname = glmsg.add_args();
   16862     arg_pname->set_isarray(false);
   16863     arg_pname->set_type(GLMessage::DataType::ENUM);
   16864     arg_pname->add_intvalue((int)pname);
   16865 
   16866     // copy argument params
   16867     GLMessage_DataType *arg_params = glmsg.add_args();
   16868     arg_params->set_isarray(false);
   16869     arg_params->set_type(GLMessage::DataType::INT);
   16870     arg_params->add_intvalue((int)params);
   16871 
   16872     // call function
   16873     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16874     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16875     glContext->hooks->gl.glTexEnvfv(target, pname, params);
   16876     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16877     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16878 
   16879     void *pointerArgs[] = {
   16880         (void *) params,
   16881     };
   16882 
   16883     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16884                               threadStartTime, threadEndTime,
   16885                               &glmsg, pointerArgs);
   16886     glContext->traceGLMessage(&glmsg);
   16887 }
   16888 
   16889 void GLTrace_glTranslatef(GLfloat x, GLfloat y, GLfloat z) {
   16890     GLMessage glmsg;
   16891     GLTraceContext *glContext = getGLTraceContext();
   16892 
   16893     glmsg.set_function(GLMessage::glTranslatef);
   16894 
   16895     // copy argument x
   16896     GLMessage_DataType *arg_x = glmsg.add_args();
   16897     arg_x->set_isarray(false);
   16898     arg_x->set_type(GLMessage::DataType::FLOAT);
   16899     arg_x->add_floatvalue(x);
   16900 
   16901     // copy argument y
   16902     GLMessage_DataType *arg_y = glmsg.add_args();
   16903     arg_y->set_isarray(false);
   16904     arg_y->set_type(GLMessage::DataType::FLOAT);
   16905     arg_y->add_floatvalue(y);
   16906 
   16907     // copy argument z
   16908     GLMessage_DataType *arg_z = glmsg.add_args();
   16909     arg_z->set_isarray(false);
   16910     arg_z->set_type(GLMessage::DataType::FLOAT);
   16911     arg_z->add_floatvalue(z);
   16912 
   16913     // call function
   16914     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16915     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16916     glContext->hooks->gl.glTranslatef(x, y, z);
   16917     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16918     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16919 
   16920     void *pointerArgs[] = {
   16921     };
   16922 
   16923     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16924                               threadStartTime, threadEndTime,
   16925                               &glmsg, pointerArgs);
   16926     glContext->traceGLMessage(&glmsg);
   16927 }
   16928 
   16929 void GLTrace_glAlphaFuncx(GLenum func, GLclampx ref) {
   16930     GLMessage glmsg;
   16931     GLTraceContext *glContext = getGLTraceContext();
   16932 
   16933     glmsg.set_function(GLMessage::glAlphaFuncx);
   16934 
   16935     // copy argument func
   16936     GLMessage_DataType *arg_func = glmsg.add_args();
   16937     arg_func->set_isarray(false);
   16938     arg_func->set_type(GLMessage::DataType::ENUM);
   16939     arg_func->add_intvalue((int)func);
   16940 
   16941     // copy argument ref
   16942     GLMessage_DataType *arg_ref = glmsg.add_args();
   16943     arg_ref->set_isarray(false);
   16944     arg_ref->set_type(GLMessage::DataType::INT);
   16945     arg_ref->add_intvalue(ref);
   16946 
   16947     // call function
   16948     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16949     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16950     glContext->hooks->gl.glAlphaFuncx(func, ref);
   16951     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16952     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16953 
   16954     void *pointerArgs[] = {
   16955     };
   16956 
   16957     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   16958                               threadStartTime, threadEndTime,
   16959                               &glmsg, pointerArgs);
   16960     glContext->traceGLMessage(&glmsg);
   16961 }
   16962 
   16963 void GLTrace_glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
   16964     GLMessage glmsg;
   16965     GLTraceContext *glContext = getGLTraceContext();
   16966 
   16967     glmsg.set_function(GLMessage::glClearColorx);
   16968 
   16969     // copy argument red
   16970     GLMessage_DataType *arg_red = glmsg.add_args();
   16971     arg_red->set_isarray(false);
   16972     arg_red->set_type(GLMessage::DataType::INT);
   16973     arg_red->add_intvalue(red);
   16974 
   16975     // copy argument green
   16976     GLMessage_DataType *arg_green = glmsg.add_args();
   16977     arg_green->set_isarray(false);
   16978     arg_green->set_type(GLMessage::DataType::INT);
   16979     arg_green->add_intvalue(green);
   16980 
   16981     // copy argument blue
   16982     GLMessage_DataType *arg_blue = glmsg.add_args();
   16983     arg_blue->set_isarray(false);
   16984     arg_blue->set_type(GLMessage::DataType::INT);
   16985     arg_blue->add_intvalue(blue);
   16986 
   16987     // copy argument alpha
   16988     GLMessage_DataType *arg_alpha = glmsg.add_args();
   16989     arg_alpha->set_isarray(false);
   16990     arg_alpha->set_type(GLMessage::DataType::INT);
   16991     arg_alpha->add_intvalue(alpha);
   16992 
   16993     // call function
   16994     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16995     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   16996     glContext->hooks->gl.glClearColorx(red, green, blue, alpha);
   16997     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   16998     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   16999 
   17000     void *pointerArgs[] = {
   17001     };
   17002 
   17003     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17004                               threadStartTime, threadEndTime,
   17005                               &glmsg, pointerArgs);
   17006     glContext->traceGLMessage(&glmsg);
   17007 }
   17008 
   17009 void GLTrace_glClearDepthx(GLclampx depth) {
   17010     GLMessage glmsg;
   17011     GLTraceContext *glContext = getGLTraceContext();
   17012 
   17013     glmsg.set_function(GLMessage::glClearDepthx);
   17014 
   17015     // copy argument depth
   17016     GLMessage_DataType *arg_depth = glmsg.add_args();
   17017     arg_depth->set_isarray(false);
   17018     arg_depth->set_type(GLMessage::DataType::INT);
   17019     arg_depth->add_intvalue(depth);
   17020 
   17021     // call function
   17022     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17023     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17024     glContext->hooks->gl.glClearDepthx(depth);
   17025     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17026     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17027 
   17028     void *pointerArgs[] = {
   17029     };
   17030 
   17031     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17032                               threadStartTime, threadEndTime,
   17033                               &glmsg, pointerArgs);
   17034     glContext->traceGLMessage(&glmsg);
   17035 }
   17036 
   17037 void GLTrace_glClientActiveTexture(GLenum texture) {
   17038     GLMessage glmsg;
   17039     GLTraceContext *glContext = getGLTraceContext();
   17040 
   17041     glmsg.set_function(GLMessage::glClientActiveTexture);
   17042 
   17043     // copy argument texture
   17044     GLMessage_DataType *arg_texture = glmsg.add_args();
   17045     arg_texture->set_isarray(false);
   17046     arg_texture->set_type(GLMessage::DataType::ENUM);
   17047     arg_texture->add_intvalue((int)texture);
   17048 
   17049     // call function
   17050     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17051     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17052     glContext->hooks->gl.glClientActiveTexture(texture);
   17053     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17054     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17055 
   17056     void *pointerArgs[] = {
   17057     };
   17058 
   17059     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17060                               threadStartTime, threadEndTime,
   17061                               &glmsg, pointerArgs);
   17062     glContext->traceGLMessage(&glmsg);
   17063 }
   17064 
   17065 void GLTrace_glClipPlanex(GLenum plane, const GLfixed *equation) {
   17066     GLMessage glmsg;
   17067     GLTraceContext *glContext = getGLTraceContext();
   17068 
   17069     glmsg.set_function(GLMessage::glClipPlanex);
   17070 
   17071     // copy argument plane
   17072     GLMessage_DataType *arg_plane = glmsg.add_args();
   17073     arg_plane->set_isarray(false);
   17074     arg_plane->set_type(GLMessage::DataType::ENUM);
   17075     arg_plane->add_intvalue((int)plane);
   17076 
   17077     // copy argument equation
   17078     GLMessage_DataType *arg_equation = glmsg.add_args();
   17079     arg_equation->set_isarray(false);
   17080     arg_equation->set_type(GLMessage::DataType::INT);
   17081     arg_equation->add_intvalue((int)equation);
   17082 
   17083     // call function
   17084     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17085     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17086     glContext->hooks->gl.glClipPlanex(plane, equation);
   17087     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17088     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17089 
   17090     void *pointerArgs[] = {
   17091         (void *) equation,
   17092     };
   17093 
   17094     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17095                               threadStartTime, threadEndTime,
   17096                               &glmsg, pointerArgs);
   17097     glContext->traceGLMessage(&glmsg);
   17098 }
   17099 
   17100 void GLTrace_glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) {
   17101     GLMessage glmsg;
   17102     GLTraceContext *glContext = getGLTraceContext();
   17103 
   17104     glmsg.set_function(GLMessage::glColor4ub);
   17105 
   17106     // copy argument red
   17107     GLMessage_DataType *arg_red = glmsg.add_args();
   17108     arg_red->set_isarray(false);
   17109     arg_red->set_type(GLMessage::DataType::BYTE);
   17110     arg_red->add_intvalue((int)red);
   17111 
   17112     // copy argument green
   17113     GLMessage_DataType *arg_green = glmsg.add_args();
   17114     arg_green->set_isarray(false);
   17115     arg_green->set_type(GLMessage::DataType::BYTE);
   17116     arg_green->add_intvalue((int)green);
   17117 
   17118     // copy argument blue
   17119     GLMessage_DataType *arg_blue = glmsg.add_args();
   17120     arg_blue->set_isarray(false);
   17121     arg_blue->set_type(GLMessage::DataType::BYTE);
   17122     arg_blue->add_intvalue((int)blue);
   17123 
   17124     // copy argument alpha
   17125     GLMessage_DataType *arg_alpha = glmsg.add_args();
   17126     arg_alpha->set_isarray(false);
   17127     arg_alpha->set_type(GLMessage::DataType::BYTE);
   17128     arg_alpha->add_intvalue((int)alpha);
   17129 
   17130     // call function
   17131     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17132     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17133     glContext->hooks->gl.glColor4ub(red, green, blue, alpha);
   17134     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17135     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17136 
   17137     void *pointerArgs[] = {
   17138     };
   17139 
   17140     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17141                               threadStartTime, threadEndTime,
   17142                               &glmsg, pointerArgs);
   17143     glContext->traceGLMessage(&glmsg);
   17144 }
   17145 
   17146 void GLTrace_glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
   17147     GLMessage glmsg;
   17148     GLTraceContext *glContext = getGLTraceContext();
   17149 
   17150     glmsg.set_function(GLMessage::glColor4x);
   17151 
   17152     // copy argument red
   17153     GLMessage_DataType *arg_red = glmsg.add_args();
   17154     arg_red->set_isarray(false);
   17155     arg_red->set_type(GLMessage::DataType::INT);
   17156     arg_red->add_intvalue(red);
   17157 
   17158     // copy argument green
   17159     GLMessage_DataType *arg_green = glmsg.add_args();
   17160     arg_green->set_isarray(false);
   17161     arg_green->set_type(GLMessage::DataType::INT);
   17162     arg_green->add_intvalue(green);
   17163 
   17164     // copy argument blue
   17165     GLMessage_DataType *arg_blue = glmsg.add_args();
   17166     arg_blue->set_isarray(false);
   17167     arg_blue->set_type(GLMessage::DataType::INT);
   17168     arg_blue->add_intvalue(blue);
   17169 
   17170     // copy argument alpha
   17171     GLMessage_DataType *arg_alpha = glmsg.add_args();
   17172     arg_alpha->set_isarray(false);
   17173     arg_alpha->set_type(GLMessage::DataType::INT);
   17174     arg_alpha->add_intvalue(alpha);
   17175 
   17176     // call function
   17177     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17178     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17179     glContext->hooks->gl.glColor4x(red, green, blue, alpha);
   17180     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17181     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17182 
   17183     void *pointerArgs[] = {
   17184     };
   17185 
   17186     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17187                               threadStartTime, threadEndTime,
   17188                               &glmsg, pointerArgs);
   17189     glContext->traceGLMessage(&glmsg);
   17190 }
   17191 
   17192 void GLTrace_glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   17193     GLMessage glmsg;
   17194     GLTraceContext *glContext = getGLTraceContext();
   17195 
   17196     glmsg.set_function(GLMessage::glColorPointer);
   17197 
   17198     // copy argument size
   17199     GLMessage_DataType *arg_size = glmsg.add_args();
   17200     arg_size->set_isarray(false);
   17201     arg_size->set_type(GLMessage::DataType::INT);
   17202     arg_size->add_intvalue(size);
   17203 
   17204     // copy argument type
   17205     GLMessage_DataType *arg_type = glmsg.add_args();
   17206     arg_type->set_isarray(false);
   17207     arg_type->set_type(GLMessage::DataType::ENUM);
   17208     arg_type->add_intvalue((int)type);
   17209 
   17210     // copy argument stride
   17211     GLMessage_DataType *arg_stride = glmsg.add_args();
   17212     arg_stride->set_isarray(false);
   17213     arg_stride->set_type(GLMessage::DataType::INT);
   17214     arg_stride->add_intvalue(stride);
   17215 
   17216     // copy argument pointer
   17217     GLMessage_DataType *arg_pointer = glmsg.add_args();
   17218     arg_pointer->set_isarray(false);
   17219     arg_pointer->set_type(GLMessage::DataType::INT);
   17220     arg_pointer->add_intvalue((int)pointer);
   17221 
   17222     // call function
   17223     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17224     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17225     glContext->hooks->gl.glColorPointer(size, type, stride, pointer);
   17226     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17227     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17228 
   17229     void *pointerArgs[] = {
   17230         (void *) pointer,
   17231     };
   17232 
   17233     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17234                               threadStartTime, threadEndTime,
   17235                               &glmsg, pointerArgs);
   17236     glContext->traceGLMessage(&glmsg);
   17237 }
   17238 
   17239 void GLTrace_glDepthRangex(GLclampx zNear, GLclampx zFar) {
   17240     GLMessage glmsg;
   17241     GLTraceContext *glContext = getGLTraceContext();
   17242 
   17243     glmsg.set_function(GLMessage::glDepthRangex);
   17244 
   17245     // copy argument zNear
   17246     GLMessage_DataType *arg_zNear = glmsg.add_args();
   17247     arg_zNear->set_isarray(false);
   17248     arg_zNear->set_type(GLMessage::DataType::INT);
   17249     arg_zNear->add_intvalue(zNear);
   17250 
   17251     // copy argument zFar
   17252     GLMessage_DataType *arg_zFar = glmsg.add_args();
   17253     arg_zFar->set_isarray(false);
   17254     arg_zFar->set_type(GLMessage::DataType::INT);
   17255     arg_zFar->add_intvalue(zFar);
   17256 
   17257     // call function
   17258     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17259     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17260     glContext->hooks->gl.glDepthRangex(zNear, zFar);
   17261     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17262     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17263 
   17264     void *pointerArgs[] = {
   17265     };
   17266 
   17267     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17268                               threadStartTime, threadEndTime,
   17269                               &glmsg, pointerArgs);
   17270     glContext->traceGLMessage(&glmsg);
   17271 }
   17272 
   17273 void GLTrace_glDisableClientState(GLenum array) {
   17274     GLMessage glmsg;
   17275     GLTraceContext *glContext = getGLTraceContext();
   17276 
   17277     glmsg.set_function(GLMessage::glDisableClientState);
   17278 
   17279     // copy argument array
   17280     GLMessage_DataType *arg_array = glmsg.add_args();
   17281     arg_array->set_isarray(false);
   17282     arg_array->set_type(GLMessage::DataType::ENUM);
   17283     arg_array->add_intvalue((int)array);
   17284 
   17285     // call function
   17286     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17287     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17288     glContext->hooks->gl.glDisableClientState(array);
   17289     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17290     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17291 
   17292     void *pointerArgs[] = {
   17293     };
   17294 
   17295     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17296                               threadStartTime, threadEndTime,
   17297                               &glmsg, pointerArgs);
   17298     glContext->traceGLMessage(&glmsg);
   17299 }
   17300 
   17301 void GLTrace_glEnableClientState(GLenum array) {
   17302     GLMessage glmsg;
   17303     GLTraceContext *glContext = getGLTraceContext();
   17304 
   17305     glmsg.set_function(GLMessage::glEnableClientState);
   17306 
   17307     // copy argument array
   17308     GLMessage_DataType *arg_array = glmsg.add_args();
   17309     arg_array->set_isarray(false);
   17310     arg_array->set_type(GLMessage::DataType::ENUM);
   17311     arg_array->add_intvalue((int)array);
   17312 
   17313     // call function
   17314     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17315     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17316     glContext->hooks->gl.glEnableClientState(array);
   17317     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17318     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17319 
   17320     void *pointerArgs[] = {
   17321     };
   17322 
   17323     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17324                               threadStartTime, threadEndTime,
   17325                               &glmsg, pointerArgs);
   17326     glContext->traceGLMessage(&glmsg);
   17327 }
   17328 
   17329 void GLTrace_glFogx(GLenum pname, GLfixed param) {
   17330     GLMessage glmsg;
   17331     GLTraceContext *glContext = getGLTraceContext();
   17332 
   17333     glmsg.set_function(GLMessage::glFogx);
   17334 
   17335     // copy argument pname
   17336     GLMessage_DataType *arg_pname = glmsg.add_args();
   17337     arg_pname->set_isarray(false);
   17338     arg_pname->set_type(GLMessage::DataType::ENUM);
   17339     arg_pname->add_intvalue((int)pname);
   17340 
   17341     // copy argument param
   17342     GLMessage_DataType *arg_param = glmsg.add_args();
   17343     arg_param->set_isarray(false);
   17344     arg_param->set_type(GLMessage::DataType::INT);
   17345     arg_param->add_intvalue(param);
   17346 
   17347     // call function
   17348     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17349     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17350     glContext->hooks->gl.glFogx(pname, param);
   17351     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17352     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17353 
   17354     void *pointerArgs[] = {
   17355     };
   17356 
   17357     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17358                               threadStartTime, threadEndTime,
   17359                               &glmsg, pointerArgs);
   17360     glContext->traceGLMessage(&glmsg);
   17361 }
   17362 
   17363 void GLTrace_glFogxv(GLenum pname, const GLfixed *params) {
   17364     GLMessage glmsg;
   17365     GLTraceContext *glContext = getGLTraceContext();
   17366 
   17367     glmsg.set_function(GLMessage::glFogxv);
   17368 
   17369     // copy argument pname
   17370     GLMessage_DataType *arg_pname = glmsg.add_args();
   17371     arg_pname->set_isarray(false);
   17372     arg_pname->set_type(GLMessage::DataType::ENUM);
   17373     arg_pname->add_intvalue((int)pname);
   17374 
   17375     // copy argument params
   17376     GLMessage_DataType *arg_params = glmsg.add_args();
   17377     arg_params->set_isarray(false);
   17378     arg_params->set_type(GLMessage::DataType::INT);
   17379     arg_params->add_intvalue((int)params);
   17380 
   17381     // call function
   17382     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17383     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17384     glContext->hooks->gl.glFogxv(pname, params);
   17385     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17386     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17387 
   17388     void *pointerArgs[] = {
   17389         (void *) params,
   17390     };
   17391 
   17392     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17393                               threadStartTime, threadEndTime,
   17394                               &glmsg, pointerArgs);
   17395     glContext->traceGLMessage(&glmsg);
   17396 }
   17397 
   17398 void GLTrace_glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   17399     GLMessage glmsg;
   17400     GLTraceContext *glContext = getGLTraceContext();
   17401 
   17402     glmsg.set_function(GLMessage::glFrustumx);
   17403 
   17404     // copy argument left
   17405     GLMessage_DataType *arg_left = glmsg.add_args();
   17406     arg_left->set_isarray(false);
   17407     arg_left->set_type(GLMessage::DataType::INT);
   17408     arg_left->add_intvalue(left);
   17409 
   17410     // copy argument right
   17411     GLMessage_DataType *arg_right = glmsg.add_args();
   17412     arg_right->set_isarray(false);
   17413     arg_right->set_type(GLMessage::DataType::INT);
   17414     arg_right->add_intvalue(right);
   17415 
   17416     // copy argument bottom
   17417     GLMessage_DataType *arg_bottom = glmsg.add_args();
   17418     arg_bottom->set_isarray(false);
   17419     arg_bottom->set_type(GLMessage::DataType::INT);
   17420     arg_bottom->add_intvalue(bottom);
   17421 
   17422     // copy argument top
   17423     GLMessage_DataType *arg_top = glmsg.add_args();
   17424     arg_top->set_isarray(false);
   17425     arg_top->set_type(GLMessage::DataType::INT);
   17426     arg_top->add_intvalue(top);
   17427 
   17428     // copy argument zNear
   17429     GLMessage_DataType *arg_zNear = glmsg.add_args();
   17430     arg_zNear->set_isarray(false);
   17431     arg_zNear->set_type(GLMessage::DataType::INT);
   17432     arg_zNear->add_intvalue(zNear);
   17433 
   17434     // copy argument zFar
   17435     GLMessage_DataType *arg_zFar = glmsg.add_args();
   17436     arg_zFar->set_isarray(false);
   17437     arg_zFar->set_type(GLMessage::DataType::INT);
   17438     arg_zFar->add_intvalue(zFar);
   17439 
   17440     // call function
   17441     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17442     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17443     glContext->hooks->gl.glFrustumx(left, right, bottom, top, zNear, zFar);
   17444     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17445     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17446 
   17447     void *pointerArgs[] = {
   17448     };
   17449 
   17450     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17451                               threadStartTime, threadEndTime,
   17452                               &glmsg, pointerArgs);
   17453     glContext->traceGLMessage(&glmsg);
   17454 }
   17455 
   17456 void GLTrace_glGetClipPlanex(GLenum pname, GLfixed eqn[4]) {
   17457     GLMessage glmsg;
   17458     GLTraceContext *glContext = getGLTraceContext();
   17459 
   17460     glmsg.set_function(GLMessage::glGetClipPlanex);
   17461 
   17462     // copy argument pname
   17463     GLMessage_DataType *arg_pname = glmsg.add_args();
   17464     arg_pname->set_isarray(false);
   17465     arg_pname->set_type(GLMessage::DataType::ENUM);
   17466     arg_pname->add_intvalue((int)pname);
   17467 
   17468     // copy argument eqn
   17469     GLMessage_DataType *arg_eqn = glmsg.add_args();
   17470     arg_eqn->set_isarray(false);
   17471     arg_eqn->set_type(GLMessage::DataType::INT);
   17472     arg_eqn->add_intvalue((int)eqn);
   17473 
   17474     // call function
   17475     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17476     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17477     glContext->hooks->gl.glGetClipPlanex(pname, eqn);
   17478     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17479     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17480 
   17481     void *pointerArgs[] = {
   17482         (void *) eqn,
   17483     };
   17484 
   17485     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17486                               threadStartTime, threadEndTime,
   17487                               &glmsg, pointerArgs);
   17488     glContext->traceGLMessage(&glmsg);
   17489 }
   17490 
   17491 void GLTrace_glGetFixedv(GLenum pname, GLfixed *params) {
   17492     GLMessage glmsg;
   17493     GLTraceContext *glContext = getGLTraceContext();
   17494 
   17495     glmsg.set_function(GLMessage::glGetFixedv);
   17496 
   17497     // copy argument pname
   17498     GLMessage_DataType *arg_pname = glmsg.add_args();
   17499     arg_pname->set_isarray(false);
   17500     arg_pname->set_type(GLMessage::DataType::ENUM);
   17501     arg_pname->add_intvalue((int)pname);
   17502 
   17503     // copy argument params
   17504     GLMessage_DataType *arg_params = glmsg.add_args();
   17505     arg_params->set_isarray(false);
   17506     arg_params->set_type(GLMessage::DataType::INT);
   17507     arg_params->add_intvalue((int)params);
   17508 
   17509     // call function
   17510     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17511     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17512     glContext->hooks->gl.glGetFixedv(pname, params);
   17513     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17514     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17515 
   17516     void *pointerArgs[] = {
   17517         (void *) params,
   17518     };
   17519 
   17520     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17521                               threadStartTime, threadEndTime,
   17522                               &glmsg, pointerArgs);
   17523     glContext->traceGLMessage(&glmsg);
   17524 }
   17525 
   17526 void GLTrace_glGetLightxv(GLenum light, GLenum pname, GLfixed *params) {
   17527     GLMessage glmsg;
   17528     GLTraceContext *glContext = getGLTraceContext();
   17529 
   17530     glmsg.set_function(GLMessage::glGetLightxv);
   17531 
   17532     // copy argument light
   17533     GLMessage_DataType *arg_light = glmsg.add_args();
   17534     arg_light->set_isarray(false);
   17535     arg_light->set_type(GLMessage::DataType::ENUM);
   17536     arg_light->add_intvalue((int)light);
   17537 
   17538     // copy argument pname
   17539     GLMessage_DataType *arg_pname = glmsg.add_args();
   17540     arg_pname->set_isarray(false);
   17541     arg_pname->set_type(GLMessage::DataType::ENUM);
   17542     arg_pname->add_intvalue((int)pname);
   17543 
   17544     // copy argument params
   17545     GLMessage_DataType *arg_params = glmsg.add_args();
   17546     arg_params->set_isarray(false);
   17547     arg_params->set_type(GLMessage::DataType::INT);
   17548     arg_params->add_intvalue((int)params);
   17549 
   17550     // call function
   17551     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17552     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17553     glContext->hooks->gl.glGetLightxv(light, pname, params);
   17554     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17555     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17556 
   17557     void *pointerArgs[] = {
   17558         (void *) params,
   17559     };
   17560 
   17561     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17562                               threadStartTime, threadEndTime,
   17563                               &glmsg, pointerArgs);
   17564     glContext->traceGLMessage(&glmsg);
   17565 }
   17566 
   17567 void GLTrace_glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) {
   17568     GLMessage glmsg;
   17569     GLTraceContext *glContext = getGLTraceContext();
   17570 
   17571     glmsg.set_function(GLMessage::glGetMaterialxv);
   17572 
   17573     // copy argument face
   17574     GLMessage_DataType *arg_face = glmsg.add_args();
   17575     arg_face->set_isarray(false);
   17576     arg_face->set_type(GLMessage::DataType::ENUM);
   17577     arg_face->add_intvalue((int)face);
   17578 
   17579     // copy argument pname
   17580     GLMessage_DataType *arg_pname = glmsg.add_args();
   17581     arg_pname->set_isarray(false);
   17582     arg_pname->set_type(GLMessage::DataType::ENUM);
   17583     arg_pname->add_intvalue((int)pname);
   17584 
   17585     // copy argument params
   17586     GLMessage_DataType *arg_params = glmsg.add_args();
   17587     arg_params->set_isarray(false);
   17588     arg_params->set_type(GLMessage::DataType::INT);
   17589     arg_params->add_intvalue((int)params);
   17590 
   17591     // call function
   17592     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17593     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17594     glContext->hooks->gl.glGetMaterialxv(face, pname, params);
   17595     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17596     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17597 
   17598     void *pointerArgs[] = {
   17599         (void *) params,
   17600     };
   17601 
   17602     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17603                               threadStartTime, threadEndTime,
   17604                               &glmsg, pointerArgs);
   17605     glContext->traceGLMessage(&glmsg);
   17606 }
   17607 
   17608 void GLTrace_glGetPointerv(GLenum pname, GLvoid **params) {
   17609     GLMessage glmsg;
   17610     GLTraceContext *glContext = getGLTraceContext();
   17611 
   17612     glmsg.set_function(GLMessage::glGetPointerv);
   17613 
   17614     // copy argument pname
   17615     GLMessage_DataType *arg_pname = glmsg.add_args();
   17616     arg_pname->set_isarray(false);
   17617     arg_pname->set_type(GLMessage::DataType::ENUM);
   17618     arg_pname->add_intvalue((int)pname);
   17619 
   17620     // copy argument params
   17621     GLMessage_DataType *arg_params = glmsg.add_args();
   17622     arg_params->set_isarray(false);
   17623     arg_params->set_type(GLMessage::DataType::INT);
   17624     arg_params->add_intvalue((int)params);
   17625 
   17626     // call function
   17627     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17628     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17629     glContext->hooks->gl.glGetPointerv(pname, params);
   17630     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17631     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17632 
   17633     void *pointerArgs[] = {
   17634         (void *) params,
   17635     };
   17636 
   17637     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17638                               threadStartTime, threadEndTime,
   17639                               &glmsg, pointerArgs);
   17640     glContext->traceGLMessage(&glmsg);
   17641 }
   17642 
   17643 void GLTrace_glGetTexEnviv(GLenum env, GLenum pname, GLint *params) {
   17644     GLMessage glmsg;
   17645     GLTraceContext *glContext = getGLTraceContext();
   17646 
   17647     glmsg.set_function(GLMessage::glGetTexEnviv);
   17648 
   17649     // copy argument env
   17650     GLMessage_DataType *arg_env = glmsg.add_args();
   17651     arg_env->set_isarray(false);
   17652     arg_env->set_type(GLMessage::DataType::ENUM);
   17653     arg_env->add_intvalue((int)env);
   17654 
   17655     // copy argument pname
   17656     GLMessage_DataType *arg_pname = glmsg.add_args();
   17657     arg_pname->set_isarray(false);
   17658     arg_pname->set_type(GLMessage::DataType::ENUM);
   17659     arg_pname->add_intvalue((int)pname);
   17660 
   17661     // copy argument params
   17662     GLMessage_DataType *arg_params = glmsg.add_args();
   17663     arg_params->set_isarray(false);
   17664     arg_params->set_type(GLMessage::DataType::INT);
   17665     arg_params->add_intvalue((int)params);
   17666 
   17667     // call function
   17668     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17669     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17670     glContext->hooks->gl.glGetTexEnviv(env, pname, params);
   17671     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17672     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17673 
   17674     void *pointerArgs[] = {
   17675         (void *) params,
   17676     };
   17677 
   17678     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17679                               threadStartTime, threadEndTime,
   17680                               &glmsg, pointerArgs);
   17681     glContext->traceGLMessage(&glmsg);
   17682 }
   17683 
   17684 void GLTrace_glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) {
   17685     GLMessage glmsg;
   17686     GLTraceContext *glContext = getGLTraceContext();
   17687 
   17688     glmsg.set_function(GLMessage::glGetTexEnvxv);
   17689 
   17690     // copy argument env
   17691     GLMessage_DataType *arg_env = glmsg.add_args();
   17692     arg_env->set_isarray(false);
   17693     arg_env->set_type(GLMessage::DataType::ENUM);
   17694     arg_env->add_intvalue((int)env);
   17695 
   17696     // copy argument pname
   17697     GLMessage_DataType *arg_pname = glmsg.add_args();
   17698     arg_pname->set_isarray(false);
   17699     arg_pname->set_type(GLMessage::DataType::ENUM);
   17700     arg_pname->add_intvalue((int)pname);
   17701 
   17702     // copy argument params
   17703     GLMessage_DataType *arg_params = glmsg.add_args();
   17704     arg_params->set_isarray(false);
   17705     arg_params->set_type(GLMessage::DataType::INT);
   17706     arg_params->add_intvalue((int)params);
   17707 
   17708     // call function
   17709     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17710     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17711     glContext->hooks->gl.glGetTexEnvxv(env, pname, params);
   17712     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17713     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17714 
   17715     void *pointerArgs[] = {
   17716         (void *) params,
   17717     };
   17718 
   17719     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17720                               threadStartTime, threadEndTime,
   17721                               &glmsg, pointerArgs);
   17722     glContext->traceGLMessage(&glmsg);
   17723 }
   17724 
   17725 void GLTrace_glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) {
   17726     GLMessage glmsg;
   17727     GLTraceContext *glContext = getGLTraceContext();
   17728 
   17729     glmsg.set_function(GLMessage::glGetTexParameterxv);
   17730 
   17731     // copy argument target
   17732     GLMessage_DataType *arg_target = glmsg.add_args();
   17733     arg_target->set_isarray(false);
   17734     arg_target->set_type(GLMessage::DataType::ENUM);
   17735     arg_target->add_intvalue((int)target);
   17736 
   17737     // copy argument pname
   17738     GLMessage_DataType *arg_pname = glmsg.add_args();
   17739     arg_pname->set_isarray(false);
   17740     arg_pname->set_type(GLMessage::DataType::ENUM);
   17741     arg_pname->add_intvalue((int)pname);
   17742 
   17743     // copy argument params
   17744     GLMessage_DataType *arg_params = glmsg.add_args();
   17745     arg_params->set_isarray(false);
   17746     arg_params->set_type(GLMessage::DataType::INT);
   17747     arg_params->add_intvalue((int)params);
   17748 
   17749     // call function
   17750     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17751     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17752     glContext->hooks->gl.glGetTexParameterxv(target, pname, params);
   17753     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17754     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17755 
   17756     void *pointerArgs[] = {
   17757         (void *) params,
   17758     };
   17759 
   17760     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17761                               threadStartTime, threadEndTime,
   17762                               &glmsg, pointerArgs);
   17763     glContext->traceGLMessage(&glmsg);
   17764 }
   17765 
   17766 void GLTrace_glLightModelx(GLenum pname, GLfixed param) {
   17767     GLMessage glmsg;
   17768     GLTraceContext *glContext = getGLTraceContext();
   17769 
   17770     glmsg.set_function(GLMessage::glLightModelx);
   17771 
   17772     // copy argument pname
   17773     GLMessage_DataType *arg_pname = glmsg.add_args();
   17774     arg_pname->set_isarray(false);
   17775     arg_pname->set_type(GLMessage::DataType::ENUM);
   17776     arg_pname->add_intvalue((int)pname);
   17777 
   17778     // copy argument param
   17779     GLMessage_DataType *arg_param = glmsg.add_args();
   17780     arg_param->set_isarray(false);
   17781     arg_param->set_type(GLMessage::DataType::INT);
   17782     arg_param->add_intvalue(param);
   17783 
   17784     // call function
   17785     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17786     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17787     glContext->hooks->gl.glLightModelx(pname, param);
   17788     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17789     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17790 
   17791     void *pointerArgs[] = {
   17792     };
   17793 
   17794     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17795                               threadStartTime, threadEndTime,
   17796                               &glmsg, pointerArgs);
   17797     glContext->traceGLMessage(&glmsg);
   17798 }
   17799 
   17800 void GLTrace_glLightModelxv(GLenum pname, const GLfixed *params) {
   17801     GLMessage glmsg;
   17802     GLTraceContext *glContext = getGLTraceContext();
   17803 
   17804     glmsg.set_function(GLMessage::glLightModelxv);
   17805 
   17806     // copy argument pname
   17807     GLMessage_DataType *arg_pname = glmsg.add_args();
   17808     arg_pname->set_isarray(false);
   17809     arg_pname->set_type(GLMessage::DataType::ENUM);
   17810     arg_pname->add_intvalue((int)pname);
   17811 
   17812     // copy argument params
   17813     GLMessage_DataType *arg_params = glmsg.add_args();
   17814     arg_params->set_isarray(false);
   17815     arg_params->set_type(GLMessage::DataType::INT);
   17816     arg_params->add_intvalue((int)params);
   17817 
   17818     // call function
   17819     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17820     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17821     glContext->hooks->gl.glLightModelxv(pname, params);
   17822     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17823     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17824 
   17825     void *pointerArgs[] = {
   17826         (void *) params,
   17827     };
   17828 
   17829     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17830                               threadStartTime, threadEndTime,
   17831                               &glmsg, pointerArgs);
   17832     glContext->traceGLMessage(&glmsg);
   17833 }
   17834 
   17835 void GLTrace_glLightx(GLenum light, GLenum pname, GLfixed param) {
   17836     GLMessage glmsg;
   17837     GLTraceContext *glContext = getGLTraceContext();
   17838 
   17839     glmsg.set_function(GLMessage::glLightx);
   17840 
   17841     // copy argument light
   17842     GLMessage_DataType *arg_light = glmsg.add_args();
   17843     arg_light->set_isarray(false);
   17844     arg_light->set_type(GLMessage::DataType::ENUM);
   17845     arg_light->add_intvalue((int)light);
   17846 
   17847     // copy argument pname
   17848     GLMessage_DataType *arg_pname = glmsg.add_args();
   17849     arg_pname->set_isarray(false);
   17850     arg_pname->set_type(GLMessage::DataType::ENUM);
   17851     arg_pname->add_intvalue((int)pname);
   17852 
   17853     // copy argument param
   17854     GLMessage_DataType *arg_param = glmsg.add_args();
   17855     arg_param->set_isarray(false);
   17856     arg_param->set_type(GLMessage::DataType::INT);
   17857     arg_param->add_intvalue(param);
   17858 
   17859     // call function
   17860     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17861     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17862     glContext->hooks->gl.glLightx(light, pname, param);
   17863     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17864     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17865 
   17866     void *pointerArgs[] = {
   17867     };
   17868 
   17869     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17870                               threadStartTime, threadEndTime,
   17871                               &glmsg, pointerArgs);
   17872     glContext->traceGLMessage(&glmsg);
   17873 }
   17874 
   17875 void GLTrace_glLightxv(GLenum light, GLenum pname, const GLfixed *params) {
   17876     GLMessage glmsg;
   17877     GLTraceContext *glContext = getGLTraceContext();
   17878 
   17879     glmsg.set_function(GLMessage::glLightxv);
   17880 
   17881     // copy argument light
   17882     GLMessage_DataType *arg_light = glmsg.add_args();
   17883     arg_light->set_isarray(false);
   17884     arg_light->set_type(GLMessage::DataType::ENUM);
   17885     arg_light->add_intvalue((int)light);
   17886 
   17887     // copy argument pname
   17888     GLMessage_DataType *arg_pname = glmsg.add_args();
   17889     arg_pname->set_isarray(false);
   17890     arg_pname->set_type(GLMessage::DataType::ENUM);
   17891     arg_pname->add_intvalue((int)pname);
   17892 
   17893     // copy argument params
   17894     GLMessage_DataType *arg_params = glmsg.add_args();
   17895     arg_params->set_isarray(false);
   17896     arg_params->set_type(GLMessage::DataType::INT);
   17897     arg_params->add_intvalue((int)params);
   17898 
   17899     // call function
   17900     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17901     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17902     glContext->hooks->gl.glLightxv(light, pname, params);
   17903     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17904     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17905 
   17906     void *pointerArgs[] = {
   17907         (void *) params,
   17908     };
   17909 
   17910     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17911                               threadStartTime, threadEndTime,
   17912                               &glmsg, pointerArgs);
   17913     glContext->traceGLMessage(&glmsg);
   17914 }
   17915 
   17916 void GLTrace_glLineWidthx(GLfixed width) {
   17917     GLMessage glmsg;
   17918     GLTraceContext *glContext = getGLTraceContext();
   17919 
   17920     glmsg.set_function(GLMessage::glLineWidthx);
   17921 
   17922     // copy argument width
   17923     GLMessage_DataType *arg_width = glmsg.add_args();
   17924     arg_width->set_isarray(false);
   17925     arg_width->set_type(GLMessage::DataType::INT);
   17926     arg_width->add_intvalue(width);
   17927 
   17928     // call function
   17929     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17930     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17931     glContext->hooks->gl.glLineWidthx(width);
   17932     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17933     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17934 
   17935     void *pointerArgs[] = {
   17936     };
   17937 
   17938     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17939                               threadStartTime, threadEndTime,
   17940                               &glmsg, pointerArgs);
   17941     glContext->traceGLMessage(&glmsg);
   17942 }
   17943 
   17944 void GLTrace_glLoadIdentity(void) {
   17945     GLMessage glmsg;
   17946     GLTraceContext *glContext = getGLTraceContext();
   17947 
   17948     glmsg.set_function(GLMessage::glLoadIdentity);
   17949 
   17950     // call function
   17951     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17952     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17953     glContext->hooks->gl.glLoadIdentity();
   17954     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17955     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17956 
   17957     void *pointerArgs[] = {
   17958     };
   17959 
   17960     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17961                               threadStartTime, threadEndTime,
   17962                               &glmsg, pointerArgs);
   17963     glContext->traceGLMessage(&glmsg);
   17964 }
   17965 
   17966 void GLTrace_glLoadMatrixx(const GLfixed *m) {
   17967     GLMessage glmsg;
   17968     GLTraceContext *glContext = getGLTraceContext();
   17969 
   17970     glmsg.set_function(GLMessage::glLoadMatrixx);
   17971 
   17972     // copy argument m
   17973     GLMessage_DataType *arg_m = glmsg.add_args();
   17974     arg_m->set_isarray(false);
   17975     arg_m->set_type(GLMessage::DataType::INT);
   17976     arg_m->add_intvalue((int)m);
   17977 
   17978     // call function
   17979     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17980     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   17981     glContext->hooks->gl.glLoadMatrixx(m);
   17982     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   17983     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   17984 
   17985     void *pointerArgs[] = {
   17986         (void *) m,
   17987     };
   17988 
   17989     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   17990                               threadStartTime, threadEndTime,
   17991                               &glmsg, pointerArgs);
   17992     glContext->traceGLMessage(&glmsg);
   17993 }
   17994 
   17995 void GLTrace_glLogicOp(GLenum opcode) {
   17996     GLMessage glmsg;
   17997     GLTraceContext *glContext = getGLTraceContext();
   17998 
   17999     glmsg.set_function(GLMessage::glLogicOp);
   18000 
   18001     // copy argument opcode
   18002     GLMessage_DataType *arg_opcode = glmsg.add_args();
   18003     arg_opcode->set_isarray(false);
   18004     arg_opcode->set_type(GLMessage::DataType::ENUM);
   18005     arg_opcode->add_intvalue((int)opcode);
   18006 
   18007     // call function
   18008     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18009     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18010     glContext->hooks->gl.glLogicOp(opcode);
   18011     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18012     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18013 
   18014     void *pointerArgs[] = {
   18015     };
   18016 
   18017     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18018                               threadStartTime, threadEndTime,
   18019                               &glmsg, pointerArgs);
   18020     glContext->traceGLMessage(&glmsg);
   18021 }
   18022 
   18023 void GLTrace_glMaterialx(GLenum face, GLenum pname, GLfixed param) {
   18024     GLMessage glmsg;
   18025     GLTraceContext *glContext = getGLTraceContext();
   18026 
   18027     glmsg.set_function(GLMessage::glMaterialx);
   18028 
   18029     // copy argument face
   18030     GLMessage_DataType *arg_face = glmsg.add_args();
   18031     arg_face->set_isarray(false);
   18032     arg_face->set_type(GLMessage::DataType::ENUM);
   18033     arg_face->add_intvalue((int)face);
   18034 
   18035     // copy argument pname
   18036     GLMessage_DataType *arg_pname = glmsg.add_args();
   18037     arg_pname->set_isarray(false);
   18038     arg_pname->set_type(GLMessage::DataType::ENUM);
   18039     arg_pname->add_intvalue((int)pname);
   18040 
   18041     // copy argument param
   18042     GLMessage_DataType *arg_param = glmsg.add_args();
   18043     arg_param->set_isarray(false);
   18044     arg_param->set_type(GLMessage::DataType::INT);
   18045     arg_param->add_intvalue(param);
   18046 
   18047     // call function
   18048     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18049     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18050     glContext->hooks->gl.glMaterialx(face, pname, param);
   18051     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18052     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18053 
   18054     void *pointerArgs[] = {
   18055     };
   18056 
   18057     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18058                               threadStartTime, threadEndTime,
   18059                               &glmsg, pointerArgs);
   18060     glContext->traceGLMessage(&glmsg);
   18061 }
   18062 
   18063 void GLTrace_glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) {
   18064     GLMessage glmsg;
   18065     GLTraceContext *glContext = getGLTraceContext();
   18066 
   18067     glmsg.set_function(GLMessage::glMaterialxv);
   18068 
   18069     // copy argument face
   18070     GLMessage_DataType *arg_face = glmsg.add_args();
   18071     arg_face->set_isarray(false);
   18072     arg_face->set_type(GLMessage::DataType::ENUM);
   18073     arg_face->add_intvalue((int)face);
   18074 
   18075     // copy argument pname
   18076     GLMessage_DataType *arg_pname = glmsg.add_args();
   18077     arg_pname->set_isarray(false);
   18078     arg_pname->set_type(GLMessage::DataType::ENUM);
   18079     arg_pname->add_intvalue((int)pname);
   18080 
   18081     // copy argument params
   18082     GLMessage_DataType *arg_params = glmsg.add_args();
   18083     arg_params->set_isarray(false);
   18084     arg_params->set_type(GLMessage::DataType::INT);
   18085     arg_params->add_intvalue((int)params);
   18086 
   18087     // call function
   18088     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18089     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18090     glContext->hooks->gl.glMaterialxv(face, pname, params);
   18091     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18092     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18093 
   18094     void *pointerArgs[] = {
   18095         (void *) params,
   18096     };
   18097 
   18098     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18099                               threadStartTime, threadEndTime,
   18100                               &glmsg, pointerArgs);
   18101     glContext->traceGLMessage(&glmsg);
   18102 }
   18103 
   18104 void GLTrace_glMatrixMode(GLenum mode) {
   18105     GLMessage glmsg;
   18106     GLTraceContext *glContext = getGLTraceContext();
   18107 
   18108     glmsg.set_function(GLMessage::glMatrixMode);
   18109 
   18110     // copy argument mode
   18111     GLMessage_DataType *arg_mode = glmsg.add_args();
   18112     arg_mode->set_isarray(false);
   18113     arg_mode->set_type(GLMessage::DataType::ENUM);
   18114     arg_mode->add_intvalue((int)mode);
   18115 
   18116     // call function
   18117     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18118     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18119     glContext->hooks->gl.glMatrixMode(mode);
   18120     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18121     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18122 
   18123     void *pointerArgs[] = {
   18124     };
   18125 
   18126     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18127                               threadStartTime, threadEndTime,
   18128                               &glmsg, pointerArgs);
   18129     glContext->traceGLMessage(&glmsg);
   18130 }
   18131 
   18132 void GLTrace_glMultMatrixx(const GLfixed *m) {
   18133     GLMessage glmsg;
   18134     GLTraceContext *glContext = getGLTraceContext();
   18135 
   18136     glmsg.set_function(GLMessage::glMultMatrixx);
   18137 
   18138     // copy argument m
   18139     GLMessage_DataType *arg_m = glmsg.add_args();
   18140     arg_m->set_isarray(false);
   18141     arg_m->set_type(GLMessage::DataType::INT);
   18142     arg_m->add_intvalue((int)m);
   18143 
   18144     // call function
   18145     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18146     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18147     glContext->hooks->gl.glMultMatrixx(m);
   18148     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18149     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18150 
   18151     void *pointerArgs[] = {
   18152         (void *) m,
   18153     };
   18154 
   18155     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18156                               threadStartTime, threadEndTime,
   18157                               &glmsg, pointerArgs);
   18158     glContext->traceGLMessage(&glmsg);
   18159 }
   18160 
   18161 void GLTrace_glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
   18162     GLMessage glmsg;
   18163     GLTraceContext *glContext = getGLTraceContext();
   18164 
   18165     glmsg.set_function(GLMessage::glMultiTexCoord4x);
   18166 
   18167     // copy argument target
   18168     GLMessage_DataType *arg_target = glmsg.add_args();
   18169     arg_target->set_isarray(false);
   18170     arg_target->set_type(GLMessage::DataType::ENUM);
   18171     arg_target->add_intvalue((int)target);
   18172 
   18173     // copy argument s
   18174     GLMessage_DataType *arg_s = glmsg.add_args();
   18175     arg_s->set_isarray(false);
   18176     arg_s->set_type(GLMessage::DataType::INT);
   18177     arg_s->add_intvalue(s);
   18178 
   18179     // copy argument t
   18180     GLMessage_DataType *arg_t = glmsg.add_args();
   18181     arg_t->set_isarray(false);
   18182     arg_t->set_type(GLMessage::DataType::INT);
   18183     arg_t->add_intvalue(t);
   18184 
   18185     // copy argument r
   18186     GLMessage_DataType *arg_r = glmsg.add_args();
   18187     arg_r->set_isarray(false);
   18188     arg_r->set_type(GLMessage::DataType::INT);
   18189     arg_r->add_intvalue(r);
   18190 
   18191     // copy argument q
   18192     GLMessage_DataType *arg_q = glmsg.add_args();
   18193     arg_q->set_isarray(false);
   18194     arg_q->set_type(GLMessage::DataType::INT);
   18195     arg_q->add_intvalue(q);
   18196 
   18197     // call function
   18198     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18199     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18200     glContext->hooks->gl.glMultiTexCoord4x(target, s, t, r, q);
   18201     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18202     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18203 
   18204     void *pointerArgs[] = {
   18205     };
   18206 
   18207     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18208                               threadStartTime, threadEndTime,
   18209                               &glmsg, pointerArgs);
   18210     glContext->traceGLMessage(&glmsg);
   18211 }
   18212 
   18213 void GLTrace_glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) {
   18214     GLMessage glmsg;
   18215     GLTraceContext *glContext = getGLTraceContext();
   18216 
   18217     glmsg.set_function(GLMessage::glNormal3x);
   18218 
   18219     // copy argument nx
   18220     GLMessage_DataType *arg_nx = glmsg.add_args();
   18221     arg_nx->set_isarray(false);
   18222     arg_nx->set_type(GLMessage::DataType::INT);
   18223     arg_nx->add_intvalue(nx);
   18224 
   18225     // copy argument ny
   18226     GLMessage_DataType *arg_ny = glmsg.add_args();
   18227     arg_ny->set_isarray(false);
   18228     arg_ny->set_type(GLMessage::DataType::INT);
   18229     arg_ny->add_intvalue(ny);
   18230 
   18231     // copy argument nz
   18232     GLMessage_DataType *arg_nz = glmsg.add_args();
   18233     arg_nz->set_isarray(false);
   18234     arg_nz->set_type(GLMessage::DataType::INT);
   18235     arg_nz->add_intvalue(nz);
   18236 
   18237     // call function
   18238     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18239     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18240     glContext->hooks->gl.glNormal3x(nx, ny, nz);
   18241     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18242     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18243 
   18244     void *pointerArgs[] = {
   18245     };
   18246 
   18247     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18248                               threadStartTime, threadEndTime,
   18249                               &glmsg, pointerArgs);
   18250     glContext->traceGLMessage(&glmsg);
   18251 }
   18252 
   18253 void GLTrace_glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) {
   18254     GLMessage glmsg;
   18255     GLTraceContext *glContext = getGLTraceContext();
   18256 
   18257     glmsg.set_function(GLMessage::glNormalPointer);
   18258 
   18259     // copy argument type
   18260     GLMessage_DataType *arg_type = glmsg.add_args();
   18261     arg_type->set_isarray(false);
   18262     arg_type->set_type(GLMessage::DataType::ENUM);
   18263     arg_type->add_intvalue((int)type);
   18264 
   18265     // copy argument stride
   18266     GLMessage_DataType *arg_stride = glmsg.add_args();
   18267     arg_stride->set_isarray(false);
   18268     arg_stride->set_type(GLMessage::DataType::INT);
   18269     arg_stride->add_intvalue(stride);
   18270 
   18271     // copy argument pointer
   18272     GLMessage_DataType *arg_pointer = glmsg.add_args();
   18273     arg_pointer->set_isarray(false);
   18274     arg_pointer->set_type(GLMessage::DataType::INT);
   18275     arg_pointer->add_intvalue((int)pointer);
   18276 
   18277     // call function
   18278     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18279     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18280     glContext->hooks->gl.glNormalPointer(type, stride, pointer);
   18281     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18282     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18283 
   18284     void *pointerArgs[] = {
   18285         (void *) pointer,
   18286     };
   18287 
   18288     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18289                               threadStartTime, threadEndTime,
   18290                               &glmsg, pointerArgs);
   18291     glContext->traceGLMessage(&glmsg);
   18292 }
   18293 
   18294 void GLTrace_glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   18295     GLMessage glmsg;
   18296     GLTraceContext *glContext = getGLTraceContext();
   18297 
   18298     glmsg.set_function(GLMessage::glOrthox);
   18299 
   18300     // copy argument left
   18301     GLMessage_DataType *arg_left = glmsg.add_args();
   18302     arg_left->set_isarray(false);
   18303     arg_left->set_type(GLMessage::DataType::INT);
   18304     arg_left->add_intvalue(left);
   18305 
   18306     // copy argument right
   18307     GLMessage_DataType *arg_right = glmsg.add_args();
   18308     arg_right->set_isarray(false);
   18309     arg_right->set_type(GLMessage::DataType::INT);
   18310     arg_right->add_intvalue(right);
   18311 
   18312     // copy argument bottom
   18313     GLMessage_DataType *arg_bottom = glmsg.add_args();
   18314     arg_bottom->set_isarray(false);
   18315     arg_bottom->set_type(GLMessage::DataType::INT);
   18316     arg_bottom->add_intvalue(bottom);
   18317 
   18318     // copy argument top
   18319     GLMessage_DataType *arg_top = glmsg.add_args();
   18320     arg_top->set_isarray(false);
   18321     arg_top->set_type(GLMessage::DataType::INT);
   18322     arg_top->add_intvalue(top);
   18323 
   18324     // copy argument zNear
   18325     GLMessage_DataType *arg_zNear = glmsg.add_args();
   18326     arg_zNear->set_isarray(false);
   18327     arg_zNear->set_type(GLMessage::DataType::INT);
   18328     arg_zNear->add_intvalue(zNear);
   18329 
   18330     // copy argument zFar
   18331     GLMessage_DataType *arg_zFar = glmsg.add_args();
   18332     arg_zFar->set_isarray(false);
   18333     arg_zFar->set_type(GLMessage::DataType::INT);
   18334     arg_zFar->add_intvalue(zFar);
   18335 
   18336     // call function
   18337     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18338     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18339     glContext->hooks->gl.glOrthox(left, right, bottom, top, zNear, zFar);
   18340     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18341     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18342 
   18343     void *pointerArgs[] = {
   18344     };
   18345 
   18346     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18347                               threadStartTime, threadEndTime,
   18348                               &glmsg, pointerArgs);
   18349     glContext->traceGLMessage(&glmsg);
   18350 }
   18351 
   18352 void GLTrace_glPointParameterx(GLenum pname, GLfixed param) {
   18353     GLMessage glmsg;
   18354     GLTraceContext *glContext = getGLTraceContext();
   18355 
   18356     glmsg.set_function(GLMessage::glPointParameterx);
   18357 
   18358     // copy argument pname
   18359     GLMessage_DataType *arg_pname = glmsg.add_args();
   18360     arg_pname->set_isarray(false);
   18361     arg_pname->set_type(GLMessage::DataType::ENUM);
   18362     arg_pname->add_intvalue((int)pname);
   18363 
   18364     // copy argument param
   18365     GLMessage_DataType *arg_param = glmsg.add_args();
   18366     arg_param->set_isarray(false);
   18367     arg_param->set_type(GLMessage::DataType::INT);
   18368     arg_param->add_intvalue(param);
   18369 
   18370     // call function
   18371     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18372     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18373     glContext->hooks->gl.glPointParameterx(pname, param);
   18374     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18375     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18376 
   18377     void *pointerArgs[] = {
   18378     };
   18379 
   18380     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18381                               threadStartTime, threadEndTime,
   18382                               &glmsg, pointerArgs);
   18383     glContext->traceGLMessage(&glmsg);
   18384 }
   18385 
   18386 void GLTrace_glPointParameterxv(GLenum pname, const GLfixed *params) {
   18387     GLMessage glmsg;
   18388     GLTraceContext *glContext = getGLTraceContext();
   18389 
   18390     glmsg.set_function(GLMessage::glPointParameterxv);
   18391 
   18392     // copy argument pname
   18393     GLMessage_DataType *arg_pname = glmsg.add_args();
   18394     arg_pname->set_isarray(false);
   18395     arg_pname->set_type(GLMessage::DataType::ENUM);
   18396     arg_pname->add_intvalue((int)pname);
   18397 
   18398     // copy argument params
   18399     GLMessage_DataType *arg_params = glmsg.add_args();
   18400     arg_params->set_isarray(false);
   18401     arg_params->set_type(GLMessage::DataType::INT);
   18402     arg_params->add_intvalue((int)params);
   18403 
   18404     // call function
   18405     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18406     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18407     glContext->hooks->gl.glPointParameterxv(pname, params);
   18408     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18409     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18410 
   18411     void *pointerArgs[] = {
   18412         (void *) params,
   18413     };
   18414 
   18415     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18416                               threadStartTime, threadEndTime,
   18417                               &glmsg, pointerArgs);
   18418     glContext->traceGLMessage(&glmsg);
   18419 }
   18420 
   18421 void GLTrace_glPointSizex(GLfixed size) {
   18422     GLMessage glmsg;
   18423     GLTraceContext *glContext = getGLTraceContext();
   18424 
   18425     glmsg.set_function(GLMessage::glPointSizex);
   18426 
   18427     // copy argument size
   18428     GLMessage_DataType *arg_size = glmsg.add_args();
   18429     arg_size->set_isarray(false);
   18430     arg_size->set_type(GLMessage::DataType::INT);
   18431     arg_size->add_intvalue(size);
   18432 
   18433     // call function
   18434     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18435     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18436     glContext->hooks->gl.glPointSizex(size);
   18437     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18438     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18439 
   18440     void *pointerArgs[] = {
   18441     };
   18442 
   18443     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18444                               threadStartTime, threadEndTime,
   18445                               &glmsg, pointerArgs);
   18446     glContext->traceGLMessage(&glmsg);
   18447 }
   18448 
   18449 void GLTrace_glPolygonOffsetx(GLfixed factor, GLfixed units) {
   18450     GLMessage glmsg;
   18451     GLTraceContext *glContext = getGLTraceContext();
   18452 
   18453     glmsg.set_function(GLMessage::glPolygonOffsetx);
   18454 
   18455     // copy argument factor
   18456     GLMessage_DataType *arg_factor = glmsg.add_args();
   18457     arg_factor->set_isarray(false);
   18458     arg_factor->set_type(GLMessage::DataType::INT);
   18459     arg_factor->add_intvalue(factor);
   18460 
   18461     // copy argument units
   18462     GLMessage_DataType *arg_units = glmsg.add_args();
   18463     arg_units->set_isarray(false);
   18464     arg_units->set_type(GLMessage::DataType::INT);
   18465     arg_units->add_intvalue(units);
   18466 
   18467     // call function
   18468     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18469     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18470     glContext->hooks->gl.glPolygonOffsetx(factor, units);
   18471     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18472     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18473 
   18474     void *pointerArgs[] = {
   18475     };
   18476 
   18477     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18478                               threadStartTime, threadEndTime,
   18479                               &glmsg, pointerArgs);
   18480     glContext->traceGLMessage(&glmsg);
   18481 }
   18482 
   18483 void GLTrace_glPopMatrix(void) {
   18484     GLMessage glmsg;
   18485     GLTraceContext *glContext = getGLTraceContext();
   18486 
   18487     glmsg.set_function(GLMessage::glPopMatrix);
   18488 
   18489     // call function
   18490     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18491     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18492     glContext->hooks->gl.glPopMatrix();
   18493     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18494     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18495 
   18496     void *pointerArgs[] = {
   18497     };
   18498 
   18499     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18500                               threadStartTime, threadEndTime,
   18501                               &glmsg, pointerArgs);
   18502     glContext->traceGLMessage(&glmsg);
   18503 }
   18504 
   18505 void GLTrace_glPushMatrix(void) {
   18506     GLMessage glmsg;
   18507     GLTraceContext *glContext = getGLTraceContext();
   18508 
   18509     glmsg.set_function(GLMessage::glPushMatrix);
   18510 
   18511     // call function
   18512     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18513     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18514     glContext->hooks->gl.glPushMatrix();
   18515     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18516     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18517 
   18518     void *pointerArgs[] = {
   18519     };
   18520 
   18521     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18522                               threadStartTime, threadEndTime,
   18523                               &glmsg, pointerArgs);
   18524     glContext->traceGLMessage(&glmsg);
   18525 }
   18526 
   18527 void GLTrace_glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
   18528     GLMessage glmsg;
   18529     GLTraceContext *glContext = getGLTraceContext();
   18530 
   18531     glmsg.set_function(GLMessage::glRotatex);
   18532 
   18533     // copy argument angle
   18534     GLMessage_DataType *arg_angle = glmsg.add_args();
   18535     arg_angle->set_isarray(false);
   18536     arg_angle->set_type(GLMessage::DataType::INT);
   18537     arg_angle->add_intvalue(angle);
   18538 
   18539     // copy argument x
   18540     GLMessage_DataType *arg_x = glmsg.add_args();
   18541     arg_x->set_isarray(false);
   18542     arg_x->set_type(GLMessage::DataType::INT);
   18543     arg_x->add_intvalue(x);
   18544 
   18545     // copy argument y
   18546     GLMessage_DataType *arg_y = glmsg.add_args();
   18547     arg_y->set_isarray(false);
   18548     arg_y->set_type(GLMessage::DataType::INT);
   18549     arg_y->add_intvalue(y);
   18550 
   18551     // copy argument z
   18552     GLMessage_DataType *arg_z = glmsg.add_args();
   18553     arg_z->set_isarray(false);
   18554     arg_z->set_type(GLMessage::DataType::INT);
   18555     arg_z->add_intvalue(z);
   18556 
   18557     // call function
   18558     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18559     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18560     glContext->hooks->gl.glRotatex(angle, x, y, z);
   18561     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18562     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18563 
   18564     void *pointerArgs[] = {
   18565     };
   18566 
   18567     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18568                               threadStartTime, threadEndTime,
   18569                               &glmsg, pointerArgs);
   18570     glContext->traceGLMessage(&glmsg);
   18571 }
   18572 
   18573 void GLTrace_glSampleCoveragex(GLclampx value, GLboolean invert) {
   18574     GLMessage glmsg;
   18575     GLTraceContext *glContext = getGLTraceContext();
   18576 
   18577     glmsg.set_function(GLMessage::glSampleCoveragex);
   18578 
   18579     // copy argument value
   18580     GLMessage_DataType *arg_value = glmsg.add_args();
   18581     arg_value->set_isarray(false);
   18582     arg_value->set_type(GLMessage::DataType::INT);
   18583     arg_value->add_intvalue(value);
   18584 
   18585     // copy argument invert
   18586     GLMessage_DataType *arg_invert = glmsg.add_args();
   18587     arg_invert->set_isarray(false);
   18588     arg_invert->set_type(GLMessage::DataType::BOOL);
   18589     arg_invert->add_boolvalue(invert);
   18590 
   18591     // call function
   18592     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18593     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18594     glContext->hooks->gl.glSampleCoveragex(value, invert);
   18595     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18596     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18597 
   18598     void *pointerArgs[] = {
   18599     };
   18600 
   18601     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18602                               threadStartTime, threadEndTime,
   18603                               &glmsg, pointerArgs);
   18604     glContext->traceGLMessage(&glmsg);
   18605 }
   18606 
   18607 void GLTrace_glScalex(GLfixed x, GLfixed y, GLfixed z) {
   18608     GLMessage glmsg;
   18609     GLTraceContext *glContext = getGLTraceContext();
   18610 
   18611     glmsg.set_function(GLMessage::glScalex);
   18612 
   18613     // copy argument x
   18614     GLMessage_DataType *arg_x = glmsg.add_args();
   18615     arg_x->set_isarray(false);
   18616     arg_x->set_type(GLMessage::DataType::INT);
   18617     arg_x->add_intvalue(x);
   18618 
   18619     // copy argument y
   18620     GLMessage_DataType *arg_y = glmsg.add_args();
   18621     arg_y->set_isarray(false);
   18622     arg_y->set_type(GLMessage::DataType::INT);
   18623     arg_y->add_intvalue(y);
   18624 
   18625     // copy argument z
   18626     GLMessage_DataType *arg_z = glmsg.add_args();
   18627     arg_z->set_isarray(false);
   18628     arg_z->set_type(GLMessage::DataType::INT);
   18629     arg_z->add_intvalue(z);
   18630 
   18631     // call function
   18632     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18633     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18634     glContext->hooks->gl.glScalex(x, y, z);
   18635     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18636     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18637 
   18638     void *pointerArgs[] = {
   18639     };
   18640 
   18641     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18642                               threadStartTime, threadEndTime,
   18643                               &glmsg, pointerArgs);
   18644     glContext->traceGLMessage(&glmsg);
   18645 }
   18646 
   18647 void GLTrace_glShadeModel(GLenum mode) {
   18648     GLMessage glmsg;
   18649     GLTraceContext *glContext = getGLTraceContext();
   18650 
   18651     glmsg.set_function(GLMessage::glShadeModel);
   18652 
   18653     // copy argument mode
   18654     GLMessage_DataType *arg_mode = glmsg.add_args();
   18655     arg_mode->set_isarray(false);
   18656     arg_mode->set_type(GLMessage::DataType::ENUM);
   18657     arg_mode->add_intvalue((int)mode);
   18658 
   18659     // call function
   18660     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18661     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18662     glContext->hooks->gl.glShadeModel(mode);
   18663     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18664     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18665 
   18666     void *pointerArgs[] = {
   18667     };
   18668 
   18669     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18670                               threadStartTime, threadEndTime,
   18671                               &glmsg, pointerArgs);
   18672     glContext->traceGLMessage(&glmsg);
   18673 }
   18674 
   18675 void GLTrace_glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   18676     GLMessage glmsg;
   18677     GLTraceContext *glContext = getGLTraceContext();
   18678 
   18679     glmsg.set_function(GLMessage::glTexCoordPointer);
   18680 
   18681     // copy argument size
   18682     GLMessage_DataType *arg_size = glmsg.add_args();
   18683     arg_size->set_isarray(false);
   18684     arg_size->set_type(GLMessage::DataType::INT);
   18685     arg_size->add_intvalue(size);
   18686 
   18687     // copy argument type
   18688     GLMessage_DataType *arg_type = glmsg.add_args();
   18689     arg_type->set_isarray(false);
   18690     arg_type->set_type(GLMessage::DataType::ENUM);
   18691     arg_type->add_intvalue((int)type);
   18692 
   18693     // copy argument stride
   18694     GLMessage_DataType *arg_stride = glmsg.add_args();
   18695     arg_stride->set_isarray(false);
   18696     arg_stride->set_type(GLMessage::DataType::INT);
   18697     arg_stride->add_intvalue(stride);
   18698 
   18699     // copy argument pointer
   18700     GLMessage_DataType *arg_pointer = glmsg.add_args();
   18701     arg_pointer->set_isarray(false);
   18702     arg_pointer->set_type(GLMessage::DataType::INT);
   18703     arg_pointer->add_intvalue((int)pointer);
   18704 
   18705     // call function
   18706     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18707     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18708     glContext->hooks->gl.glTexCoordPointer(size, type, stride, pointer);
   18709     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18710     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18711 
   18712     void *pointerArgs[] = {
   18713         (void *) pointer,
   18714     };
   18715 
   18716     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18717                               threadStartTime, threadEndTime,
   18718                               &glmsg, pointerArgs);
   18719     glContext->traceGLMessage(&glmsg);
   18720 }
   18721 
   18722 void GLTrace_glTexEnvi(GLenum target, GLenum pname, GLint param) {
   18723     GLMessage glmsg;
   18724     GLTraceContext *glContext = getGLTraceContext();
   18725 
   18726     glmsg.set_function(GLMessage::glTexEnvi);
   18727 
   18728     // copy argument target
   18729     GLMessage_DataType *arg_target = glmsg.add_args();
   18730     arg_target->set_isarray(false);
   18731     arg_target->set_type(GLMessage::DataType::ENUM);
   18732     arg_target->add_intvalue((int)target);
   18733 
   18734     // copy argument pname
   18735     GLMessage_DataType *arg_pname = glmsg.add_args();
   18736     arg_pname->set_isarray(false);
   18737     arg_pname->set_type(GLMessage::DataType::ENUM);
   18738     arg_pname->add_intvalue((int)pname);
   18739 
   18740     // copy argument param
   18741     GLMessage_DataType *arg_param = glmsg.add_args();
   18742     arg_param->set_isarray(false);
   18743     arg_param->set_type(GLMessage::DataType::INT);
   18744     arg_param->add_intvalue(param);
   18745 
   18746     // call function
   18747     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18748     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18749     glContext->hooks->gl.glTexEnvi(target, pname, param);
   18750     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18751     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18752 
   18753     void *pointerArgs[] = {
   18754     };
   18755 
   18756     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18757                               threadStartTime, threadEndTime,
   18758                               &glmsg, pointerArgs);
   18759     glContext->traceGLMessage(&glmsg);
   18760 }
   18761 
   18762 void GLTrace_glTexEnvx(GLenum target, GLenum pname, GLfixed param) {
   18763     GLMessage glmsg;
   18764     GLTraceContext *glContext = getGLTraceContext();
   18765 
   18766     glmsg.set_function(GLMessage::glTexEnvx);
   18767 
   18768     // copy argument target
   18769     GLMessage_DataType *arg_target = glmsg.add_args();
   18770     arg_target->set_isarray(false);
   18771     arg_target->set_type(GLMessage::DataType::ENUM);
   18772     arg_target->add_intvalue((int)target);
   18773 
   18774     // copy argument pname
   18775     GLMessage_DataType *arg_pname = glmsg.add_args();
   18776     arg_pname->set_isarray(false);
   18777     arg_pname->set_type(GLMessage::DataType::ENUM);
   18778     arg_pname->add_intvalue((int)pname);
   18779 
   18780     // copy argument param
   18781     GLMessage_DataType *arg_param = glmsg.add_args();
   18782     arg_param->set_isarray(false);
   18783     arg_param->set_type(GLMessage::DataType::INT);
   18784     arg_param->add_intvalue(param);
   18785 
   18786     // call function
   18787     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18788     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18789     glContext->hooks->gl.glTexEnvx(target, pname, param);
   18790     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18791     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18792 
   18793     void *pointerArgs[] = {
   18794     };
   18795 
   18796     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18797                               threadStartTime, threadEndTime,
   18798                               &glmsg, pointerArgs);
   18799     glContext->traceGLMessage(&glmsg);
   18800 }
   18801 
   18802 void GLTrace_glTexEnviv(GLenum target, GLenum pname, const GLint *params) {
   18803     GLMessage glmsg;
   18804     GLTraceContext *glContext = getGLTraceContext();
   18805 
   18806     glmsg.set_function(GLMessage::glTexEnviv);
   18807 
   18808     // copy argument target
   18809     GLMessage_DataType *arg_target = glmsg.add_args();
   18810     arg_target->set_isarray(false);
   18811     arg_target->set_type(GLMessage::DataType::ENUM);
   18812     arg_target->add_intvalue((int)target);
   18813 
   18814     // copy argument pname
   18815     GLMessage_DataType *arg_pname = glmsg.add_args();
   18816     arg_pname->set_isarray(false);
   18817     arg_pname->set_type(GLMessage::DataType::ENUM);
   18818     arg_pname->add_intvalue((int)pname);
   18819 
   18820     // copy argument params
   18821     GLMessage_DataType *arg_params = glmsg.add_args();
   18822     arg_params->set_isarray(false);
   18823     arg_params->set_type(GLMessage::DataType::INT);
   18824     arg_params->add_intvalue((int)params);
   18825 
   18826     // call function
   18827     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18828     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18829     glContext->hooks->gl.glTexEnviv(target, pname, params);
   18830     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18831     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18832 
   18833     void *pointerArgs[] = {
   18834         (void *) params,
   18835     };
   18836 
   18837     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18838                               threadStartTime, threadEndTime,
   18839                               &glmsg, pointerArgs);
   18840     glContext->traceGLMessage(&glmsg);
   18841 }
   18842 
   18843 void GLTrace_glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) {
   18844     GLMessage glmsg;
   18845     GLTraceContext *glContext = getGLTraceContext();
   18846 
   18847     glmsg.set_function(GLMessage::glTexEnvxv);
   18848 
   18849     // copy argument target
   18850     GLMessage_DataType *arg_target = glmsg.add_args();
   18851     arg_target->set_isarray(false);
   18852     arg_target->set_type(GLMessage::DataType::ENUM);
   18853     arg_target->add_intvalue((int)target);
   18854 
   18855     // copy argument pname
   18856     GLMessage_DataType *arg_pname = glmsg.add_args();
   18857     arg_pname->set_isarray(false);
   18858     arg_pname->set_type(GLMessage::DataType::ENUM);
   18859     arg_pname->add_intvalue((int)pname);
   18860 
   18861     // copy argument params
   18862     GLMessage_DataType *arg_params = glmsg.add_args();
   18863     arg_params->set_isarray(false);
   18864     arg_params->set_type(GLMessage::DataType::INT);
   18865     arg_params->add_intvalue((int)params);
   18866 
   18867     // call function
   18868     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18869     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18870     glContext->hooks->gl.glTexEnvxv(target, pname, params);
   18871     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18872     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18873 
   18874     void *pointerArgs[] = {
   18875         (void *) params,
   18876     };
   18877 
   18878     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18879                               threadStartTime, threadEndTime,
   18880                               &glmsg, pointerArgs);
   18881     glContext->traceGLMessage(&glmsg);
   18882 }
   18883 
   18884 void GLTrace_glTexParameterx(GLenum target, GLenum pname, GLfixed param) {
   18885     GLMessage glmsg;
   18886     GLTraceContext *glContext = getGLTraceContext();
   18887 
   18888     glmsg.set_function(GLMessage::glTexParameterx);
   18889 
   18890     // copy argument target
   18891     GLMessage_DataType *arg_target = glmsg.add_args();
   18892     arg_target->set_isarray(false);
   18893     arg_target->set_type(GLMessage::DataType::ENUM);
   18894     arg_target->add_intvalue((int)target);
   18895 
   18896     // copy argument pname
   18897     GLMessage_DataType *arg_pname = glmsg.add_args();
   18898     arg_pname->set_isarray(false);
   18899     arg_pname->set_type(GLMessage::DataType::ENUM);
   18900     arg_pname->add_intvalue((int)pname);
   18901 
   18902     // copy argument param
   18903     GLMessage_DataType *arg_param = glmsg.add_args();
   18904     arg_param->set_isarray(false);
   18905     arg_param->set_type(GLMessage::DataType::INT);
   18906     arg_param->add_intvalue(param);
   18907 
   18908     // call function
   18909     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18910     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18911     glContext->hooks->gl.glTexParameterx(target, pname, param);
   18912     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18913     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18914 
   18915     void *pointerArgs[] = {
   18916     };
   18917 
   18918     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18919                               threadStartTime, threadEndTime,
   18920                               &glmsg, pointerArgs);
   18921     glContext->traceGLMessage(&glmsg);
   18922 }
   18923 
   18924 void GLTrace_glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) {
   18925     GLMessage glmsg;
   18926     GLTraceContext *glContext = getGLTraceContext();
   18927 
   18928     glmsg.set_function(GLMessage::glTexParameterxv);
   18929 
   18930     // copy argument target
   18931     GLMessage_DataType *arg_target = glmsg.add_args();
   18932     arg_target->set_isarray(false);
   18933     arg_target->set_type(GLMessage::DataType::ENUM);
   18934     arg_target->add_intvalue((int)target);
   18935 
   18936     // copy argument pname
   18937     GLMessage_DataType *arg_pname = glmsg.add_args();
   18938     arg_pname->set_isarray(false);
   18939     arg_pname->set_type(GLMessage::DataType::ENUM);
   18940     arg_pname->add_intvalue((int)pname);
   18941 
   18942     // copy argument params
   18943     GLMessage_DataType *arg_params = glmsg.add_args();
   18944     arg_params->set_isarray(false);
   18945     arg_params->set_type(GLMessage::DataType::INT);
   18946     arg_params->add_intvalue((int)params);
   18947 
   18948     // call function
   18949     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18950     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18951     glContext->hooks->gl.glTexParameterxv(target, pname, params);
   18952     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18953     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18954 
   18955     void *pointerArgs[] = {
   18956         (void *) params,
   18957     };
   18958 
   18959     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   18960                               threadStartTime, threadEndTime,
   18961                               &glmsg, pointerArgs);
   18962     glContext->traceGLMessage(&glmsg);
   18963 }
   18964 
   18965 void GLTrace_glTranslatex(GLfixed x, GLfixed y, GLfixed z) {
   18966     GLMessage glmsg;
   18967     GLTraceContext *glContext = getGLTraceContext();
   18968 
   18969     glmsg.set_function(GLMessage::glTranslatex);
   18970 
   18971     // copy argument x
   18972     GLMessage_DataType *arg_x = glmsg.add_args();
   18973     arg_x->set_isarray(false);
   18974     arg_x->set_type(GLMessage::DataType::INT);
   18975     arg_x->add_intvalue(x);
   18976 
   18977     // copy argument y
   18978     GLMessage_DataType *arg_y = glmsg.add_args();
   18979     arg_y->set_isarray(false);
   18980     arg_y->set_type(GLMessage::DataType::INT);
   18981     arg_y->add_intvalue(y);
   18982 
   18983     // copy argument z
   18984     GLMessage_DataType *arg_z = glmsg.add_args();
   18985     arg_z->set_isarray(false);
   18986     arg_z->set_type(GLMessage::DataType::INT);
   18987     arg_z->add_intvalue(z);
   18988 
   18989     // call function
   18990     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18991     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   18992     glContext->hooks->gl.glTranslatex(x, y, z);
   18993     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   18994     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   18995 
   18996     void *pointerArgs[] = {
   18997     };
   18998 
   18999     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19000                               threadStartTime, threadEndTime,
   19001                               &glmsg, pointerArgs);
   19002     glContext->traceGLMessage(&glmsg);
   19003 }
   19004 
   19005 void GLTrace_glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   19006     GLMessage glmsg;
   19007     GLTraceContext *glContext = getGLTraceContext();
   19008 
   19009     glmsg.set_function(GLMessage::glVertexPointer);
   19010 
   19011     // copy argument size
   19012     GLMessage_DataType *arg_size = glmsg.add_args();
   19013     arg_size->set_isarray(false);
   19014     arg_size->set_type(GLMessage::DataType::INT);
   19015     arg_size->add_intvalue(size);
   19016 
   19017     // copy argument type
   19018     GLMessage_DataType *arg_type = glmsg.add_args();
   19019     arg_type->set_isarray(false);
   19020     arg_type->set_type(GLMessage::DataType::ENUM);
   19021     arg_type->add_intvalue((int)type);
   19022 
   19023     // copy argument stride
   19024     GLMessage_DataType *arg_stride = glmsg.add_args();
   19025     arg_stride->set_isarray(false);
   19026     arg_stride->set_type(GLMessage::DataType::INT);
   19027     arg_stride->add_intvalue(stride);
   19028 
   19029     // copy argument pointer
   19030     GLMessage_DataType *arg_pointer = glmsg.add_args();
   19031     arg_pointer->set_isarray(false);
   19032     arg_pointer->set_type(GLMessage::DataType::INT);
   19033     arg_pointer->add_intvalue((int)pointer);
   19034 
   19035     // call function
   19036     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19037     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19038     glContext->hooks->gl.glVertexPointer(size, type, stride, pointer);
   19039     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19040     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19041 
   19042     void *pointerArgs[] = {
   19043         (void *) pointer,
   19044     };
   19045 
   19046     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19047                               threadStartTime, threadEndTime,
   19048                               &glmsg, pointerArgs);
   19049     glContext->traceGLMessage(&glmsg);
   19050 }
   19051 
   19052 void GLTrace_glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) {
   19053     GLMessage glmsg;
   19054     GLTraceContext *glContext = getGLTraceContext();
   19055 
   19056     glmsg.set_function(GLMessage::glPointSizePointerOES);
   19057 
   19058     // copy argument type
   19059     GLMessage_DataType *arg_type = glmsg.add_args();
   19060     arg_type->set_isarray(false);
   19061     arg_type->set_type(GLMessage::DataType::ENUM);
   19062     arg_type->add_intvalue((int)type);
   19063 
   19064     // copy argument stride
   19065     GLMessage_DataType *arg_stride = glmsg.add_args();
   19066     arg_stride->set_isarray(false);
   19067     arg_stride->set_type(GLMessage::DataType::INT);
   19068     arg_stride->add_intvalue(stride);
   19069 
   19070     // copy argument pointer
   19071     GLMessage_DataType *arg_pointer = glmsg.add_args();
   19072     arg_pointer->set_isarray(false);
   19073     arg_pointer->set_type(GLMessage::DataType::INT);
   19074     arg_pointer->add_intvalue((int)pointer);
   19075 
   19076     // call function
   19077     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19078     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19079     glContext->hooks->gl.glPointSizePointerOES(type, stride, pointer);
   19080     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19081     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19082 
   19083     void *pointerArgs[] = {
   19084         (void *) pointer,
   19085     };
   19086 
   19087     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19088                               threadStartTime, threadEndTime,
   19089                               &glmsg, pointerArgs);
   19090     glContext->traceGLMessage(&glmsg);
   19091 }
   19092 
   19093 
   19094 // Definitions for GL1Ext APIs
   19095 
   19096 void GLTrace_glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) {
   19097     GLMessage glmsg;
   19098     GLTraceContext *glContext = getGLTraceContext();
   19099 
   19100     glmsg.set_function(GLMessage::glBlendEquationSeparateOES);
   19101 
   19102     // copy argument modeRGB
   19103     GLMessage_DataType *arg_modeRGB = glmsg.add_args();
   19104     arg_modeRGB->set_isarray(false);
   19105     arg_modeRGB->set_type(GLMessage::DataType::ENUM);
   19106     arg_modeRGB->add_intvalue((int)modeRGB);
   19107 
   19108     // copy argument modeAlpha
   19109     GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
   19110     arg_modeAlpha->set_isarray(false);
   19111     arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
   19112     arg_modeAlpha->add_intvalue((int)modeAlpha);
   19113 
   19114     // call function
   19115     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19116     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19117     glContext->hooks->gl.glBlendEquationSeparateOES(modeRGB, modeAlpha);
   19118     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19119     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19120 
   19121     void *pointerArgs[] = {
   19122     };
   19123 
   19124     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19125                               threadStartTime, threadEndTime,
   19126                               &glmsg, pointerArgs);
   19127     glContext->traceGLMessage(&glmsg);
   19128 }
   19129 
   19130 void GLTrace_glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) {
   19131     GLMessage glmsg;
   19132     GLTraceContext *glContext = getGLTraceContext();
   19133 
   19134     glmsg.set_function(GLMessage::glBlendFuncSeparateOES);
   19135 
   19136     // copy argument srcRGB
   19137     GLMessage_DataType *arg_srcRGB = glmsg.add_args();
   19138     arg_srcRGB->set_isarray(false);
   19139     arg_srcRGB->set_type(GLMessage::DataType::ENUM);
   19140     arg_srcRGB->add_intvalue((int)srcRGB);
   19141 
   19142     // copy argument dstRGB
   19143     GLMessage_DataType *arg_dstRGB = glmsg.add_args();
   19144     arg_dstRGB->set_isarray(false);
   19145     arg_dstRGB->set_type(GLMessage::DataType::ENUM);
   19146     arg_dstRGB->add_intvalue((int)dstRGB);
   19147 
   19148     // copy argument srcAlpha
   19149     GLMessage_DataType *arg_srcAlpha = glmsg.add_args();
   19150     arg_srcAlpha->set_isarray(false);
   19151     arg_srcAlpha->set_type(GLMessage::DataType::ENUM);
   19152     arg_srcAlpha->add_intvalue((int)srcAlpha);
   19153 
   19154     // copy argument dstAlpha
   19155     GLMessage_DataType *arg_dstAlpha = glmsg.add_args();
   19156     arg_dstAlpha->set_isarray(false);
   19157     arg_dstAlpha->set_type(GLMessage::DataType::ENUM);
   19158     arg_dstAlpha->add_intvalue((int)dstAlpha);
   19159 
   19160     // call function
   19161     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19162     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19163     glContext->hooks->gl.glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha);
   19164     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19165     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19166 
   19167     void *pointerArgs[] = {
   19168     };
   19169 
   19170     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19171                               threadStartTime, threadEndTime,
   19172                               &glmsg, pointerArgs);
   19173     glContext->traceGLMessage(&glmsg);
   19174 }
   19175 
   19176 void GLTrace_glBlendEquationOES(GLenum mode) {
   19177     GLMessage glmsg;
   19178     GLTraceContext *glContext = getGLTraceContext();
   19179 
   19180     glmsg.set_function(GLMessage::glBlendEquationOES);
   19181 
   19182     // copy argument mode
   19183     GLMessage_DataType *arg_mode = glmsg.add_args();
   19184     arg_mode->set_isarray(false);
   19185     arg_mode->set_type(GLMessage::DataType::ENUM);
   19186     arg_mode->add_intvalue((int)mode);
   19187 
   19188     // call function
   19189     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19190     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19191     glContext->hooks->gl.glBlendEquationOES(mode);
   19192     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19193     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19194 
   19195     void *pointerArgs[] = {
   19196     };
   19197 
   19198     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19199                               threadStartTime, threadEndTime,
   19200                               &glmsg, pointerArgs);
   19201     glContext->traceGLMessage(&glmsg);
   19202 }
   19203 
   19204 void GLTrace_glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) {
   19205     GLMessage glmsg;
   19206     GLTraceContext *glContext = getGLTraceContext();
   19207 
   19208     glmsg.set_function(GLMessage::glDrawTexsOES);
   19209 
   19210     // copy argument x
   19211     GLMessage_DataType *arg_x = glmsg.add_args();
   19212     arg_x->set_isarray(false);
   19213     arg_x->set_type(GLMessage::DataType::INT);
   19214     arg_x->add_intvalue(x);
   19215 
   19216     // copy argument y
   19217     GLMessage_DataType *arg_y = glmsg.add_args();
   19218     arg_y->set_isarray(false);
   19219     arg_y->set_type(GLMessage::DataType::INT);
   19220     arg_y->add_intvalue(y);
   19221 
   19222     // copy argument z
   19223     GLMessage_DataType *arg_z = glmsg.add_args();
   19224     arg_z->set_isarray(false);
   19225     arg_z->set_type(GLMessage::DataType::INT);
   19226     arg_z->add_intvalue(z);
   19227 
   19228     // copy argument width
   19229     GLMessage_DataType *arg_width = glmsg.add_args();
   19230     arg_width->set_isarray(false);
   19231     arg_width->set_type(GLMessage::DataType::INT);
   19232     arg_width->add_intvalue(width);
   19233 
   19234     // copy argument height
   19235     GLMessage_DataType *arg_height = glmsg.add_args();
   19236     arg_height->set_isarray(false);
   19237     arg_height->set_type(GLMessage::DataType::INT);
   19238     arg_height->add_intvalue(height);
   19239 
   19240     // call function
   19241     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19242     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19243     glContext->hooks->gl.glDrawTexsOES(x, y, z, width, height);
   19244     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19245     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19246 
   19247     void *pointerArgs[] = {
   19248     };
   19249 
   19250     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19251                               threadStartTime, threadEndTime,
   19252                               &glmsg, pointerArgs);
   19253     glContext->traceGLMessage(&glmsg);
   19254 }
   19255 
   19256 void GLTrace_glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) {
   19257     GLMessage glmsg;
   19258     GLTraceContext *glContext = getGLTraceContext();
   19259 
   19260     glmsg.set_function(GLMessage::glDrawTexiOES);
   19261 
   19262     // copy argument x
   19263     GLMessage_DataType *arg_x = glmsg.add_args();
   19264     arg_x->set_isarray(false);
   19265     arg_x->set_type(GLMessage::DataType::INT);
   19266     arg_x->add_intvalue(x);
   19267 
   19268     // copy argument y
   19269     GLMessage_DataType *arg_y = glmsg.add_args();
   19270     arg_y->set_isarray(false);
   19271     arg_y->set_type(GLMessage::DataType::INT);
   19272     arg_y->add_intvalue(y);
   19273 
   19274     // copy argument z
   19275     GLMessage_DataType *arg_z = glmsg.add_args();
   19276     arg_z->set_isarray(false);
   19277     arg_z->set_type(GLMessage::DataType::INT);
   19278     arg_z->add_intvalue(z);
   19279 
   19280     // copy argument width
   19281     GLMessage_DataType *arg_width = glmsg.add_args();
   19282     arg_width->set_isarray(false);
   19283     arg_width->set_type(GLMessage::DataType::INT);
   19284     arg_width->add_intvalue(width);
   19285 
   19286     // copy argument height
   19287     GLMessage_DataType *arg_height = glmsg.add_args();
   19288     arg_height->set_isarray(false);
   19289     arg_height->set_type(GLMessage::DataType::INT);
   19290     arg_height->add_intvalue(height);
   19291 
   19292     // call function
   19293     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19294     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19295     glContext->hooks->gl.glDrawTexiOES(x, y, z, width, height);
   19296     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19297     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19298 
   19299     void *pointerArgs[] = {
   19300     };
   19301 
   19302     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19303                               threadStartTime, threadEndTime,
   19304                               &glmsg, pointerArgs);
   19305     glContext->traceGLMessage(&glmsg);
   19306 }
   19307 
   19308 void GLTrace_glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) {
   19309     GLMessage glmsg;
   19310     GLTraceContext *glContext = getGLTraceContext();
   19311 
   19312     glmsg.set_function(GLMessage::glDrawTexxOES);
   19313 
   19314     // copy argument x
   19315     GLMessage_DataType *arg_x = glmsg.add_args();
   19316     arg_x->set_isarray(false);
   19317     arg_x->set_type(GLMessage::DataType::INT);
   19318     arg_x->add_intvalue(x);
   19319 
   19320     // copy argument y
   19321     GLMessage_DataType *arg_y = glmsg.add_args();
   19322     arg_y->set_isarray(false);
   19323     arg_y->set_type(GLMessage::DataType::INT);
   19324     arg_y->add_intvalue(y);
   19325 
   19326     // copy argument z
   19327     GLMessage_DataType *arg_z = glmsg.add_args();
   19328     arg_z->set_isarray(false);
   19329     arg_z->set_type(GLMessage::DataType::INT);
   19330     arg_z->add_intvalue(z);
   19331 
   19332     // copy argument width
   19333     GLMessage_DataType *arg_width = glmsg.add_args();
   19334     arg_width->set_isarray(false);
   19335     arg_width->set_type(GLMessage::DataType::INT);
   19336     arg_width->add_intvalue(width);
   19337 
   19338     // copy argument height
   19339     GLMessage_DataType *arg_height = glmsg.add_args();
   19340     arg_height->set_isarray(false);
   19341     arg_height->set_type(GLMessage::DataType::INT);
   19342     arg_height->add_intvalue(height);
   19343 
   19344     // call function
   19345     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19346     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19347     glContext->hooks->gl.glDrawTexxOES(x, y, z, width, height);
   19348     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19349     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19350 
   19351     void *pointerArgs[] = {
   19352     };
   19353 
   19354     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19355                               threadStartTime, threadEndTime,
   19356                               &glmsg, pointerArgs);
   19357     glContext->traceGLMessage(&glmsg);
   19358 }
   19359 
   19360 void GLTrace_glDrawTexsvOES(const GLshort *coords) {
   19361     GLMessage glmsg;
   19362     GLTraceContext *glContext = getGLTraceContext();
   19363 
   19364     glmsg.set_function(GLMessage::glDrawTexsvOES);
   19365 
   19366     // copy argument coords
   19367     GLMessage_DataType *arg_coords = glmsg.add_args();
   19368     arg_coords->set_isarray(false);
   19369     arg_coords->set_type(GLMessage::DataType::INT);
   19370     arg_coords->add_intvalue((int)coords);
   19371 
   19372     // call function
   19373     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19374     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19375     glContext->hooks->gl.glDrawTexsvOES(coords);
   19376     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19377     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19378 
   19379     void *pointerArgs[] = {
   19380         (void *) coords,
   19381     };
   19382 
   19383     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19384                               threadStartTime, threadEndTime,
   19385                               &glmsg, pointerArgs);
   19386     glContext->traceGLMessage(&glmsg);
   19387 }
   19388 
   19389 void GLTrace_glDrawTexivOES(const GLint *coords) {
   19390     GLMessage glmsg;
   19391     GLTraceContext *glContext = getGLTraceContext();
   19392 
   19393     glmsg.set_function(GLMessage::glDrawTexivOES);
   19394 
   19395     // copy argument coords
   19396     GLMessage_DataType *arg_coords = glmsg.add_args();
   19397     arg_coords->set_isarray(false);
   19398     arg_coords->set_type(GLMessage::DataType::INT);
   19399     arg_coords->add_intvalue((int)coords);
   19400 
   19401     // call function
   19402     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19403     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19404     glContext->hooks->gl.glDrawTexivOES(coords);
   19405     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19406     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19407 
   19408     void *pointerArgs[] = {
   19409         (void *) coords,
   19410     };
   19411 
   19412     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19413                               threadStartTime, threadEndTime,
   19414                               &glmsg, pointerArgs);
   19415     glContext->traceGLMessage(&glmsg);
   19416 }
   19417 
   19418 void GLTrace_glDrawTexxvOES(const GLfixed *coords) {
   19419     GLMessage glmsg;
   19420     GLTraceContext *glContext = getGLTraceContext();
   19421 
   19422     glmsg.set_function(GLMessage::glDrawTexxvOES);
   19423 
   19424     // copy argument coords
   19425     GLMessage_DataType *arg_coords = glmsg.add_args();
   19426     arg_coords->set_isarray(false);
   19427     arg_coords->set_type(GLMessage::DataType::INT);
   19428     arg_coords->add_intvalue((int)coords);
   19429 
   19430     // call function
   19431     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19432     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19433     glContext->hooks->gl.glDrawTexxvOES(coords);
   19434     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19435     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19436 
   19437     void *pointerArgs[] = {
   19438         (void *) coords,
   19439     };
   19440 
   19441     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19442                               threadStartTime, threadEndTime,
   19443                               &glmsg, pointerArgs);
   19444     glContext->traceGLMessage(&glmsg);
   19445 }
   19446 
   19447 void GLTrace_glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) {
   19448     GLMessage glmsg;
   19449     GLTraceContext *glContext = getGLTraceContext();
   19450 
   19451     glmsg.set_function(GLMessage::glDrawTexfOES);
   19452 
   19453     // copy argument x
   19454     GLMessage_DataType *arg_x = glmsg.add_args();
   19455     arg_x->set_isarray(false);
   19456     arg_x->set_type(GLMessage::DataType::FLOAT);
   19457     arg_x->add_floatvalue(x);
   19458 
   19459     // copy argument y
   19460     GLMessage_DataType *arg_y = glmsg.add_args();
   19461     arg_y->set_isarray(false);
   19462     arg_y->set_type(GLMessage::DataType::FLOAT);
   19463     arg_y->add_floatvalue(y);
   19464 
   19465     // copy argument z
   19466     GLMessage_DataType *arg_z = glmsg.add_args();
   19467     arg_z->set_isarray(false);
   19468     arg_z->set_type(GLMessage::DataType::FLOAT);
   19469     arg_z->add_floatvalue(z);
   19470 
   19471     // copy argument width
   19472     GLMessage_DataType *arg_width = glmsg.add_args();
   19473     arg_width->set_isarray(false);
   19474     arg_width->set_type(GLMessage::DataType::FLOAT);
   19475     arg_width->add_floatvalue(width);
   19476 
   19477     // copy argument height
   19478     GLMessage_DataType *arg_height = glmsg.add_args();
   19479     arg_height->set_isarray(false);
   19480     arg_height->set_type(GLMessage::DataType::FLOAT);
   19481     arg_height->add_floatvalue(height);
   19482 
   19483     // call function
   19484     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19485     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19486     glContext->hooks->gl.glDrawTexfOES(x, y, z, width, height);
   19487     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19488     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19489 
   19490     void *pointerArgs[] = {
   19491     };
   19492 
   19493     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19494                               threadStartTime, threadEndTime,
   19495                               &glmsg, pointerArgs);
   19496     glContext->traceGLMessage(&glmsg);
   19497 }
   19498 
   19499 void GLTrace_glDrawTexfvOES(const GLfloat *coords) {
   19500     GLMessage glmsg;
   19501     GLTraceContext *glContext = getGLTraceContext();
   19502 
   19503     glmsg.set_function(GLMessage::glDrawTexfvOES);
   19504 
   19505     // copy argument coords
   19506     GLMessage_DataType *arg_coords = glmsg.add_args();
   19507     arg_coords->set_isarray(false);
   19508     arg_coords->set_type(GLMessage::DataType::INT);
   19509     arg_coords->add_intvalue((int)coords);
   19510 
   19511     // call function
   19512     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19513     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19514     glContext->hooks->gl.glDrawTexfvOES(coords);
   19515     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19516     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19517 
   19518     void *pointerArgs[] = {
   19519         (void *) coords,
   19520     };
   19521 
   19522     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19523                               threadStartTime, threadEndTime,
   19524                               &glmsg, pointerArgs);
   19525     glContext->traceGLMessage(&glmsg);
   19526 }
   19527 
   19528 void GLTrace_glAlphaFuncxOES(GLenum func, GLclampx ref) {
   19529     GLMessage glmsg;
   19530     GLTraceContext *glContext = getGLTraceContext();
   19531 
   19532     glmsg.set_function(GLMessage::glAlphaFuncxOES);
   19533 
   19534     // copy argument func
   19535     GLMessage_DataType *arg_func = glmsg.add_args();
   19536     arg_func->set_isarray(false);
   19537     arg_func->set_type(GLMessage::DataType::ENUM);
   19538     arg_func->add_intvalue((int)func);
   19539 
   19540     // copy argument ref
   19541     GLMessage_DataType *arg_ref = glmsg.add_args();
   19542     arg_ref->set_isarray(false);
   19543     arg_ref->set_type(GLMessage::DataType::INT);
   19544     arg_ref->add_intvalue(ref);
   19545 
   19546     // call function
   19547     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19548     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19549     glContext->hooks->gl.glAlphaFuncxOES(func, ref);
   19550     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19551     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19552 
   19553     void *pointerArgs[] = {
   19554     };
   19555 
   19556     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19557                               threadStartTime, threadEndTime,
   19558                               &glmsg, pointerArgs);
   19559     glContext->traceGLMessage(&glmsg);
   19560 }
   19561 
   19562 void GLTrace_glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) {
   19563     GLMessage glmsg;
   19564     GLTraceContext *glContext = getGLTraceContext();
   19565 
   19566     glmsg.set_function(GLMessage::glClearColorxOES);
   19567 
   19568     // copy argument red
   19569     GLMessage_DataType *arg_red = glmsg.add_args();
   19570     arg_red->set_isarray(false);
   19571     arg_red->set_type(GLMessage::DataType::INT);
   19572     arg_red->add_intvalue(red);
   19573 
   19574     // copy argument green
   19575     GLMessage_DataType *arg_green = glmsg.add_args();
   19576     arg_green->set_isarray(false);
   19577     arg_green->set_type(GLMessage::DataType::INT);
   19578     arg_green->add_intvalue(green);
   19579 
   19580     // copy argument blue
   19581     GLMessage_DataType *arg_blue = glmsg.add_args();
   19582     arg_blue->set_isarray(false);
   19583     arg_blue->set_type(GLMessage::DataType::INT);
   19584     arg_blue->add_intvalue(blue);
   19585 
   19586     // copy argument alpha
   19587     GLMessage_DataType *arg_alpha = glmsg.add_args();
   19588     arg_alpha->set_isarray(false);
   19589     arg_alpha->set_type(GLMessage::DataType::INT);
   19590     arg_alpha->add_intvalue(alpha);
   19591 
   19592     // call function
   19593     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19594     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19595     glContext->hooks->gl.glClearColorxOES(red, green, blue, alpha);
   19596     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19597     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19598 
   19599     void *pointerArgs[] = {
   19600     };
   19601 
   19602     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19603                               threadStartTime, threadEndTime,
   19604                               &glmsg, pointerArgs);
   19605     glContext->traceGLMessage(&glmsg);
   19606 }
   19607 
   19608 void GLTrace_glClearDepthxOES(GLclampx depth) {
   19609     GLMessage glmsg;
   19610     GLTraceContext *glContext = getGLTraceContext();
   19611 
   19612     glmsg.set_function(GLMessage::glClearDepthxOES);
   19613 
   19614     // copy argument depth
   19615     GLMessage_DataType *arg_depth = glmsg.add_args();
   19616     arg_depth->set_isarray(false);
   19617     arg_depth->set_type(GLMessage::DataType::INT);
   19618     arg_depth->add_intvalue(depth);
   19619 
   19620     // call function
   19621     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19622     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19623     glContext->hooks->gl.glClearDepthxOES(depth);
   19624     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19625     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19626 
   19627     void *pointerArgs[] = {
   19628     };
   19629 
   19630     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19631                               threadStartTime, threadEndTime,
   19632                               &glmsg, pointerArgs);
   19633     glContext->traceGLMessage(&glmsg);
   19634 }
   19635 
   19636 void GLTrace_glClipPlanexOES(GLenum plane, const GLfixed *equation) {
   19637     GLMessage glmsg;
   19638     GLTraceContext *glContext = getGLTraceContext();
   19639 
   19640     glmsg.set_function(GLMessage::glClipPlanexOES);
   19641 
   19642     // copy argument plane
   19643     GLMessage_DataType *arg_plane = glmsg.add_args();
   19644     arg_plane->set_isarray(false);
   19645     arg_plane->set_type(GLMessage::DataType::ENUM);
   19646     arg_plane->add_intvalue((int)plane);
   19647 
   19648     // copy argument equation
   19649     GLMessage_DataType *arg_equation = glmsg.add_args();
   19650     arg_equation->set_isarray(false);
   19651     arg_equation->set_type(GLMessage::DataType::INT);
   19652     arg_equation->add_intvalue((int)equation);
   19653 
   19654     // call function
   19655     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19656     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19657     glContext->hooks->gl.glClipPlanexOES(plane, equation);
   19658     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19659     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19660 
   19661     void *pointerArgs[] = {
   19662         (void *) equation,
   19663     };
   19664 
   19665     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19666                               threadStartTime, threadEndTime,
   19667                               &glmsg, pointerArgs);
   19668     glContext->traceGLMessage(&glmsg);
   19669 }
   19670 
   19671 void GLTrace_glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) {
   19672     GLMessage glmsg;
   19673     GLTraceContext *glContext = getGLTraceContext();
   19674 
   19675     glmsg.set_function(GLMessage::glColor4xOES);
   19676 
   19677     // copy argument red
   19678     GLMessage_DataType *arg_red = glmsg.add_args();
   19679     arg_red->set_isarray(false);
   19680     arg_red->set_type(GLMessage::DataType::INT);
   19681     arg_red->add_intvalue(red);
   19682 
   19683     // copy argument green
   19684     GLMessage_DataType *arg_green = glmsg.add_args();
   19685     arg_green->set_isarray(false);
   19686     arg_green->set_type(GLMessage::DataType::INT);
   19687     arg_green->add_intvalue(green);
   19688 
   19689     // copy argument blue
   19690     GLMessage_DataType *arg_blue = glmsg.add_args();
   19691     arg_blue->set_isarray(false);
   19692     arg_blue->set_type(GLMessage::DataType::INT);
   19693     arg_blue->add_intvalue(blue);
   19694 
   19695     // copy argument alpha
   19696     GLMessage_DataType *arg_alpha = glmsg.add_args();
   19697     arg_alpha->set_isarray(false);
   19698     arg_alpha->set_type(GLMessage::DataType::INT);
   19699     arg_alpha->add_intvalue(alpha);
   19700 
   19701     // call function
   19702     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19703     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19704     glContext->hooks->gl.glColor4xOES(red, green, blue, alpha);
   19705     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19706     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19707 
   19708     void *pointerArgs[] = {
   19709     };
   19710 
   19711     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19712                               threadStartTime, threadEndTime,
   19713                               &glmsg, pointerArgs);
   19714     glContext->traceGLMessage(&glmsg);
   19715 }
   19716 
   19717 void GLTrace_glDepthRangexOES(GLclampx zNear, GLclampx zFar) {
   19718     GLMessage glmsg;
   19719     GLTraceContext *glContext = getGLTraceContext();
   19720 
   19721     glmsg.set_function(GLMessage::glDepthRangexOES);
   19722 
   19723     // copy argument zNear
   19724     GLMessage_DataType *arg_zNear = glmsg.add_args();
   19725     arg_zNear->set_isarray(false);
   19726     arg_zNear->set_type(GLMessage::DataType::INT);
   19727     arg_zNear->add_intvalue(zNear);
   19728 
   19729     // copy argument zFar
   19730     GLMessage_DataType *arg_zFar = glmsg.add_args();
   19731     arg_zFar->set_isarray(false);
   19732     arg_zFar->set_type(GLMessage::DataType::INT);
   19733     arg_zFar->add_intvalue(zFar);
   19734 
   19735     // call function
   19736     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19737     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19738     glContext->hooks->gl.glDepthRangexOES(zNear, zFar);
   19739     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19740     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19741 
   19742     void *pointerArgs[] = {
   19743     };
   19744 
   19745     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19746                               threadStartTime, threadEndTime,
   19747                               &glmsg, pointerArgs);
   19748     glContext->traceGLMessage(&glmsg);
   19749 }
   19750 
   19751 void GLTrace_glFogxOES(GLenum pname, GLfixed param) {
   19752     GLMessage glmsg;
   19753     GLTraceContext *glContext = getGLTraceContext();
   19754 
   19755     glmsg.set_function(GLMessage::glFogxOES);
   19756 
   19757     // copy argument pname
   19758     GLMessage_DataType *arg_pname = glmsg.add_args();
   19759     arg_pname->set_isarray(false);
   19760     arg_pname->set_type(GLMessage::DataType::ENUM);
   19761     arg_pname->add_intvalue((int)pname);
   19762 
   19763     // copy argument param
   19764     GLMessage_DataType *arg_param = glmsg.add_args();
   19765     arg_param->set_isarray(false);
   19766     arg_param->set_type(GLMessage::DataType::INT);
   19767     arg_param->add_intvalue(param);
   19768 
   19769     // call function
   19770     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19771     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19772     glContext->hooks->gl.glFogxOES(pname, param);
   19773     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19774     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19775 
   19776     void *pointerArgs[] = {
   19777     };
   19778 
   19779     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19780                               threadStartTime, threadEndTime,
   19781                               &glmsg, pointerArgs);
   19782     glContext->traceGLMessage(&glmsg);
   19783 }
   19784 
   19785 void GLTrace_glFogxvOES(GLenum pname, const GLfixed *params) {
   19786     GLMessage glmsg;
   19787     GLTraceContext *glContext = getGLTraceContext();
   19788 
   19789     glmsg.set_function(GLMessage::glFogxvOES);
   19790 
   19791     // copy argument pname
   19792     GLMessage_DataType *arg_pname = glmsg.add_args();
   19793     arg_pname->set_isarray(false);
   19794     arg_pname->set_type(GLMessage::DataType::ENUM);
   19795     arg_pname->add_intvalue((int)pname);
   19796 
   19797     // copy argument params
   19798     GLMessage_DataType *arg_params = glmsg.add_args();
   19799     arg_params->set_isarray(false);
   19800     arg_params->set_type(GLMessage::DataType::INT);
   19801     arg_params->add_intvalue((int)params);
   19802 
   19803     // call function
   19804     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19805     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19806     glContext->hooks->gl.glFogxvOES(pname, params);
   19807     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19808     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19809 
   19810     void *pointerArgs[] = {
   19811         (void *) params,
   19812     };
   19813 
   19814     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19815                               threadStartTime, threadEndTime,
   19816                               &glmsg, pointerArgs);
   19817     glContext->traceGLMessage(&glmsg);
   19818 }
   19819 
   19820 void GLTrace_glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   19821     GLMessage glmsg;
   19822     GLTraceContext *glContext = getGLTraceContext();
   19823 
   19824     glmsg.set_function(GLMessage::glFrustumxOES);
   19825 
   19826     // copy argument left
   19827     GLMessage_DataType *arg_left = glmsg.add_args();
   19828     arg_left->set_isarray(false);
   19829     arg_left->set_type(GLMessage::DataType::INT);
   19830     arg_left->add_intvalue(left);
   19831 
   19832     // copy argument right
   19833     GLMessage_DataType *arg_right = glmsg.add_args();
   19834     arg_right->set_isarray(false);
   19835     arg_right->set_type(GLMessage::DataType::INT);
   19836     arg_right->add_intvalue(right);
   19837 
   19838     // copy argument bottom
   19839     GLMessage_DataType *arg_bottom = glmsg.add_args();
   19840     arg_bottom->set_isarray(false);
   19841     arg_bottom->set_type(GLMessage::DataType::INT);
   19842     arg_bottom->add_intvalue(bottom);
   19843 
   19844     // copy argument top
   19845     GLMessage_DataType *arg_top = glmsg.add_args();
   19846     arg_top->set_isarray(false);
   19847     arg_top->set_type(GLMessage::DataType::INT);
   19848     arg_top->add_intvalue(top);
   19849 
   19850     // copy argument zNear
   19851     GLMessage_DataType *arg_zNear = glmsg.add_args();
   19852     arg_zNear->set_isarray(false);
   19853     arg_zNear->set_type(GLMessage::DataType::INT);
   19854     arg_zNear->add_intvalue(zNear);
   19855 
   19856     // copy argument zFar
   19857     GLMessage_DataType *arg_zFar = glmsg.add_args();
   19858     arg_zFar->set_isarray(false);
   19859     arg_zFar->set_type(GLMessage::DataType::INT);
   19860     arg_zFar->add_intvalue(zFar);
   19861 
   19862     // call function
   19863     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19864     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19865     glContext->hooks->gl.glFrustumxOES(left, right, bottom, top, zNear, zFar);
   19866     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19867     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19868 
   19869     void *pointerArgs[] = {
   19870     };
   19871 
   19872     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19873                               threadStartTime, threadEndTime,
   19874                               &glmsg, pointerArgs);
   19875     glContext->traceGLMessage(&glmsg);
   19876 }
   19877 
   19878 void GLTrace_glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) {
   19879     GLMessage glmsg;
   19880     GLTraceContext *glContext = getGLTraceContext();
   19881 
   19882     glmsg.set_function(GLMessage::glGetClipPlanexOES);
   19883 
   19884     // copy argument pname
   19885     GLMessage_DataType *arg_pname = glmsg.add_args();
   19886     arg_pname->set_isarray(false);
   19887     arg_pname->set_type(GLMessage::DataType::ENUM);
   19888     arg_pname->add_intvalue((int)pname);
   19889 
   19890     // copy argument eqn
   19891     GLMessage_DataType *arg_eqn = glmsg.add_args();
   19892     arg_eqn->set_isarray(false);
   19893     arg_eqn->set_type(GLMessage::DataType::INT);
   19894     arg_eqn->add_intvalue((int)eqn);
   19895 
   19896     // call function
   19897     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19898     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19899     glContext->hooks->gl.glGetClipPlanexOES(pname, eqn);
   19900     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19901     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19902 
   19903     void *pointerArgs[] = {
   19904         (void *) eqn,
   19905     };
   19906 
   19907     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19908                               threadStartTime, threadEndTime,
   19909                               &glmsg, pointerArgs);
   19910     glContext->traceGLMessage(&glmsg);
   19911 }
   19912 
   19913 void GLTrace_glGetFixedvOES(GLenum pname, GLfixed *params) {
   19914     GLMessage glmsg;
   19915     GLTraceContext *glContext = getGLTraceContext();
   19916 
   19917     glmsg.set_function(GLMessage::glGetFixedvOES);
   19918 
   19919     // copy argument pname
   19920     GLMessage_DataType *arg_pname = glmsg.add_args();
   19921     arg_pname->set_isarray(false);
   19922     arg_pname->set_type(GLMessage::DataType::ENUM);
   19923     arg_pname->add_intvalue((int)pname);
   19924 
   19925     // copy argument params
   19926     GLMessage_DataType *arg_params = glmsg.add_args();
   19927     arg_params->set_isarray(false);
   19928     arg_params->set_type(GLMessage::DataType::INT);
   19929     arg_params->add_intvalue((int)params);
   19930 
   19931     // call function
   19932     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19933     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19934     glContext->hooks->gl.glGetFixedvOES(pname, params);
   19935     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19936     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19937 
   19938     void *pointerArgs[] = {
   19939         (void *) params,
   19940     };
   19941 
   19942     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19943                               threadStartTime, threadEndTime,
   19944                               &glmsg, pointerArgs);
   19945     glContext->traceGLMessage(&glmsg);
   19946 }
   19947 
   19948 void GLTrace_glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) {
   19949     GLMessage glmsg;
   19950     GLTraceContext *glContext = getGLTraceContext();
   19951 
   19952     glmsg.set_function(GLMessage::glGetLightxvOES);
   19953 
   19954     // copy argument light
   19955     GLMessage_DataType *arg_light = glmsg.add_args();
   19956     arg_light->set_isarray(false);
   19957     arg_light->set_type(GLMessage::DataType::ENUM);
   19958     arg_light->add_intvalue((int)light);
   19959 
   19960     // copy argument pname
   19961     GLMessage_DataType *arg_pname = glmsg.add_args();
   19962     arg_pname->set_isarray(false);
   19963     arg_pname->set_type(GLMessage::DataType::ENUM);
   19964     arg_pname->add_intvalue((int)pname);
   19965 
   19966     // copy argument params
   19967     GLMessage_DataType *arg_params = glmsg.add_args();
   19968     arg_params->set_isarray(false);
   19969     arg_params->set_type(GLMessage::DataType::INT);
   19970     arg_params->add_intvalue((int)params);
   19971 
   19972     // call function
   19973     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19974     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   19975     glContext->hooks->gl.glGetLightxvOES(light, pname, params);
   19976     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   19977     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   19978 
   19979     void *pointerArgs[] = {
   19980         (void *) params,
   19981     };
   19982 
   19983     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   19984                               threadStartTime, threadEndTime,
   19985                               &glmsg, pointerArgs);
   19986     glContext->traceGLMessage(&glmsg);
   19987 }
   19988 
   19989 void GLTrace_glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) {
   19990     GLMessage glmsg;
   19991     GLTraceContext *glContext = getGLTraceContext();
   19992 
   19993     glmsg.set_function(GLMessage::glGetMaterialxvOES);
   19994 
   19995     // copy argument face
   19996     GLMessage_DataType *arg_face = glmsg.add_args();
   19997     arg_face->set_isarray(false);
   19998     arg_face->set_type(GLMessage::DataType::ENUM);
   19999     arg_face->add_intvalue((int)face);
   20000 
   20001     // copy argument pname
   20002     GLMessage_DataType *arg_pname = glmsg.add_args();
   20003     arg_pname->set_isarray(false);
   20004     arg_pname->set_type(GLMessage::DataType::ENUM);
   20005     arg_pname->add_intvalue((int)pname);
   20006 
   20007     // copy argument params
   20008     GLMessage_DataType *arg_params = glmsg.add_args();
   20009     arg_params->set_isarray(false);
   20010     arg_params->set_type(GLMessage::DataType::INT);
   20011     arg_params->add_intvalue((int)params);
   20012 
   20013     // call function
   20014     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20015     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20016     glContext->hooks->gl.glGetMaterialxvOES(face, pname, params);
   20017     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20018     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20019 
   20020     void *pointerArgs[] = {
   20021         (void *) params,
   20022     };
   20023 
   20024     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20025                               threadStartTime, threadEndTime,
   20026                               &glmsg, pointerArgs);
   20027     glContext->traceGLMessage(&glmsg);
   20028 }
   20029 
   20030 void GLTrace_glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) {
   20031     GLMessage glmsg;
   20032     GLTraceContext *glContext = getGLTraceContext();
   20033 
   20034     glmsg.set_function(GLMessage::glGetTexEnvxvOES);
   20035 
   20036     // copy argument env
   20037     GLMessage_DataType *arg_env = glmsg.add_args();
   20038     arg_env->set_isarray(false);
   20039     arg_env->set_type(GLMessage::DataType::ENUM);
   20040     arg_env->add_intvalue((int)env);
   20041 
   20042     // copy argument pname
   20043     GLMessage_DataType *arg_pname = glmsg.add_args();
   20044     arg_pname->set_isarray(false);
   20045     arg_pname->set_type(GLMessage::DataType::ENUM);
   20046     arg_pname->add_intvalue((int)pname);
   20047 
   20048     // copy argument params
   20049     GLMessage_DataType *arg_params = glmsg.add_args();
   20050     arg_params->set_isarray(false);
   20051     arg_params->set_type(GLMessage::DataType::INT);
   20052     arg_params->add_intvalue((int)params);
   20053 
   20054     // call function
   20055     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20056     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20057     glContext->hooks->gl.glGetTexEnvxvOES(env, pname, params);
   20058     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20059     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20060 
   20061     void *pointerArgs[] = {
   20062         (void *) params,
   20063     };
   20064 
   20065     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20066                               threadStartTime, threadEndTime,
   20067                               &glmsg, pointerArgs);
   20068     glContext->traceGLMessage(&glmsg);
   20069 }
   20070 
   20071 void GLTrace_glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) {
   20072     GLMessage glmsg;
   20073     GLTraceContext *glContext = getGLTraceContext();
   20074 
   20075     glmsg.set_function(GLMessage::glGetTexParameterxvOES);
   20076 
   20077     // copy argument target
   20078     GLMessage_DataType *arg_target = glmsg.add_args();
   20079     arg_target->set_isarray(false);
   20080     arg_target->set_type(GLMessage::DataType::ENUM);
   20081     arg_target->add_intvalue((int)target);
   20082 
   20083     // copy argument pname
   20084     GLMessage_DataType *arg_pname = glmsg.add_args();
   20085     arg_pname->set_isarray(false);
   20086     arg_pname->set_type(GLMessage::DataType::ENUM);
   20087     arg_pname->add_intvalue((int)pname);
   20088 
   20089     // copy argument params
   20090     GLMessage_DataType *arg_params = glmsg.add_args();
   20091     arg_params->set_isarray(false);
   20092     arg_params->set_type(GLMessage::DataType::INT);
   20093     arg_params->add_intvalue((int)params);
   20094 
   20095     // call function
   20096     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20097     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20098     glContext->hooks->gl.glGetTexParameterxvOES(target, pname, params);
   20099     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20100     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20101 
   20102     void *pointerArgs[] = {
   20103         (void *) params,
   20104     };
   20105 
   20106     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20107                               threadStartTime, threadEndTime,
   20108                               &glmsg, pointerArgs);
   20109     glContext->traceGLMessage(&glmsg);
   20110 }
   20111 
   20112 void GLTrace_glLightModelxOES(GLenum pname, GLfixed param) {
   20113     GLMessage glmsg;
   20114     GLTraceContext *glContext = getGLTraceContext();
   20115 
   20116     glmsg.set_function(GLMessage::glLightModelxOES);
   20117 
   20118     // copy argument pname
   20119     GLMessage_DataType *arg_pname = glmsg.add_args();
   20120     arg_pname->set_isarray(false);
   20121     arg_pname->set_type(GLMessage::DataType::ENUM);
   20122     arg_pname->add_intvalue((int)pname);
   20123 
   20124     // copy argument param
   20125     GLMessage_DataType *arg_param = glmsg.add_args();
   20126     arg_param->set_isarray(false);
   20127     arg_param->set_type(GLMessage::DataType::INT);
   20128     arg_param->add_intvalue(param);
   20129 
   20130     // call function
   20131     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20132     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20133     glContext->hooks->gl.glLightModelxOES(pname, param);
   20134     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20135     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20136 
   20137     void *pointerArgs[] = {
   20138     };
   20139 
   20140     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20141                               threadStartTime, threadEndTime,
   20142                               &glmsg, pointerArgs);
   20143     glContext->traceGLMessage(&glmsg);
   20144 }
   20145 
   20146 void GLTrace_glLightModelxvOES(GLenum pname, const GLfixed *params) {
   20147     GLMessage glmsg;
   20148     GLTraceContext *glContext = getGLTraceContext();
   20149 
   20150     glmsg.set_function(GLMessage::glLightModelxvOES);
   20151 
   20152     // copy argument pname
   20153     GLMessage_DataType *arg_pname = glmsg.add_args();
   20154     arg_pname->set_isarray(false);
   20155     arg_pname->set_type(GLMessage::DataType::ENUM);
   20156     arg_pname->add_intvalue((int)pname);
   20157 
   20158     // copy argument params
   20159     GLMessage_DataType *arg_params = glmsg.add_args();
   20160     arg_params->set_isarray(false);
   20161     arg_params->set_type(GLMessage::DataType::INT);
   20162     arg_params->add_intvalue((int)params);
   20163 
   20164     // call function
   20165     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20166     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20167     glContext->hooks->gl.glLightModelxvOES(pname, params);
   20168     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20169     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20170 
   20171     void *pointerArgs[] = {
   20172         (void *) params,
   20173     };
   20174 
   20175     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20176                               threadStartTime, threadEndTime,
   20177                               &glmsg, pointerArgs);
   20178     glContext->traceGLMessage(&glmsg);
   20179 }
   20180 
   20181 void GLTrace_glLightxOES(GLenum light, GLenum pname, GLfixed param) {
   20182     GLMessage glmsg;
   20183     GLTraceContext *glContext = getGLTraceContext();
   20184 
   20185     glmsg.set_function(GLMessage::glLightxOES);
   20186 
   20187     // copy argument light
   20188     GLMessage_DataType *arg_light = glmsg.add_args();
   20189     arg_light->set_isarray(false);
   20190     arg_light->set_type(GLMessage::DataType::ENUM);
   20191     arg_light->add_intvalue((int)light);
   20192 
   20193     // copy argument pname
   20194     GLMessage_DataType *arg_pname = glmsg.add_args();
   20195     arg_pname->set_isarray(false);
   20196     arg_pname->set_type(GLMessage::DataType::ENUM);
   20197     arg_pname->add_intvalue((int)pname);
   20198 
   20199     // copy argument param
   20200     GLMessage_DataType *arg_param = glmsg.add_args();
   20201     arg_param->set_isarray(false);
   20202     arg_param->set_type(GLMessage::DataType::INT);
   20203     arg_param->add_intvalue(param);
   20204 
   20205     // call function
   20206     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20207     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20208     glContext->hooks->gl.glLightxOES(light, pname, param);
   20209     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20210     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20211 
   20212     void *pointerArgs[] = {
   20213     };
   20214 
   20215     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20216                               threadStartTime, threadEndTime,
   20217                               &glmsg, pointerArgs);
   20218     glContext->traceGLMessage(&glmsg);
   20219 }
   20220 
   20221 void GLTrace_glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) {
   20222     GLMessage glmsg;
   20223     GLTraceContext *glContext = getGLTraceContext();
   20224 
   20225     glmsg.set_function(GLMessage::glLightxvOES);
   20226 
   20227     // copy argument light
   20228     GLMessage_DataType *arg_light = glmsg.add_args();
   20229     arg_light->set_isarray(false);
   20230     arg_light->set_type(GLMessage::DataType::ENUM);
   20231     arg_light->add_intvalue((int)light);
   20232 
   20233     // copy argument pname
   20234     GLMessage_DataType *arg_pname = glmsg.add_args();
   20235     arg_pname->set_isarray(false);
   20236     arg_pname->set_type(GLMessage::DataType::ENUM);
   20237     arg_pname->add_intvalue((int)pname);
   20238 
   20239     // copy argument params
   20240     GLMessage_DataType *arg_params = glmsg.add_args();
   20241     arg_params->set_isarray(false);
   20242     arg_params->set_type(GLMessage::DataType::INT);
   20243     arg_params->add_intvalue((int)params);
   20244 
   20245     // call function
   20246     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20247     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20248     glContext->hooks->gl.glLightxvOES(light, pname, params);
   20249     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20250     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20251 
   20252     void *pointerArgs[] = {
   20253         (void *) params,
   20254     };
   20255 
   20256     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20257                               threadStartTime, threadEndTime,
   20258                               &glmsg, pointerArgs);
   20259     glContext->traceGLMessage(&glmsg);
   20260 }
   20261 
   20262 void GLTrace_glLineWidthxOES(GLfixed width) {
   20263     GLMessage glmsg;
   20264     GLTraceContext *glContext = getGLTraceContext();
   20265 
   20266     glmsg.set_function(GLMessage::glLineWidthxOES);
   20267 
   20268     // copy argument width
   20269     GLMessage_DataType *arg_width = glmsg.add_args();
   20270     arg_width->set_isarray(false);
   20271     arg_width->set_type(GLMessage::DataType::INT);
   20272     arg_width->add_intvalue(width);
   20273 
   20274     // call function
   20275     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20276     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20277     glContext->hooks->gl.glLineWidthxOES(width);
   20278     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20279     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20280 
   20281     void *pointerArgs[] = {
   20282     };
   20283 
   20284     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20285                               threadStartTime, threadEndTime,
   20286                               &glmsg, pointerArgs);
   20287     glContext->traceGLMessage(&glmsg);
   20288 }
   20289 
   20290 void GLTrace_glLoadMatrixxOES(const GLfixed *m) {
   20291     GLMessage glmsg;
   20292     GLTraceContext *glContext = getGLTraceContext();
   20293 
   20294     glmsg.set_function(GLMessage::glLoadMatrixxOES);
   20295 
   20296     // copy argument m
   20297     GLMessage_DataType *arg_m = glmsg.add_args();
   20298     arg_m->set_isarray(false);
   20299     arg_m->set_type(GLMessage::DataType::INT);
   20300     arg_m->add_intvalue((int)m);
   20301 
   20302     // call function
   20303     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20304     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20305     glContext->hooks->gl.glLoadMatrixxOES(m);
   20306     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20307     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20308 
   20309     void *pointerArgs[] = {
   20310         (void *) m,
   20311     };
   20312 
   20313     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20314                               threadStartTime, threadEndTime,
   20315                               &glmsg, pointerArgs);
   20316     glContext->traceGLMessage(&glmsg);
   20317 }
   20318 
   20319 void GLTrace_glMaterialxOES(GLenum face, GLenum pname, GLfixed param) {
   20320     GLMessage glmsg;
   20321     GLTraceContext *glContext = getGLTraceContext();
   20322 
   20323     glmsg.set_function(GLMessage::glMaterialxOES);
   20324 
   20325     // copy argument face
   20326     GLMessage_DataType *arg_face = glmsg.add_args();
   20327     arg_face->set_isarray(false);
   20328     arg_face->set_type(GLMessage::DataType::ENUM);
   20329     arg_face->add_intvalue((int)face);
   20330 
   20331     // copy argument pname
   20332     GLMessage_DataType *arg_pname = glmsg.add_args();
   20333     arg_pname->set_isarray(false);
   20334     arg_pname->set_type(GLMessage::DataType::ENUM);
   20335     arg_pname->add_intvalue((int)pname);
   20336 
   20337     // copy argument param
   20338     GLMessage_DataType *arg_param = glmsg.add_args();
   20339     arg_param->set_isarray(false);
   20340     arg_param->set_type(GLMessage::DataType::INT);
   20341     arg_param->add_intvalue(param);
   20342 
   20343     // call function
   20344     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20345     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20346     glContext->hooks->gl.glMaterialxOES(face, pname, param);
   20347     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20348     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20349 
   20350     void *pointerArgs[] = {
   20351     };
   20352 
   20353     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20354                               threadStartTime, threadEndTime,
   20355                               &glmsg, pointerArgs);
   20356     glContext->traceGLMessage(&glmsg);
   20357 }
   20358 
   20359 void GLTrace_glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) {
   20360     GLMessage glmsg;
   20361     GLTraceContext *glContext = getGLTraceContext();
   20362 
   20363     glmsg.set_function(GLMessage::glMaterialxvOES);
   20364 
   20365     // copy argument face
   20366     GLMessage_DataType *arg_face = glmsg.add_args();
   20367     arg_face->set_isarray(false);
   20368     arg_face->set_type(GLMessage::DataType::ENUM);
   20369     arg_face->add_intvalue((int)face);
   20370 
   20371     // copy argument pname
   20372     GLMessage_DataType *arg_pname = glmsg.add_args();
   20373     arg_pname->set_isarray(false);
   20374     arg_pname->set_type(GLMessage::DataType::ENUM);
   20375     arg_pname->add_intvalue((int)pname);
   20376 
   20377     // copy argument params
   20378     GLMessage_DataType *arg_params = glmsg.add_args();
   20379     arg_params->set_isarray(false);
   20380     arg_params->set_type(GLMessage::DataType::INT);
   20381     arg_params->add_intvalue((int)params);
   20382 
   20383     // call function
   20384     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20385     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20386     glContext->hooks->gl.glMaterialxvOES(face, pname, params);
   20387     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20388     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20389 
   20390     void *pointerArgs[] = {
   20391         (void *) params,
   20392     };
   20393 
   20394     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20395                               threadStartTime, threadEndTime,
   20396                               &glmsg, pointerArgs);
   20397     glContext->traceGLMessage(&glmsg);
   20398 }
   20399 
   20400 void GLTrace_glMultMatrixxOES(const GLfixed *m) {
   20401     GLMessage glmsg;
   20402     GLTraceContext *glContext = getGLTraceContext();
   20403 
   20404     glmsg.set_function(GLMessage::glMultMatrixxOES);
   20405 
   20406     // copy argument m
   20407     GLMessage_DataType *arg_m = glmsg.add_args();
   20408     arg_m->set_isarray(false);
   20409     arg_m->set_type(GLMessage::DataType::INT);
   20410     arg_m->add_intvalue((int)m);
   20411 
   20412     // call function
   20413     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20414     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20415     glContext->hooks->gl.glMultMatrixxOES(m);
   20416     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20417     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20418 
   20419     void *pointerArgs[] = {
   20420         (void *) m,
   20421     };
   20422 
   20423     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20424                               threadStartTime, threadEndTime,
   20425                               &glmsg, pointerArgs);
   20426     glContext->traceGLMessage(&glmsg);
   20427 }
   20428 
   20429 void GLTrace_glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) {
   20430     GLMessage glmsg;
   20431     GLTraceContext *glContext = getGLTraceContext();
   20432 
   20433     glmsg.set_function(GLMessage::glMultiTexCoord4xOES);
   20434 
   20435     // copy argument target
   20436     GLMessage_DataType *arg_target = glmsg.add_args();
   20437     arg_target->set_isarray(false);
   20438     arg_target->set_type(GLMessage::DataType::ENUM);
   20439     arg_target->add_intvalue((int)target);
   20440 
   20441     // copy argument s
   20442     GLMessage_DataType *arg_s = glmsg.add_args();
   20443     arg_s->set_isarray(false);
   20444     arg_s->set_type(GLMessage::DataType::INT);
   20445     arg_s->add_intvalue(s);
   20446 
   20447     // copy argument t
   20448     GLMessage_DataType *arg_t = glmsg.add_args();
   20449     arg_t->set_isarray(false);
   20450     arg_t->set_type(GLMessage::DataType::INT);
   20451     arg_t->add_intvalue(t);
   20452 
   20453     // copy argument r
   20454     GLMessage_DataType *arg_r = glmsg.add_args();
   20455     arg_r->set_isarray(false);
   20456     arg_r->set_type(GLMessage::DataType::INT);
   20457     arg_r->add_intvalue(r);
   20458 
   20459     // copy argument q
   20460     GLMessage_DataType *arg_q = glmsg.add_args();
   20461     arg_q->set_isarray(false);
   20462     arg_q->set_type(GLMessage::DataType::INT);
   20463     arg_q->add_intvalue(q);
   20464 
   20465     // call function
   20466     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20467     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20468     glContext->hooks->gl.glMultiTexCoord4xOES(target, s, t, r, q);
   20469     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20470     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20471 
   20472     void *pointerArgs[] = {
   20473     };
   20474 
   20475     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20476                               threadStartTime, threadEndTime,
   20477                               &glmsg, pointerArgs);
   20478     glContext->traceGLMessage(&glmsg);
   20479 }
   20480 
   20481 void GLTrace_glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz) {
   20482     GLMessage glmsg;
   20483     GLTraceContext *glContext = getGLTraceContext();
   20484 
   20485     glmsg.set_function(GLMessage::glNormal3xOES);
   20486 
   20487     // copy argument nx
   20488     GLMessage_DataType *arg_nx = glmsg.add_args();
   20489     arg_nx->set_isarray(false);
   20490     arg_nx->set_type(GLMessage::DataType::INT);
   20491     arg_nx->add_intvalue(nx);
   20492 
   20493     // copy argument ny
   20494     GLMessage_DataType *arg_ny = glmsg.add_args();
   20495     arg_ny->set_isarray(false);
   20496     arg_ny->set_type(GLMessage::DataType::INT);
   20497     arg_ny->add_intvalue(ny);
   20498 
   20499     // copy argument nz
   20500     GLMessage_DataType *arg_nz = glmsg.add_args();
   20501     arg_nz->set_isarray(false);
   20502     arg_nz->set_type(GLMessage::DataType::INT);
   20503     arg_nz->add_intvalue(nz);
   20504 
   20505     // call function
   20506     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20507     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20508     glContext->hooks->gl.glNormal3xOES(nx, ny, nz);
   20509     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20510     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20511 
   20512     void *pointerArgs[] = {
   20513     };
   20514 
   20515     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20516                               threadStartTime, threadEndTime,
   20517                               &glmsg, pointerArgs);
   20518     glContext->traceGLMessage(&glmsg);
   20519 }
   20520 
   20521 void GLTrace_glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) {
   20522     GLMessage glmsg;
   20523     GLTraceContext *glContext = getGLTraceContext();
   20524 
   20525     glmsg.set_function(GLMessage::glOrthoxOES);
   20526 
   20527     // copy argument left
   20528     GLMessage_DataType *arg_left = glmsg.add_args();
   20529     arg_left->set_isarray(false);
   20530     arg_left->set_type(GLMessage::DataType::INT);
   20531     arg_left->add_intvalue(left);
   20532 
   20533     // copy argument right
   20534     GLMessage_DataType *arg_right = glmsg.add_args();
   20535     arg_right->set_isarray(false);
   20536     arg_right->set_type(GLMessage::DataType::INT);
   20537     arg_right->add_intvalue(right);
   20538 
   20539     // copy argument bottom
   20540     GLMessage_DataType *arg_bottom = glmsg.add_args();
   20541     arg_bottom->set_isarray(false);
   20542     arg_bottom->set_type(GLMessage::DataType::INT);
   20543     arg_bottom->add_intvalue(bottom);
   20544 
   20545     // copy argument top
   20546     GLMessage_DataType *arg_top = glmsg.add_args();
   20547     arg_top->set_isarray(false);
   20548     arg_top->set_type(GLMessage::DataType::INT);
   20549     arg_top->add_intvalue(top);
   20550 
   20551     // copy argument zNear
   20552     GLMessage_DataType *arg_zNear = glmsg.add_args();
   20553     arg_zNear->set_isarray(false);
   20554     arg_zNear->set_type(GLMessage::DataType::INT);
   20555     arg_zNear->add_intvalue(zNear);
   20556 
   20557     // copy argument zFar
   20558     GLMessage_DataType *arg_zFar = glmsg.add_args();
   20559     arg_zFar->set_isarray(false);
   20560     arg_zFar->set_type(GLMessage::DataType::INT);
   20561     arg_zFar->add_intvalue(zFar);
   20562 
   20563     // call function
   20564     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20565     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20566     glContext->hooks->gl.glOrthoxOES(left, right, bottom, top, zNear, zFar);
   20567     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20568     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20569 
   20570     void *pointerArgs[] = {
   20571     };
   20572 
   20573     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20574                               threadStartTime, threadEndTime,
   20575                               &glmsg, pointerArgs);
   20576     glContext->traceGLMessage(&glmsg);
   20577 }
   20578 
   20579 void GLTrace_glPointParameterxOES(GLenum pname, GLfixed param) {
   20580     GLMessage glmsg;
   20581     GLTraceContext *glContext = getGLTraceContext();
   20582 
   20583     glmsg.set_function(GLMessage::glPointParameterxOES);
   20584 
   20585     // copy argument pname
   20586     GLMessage_DataType *arg_pname = glmsg.add_args();
   20587     arg_pname->set_isarray(false);
   20588     arg_pname->set_type(GLMessage::DataType::ENUM);
   20589     arg_pname->add_intvalue((int)pname);
   20590 
   20591     // copy argument param
   20592     GLMessage_DataType *arg_param = glmsg.add_args();
   20593     arg_param->set_isarray(false);
   20594     arg_param->set_type(GLMessage::DataType::INT);
   20595     arg_param->add_intvalue(param);
   20596 
   20597     // call function
   20598     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20599     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20600     glContext->hooks->gl.glPointParameterxOES(pname, param);
   20601     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20602     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20603 
   20604     void *pointerArgs[] = {
   20605     };
   20606 
   20607     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20608                               threadStartTime, threadEndTime,
   20609                               &glmsg, pointerArgs);
   20610     glContext->traceGLMessage(&glmsg);
   20611 }
   20612 
   20613 void GLTrace_glPointParameterxvOES(GLenum pname, const GLfixed *params) {
   20614     GLMessage glmsg;
   20615     GLTraceContext *glContext = getGLTraceContext();
   20616 
   20617     glmsg.set_function(GLMessage::glPointParameterxvOES);
   20618 
   20619     // copy argument pname
   20620     GLMessage_DataType *arg_pname = glmsg.add_args();
   20621     arg_pname->set_isarray(false);
   20622     arg_pname->set_type(GLMessage::DataType::ENUM);
   20623     arg_pname->add_intvalue((int)pname);
   20624 
   20625     // copy argument params
   20626     GLMessage_DataType *arg_params = glmsg.add_args();
   20627     arg_params->set_isarray(false);
   20628     arg_params->set_type(GLMessage::DataType::INT);
   20629     arg_params->add_intvalue((int)params);
   20630 
   20631     // call function
   20632     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20633     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20634     glContext->hooks->gl.glPointParameterxvOES(pname, params);
   20635     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20636     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20637 
   20638     void *pointerArgs[] = {
   20639         (void *) params,
   20640     };
   20641 
   20642     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20643                               threadStartTime, threadEndTime,
   20644                               &glmsg, pointerArgs);
   20645     glContext->traceGLMessage(&glmsg);
   20646 }
   20647 
   20648 void GLTrace_glPointSizexOES(GLfixed size) {
   20649     GLMessage glmsg;
   20650     GLTraceContext *glContext = getGLTraceContext();
   20651 
   20652     glmsg.set_function(GLMessage::glPointSizexOES);
   20653 
   20654     // copy argument size
   20655     GLMessage_DataType *arg_size = glmsg.add_args();
   20656     arg_size->set_isarray(false);
   20657     arg_size->set_type(GLMessage::DataType::INT);
   20658     arg_size->add_intvalue(size);
   20659 
   20660     // call function
   20661     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20662     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20663     glContext->hooks->gl.glPointSizexOES(size);
   20664     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20665     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20666 
   20667     void *pointerArgs[] = {
   20668     };
   20669 
   20670     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20671                               threadStartTime, threadEndTime,
   20672                               &glmsg, pointerArgs);
   20673     glContext->traceGLMessage(&glmsg);
   20674 }
   20675 
   20676 void GLTrace_glPolygonOffsetxOES(GLfixed factor, GLfixed units) {
   20677     GLMessage glmsg;
   20678     GLTraceContext *glContext = getGLTraceContext();
   20679 
   20680     glmsg.set_function(GLMessage::glPolygonOffsetxOES);
   20681 
   20682     // copy argument factor
   20683     GLMessage_DataType *arg_factor = glmsg.add_args();
   20684     arg_factor->set_isarray(false);
   20685     arg_factor->set_type(GLMessage::DataType::INT);
   20686     arg_factor->add_intvalue(factor);
   20687 
   20688     // copy argument units
   20689     GLMessage_DataType *arg_units = glmsg.add_args();
   20690     arg_units->set_isarray(false);
   20691     arg_units->set_type(GLMessage::DataType::INT);
   20692     arg_units->add_intvalue(units);
   20693 
   20694     // call function
   20695     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20696     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20697     glContext->hooks->gl.glPolygonOffsetxOES(factor, units);
   20698     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20699     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20700 
   20701     void *pointerArgs[] = {
   20702     };
   20703 
   20704     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20705                               threadStartTime, threadEndTime,
   20706                               &glmsg, pointerArgs);
   20707     glContext->traceGLMessage(&glmsg);
   20708 }
   20709 
   20710 void GLTrace_glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) {
   20711     GLMessage glmsg;
   20712     GLTraceContext *glContext = getGLTraceContext();
   20713 
   20714     glmsg.set_function(GLMessage::glRotatexOES);
   20715 
   20716     // copy argument angle
   20717     GLMessage_DataType *arg_angle = glmsg.add_args();
   20718     arg_angle->set_isarray(false);
   20719     arg_angle->set_type(GLMessage::DataType::INT);
   20720     arg_angle->add_intvalue(angle);
   20721 
   20722     // copy argument x
   20723     GLMessage_DataType *arg_x = glmsg.add_args();
   20724     arg_x->set_isarray(false);
   20725     arg_x->set_type(GLMessage::DataType::INT);
   20726     arg_x->add_intvalue(x);
   20727 
   20728     // copy argument y
   20729     GLMessage_DataType *arg_y = glmsg.add_args();
   20730     arg_y->set_isarray(false);
   20731     arg_y->set_type(GLMessage::DataType::INT);
   20732     arg_y->add_intvalue(y);
   20733 
   20734     // copy argument z
   20735     GLMessage_DataType *arg_z = glmsg.add_args();
   20736     arg_z->set_isarray(false);
   20737     arg_z->set_type(GLMessage::DataType::INT);
   20738     arg_z->add_intvalue(z);
   20739 
   20740     // call function
   20741     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20742     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20743     glContext->hooks->gl.glRotatexOES(angle, x, y, z);
   20744     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20745     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20746 
   20747     void *pointerArgs[] = {
   20748     };
   20749 
   20750     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20751                               threadStartTime, threadEndTime,
   20752                               &glmsg, pointerArgs);
   20753     glContext->traceGLMessage(&glmsg);
   20754 }
   20755 
   20756 void GLTrace_glSampleCoveragexOES(GLclampx value, GLboolean invert) {
   20757     GLMessage glmsg;
   20758     GLTraceContext *glContext = getGLTraceContext();
   20759 
   20760     glmsg.set_function(GLMessage::glSampleCoveragexOES);
   20761 
   20762     // copy argument value
   20763     GLMessage_DataType *arg_value = glmsg.add_args();
   20764     arg_value->set_isarray(false);
   20765     arg_value->set_type(GLMessage::DataType::INT);
   20766     arg_value->add_intvalue(value);
   20767 
   20768     // copy argument invert
   20769     GLMessage_DataType *arg_invert = glmsg.add_args();
   20770     arg_invert->set_isarray(false);
   20771     arg_invert->set_type(GLMessage::DataType::BOOL);
   20772     arg_invert->add_boolvalue(invert);
   20773 
   20774     // call function
   20775     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20776     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20777     glContext->hooks->gl.glSampleCoveragexOES(value, invert);
   20778     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20779     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20780 
   20781     void *pointerArgs[] = {
   20782     };
   20783 
   20784     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20785                               threadStartTime, threadEndTime,
   20786                               &glmsg, pointerArgs);
   20787     glContext->traceGLMessage(&glmsg);
   20788 }
   20789 
   20790 void GLTrace_glScalexOES(GLfixed x, GLfixed y, GLfixed z) {
   20791     GLMessage glmsg;
   20792     GLTraceContext *glContext = getGLTraceContext();
   20793 
   20794     glmsg.set_function(GLMessage::glScalexOES);
   20795 
   20796     // copy argument x
   20797     GLMessage_DataType *arg_x = glmsg.add_args();
   20798     arg_x->set_isarray(false);
   20799     arg_x->set_type(GLMessage::DataType::INT);
   20800     arg_x->add_intvalue(x);
   20801 
   20802     // copy argument y
   20803     GLMessage_DataType *arg_y = glmsg.add_args();
   20804     arg_y->set_isarray(false);
   20805     arg_y->set_type(GLMessage::DataType::INT);
   20806     arg_y->add_intvalue(y);
   20807 
   20808     // copy argument z
   20809     GLMessage_DataType *arg_z = glmsg.add_args();
   20810     arg_z->set_isarray(false);
   20811     arg_z->set_type(GLMessage::DataType::INT);
   20812     arg_z->add_intvalue(z);
   20813 
   20814     // call function
   20815     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20816     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20817     glContext->hooks->gl.glScalexOES(x, y, z);
   20818     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20819     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20820 
   20821     void *pointerArgs[] = {
   20822     };
   20823 
   20824     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20825                               threadStartTime, threadEndTime,
   20826                               &glmsg, pointerArgs);
   20827     glContext->traceGLMessage(&glmsg);
   20828 }
   20829 
   20830 void GLTrace_glTexEnvxOES(GLenum target, GLenum pname, GLfixed param) {
   20831     GLMessage glmsg;
   20832     GLTraceContext *glContext = getGLTraceContext();
   20833 
   20834     glmsg.set_function(GLMessage::glTexEnvxOES);
   20835 
   20836     // copy argument target
   20837     GLMessage_DataType *arg_target = glmsg.add_args();
   20838     arg_target->set_isarray(false);
   20839     arg_target->set_type(GLMessage::DataType::ENUM);
   20840     arg_target->add_intvalue((int)target);
   20841 
   20842     // copy argument pname
   20843     GLMessage_DataType *arg_pname = glmsg.add_args();
   20844     arg_pname->set_isarray(false);
   20845     arg_pname->set_type(GLMessage::DataType::ENUM);
   20846     arg_pname->add_intvalue((int)pname);
   20847 
   20848     // copy argument param
   20849     GLMessage_DataType *arg_param = glmsg.add_args();
   20850     arg_param->set_isarray(false);
   20851     arg_param->set_type(GLMessage::DataType::INT);
   20852     arg_param->add_intvalue(param);
   20853 
   20854     // call function
   20855     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20856     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20857     glContext->hooks->gl.glTexEnvxOES(target, pname, param);
   20858     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20859     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20860 
   20861     void *pointerArgs[] = {
   20862     };
   20863 
   20864     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20865                               threadStartTime, threadEndTime,
   20866                               &glmsg, pointerArgs);
   20867     glContext->traceGLMessage(&glmsg);
   20868 }
   20869 
   20870 void GLTrace_glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) {
   20871     GLMessage glmsg;
   20872     GLTraceContext *glContext = getGLTraceContext();
   20873 
   20874     glmsg.set_function(GLMessage::glTexEnvxvOES);
   20875 
   20876     // copy argument target
   20877     GLMessage_DataType *arg_target = glmsg.add_args();
   20878     arg_target->set_isarray(false);
   20879     arg_target->set_type(GLMessage::DataType::ENUM);
   20880     arg_target->add_intvalue((int)target);
   20881 
   20882     // copy argument pname
   20883     GLMessage_DataType *arg_pname = glmsg.add_args();
   20884     arg_pname->set_isarray(false);
   20885     arg_pname->set_type(GLMessage::DataType::ENUM);
   20886     arg_pname->add_intvalue((int)pname);
   20887 
   20888     // copy argument params
   20889     GLMessage_DataType *arg_params = glmsg.add_args();
   20890     arg_params->set_isarray(false);
   20891     arg_params->set_type(GLMessage::DataType::INT);
   20892     arg_params->add_intvalue((int)params);
   20893 
   20894     // call function
   20895     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20896     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20897     glContext->hooks->gl.glTexEnvxvOES(target, pname, params);
   20898     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20899     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20900 
   20901     void *pointerArgs[] = {
   20902         (void *) params,
   20903     };
   20904 
   20905     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20906                               threadStartTime, threadEndTime,
   20907                               &glmsg, pointerArgs);
   20908     glContext->traceGLMessage(&glmsg);
   20909 }
   20910 
   20911 void GLTrace_glTexParameterxOES(GLenum target, GLenum pname, GLfixed param) {
   20912     GLMessage glmsg;
   20913     GLTraceContext *glContext = getGLTraceContext();
   20914 
   20915     glmsg.set_function(GLMessage::glTexParameterxOES);
   20916 
   20917     // copy argument target
   20918     GLMessage_DataType *arg_target = glmsg.add_args();
   20919     arg_target->set_isarray(false);
   20920     arg_target->set_type(GLMessage::DataType::ENUM);
   20921     arg_target->add_intvalue((int)target);
   20922 
   20923     // copy argument pname
   20924     GLMessage_DataType *arg_pname = glmsg.add_args();
   20925     arg_pname->set_isarray(false);
   20926     arg_pname->set_type(GLMessage::DataType::ENUM);
   20927     arg_pname->add_intvalue((int)pname);
   20928 
   20929     // copy argument param
   20930     GLMessage_DataType *arg_param = glmsg.add_args();
   20931     arg_param->set_isarray(false);
   20932     arg_param->set_type(GLMessage::DataType::INT);
   20933     arg_param->add_intvalue(param);
   20934 
   20935     // call function
   20936     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20937     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20938     glContext->hooks->gl.glTexParameterxOES(target, pname, param);
   20939     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20940     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20941 
   20942     void *pointerArgs[] = {
   20943     };
   20944 
   20945     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20946                               threadStartTime, threadEndTime,
   20947                               &glmsg, pointerArgs);
   20948     glContext->traceGLMessage(&glmsg);
   20949 }
   20950 
   20951 void GLTrace_glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params) {
   20952     GLMessage glmsg;
   20953     GLTraceContext *glContext = getGLTraceContext();
   20954 
   20955     glmsg.set_function(GLMessage::glTexParameterxvOES);
   20956 
   20957     // copy argument target
   20958     GLMessage_DataType *arg_target = glmsg.add_args();
   20959     arg_target->set_isarray(false);
   20960     arg_target->set_type(GLMessage::DataType::ENUM);
   20961     arg_target->add_intvalue((int)target);
   20962 
   20963     // copy argument pname
   20964     GLMessage_DataType *arg_pname = glmsg.add_args();
   20965     arg_pname->set_isarray(false);
   20966     arg_pname->set_type(GLMessage::DataType::ENUM);
   20967     arg_pname->add_intvalue((int)pname);
   20968 
   20969     // copy argument params
   20970     GLMessage_DataType *arg_params = glmsg.add_args();
   20971     arg_params->set_isarray(false);
   20972     arg_params->set_type(GLMessage::DataType::INT);
   20973     arg_params->add_intvalue((int)params);
   20974 
   20975     // call function
   20976     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20977     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   20978     glContext->hooks->gl.glTexParameterxvOES(target, pname, params);
   20979     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   20980     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   20981 
   20982     void *pointerArgs[] = {
   20983         (void *) params,
   20984     };
   20985 
   20986     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   20987                               threadStartTime, threadEndTime,
   20988                               &glmsg, pointerArgs);
   20989     glContext->traceGLMessage(&glmsg);
   20990 }
   20991 
   20992 void GLTrace_glTranslatexOES(GLfixed x, GLfixed y, GLfixed z) {
   20993     GLMessage glmsg;
   20994     GLTraceContext *glContext = getGLTraceContext();
   20995 
   20996     glmsg.set_function(GLMessage::glTranslatexOES);
   20997 
   20998     // copy argument x
   20999     GLMessage_DataType *arg_x = glmsg.add_args();
   21000     arg_x->set_isarray(false);
   21001     arg_x->set_type(GLMessage::DataType::INT);
   21002     arg_x->add_intvalue(x);
   21003 
   21004     // copy argument y
   21005     GLMessage_DataType *arg_y = glmsg.add_args();
   21006     arg_y->set_isarray(false);
   21007     arg_y->set_type(GLMessage::DataType::INT);
   21008     arg_y->add_intvalue(y);
   21009 
   21010     // copy argument z
   21011     GLMessage_DataType *arg_z = glmsg.add_args();
   21012     arg_z->set_isarray(false);
   21013     arg_z->set_type(GLMessage::DataType::INT);
   21014     arg_z->add_intvalue(z);
   21015 
   21016     // call function
   21017     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21018     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21019     glContext->hooks->gl.glTranslatexOES(x, y, z);
   21020     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21021     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21022 
   21023     void *pointerArgs[] = {
   21024     };
   21025 
   21026     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21027                               threadStartTime, threadEndTime,
   21028                               &glmsg, pointerArgs);
   21029     glContext->traceGLMessage(&glmsg);
   21030 }
   21031 
   21032 GLboolean GLTrace_glIsRenderbufferOES(GLuint renderbuffer) {
   21033     GLMessage glmsg;
   21034     GLTraceContext *glContext = getGLTraceContext();
   21035 
   21036     glmsg.set_function(GLMessage::glIsRenderbufferOES);
   21037 
   21038     // copy argument renderbuffer
   21039     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   21040     arg_renderbuffer->set_isarray(false);
   21041     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   21042     arg_renderbuffer->add_intvalue(renderbuffer);
   21043 
   21044     // call function
   21045     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21046     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21047     GLboolean retValue = glContext->hooks->gl.glIsRenderbufferOES(renderbuffer);
   21048     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21049     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21050 
   21051     // set return value
   21052     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   21053     rt->set_isarray(false);
   21054     rt->set_type(GLMessage::DataType::BOOL);
   21055     rt->add_boolvalue(retValue);
   21056 
   21057     void *pointerArgs[] = {
   21058     };
   21059 
   21060     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21061                               threadStartTime, threadEndTime,
   21062                               &glmsg, pointerArgs);
   21063     glContext->traceGLMessage(&glmsg);
   21064 
   21065     return retValue;
   21066 }
   21067 
   21068 void GLTrace_glBindRenderbufferOES(GLenum target, GLuint renderbuffer) {
   21069     GLMessage glmsg;
   21070     GLTraceContext *glContext = getGLTraceContext();
   21071 
   21072     glmsg.set_function(GLMessage::glBindRenderbufferOES);
   21073 
   21074     // copy argument target
   21075     GLMessage_DataType *arg_target = glmsg.add_args();
   21076     arg_target->set_isarray(false);
   21077     arg_target->set_type(GLMessage::DataType::ENUM);
   21078     arg_target->add_intvalue((int)target);
   21079 
   21080     // copy argument renderbuffer
   21081     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   21082     arg_renderbuffer->set_isarray(false);
   21083     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   21084     arg_renderbuffer->add_intvalue(renderbuffer);
   21085 
   21086     // call function
   21087     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21088     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21089     glContext->hooks->gl.glBindRenderbufferOES(target, renderbuffer);
   21090     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21091     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21092 
   21093     void *pointerArgs[] = {
   21094     };
   21095 
   21096     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21097                               threadStartTime, threadEndTime,
   21098                               &glmsg, pointerArgs);
   21099     glContext->traceGLMessage(&glmsg);
   21100 }
   21101 
   21102 void GLTrace_glDeleteRenderbuffersOES(GLsizei n, const GLuint* renderbuffers) {
   21103     GLMessage glmsg;
   21104     GLTraceContext *glContext = getGLTraceContext();
   21105 
   21106     glmsg.set_function(GLMessage::glDeleteRenderbuffersOES);
   21107 
   21108     // copy argument n
   21109     GLMessage_DataType *arg_n = glmsg.add_args();
   21110     arg_n->set_isarray(false);
   21111     arg_n->set_type(GLMessage::DataType::INT);
   21112     arg_n->add_intvalue(n);
   21113 
   21114     // copy argument renderbuffers
   21115     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   21116     arg_renderbuffers->set_isarray(false);
   21117     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   21118     arg_renderbuffers->add_intvalue((int)renderbuffers);
   21119 
   21120     // call function
   21121     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21122     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21123     glContext->hooks->gl.glDeleteRenderbuffersOES(n, renderbuffers);
   21124     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21125     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21126 
   21127     void *pointerArgs[] = {
   21128         (void *) renderbuffers,
   21129     };
   21130 
   21131     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21132                               threadStartTime, threadEndTime,
   21133                               &glmsg, pointerArgs);
   21134     glContext->traceGLMessage(&glmsg);
   21135 }
   21136 
   21137 void GLTrace_glGenRenderbuffersOES(GLsizei n, GLuint* renderbuffers) {
   21138     GLMessage glmsg;
   21139     GLTraceContext *glContext = getGLTraceContext();
   21140 
   21141     glmsg.set_function(GLMessage::glGenRenderbuffersOES);
   21142 
   21143     // copy argument n
   21144     GLMessage_DataType *arg_n = glmsg.add_args();
   21145     arg_n->set_isarray(false);
   21146     arg_n->set_type(GLMessage::DataType::INT);
   21147     arg_n->add_intvalue(n);
   21148 
   21149     // copy argument renderbuffers
   21150     GLMessage_DataType *arg_renderbuffers = glmsg.add_args();
   21151     arg_renderbuffers->set_isarray(false);
   21152     arg_renderbuffers->set_type(GLMessage::DataType::INT);
   21153     arg_renderbuffers->add_intvalue((int)renderbuffers);
   21154 
   21155     // call function
   21156     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21157     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21158     glContext->hooks->gl.glGenRenderbuffersOES(n, renderbuffers);
   21159     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21160     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21161 
   21162     void *pointerArgs[] = {
   21163         (void *) renderbuffers,
   21164     };
   21165 
   21166     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21167                               threadStartTime, threadEndTime,
   21168                               &glmsg, pointerArgs);
   21169     glContext->traceGLMessage(&glmsg);
   21170 }
   21171 
   21172 void GLTrace_glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) {
   21173     GLMessage glmsg;
   21174     GLTraceContext *glContext = getGLTraceContext();
   21175 
   21176     glmsg.set_function(GLMessage::glRenderbufferStorageOES);
   21177 
   21178     // copy argument target
   21179     GLMessage_DataType *arg_target = glmsg.add_args();
   21180     arg_target->set_isarray(false);
   21181     arg_target->set_type(GLMessage::DataType::ENUM);
   21182     arg_target->add_intvalue((int)target);
   21183 
   21184     // copy argument internalformat
   21185     GLMessage_DataType *arg_internalformat = glmsg.add_args();
   21186     arg_internalformat->set_isarray(false);
   21187     arg_internalformat->set_type(GLMessage::DataType::ENUM);
   21188     arg_internalformat->add_intvalue((int)internalformat);
   21189 
   21190     // copy argument width
   21191     GLMessage_DataType *arg_width = glmsg.add_args();
   21192     arg_width->set_isarray(false);
   21193     arg_width->set_type(GLMessage::DataType::INT);
   21194     arg_width->add_intvalue(width);
   21195 
   21196     // copy argument height
   21197     GLMessage_DataType *arg_height = glmsg.add_args();
   21198     arg_height->set_isarray(false);
   21199     arg_height->set_type(GLMessage::DataType::INT);
   21200     arg_height->add_intvalue(height);
   21201 
   21202     // call function
   21203     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21204     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21205     glContext->hooks->gl.glRenderbufferStorageOES(target, internalformat, width, height);
   21206     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21207     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21208 
   21209     void *pointerArgs[] = {
   21210     };
   21211 
   21212     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21213                               threadStartTime, threadEndTime,
   21214                               &glmsg, pointerArgs);
   21215     glContext->traceGLMessage(&glmsg);
   21216 }
   21217 
   21218 void GLTrace_glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint* params) {
   21219     GLMessage glmsg;
   21220     GLTraceContext *glContext = getGLTraceContext();
   21221 
   21222     glmsg.set_function(GLMessage::glGetRenderbufferParameterivOES);
   21223 
   21224     // copy argument target
   21225     GLMessage_DataType *arg_target = glmsg.add_args();
   21226     arg_target->set_isarray(false);
   21227     arg_target->set_type(GLMessage::DataType::ENUM);
   21228     arg_target->add_intvalue((int)target);
   21229 
   21230     // copy argument pname
   21231     GLMessage_DataType *arg_pname = glmsg.add_args();
   21232     arg_pname->set_isarray(false);
   21233     arg_pname->set_type(GLMessage::DataType::ENUM);
   21234     arg_pname->add_intvalue((int)pname);
   21235 
   21236     // copy argument params
   21237     GLMessage_DataType *arg_params = glmsg.add_args();
   21238     arg_params->set_isarray(false);
   21239     arg_params->set_type(GLMessage::DataType::INT);
   21240     arg_params->add_intvalue((int)params);
   21241 
   21242     // call function
   21243     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21244     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21245     glContext->hooks->gl.glGetRenderbufferParameterivOES(target, pname, params);
   21246     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21247     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21248 
   21249     void *pointerArgs[] = {
   21250         (void *) params,
   21251     };
   21252 
   21253     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21254                               threadStartTime, threadEndTime,
   21255                               &glmsg, pointerArgs);
   21256     glContext->traceGLMessage(&glmsg);
   21257 }
   21258 
   21259 GLboolean GLTrace_glIsFramebufferOES(GLuint framebuffer) {
   21260     GLMessage glmsg;
   21261     GLTraceContext *glContext = getGLTraceContext();
   21262 
   21263     glmsg.set_function(GLMessage::glIsFramebufferOES);
   21264 
   21265     // copy argument framebuffer
   21266     GLMessage_DataType *arg_framebuffer = glmsg.add_args();
   21267     arg_framebuffer->set_isarray(false);
   21268     arg_framebuffer->set_type(GLMessage::DataType::INT);
   21269     arg_framebuffer->add_intvalue(framebuffer);
   21270 
   21271     // call function
   21272     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21273     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21274     GLboolean retValue = glContext->hooks->gl.glIsFramebufferOES(framebuffer);
   21275     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21276     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21277 
   21278     // set return value
   21279     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   21280     rt->set_isarray(false);
   21281     rt->set_type(GLMessage::DataType::BOOL);
   21282     rt->add_boolvalue(retValue);
   21283 
   21284     void *pointerArgs[] = {
   21285     };
   21286 
   21287     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21288                               threadStartTime, threadEndTime,
   21289                               &glmsg, pointerArgs);
   21290     glContext->traceGLMessage(&glmsg);
   21291 
   21292     return retValue;
   21293 }
   21294 
   21295 void GLTrace_glBindFramebufferOES(GLenum target, GLuint framebuffer) {
   21296     GLMessage glmsg;
   21297     GLTraceContext *glContext = getGLTraceContext();
   21298 
   21299     glmsg.set_function(GLMessage::glBindFramebufferOES);
   21300 
   21301     // copy argument target
   21302     GLMessage_DataType *arg_target = glmsg.add_args();
   21303     arg_target->set_isarray(false);
   21304     arg_target->set_type(GLMessage::DataType::ENUM);
   21305     arg_target->add_intvalue((int)target);
   21306 
   21307     // copy argument framebuffer
   21308     GLMessage_DataType *arg_framebuffer = glmsg.add_args();
   21309     arg_framebuffer->set_isarray(false);
   21310     arg_framebuffer->set_type(GLMessage::DataType::INT);
   21311     arg_framebuffer->add_intvalue(framebuffer);
   21312 
   21313     // call function
   21314     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21315     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21316     glContext->hooks->gl.glBindFramebufferOES(target, framebuffer);
   21317     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21318     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21319 
   21320     void *pointerArgs[] = {
   21321     };
   21322 
   21323     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21324                               threadStartTime, threadEndTime,
   21325                               &glmsg, pointerArgs);
   21326     glContext->traceGLMessage(&glmsg);
   21327 }
   21328 
   21329 void GLTrace_glDeleteFramebuffersOES(GLsizei n, const GLuint* framebuffers) {
   21330     GLMessage glmsg;
   21331     GLTraceContext *glContext = getGLTraceContext();
   21332 
   21333     glmsg.set_function(GLMessage::glDeleteFramebuffersOES);
   21334 
   21335     // copy argument n
   21336     GLMessage_DataType *arg_n = glmsg.add_args();
   21337     arg_n->set_isarray(false);
   21338     arg_n->set_type(GLMessage::DataType::INT);
   21339     arg_n->add_intvalue(n);
   21340 
   21341     // copy argument framebuffers
   21342     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   21343     arg_framebuffers->set_isarray(false);
   21344     arg_framebuffers->set_type(GLMessage::DataType::INT);
   21345     arg_framebuffers->add_intvalue((int)framebuffers);
   21346 
   21347     // call function
   21348     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21349     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21350     glContext->hooks->gl.glDeleteFramebuffersOES(n, framebuffers);
   21351     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21352     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21353 
   21354     void *pointerArgs[] = {
   21355         (void *) framebuffers,
   21356     };
   21357 
   21358     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21359                               threadStartTime, threadEndTime,
   21360                               &glmsg, pointerArgs);
   21361     glContext->traceGLMessage(&glmsg);
   21362 }
   21363 
   21364 void GLTrace_glGenFramebuffersOES(GLsizei n, GLuint* framebuffers) {
   21365     GLMessage glmsg;
   21366     GLTraceContext *glContext = getGLTraceContext();
   21367 
   21368     glmsg.set_function(GLMessage::glGenFramebuffersOES);
   21369 
   21370     // copy argument n
   21371     GLMessage_DataType *arg_n = glmsg.add_args();
   21372     arg_n->set_isarray(false);
   21373     arg_n->set_type(GLMessage::DataType::INT);
   21374     arg_n->add_intvalue(n);
   21375 
   21376     // copy argument framebuffers
   21377     GLMessage_DataType *arg_framebuffers = glmsg.add_args();
   21378     arg_framebuffers->set_isarray(false);
   21379     arg_framebuffers->set_type(GLMessage::DataType::INT);
   21380     arg_framebuffers->add_intvalue((int)framebuffers);
   21381 
   21382     // call function
   21383     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21384     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21385     glContext->hooks->gl.glGenFramebuffersOES(n, framebuffers);
   21386     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21387     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21388 
   21389     void *pointerArgs[] = {
   21390         (void *) framebuffers,
   21391     };
   21392 
   21393     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21394                               threadStartTime, threadEndTime,
   21395                               &glmsg, pointerArgs);
   21396     glContext->traceGLMessage(&glmsg);
   21397 }
   21398 
   21399 GLenum GLTrace_glCheckFramebufferStatusOES(GLenum target) {
   21400     GLMessage glmsg;
   21401     GLTraceContext *glContext = getGLTraceContext();
   21402 
   21403     glmsg.set_function(GLMessage::glCheckFramebufferStatusOES);
   21404 
   21405     // copy argument target
   21406     GLMessage_DataType *arg_target = glmsg.add_args();
   21407     arg_target->set_isarray(false);
   21408     arg_target->set_type(GLMessage::DataType::ENUM);
   21409     arg_target->add_intvalue((int)target);
   21410 
   21411     // call function
   21412     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21413     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21414     GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatusOES(target);
   21415     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21416     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21417 
   21418     // set return value
   21419     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   21420     rt->set_isarray(false);
   21421     rt->set_type(GLMessage::DataType::ENUM);
   21422     rt->add_intvalue((int)retValue);
   21423 
   21424     void *pointerArgs[] = {
   21425     };
   21426 
   21427     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21428                               threadStartTime, threadEndTime,
   21429                               &glmsg, pointerArgs);
   21430     glContext->traceGLMessage(&glmsg);
   21431 
   21432     return retValue;
   21433 }
   21434 
   21435 void GLTrace_glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) {
   21436     GLMessage glmsg;
   21437     GLTraceContext *glContext = getGLTraceContext();
   21438 
   21439     glmsg.set_function(GLMessage::glFramebufferRenderbufferOES);
   21440 
   21441     // copy argument target
   21442     GLMessage_DataType *arg_target = glmsg.add_args();
   21443     arg_target->set_isarray(false);
   21444     arg_target->set_type(GLMessage::DataType::ENUM);
   21445     arg_target->add_intvalue((int)target);
   21446 
   21447     // copy argument attachment
   21448     GLMessage_DataType *arg_attachment = glmsg.add_args();
   21449     arg_attachment->set_isarray(false);
   21450     arg_attachment->set_type(GLMessage::DataType::ENUM);
   21451     arg_attachment->add_intvalue((int)attachment);
   21452 
   21453     // copy argument renderbuffertarget
   21454     GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args();
   21455     arg_renderbuffertarget->set_isarray(false);
   21456     arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM);
   21457     arg_renderbuffertarget->add_intvalue((int)renderbuffertarget);
   21458 
   21459     // copy argument renderbuffer
   21460     GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
   21461     arg_renderbuffer->set_isarray(false);
   21462     arg_renderbuffer->set_type(GLMessage::DataType::INT);
   21463     arg_renderbuffer->add_intvalue(renderbuffer);
   21464 
   21465     // call function
   21466     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21467     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21468     glContext->hooks->gl.glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer);
   21469     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21470     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21471 
   21472     void *pointerArgs[] = {
   21473     };
   21474 
   21475     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21476                               threadStartTime, threadEndTime,
   21477                               &glmsg, pointerArgs);
   21478     glContext->traceGLMessage(&glmsg);
   21479 }
   21480 
   21481 void GLTrace_glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) {
   21482     GLMessage glmsg;
   21483     GLTraceContext *glContext = getGLTraceContext();
   21484 
   21485     glmsg.set_function(GLMessage::glFramebufferTexture2DOES);
   21486 
   21487     // copy argument target
   21488     GLMessage_DataType *arg_target = glmsg.add_args();
   21489     arg_target->set_isarray(false);
   21490     arg_target->set_type(GLMessage::DataType::ENUM);
   21491     arg_target->add_intvalue((int)target);
   21492 
   21493     // copy argument attachment
   21494     GLMessage_DataType *arg_attachment = glmsg.add_args();
   21495     arg_attachment->set_isarray(false);
   21496     arg_attachment->set_type(GLMessage::DataType::ENUM);
   21497     arg_attachment->add_intvalue((int)attachment);
   21498 
   21499     // copy argument textarget
   21500     GLMessage_DataType *arg_textarget = glmsg.add_args();
   21501     arg_textarget->set_isarray(false);
   21502     arg_textarget->set_type(GLMessage::DataType::ENUM);
   21503     arg_textarget->add_intvalue((int)textarget);
   21504 
   21505     // copy argument texture
   21506     GLMessage_DataType *arg_texture = glmsg.add_args();
   21507     arg_texture->set_isarray(false);
   21508     arg_texture->set_type(GLMessage::DataType::INT);
   21509     arg_texture->add_intvalue(texture);
   21510 
   21511     // copy argument level
   21512     GLMessage_DataType *arg_level = glmsg.add_args();
   21513     arg_level->set_isarray(false);
   21514     arg_level->set_type(GLMessage::DataType::INT);
   21515     arg_level->add_intvalue(level);
   21516 
   21517     // call function
   21518     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21519     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21520     glContext->hooks->gl.glFramebufferTexture2DOES(target, attachment, textarget, texture, level);
   21521     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21522     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21523 
   21524     void *pointerArgs[] = {
   21525     };
   21526 
   21527     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21528                               threadStartTime, threadEndTime,
   21529                               &glmsg, pointerArgs);
   21530     glContext->traceGLMessage(&glmsg);
   21531 }
   21532 
   21533 void GLTrace_glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint* params) {
   21534     GLMessage glmsg;
   21535     GLTraceContext *glContext = getGLTraceContext();
   21536 
   21537     glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameterivOES);
   21538 
   21539     // copy argument target
   21540     GLMessage_DataType *arg_target = glmsg.add_args();
   21541     arg_target->set_isarray(false);
   21542     arg_target->set_type(GLMessage::DataType::ENUM);
   21543     arg_target->add_intvalue((int)target);
   21544 
   21545     // copy argument attachment
   21546     GLMessage_DataType *arg_attachment = glmsg.add_args();
   21547     arg_attachment->set_isarray(false);
   21548     arg_attachment->set_type(GLMessage::DataType::ENUM);
   21549     arg_attachment->add_intvalue((int)attachment);
   21550 
   21551     // copy argument pname
   21552     GLMessage_DataType *arg_pname = glmsg.add_args();
   21553     arg_pname->set_isarray(false);
   21554     arg_pname->set_type(GLMessage::DataType::ENUM);
   21555     arg_pname->add_intvalue((int)pname);
   21556 
   21557     // copy argument params
   21558     GLMessage_DataType *arg_params = glmsg.add_args();
   21559     arg_params->set_isarray(false);
   21560     arg_params->set_type(GLMessage::DataType::INT);
   21561     arg_params->add_intvalue((int)params);
   21562 
   21563     // call function
   21564     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21565     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21566     glContext->hooks->gl.glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params);
   21567     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21568     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21569 
   21570     void *pointerArgs[] = {
   21571         (void *) params,
   21572     };
   21573 
   21574     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21575                               threadStartTime, threadEndTime,
   21576                               &glmsg, pointerArgs);
   21577     glContext->traceGLMessage(&glmsg);
   21578 }
   21579 
   21580 void GLTrace_glGenerateMipmapOES(GLenum target) {
   21581     GLMessage glmsg;
   21582     GLTraceContext *glContext = getGLTraceContext();
   21583 
   21584     glmsg.set_function(GLMessage::glGenerateMipmapOES);
   21585 
   21586     // copy argument target
   21587     GLMessage_DataType *arg_target = glmsg.add_args();
   21588     arg_target->set_isarray(false);
   21589     arg_target->set_type(GLMessage::DataType::ENUM);
   21590     arg_target->add_intvalue((int)target);
   21591 
   21592     // call function
   21593     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21594     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21595     glContext->hooks->gl.glGenerateMipmapOES(target);
   21596     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21597     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21598 
   21599     void *pointerArgs[] = {
   21600     };
   21601 
   21602     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21603                               threadStartTime, threadEndTime,
   21604                               &glmsg, pointerArgs);
   21605     glContext->traceGLMessage(&glmsg);
   21606 }
   21607 
   21608 void GLTrace_glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) {
   21609     GLMessage glmsg;
   21610     GLTraceContext *glContext = getGLTraceContext();
   21611 
   21612     glmsg.set_function(GLMessage::glCurrentPaletteMatrixOES);
   21613 
   21614     // copy argument matrixpaletteindex
   21615     GLMessage_DataType *arg_matrixpaletteindex = glmsg.add_args();
   21616     arg_matrixpaletteindex->set_isarray(false);
   21617     arg_matrixpaletteindex->set_type(GLMessage::DataType::INT);
   21618     arg_matrixpaletteindex->add_intvalue(matrixpaletteindex);
   21619 
   21620     // call function
   21621     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21622     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21623     glContext->hooks->gl.glCurrentPaletteMatrixOES(matrixpaletteindex);
   21624     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21625     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21626 
   21627     void *pointerArgs[] = {
   21628     };
   21629 
   21630     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21631                               threadStartTime, threadEndTime,
   21632                               &glmsg, pointerArgs);
   21633     glContext->traceGLMessage(&glmsg);
   21634 }
   21635 
   21636 void GLTrace_glLoadPaletteFromModelViewMatrixOES(void) {
   21637     GLMessage glmsg;
   21638     GLTraceContext *glContext = getGLTraceContext();
   21639 
   21640     glmsg.set_function(GLMessage::glLoadPaletteFromModelViewMatrixOES);
   21641 
   21642     // call function
   21643     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21644     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21645     glContext->hooks->gl.glLoadPaletteFromModelViewMatrixOES();
   21646     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21647     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21648 
   21649     void *pointerArgs[] = {
   21650     };
   21651 
   21652     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21653                               threadStartTime, threadEndTime,
   21654                               &glmsg, pointerArgs);
   21655     glContext->traceGLMessage(&glmsg);
   21656 }
   21657 
   21658 void GLTrace_glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   21659     GLMessage glmsg;
   21660     GLTraceContext *glContext = getGLTraceContext();
   21661 
   21662     glmsg.set_function(GLMessage::glMatrixIndexPointerOES);
   21663 
   21664     // copy argument size
   21665     GLMessage_DataType *arg_size = glmsg.add_args();
   21666     arg_size->set_isarray(false);
   21667     arg_size->set_type(GLMessage::DataType::INT);
   21668     arg_size->add_intvalue(size);
   21669 
   21670     // copy argument type
   21671     GLMessage_DataType *arg_type = glmsg.add_args();
   21672     arg_type->set_isarray(false);
   21673     arg_type->set_type(GLMessage::DataType::ENUM);
   21674     arg_type->add_intvalue((int)type);
   21675 
   21676     // copy argument stride
   21677     GLMessage_DataType *arg_stride = glmsg.add_args();
   21678     arg_stride->set_isarray(false);
   21679     arg_stride->set_type(GLMessage::DataType::INT);
   21680     arg_stride->add_intvalue(stride);
   21681 
   21682     // copy argument pointer
   21683     GLMessage_DataType *arg_pointer = glmsg.add_args();
   21684     arg_pointer->set_isarray(false);
   21685     arg_pointer->set_type(GLMessage::DataType::INT);
   21686     arg_pointer->add_intvalue((int)pointer);
   21687 
   21688     // call function
   21689     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21690     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21691     glContext->hooks->gl.glMatrixIndexPointerOES(size, type, stride, pointer);
   21692     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21693     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21694 
   21695     void *pointerArgs[] = {
   21696         (void *) pointer,
   21697     };
   21698 
   21699     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21700                               threadStartTime, threadEndTime,
   21701                               &glmsg, pointerArgs);
   21702     glContext->traceGLMessage(&glmsg);
   21703 }
   21704 
   21705 void GLTrace_glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) {
   21706     GLMessage glmsg;
   21707     GLTraceContext *glContext = getGLTraceContext();
   21708 
   21709     glmsg.set_function(GLMessage::glWeightPointerOES);
   21710 
   21711     // copy argument size
   21712     GLMessage_DataType *arg_size = glmsg.add_args();
   21713     arg_size->set_isarray(false);
   21714     arg_size->set_type(GLMessage::DataType::INT);
   21715     arg_size->add_intvalue(size);
   21716 
   21717     // copy argument type
   21718     GLMessage_DataType *arg_type = glmsg.add_args();
   21719     arg_type->set_isarray(false);
   21720     arg_type->set_type(GLMessage::DataType::ENUM);
   21721     arg_type->add_intvalue((int)type);
   21722 
   21723     // copy argument stride
   21724     GLMessage_DataType *arg_stride = glmsg.add_args();
   21725     arg_stride->set_isarray(false);
   21726     arg_stride->set_type(GLMessage::DataType::INT);
   21727     arg_stride->add_intvalue(stride);
   21728 
   21729     // copy argument pointer
   21730     GLMessage_DataType *arg_pointer = glmsg.add_args();
   21731     arg_pointer->set_isarray(false);
   21732     arg_pointer->set_type(GLMessage::DataType::INT);
   21733     arg_pointer->add_intvalue((int)pointer);
   21734 
   21735     // call function
   21736     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21737     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21738     glContext->hooks->gl.glWeightPointerOES(size, type, stride, pointer);
   21739     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21740     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21741 
   21742     void *pointerArgs[] = {
   21743         (void *) pointer,
   21744     };
   21745 
   21746     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21747                               threadStartTime, threadEndTime,
   21748                               &glmsg, pointerArgs);
   21749     glContext->traceGLMessage(&glmsg);
   21750 }
   21751 
   21752 GLbitfield GLTrace_glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) {
   21753     GLMessage glmsg;
   21754     GLTraceContext *glContext = getGLTraceContext();
   21755 
   21756     glmsg.set_function(GLMessage::glQueryMatrixxOES);
   21757 
   21758     // copy argument mantissa
   21759     GLMessage_DataType *arg_mantissa = glmsg.add_args();
   21760     arg_mantissa->set_isarray(false);
   21761     arg_mantissa->set_type(GLMessage::DataType::INT);
   21762     arg_mantissa->add_intvalue((int)mantissa);
   21763 
   21764     // copy argument exponent
   21765     GLMessage_DataType *arg_exponent = glmsg.add_args();
   21766     arg_exponent->set_isarray(false);
   21767     arg_exponent->set_type(GLMessage::DataType::INT);
   21768     arg_exponent->add_intvalue((int)exponent);
   21769 
   21770     // call function
   21771     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21772     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21773     GLbitfield retValue = glContext->hooks->gl.glQueryMatrixxOES(mantissa, exponent);
   21774     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21775     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21776 
   21777     // set return value
   21778     GLMessage_DataType *rt = glmsg.mutable_returnvalue();
   21779     rt->set_isarray(false);
   21780     rt->set_type(GLMessage::DataType::INT);
   21781     rt->add_intvalue(retValue);
   21782 
   21783     void *pointerArgs[] = {
   21784         (void *) mantissa,
   21785         (void *) exponent,
   21786     };
   21787 
   21788     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21789                               threadStartTime, threadEndTime,
   21790                               &glmsg, pointerArgs);
   21791     glContext->traceGLMessage(&glmsg);
   21792 
   21793     return retValue;
   21794 }
   21795 
   21796 void GLTrace_glDepthRangefOES(GLclampf zNear, GLclampf zFar) {
   21797     GLMessage glmsg;
   21798     GLTraceContext *glContext = getGLTraceContext();
   21799 
   21800     glmsg.set_function(GLMessage::glDepthRangefOES);
   21801 
   21802     // copy argument zNear
   21803     GLMessage_DataType *arg_zNear = glmsg.add_args();
   21804     arg_zNear->set_isarray(false);
   21805     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   21806     arg_zNear->add_floatvalue(zNear);
   21807 
   21808     // copy argument zFar
   21809     GLMessage_DataType *arg_zFar = glmsg.add_args();
   21810     arg_zFar->set_isarray(false);
   21811     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   21812     arg_zFar->add_floatvalue(zFar);
   21813 
   21814     // call function
   21815     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21816     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21817     glContext->hooks->gl.glDepthRangefOES(zNear, zFar);
   21818     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21819     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21820 
   21821     void *pointerArgs[] = {
   21822     };
   21823 
   21824     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21825                               threadStartTime, threadEndTime,
   21826                               &glmsg, pointerArgs);
   21827     glContext->traceGLMessage(&glmsg);
   21828 }
   21829 
   21830 void GLTrace_glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   21831     GLMessage glmsg;
   21832     GLTraceContext *glContext = getGLTraceContext();
   21833 
   21834     glmsg.set_function(GLMessage::glFrustumfOES);
   21835 
   21836     // copy argument left
   21837     GLMessage_DataType *arg_left = glmsg.add_args();
   21838     arg_left->set_isarray(false);
   21839     arg_left->set_type(GLMessage::DataType::FLOAT);
   21840     arg_left->add_floatvalue(left);
   21841 
   21842     // copy argument right
   21843     GLMessage_DataType *arg_right = glmsg.add_args();
   21844     arg_right->set_isarray(false);
   21845     arg_right->set_type(GLMessage::DataType::FLOAT);
   21846     arg_right->add_floatvalue(right);
   21847 
   21848     // copy argument bottom
   21849     GLMessage_DataType *arg_bottom = glmsg.add_args();
   21850     arg_bottom->set_isarray(false);
   21851     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   21852     arg_bottom->add_floatvalue(bottom);
   21853 
   21854     // copy argument top
   21855     GLMessage_DataType *arg_top = glmsg.add_args();
   21856     arg_top->set_isarray(false);
   21857     arg_top->set_type(GLMessage::DataType::FLOAT);
   21858     arg_top->add_floatvalue(top);
   21859 
   21860     // copy argument zNear
   21861     GLMessage_DataType *arg_zNear = glmsg.add_args();
   21862     arg_zNear->set_isarray(false);
   21863     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   21864     arg_zNear->add_floatvalue(zNear);
   21865 
   21866     // copy argument zFar
   21867     GLMessage_DataType *arg_zFar = glmsg.add_args();
   21868     arg_zFar->set_isarray(false);
   21869     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   21870     arg_zFar->add_floatvalue(zFar);
   21871 
   21872     // call function
   21873     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21874     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21875     glContext->hooks->gl.glFrustumfOES(left, right, bottom, top, zNear, zFar);
   21876     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21877     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21878 
   21879     void *pointerArgs[] = {
   21880     };
   21881 
   21882     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21883                               threadStartTime, threadEndTime,
   21884                               &glmsg, pointerArgs);
   21885     glContext->traceGLMessage(&glmsg);
   21886 }
   21887 
   21888 void GLTrace_glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) {
   21889     GLMessage glmsg;
   21890     GLTraceContext *glContext = getGLTraceContext();
   21891 
   21892     glmsg.set_function(GLMessage::glOrthofOES);
   21893 
   21894     // copy argument left
   21895     GLMessage_DataType *arg_left = glmsg.add_args();
   21896     arg_left->set_isarray(false);
   21897     arg_left->set_type(GLMessage::DataType::FLOAT);
   21898     arg_left->add_floatvalue(left);
   21899 
   21900     // copy argument right
   21901     GLMessage_DataType *arg_right = glmsg.add_args();
   21902     arg_right->set_isarray(false);
   21903     arg_right->set_type(GLMessage::DataType::FLOAT);
   21904     arg_right->add_floatvalue(right);
   21905 
   21906     // copy argument bottom
   21907     GLMessage_DataType *arg_bottom = glmsg.add_args();
   21908     arg_bottom->set_isarray(false);
   21909     arg_bottom->set_type(GLMessage::DataType::FLOAT);
   21910     arg_bottom->add_floatvalue(bottom);
   21911 
   21912     // copy argument top
   21913     GLMessage_DataType *arg_top = glmsg.add_args();
   21914     arg_top->set_isarray(false);
   21915     arg_top->set_type(GLMessage::DataType::FLOAT);
   21916     arg_top->add_floatvalue(top);
   21917 
   21918     // copy argument zNear
   21919     GLMessage_DataType *arg_zNear = glmsg.add_args();
   21920     arg_zNear->set_isarray(false);
   21921     arg_zNear->set_type(GLMessage::DataType::FLOAT);
   21922     arg_zNear->add_floatvalue(zNear);
   21923 
   21924     // copy argument zFar
   21925     GLMessage_DataType *arg_zFar = glmsg.add_args();
   21926     arg_zFar->set_isarray(false);
   21927     arg_zFar->set_type(GLMessage::DataType::FLOAT);
   21928     arg_zFar->add_floatvalue(zFar);
   21929 
   21930     // call function
   21931     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21932     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21933     glContext->hooks->gl.glOrthofOES(left, right, bottom, top, zNear, zFar);
   21934     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21935     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21936 
   21937     void *pointerArgs[] = {
   21938     };
   21939 
   21940     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21941                               threadStartTime, threadEndTime,
   21942                               &glmsg, pointerArgs);
   21943     glContext->traceGLMessage(&glmsg);
   21944 }
   21945 
   21946 void GLTrace_glClipPlanefOES(GLenum plane, const GLfloat *equation) {
   21947     GLMessage glmsg;
   21948     GLTraceContext *glContext = getGLTraceContext();
   21949 
   21950     glmsg.set_function(GLMessage::glClipPlanefOES);
   21951 
   21952     // copy argument plane
   21953     GLMessage_DataType *arg_plane = glmsg.add_args();
   21954     arg_plane->set_isarray(false);
   21955     arg_plane->set_type(GLMessage::DataType::ENUM);
   21956     arg_plane->add_intvalue((int)plane);
   21957 
   21958     // copy argument equation
   21959     GLMessage_DataType *arg_equation = glmsg.add_args();
   21960     arg_equation->set_isarray(false);
   21961     arg_equation->set_type(GLMessage::DataType::INT);
   21962     arg_equation->add_intvalue((int)equation);
   21963 
   21964     // call function
   21965     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21966     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   21967     glContext->hooks->gl.glClipPlanefOES(plane, equation);
   21968     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   21969     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   21970 
   21971     void *pointerArgs[] = {
   21972         (void *) equation,
   21973     };
   21974 
   21975     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   21976                               threadStartTime, threadEndTime,
   21977                               &glmsg, pointerArgs);
   21978     glContext->traceGLMessage(&glmsg);
   21979 }
   21980 
   21981 void GLTrace_glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) {
   21982     GLMessage glmsg;
   21983     GLTraceContext *glContext = getGLTraceContext();
   21984 
   21985     glmsg.set_function(GLMessage::glGetClipPlanefOES);
   21986 
   21987     // copy argument pname
   21988     GLMessage_DataType *arg_pname = glmsg.add_args();
   21989     arg_pname->set_isarray(false);
   21990     arg_pname->set_type(GLMessage::DataType::ENUM);
   21991     arg_pname->add_intvalue((int)pname);
   21992 
   21993     // copy argument eqn
   21994     GLMessage_DataType *arg_eqn = glmsg.add_args();
   21995     arg_eqn->set_isarray(false);
   21996     arg_eqn->set_type(GLMessage::DataType::INT);
   21997     arg_eqn->add_intvalue((int)eqn);
   21998 
   21999     // call function
   22000     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22001     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22002     glContext->hooks->gl.glGetClipPlanefOES(pname, eqn);
   22003     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22004     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22005 
   22006     void *pointerArgs[] = {
   22007         (void *) eqn,
   22008     };
   22009 
   22010     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22011                               threadStartTime, threadEndTime,
   22012                               &glmsg, pointerArgs);
   22013     glContext->traceGLMessage(&glmsg);
   22014 }
   22015 
   22016 void GLTrace_glClearDepthfOES(GLclampf depth) {
   22017     GLMessage glmsg;
   22018     GLTraceContext *glContext = getGLTraceContext();
   22019 
   22020     glmsg.set_function(GLMessage::glClearDepthfOES);
   22021 
   22022     // copy argument depth
   22023     GLMessage_DataType *arg_depth = glmsg.add_args();
   22024     arg_depth->set_isarray(false);
   22025     arg_depth->set_type(GLMessage::DataType::FLOAT);
   22026     arg_depth->add_floatvalue(depth);
   22027 
   22028     // call function
   22029     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22030     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22031     glContext->hooks->gl.glClearDepthfOES(depth);
   22032     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22033     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22034 
   22035     void *pointerArgs[] = {
   22036     };
   22037 
   22038     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22039                               threadStartTime, threadEndTime,
   22040                               &glmsg, pointerArgs);
   22041     glContext->traceGLMessage(&glmsg);
   22042 }
   22043 
   22044 void GLTrace_glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) {
   22045     GLMessage glmsg;
   22046     GLTraceContext *glContext = getGLTraceContext();
   22047 
   22048     glmsg.set_function(GLMessage::glTexGenfOES);
   22049 
   22050     // copy argument coord
   22051     GLMessage_DataType *arg_coord = glmsg.add_args();
   22052     arg_coord->set_isarray(false);
   22053     arg_coord->set_type(GLMessage::DataType::ENUM);
   22054     arg_coord->add_intvalue((int)coord);
   22055 
   22056     // copy argument pname
   22057     GLMessage_DataType *arg_pname = glmsg.add_args();
   22058     arg_pname->set_isarray(false);
   22059     arg_pname->set_type(GLMessage::DataType::ENUM);
   22060     arg_pname->add_intvalue((int)pname);
   22061 
   22062     // copy argument param
   22063     GLMessage_DataType *arg_param = glmsg.add_args();
   22064     arg_param->set_isarray(false);
   22065     arg_param->set_type(GLMessage::DataType::FLOAT);
   22066     arg_param->add_floatvalue(param);
   22067 
   22068     // call function
   22069     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22070     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22071     glContext->hooks->gl.glTexGenfOES(coord, pname, param);
   22072     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22073     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22074 
   22075     void *pointerArgs[] = {
   22076     };
   22077 
   22078     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22079                               threadStartTime, threadEndTime,
   22080                               &glmsg, pointerArgs);
   22081     glContext->traceGLMessage(&glmsg);
   22082 }
   22083 
   22084 void GLTrace_glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) {
   22085     GLMessage glmsg;
   22086     GLTraceContext *glContext = getGLTraceContext();
   22087 
   22088     glmsg.set_function(GLMessage::glTexGenfvOES);
   22089 
   22090     // copy argument coord
   22091     GLMessage_DataType *arg_coord = glmsg.add_args();
   22092     arg_coord->set_isarray(false);
   22093     arg_coord->set_type(GLMessage::DataType::ENUM);
   22094     arg_coord->add_intvalue((int)coord);
   22095 
   22096     // copy argument pname
   22097     GLMessage_DataType *arg_pname = glmsg.add_args();
   22098     arg_pname->set_isarray(false);
   22099     arg_pname->set_type(GLMessage::DataType::ENUM);
   22100     arg_pname->add_intvalue((int)pname);
   22101 
   22102     // copy argument params
   22103     GLMessage_DataType *arg_params = glmsg.add_args();
   22104     arg_params->set_isarray(false);
   22105     arg_params->set_type(GLMessage::DataType::INT);
   22106     arg_params->add_intvalue((int)params);
   22107 
   22108     // call function
   22109     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22110     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22111     glContext->hooks->gl.glTexGenfvOES(coord, pname, params);
   22112     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22113     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22114 
   22115     void *pointerArgs[] = {
   22116         (void *) params,
   22117     };
   22118 
   22119     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22120                               threadStartTime, threadEndTime,
   22121                               &glmsg, pointerArgs);
   22122     glContext->traceGLMessage(&glmsg);
   22123 }
   22124 
   22125 void GLTrace_glTexGeniOES(GLenum coord, GLenum pname, GLint param) {
   22126     GLMessage glmsg;
   22127     GLTraceContext *glContext = getGLTraceContext();
   22128 
   22129     glmsg.set_function(GLMessage::glTexGeniOES);
   22130 
   22131     // copy argument coord
   22132     GLMessage_DataType *arg_coord = glmsg.add_args();
   22133     arg_coord->set_isarray(false);
   22134     arg_coord->set_type(GLMessage::DataType::ENUM);
   22135     arg_coord->add_intvalue((int)coord);
   22136 
   22137     // copy argument pname
   22138     GLMessage_DataType *arg_pname = glmsg.add_args();
   22139     arg_pname->set_isarray(false);
   22140     arg_pname->set_type(GLMessage::DataType::ENUM);
   22141     arg_pname->add_intvalue((int)pname);
   22142 
   22143     // copy argument param
   22144     GLMessage_DataType *arg_param = glmsg.add_args();
   22145     arg_param->set_isarray(false);
   22146     arg_param->set_type(GLMessage::DataType::INT);
   22147     arg_param->add_intvalue(param);
   22148 
   22149     // call function
   22150     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22151     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22152     glContext->hooks->gl.glTexGeniOES(coord, pname, param);
   22153     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22154     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22155 
   22156     void *pointerArgs[] = {
   22157     };
   22158 
   22159     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22160                               threadStartTime, threadEndTime,
   22161                               &glmsg, pointerArgs);
   22162     glContext->traceGLMessage(&glmsg);
   22163 }
   22164 
   22165 void GLTrace_glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) {
   22166     GLMessage glmsg;
   22167     GLTraceContext *glContext = getGLTraceContext();
   22168 
   22169     glmsg.set_function(GLMessage::glTexGenivOES);
   22170 
   22171     // copy argument coord
   22172     GLMessage_DataType *arg_coord = glmsg.add_args();
   22173     arg_coord->set_isarray(false);
   22174     arg_coord->set_type(GLMessage::DataType::ENUM);
   22175     arg_coord->add_intvalue((int)coord);
   22176 
   22177     // copy argument pname
   22178     GLMessage_DataType *arg_pname = glmsg.add_args();
   22179     arg_pname->set_isarray(false);
   22180     arg_pname->set_type(GLMessage::DataType::ENUM);
   22181     arg_pname->add_intvalue((int)pname);
   22182 
   22183     // copy argument params
   22184     GLMessage_DataType *arg_params = glmsg.add_args();
   22185     arg_params->set_isarray(false);
   22186     arg_params->set_type(GLMessage::DataType::INT);
   22187     arg_params->add_intvalue((int)params);
   22188 
   22189     // call function
   22190     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22191     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22192     glContext->hooks->gl.glTexGenivOES(coord, pname, params);
   22193     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22194     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22195 
   22196     void *pointerArgs[] = {
   22197         (void *) params,
   22198     };
   22199 
   22200     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22201                               threadStartTime, threadEndTime,
   22202                               &glmsg, pointerArgs);
   22203     glContext->traceGLMessage(&glmsg);
   22204 }
   22205 
   22206 void GLTrace_glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) {
   22207     GLMessage glmsg;
   22208     GLTraceContext *glContext = getGLTraceContext();
   22209 
   22210     glmsg.set_function(GLMessage::glTexGenxOES);
   22211 
   22212     // copy argument coord
   22213     GLMessage_DataType *arg_coord = glmsg.add_args();
   22214     arg_coord->set_isarray(false);
   22215     arg_coord->set_type(GLMessage::DataType::ENUM);
   22216     arg_coord->add_intvalue((int)coord);
   22217 
   22218     // copy argument pname
   22219     GLMessage_DataType *arg_pname = glmsg.add_args();
   22220     arg_pname->set_isarray(false);
   22221     arg_pname->set_type(GLMessage::DataType::ENUM);
   22222     arg_pname->add_intvalue((int)pname);
   22223 
   22224     // copy argument param
   22225     GLMessage_DataType *arg_param = glmsg.add_args();
   22226     arg_param->set_isarray(false);
   22227     arg_param->set_type(GLMessage::DataType::INT);
   22228     arg_param->add_intvalue(param);
   22229 
   22230     // call function
   22231     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22232     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22233     glContext->hooks->gl.glTexGenxOES(coord, pname, param);
   22234     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22235     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22236 
   22237     void *pointerArgs[] = {
   22238     };
   22239 
   22240     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22241                               threadStartTime, threadEndTime,
   22242                               &glmsg, pointerArgs);
   22243     glContext->traceGLMessage(&glmsg);
   22244 }
   22245 
   22246 void GLTrace_glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) {
   22247     GLMessage glmsg;
   22248     GLTraceContext *glContext = getGLTraceContext();
   22249 
   22250     glmsg.set_function(GLMessage::glTexGenxvOES);
   22251 
   22252     // copy argument coord
   22253     GLMessage_DataType *arg_coord = glmsg.add_args();
   22254     arg_coord->set_isarray(false);
   22255     arg_coord->set_type(GLMessage::DataType::ENUM);
   22256     arg_coord->add_intvalue((int)coord);
   22257 
   22258     // copy argument pname
   22259     GLMessage_DataType *arg_pname = glmsg.add_args();
   22260     arg_pname->set_isarray(false);
   22261     arg_pname->set_type(GLMessage::DataType::ENUM);
   22262     arg_pname->add_intvalue((int)pname);
   22263 
   22264     // copy argument params
   22265     GLMessage_DataType *arg_params = glmsg.add_args();
   22266     arg_params->set_isarray(false);
   22267     arg_params->set_type(GLMessage::DataType::INT);
   22268     arg_params->add_intvalue((int)params);
   22269 
   22270     // call function
   22271     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22272     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22273     glContext->hooks->gl.glTexGenxvOES(coord, pname, params);
   22274     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22275     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22276 
   22277     void *pointerArgs[] = {
   22278         (void *) params,
   22279     };
   22280 
   22281     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22282                               threadStartTime, threadEndTime,
   22283                               &glmsg, pointerArgs);
   22284     glContext->traceGLMessage(&glmsg);
   22285 }
   22286 
   22287 void GLTrace_glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) {
   22288     GLMessage glmsg;
   22289     GLTraceContext *glContext = getGLTraceContext();
   22290 
   22291     glmsg.set_function(GLMessage::glGetTexGenfvOES);
   22292 
   22293     // copy argument coord
   22294     GLMessage_DataType *arg_coord = glmsg.add_args();
   22295     arg_coord->set_isarray(false);
   22296     arg_coord->set_type(GLMessage::DataType::ENUM);
   22297     arg_coord->add_intvalue((int)coord);
   22298 
   22299     // copy argument pname
   22300     GLMessage_DataType *arg_pname = glmsg.add_args();
   22301     arg_pname->set_isarray(false);
   22302     arg_pname->set_type(GLMessage::DataType::ENUM);
   22303     arg_pname->add_intvalue((int)pname);
   22304 
   22305     // copy argument params
   22306     GLMessage_DataType *arg_params = glmsg.add_args();
   22307     arg_params->set_isarray(false);
   22308     arg_params->set_type(GLMessage::DataType::INT);
   22309     arg_params->add_intvalue((int)params);
   22310 
   22311     // call function
   22312     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22313     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22314     glContext->hooks->gl.glGetTexGenfvOES(coord, pname, params);
   22315     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22316     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22317 
   22318     void *pointerArgs[] = {
   22319         (void *) params,
   22320     };
   22321 
   22322     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22323                               threadStartTime, threadEndTime,
   22324                               &glmsg, pointerArgs);
   22325     glContext->traceGLMessage(&glmsg);
   22326 }
   22327 
   22328 void GLTrace_glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) {
   22329     GLMessage glmsg;
   22330     GLTraceContext *glContext = getGLTraceContext();
   22331 
   22332     glmsg.set_function(GLMessage::glGetTexGenivOES);
   22333 
   22334     // copy argument coord
   22335     GLMessage_DataType *arg_coord = glmsg.add_args();
   22336     arg_coord->set_isarray(false);
   22337     arg_coord->set_type(GLMessage::DataType::ENUM);
   22338     arg_coord->add_intvalue((int)coord);
   22339 
   22340     // copy argument pname
   22341     GLMessage_DataType *arg_pname = glmsg.add_args();
   22342     arg_pname->set_isarray(false);
   22343     arg_pname->set_type(GLMessage::DataType::ENUM);
   22344     arg_pname->add_intvalue((int)pname);
   22345 
   22346     // copy argument params
   22347     GLMessage_DataType *arg_params = glmsg.add_args();
   22348     arg_params->set_isarray(false);
   22349     arg_params->set_type(GLMessage::DataType::INT);
   22350     arg_params->add_intvalue((int)params);
   22351 
   22352     // call function
   22353     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22354     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22355     glContext->hooks->gl.glGetTexGenivOES(coord, pname, params);
   22356     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22357     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22358 
   22359     void *pointerArgs[] = {
   22360         (void *) params,
   22361     };
   22362 
   22363     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22364                               threadStartTime, threadEndTime,
   22365                               &glmsg, pointerArgs);
   22366     glContext->traceGLMessage(&glmsg);
   22367 }
   22368 
   22369 void GLTrace_glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) {
   22370     GLMessage glmsg;
   22371     GLTraceContext *glContext = getGLTraceContext();
   22372 
   22373     glmsg.set_function(GLMessage::glGetTexGenxvOES);
   22374 
   22375     // copy argument coord
   22376     GLMessage_DataType *arg_coord = glmsg.add_args();
   22377     arg_coord->set_isarray(false);
   22378     arg_coord->set_type(GLMessage::DataType::ENUM);
   22379     arg_coord->add_intvalue((int)coord);
   22380 
   22381     // copy argument pname
   22382     GLMessage_DataType *arg_pname = glmsg.add_args();
   22383     arg_pname->set_isarray(false);
   22384     arg_pname->set_type(GLMessage::DataType::ENUM);
   22385     arg_pname->add_intvalue((int)pname);
   22386 
   22387     // copy argument params
   22388     GLMessage_DataType *arg_params = glmsg.add_args();
   22389     arg_params->set_isarray(false);
   22390     arg_params->set_type(GLMessage::DataType::INT);
   22391     arg_params->add_intvalue((int)params);
   22392 
   22393     // call function
   22394     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22395     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22396     glContext->hooks->gl.glGetTexGenxvOES(coord, pname, params);
   22397     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22398     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22399 
   22400     void *pointerArgs[] = {
   22401         (void *) params,
   22402     };
   22403 
   22404     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22405                               threadStartTime, threadEndTime,
   22406                               &glmsg, pointerArgs);
   22407     glContext->traceGLMessage(&glmsg);
   22408 }
   22409 
   22410 void GLTrace_glClipPlanefIMG(GLenum p, const GLfloat *eqn) {
   22411     GLMessage glmsg;
   22412     GLTraceContext *glContext = getGLTraceContext();
   22413 
   22414     glmsg.set_function(GLMessage::glClipPlanefIMG);
   22415 
   22416     // copy argument p
   22417     GLMessage_DataType *arg_p = glmsg.add_args();
   22418     arg_p->set_isarray(false);
   22419     arg_p->set_type(GLMessage::DataType::ENUM);
   22420     arg_p->add_intvalue((int)p);
   22421 
   22422     // copy argument eqn
   22423     GLMessage_DataType *arg_eqn = glmsg.add_args();
   22424     arg_eqn->set_isarray(false);
   22425     arg_eqn->set_type(GLMessage::DataType::INT);
   22426     arg_eqn->add_intvalue((int)eqn);
   22427 
   22428     // call function
   22429     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22430     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22431     glContext->hooks->gl.glClipPlanefIMG(p, eqn);
   22432     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22433     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22434 
   22435     void *pointerArgs[] = {
   22436         (void *) eqn,
   22437     };
   22438 
   22439     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22440                               threadStartTime, threadEndTime,
   22441                               &glmsg, pointerArgs);
   22442     glContext->traceGLMessage(&glmsg);
   22443 }
   22444 
   22445 void GLTrace_glClipPlanexIMG(GLenum p, const GLfixed *eqn) {
   22446     GLMessage glmsg;
   22447     GLTraceContext *glContext = getGLTraceContext();
   22448 
   22449     glmsg.set_function(GLMessage::glClipPlanexIMG);
   22450 
   22451     // copy argument p
   22452     GLMessage_DataType *arg_p = glmsg.add_args();
   22453     arg_p->set_isarray(false);
   22454     arg_p->set_type(GLMessage::DataType::ENUM);
   22455     arg_p->add_intvalue((int)p);
   22456 
   22457     // copy argument eqn
   22458     GLMessage_DataType *arg_eqn = glmsg.add_args();
   22459     arg_eqn->set_isarray(false);
   22460     arg_eqn->set_type(GLMessage::DataType::INT);
   22461     arg_eqn->add_intvalue((int)eqn);
   22462 
   22463     // call function
   22464     nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22465     nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
   22466     glContext->hooks->gl.glClipPlanexIMG(p, eqn);
   22467     nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
   22468     nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
   22469 
   22470     void *pointerArgs[] = {
   22471         (void *) eqn,
   22472     };
   22473 
   22474     fixupGLMessage(glContext, wallStartTime, wallEndTime,
   22475                               threadStartTime, threadEndTime,
   22476                               &glmsg, pointerArgs);
   22477     glContext->traceGLMessage(&glmsg);
   22478 }
   22479 
   22480 
   22481 }; // namespace gltrace
   22482 }; // namespace android
   22483