10469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy/*
20469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * Copyright 2011, The Android Open Source Project
30469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy *
40469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * Licensed under the Apache License, Version 2.0 (the "License");
50469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * you may not use this file except in compliance with the License.
60469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * You may obtain a copy of the License at
70469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy *
80469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy *     http://www.apache.org/licenses/LICENSE-2.0
90469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy *
100469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * Unless required by applicable law or agreed to in writing, software
110469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * distributed under the License is distributed on an "AS IS" BASIS,
120469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * See the License for the specific language governing permissions and
140469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * limitations under the License.
150469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy *
160469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy * THIS FILE WAS GENERATED BY A SCRIPT. DO NOT EDIT.
170469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy */
180469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
190469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy#include <cutils/log.h>
2056ac6ff9bdc3c117e820c5a361ab45049c8b03f8Siva Velusamy#include <utils/Timers.h>
210469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
220469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy#include "gltrace.pb.h"
230469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy#include "gltrace_context.h"
240469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy#include "gltrace_fixup.h"
250469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy#include "gltrace_transport.h"
260469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
270469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamynamespace android {
280469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamynamespace gltrace {
290469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
304c0596f4cc7d3a0bbbe5862cb38585a58ef4d0a3Jesse Hall// Definitions for GL2 APIs
310469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
320469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glActiveTexture(GLenum texture) {
330469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
340469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
350469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
360469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glActiveTexture);
370469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
380469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument texture
390469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_texture = glmsg.add_args();
400469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_texture->set_isarray(false);
410469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_texture->set_type(GLMessage::DataType::ENUM);
420469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_texture->add_intvalue((int)texture);
430469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
440469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
4505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
4605df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
470469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glActiveTexture(texture);
4805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
4905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
500469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
519801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
529801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
539801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
5405df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
5505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
569801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
5793a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
580469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
590469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
600469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glAttachShader(GLuint program, GLuint shader) {
610469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
620469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
630469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
640469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glAttachShader);
650469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
660469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument program
670469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_program = glmsg.add_args();
680469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_program->set_isarray(false);
690469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_program->set_type(GLMessage::DataType::INT);
700469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_program->add_intvalue(program);
710469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
720469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument shader
730469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_shader = glmsg.add_args();
740469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_shader->set_isarray(false);
750469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_shader->set_type(GLMessage::DataType::INT);
760469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_shader->add_intvalue(shader);
770469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
780469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
7905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
8005df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
810469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glAttachShader(program, shader);
8205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
8305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
840469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
859801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
869801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
879801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
8805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
8905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
909801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
9193a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
920469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
930469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
943703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hallvoid GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar * name) {
950469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
960469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
970469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
980469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBindAttribLocation);
990469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1000469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument program
1010469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_program = glmsg.add_args();
1020469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_program->set_isarray(false);
1030469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_program->set_type(GLMessage::DataType::INT);
1040469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_program->add_intvalue(program);
1050469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1060469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument index
1070469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_index = glmsg.add_args();
1080469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_index->set_isarray(false);
1090469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_index->set_type(GLMessage::DataType::INT);
1100469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_index->add_intvalue(index);
1110469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1120469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument name
1130469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_name = glmsg.add_args();
1140469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_name->set_isarray(false);
11539177b4103f7c8f1f9903b3f52e83048fc066235Siva Velusamy    arg_name->set_type(GLMessage::DataType::INT64);
11639177b4103f7c8f1f9903b3f52e83048fc066235Siva Velusamy    arg_name->add_int64value((uintptr_t)name);
1170469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1180469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
11905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
12005df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
1210469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBindAttribLocation(program, index, name);
12205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
12305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
1240469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1259801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
1269801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy        (void *) name,
1279801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
1289801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
12905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
13005df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
1319801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
13293a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
1330469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
1340469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1350469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBindBuffer(GLenum target, GLuint buffer) {
1360469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
1370469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
1380469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1390469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBindBuffer);
1400469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1410469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument target
1420469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_target = glmsg.add_args();
1430469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_isarray(false);
1440469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_type(GLMessage::DataType::ENUM);
1450469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->add_intvalue((int)target);
1460469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1470469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument buffer
1480469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_buffer = glmsg.add_args();
1490469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_buffer->set_isarray(false);
1500469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_buffer->set_type(GLMessage::DataType::INT);
1510469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_buffer->add_intvalue(buffer);
1520469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1530469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
15405df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
15505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
1560469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBindBuffer(target, buffer);
15705df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
15805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
1590469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1609801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
1619801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
1629801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
16305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
16405df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
1659801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
16693a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
1670469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
1680469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1690469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer) {
1700469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
1710469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
1720469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1730469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBindFramebuffer);
1740469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1750469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument target
1760469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_target = glmsg.add_args();
1770469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_isarray(false);
1780469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_type(GLMessage::DataType::ENUM);
1790469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->add_intvalue((int)target);
1800469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1810469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument framebuffer
1820469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_framebuffer = glmsg.add_args();
1830469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_framebuffer->set_isarray(false);
1840469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_framebuffer->set_type(GLMessage::DataType::INT);
1850469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_framebuffer->add_intvalue(framebuffer);
1860469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1870469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
18805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
18905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
1900469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBindFramebuffer(target, framebuffer);
19105df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
19205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
1930469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
1949801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
1959801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
1969801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
19705df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
19805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
1999801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
20093a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
2010469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
2020469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2030469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer) {
2040469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
2050469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
2060469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2070469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBindRenderbuffer);
2080469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2090469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument target
2100469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_target = glmsg.add_args();
2110469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_isarray(false);
2120469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_type(GLMessage::DataType::ENUM);
2130469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->add_intvalue((int)target);
2140469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2150469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument renderbuffer
2160469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_renderbuffer = glmsg.add_args();
2170469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_renderbuffer->set_isarray(false);
2180469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_renderbuffer->set_type(GLMessage::DataType::INT);
2190469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_renderbuffer->add_intvalue(renderbuffer);
2200469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2210469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
22205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
22305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
2240469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBindRenderbuffer(target, renderbuffer);
22505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
22605df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
2270469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2289801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
2299801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
2309801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
23105df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
23205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
2339801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
23493a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
2350469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
2360469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2370469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBindTexture(GLenum target, GLuint texture) {
2380469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
2390469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
2400469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2410469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBindTexture);
2420469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2430469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument target
2440469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_target = glmsg.add_args();
2450469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_isarray(false);
2460469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->set_type(GLMessage::DataType::ENUM);
2470469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_target->add_intvalue((int)target);
2480469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2490469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument texture
2500469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_texture = glmsg.add_args();
2510469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_texture->set_isarray(false);
2520469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_texture->set_type(GLMessage::DataType::INT);
2530469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_texture->add_intvalue(texture);
2540469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2550469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
25605df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
25705df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
2580469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBindTexture(target, texture);
25905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
26005df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
2610469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2629801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
2639801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
2649801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
26505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
26605df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
2679801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
26893a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
2690469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
2700469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2714774338bd0ad1ebe42c311fd0c72f13786b5c800Jesse Hallvoid GLTrace_glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
2720469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
2730469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
2740469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2750469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBlendColor);
2760469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2770469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument red
2780469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_red = glmsg.add_args();
2790469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_red->set_isarray(false);
2800469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_red->set_type(GLMessage::DataType::FLOAT);
2810469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_red->add_floatvalue(red);
2820469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2830469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument green
2840469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_green = glmsg.add_args();
2850469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_green->set_isarray(false);
2860469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_green->set_type(GLMessage::DataType::FLOAT);
2870469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_green->add_floatvalue(green);
2880469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2890469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument blue
2900469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_blue = glmsg.add_args();
2910469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_blue->set_isarray(false);
2920469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_blue->set_type(GLMessage::DataType::FLOAT);
2930469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_blue->add_floatvalue(blue);
2940469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
2950469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument alpha
2960469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_alpha = glmsg.add_args();
2970469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_alpha->set_isarray(false);
2980469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_alpha->set_type(GLMessage::DataType::FLOAT);
2990469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_alpha->add_floatvalue(alpha);
3000469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3010469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
30205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
30305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
3040469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBlendColor(red, green, blue, alpha);
30505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
30605df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
3070469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3089801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
3099801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
3109801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
31105df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
31205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
3139801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
31493a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
3150469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
3160469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3170469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBlendEquation(GLenum mode) {
3180469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
3190469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
3200469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3210469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBlendEquation);
3220469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3230469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument mode
3240469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_mode = glmsg.add_args();
3250469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_mode->set_isarray(false);
3260469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_mode->set_type(GLMessage::DataType::ENUM);
3270469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_mode->add_intvalue((int)mode);
3280469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3290469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
33005df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
33105df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
3320469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBlendEquation(mode);
33305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
33405df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
3350469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3369801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
3379801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
3389801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
33905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
34005df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
3419801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
34293a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
3430469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
3440469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3450469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) {
3460469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
3470469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
3480469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3490469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBlendEquationSeparate);
3500469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3510469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument modeRGB
3520469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_modeRGB = glmsg.add_args();
3530469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_modeRGB->set_isarray(false);
3540469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_modeRGB->set_type(GLMessage::DataType::ENUM);
3550469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_modeRGB->add_intvalue((int)modeRGB);
3560469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3570469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument modeAlpha
3580469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_modeAlpha = glmsg.add_args();
3590469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_modeAlpha->set_isarray(false);
3600469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_modeAlpha->set_type(GLMessage::DataType::ENUM);
3610469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_modeAlpha->add_intvalue((int)modeAlpha);
3620469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3630469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
36405df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
36505df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
3660469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBlendEquationSeparate(modeRGB, modeAlpha);
36705df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
36805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
3690469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3709801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
3719801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
3729801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
37305df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
37405df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
3759801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
37693a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
3770469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
3780469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3790469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamyvoid GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor) {
3800469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
3810469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
3820469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3830469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBlendFunc);
3840469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3850469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument sfactor
3860469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_sfactor = glmsg.add_args();
3870469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_sfactor->set_isarray(false);
3880469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_sfactor->set_type(GLMessage::DataType::ENUM);
3890469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_sfactor->add_intvalue((int)sfactor);
3900469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3910469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // copy argument dfactor
3920469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage_DataType *arg_dfactor = glmsg.add_args();
3930469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_dfactor->set_isarray(false);
3940469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_dfactor->set_type(GLMessage::DataType::ENUM);
3950469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    arg_dfactor->add_intvalue((int)dfactor);
3960469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
3970469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    // call function
39805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC);
39905df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD);
4000469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glContext->hooks->gl.glBlendFunc(sfactor, dfactor);
40105df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);
40205df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC);
4030469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
4049801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    void *pointerArgs[] = {
4059801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy    };
4069801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy
40705df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy    fixupGLMessage(glContext, wallStartTime, wallEndTime,
40805df4504e57657994a89e424b6881ee26d0f313cSiva Velusamy                              threadStartTime, threadEndTime,
4099801142afbe3d906259b634ef3bc8bebdafe0083Siva Velusamy                              &glmsg, pointerArgs);
41093a826f78f6313db791e6fc880439189897651b3Siva Velusamy    glContext->traceGLMessage(&glmsg);
4110469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy}
4120469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
4133703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hallvoid GLTrace_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) {
4140469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLMessage glmsg;
4150469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    GLTraceContext *glContext = getGLTraceContext();
4160469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
4170469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy    glmsg.set_function(GLMessage::glBlendFuncSeparate);
4180469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
4193703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    // copy argument sfactorRGB
4203703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    GLMessage_DataType *arg_sfactorRGB = glmsg.add_args();
4213703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    arg_sfactorRGB->set_isarray(false);
4223703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    arg_sfactorRGB->set_type(GLMessage::DataType::ENUM);
4233703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    arg_sfactorRGB->add_intvalue((int)sfactorRGB);
4240469dd6d55fa331bfd7de9431da98b6340d82271Siva Velusamy
4253703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    // copy argument dfactorRGB
4263703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    GLMessage_DataType *arg_dfactorRGB = glmsg.add_args();
4273703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    arg_dfactorRGB->set_isarray(false);
4283703f7f014846b8bf83e08a8bf25450dd0dcd7afJesse Hall    arg_dfactorRGB->set_type(GLMessage::DataType::ENUM);
429