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