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 22 #include "gltrace.pb.h" 23 #include "gltrace_context.h" 24 #include "gltrace_fixup.h" 25 #include "gltrace_transport.h" 26 27 namespace android { 28 namespace gltrace { 29 30 // Definitions for GL2 APIs 31 32 void GLTrace_glActiveTexture(GLenum texture) { 33 GLMessage glmsg; 34 GLTraceContext *glContext = getGLTraceContext(); 35 36 glmsg.set_function(GLMessage::glActiveTexture); 37 38 // copy argument texture 39 GLMessage_DataType *arg_texture = glmsg.add_args(); 40 arg_texture->set_isarray(false); 41 arg_texture->set_type(GLMessage::DataType::ENUM); 42 arg_texture->add_intvalue((int)texture); 43 44 // call function 45 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 46 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 47 glContext->hooks->gl.glActiveTexture(texture); 48 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 49 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 50 51 void *pointerArgs[] = { 52 }; 53 54 fixupGLMessage(glContext, wallStartTime, wallEndTime, 55 threadStartTime, threadEndTime, 56 &glmsg, pointerArgs); 57 glContext->traceGLMessage(&glmsg); 58 } 59 60 void GLTrace_glAttachShader(GLuint program, GLuint shader) { 61 GLMessage glmsg; 62 GLTraceContext *glContext = getGLTraceContext(); 63 64 glmsg.set_function(GLMessage::glAttachShader); 65 66 // copy argument program 67 GLMessage_DataType *arg_program = glmsg.add_args(); 68 arg_program->set_isarray(false); 69 arg_program->set_type(GLMessage::DataType::INT); 70 arg_program->add_intvalue(program); 71 72 // copy argument shader 73 GLMessage_DataType *arg_shader = glmsg.add_args(); 74 arg_shader->set_isarray(false); 75 arg_shader->set_type(GLMessage::DataType::INT); 76 arg_shader->add_intvalue(shader); 77 78 // call function 79 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 80 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 81 glContext->hooks->gl.glAttachShader(program, shader); 82 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 83 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 84 85 void *pointerArgs[] = { 86 }; 87 88 fixupGLMessage(glContext, wallStartTime, wallEndTime, 89 threadStartTime, threadEndTime, 90 &glmsg, pointerArgs); 91 glContext->traceGLMessage(&glmsg); 92 } 93 94 void GLTrace_glBindAttribLocation(GLuint program, GLuint index, const GLchar * name) { 95 GLMessage glmsg; 96 GLTraceContext *glContext = getGLTraceContext(); 97 98 glmsg.set_function(GLMessage::glBindAttribLocation); 99 100 // copy argument program 101 GLMessage_DataType *arg_program = glmsg.add_args(); 102 arg_program->set_isarray(false); 103 arg_program->set_type(GLMessage::DataType::INT); 104 arg_program->add_intvalue(program); 105 106 // copy argument index 107 GLMessage_DataType *arg_index = glmsg.add_args(); 108 arg_index->set_isarray(false); 109 arg_index->set_type(GLMessage::DataType::INT); 110 arg_index->add_intvalue(index); 111 112 // copy argument name 113 GLMessage_DataType *arg_name = glmsg.add_args(); 114 arg_name->set_isarray(false); 115 arg_name->set_type(GLMessage::DataType::INT64); 116 arg_name->add_int64value((uintptr_t)name); 117 118 // call function 119 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 120 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 121 glContext->hooks->gl.glBindAttribLocation(program, index, name); 122 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 123 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 124 125 void *pointerArgs[] = { 126 (void *) name, 127 }; 128 129 fixupGLMessage(glContext, wallStartTime, wallEndTime, 130 threadStartTime, threadEndTime, 131 &glmsg, pointerArgs); 132 glContext->traceGLMessage(&glmsg); 133 } 134 135 void GLTrace_glBindBuffer(GLenum target, GLuint buffer) { 136 GLMessage glmsg; 137 GLTraceContext *glContext = getGLTraceContext(); 138 139 glmsg.set_function(GLMessage::glBindBuffer); 140 141 // copy argument target 142 GLMessage_DataType *arg_target = glmsg.add_args(); 143 arg_target->set_isarray(false); 144 arg_target->set_type(GLMessage::DataType::ENUM); 145 arg_target->add_intvalue((int)target); 146 147 // copy argument buffer 148 GLMessage_DataType *arg_buffer = glmsg.add_args(); 149 arg_buffer->set_isarray(false); 150 arg_buffer->set_type(GLMessage::DataType::INT); 151 arg_buffer->add_intvalue(buffer); 152 153 // call function 154 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 155 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 156 glContext->hooks->gl.glBindBuffer(target, buffer); 157 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 158 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 159 160 void *pointerArgs[] = { 161 }; 162 163 fixupGLMessage(glContext, wallStartTime, wallEndTime, 164 threadStartTime, threadEndTime, 165 &glmsg, pointerArgs); 166 glContext->traceGLMessage(&glmsg); 167 } 168 169 void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer) { 170 GLMessage glmsg; 171 GLTraceContext *glContext = getGLTraceContext(); 172 173 glmsg.set_function(GLMessage::glBindFramebuffer); 174 175 // copy argument target 176 GLMessage_DataType *arg_target = glmsg.add_args(); 177 arg_target->set_isarray(false); 178 arg_target->set_type(GLMessage::DataType::ENUM); 179 arg_target->add_intvalue((int)target); 180 181 // copy argument framebuffer 182 GLMessage_DataType *arg_framebuffer = glmsg.add_args(); 183 arg_framebuffer->set_isarray(false); 184 arg_framebuffer->set_type(GLMessage::DataType::INT); 185 arg_framebuffer->add_intvalue(framebuffer); 186 187 // call function 188 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 189 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 190 glContext->hooks->gl.glBindFramebuffer(target, framebuffer); 191 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 192 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 193 194 void *pointerArgs[] = { 195 }; 196 197 fixupGLMessage(glContext, wallStartTime, wallEndTime, 198 threadStartTime, threadEndTime, 199 &glmsg, pointerArgs); 200 glContext->traceGLMessage(&glmsg); 201 } 202 203 void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer) { 204 GLMessage glmsg; 205 GLTraceContext *glContext = getGLTraceContext(); 206 207 glmsg.set_function(GLMessage::glBindRenderbuffer); 208 209 // copy argument target 210 GLMessage_DataType *arg_target = glmsg.add_args(); 211 arg_target->set_isarray(false); 212 arg_target->set_type(GLMessage::DataType::ENUM); 213 arg_target->add_intvalue((int)target); 214 215 // copy argument renderbuffer 216 GLMessage_DataType *arg_renderbuffer = glmsg.add_args(); 217 arg_renderbuffer->set_isarray(false); 218 arg_renderbuffer->set_type(GLMessage::DataType::INT); 219 arg_renderbuffer->add_intvalue(renderbuffer); 220 221 // call function 222 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 223 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 224 glContext->hooks->gl.glBindRenderbuffer(target, renderbuffer); 225 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 226 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 227 228 void *pointerArgs[] = { 229 }; 230 231 fixupGLMessage(glContext, wallStartTime, wallEndTime, 232 threadStartTime, threadEndTime, 233 &glmsg, pointerArgs); 234 glContext->traceGLMessage(&glmsg); 235 } 236 237 void GLTrace_glBindTexture(GLenum target, GLuint texture) { 238 GLMessage glmsg; 239 GLTraceContext *glContext = getGLTraceContext(); 240 241 glmsg.set_function(GLMessage::glBindTexture); 242 243 // copy argument target 244 GLMessage_DataType *arg_target = glmsg.add_args(); 245 arg_target->set_isarray(false); 246 arg_target->set_type(GLMessage::DataType::ENUM); 247 arg_target->add_intvalue((int)target); 248 249 // copy argument texture 250 GLMessage_DataType *arg_texture = glmsg.add_args(); 251 arg_texture->set_isarray(false); 252 arg_texture->set_type(GLMessage::DataType::INT); 253 arg_texture->add_intvalue(texture); 254 255 // call function 256 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 257 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 258 glContext->hooks->gl.glBindTexture(target, texture); 259 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 260 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 261 262 void *pointerArgs[] = { 263 }; 264 265 fixupGLMessage(glContext, wallStartTime, wallEndTime, 266 threadStartTime, threadEndTime, 267 &glmsg, pointerArgs); 268 glContext->traceGLMessage(&glmsg); 269 } 270 271 void GLTrace_glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { 272 GLMessage glmsg; 273 GLTraceContext *glContext = getGLTraceContext(); 274 275 glmsg.set_function(GLMessage::glBlendColor); 276 277 // copy argument red 278 GLMessage_DataType *arg_red = glmsg.add_args(); 279 arg_red->set_isarray(false); 280 arg_red->set_type(GLMessage::DataType::FLOAT); 281 arg_red->add_floatvalue(red); 282 283 // copy argument green 284 GLMessage_DataType *arg_green = glmsg.add_args(); 285 arg_green->set_isarray(false); 286 arg_green->set_type(GLMessage::DataType::FLOAT); 287 arg_green->add_floatvalue(green); 288 289 // copy argument blue 290 GLMessage_DataType *arg_blue = glmsg.add_args(); 291 arg_blue->set_isarray(false); 292 arg_blue->set_type(GLMessage::DataType::FLOAT); 293 arg_blue->add_floatvalue(blue); 294 295 // copy argument alpha 296 GLMessage_DataType *arg_alpha = glmsg.add_args(); 297 arg_alpha->set_isarray(false); 298 arg_alpha->set_type(GLMessage::DataType::FLOAT); 299 arg_alpha->add_floatvalue(alpha); 300 301 // call function 302 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 303 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 304 glContext->hooks->gl.glBlendColor(red, green, blue, alpha); 305 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 306 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 307 308 void *pointerArgs[] = { 309 }; 310 311 fixupGLMessage(glContext, wallStartTime, wallEndTime, 312 threadStartTime, threadEndTime, 313 &glmsg, pointerArgs); 314 glContext->traceGLMessage(&glmsg); 315 } 316 317 void GLTrace_glBlendEquation(GLenum mode) { 318 GLMessage glmsg; 319 GLTraceContext *glContext = getGLTraceContext(); 320 321 glmsg.set_function(GLMessage::glBlendEquation); 322 323 // copy argument mode 324 GLMessage_DataType *arg_mode = glmsg.add_args(); 325 arg_mode->set_isarray(false); 326 arg_mode->set_type(GLMessage::DataType::ENUM); 327 arg_mode->add_intvalue((int)mode); 328 329 // call function 330 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 331 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 332 glContext->hooks->gl.glBlendEquation(mode); 333 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 334 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 335 336 void *pointerArgs[] = { 337 }; 338 339 fixupGLMessage(glContext, wallStartTime, wallEndTime, 340 threadStartTime, threadEndTime, 341 &glmsg, pointerArgs); 342 glContext->traceGLMessage(&glmsg); 343 } 344 345 void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { 346 GLMessage glmsg; 347 GLTraceContext *glContext = getGLTraceContext(); 348 349 glmsg.set_function(GLMessage::glBlendEquationSeparate); 350 351 // copy argument modeRGB 352 GLMessage_DataType *arg_modeRGB = glmsg.add_args(); 353 arg_modeRGB->set_isarray(false); 354 arg_modeRGB->set_type(GLMessage::DataType::ENUM); 355 arg_modeRGB->add_intvalue((int)modeRGB); 356 357 // copy argument modeAlpha 358 GLMessage_DataType *arg_modeAlpha = glmsg.add_args(); 359 arg_modeAlpha->set_isarray(false); 360 arg_modeAlpha->set_type(GLMessage::DataType::ENUM); 361 arg_modeAlpha->add_intvalue((int)modeAlpha); 362 363 // call function 364 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 365 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 366 glContext->hooks->gl.glBlendEquationSeparate(modeRGB, modeAlpha); 367 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 368 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 369 370 void *pointerArgs[] = { 371 }; 372 373 fixupGLMessage(glContext, wallStartTime, wallEndTime, 374 threadStartTime, threadEndTime, 375 &glmsg, pointerArgs); 376 glContext->traceGLMessage(&glmsg); 377 } 378 379 void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor) { 380 GLMessage glmsg; 381 GLTraceContext *glContext = getGLTraceContext(); 382 383 glmsg.set_function(GLMessage::glBlendFunc); 384 385 // copy argument sfactor 386 GLMessage_DataType *arg_sfactor = glmsg.add_args(); 387 arg_sfactor->set_isarray(false); 388 arg_sfactor->set_type(GLMessage::DataType::ENUM); 389 arg_sfactor->add_intvalue((int)sfactor); 390 391 // copy argument dfactor 392 GLMessage_DataType *arg_dfactor = glmsg.add_args(); 393 arg_dfactor->set_isarray(false); 394 arg_dfactor->set_type(GLMessage::DataType::ENUM); 395 arg_dfactor->add_intvalue((int)dfactor); 396 397 // call function 398 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 399 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 400 glContext->hooks->gl.glBlendFunc(sfactor, dfactor); 401 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 402 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 403 404 void *pointerArgs[] = { 405 }; 406 407 fixupGLMessage(glContext, wallStartTime, wallEndTime, 408 threadStartTime, threadEndTime, 409 &glmsg, pointerArgs); 410 glContext->traceGLMessage(&glmsg); 411 } 412 413 void GLTrace_glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) { 414 GLMessage glmsg; 415 GLTraceContext *glContext = getGLTraceContext(); 416 417 glmsg.set_function(GLMessage::glBlendFuncSeparate); 418 419 // copy argument sfactorRGB 420 GLMessage_DataType *arg_sfactorRGB = glmsg.add_args(); 421 arg_sfactorRGB->set_isarray(false); 422 arg_sfactorRGB->set_type(GLMessage::DataType::ENUM); 423 arg_sfactorRGB->add_intvalue((int)sfactorRGB); 424 425 // copy argument dfactorRGB 426 GLMessage_DataType *arg_dfactorRGB = glmsg.add_args(); 427 arg_dfactorRGB->set_isarray(false); 428 arg_dfactorRGB->set_type(GLMessage::DataType::ENUM); 429 arg_dfactorRGB->add_intvalue((int)dfactorRGB); 430 431 // copy argument sfactorAlpha 432 GLMessage_DataType *arg_sfactorAlpha = glmsg.add_args(); 433 arg_sfactorAlpha->set_isarray(false); 434 arg_sfactorAlpha->set_type(GLMessage::DataType::ENUM); 435 arg_sfactorAlpha->add_intvalue((int)sfactorAlpha); 436 437 // copy argument dfactorAlpha 438 GLMessage_DataType *arg_dfactorAlpha = glmsg.add_args(); 439 arg_dfactorAlpha->set_isarray(false); 440 arg_dfactorAlpha->set_type(GLMessage::DataType::ENUM); 441 arg_dfactorAlpha->add_intvalue((int)dfactorAlpha); 442 443 // call function 444 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 445 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 446 glContext->hooks->gl.glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); 447 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 448 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 449 450 void *pointerArgs[] = { 451 }; 452 453 fixupGLMessage(glContext, wallStartTime, wallEndTime, 454 threadStartTime, threadEndTime, 455 &glmsg, pointerArgs); 456 glContext->traceGLMessage(&glmsg); 457 } 458 459 void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const void * data, GLenum usage) { 460 GLMessage glmsg; 461 GLTraceContext *glContext = getGLTraceContext(); 462 463 glmsg.set_function(GLMessage::glBufferData); 464 465 // copy argument target 466 GLMessage_DataType *arg_target = glmsg.add_args(); 467 arg_target->set_isarray(false); 468 arg_target->set_type(GLMessage::DataType::ENUM); 469 arg_target->add_intvalue((int)target); 470 471 // copy argument size 472 GLMessage_DataType *arg_size = glmsg.add_args(); 473 arg_size->set_isarray(false); 474 arg_size->set_type(GLMessage::DataType::INT); 475 arg_size->add_intvalue(size); 476 477 // copy argument data 478 GLMessage_DataType *arg_data = glmsg.add_args(); 479 arg_data->set_isarray(false); 480 arg_data->set_type(GLMessage::DataType::INT64); 481 arg_data->add_int64value((uintptr_t)data); 482 483 // copy argument usage 484 GLMessage_DataType *arg_usage = glmsg.add_args(); 485 arg_usage->set_isarray(false); 486 arg_usage->set_type(GLMessage::DataType::ENUM); 487 arg_usage->add_intvalue((int)usage); 488 489 // call function 490 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 491 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 492 glContext->hooks->gl.glBufferData(target, size, data, usage); 493 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 494 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 495 496 void *pointerArgs[] = { 497 (void *) data, 498 }; 499 500 fixupGLMessage(glContext, wallStartTime, wallEndTime, 501 threadStartTime, threadEndTime, 502 &glmsg, pointerArgs); 503 glContext->traceGLMessage(&glmsg); 504 } 505 506 void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const void * data) { 507 GLMessage glmsg; 508 GLTraceContext *glContext = getGLTraceContext(); 509 510 glmsg.set_function(GLMessage::glBufferSubData); 511 512 // copy argument target 513 GLMessage_DataType *arg_target = glmsg.add_args(); 514 arg_target->set_isarray(false); 515 arg_target->set_type(GLMessage::DataType::ENUM); 516 arg_target->add_intvalue((int)target); 517 518 // copy argument offset 519 GLMessage_DataType *arg_offset = glmsg.add_args(); 520 arg_offset->set_isarray(false); 521 arg_offset->set_type(GLMessage::DataType::INT); 522 arg_offset->add_intvalue(offset); 523 524 // copy argument size 525 GLMessage_DataType *arg_size = glmsg.add_args(); 526 arg_size->set_isarray(false); 527 arg_size->set_type(GLMessage::DataType::INT); 528 arg_size->add_intvalue(size); 529 530 // copy argument data 531 GLMessage_DataType *arg_data = glmsg.add_args(); 532 arg_data->set_isarray(false); 533 arg_data->set_type(GLMessage::DataType::INT64); 534 arg_data->add_int64value((uintptr_t)data); 535 536 // call function 537 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 538 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 539 glContext->hooks->gl.glBufferSubData(target, offset, size, data); 540 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 541 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 542 543 void *pointerArgs[] = { 544 (void *) data, 545 }; 546 547 fixupGLMessage(glContext, wallStartTime, wallEndTime, 548 threadStartTime, threadEndTime, 549 &glmsg, pointerArgs); 550 glContext->traceGLMessage(&glmsg); 551 } 552 553 GLenum GLTrace_glCheckFramebufferStatus(GLenum target) { 554 GLMessage glmsg; 555 GLTraceContext *glContext = getGLTraceContext(); 556 557 glmsg.set_function(GLMessage::glCheckFramebufferStatus); 558 559 // copy argument target 560 GLMessage_DataType *arg_target = glmsg.add_args(); 561 arg_target->set_isarray(false); 562 arg_target->set_type(GLMessage::DataType::ENUM); 563 arg_target->add_intvalue((int)target); 564 565 // call function 566 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 567 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 568 GLenum retValue = glContext->hooks->gl.glCheckFramebufferStatus(target); 569 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 570 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 571 572 // set return value 573 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 574 rt->set_isarray(false); 575 rt->set_type(GLMessage::DataType::ENUM); 576 rt->add_intvalue((int)retValue); 577 578 void *pointerArgs[] = { 579 }; 580 581 fixupGLMessage(glContext, wallStartTime, wallEndTime, 582 threadStartTime, threadEndTime, 583 &glmsg, pointerArgs); 584 glContext->traceGLMessage(&glmsg); 585 586 return retValue; 587 } 588 589 void GLTrace_glClear(GLbitfield mask) { 590 GLMessage glmsg; 591 GLTraceContext *glContext = getGLTraceContext(); 592 593 glmsg.set_function(GLMessage::glClear); 594 595 // copy argument mask 596 GLMessage_DataType *arg_mask = glmsg.add_args(); 597 arg_mask->set_isarray(false); 598 arg_mask->set_type(GLMessage::DataType::INT); 599 arg_mask->add_intvalue(mask); 600 601 // call function 602 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 603 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 604 glContext->hooks->gl.glClear(mask); 605 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 606 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 607 608 void *pointerArgs[] = { 609 }; 610 611 fixupGLMessage(glContext, wallStartTime, wallEndTime, 612 threadStartTime, threadEndTime, 613 &glmsg, pointerArgs); 614 glContext->traceGLMessage(&glmsg); 615 } 616 617 void GLTrace_glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { 618 GLMessage glmsg; 619 GLTraceContext *glContext = getGLTraceContext(); 620 621 glmsg.set_function(GLMessage::glClearColor); 622 623 // copy argument red 624 GLMessage_DataType *arg_red = glmsg.add_args(); 625 arg_red->set_isarray(false); 626 arg_red->set_type(GLMessage::DataType::FLOAT); 627 arg_red->add_floatvalue(red); 628 629 // copy argument green 630 GLMessage_DataType *arg_green = glmsg.add_args(); 631 arg_green->set_isarray(false); 632 arg_green->set_type(GLMessage::DataType::FLOAT); 633 arg_green->add_floatvalue(green); 634 635 // copy argument blue 636 GLMessage_DataType *arg_blue = glmsg.add_args(); 637 arg_blue->set_isarray(false); 638 arg_blue->set_type(GLMessage::DataType::FLOAT); 639 arg_blue->add_floatvalue(blue); 640 641 // copy argument alpha 642 GLMessage_DataType *arg_alpha = glmsg.add_args(); 643 arg_alpha->set_isarray(false); 644 arg_alpha->set_type(GLMessage::DataType::FLOAT); 645 arg_alpha->add_floatvalue(alpha); 646 647 // call function 648 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 649 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 650 glContext->hooks->gl.glClearColor(red, green, blue, alpha); 651 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 652 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 653 654 void *pointerArgs[] = { 655 }; 656 657 fixupGLMessage(glContext, wallStartTime, wallEndTime, 658 threadStartTime, threadEndTime, 659 &glmsg, pointerArgs); 660 glContext->traceGLMessage(&glmsg); 661 } 662 663 void GLTrace_glClearDepthf(GLfloat d) { 664 GLMessage glmsg; 665 GLTraceContext *glContext = getGLTraceContext(); 666 667 glmsg.set_function(GLMessage::glClearDepthf); 668 669 // copy argument d 670 GLMessage_DataType *arg_d = glmsg.add_args(); 671 arg_d->set_isarray(false); 672 arg_d->set_type(GLMessage::DataType::FLOAT); 673 arg_d->add_floatvalue(d); 674 675 // call function 676 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 677 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 678 glContext->hooks->gl.glClearDepthf(d); 679 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 680 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 681 682 void *pointerArgs[] = { 683 }; 684 685 fixupGLMessage(glContext, wallStartTime, wallEndTime, 686 threadStartTime, threadEndTime, 687 &glmsg, pointerArgs); 688 glContext->traceGLMessage(&glmsg); 689 } 690 691 void GLTrace_glClearStencil(GLint s) { 692 GLMessage glmsg; 693 GLTraceContext *glContext = getGLTraceContext(); 694 695 glmsg.set_function(GLMessage::glClearStencil); 696 697 // copy argument s 698 GLMessage_DataType *arg_s = glmsg.add_args(); 699 arg_s->set_isarray(false); 700 arg_s->set_type(GLMessage::DataType::INT); 701 arg_s->add_intvalue(s); 702 703 // call function 704 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 705 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 706 glContext->hooks->gl.glClearStencil(s); 707 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 708 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 709 710 void *pointerArgs[] = { 711 }; 712 713 fixupGLMessage(glContext, wallStartTime, wallEndTime, 714 threadStartTime, threadEndTime, 715 &glmsg, pointerArgs); 716 glContext->traceGLMessage(&glmsg); 717 } 718 719 void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { 720 GLMessage glmsg; 721 GLTraceContext *glContext = getGLTraceContext(); 722 723 glmsg.set_function(GLMessage::glColorMask); 724 725 // copy argument red 726 GLMessage_DataType *arg_red = glmsg.add_args(); 727 arg_red->set_isarray(false); 728 arg_red->set_type(GLMessage::DataType::BOOL); 729 arg_red->add_boolvalue(red); 730 731 // copy argument green 732 GLMessage_DataType *arg_green = glmsg.add_args(); 733 arg_green->set_isarray(false); 734 arg_green->set_type(GLMessage::DataType::BOOL); 735 arg_green->add_boolvalue(green); 736 737 // copy argument blue 738 GLMessage_DataType *arg_blue = glmsg.add_args(); 739 arg_blue->set_isarray(false); 740 arg_blue->set_type(GLMessage::DataType::BOOL); 741 arg_blue->add_boolvalue(blue); 742 743 // copy argument alpha 744 GLMessage_DataType *arg_alpha = glmsg.add_args(); 745 arg_alpha->set_isarray(false); 746 arg_alpha->set_type(GLMessage::DataType::BOOL); 747 arg_alpha->add_boolvalue(alpha); 748 749 // call function 750 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 751 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 752 glContext->hooks->gl.glColorMask(red, green, blue, alpha); 753 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 754 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 755 756 void *pointerArgs[] = { 757 }; 758 759 fixupGLMessage(glContext, wallStartTime, wallEndTime, 760 threadStartTime, threadEndTime, 761 &glmsg, pointerArgs); 762 glContext->traceGLMessage(&glmsg); 763 } 764 765 void GLTrace_glCompileShader(GLuint shader) { 766 GLMessage glmsg; 767 GLTraceContext *glContext = getGLTraceContext(); 768 769 glmsg.set_function(GLMessage::glCompileShader); 770 771 // copy argument shader 772 GLMessage_DataType *arg_shader = glmsg.add_args(); 773 arg_shader->set_isarray(false); 774 arg_shader->set_type(GLMessage::DataType::INT); 775 arg_shader->add_intvalue(shader); 776 777 // call function 778 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 779 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 780 glContext->hooks->gl.glCompileShader(shader); 781 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 782 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 783 784 void *pointerArgs[] = { 785 }; 786 787 fixupGLMessage(glContext, wallStartTime, wallEndTime, 788 threadStartTime, threadEndTime, 789 &glmsg, pointerArgs); 790 glContext->traceGLMessage(&glmsg); 791 } 792 793 void GLTrace_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void * data) { 794 GLMessage glmsg; 795 GLTraceContext *glContext = getGLTraceContext(); 796 797 glmsg.set_function(GLMessage::glCompressedTexImage2D); 798 799 // copy argument target 800 GLMessage_DataType *arg_target = glmsg.add_args(); 801 arg_target->set_isarray(false); 802 arg_target->set_type(GLMessage::DataType::ENUM); 803 arg_target->add_intvalue((int)target); 804 805 // copy argument level 806 GLMessage_DataType *arg_level = glmsg.add_args(); 807 arg_level->set_isarray(false); 808 arg_level->set_type(GLMessage::DataType::INT); 809 arg_level->add_intvalue(level); 810 811 // copy argument internalformat 812 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 813 arg_internalformat->set_isarray(false); 814 arg_internalformat->set_type(GLMessage::DataType::ENUM); 815 arg_internalformat->add_intvalue((int)internalformat); 816 817 // copy argument width 818 GLMessage_DataType *arg_width = glmsg.add_args(); 819 arg_width->set_isarray(false); 820 arg_width->set_type(GLMessage::DataType::INT); 821 arg_width->add_intvalue(width); 822 823 // copy argument height 824 GLMessage_DataType *arg_height = glmsg.add_args(); 825 arg_height->set_isarray(false); 826 arg_height->set_type(GLMessage::DataType::INT); 827 arg_height->add_intvalue(height); 828 829 // copy argument border 830 GLMessage_DataType *arg_border = glmsg.add_args(); 831 arg_border->set_isarray(false); 832 arg_border->set_type(GLMessage::DataType::INT); 833 arg_border->add_intvalue(border); 834 835 // copy argument imageSize 836 GLMessage_DataType *arg_imageSize = glmsg.add_args(); 837 arg_imageSize->set_isarray(false); 838 arg_imageSize->set_type(GLMessage::DataType::INT); 839 arg_imageSize->add_intvalue(imageSize); 840 841 // copy argument data 842 GLMessage_DataType *arg_data = glmsg.add_args(); 843 arg_data->set_isarray(false); 844 arg_data->set_type(GLMessage::DataType::INT64); 845 arg_data->add_int64value((uintptr_t)data); 846 847 // call function 848 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 849 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 850 glContext->hooks->gl.glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); 851 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 852 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 853 854 void *pointerArgs[] = { 855 (void *) data, 856 }; 857 858 fixupGLMessage(glContext, wallStartTime, wallEndTime, 859 threadStartTime, threadEndTime, 860 &glmsg, pointerArgs); 861 glContext->traceGLMessage(&glmsg); 862 } 863 864 void GLTrace_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void * data) { 865 GLMessage glmsg; 866 GLTraceContext *glContext = getGLTraceContext(); 867 868 glmsg.set_function(GLMessage::glCompressedTexSubImage2D); 869 870 // copy argument target 871 GLMessage_DataType *arg_target = glmsg.add_args(); 872 arg_target->set_isarray(false); 873 arg_target->set_type(GLMessage::DataType::ENUM); 874 arg_target->add_intvalue((int)target); 875 876 // copy argument level 877 GLMessage_DataType *arg_level = glmsg.add_args(); 878 arg_level->set_isarray(false); 879 arg_level->set_type(GLMessage::DataType::INT); 880 arg_level->add_intvalue(level); 881 882 // copy argument xoffset 883 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 884 arg_xoffset->set_isarray(false); 885 arg_xoffset->set_type(GLMessage::DataType::INT); 886 arg_xoffset->add_intvalue(xoffset); 887 888 // copy argument yoffset 889 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 890 arg_yoffset->set_isarray(false); 891 arg_yoffset->set_type(GLMessage::DataType::INT); 892 arg_yoffset->add_intvalue(yoffset); 893 894 // copy argument width 895 GLMessage_DataType *arg_width = glmsg.add_args(); 896 arg_width->set_isarray(false); 897 arg_width->set_type(GLMessage::DataType::INT); 898 arg_width->add_intvalue(width); 899 900 // copy argument height 901 GLMessage_DataType *arg_height = glmsg.add_args(); 902 arg_height->set_isarray(false); 903 arg_height->set_type(GLMessage::DataType::INT); 904 arg_height->add_intvalue(height); 905 906 // copy argument format 907 GLMessage_DataType *arg_format = glmsg.add_args(); 908 arg_format->set_isarray(false); 909 arg_format->set_type(GLMessage::DataType::ENUM); 910 arg_format->add_intvalue((int)format); 911 912 // copy argument imageSize 913 GLMessage_DataType *arg_imageSize = glmsg.add_args(); 914 arg_imageSize->set_isarray(false); 915 arg_imageSize->set_type(GLMessage::DataType::INT); 916 arg_imageSize->add_intvalue(imageSize); 917 918 // copy argument data 919 GLMessage_DataType *arg_data = glmsg.add_args(); 920 arg_data->set_isarray(false); 921 arg_data->set_type(GLMessage::DataType::INT64); 922 arg_data->add_int64value((uintptr_t)data); 923 924 // call function 925 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 926 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 927 glContext->hooks->gl.glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); 928 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 929 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 930 931 void *pointerArgs[] = { 932 (void *) data, 933 }; 934 935 fixupGLMessage(glContext, wallStartTime, wallEndTime, 936 threadStartTime, threadEndTime, 937 &glmsg, pointerArgs); 938 glContext->traceGLMessage(&glmsg); 939 } 940 941 void GLTrace_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { 942 GLMessage glmsg; 943 GLTraceContext *glContext = getGLTraceContext(); 944 945 glmsg.set_function(GLMessage::glCopyTexImage2D); 946 947 // copy argument target 948 GLMessage_DataType *arg_target = glmsg.add_args(); 949 arg_target->set_isarray(false); 950 arg_target->set_type(GLMessage::DataType::ENUM); 951 arg_target->add_intvalue((int)target); 952 953 // copy argument level 954 GLMessage_DataType *arg_level = glmsg.add_args(); 955 arg_level->set_isarray(false); 956 arg_level->set_type(GLMessage::DataType::INT); 957 arg_level->add_intvalue(level); 958 959 // copy argument internalformat 960 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 961 arg_internalformat->set_isarray(false); 962 arg_internalformat->set_type(GLMessage::DataType::ENUM); 963 arg_internalformat->add_intvalue((int)internalformat); 964 965 // copy argument x 966 GLMessage_DataType *arg_x = glmsg.add_args(); 967 arg_x->set_isarray(false); 968 arg_x->set_type(GLMessage::DataType::INT); 969 arg_x->add_intvalue(x); 970 971 // copy argument y 972 GLMessage_DataType *arg_y = glmsg.add_args(); 973 arg_y->set_isarray(false); 974 arg_y->set_type(GLMessage::DataType::INT); 975 arg_y->add_intvalue(y); 976 977 // copy argument width 978 GLMessage_DataType *arg_width = glmsg.add_args(); 979 arg_width->set_isarray(false); 980 arg_width->set_type(GLMessage::DataType::INT); 981 arg_width->add_intvalue(width); 982 983 // copy argument height 984 GLMessage_DataType *arg_height = glmsg.add_args(); 985 arg_height->set_isarray(false); 986 arg_height->set_type(GLMessage::DataType::INT); 987 arg_height->add_intvalue(height); 988 989 // copy argument border 990 GLMessage_DataType *arg_border = glmsg.add_args(); 991 arg_border->set_isarray(false); 992 arg_border->set_type(GLMessage::DataType::INT); 993 arg_border->add_intvalue(border); 994 995 // call function 996 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 997 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 998 glContext->hooks->gl.glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); 999 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1000 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1001 1002 void *pointerArgs[] = { 1003 }; 1004 1005 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1006 threadStartTime, threadEndTime, 1007 &glmsg, pointerArgs); 1008 glContext->traceGLMessage(&glmsg); 1009 } 1010 1011 void GLTrace_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { 1012 GLMessage glmsg; 1013 GLTraceContext *glContext = getGLTraceContext(); 1014 1015 glmsg.set_function(GLMessage::glCopyTexSubImage2D); 1016 1017 // copy argument target 1018 GLMessage_DataType *arg_target = glmsg.add_args(); 1019 arg_target->set_isarray(false); 1020 arg_target->set_type(GLMessage::DataType::ENUM); 1021 arg_target->add_intvalue((int)target); 1022 1023 // copy argument level 1024 GLMessage_DataType *arg_level = glmsg.add_args(); 1025 arg_level->set_isarray(false); 1026 arg_level->set_type(GLMessage::DataType::INT); 1027 arg_level->add_intvalue(level); 1028 1029 // copy argument xoffset 1030 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 1031 arg_xoffset->set_isarray(false); 1032 arg_xoffset->set_type(GLMessage::DataType::INT); 1033 arg_xoffset->add_intvalue(xoffset); 1034 1035 // copy argument yoffset 1036 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 1037 arg_yoffset->set_isarray(false); 1038 arg_yoffset->set_type(GLMessage::DataType::INT); 1039 arg_yoffset->add_intvalue(yoffset); 1040 1041 // copy argument x 1042 GLMessage_DataType *arg_x = glmsg.add_args(); 1043 arg_x->set_isarray(false); 1044 arg_x->set_type(GLMessage::DataType::INT); 1045 arg_x->add_intvalue(x); 1046 1047 // copy argument y 1048 GLMessage_DataType *arg_y = glmsg.add_args(); 1049 arg_y->set_isarray(false); 1050 arg_y->set_type(GLMessage::DataType::INT); 1051 arg_y->add_intvalue(y); 1052 1053 // copy argument width 1054 GLMessage_DataType *arg_width = glmsg.add_args(); 1055 arg_width->set_isarray(false); 1056 arg_width->set_type(GLMessage::DataType::INT); 1057 arg_width->add_intvalue(width); 1058 1059 // copy argument height 1060 GLMessage_DataType *arg_height = glmsg.add_args(); 1061 arg_height->set_isarray(false); 1062 arg_height->set_type(GLMessage::DataType::INT); 1063 arg_height->add_intvalue(height); 1064 1065 // call function 1066 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1067 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1068 glContext->hooks->gl.glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); 1069 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1070 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1071 1072 void *pointerArgs[] = { 1073 }; 1074 1075 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1076 threadStartTime, threadEndTime, 1077 &glmsg, pointerArgs); 1078 glContext->traceGLMessage(&glmsg); 1079 } 1080 1081 GLuint GLTrace_glCreateProgram(void) { 1082 GLMessage glmsg; 1083 GLTraceContext *glContext = getGLTraceContext(); 1084 1085 glmsg.set_function(GLMessage::glCreateProgram); 1086 1087 // call function 1088 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1089 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1090 GLuint retValue = glContext->hooks->gl.glCreateProgram(); 1091 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1092 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1093 1094 // set return value 1095 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 1096 rt->set_isarray(false); 1097 rt->set_type(GLMessage::DataType::INT); 1098 rt->add_intvalue(retValue); 1099 1100 void *pointerArgs[] = { 1101 }; 1102 1103 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1104 threadStartTime, threadEndTime, 1105 &glmsg, pointerArgs); 1106 glContext->traceGLMessage(&glmsg); 1107 1108 return retValue; 1109 } 1110 1111 GLuint GLTrace_glCreateShader(GLenum type) { 1112 GLMessage glmsg; 1113 GLTraceContext *glContext = getGLTraceContext(); 1114 1115 glmsg.set_function(GLMessage::glCreateShader); 1116 1117 // copy argument type 1118 GLMessage_DataType *arg_type = glmsg.add_args(); 1119 arg_type->set_isarray(false); 1120 arg_type->set_type(GLMessage::DataType::ENUM); 1121 arg_type->add_intvalue((int)type); 1122 1123 // call function 1124 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1125 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1126 GLuint retValue = glContext->hooks->gl.glCreateShader(type); 1127 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1128 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1129 1130 // set return value 1131 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 1132 rt->set_isarray(false); 1133 rt->set_type(GLMessage::DataType::INT); 1134 rt->add_intvalue(retValue); 1135 1136 void *pointerArgs[] = { 1137 }; 1138 1139 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1140 threadStartTime, threadEndTime, 1141 &glmsg, pointerArgs); 1142 glContext->traceGLMessage(&glmsg); 1143 1144 return retValue; 1145 } 1146 1147 void GLTrace_glCullFace(GLenum mode) { 1148 GLMessage glmsg; 1149 GLTraceContext *glContext = getGLTraceContext(); 1150 1151 glmsg.set_function(GLMessage::glCullFace); 1152 1153 // copy argument mode 1154 GLMessage_DataType *arg_mode = glmsg.add_args(); 1155 arg_mode->set_isarray(false); 1156 arg_mode->set_type(GLMessage::DataType::ENUM); 1157 arg_mode->add_intvalue((int)mode); 1158 1159 // call function 1160 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1161 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1162 glContext->hooks->gl.glCullFace(mode); 1163 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1164 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1165 1166 void *pointerArgs[] = { 1167 }; 1168 1169 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1170 threadStartTime, threadEndTime, 1171 &glmsg, pointerArgs); 1172 glContext->traceGLMessage(&glmsg); 1173 } 1174 1175 void GLTrace_glDeleteBuffers(GLsizei n, const GLuint * buffers) { 1176 GLMessage glmsg; 1177 GLTraceContext *glContext = getGLTraceContext(); 1178 1179 glmsg.set_function(GLMessage::glDeleteBuffers); 1180 1181 // copy argument n 1182 GLMessage_DataType *arg_n = glmsg.add_args(); 1183 arg_n->set_isarray(false); 1184 arg_n->set_type(GLMessage::DataType::INT); 1185 arg_n->add_intvalue(n); 1186 1187 // copy argument buffers 1188 GLMessage_DataType *arg_buffers = glmsg.add_args(); 1189 arg_buffers->set_isarray(false); 1190 arg_buffers->set_type(GLMessage::DataType::INT64); 1191 arg_buffers->add_int64value((uintptr_t)buffers); 1192 1193 // call function 1194 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1195 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1196 glContext->hooks->gl.glDeleteBuffers(n, buffers); 1197 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1198 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1199 1200 void *pointerArgs[] = { 1201 (void *) buffers, 1202 }; 1203 1204 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1205 threadStartTime, threadEndTime, 1206 &glmsg, pointerArgs); 1207 glContext->traceGLMessage(&glmsg); 1208 } 1209 1210 void GLTrace_glDeleteFramebuffers(GLsizei n, const GLuint * framebuffers) { 1211 GLMessage glmsg; 1212 GLTraceContext *glContext = getGLTraceContext(); 1213 1214 glmsg.set_function(GLMessage::glDeleteFramebuffers); 1215 1216 // copy argument n 1217 GLMessage_DataType *arg_n = glmsg.add_args(); 1218 arg_n->set_isarray(false); 1219 arg_n->set_type(GLMessage::DataType::INT); 1220 arg_n->add_intvalue(n); 1221 1222 // copy argument framebuffers 1223 GLMessage_DataType *arg_framebuffers = glmsg.add_args(); 1224 arg_framebuffers->set_isarray(false); 1225 arg_framebuffers->set_type(GLMessage::DataType::INT64); 1226 arg_framebuffers->add_int64value((uintptr_t)framebuffers); 1227 1228 // call function 1229 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1230 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1231 glContext->hooks->gl.glDeleteFramebuffers(n, framebuffers); 1232 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1233 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1234 1235 void *pointerArgs[] = { 1236 (void *) framebuffers, 1237 }; 1238 1239 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1240 threadStartTime, threadEndTime, 1241 &glmsg, pointerArgs); 1242 glContext->traceGLMessage(&glmsg); 1243 } 1244 1245 void GLTrace_glDeleteProgram(GLuint program) { 1246 GLMessage glmsg; 1247 GLTraceContext *glContext = getGLTraceContext(); 1248 1249 glmsg.set_function(GLMessage::glDeleteProgram); 1250 1251 // copy argument program 1252 GLMessage_DataType *arg_program = glmsg.add_args(); 1253 arg_program->set_isarray(false); 1254 arg_program->set_type(GLMessage::DataType::INT); 1255 arg_program->add_intvalue(program); 1256 1257 // call function 1258 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1259 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1260 glContext->hooks->gl.glDeleteProgram(program); 1261 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1262 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1263 1264 void *pointerArgs[] = { 1265 }; 1266 1267 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1268 threadStartTime, threadEndTime, 1269 &glmsg, pointerArgs); 1270 glContext->traceGLMessage(&glmsg); 1271 } 1272 1273 void GLTrace_glDeleteRenderbuffers(GLsizei n, const GLuint * renderbuffers) { 1274 GLMessage glmsg; 1275 GLTraceContext *glContext = getGLTraceContext(); 1276 1277 glmsg.set_function(GLMessage::glDeleteRenderbuffers); 1278 1279 // copy argument n 1280 GLMessage_DataType *arg_n = glmsg.add_args(); 1281 arg_n->set_isarray(false); 1282 arg_n->set_type(GLMessage::DataType::INT); 1283 arg_n->add_intvalue(n); 1284 1285 // copy argument renderbuffers 1286 GLMessage_DataType *arg_renderbuffers = glmsg.add_args(); 1287 arg_renderbuffers->set_isarray(false); 1288 arg_renderbuffers->set_type(GLMessage::DataType::INT64); 1289 arg_renderbuffers->add_int64value((uintptr_t)renderbuffers); 1290 1291 // call function 1292 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1293 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1294 glContext->hooks->gl.glDeleteRenderbuffers(n, renderbuffers); 1295 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1296 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1297 1298 void *pointerArgs[] = { 1299 (void *) renderbuffers, 1300 }; 1301 1302 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1303 threadStartTime, threadEndTime, 1304 &glmsg, pointerArgs); 1305 glContext->traceGLMessage(&glmsg); 1306 } 1307 1308 void GLTrace_glDeleteShader(GLuint shader) { 1309 GLMessage glmsg; 1310 GLTraceContext *glContext = getGLTraceContext(); 1311 1312 glmsg.set_function(GLMessage::glDeleteShader); 1313 1314 // copy argument shader 1315 GLMessage_DataType *arg_shader = glmsg.add_args(); 1316 arg_shader->set_isarray(false); 1317 arg_shader->set_type(GLMessage::DataType::INT); 1318 arg_shader->add_intvalue(shader); 1319 1320 // call function 1321 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1322 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1323 glContext->hooks->gl.glDeleteShader(shader); 1324 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1325 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1326 1327 void *pointerArgs[] = { 1328 }; 1329 1330 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1331 threadStartTime, threadEndTime, 1332 &glmsg, pointerArgs); 1333 glContext->traceGLMessage(&glmsg); 1334 } 1335 1336 void GLTrace_glDeleteTextures(GLsizei n, const GLuint * textures) { 1337 GLMessage glmsg; 1338 GLTraceContext *glContext = getGLTraceContext(); 1339 1340 glmsg.set_function(GLMessage::glDeleteTextures); 1341 1342 // copy argument n 1343 GLMessage_DataType *arg_n = glmsg.add_args(); 1344 arg_n->set_isarray(false); 1345 arg_n->set_type(GLMessage::DataType::INT); 1346 arg_n->add_intvalue(n); 1347 1348 // copy argument textures 1349 GLMessage_DataType *arg_textures = glmsg.add_args(); 1350 arg_textures->set_isarray(false); 1351 arg_textures->set_type(GLMessage::DataType::INT64); 1352 arg_textures->add_int64value((uintptr_t)textures); 1353 1354 // call function 1355 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1356 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1357 glContext->hooks->gl.glDeleteTextures(n, textures); 1358 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1359 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1360 1361 void *pointerArgs[] = { 1362 (void *) textures, 1363 }; 1364 1365 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1366 threadStartTime, threadEndTime, 1367 &glmsg, pointerArgs); 1368 glContext->traceGLMessage(&glmsg); 1369 } 1370 1371 void GLTrace_glDepthFunc(GLenum func) { 1372 GLMessage glmsg; 1373 GLTraceContext *glContext = getGLTraceContext(); 1374 1375 glmsg.set_function(GLMessage::glDepthFunc); 1376 1377 // copy argument func 1378 GLMessage_DataType *arg_func = glmsg.add_args(); 1379 arg_func->set_isarray(false); 1380 arg_func->set_type(GLMessage::DataType::ENUM); 1381 arg_func->add_intvalue((int)func); 1382 1383 // call function 1384 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1385 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1386 glContext->hooks->gl.glDepthFunc(func); 1387 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1388 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1389 1390 void *pointerArgs[] = { 1391 }; 1392 1393 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1394 threadStartTime, threadEndTime, 1395 &glmsg, pointerArgs); 1396 glContext->traceGLMessage(&glmsg); 1397 } 1398 1399 void GLTrace_glDepthMask(GLboolean flag) { 1400 GLMessage glmsg; 1401 GLTraceContext *glContext = getGLTraceContext(); 1402 1403 glmsg.set_function(GLMessage::glDepthMask); 1404 1405 // copy argument flag 1406 GLMessage_DataType *arg_flag = glmsg.add_args(); 1407 arg_flag->set_isarray(false); 1408 arg_flag->set_type(GLMessage::DataType::BOOL); 1409 arg_flag->add_boolvalue(flag); 1410 1411 // call function 1412 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1413 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1414 glContext->hooks->gl.glDepthMask(flag); 1415 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1416 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1417 1418 void *pointerArgs[] = { 1419 }; 1420 1421 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1422 threadStartTime, threadEndTime, 1423 &glmsg, pointerArgs); 1424 glContext->traceGLMessage(&glmsg); 1425 } 1426 1427 void GLTrace_glDepthRangef(GLfloat n, GLfloat f) { 1428 GLMessage glmsg; 1429 GLTraceContext *glContext = getGLTraceContext(); 1430 1431 glmsg.set_function(GLMessage::glDepthRangef); 1432 1433 // copy argument n 1434 GLMessage_DataType *arg_n = glmsg.add_args(); 1435 arg_n->set_isarray(false); 1436 arg_n->set_type(GLMessage::DataType::FLOAT); 1437 arg_n->add_floatvalue(n); 1438 1439 // copy argument f 1440 GLMessage_DataType *arg_f = glmsg.add_args(); 1441 arg_f->set_isarray(false); 1442 arg_f->set_type(GLMessage::DataType::FLOAT); 1443 arg_f->add_floatvalue(f); 1444 1445 // call function 1446 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1447 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1448 glContext->hooks->gl.glDepthRangef(n, f); 1449 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1450 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1451 1452 void *pointerArgs[] = { 1453 }; 1454 1455 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1456 threadStartTime, threadEndTime, 1457 &glmsg, pointerArgs); 1458 glContext->traceGLMessage(&glmsg); 1459 } 1460 1461 void GLTrace_glDetachShader(GLuint program, GLuint shader) { 1462 GLMessage glmsg; 1463 GLTraceContext *glContext = getGLTraceContext(); 1464 1465 glmsg.set_function(GLMessage::glDetachShader); 1466 1467 // copy argument program 1468 GLMessage_DataType *arg_program = glmsg.add_args(); 1469 arg_program->set_isarray(false); 1470 arg_program->set_type(GLMessage::DataType::INT); 1471 arg_program->add_intvalue(program); 1472 1473 // copy argument shader 1474 GLMessage_DataType *arg_shader = glmsg.add_args(); 1475 arg_shader->set_isarray(false); 1476 arg_shader->set_type(GLMessage::DataType::INT); 1477 arg_shader->add_intvalue(shader); 1478 1479 // call function 1480 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1481 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1482 glContext->hooks->gl.glDetachShader(program, shader); 1483 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1484 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1485 1486 void *pointerArgs[] = { 1487 }; 1488 1489 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1490 threadStartTime, threadEndTime, 1491 &glmsg, pointerArgs); 1492 glContext->traceGLMessage(&glmsg); 1493 } 1494 1495 void GLTrace_glDisable(GLenum cap) { 1496 GLMessage glmsg; 1497 GLTraceContext *glContext = getGLTraceContext(); 1498 1499 glmsg.set_function(GLMessage::glDisable); 1500 1501 // copy argument cap 1502 GLMessage_DataType *arg_cap = glmsg.add_args(); 1503 arg_cap->set_isarray(false); 1504 arg_cap->set_type(GLMessage::DataType::ENUM); 1505 arg_cap->add_intvalue((int)cap); 1506 1507 // call function 1508 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1509 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1510 glContext->hooks->gl.glDisable(cap); 1511 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1512 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1513 1514 void *pointerArgs[] = { 1515 }; 1516 1517 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1518 threadStartTime, threadEndTime, 1519 &glmsg, pointerArgs); 1520 glContext->traceGLMessage(&glmsg); 1521 } 1522 1523 void GLTrace_glDisableVertexAttribArray(GLuint index) { 1524 GLMessage glmsg; 1525 GLTraceContext *glContext = getGLTraceContext(); 1526 1527 glmsg.set_function(GLMessage::glDisableVertexAttribArray); 1528 1529 // copy argument index 1530 GLMessage_DataType *arg_index = glmsg.add_args(); 1531 arg_index->set_isarray(false); 1532 arg_index->set_type(GLMessage::DataType::INT); 1533 arg_index->add_intvalue(index); 1534 1535 // call function 1536 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1537 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1538 glContext->hooks->gl.glDisableVertexAttribArray(index); 1539 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1540 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1541 1542 void *pointerArgs[] = { 1543 }; 1544 1545 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1546 threadStartTime, threadEndTime, 1547 &glmsg, pointerArgs); 1548 glContext->traceGLMessage(&glmsg); 1549 } 1550 1551 void GLTrace_glDrawArrays(GLenum mode, GLint first, GLsizei count) { 1552 GLMessage glmsg; 1553 GLTraceContext *glContext = getGLTraceContext(); 1554 1555 glmsg.set_function(GLMessage::glDrawArrays); 1556 1557 // copy argument mode 1558 GLMessage_DataType *arg_mode = glmsg.add_args(); 1559 arg_mode->set_isarray(false); 1560 arg_mode->set_type(GLMessage::DataType::ENUM); 1561 arg_mode->add_intvalue((int)mode); 1562 1563 // copy argument first 1564 GLMessage_DataType *arg_first = glmsg.add_args(); 1565 arg_first->set_isarray(false); 1566 arg_first->set_type(GLMessage::DataType::INT); 1567 arg_first->add_intvalue(first); 1568 1569 // copy argument count 1570 GLMessage_DataType *arg_count = glmsg.add_args(); 1571 arg_count->set_isarray(false); 1572 arg_count->set_type(GLMessage::DataType::INT); 1573 arg_count->add_intvalue(count); 1574 1575 // call function 1576 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1577 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1578 glContext->hooks->gl.glDrawArrays(mode, first, count); 1579 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1580 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1581 1582 void *pointerArgs[] = { 1583 }; 1584 1585 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1586 threadStartTime, threadEndTime, 1587 &glmsg, pointerArgs); 1588 glContext->traceGLMessage(&glmsg); 1589 } 1590 1591 void GLTrace_glDrawElements(GLenum mode, GLsizei count, GLenum type, const void * indices) { 1592 GLMessage glmsg; 1593 GLTraceContext *glContext = getGLTraceContext(); 1594 1595 glmsg.set_function(GLMessage::glDrawElements); 1596 1597 // copy argument mode 1598 GLMessage_DataType *arg_mode = glmsg.add_args(); 1599 arg_mode->set_isarray(false); 1600 arg_mode->set_type(GLMessage::DataType::ENUM); 1601 arg_mode->add_intvalue((int)mode); 1602 1603 // copy argument count 1604 GLMessage_DataType *arg_count = glmsg.add_args(); 1605 arg_count->set_isarray(false); 1606 arg_count->set_type(GLMessage::DataType::INT); 1607 arg_count->add_intvalue(count); 1608 1609 // copy argument type 1610 GLMessage_DataType *arg_type = glmsg.add_args(); 1611 arg_type->set_isarray(false); 1612 arg_type->set_type(GLMessage::DataType::ENUM); 1613 arg_type->add_intvalue((int)type); 1614 1615 // copy argument indices 1616 GLMessage_DataType *arg_indices = glmsg.add_args(); 1617 arg_indices->set_isarray(false); 1618 arg_indices->set_type(GLMessage::DataType::INT64); 1619 arg_indices->add_int64value((uintptr_t)indices); 1620 1621 // call function 1622 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1623 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1624 glContext->hooks->gl.glDrawElements(mode, count, type, indices); 1625 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1626 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1627 1628 void *pointerArgs[] = { 1629 (void *) indices, 1630 }; 1631 1632 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1633 threadStartTime, threadEndTime, 1634 &glmsg, pointerArgs); 1635 glContext->traceGLMessage(&glmsg); 1636 } 1637 1638 void GLTrace_glEnable(GLenum cap) { 1639 GLMessage glmsg; 1640 GLTraceContext *glContext = getGLTraceContext(); 1641 1642 glmsg.set_function(GLMessage::glEnable); 1643 1644 // copy argument cap 1645 GLMessage_DataType *arg_cap = glmsg.add_args(); 1646 arg_cap->set_isarray(false); 1647 arg_cap->set_type(GLMessage::DataType::ENUM); 1648 arg_cap->add_intvalue((int)cap); 1649 1650 // call function 1651 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1652 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1653 glContext->hooks->gl.glEnable(cap); 1654 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1655 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1656 1657 void *pointerArgs[] = { 1658 }; 1659 1660 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1661 threadStartTime, threadEndTime, 1662 &glmsg, pointerArgs); 1663 glContext->traceGLMessage(&glmsg); 1664 } 1665 1666 void GLTrace_glEnableVertexAttribArray(GLuint index) { 1667 GLMessage glmsg; 1668 GLTraceContext *glContext = getGLTraceContext(); 1669 1670 glmsg.set_function(GLMessage::glEnableVertexAttribArray); 1671 1672 // copy argument index 1673 GLMessage_DataType *arg_index = glmsg.add_args(); 1674 arg_index->set_isarray(false); 1675 arg_index->set_type(GLMessage::DataType::INT); 1676 arg_index->add_intvalue(index); 1677 1678 // call function 1679 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1680 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1681 glContext->hooks->gl.glEnableVertexAttribArray(index); 1682 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1683 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1684 1685 void *pointerArgs[] = { 1686 }; 1687 1688 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1689 threadStartTime, threadEndTime, 1690 &glmsg, pointerArgs); 1691 glContext->traceGLMessage(&glmsg); 1692 } 1693 1694 void GLTrace_glFinish(void) { 1695 GLMessage glmsg; 1696 GLTraceContext *glContext = getGLTraceContext(); 1697 1698 glmsg.set_function(GLMessage::glFinish); 1699 1700 // call function 1701 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1702 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1703 glContext->hooks->gl.glFinish(); 1704 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1705 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1706 1707 void *pointerArgs[] = { 1708 }; 1709 1710 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1711 threadStartTime, threadEndTime, 1712 &glmsg, pointerArgs); 1713 glContext->traceGLMessage(&glmsg); 1714 } 1715 1716 void GLTrace_glFlush(void) { 1717 GLMessage glmsg; 1718 GLTraceContext *glContext = getGLTraceContext(); 1719 1720 glmsg.set_function(GLMessage::glFlush); 1721 1722 // call function 1723 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1724 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1725 glContext->hooks->gl.glFlush(); 1726 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1727 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1728 1729 void *pointerArgs[] = { 1730 }; 1731 1732 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1733 threadStartTime, threadEndTime, 1734 &glmsg, pointerArgs); 1735 glContext->traceGLMessage(&glmsg); 1736 } 1737 1738 void GLTrace_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { 1739 GLMessage glmsg; 1740 GLTraceContext *glContext = getGLTraceContext(); 1741 1742 glmsg.set_function(GLMessage::glFramebufferRenderbuffer); 1743 1744 // copy argument target 1745 GLMessage_DataType *arg_target = glmsg.add_args(); 1746 arg_target->set_isarray(false); 1747 arg_target->set_type(GLMessage::DataType::ENUM); 1748 arg_target->add_intvalue((int)target); 1749 1750 // copy argument attachment 1751 GLMessage_DataType *arg_attachment = glmsg.add_args(); 1752 arg_attachment->set_isarray(false); 1753 arg_attachment->set_type(GLMessage::DataType::ENUM); 1754 arg_attachment->add_intvalue((int)attachment); 1755 1756 // copy argument renderbuffertarget 1757 GLMessage_DataType *arg_renderbuffertarget = glmsg.add_args(); 1758 arg_renderbuffertarget->set_isarray(false); 1759 arg_renderbuffertarget->set_type(GLMessage::DataType::ENUM); 1760 arg_renderbuffertarget->add_intvalue((int)renderbuffertarget); 1761 1762 // copy argument renderbuffer 1763 GLMessage_DataType *arg_renderbuffer = glmsg.add_args(); 1764 arg_renderbuffer->set_isarray(false); 1765 arg_renderbuffer->set_type(GLMessage::DataType::INT); 1766 arg_renderbuffer->add_intvalue(renderbuffer); 1767 1768 // call function 1769 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1770 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1771 glContext->hooks->gl.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); 1772 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1773 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1774 1775 void *pointerArgs[] = { 1776 }; 1777 1778 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1779 threadStartTime, threadEndTime, 1780 &glmsg, pointerArgs); 1781 glContext->traceGLMessage(&glmsg); 1782 } 1783 1784 void GLTrace_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { 1785 GLMessage glmsg; 1786 GLTraceContext *glContext = getGLTraceContext(); 1787 1788 glmsg.set_function(GLMessage::glFramebufferTexture2D); 1789 1790 // copy argument target 1791 GLMessage_DataType *arg_target = glmsg.add_args(); 1792 arg_target->set_isarray(false); 1793 arg_target->set_type(GLMessage::DataType::ENUM); 1794 arg_target->add_intvalue((int)target); 1795 1796 // copy argument attachment 1797 GLMessage_DataType *arg_attachment = glmsg.add_args(); 1798 arg_attachment->set_isarray(false); 1799 arg_attachment->set_type(GLMessage::DataType::ENUM); 1800 arg_attachment->add_intvalue((int)attachment); 1801 1802 // copy argument textarget 1803 GLMessage_DataType *arg_textarget = glmsg.add_args(); 1804 arg_textarget->set_isarray(false); 1805 arg_textarget->set_type(GLMessage::DataType::ENUM); 1806 arg_textarget->add_intvalue((int)textarget); 1807 1808 // copy argument texture 1809 GLMessage_DataType *arg_texture = glmsg.add_args(); 1810 arg_texture->set_isarray(false); 1811 arg_texture->set_type(GLMessage::DataType::INT); 1812 arg_texture->add_intvalue(texture); 1813 1814 // copy argument level 1815 GLMessage_DataType *arg_level = glmsg.add_args(); 1816 arg_level->set_isarray(false); 1817 arg_level->set_type(GLMessage::DataType::INT); 1818 arg_level->add_intvalue(level); 1819 1820 // call function 1821 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1822 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1823 glContext->hooks->gl.glFramebufferTexture2D(target, attachment, textarget, texture, level); 1824 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1825 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1826 1827 void *pointerArgs[] = { 1828 }; 1829 1830 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1831 threadStartTime, threadEndTime, 1832 &glmsg, pointerArgs); 1833 glContext->traceGLMessage(&glmsg); 1834 } 1835 1836 void GLTrace_glFrontFace(GLenum mode) { 1837 GLMessage glmsg; 1838 GLTraceContext *glContext = getGLTraceContext(); 1839 1840 glmsg.set_function(GLMessage::glFrontFace); 1841 1842 // copy argument mode 1843 GLMessage_DataType *arg_mode = glmsg.add_args(); 1844 arg_mode->set_isarray(false); 1845 arg_mode->set_type(GLMessage::DataType::ENUM); 1846 arg_mode->add_intvalue((int)mode); 1847 1848 // call function 1849 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1850 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1851 glContext->hooks->gl.glFrontFace(mode); 1852 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1853 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1854 1855 void *pointerArgs[] = { 1856 }; 1857 1858 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1859 threadStartTime, threadEndTime, 1860 &glmsg, pointerArgs); 1861 glContext->traceGLMessage(&glmsg); 1862 } 1863 1864 void GLTrace_glGenBuffers(GLsizei n, GLuint * buffers) { 1865 GLMessage glmsg; 1866 GLTraceContext *glContext = getGLTraceContext(); 1867 1868 glmsg.set_function(GLMessage::glGenBuffers); 1869 1870 // copy argument n 1871 GLMessage_DataType *arg_n = glmsg.add_args(); 1872 arg_n->set_isarray(false); 1873 arg_n->set_type(GLMessage::DataType::INT); 1874 arg_n->add_intvalue(n); 1875 1876 // copy argument buffers 1877 GLMessage_DataType *arg_buffers = glmsg.add_args(); 1878 arg_buffers->set_isarray(false); 1879 arg_buffers->set_type(GLMessage::DataType::INT64); 1880 arg_buffers->add_int64value((uintptr_t)buffers); 1881 1882 // call function 1883 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1884 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1885 glContext->hooks->gl.glGenBuffers(n, buffers); 1886 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1887 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1888 1889 void *pointerArgs[] = { 1890 (void *) buffers, 1891 }; 1892 1893 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1894 threadStartTime, threadEndTime, 1895 &glmsg, pointerArgs); 1896 glContext->traceGLMessage(&glmsg); 1897 } 1898 1899 void GLTrace_glGenerateMipmap(GLenum target) { 1900 GLMessage glmsg; 1901 GLTraceContext *glContext = getGLTraceContext(); 1902 1903 glmsg.set_function(GLMessage::glGenerateMipmap); 1904 1905 // copy argument target 1906 GLMessage_DataType *arg_target = glmsg.add_args(); 1907 arg_target->set_isarray(false); 1908 arg_target->set_type(GLMessage::DataType::ENUM); 1909 arg_target->add_intvalue((int)target); 1910 1911 // call function 1912 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1913 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1914 glContext->hooks->gl.glGenerateMipmap(target); 1915 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1916 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1917 1918 void *pointerArgs[] = { 1919 }; 1920 1921 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1922 threadStartTime, threadEndTime, 1923 &glmsg, pointerArgs); 1924 glContext->traceGLMessage(&glmsg); 1925 } 1926 1927 void GLTrace_glGenFramebuffers(GLsizei n, GLuint * framebuffers) { 1928 GLMessage glmsg; 1929 GLTraceContext *glContext = getGLTraceContext(); 1930 1931 glmsg.set_function(GLMessage::glGenFramebuffers); 1932 1933 // copy argument n 1934 GLMessage_DataType *arg_n = glmsg.add_args(); 1935 arg_n->set_isarray(false); 1936 arg_n->set_type(GLMessage::DataType::INT); 1937 arg_n->add_intvalue(n); 1938 1939 // copy argument framebuffers 1940 GLMessage_DataType *arg_framebuffers = glmsg.add_args(); 1941 arg_framebuffers->set_isarray(false); 1942 arg_framebuffers->set_type(GLMessage::DataType::INT64); 1943 arg_framebuffers->add_int64value((uintptr_t)framebuffers); 1944 1945 // call function 1946 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1947 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1948 glContext->hooks->gl.glGenFramebuffers(n, framebuffers); 1949 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1950 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1951 1952 void *pointerArgs[] = { 1953 (void *) framebuffers, 1954 }; 1955 1956 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1957 threadStartTime, threadEndTime, 1958 &glmsg, pointerArgs); 1959 glContext->traceGLMessage(&glmsg); 1960 } 1961 1962 void GLTrace_glGenRenderbuffers(GLsizei n, GLuint * renderbuffers) { 1963 GLMessage glmsg; 1964 GLTraceContext *glContext = getGLTraceContext(); 1965 1966 glmsg.set_function(GLMessage::glGenRenderbuffers); 1967 1968 // copy argument n 1969 GLMessage_DataType *arg_n = glmsg.add_args(); 1970 arg_n->set_isarray(false); 1971 arg_n->set_type(GLMessage::DataType::INT); 1972 arg_n->add_intvalue(n); 1973 1974 // copy argument renderbuffers 1975 GLMessage_DataType *arg_renderbuffers = glmsg.add_args(); 1976 arg_renderbuffers->set_isarray(false); 1977 arg_renderbuffers->set_type(GLMessage::DataType::INT64); 1978 arg_renderbuffers->add_int64value((uintptr_t)renderbuffers); 1979 1980 // call function 1981 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 1982 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 1983 glContext->hooks->gl.glGenRenderbuffers(n, renderbuffers); 1984 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 1985 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 1986 1987 void *pointerArgs[] = { 1988 (void *) renderbuffers, 1989 }; 1990 1991 fixupGLMessage(glContext, wallStartTime, wallEndTime, 1992 threadStartTime, threadEndTime, 1993 &glmsg, pointerArgs); 1994 glContext->traceGLMessage(&glmsg); 1995 } 1996 1997 void GLTrace_glGenTextures(GLsizei n, GLuint * textures) { 1998 GLMessage glmsg; 1999 GLTraceContext *glContext = getGLTraceContext(); 2000 2001 glmsg.set_function(GLMessage::glGenTextures); 2002 2003 // copy argument n 2004 GLMessage_DataType *arg_n = glmsg.add_args(); 2005 arg_n->set_isarray(false); 2006 arg_n->set_type(GLMessage::DataType::INT); 2007 arg_n->add_intvalue(n); 2008 2009 // copy argument textures 2010 GLMessage_DataType *arg_textures = glmsg.add_args(); 2011 arg_textures->set_isarray(false); 2012 arg_textures->set_type(GLMessage::DataType::INT64); 2013 arg_textures->add_int64value((uintptr_t)textures); 2014 2015 // call function 2016 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2017 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2018 glContext->hooks->gl.glGenTextures(n, textures); 2019 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2020 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2021 2022 void *pointerArgs[] = { 2023 (void *) textures, 2024 }; 2025 2026 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2027 threadStartTime, threadEndTime, 2028 &glmsg, pointerArgs); 2029 glContext->traceGLMessage(&glmsg); 2030 } 2031 2032 void GLTrace_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) { 2033 GLMessage glmsg; 2034 GLTraceContext *glContext = getGLTraceContext(); 2035 2036 glmsg.set_function(GLMessage::glGetActiveAttrib); 2037 2038 // copy argument program 2039 GLMessage_DataType *arg_program = glmsg.add_args(); 2040 arg_program->set_isarray(false); 2041 arg_program->set_type(GLMessage::DataType::INT); 2042 arg_program->add_intvalue(program); 2043 2044 // copy argument index 2045 GLMessage_DataType *arg_index = glmsg.add_args(); 2046 arg_index->set_isarray(false); 2047 arg_index->set_type(GLMessage::DataType::INT); 2048 arg_index->add_intvalue(index); 2049 2050 // copy argument bufSize 2051 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 2052 arg_bufSize->set_isarray(false); 2053 arg_bufSize->set_type(GLMessage::DataType::INT); 2054 arg_bufSize->add_intvalue(bufSize); 2055 2056 // copy argument length 2057 GLMessage_DataType *arg_length = glmsg.add_args(); 2058 arg_length->set_isarray(false); 2059 arg_length->set_type(GLMessage::DataType::INT64); 2060 arg_length->add_int64value((uintptr_t)length); 2061 2062 // copy argument size 2063 GLMessage_DataType *arg_size = glmsg.add_args(); 2064 arg_size->set_isarray(false); 2065 arg_size->set_type(GLMessage::DataType::INT64); 2066 arg_size->add_int64value((uintptr_t)size); 2067 2068 // copy argument type 2069 GLMessage_DataType *arg_type = glmsg.add_args(); 2070 arg_type->set_isarray(false); 2071 arg_type->set_type(GLMessage::DataType::INT64); 2072 arg_type->add_int64value((uintptr_t)type); 2073 2074 // copy argument name 2075 GLMessage_DataType *arg_name = glmsg.add_args(); 2076 arg_name->set_isarray(false); 2077 arg_name->set_type(GLMessage::DataType::INT64); 2078 arg_name->add_int64value((uintptr_t)name); 2079 2080 // call function 2081 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2082 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2083 glContext->hooks->gl.glGetActiveAttrib(program, index, bufSize, length, size, type, name); 2084 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2085 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2086 2087 void *pointerArgs[] = { 2088 (void *) length, 2089 (void *) size, 2090 (void *) type, 2091 (void *) name, 2092 }; 2093 2094 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2095 threadStartTime, threadEndTime, 2096 &glmsg, pointerArgs); 2097 glContext->traceGLMessage(&glmsg); 2098 } 2099 2100 void GLTrace_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLint * size, GLenum * type, GLchar * name) { 2101 GLMessage glmsg; 2102 GLTraceContext *glContext = getGLTraceContext(); 2103 2104 glmsg.set_function(GLMessage::glGetActiveUniform); 2105 2106 // copy argument program 2107 GLMessage_DataType *arg_program = glmsg.add_args(); 2108 arg_program->set_isarray(false); 2109 arg_program->set_type(GLMessage::DataType::INT); 2110 arg_program->add_intvalue(program); 2111 2112 // copy argument index 2113 GLMessage_DataType *arg_index = glmsg.add_args(); 2114 arg_index->set_isarray(false); 2115 arg_index->set_type(GLMessage::DataType::INT); 2116 arg_index->add_intvalue(index); 2117 2118 // copy argument bufSize 2119 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 2120 arg_bufSize->set_isarray(false); 2121 arg_bufSize->set_type(GLMessage::DataType::INT); 2122 arg_bufSize->add_intvalue(bufSize); 2123 2124 // copy argument length 2125 GLMessage_DataType *arg_length = glmsg.add_args(); 2126 arg_length->set_isarray(false); 2127 arg_length->set_type(GLMessage::DataType::INT64); 2128 arg_length->add_int64value((uintptr_t)length); 2129 2130 // copy argument size 2131 GLMessage_DataType *arg_size = glmsg.add_args(); 2132 arg_size->set_isarray(false); 2133 arg_size->set_type(GLMessage::DataType::INT64); 2134 arg_size->add_int64value((uintptr_t)size); 2135 2136 // copy argument type 2137 GLMessage_DataType *arg_type = glmsg.add_args(); 2138 arg_type->set_isarray(false); 2139 arg_type->set_type(GLMessage::DataType::INT64); 2140 arg_type->add_int64value((uintptr_t)type); 2141 2142 // copy argument name 2143 GLMessage_DataType *arg_name = glmsg.add_args(); 2144 arg_name->set_isarray(false); 2145 arg_name->set_type(GLMessage::DataType::INT64); 2146 arg_name->add_int64value((uintptr_t)name); 2147 2148 // call function 2149 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2150 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2151 glContext->hooks->gl.glGetActiveUniform(program, index, bufSize, length, size, type, name); 2152 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2153 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2154 2155 void *pointerArgs[] = { 2156 (void *) length, 2157 (void *) size, 2158 (void *) type, 2159 (void *) name, 2160 }; 2161 2162 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2163 threadStartTime, threadEndTime, 2164 &glmsg, pointerArgs); 2165 glContext->traceGLMessage(&glmsg); 2166 } 2167 2168 void GLTrace_glGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders) { 2169 GLMessage glmsg; 2170 GLTraceContext *glContext = getGLTraceContext(); 2171 2172 glmsg.set_function(GLMessage::glGetAttachedShaders); 2173 2174 // copy argument program 2175 GLMessage_DataType *arg_program = glmsg.add_args(); 2176 arg_program->set_isarray(false); 2177 arg_program->set_type(GLMessage::DataType::INT); 2178 arg_program->add_intvalue(program); 2179 2180 // copy argument maxCount 2181 GLMessage_DataType *arg_maxCount = glmsg.add_args(); 2182 arg_maxCount->set_isarray(false); 2183 arg_maxCount->set_type(GLMessage::DataType::INT); 2184 arg_maxCount->add_intvalue(maxCount); 2185 2186 // copy argument count 2187 GLMessage_DataType *arg_count = glmsg.add_args(); 2188 arg_count->set_isarray(false); 2189 arg_count->set_type(GLMessage::DataType::INT64); 2190 arg_count->add_int64value((uintptr_t)count); 2191 2192 // copy argument shaders 2193 GLMessage_DataType *arg_shaders = glmsg.add_args(); 2194 arg_shaders->set_isarray(false); 2195 arg_shaders->set_type(GLMessage::DataType::INT64); 2196 arg_shaders->add_int64value((uintptr_t)shaders); 2197 2198 // call function 2199 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2200 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2201 glContext->hooks->gl.glGetAttachedShaders(program, maxCount, count, shaders); 2202 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2203 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2204 2205 void *pointerArgs[] = { 2206 (void *) count, 2207 (void *) shaders, 2208 }; 2209 2210 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2211 threadStartTime, threadEndTime, 2212 &glmsg, pointerArgs); 2213 glContext->traceGLMessage(&glmsg); 2214 } 2215 2216 GLint GLTrace_glGetAttribLocation(GLuint program, const GLchar * name) { 2217 GLMessage glmsg; 2218 GLTraceContext *glContext = getGLTraceContext(); 2219 2220 glmsg.set_function(GLMessage::glGetAttribLocation); 2221 2222 // copy argument program 2223 GLMessage_DataType *arg_program = glmsg.add_args(); 2224 arg_program->set_isarray(false); 2225 arg_program->set_type(GLMessage::DataType::INT); 2226 arg_program->add_intvalue(program); 2227 2228 // copy argument name 2229 GLMessage_DataType *arg_name = glmsg.add_args(); 2230 arg_name->set_isarray(false); 2231 arg_name->set_type(GLMessage::DataType::INT64); 2232 arg_name->add_int64value((uintptr_t)name); 2233 2234 // call function 2235 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2236 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2237 GLint retValue = glContext->hooks->gl.glGetAttribLocation(program, name); 2238 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2239 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2240 2241 // set return value 2242 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 2243 rt->set_isarray(false); 2244 rt->set_type(GLMessage::DataType::INT); 2245 rt->add_intvalue(retValue); 2246 2247 void *pointerArgs[] = { 2248 (void *) name, 2249 }; 2250 2251 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2252 threadStartTime, threadEndTime, 2253 &glmsg, pointerArgs); 2254 glContext->traceGLMessage(&glmsg); 2255 2256 return retValue; 2257 } 2258 2259 void GLTrace_glGetBooleanv(GLenum pname, GLboolean * data) { 2260 GLMessage glmsg; 2261 GLTraceContext *glContext = getGLTraceContext(); 2262 2263 glmsg.set_function(GLMessage::glGetBooleanv); 2264 2265 // copy argument pname 2266 GLMessage_DataType *arg_pname = glmsg.add_args(); 2267 arg_pname->set_isarray(false); 2268 arg_pname->set_type(GLMessage::DataType::ENUM); 2269 arg_pname->add_intvalue((int)pname); 2270 2271 // copy argument data 2272 GLMessage_DataType *arg_data = glmsg.add_args(); 2273 arg_data->set_isarray(false); 2274 arg_data->set_type(GLMessage::DataType::INT64); 2275 arg_data->add_int64value((uintptr_t)data); 2276 2277 // call function 2278 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2279 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2280 glContext->hooks->gl.glGetBooleanv(pname, data); 2281 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2282 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2283 2284 void *pointerArgs[] = { 2285 (void *) data, 2286 }; 2287 2288 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2289 threadStartTime, threadEndTime, 2290 &glmsg, pointerArgs); 2291 glContext->traceGLMessage(&glmsg); 2292 } 2293 2294 void GLTrace_glGetBufferParameteriv(GLenum target, GLenum pname, GLint * params) { 2295 GLMessage glmsg; 2296 GLTraceContext *glContext = getGLTraceContext(); 2297 2298 glmsg.set_function(GLMessage::glGetBufferParameteriv); 2299 2300 // copy argument target 2301 GLMessage_DataType *arg_target = glmsg.add_args(); 2302 arg_target->set_isarray(false); 2303 arg_target->set_type(GLMessage::DataType::ENUM); 2304 arg_target->add_intvalue((int)target); 2305 2306 // copy argument pname 2307 GLMessage_DataType *arg_pname = glmsg.add_args(); 2308 arg_pname->set_isarray(false); 2309 arg_pname->set_type(GLMessage::DataType::ENUM); 2310 arg_pname->add_intvalue((int)pname); 2311 2312 // copy argument params 2313 GLMessage_DataType *arg_params = glmsg.add_args(); 2314 arg_params->set_isarray(false); 2315 arg_params->set_type(GLMessage::DataType::INT64); 2316 arg_params->add_int64value((uintptr_t)params); 2317 2318 // call function 2319 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2320 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2321 glContext->hooks->gl.glGetBufferParameteriv(target, pname, params); 2322 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2323 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2324 2325 void *pointerArgs[] = { 2326 (void *) params, 2327 }; 2328 2329 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2330 threadStartTime, threadEndTime, 2331 &glmsg, pointerArgs); 2332 glContext->traceGLMessage(&glmsg); 2333 } 2334 2335 GLenum GLTrace_glGetError(void) { 2336 GLMessage glmsg; 2337 GLTraceContext *glContext = getGLTraceContext(); 2338 2339 glmsg.set_function(GLMessage::glGetError); 2340 2341 // call function 2342 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2343 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2344 GLenum retValue = glContext->hooks->gl.glGetError(); 2345 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2346 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2347 2348 // set return value 2349 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 2350 rt->set_isarray(false); 2351 rt->set_type(GLMessage::DataType::ENUM); 2352 rt->add_intvalue((int)retValue); 2353 2354 void *pointerArgs[] = { 2355 }; 2356 2357 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2358 threadStartTime, threadEndTime, 2359 &glmsg, pointerArgs); 2360 glContext->traceGLMessage(&glmsg); 2361 2362 return retValue; 2363 } 2364 2365 void GLTrace_glGetFloatv(GLenum pname, GLfloat * data) { 2366 GLMessage glmsg; 2367 GLTraceContext *glContext = getGLTraceContext(); 2368 2369 glmsg.set_function(GLMessage::glGetFloatv); 2370 2371 // copy argument pname 2372 GLMessage_DataType *arg_pname = glmsg.add_args(); 2373 arg_pname->set_isarray(false); 2374 arg_pname->set_type(GLMessage::DataType::ENUM); 2375 arg_pname->add_intvalue((int)pname); 2376 2377 // copy argument data 2378 GLMessage_DataType *arg_data = glmsg.add_args(); 2379 arg_data->set_isarray(false); 2380 arg_data->set_type(GLMessage::DataType::INT64); 2381 arg_data->add_int64value((uintptr_t)data); 2382 2383 // call function 2384 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2385 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2386 glContext->hooks->gl.glGetFloatv(pname, data); 2387 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2388 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2389 2390 void *pointerArgs[] = { 2391 (void *) data, 2392 }; 2393 2394 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2395 threadStartTime, threadEndTime, 2396 &glmsg, pointerArgs); 2397 glContext->traceGLMessage(&glmsg); 2398 } 2399 2400 void GLTrace_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint * params) { 2401 GLMessage glmsg; 2402 GLTraceContext *glContext = getGLTraceContext(); 2403 2404 glmsg.set_function(GLMessage::glGetFramebufferAttachmentParameteriv); 2405 2406 // copy argument target 2407 GLMessage_DataType *arg_target = glmsg.add_args(); 2408 arg_target->set_isarray(false); 2409 arg_target->set_type(GLMessage::DataType::ENUM); 2410 arg_target->add_intvalue((int)target); 2411 2412 // copy argument attachment 2413 GLMessage_DataType *arg_attachment = glmsg.add_args(); 2414 arg_attachment->set_isarray(false); 2415 arg_attachment->set_type(GLMessage::DataType::ENUM); 2416 arg_attachment->add_intvalue((int)attachment); 2417 2418 // copy argument pname 2419 GLMessage_DataType *arg_pname = glmsg.add_args(); 2420 arg_pname->set_isarray(false); 2421 arg_pname->set_type(GLMessage::DataType::ENUM); 2422 arg_pname->add_intvalue((int)pname); 2423 2424 // copy argument params 2425 GLMessage_DataType *arg_params = glmsg.add_args(); 2426 arg_params->set_isarray(false); 2427 arg_params->set_type(GLMessage::DataType::INT64); 2428 arg_params->add_int64value((uintptr_t)params); 2429 2430 // call function 2431 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2432 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2433 glContext->hooks->gl.glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); 2434 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2435 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2436 2437 void *pointerArgs[] = { 2438 (void *) params, 2439 }; 2440 2441 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2442 threadStartTime, threadEndTime, 2443 &glmsg, pointerArgs); 2444 glContext->traceGLMessage(&glmsg); 2445 } 2446 2447 void GLTrace_glGetIntegerv(GLenum pname, GLint * data) { 2448 GLMessage glmsg; 2449 GLTraceContext *glContext = getGLTraceContext(); 2450 2451 glmsg.set_function(GLMessage::glGetIntegerv); 2452 2453 // copy argument pname 2454 GLMessage_DataType *arg_pname = glmsg.add_args(); 2455 arg_pname->set_isarray(false); 2456 arg_pname->set_type(GLMessage::DataType::ENUM); 2457 arg_pname->add_intvalue((int)pname); 2458 2459 // copy argument data 2460 GLMessage_DataType *arg_data = glmsg.add_args(); 2461 arg_data->set_isarray(false); 2462 arg_data->set_type(GLMessage::DataType::INT64); 2463 arg_data->add_int64value((uintptr_t)data); 2464 2465 // call function 2466 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2467 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2468 glContext->hooks->gl.glGetIntegerv(pname, data); 2469 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2470 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2471 2472 void *pointerArgs[] = { 2473 (void *) data, 2474 }; 2475 2476 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2477 threadStartTime, threadEndTime, 2478 &glmsg, pointerArgs); 2479 glContext->traceGLMessage(&glmsg); 2480 } 2481 2482 void GLTrace_glGetProgramiv(GLuint program, GLenum pname, GLint * params) { 2483 GLMessage glmsg; 2484 GLTraceContext *glContext = getGLTraceContext(); 2485 2486 glmsg.set_function(GLMessage::glGetProgramiv); 2487 2488 // copy argument program 2489 GLMessage_DataType *arg_program = glmsg.add_args(); 2490 arg_program->set_isarray(false); 2491 arg_program->set_type(GLMessage::DataType::INT); 2492 arg_program->add_intvalue(program); 2493 2494 // copy argument pname 2495 GLMessage_DataType *arg_pname = glmsg.add_args(); 2496 arg_pname->set_isarray(false); 2497 arg_pname->set_type(GLMessage::DataType::ENUM); 2498 arg_pname->add_intvalue((int)pname); 2499 2500 // copy argument params 2501 GLMessage_DataType *arg_params = glmsg.add_args(); 2502 arg_params->set_isarray(false); 2503 arg_params->set_type(GLMessage::DataType::INT64); 2504 arg_params->add_int64value((uintptr_t)params); 2505 2506 // call function 2507 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2508 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2509 glContext->hooks->gl.glGetProgramiv(program, pname, params); 2510 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2511 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2512 2513 void *pointerArgs[] = { 2514 (void *) params, 2515 }; 2516 2517 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2518 threadStartTime, threadEndTime, 2519 &glmsg, pointerArgs); 2520 glContext->traceGLMessage(&glmsg); 2521 } 2522 2523 void GLTrace_glGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { 2524 GLMessage glmsg; 2525 GLTraceContext *glContext = getGLTraceContext(); 2526 2527 glmsg.set_function(GLMessage::glGetProgramInfoLog); 2528 2529 // copy argument program 2530 GLMessage_DataType *arg_program = glmsg.add_args(); 2531 arg_program->set_isarray(false); 2532 arg_program->set_type(GLMessage::DataType::INT); 2533 arg_program->add_intvalue(program); 2534 2535 // copy argument bufSize 2536 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 2537 arg_bufSize->set_isarray(false); 2538 arg_bufSize->set_type(GLMessage::DataType::INT); 2539 arg_bufSize->add_intvalue(bufSize); 2540 2541 // copy argument length 2542 GLMessage_DataType *arg_length = glmsg.add_args(); 2543 arg_length->set_isarray(false); 2544 arg_length->set_type(GLMessage::DataType::INT64); 2545 arg_length->add_int64value((uintptr_t)length); 2546 2547 // copy argument infoLog 2548 GLMessage_DataType *arg_infoLog = glmsg.add_args(); 2549 arg_infoLog->set_isarray(false); 2550 arg_infoLog->set_type(GLMessage::DataType::INT64); 2551 arg_infoLog->add_int64value((uintptr_t)infoLog); 2552 2553 // call function 2554 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2555 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2556 glContext->hooks->gl.glGetProgramInfoLog(program, bufSize, length, infoLog); 2557 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2558 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2559 2560 void *pointerArgs[] = { 2561 (void *) length, 2562 (void *) infoLog, 2563 }; 2564 2565 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2566 threadStartTime, threadEndTime, 2567 &glmsg, pointerArgs); 2568 glContext->traceGLMessage(&glmsg); 2569 } 2570 2571 void GLTrace_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint * params) { 2572 GLMessage glmsg; 2573 GLTraceContext *glContext = getGLTraceContext(); 2574 2575 glmsg.set_function(GLMessage::glGetRenderbufferParameteriv); 2576 2577 // copy argument target 2578 GLMessage_DataType *arg_target = glmsg.add_args(); 2579 arg_target->set_isarray(false); 2580 arg_target->set_type(GLMessage::DataType::ENUM); 2581 arg_target->add_intvalue((int)target); 2582 2583 // copy argument pname 2584 GLMessage_DataType *arg_pname = glmsg.add_args(); 2585 arg_pname->set_isarray(false); 2586 arg_pname->set_type(GLMessage::DataType::ENUM); 2587 arg_pname->add_intvalue((int)pname); 2588 2589 // copy argument params 2590 GLMessage_DataType *arg_params = glmsg.add_args(); 2591 arg_params->set_isarray(false); 2592 arg_params->set_type(GLMessage::DataType::INT64); 2593 arg_params->add_int64value((uintptr_t)params); 2594 2595 // call function 2596 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2597 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2598 glContext->hooks->gl.glGetRenderbufferParameteriv(target, pname, params); 2599 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2600 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2601 2602 void *pointerArgs[] = { 2603 (void *) params, 2604 }; 2605 2606 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2607 threadStartTime, threadEndTime, 2608 &glmsg, pointerArgs); 2609 glContext->traceGLMessage(&glmsg); 2610 } 2611 2612 void GLTrace_glGetShaderiv(GLuint shader, GLenum pname, GLint * params) { 2613 GLMessage glmsg; 2614 GLTraceContext *glContext = getGLTraceContext(); 2615 2616 glmsg.set_function(GLMessage::glGetShaderiv); 2617 2618 // copy argument shader 2619 GLMessage_DataType *arg_shader = glmsg.add_args(); 2620 arg_shader->set_isarray(false); 2621 arg_shader->set_type(GLMessage::DataType::INT); 2622 arg_shader->add_intvalue(shader); 2623 2624 // copy argument pname 2625 GLMessage_DataType *arg_pname = glmsg.add_args(); 2626 arg_pname->set_isarray(false); 2627 arg_pname->set_type(GLMessage::DataType::ENUM); 2628 arg_pname->add_intvalue((int)pname); 2629 2630 // copy argument params 2631 GLMessage_DataType *arg_params = glmsg.add_args(); 2632 arg_params->set_isarray(false); 2633 arg_params->set_type(GLMessage::DataType::INT64); 2634 arg_params->add_int64value((uintptr_t)params); 2635 2636 // call function 2637 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2638 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2639 glContext->hooks->gl.glGetShaderiv(shader, pname, params); 2640 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2641 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2642 2643 void *pointerArgs[] = { 2644 (void *) params, 2645 }; 2646 2647 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2648 threadStartTime, threadEndTime, 2649 &glmsg, pointerArgs); 2650 glContext->traceGLMessage(&glmsg); 2651 } 2652 2653 void GLTrace_glGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { 2654 GLMessage glmsg; 2655 GLTraceContext *glContext = getGLTraceContext(); 2656 2657 glmsg.set_function(GLMessage::glGetShaderInfoLog); 2658 2659 // copy argument shader 2660 GLMessage_DataType *arg_shader = glmsg.add_args(); 2661 arg_shader->set_isarray(false); 2662 arg_shader->set_type(GLMessage::DataType::INT); 2663 arg_shader->add_intvalue(shader); 2664 2665 // copy argument bufSize 2666 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 2667 arg_bufSize->set_isarray(false); 2668 arg_bufSize->set_type(GLMessage::DataType::INT); 2669 arg_bufSize->add_intvalue(bufSize); 2670 2671 // copy argument length 2672 GLMessage_DataType *arg_length = glmsg.add_args(); 2673 arg_length->set_isarray(false); 2674 arg_length->set_type(GLMessage::DataType::INT64); 2675 arg_length->add_int64value((uintptr_t)length); 2676 2677 // copy argument infoLog 2678 GLMessage_DataType *arg_infoLog = glmsg.add_args(); 2679 arg_infoLog->set_isarray(false); 2680 arg_infoLog->set_type(GLMessage::DataType::INT64); 2681 arg_infoLog->add_int64value((uintptr_t)infoLog); 2682 2683 // call function 2684 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2685 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2686 glContext->hooks->gl.glGetShaderInfoLog(shader, bufSize, length, infoLog); 2687 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2688 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2689 2690 void *pointerArgs[] = { 2691 (void *) length, 2692 (void *) infoLog, 2693 }; 2694 2695 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2696 threadStartTime, threadEndTime, 2697 &glmsg, pointerArgs); 2698 glContext->traceGLMessage(&glmsg); 2699 } 2700 2701 void GLTrace_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision) { 2702 GLMessage glmsg; 2703 GLTraceContext *glContext = getGLTraceContext(); 2704 2705 glmsg.set_function(GLMessage::glGetShaderPrecisionFormat); 2706 2707 // copy argument shadertype 2708 GLMessage_DataType *arg_shadertype = glmsg.add_args(); 2709 arg_shadertype->set_isarray(false); 2710 arg_shadertype->set_type(GLMessage::DataType::ENUM); 2711 arg_shadertype->add_intvalue((int)shadertype); 2712 2713 // copy argument precisiontype 2714 GLMessage_DataType *arg_precisiontype = glmsg.add_args(); 2715 arg_precisiontype->set_isarray(false); 2716 arg_precisiontype->set_type(GLMessage::DataType::ENUM); 2717 arg_precisiontype->add_intvalue((int)precisiontype); 2718 2719 // copy argument range 2720 GLMessage_DataType *arg_range = glmsg.add_args(); 2721 arg_range->set_isarray(false); 2722 arg_range->set_type(GLMessage::DataType::INT64); 2723 arg_range->add_int64value((uintptr_t)range); 2724 2725 // copy argument precision 2726 GLMessage_DataType *arg_precision = glmsg.add_args(); 2727 arg_precision->set_isarray(false); 2728 arg_precision->set_type(GLMessage::DataType::INT64); 2729 arg_precision->add_int64value((uintptr_t)precision); 2730 2731 // call function 2732 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2733 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2734 glContext->hooks->gl.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); 2735 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2736 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2737 2738 void *pointerArgs[] = { 2739 (void *) range, 2740 (void *) precision, 2741 }; 2742 2743 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2744 threadStartTime, threadEndTime, 2745 &glmsg, pointerArgs); 2746 glContext->traceGLMessage(&glmsg); 2747 } 2748 2749 void GLTrace_glGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei * length, GLchar * source) { 2750 GLMessage glmsg; 2751 GLTraceContext *glContext = getGLTraceContext(); 2752 2753 glmsg.set_function(GLMessage::glGetShaderSource); 2754 2755 // copy argument shader 2756 GLMessage_DataType *arg_shader = glmsg.add_args(); 2757 arg_shader->set_isarray(false); 2758 arg_shader->set_type(GLMessage::DataType::INT); 2759 arg_shader->add_intvalue(shader); 2760 2761 // copy argument bufSize 2762 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 2763 arg_bufSize->set_isarray(false); 2764 arg_bufSize->set_type(GLMessage::DataType::INT); 2765 arg_bufSize->add_intvalue(bufSize); 2766 2767 // copy argument length 2768 GLMessage_DataType *arg_length = glmsg.add_args(); 2769 arg_length->set_isarray(false); 2770 arg_length->set_type(GLMessage::DataType::INT64); 2771 arg_length->add_int64value((uintptr_t)length); 2772 2773 // copy argument source 2774 GLMessage_DataType *arg_source = glmsg.add_args(); 2775 arg_source->set_isarray(false); 2776 arg_source->set_type(GLMessage::DataType::INT64); 2777 arg_source->add_int64value((uintptr_t)source); 2778 2779 // call function 2780 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2781 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2782 glContext->hooks->gl.glGetShaderSource(shader, bufSize, length, source); 2783 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2784 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2785 2786 void *pointerArgs[] = { 2787 (void *) length, 2788 (void *) source, 2789 }; 2790 2791 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2792 threadStartTime, threadEndTime, 2793 &glmsg, pointerArgs); 2794 glContext->traceGLMessage(&glmsg); 2795 } 2796 2797 const GLubyte * GLTrace_glGetString(GLenum name) { 2798 GLMessage glmsg; 2799 GLTraceContext *glContext = getGLTraceContext(); 2800 2801 glmsg.set_function(GLMessage::glGetString); 2802 2803 // copy argument name 2804 GLMessage_DataType *arg_name = glmsg.add_args(); 2805 arg_name->set_isarray(false); 2806 arg_name->set_type(GLMessage::DataType::ENUM); 2807 arg_name->add_intvalue((int)name); 2808 2809 // call function 2810 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2811 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2812 const GLubyte * retValue = glContext->hooks->gl.glGetString(name); 2813 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2814 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2815 2816 // set return value 2817 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 2818 rt->set_isarray(false); 2819 rt->set_type(GLMessage::DataType::INT64); 2820 rt->add_int64value((uintptr_t)retValue); 2821 2822 void *pointerArgs[] = { 2823 (void *) retValue, 2824 }; 2825 2826 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2827 threadStartTime, threadEndTime, 2828 &glmsg, pointerArgs); 2829 glContext->traceGLMessage(&glmsg); 2830 2831 return retValue; 2832 } 2833 2834 void GLTrace_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat * params) { 2835 GLMessage glmsg; 2836 GLTraceContext *glContext = getGLTraceContext(); 2837 2838 glmsg.set_function(GLMessage::glGetTexParameterfv); 2839 2840 // copy argument target 2841 GLMessage_DataType *arg_target = glmsg.add_args(); 2842 arg_target->set_isarray(false); 2843 arg_target->set_type(GLMessage::DataType::ENUM); 2844 arg_target->add_intvalue((int)target); 2845 2846 // copy argument pname 2847 GLMessage_DataType *arg_pname = glmsg.add_args(); 2848 arg_pname->set_isarray(false); 2849 arg_pname->set_type(GLMessage::DataType::ENUM); 2850 arg_pname->add_intvalue((int)pname); 2851 2852 // copy argument params 2853 GLMessage_DataType *arg_params = glmsg.add_args(); 2854 arg_params->set_isarray(false); 2855 arg_params->set_type(GLMessage::DataType::INT64); 2856 arg_params->add_int64value((uintptr_t)params); 2857 2858 // call function 2859 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2860 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2861 glContext->hooks->gl.glGetTexParameterfv(target, pname, params); 2862 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2863 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2864 2865 void *pointerArgs[] = { 2866 (void *) params, 2867 }; 2868 2869 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2870 threadStartTime, threadEndTime, 2871 &glmsg, pointerArgs); 2872 glContext->traceGLMessage(&glmsg); 2873 } 2874 2875 void GLTrace_glGetTexParameteriv(GLenum target, GLenum pname, GLint * params) { 2876 GLMessage glmsg; 2877 GLTraceContext *glContext = getGLTraceContext(); 2878 2879 glmsg.set_function(GLMessage::glGetTexParameteriv); 2880 2881 // copy argument target 2882 GLMessage_DataType *arg_target = glmsg.add_args(); 2883 arg_target->set_isarray(false); 2884 arg_target->set_type(GLMessage::DataType::ENUM); 2885 arg_target->add_intvalue((int)target); 2886 2887 // copy argument pname 2888 GLMessage_DataType *arg_pname = glmsg.add_args(); 2889 arg_pname->set_isarray(false); 2890 arg_pname->set_type(GLMessage::DataType::ENUM); 2891 arg_pname->add_intvalue((int)pname); 2892 2893 // copy argument params 2894 GLMessage_DataType *arg_params = glmsg.add_args(); 2895 arg_params->set_isarray(false); 2896 arg_params->set_type(GLMessage::DataType::INT64); 2897 arg_params->add_int64value((uintptr_t)params); 2898 2899 // call function 2900 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2901 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2902 glContext->hooks->gl.glGetTexParameteriv(target, pname, params); 2903 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2904 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2905 2906 void *pointerArgs[] = { 2907 (void *) params, 2908 }; 2909 2910 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2911 threadStartTime, threadEndTime, 2912 &glmsg, pointerArgs); 2913 glContext->traceGLMessage(&glmsg); 2914 } 2915 2916 void GLTrace_glGetUniformfv(GLuint program, GLint location, GLfloat * params) { 2917 GLMessage glmsg; 2918 GLTraceContext *glContext = getGLTraceContext(); 2919 2920 glmsg.set_function(GLMessage::glGetUniformfv); 2921 2922 // copy argument program 2923 GLMessage_DataType *arg_program = glmsg.add_args(); 2924 arg_program->set_isarray(false); 2925 arg_program->set_type(GLMessage::DataType::INT); 2926 arg_program->add_intvalue(program); 2927 2928 // copy argument location 2929 GLMessage_DataType *arg_location = glmsg.add_args(); 2930 arg_location->set_isarray(false); 2931 arg_location->set_type(GLMessage::DataType::INT); 2932 arg_location->add_intvalue(location); 2933 2934 // copy argument params 2935 GLMessage_DataType *arg_params = glmsg.add_args(); 2936 arg_params->set_isarray(false); 2937 arg_params->set_type(GLMessage::DataType::INT64); 2938 arg_params->add_int64value((uintptr_t)params); 2939 2940 // call function 2941 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2942 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2943 glContext->hooks->gl.glGetUniformfv(program, location, params); 2944 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2945 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2946 2947 void *pointerArgs[] = { 2948 (void *) params, 2949 }; 2950 2951 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2952 threadStartTime, threadEndTime, 2953 &glmsg, pointerArgs); 2954 glContext->traceGLMessage(&glmsg); 2955 } 2956 2957 void GLTrace_glGetUniformiv(GLuint program, GLint location, GLint * params) { 2958 GLMessage glmsg; 2959 GLTraceContext *glContext = getGLTraceContext(); 2960 2961 glmsg.set_function(GLMessage::glGetUniformiv); 2962 2963 // copy argument program 2964 GLMessage_DataType *arg_program = glmsg.add_args(); 2965 arg_program->set_isarray(false); 2966 arg_program->set_type(GLMessage::DataType::INT); 2967 arg_program->add_intvalue(program); 2968 2969 // copy argument location 2970 GLMessage_DataType *arg_location = glmsg.add_args(); 2971 arg_location->set_isarray(false); 2972 arg_location->set_type(GLMessage::DataType::INT); 2973 arg_location->add_intvalue(location); 2974 2975 // copy argument params 2976 GLMessage_DataType *arg_params = glmsg.add_args(); 2977 arg_params->set_isarray(false); 2978 arg_params->set_type(GLMessage::DataType::INT64); 2979 arg_params->add_int64value((uintptr_t)params); 2980 2981 // call function 2982 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 2983 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 2984 glContext->hooks->gl.glGetUniformiv(program, location, params); 2985 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 2986 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 2987 2988 void *pointerArgs[] = { 2989 (void *) params, 2990 }; 2991 2992 fixupGLMessage(glContext, wallStartTime, wallEndTime, 2993 threadStartTime, threadEndTime, 2994 &glmsg, pointerArgs); 2995 glContext->traceGLMessage(&glmsg); 2996 } 2997 2998 GLint GLTrace_glGetUniformLocation(GLuint program, const GLchar * name) { 2999 GLMessage glmsg; 3000 GLTraceContext *glContext = getGLTraceContext(); 3001 3002 glmsg.set_function(GLMessage::glGetUniformLocation); 3003 3004 // copy argument program 3005 GLMessage_DataType *arg_program = glmsg.add_args(); 3006 arg_program->set_isarray(false); 3007 arg_program->set_type(GLMessage::DataType::INT); 3008 arg_program->add_intvalue(program); 3009 3010 // copy argument name 3011 GLMessage_DataType *arg_name = glmsg.add_args(); 3012 arg_name->set_isarray(false); 3013 arg_name->set_type(GLMessage::DataType::INT64); 3014 arg_name->add_int64value((uintptr_t)name); 3015 3016 // call function 3017 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3018 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3019 GLint retValue = glContext->hooks->gl.glGetUniformLocation(program, name); 3020 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3021 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3022 3023 // set return value 3024 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3025 rt->set_isarray(false); 3026 rt->set_type(GLMessage::DataType::INT); 3027 rt->add_intvalue(retValue); 3028 3029 void *pointerArgs[] = { 3030 (void *) name, 3031 }; 3032 3033 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3034 threadStartTime, threadEndTime, 3035 &glmsg, pointerArgs); 3036 glContext->traceGLMessage(&glmsg); 3037 3038 return retValue; 3039 } 3040 3041 void GLTrace_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat * params) { 3042 GLMessage glmsg; 3043 GLTraceContext *glContext = getGLTraceContext(); 3044 3045 glmsg.set_function(GLMessage::glGetVertexAttribfv); 3046 3047 // copy argument index 3048 GLMessage_DataType *arg_index = glmsg.add_args(); 3049 arg_index->set_isarray(false); 3050 arg_index->set_type(GLMessage::DataType::INT); 3051 arg_index->add_intvalue(index); 3052 3053 // copy argument pname 3054 GLMessage_DataType *arg_pname = glmsg.add_args(); 3055 arg_pname->set_isarray(false); 3056 arg_pname->set_type(GLMessage::DataType::ENUM); 3057 arg_pname->add_intvalue((int)pname); 3058 3059 // copy argument params 3060 GLMessage_DataType *arg_params = glmsg.add_args(); 3061 arg_params->set_isarray(false); 3062 arg_params->set_type(GLMessage::DataType::INT64); 3063 arg_params->add_int64value((uintptr_t)params); 3064 3065 // call function 3066 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3067 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3068 glContext->hooks->gl.glGetVertexAttribfv(index, pname, params); 3069 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3070 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3071 3072 void *pointerArgs[] = { 3073 (void *) params, 3074 }; 3075 3076 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3077 threadStartTime, threadEndTime, 3078 &glmsg, pointerArgs); 3079 glContext->traceGLMessage(&glmsg); 3080 } 3081 3082 void GLTrace_glGetVertexAttribiv(GLuint index, GLenum pname, GLint * params) { 3083 GLMessage glmsg; 3084 GLTraceContext *glContext = getGLTraceContext(); 3085 3086 glmsg.set_function(GLMessage::glGetVertexAttribiv); 3087 3088 // copy argument index 3089 GLMessage_DataType *arg_index = glmsg.add_args(); 3090 arg_index->set_isarray(false); 3091 arg_index->set_type(GLMessage::DataType::INT); 3092 arg_index->add_intvalue(index); 3093 3094 // copy argument pname 3095 GLMessage_DataType *arg_pname = glmsg.add_args(); 3096 arg_pname->set_isarray(false); 3097 arg_pname->set_type(GLMessage::DataType::ENUM); 3098 arg_pname->add_intvalue((int)pname); 3099 3100 // copy argument params 3101 GLMessage_DataType *arg_params = glmsg.add_args(); 3102 arg_params->set_isarray(false); 3103 arg_params->set_type(GLMessage::DataType::INT64); 3104 arg_params->add_int64value((uintptr_t)params); 3105 3106 // call function 3107 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3108 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3109 glContext->hooks->gl.glGetVertexAttribiv(index, pname, params); 3110 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3111 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3112 3113 void *pointerArgs[] = { 3114 (void *) params, 3115 }; 3116 3117 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3118 threadStartTime, threadEndTime, 3119 &glmsg, pointerArgs); 3120 glContext->traceGLMessage(&glmsg); 3121 } 3122 3123 void GLTrace_glGetVertexAttribPointerv(GLuint index, GLenum pname, void ** pointer) { 3124 GLMessage glmsg; 3125 GLTraceContext *glContext = getGLTraceContext(); 3126 3127 glmsg.set_function(GLMessage::glGetVertexAttribPointerv); 3128 3129 // copy argument index 3130 GLMessage_DataType *arg_index = glmsg.add_args(); 3131 arg_index->set_isarray(false); 3132 arg_index->set_type(GLMessage::DataType::INT); 3133 arg_index->add_intvalue(index); 3134 3135 // copy argument pname 3136 GLMessage_DataType *arg_pname = glmsg.add_args(); 3137 arg_pname->set_isarray(false); 3138 arg_pname->set_type(GLMessage::DataType::ENUM); 3139 arg_pname->add_intvalue((int)pname); 3140 3141 // copy argument pointer 3142 GLMessage_DataType *arg_pointer = glmsg.add_args(); 3143 arg_pointer->set_isarray(false); 3144 arg_pointer->set_type(GLMessage::DataType::INT64); 3145 arg_pointer->add_int64value((uintptr_t)pointer); 3146 3147 // call function 3148 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3149 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3150 glContext->hooks->gl.glGetVertexAttribPointerv(index, pname, pointer); 3151 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3152 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3153 3154 void *pointerArgs[] = { 3155 (void *) pointer, 3156 }; 3157 3158 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3159 threadStartTime, threadEndTime, 3160 &glmsg, pointerArgs); 3161 glContext->traceGLMessage(&glmsg); 3162 } 3163 3164 void GLTrace_glHint(GLenum target, GLenum mode) { 3165 GLMessage glmsg; 3166 GLTraceContext *glContext = getGLTraceContext(); 3167 3168 glmsg.set_function(GLMessage::glHint); 3169 3170 // copy argument target 3171 GLMessage_DataType *arg_target = glmsg.add_args(); 3172 arg_target->set_isarray(false); 3173 arg_target->set_type(GLMessage::DataType::ENUM); 3174 arg_target->add_intvalue((int)target); 3175 3176 // copy argument mode 3177 GLMessage_DataType *arg_mode = glmsg.add_args(); 3178 arg_mode->set_isarray(false); 3179 arg_mode->set_type(GLMessage::DataType::ENUM); 3180 arg_mode->add_intvalue((int)mode); 3181 3182 // call function 3183 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3184 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3185 glContext->hooks->gl.glHint(target, mode); 3186 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3187 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3188 3189 void *pointerArgs[] = { 3190 }; 3191 3192 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3193 threadStartTime, threadEndTime, 3194 &glmsg, pointerArgs); 3195 glContext->traceGLMessage(&glmsg); 3196 } 3197 3198 GLboolean GLTrace_glIsBuffer(GLuint buffer) { 3199 GLMessage glmsg; 3200 GLTraceContext *glContext = getGLTraceContext(); 3201 3202 glmsg.set_function(GLMessage::glIsBuffer); 3203 3204 // copy argument buffer 3205 GLMessage_DataType *arg_buffer = glmsg.add_args(); 3206 arg_buffer->set_isarray(false); 3207 arg_buffer->set_type(GLMessage::DataType::INT); 3208 arg_buffer->add_intvalue(buffer); 3209 3210 // call function 3211 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3212 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3213 GLboolean retValue = glContext->hooks->gl.glIsBuffer(buffer); 3214 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3215 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3216 3217 // set return value 3218 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3219 rt->set_isarray(false); 3220 rt->set_type(GLMessage::DataType::BOOL); 3221 rt->add_boolvalue(retValue); 3222 3223 void *pointerArgs[] = { 3224 }; 3225 3226 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3227 threadStartTime, threadEndTime, 3228 &glmsg, pointerArgs); 3229 glContext->traceGLMessage(&glmsg); 3230 3231 return retValue; 3232 } 3233 3234 GLboolean GLTrace_glIsEnabled(GLenum cap) { 3235 GLMessage glmsg; 3236 GLTraceContext *glContext = getGLTraceContext(); 3237 3238 glmsg.set_function(GLMessage::glIsEnabled); 3239 3240 // copy argument cap 3241 GLMessage_DataType *arg_cap = glmsg.add_args(); 3242 arg_cap->set_isarray(false); 3243 arg_cap->set_type(GLMessage::DataType::ENUM); 3244 arg_cap->add_intvalue((int)cap); 3245 3246 // call function 3247 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3248 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3249 GLboolean retValue = glContext->hooks->gl.glIsEnabled(cap); 3250 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3251 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3252 3253 // set return value 3254 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3255 rt->set_isarray(false); 3256 rt->set_type(GLMessage::DataType::BOOL); 3257 rt->add_boolvalue(retValue); 3258 3259 void *pointerArgs[] = { 3260 }; 3261 3262 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3263 threadStartTime, threadEndTime, 3264 &glmsg, pointerArgs); 3265 glContext->traceGLMessage(&glmsg); 3266 3267 return retValue; 3268 } 3269 3270 GLboolean GLTrace_glIsFramebuffer(GLuint framebuffer) { 3271 GLMessage glmsg; 3272 GLTraceContext *glContext = getGLTraceContext(); 3273 3274 glmsg.set_function(GLMessage::glIsFramebuffer); 3275 3276 // copy argument framebuffer 3277 GLMessage_DataType *arg_framebuffer = glmsg.add_args(); 3278 arg_framebuffer->set_isarray(false); 3279 arg_framebuffer->set_type(GLMessage::DataType::INT); 3280 arg_framebuffer->add_intvalue(framebuffer); 3281 3282 // call function 3283 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3284 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3285 GLboolean retValue = glContext->hooks->gl.glIsFramebuffer(framebuffer); 3286 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3287 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3288 3289 // set return value 3290 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3291 rt->set_isarray(false); 3292 rt->set_type(GLMessage::DataType::BOOL); 3293 rt->add_boolvalue(retValue); 3294 3295 void *pointerArgs[] = { 3296 }; 3297 3298 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3299 threadStartTime, threadEndTime, 3300 &glmsg, pointerArgs); 3301 glContext->traceGLMessage(&glmsg); 3302 3303 return retValue; 3304 } 3305 3306 GLboolean GLTrace_glIsProgram(GLuint program) { 3307 GLMessage glmsg; 3308 GLTraceContext *glContext = getGLTraceContext(); 3309 3310 glmsg.set_function(GLMessage::glIsProgram); 3311 3312 // copy argument program 3313 GLMessage_DataType *arg_program = glmsg.add_args(); 3314 arg_program->set_isarray(false); 3315 arg_program->set_type(GLMessage::DataType::INT); 3316 arg_program->add_intvalue(program); 3317 3318 // call function 3319 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3320 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3321 GLboolean retValue = glContext->hooks->gl.glIsProgram(program); 3322 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3323 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3324 3325 // set return value 3326 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3327 rt->set_isarray(false); 3328 rt->set_type(GLMessage::DataType::BOOL); 3329 rt->add_boolvalue(retValue); 3330 3331 void *pointerArgs[] = { 3332 }; 3333 3334 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3335 threadStartTime, threadEndTime, 3336 &glmsg, pointerArgs); 3337 glContext->traceGLMessage(&glmsg); 3338 3339 return retValue; 3340 } 3341 3342 GLboolean GLTrace_glIsRenderbuffer(GLuint renderbuffer) { 3343 GLMessage glmsg; 3344 GLTraceContext *glContext = getGLTraceContext(); 3345 3346 glmsg.set_function(GLMessage::glIsRenderbuffer); 3347 3348 // copy argument renderbuffer 3349 GLMessage_DataType *arg_renderbuffer = glmsg.add_args(); 3350 arg_renderbuffer->set_isarray(false); 3351 arg_renderbuffer->set_type(GLMessage::DataType::INT); 3352 arg_renderbuffer->add_intvalue(renderbuffer); 3353 3354 // call function 3355 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3356 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3357 GLboolean retValue = glContext->hooks->gl.glIsRenderbuffer(renderbuffer); 3358 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3359 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3360 3361 // set return value 3362 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3363 rt->set_isarray(false); 3364 rt->set_type(GLMessage::DataType::BOOL); 3365 rt->add_boolvalue(retValue); 3366 3367 void *pointerArgs[] = { 3368 }; 3369 3370 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3371 threadStartTime, threadEndTime, 3372 &glmsg, pointerArgs); 3373 glContext->traceGLMessage(&glmsg); 3374 3375 return retValue; 3376 } 3377 3378 GLboolean GLTrace_glIsShader(GLuint shader) { 3379 GLMessage glmsg; 3380 GLTraceContext *glContext = getGLTraceContext(); 3381 3382 glmsg.set_function(GLMessage::glIsShader); 3383 3384 // copy argument shader 3385 GLMessage_DataType *arg_shader = glmsg.add_args(); 3386 arg_shader->set_isarray(false); 3387 arg_shader->set_type(GLMessage::DataType::INT); 3388 arg_shader->add_intvalue(shader); 3389 3390 // call function 3391 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3392 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3393 GLboolean retValue = glContext->hooks->gl.glIsShader(shader); 3394 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3395 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3396 3397 // set return value 3398 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3399 rt->set_isarray(false); 3400 rt->set_type(GLMessage::DataType::BOOL); 3401 rt->add_boolvalue(retValue); 3402 3403 void *pointerArgs[] = { 3404 }; 3405 3406 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3407 threadStartTime, threadEndTime, 3408 &glmsg, pointerArgs); 3409 glContext->traceGLMessage(&glmsg); 3410 3411 return retValue; 3412 } 3413 3414 GLboolean GLTrace_glIsTexture(GLuint texture) { 3415 GLMessage glmsg; 3416 GLTraceContext *glContext = getGLTraceContext(); 3417 3418 glmsg.set_function(GLMessage::glIsTexture); 3419 3420 // copy argument texture 3421 GLMessage_DataType *arg_texture = glmsg.add_args(); 3422 arg_texture->set_isarray(false); 3423 arg_texture->set_type(GLMessage::DataType::INT); 3424 arg_texture->add_intvalue(texture); 3425 3426 // call function 3427 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3428 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3429 GLboolean retValue = glContext->hooks->gl.glIsTexture(texture); 3430 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3431 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3432 3433 // set return value 3434 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 3435 rt->set_isarray(false); 3436 rt->set_type(GLMessage::DataType::BOOL); 3437 rt->add_boolvalue(retValue); 3438 3439 void *pointerArgs[] = { 3440 }; 3441 3442 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3443 threadStartTime, threadEndTime, 3444 &glmsg, pointerArgs); 3445 glContext->traceGLMessage(&glmsg); 3446 3447 return retValue; 3448 } 3449 3450 void GLTrace_glLineWidth(GLfloat width) { 3451 GLMessage glmsg; 3452 GLTraceContext *glContext = getGLTraceContext(); 3453 3454 glmsg.set_function(GLMessage::glLineWidth); 3455 3456 // copy argument width 3457 GLMessage_DataType *arg_width = glmsg.add_args(); 3458 arg_width->set_isarray(false); 3459 arg_width->set_type(GLMessage::DataType::FLOAT); 3460 arg_width->add_floatvalue(width); 3461 3462 // call function 3463 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3464 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3465 glContext->hooks->gl.glLineWidth(width); 3466 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3467 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3468 3469 void *pointerArgs[] = { 3470 }; 3471 3472 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3473 threadStartTime, threadEndTime, 3474 &glmsg, pointerArgs); 3475 glContext->traceGLMessage(&glmsg); 3476 } 3477 3478 void GLTrace_glLinkProgram(GLuint program) { 3479 GLMessage glmsg; 3480 GLTraceContext *glContext = getGLTraceContext(); 3481 3482 glmsg.set_function(GLMessage::glLinkProgram); 3483 3484 // copy argument program 3485 GLMessage_DataType *arg_program = glmsg.add_args(); 3486 arg_program->set_isarray(false); 3487 arg_program->set_type(GLMessage::DataType::INT); 3488 arg_program->add_intvalue(program); 3489 3490 // call function 3491 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3492 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3493 glContext->hooks->gl.glLinkProgram(program); 3494 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3495 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3496 3497 void *pointerArgs[] = { 3498 }; 3499 3500 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3501 threadStartTime, threadEndTime, 3502 &glmsg, pointerArgs); 3503 glContext->traceGLMessage(&glmsg); 3504 } 3505 3506 void GLTrace_glPixelStorei(GLenum pname, GLint param) { 3507 GLMessage glmsg; 3508 GLTraceContext *glContext = getGLTraceContext(); 3509 3510 glmsg.set_function(GLMessage::glPixelStorei); 3511 3512 // copy argument pname 3513 GLMessage_DataType *arg_pname = glmsg.add_args(); 3514 arg_pname->set_isarray(false); 3515 arg_pname->set_type(GLMessage::DataType::ENUM); 3516 arg_pname->add_intvalue((int)pname); 3517 3518 // copy argument param 3519 GLMessage_DataType *arg_param = glmsg.add_args(); 3520 arg_param->set_isarray(false); 3521 arg_param->set_type(GLMessage::DataType::INT); 3522 arg_param->add_intvalue(param); 3523 3524 // call function 3525 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3526 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3527 glContext->hooks->gl.glPixelStorei(pname, param); 3528 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3529 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3530 3531 void *pointerArgs[] = { 3532 }; 3533 3534 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3535 threadStartTime, threadEndTime, 3536 &glmsg, pointerArgs); 3537 glContext->traceGLMessage(&glmsg); 3538 } 3539 3540 void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units) { 3541 GLMessage glmsg; 3542 GLTraceContext *glContext = getGLTraceContext(); 3543 3544 glmsg.set_function(GLMessage::glPolygonOffset); 3545 3546 // copy argument factor 3547 GLMessage_DataType *arg_factor = glmsg.add_args(); 3548 arg_factor->set_isarray(false); 3549 arg_factor->set_type(GLMessage::DataType::FLOAT); 3550 arg_factor->add_floatvalue(factor); 3551 3552 // copy argument units 3553 GLMessage_DataType *arg_units = glmsg.add_args(); 3554 arg_units->set_isarray(false); 3555 arg_units->set_type(GLMessage::DataType::FLOAT); 3556 arg_units->add_floatvalue(units); 3557 3558 // call function 3559 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3560 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3561 glContext->hooks->gl.glPolygonOffset(factor, units); 3562 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3563 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3564 3565 void *pointerArgs[] = { 3566 }; 3567 3568 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3569 threadStartTime, threadEndTime, 3570 &glmsg, pointerArgs); 3571 glContext->traceGLMessage(&glmsg); 3572 } 3573 3574 void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void * pixels) { 3575 GLMessage glmsg; 3576 GLTraceContext *glContext = getGLTraceContext(); 3577 3578 glmsg.set_function(GLMessage::glReadPixels); 3579 3580 // copy argument x 3581 GLMessage_DataType *arg_x = glmsg.add_args(); 3582 arg_x->set_isarray(false); 3583 arg_x->set_type(GLMessage::DataType::INT); 3584 arg_x->add_intvalue(x); 3585 3586 // copy argument y 3587 GLMessage_DataType *arg_y = glmsg.add_args(); 3588 arg_y->set_isarray(false); 3589 arg_y->set_type(GLMessage::DataType::INT); 3590 arg_y->add_intvalue(y); 3591 3592 // copy argument width 3593 GLMessage_DataType *arg_width = glmsg.add_args(); 3594 arg_width->set_isarray(false); 3595 arg_width->set_type(GLMessage::DataType::INT); 3596 arg_width->add_intvalue(width); 3597 3598 // copy argument height 3599 GLMessage_DataType *arg_height = glmsg.add_args(); 3600 arg_height->set_isarray(false); 3601 arg_height->set_type(GLMessage::DataType::INT); 3602 arg_height->add_intvalue(height); 3603 3604 // copy argument format 3605 GLMessage_DataType *arg_format = glmsg.add_args(); 3606 arg_format->set_isarray(false); 3607 arg_format->set_type(GLMessage::DataType::ENUM); 3608 arg_format->add_intvalue((int)format); 3609 3610 // copy argument type 3611 GLMessage_DataType *arg_type = glmsg.add_args(); 3612 arg_type->set_isarray(false); 3613 arg_type->set_type(GLMessage::DataType::ENUM); 3614 arg_type->add_intvalue((int)type); 3615 3616 // copy argument pixels 3617 GLMessage_DataType *arg_pixels = glmsg.add_args(); 3618 arg_pixels->set_isarray(false); 3619 arg_pixels->set_type(GLMessage::DataType::INT64); 3620 arg_pixels->add_int64value((uintptr_t)pixels); 3621 3622 // call function 3623 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3624 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3625 glContext->hooks->gl.glReadPixels(x, y, width, height, format, type, pixels); 3626 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3627 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3628 3629 void *pointerArgs[] = { 3630 (void *) pixels, 3631 }; 3632 3633 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3634 threadStartTime, threadEndTime, 3635 &glmsg, pointerArgs); 3636 glContext->traceGLMessage(&glmsg); 3637 } 3638 3639 void GLTrace_glReleaseShaderCompiler(void) { 3640 GLMessage glmsg; 3641 GLTraceContext *glContext = getGLTraceContext(); 3642 3643 glmsg.set_function(GLMessage::glReleaseShaderCompiler); 3644 3645 // call function 3646 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3647 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3648 glContext->hooks->gl.glReleaseShaderCompiler(); 3649 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3650 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3651 3652 void *pointerArgs[] = { 3653 }; 3654 3655 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3656 threadStartTime, threadEndTime, 3657 &glmsg, pointerArgs); 3658 glContext->traceGLMessage(&glmsg); 3659 } 3660 3661 void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { 3662 GLMessage glmsg; 3663 GLTraceContext *glContext = getGLTraceContext(); 3664 3665 glmsg.set_function(GLMessage::glRenderbufferStorage); 3666 3667 // copy argument target 3668 GLMessage_DataType *arg_target = glmsg.add_args(); 3669 arg_target->set_isarray(false); 3670 arg_target->set_type(GLMessage::DataType::ENUM); 3671 arg_target->add_intvalue((int)target); 3672 3673 // copy argument internalformat 3674 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 3675 arg_internalformat->set_isarray(false); 3676 arg_internalformat->set_type(GLMessage::DataType::ENUM); 3677 arg_internalformat->add_intvalue((int)internalformat); 3678 3679 // copy argument width 3680 GLMessage_DataType *arg_width = glmsg.add_args(); 3681 arg_width->set_isarray(false); 3682 arg_width->set_type(GLMessage::DataType::INT); 3683 arg_width->add_intvalue(width); 3684 3685 // copy argument height 3686 GLMessage_DataType *arg_height = glmsg.add_args(); 3687 arg_height->set_isarray(false); 3688 arg_height->set_type(GLMessage::DataType::INT); 3689 arg_height->add_intvalue(height); 3690 3691 // call function 3692 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3693 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3694 glContext->hooks->gl.glRenderbufferStorage(target, internalformat, width, height); 3695 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3696 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3697 3698 void *pointerArgs[] = { 3699 }; 3700 3701 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3702 threadStartTime, threadEndTime, 3703 &glmsg, pointerArgs); 3704 glContext->traceGLMessage(&glmsg); 3705 } 3706 3707 void GLTrace_glSampleCoverage(GLfloat value, GLboolean invert) { 3708 GLMessage glmsg; 3709 GLTraceContext *glContext = getGLTraceContext(); 3710 3711 glmsg.set_function(GLMessage::glSampleCoverage); 3712 3713 // copy argument value 3714 GLMessage_DataType *arg_value = glmsg.add_args(); 3715 arg_value->set_isarray(false); 3716 arg_value->set_type(GLMessage::DataType::FLOAT); 3717 arg_value->add_floatvalue(value); 3718 3719 // copy argument invert 3720 GLMessage_DataType *arg_invert = glmsg.add_args(); 3721 arg_invert->set_isarray(false); 3722 arg_invert->set_type(GLMessage::DataType::BOOL); 3723 arg_invert->add_boolvalue(invert); 3724 3725 // call function 3726 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3727 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3728 glContext->hooks->gl.glSampleCoverage(value, invert); 3729 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3730 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3731 3732 void *pointerArgs[] = { 3733 }; 3734 3735 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3736 threadStartTime, threadEndTime, 3737 &glmsg, pointerArgs); 3738 glContext->traceGLMessage(&glmsg); 3739 } 3740 3741 void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { 3742 GLMessage glmsg; 3743 GLTraceContext *glContext = getGLTraceContext(); 3744 3745 glmsg.set_function(GLMessage::glScissor); 3746 3747 // copy argument x 3748 GLMessage_DataType *arg_x = glmsg.add_args(); 3749 arg_x->set_isarray(false); 3750 arg_x->set_type(GLMessage::DataType::INT); 3751 arg_x->add_intvalue(x); 3752 3753 // copy argument y 3754 GLMessage_DataType *arg_y = glmsg.add_args(); 3755 arg_y->set_isarray(false); 3756 arg_y->set_type(GLMessage::DataType::INT); 3757 arg_y->add_intvalue(y); 3758 3759 // copy argument width 3760 GLMessage_DataType *arg_width = glmsg.add_args(); 3761 arg_width->set_isarray(false); 3762 arg_width->set_type(GLMessage::DataType::INT); 3763 arg_width->add_intvalue(width); 3764 3765 // copy argument height 3766 GLMessage_DataType *arg_height = glmsg.add_args(); 3767 arg_height->set_isarray(false); 3768 arg_height->set_type(GLMessage::DataType::INT); 3769 arg_height->add_intvalue(height); 3770 3771 // call function 3772 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3773 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3774 glContext->hooks->gl.glScissor(x, y, width, height); 3775 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3776 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3777 3778 void *pointerArgs[] = { 3779 }; 3780 3781 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3782 threadStartTime, threadEndTime, 3783 &glmsg, pointerArgs); 3784 glContext->traceGLMessage(&glmsg); 3785 } 3786 3787 void GLTrace_glShaderBinary(GLsizei count, const GLuint * shaders, GLenum binaryformat, const void * binary, GLsizei length) { 3788 GLMessage glmsg; 3789 GLTraceContext *glContext = getGLTraceContext(); 3790 3791 glmsg.set_function(GLMessage::glShaderBinary); 3792 3793 // copy argument count 3794 GLMessage_DataType *arg_count = glmsg.add_args(); 3795 arg_count->set_isarray(false); 3796 arg_count->set_type(GLMessage::DataType::INT); 3797 arg_count->add_intvalue(count); 3798 3799 // copy argument shaders 3800 GLMessage_DataType *arg_shaders = glmsg.add_args(); 3801 arg_shaders->set_isarray(false); 3802 arg_shaders->set_type(GLMessage::DataType::INT64); 3803 arg_shaders->add_int64value((uintptr_t)shaders); 3804 3805 // copy argument binaryformat 3806 GLMessage_DataType *arg_binaryformat = glmsg.add_args(); 3807 arg_binaryformat->set_isarray(false); 3808 arg_binaryformat->set_type(GLMessage::DataType::ENUM); 3809 arg_binaryformat->add_intvalue((int)binaryformat); 3810 3811 // copy argument binary 3812 GLMessage_DataType *arg_binary = glmsg.add_args(); 3813 arg_binary->set_isarray(false); 3814 arg_binary->set_type(GLMessage::DataType::INT64); 3815 arg_binary->add_int64value((uintptr_t)binary); 3816 3817 // copy argument length 3818 GLMessage_DataType *arg_length = glmsg.add_args(); 3819 arg_length->set_isarray(false); 3820 arg_length->set_type(GLMessage::DataType::INT); 3821 arg_length->add_intvalue(length); 3822 3823 // call function 3824 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3825 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3826 glContext->hooks->gl.glShaderBinary(count, shaders, binaryformat, binary, length); 3827 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3828 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3829 3830 void *pointerArgs[] = { 3831 (void *) shaders, 3832 (void *) binary, 3833 }; 3834 3835 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3836 threadStartTime, threadEndTime, 3837 &glmsg, pointerArgs); 3838 glContext->traceGLMessage(&glmsg); 3839 } 3840 3841 void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar *const* string, const GLint * length) { 3842 GLMessage glmsg; 3843 GLTraceContext *glContext = getGLTraceContext(); 3844 3845 glmsg.set_function(GLMessage::glShaderSource); 3846 3847 // copy argument shader 3848 GLMessage_DataType *arg_shader = glmsg.add_args(); 3849 arg_shader->set_isarray(false); 3850 arg_shader->set_type(GLMessage::DataType::INT); 3851 arg_shader->add_intvalue(shader); 3852 3853 // copy argument count 3854 GLMessage_DataType *arg_count = glmsg.add_args(); 3855 arg_count->set_isarray(false); 3856 arg_count->set_type(GLMessage::DataType::INT); 3857 arg_count->add_intvalue(count); 3858 3859 // copy argument string 3860 GLMessage_DataType *arg_string = glmsg.add_args(); 3861 arg_string->set_isarray(false); 3862 arg_string->set_type(GLMessage::DataType::INT64); 3863 arg_string->add_int64value((uintptr_t)string); 3864 3865 // copy argument length 3866 GLMessage_DataType *arg_length = glmsg.add_args(); 3867 arg_length->set_isarray(false); 3868 arg_length->set_type(GLMessage::DataType::INT64); 3869 arg_length->add_int64value((uintptr_t)length); 3870 3871 // call function 3872 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3873 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3874 glContext->hooks->gl.glShaderSource(shader, count, string, length); 3875 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3876 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3877 3878 void *pointerArgs[] = { 3879 (void *) string, 3880 (void *) length, 3881 }; 3882 3883 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3884 threadStartTime, threadEndTime, 3885 &glmsg, pointerArgs); 3886 glContext->traceGLMessage(&glmsg); 3887 } 3888 3889 void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask) { 3890 GLMessage glmsg; 3891 GLTraceContext *glContext = getGLTraceContext(); 3892 3893 glmsg.set_function(GLMessage::glStencilFunc); 3894 3895 // copy argument func 3896 GLMessage_DataType *arg_func = glmsg.add_args(); 3897 arg_func->set_isarray(false); 3898 arg_func->set_type(GLMessage::DataType::ENUM); 3899 arg_func->add_intvalue((int)func); 3900 3901 // copy argument ref 3902 GLMessage_DataType *arg_ref = glmsg.add_args(); 3903 arg_ref->set_isarray(false); 3904 arg_ref->set_type(GLMessage::DataType::INT); 3905 arg_ref->add_intvalue(ref); 3906 3907 // copy argument mask 3908 GLMessage_DataType *arg_mask = glmsg.add_args(); 3909 arg_mask->set_isarray(false); 3910 arg_mask->set_type(GLMessage::DataType::INT); 3911 arg_mask->add_intvalue(mask); 3912 3913 // call function 3914 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3915 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3916 glContext->hooks->gl.glStencilFunc(func, ref, mask); 3917 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3918 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3919 3920 void *pointerArgs[] = { 3921 }; 3922 3923 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3924 threadStartTime, threadEndTime, 3925 &glmsg, pointerArgs); 3926 glContext->traceGLMessage(&glmsg); 3927 } 3928 3929 void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { 3930 GLMessage glmsg; 3931 GLTraceContext *glContext = getGLTraceContext(); 3932 3933 glmsg.set_function(GLMessage::glStencilFuncSeparate); 3934 3935 // copy argument face 3936 GLMessage_DataType *arg_face = glmsg.add_args(); 3937 arg_face->set_isarray(false); 3938 arg_face->set_type(GLMessage::DataType::ENUM); 3939 arg_face->add_intvalue((int)face); 3940 3941 // copy argument func 3942 GLMessage_DataType *arg_func = glmsg.add_args(); 3943 arg_func->set_isarray(false); 3944 arg_func->set_type(GLMessage::DataType::ENUM); 3945 arg_func->add_intvalue((int)func); 3946 3947 // copy argument ref 3948 GLMessage_DataType *arg_ref = glmsg.add_args(); 3949 arg_ref->set_isarray(false); 3950 arg_ref->set_type(GLMessage::DataType::INT); 3951 arg_ref->add_intvalue(ref); 3952 3953 // copy argument mask 3954 GLMessage_DataType *arg_mask = glmsg.add_args(); 3955 arg_mask->set_isarray(false); 3956 arg_mask->set_type(GLMessage::DataType::INT); 3957 arg_mask->add_intvalue(mask); 3958 3959 // call function 3960 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3961 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3962 glContext->hooks->gl.glStencilFuncSeparate(face, func, ref, mask); 3963 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3964 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3965 3966 void *pointerArgs[] = { 3967 }; 3968 3969 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3970 threadStartTime, threadEndTime, 3971 &glmsg, pointerArgs); 3972 glContext->traceGLMessage(&glmsg); 3973 } 3974 3975 void GLTrace_glStencilMask(GLuint mask) { 3976 GLMessage glmsg; 3977 GLTraceContext *glContext = getGLTraceContext(); 3978 3979 glmsg.set_function(GLMessage::glStencilMask); 3980 3981 // copy argument mask 3982 GLMessage_DataType *arg_mask = glmsg.add_args(); 3983 arg_mask->set_isarray(false); 3984 arg_mask->set_type(GLMessage::DataType::INT); 3985 arg_mask->add_intvalue(mask); 3986 3987 // call function 3988 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 3989 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 3990 glContext->hooks->gl.glStencilMask(mask); 3991 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 3992 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 3993 3994 void *pointerArgs[] = { 3995 }; 3996 3997 fixupGLMessage(glContext, wallStartTime, wallEndTime, 3998 threadStartTime, threadEndTime, 3999 &glmsg, pointerArgs); 4000 glContext->traceGLMessage(&glmsg); 4001 } 4002 4003 void GLTrace_glStencilMaskSeparate(GLenum face, GLuint mask) { 4004 GLMessage glmsg; 4005 GLTraceContext *glContext = getGLTraceContext(); 4006 4007 glmsg.set_function(GLMessage::glStencilMaskSeparate); 4008 4009 // copy argument face 4010 GLMessage_DataType *arg_face = glmsg.add_args(); 4011 arg_face->set_isarray(false); 4012 arg_face->set_type(GLMessage::DataType::ENUM); 4013 arg_face->add_intvalue((int)face); 4014 4015 // copy argument mask 4016 GLMessage_DataType *arg_mask = glmsg.add_args(); 4017 arg_mask->set_isarray(false); 4018 arg_mask->set_type(GLMessage::DataType::INT); 4019 arg_mask->add_intvalue(mask); 4020 4021 // call function 4022 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4023 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4024 glContext->hooks->gl.glStencilMaskSeparate(face, mask); 4025 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4026 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4027 4028 void *pointerArgs[] = { 4029 }; 4030 4031 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4032 threadStartTime, threadEndTime, 4033 &glmsg, pointerArgs); 4034 glContext->traceGLMessage(&glmsg); 4035 } 4036 4037 void GLTrace_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) { 4038 GLMessage glmsg; 4039 GLTraceContext *glContext = getGLTraceContext(); 4040 4041 glmsg.set_function(GLMessage::glStencilOp); 4042 4043 // copy argument fail 4044 GLMessage_DataType *arg_fail = glmsg.add_args(); 4045 arg_fail->set_isarray(false); 4046 arg_fail->set_type(GLMessage::DataType::ENUM); 4047 arg_fail->add_intvalue((int)fail); 4048 4049 // copy argument zfail 4050 GLMessage_DataType *arg_zfail = glmsg.add_args(); 4051 arg_zfail->set_isarray(false); 4052 arg_zfail->set_type(GLMessage::DataType::ENUM); 4053 arg_zfail->add_intvalue((int)zfail); 4054 4055 // copy argument zpass 4056 GLMessage_DataType *arg_zpass = glmsg.add_args(); 4057 arg_zpass->set_isarray(false); 4058 arg_zpass->set_type(GLMessage::DataType::ENUM); 4059 arg_zpass->add_intvalue((int)zpass); 4060 4061 // call function 4062 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4063 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4064 glContext->hooks->gl.glStencilOp(fail, zfail, zpass); 4065 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4066 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4067 4068 void *pointerArgs[] = { 4069 }; 4070 4071 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4072 threadStartTime, threadEndTime, 4073 &glmsg, pointerArgs); 4074 glContext->traceGLMessage(&glmsg); 4075 } 4076 4077 void GLTrace_glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) { 4078 GLMessage glmsg; 4079 GLTraceContext *glContext = getGLTraceContext(); 4080 4081 glmsg.set_function(GLMessage::glStencilOpSeparate); 4082 4083 // copy argument face 4084 GLMessage_DataType *arg_face = glmsg.add_args(); 4085 arg_face->set_isarray(false); 4086 arg_face->set_type(GLMessage::DataType::ENUM); 4087 arg_face->add_intvalue((int)face); 4088 4089 // copy argument sfail 4090 GLMessage_DataType *arg_sfail = glmsg.add_args(); 4091 arg_sfail->set_isarray(false); 4092 arg_sfail->set_type(GLMessage::DataType::ENUM); 4093 arg_sfail->add_intvalue((int)sfail); 4094 4095 // copy argument dpfail 4096 GLMessage_DataType *arg_dpfail = glmsg.add_args(); 4097 arg_dpfail->set_isarray(false); 4098 arg_dpfail->set_type(GLMessage::DataType::ENUM); 4099 arg_dpfail->add_intvalue((int)dpfail); 4100 4101 // copy argument dppass 4102 GLMessage_DataType *arg_dppass = glmsg.add_args(); 4103 arg_dppass->set_isarray(false); 4104 arg_dppass->set_type(GLMessage::DataType::ENUM); 4105 arg_dppass->add_intvalue((int)dppass); 4106 4107 // call function 4108 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4109 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4110 glContext->hooks->gl.glStencilOpSeparate(face, sfail, dpfail, dppass); 4111 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4112 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4113 4114 void *pointerArgs[] = { 4115 }; 4116 4117 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4118 threadStartTime, threadEndTime, 4119 &glmsg, pointerArgs); 4120 glContext->traceGLMessage(&glmsg); 4121 } 4122 4123 void GLTrace_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void * pixels) { 4124 GLMessage glmsg; 4125 GLTraceContext *glContext = getGLTraceContext(); 4126 4127 glmsg.set_function(GLMessage::glTexImage2D); 4128 4129 // copy argument target 4130 GLMessage_DataType *arg_target = glmsg.add_args(); 4131 arg_target->set_isarray(false); 4132 arg_target->set_type(GLMessage::DataType::ENUM); 4133 arg_target->add_intvalue((int)target); 4134 4135 // copy argument level 4136 GLMessage_DataType *arg_level = glmsg.add_args(); 4137 arg_level->set_isarray(false); 4138 arg_level->set_type(GLMessage::DataType::INT); 4139 arg_level->add_intvalue(level); 4140 4141 // copy argument internalformat 4142 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 4143 arg_internalformat->set_isarray(false); 4144 arg_internalformat->set_type(GLMessage::DataType::INT); 4145 arg_internalformat->add_intvalue(internalformat); 4146 4147 // copy argument width 4148 GLMessage_DataType *arg_width = glmsg.add_args(); 4149 arg_width->set_isarray(false); 4150 arg_width->set_type(GLMessage::DataType::INT); 4151 arg_width->add_intvalue(width); 4152 4153 // copy argument height 4154 GLMessage_DataType *arg_height = glmsg.add_args(); 4155 arg_height->set_isarray(false); 4156 arg_height->set_type(GLMessage::DataType::INT); 4157 arg_height->add_intvalue(height); 4158 4159 // copy argument border 4160 GLMessage_DataType *arg_border = glmsg.add_args(); 4161 arg_border->set_isarray(false); 4162 arg_border->set_type(GLMessage::DataType::INT); 4163 arg_border->add_intvalue(border); 4164 4165 // copy argument format 4166 GLMessage_DataType *arg_format = glmsg.add_args(); 4167 arg_format->set_isarray(false); 4168 arg_format->set_type(GLMessage::DataType::ENUM); 4169 arg_format->add_intvalue((int)format); 4170 4171 // copy argument type 4172 GLMessage_DataType *arg_type = glmsg.add_args(); 4173 arg_type->set_isarray(false); 4174 arg_type->set_type(GLMessage::DataType::ENUM); 4175 arg_type->add_intvalue((int)type); 4176 4177 // copy argument pixels 4178 GLMessage_DataType *arg_pixels = glmsg.add_args(); 4179 arg_pixels->set_isarray(false); 4180 arg_pixels->set_type(GLMessage::DataType::INT64); 4181 arg_pixels->add_int64value((uintptr_t)pixels); 4182 4183 // call function 4184 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4185 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4186 glContext->hooks->gl.glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); 4187 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4188 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4189 4190 void *pointerArgs[] = { 4191 (void *) pixels, 4192 }; 4193 4194 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4195 threadStartTime, threadEndTime, 4196 &glmsg, pointerArgs); 4197 glContext->traceGLMessage(&glmsg); 4198 } 4199 4200 void GLTrace_glTexParameterf(GLenum target, GLenum pname, GLfloat param) { 4201 GLMessage glmsg; 4202 GLTraceContext *glContext = getGLTraceContext(); 4203 4204 glmsg.set_function(GLMessage::glTexParameterf); 4205 4206 // copy argument target 4207 GLMessage_DataType *arg_target = glmsg.add_args(); 4208 arg_target->set_isarray(false); 4209 arg_target->set_type(GLMessage::DataType::ENUM); 4210 arg_target->add_intvalue((int)target); 4211 4212 // copy argument pname 4213 GLMessage_DataType *arg_pname = glmsg.add_args(); 4214 arg_pname->set_isarray(false); 4215 arg_pname->set_type(GLMessage::DataType::ENUM); 4216 arg_pname->add_intvalue((int)pname); 4217 4218 // copy argument param 4219 GLMessage_DataType *arg_param = glmsg.add_args(); 4220 arg_param->set_isarray(false); 4221 arg_param->set_type(GLMessage::DataType::FLOAT); 4222 arg_param->add_floatvalue(param); 4223 4224 // call function 4225 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4226 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4227 glContext->hooks->gl.glTexParameterf(target, pname, param); 4228 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4229 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4230 4231 void *pointerArgs[] = { 4232 }; 4233 4234 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4235 threadStartTime, threadEndTime, 4236 &glmsg, pointerArgs); 4237 glContext->traceGLMessage(&glmsg); 4238 } 4239 4240 void GLTrace_glTexParameterfv(GLenum target, GLenum pname, const GLfloat * params) { 4241 GLMessage glmsg; 4242 GLTraceContext *glContext = getGLTraceContext(); 4243 4244 glmsg.set_function(GLMessage::glTexParameterfv); 4245 4246 // copy argument target 4247 GLMessage_DataType *arg_target = glmsg.add_args(); 4248 arg_target->set_isarray(false); 4249 arg_target->set_type(GLMessage::DataType::ENUM); 4250 arg_target->add_intvalue((int)target); 4251 4252 // copy argument pname 4253 GLMessage_DataType *arg_pname = glmsg.add_args(); 4254 arg_pname->set_isarray(false); 4255 arg_pname->set_type(GLMessage::DataType::ENUM); 4256 arg_pname->add_intvalue((int)pname); 4257 4258 // copy argument params 4259 GLMessage_DataType *arg_params = glmsg.add_args(); 4260 arg_params->set_isarray(false); 4261 arg_params->set_type(GLMessage::DataType::INT64); 4262 arg_params->add_int64value((uintptr_t)params); 4263 4264 // call function 4265 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4266 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4267 glContext->hooks->gl.glTexParameterfv(target, pname, params); 4268 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4269 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4270 4271 void *pointerArgs[] = { 4272 (void *) params, 4273 }; 4274 4275 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4276 threadStartTime, threadEndTime, 4277 &glmsg, pointerArgs); 4278 glContext->traceGLMessage(&glmsg); 4279 } 4280 4281 void GLTrace_glTexParameteri(GLenum target, GLenum pname, GLint param) { 4282 GLMessage glmsg; 4283 GLTraceContext *glContext = getGLTraceContext(); 4284 4285 glmsg.set_function(GLMessage::glTexParameteri); 4286 4287 // copy argument target 4288 GLMessage_DataType *arg_target = glmsg.add_args(); 4289 arg_target->set_isarray(false); 4290 arg_target->set_type(GLMessage::DataType::ENUM); 4291 arg_target->add_intvalue((int)target); 4292 4293 // copy argument pname 4294 GLMessage_DataType *arg_pname = glmsg.add_args(); 4295 arg_pname->set_isarray(false); 4296 arg_pname->set_type(GLMessage::DataType::ENUM); 4297 arg_pname->add_intvalue((int)pname); 4298 4299 // copy argument param 4300 GLMessage_DataType *arg_param = glmsg.add_args(); 4301 arg_param->set_isarray(false); 4302 arg_param->set_type(GLMessage::DataType::INT); 4303 arg_param->add_intvalue(param); 4304 4305 // call function 4306 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4307 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4308 glContext->hooks->gl.glTexParameteri(target, pname, param); 4309 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4310 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4311 4312 void *pointerArgs[] = { 4313 }; 4314 4315 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4316 threadStartTime, threadEndTime, 4317 &glmsg, pointerArgs); 4318 glContext->traceGLMessage(&glmsg); 4319 } 4320 4321 void GLTrace_glTexParameteriv(GLenum target, GLenum pname, const GLint * params) { 4322 GLMessage glmsg; 4323 GLTraceContext *glContext = getGLTraceContext(); 4324 4325 glmsg.set_function(GLMessage::glTexParameteriv); 4326 4327 // copy argument target 4328 GLMessage_DataType *arg_target = glmsg.add_args(); 4329 arg_target->set_isarray(false); 4330 arg_target->set_type(GLMessage::DataType::ENUM); 4331 arg_target->add_intvalue((int)target); 4332 4333 // copy argument pname 4334 GLMessage_DataType *arg_pname = glmsg.add_args(); 4335 arg_pname->set_isarray(false); 4336 arg_pname->set_type(GLMessage::DataType::ENUM); 4337 arg_pname->add_intvalue((int)pname); 4338 4339 // copy argument params 4340 GLMessage_DataType *arg_params = glmsg.add_args(); 4341 arg_params->set_isarray(false); 4342 arg_params->set_type(GLMessage::DataType::INT64); 4343 arg_params->add_int64value((uintptr_t)params); 4344 4345 // call function 4346 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4347 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4348 glContext->hooks->gl.glTexParameteriv(target, pname, params); 4349 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4350 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4351 4352 void *pointerArgs[] = { 4353 (void *) params, 4354 }; 4355 4356 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4357 threadStartTime, threadEndTime, 4358 &glmsg, pointerArgs); 4359 glContext->traceGLMessage(&glmsg); 4360 } 4361 4362 void GLTrace_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void * pixels) { 4363 GLMessage glmsg; 4364 GLTraceContext *glContext = getGLTraceContext(); 4365 4366 glmsg.set_function(GLMessage::glTexSubImage2D); 4367 4368 // copy argument target 4369 GLMessage_DataType *arg_target = glmsg.add_args(); 4370 arg_target->set_isarray(false); 4371 arg_target->set_type(GLMessage::DataType::ENUM); 4372 arg_target->add_intvalue((int)target); 4373 4374 // copy argument level 4375 GLMessage_DataType *arg_level = glmsg.add_args(); 4376 arg_level->set_isarray(false); 4377 arg_level->set_type(GLMessage::DataType::INT); 4378 arg_level->add_intvalue(level); 4379 4380 // copy argument xoffset 4381 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 4382 arg_xoffset->set_isarray(false); 4383 arg_xoffset->set_type(GLMessage::DataType::INT); 4384 arg_xoffset->add_intvalue(xoffset); 4385 4386 // copy argument yoffset 4387 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 4388 arg_yoffset->set_isarray(false); 4389 arg_yoffset->set_type(GLMessage::DataType::INT); 4390 arg_yoffset->add_intvalue(yoffset); 4391 4392 // copy argument width 4393 GLMessage_DataType *arg_width = glmsg.add_args(); 4394 arg_width->set_isarray(false); 4395 arg_width->set_type(GLMessage::DataType::INT); 4396 arg_width->add_intvalue(width); 4397 4398 // copy argument height 4399 GLMessage_DataType *arg_height = glmsg.add_args(); 4400 arg_height->set_isarray(false); 4401 arg_height->set_type(GLMessage::DataType::INT); 4402 arg_height->add_intvalue(height); 4403 4404 // copy argument format 4405 GLMessage_DataType *arg_format = glmsg.add_args(); 4406 arg_format->set_isarray(false); 4407 arg_format->set_type(GLMessage::DataType::ENUM); 4408 arg_format->add_intvalue((int)format); 4409 4410 // copy argument type 4411 GLMessage_DataType *arg_type = glmsg.add_args(); 4412 arg_type->set_isarray(false); 4413 arg_type->set_type(GLMessage::DataType::ENUM); 4414 arg_type->add_intvalue((int)type); 4415 4416 // copy argument pixels 4417 GLMessage_DataType *arg_pixels = glmsg.add_args(); 4418 arg_pixels->set_isarray(false); 4419 arg_pixels->set_type(GLMessage::DataType::INT64); 4420 arg_pixels->add_int64value((uintptr_t)pixels); 4421 4422 // call function 4423 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4424 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4425 glContext->hooks->gl.glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); 4426 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4427 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4428 4429 void *pointerArgs[] = { 4430 (void *) pixels, 4431 }; 4432 4433 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4434 threadStartTime, threadEndTime, 4435 &glmsg, pointerArgs); 4436 glContext->traceGLMessage(&glmsg); 4437 } 4438 4439 void GLTrace_glUniform1f(GLint location, GLfloat v0) { 4440 GLMessage glmsg; 4441 GLTraceContext *glContext = getGLTraceContext(); 4442 4443 glmsg.set_function(GLMessage::glUniform1f); 4444 4445 // copy argument location 4446 GLMessage_DataType *arg_location = glmsg.add_args(); 4447 arg_location->set_isarray(false); 4448 arg_location->set_type(GLMessage::DataType::INT); 4449 arg_location->add_intvalue(location); 4450 4451 // copy argument v0 4452 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4453 arg_v0->set_isarray(false); 4454 arg_v0->set_type(GLMessage::DataType::FLOAT); 4455 arg_v0->add_floatvalue(v0); 4456 4457 // call function 4458 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4459 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4460 glContext->hooks->gl.glUniform1f(location, v0); 4461 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4462 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4463 4464 void *pointerArgs[] = { 4465 }; 4466 4467 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4468 threadStartTime, threadEndTime, 4469 &glmsg, pointerArgs); 4470 glContext->traceGLMessage(&glmsg); 4471 } 4472 4473 void GLTrace_glUniform1fv(GLint location, GLsizei count, const GLfloat * value) { 4474 GLMessage glmsg; 4475 GLTraceContext *glContext = getGLTraceContext(); 4476 4477 glmsg.set_function(GLMessage::glUniform1fv); 4478 4479 // copy argument location 4480 GLMessage_DataType *arg_location = glmsg.add_args(); 4481 arg_location->set_isarray(false); 4482 arg_location->set_type(GLMessage::DataType::INT); 4483 arg_location->add_intvalue(location); 4484 4485 // copy argument count 4486 GLMessage_DataType *arg_count = glmsg.add_args(); 4487 arg_count->set_isarray(false); 4488 arg_count->set_type(GLMessage::DataType::INT); 4489 arg_count->add_intvalue(count); 4490 4491 // copy argument value 4492 GLMessage_DataType *arg_value = glmsg.add_args(); 4493 arg_value->set_isarray(false); 4494 arg_value->set_type(GLMessage::DataType::INT64); 4495 arg_value->add_int64value((uintptr_t)value); 4496 4497 // call function 4498 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4499 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4500 glContext->hooks->gl.glUniform1fv(location, count, value); 4501 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4502 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4503 4504 void *pointerArgs[] = { 4505 (void *) value, 4506 }; 4507 4508 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4509 threadStartTime, threadEndTime, 4510 &glmsg, pointerArgs); 4511 glContext->traceGLMessage(&glmsg); 4512 } 4513 4514 void GLTrace_glUniform1i(GLint location, GLint v0) { 4515 GLMessage glmsg; 4516 GLTraceContext *glContext = getGLTraceContext(); 4517 4518 glmsg.set_function(GLMessage::glUniform1i); 4519 4520 // copy argument location 4521 GLMessage_DataType *arg_location = glmsg.add_args(); 4522 arg_location->set_isarray(false); 4523 arg_location->set_type(GLMessage::DataType::INT); 4524 arg_location->add_intvalue(location); 4525 4526 // copy argument v0 4527 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4528 arg_v0->set_isarray(false); 4529 arg_v0->set_type(GLMessage::DataType::INT); 4530 arg_v0->add_intvalue(v0); 4531 4532 // call function 4533 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4534 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4535 glContext->hooks->gl.glUniform1i(location, v0); 4536 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4537 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4538 4539 void *pointerArgs[] = { 4540 }; 4541 4542 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4543 threadStartTime, threadEndTime, 4544 &glmsg, pointerArgs); 4545 glContext->traceGLMessage(&glmsg); 4546 } 4547 4548 void GLTrace_glUniform1iv(GLint location, GLsizei count, const GLint * value) { 4549 GLMessage glmsg; 4550 GLTraceContext *glContext = getGLTraceContext(); 4551 4552 glmsg.set_function(GLMessage::glUniform1iv); 4553 4554 // copy argument location 4555 GLMessage_DataType *arg_location = glmsg.add_args(); 4556 arg_location->set_isarray(false); 4557 arg_location->set_type(GLMessage::DataType::INT); 4558 arg_location->add_intvalue(location); 4559 4560 // copy argument count 4561 GLMessage_DataType *arg_count = glmsg.add_args(); 4562 arg_count->set_isarray(false); 4563 arg_count->set_type(GLMessage::DataType::INT); 4564 arg_count->add_intvalue(count); 4565 4566 // copy argument value 4567 GLMessage_DataType *arg_value = glmsg.add_args(); 4568 arg_value->set_isarray(false); 4569 arg_value->set_type(GLMessage::DataType::INT64); 4570 arg_value->add_int64value((uintptr_t)value); 4571 4572 // call function 4573 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4574 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4575 glContext->hooks->gl.glUniform1iv(location, count, value); 4576 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4577 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4578 4579 void *pointerArgs[] = { 4580 (void *) value, 4581 }; 4582 4583 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4584 threadStartTime, threadEndTime, 4585 &glmsg, pointerArgs); 4586 glContext->traceGLMessage(&glmsg); 4587 } 4588 4589 void GLTrace_glUniform2f(GLint location, GLfloat v0, GLfloat v1) { 4590 GLMessage glmsg; 4591 GLTraceContext *glContext = getGLTraceContext(); 4592 4593 glmsg.set_function(GLMessage::glUniform2f); 4594 4595 // copy argument location 4596 GLMessage_DataType *arg_location = glmsg.add_args(); 4597 arg_location->set_isarray(false); 4598 arg_location->set_type(GLMessage::DataType::INT); 4599 arg_location->add_intvalue(location); 4600 4601 // copy argument v0 4602 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4603 arg_v0->set_isarray(false); 4604 arg_v0->set_type(GLMessage::DataType::FLOAT); 4605 arg_v0->add_floatvalue(v0); 4606 4607 // copy argument v1 4608 GLMessage_DataType *arg_v1 = glmsg.add_args(); 4609 arg_v1->set_isarray(false); 4610 arg_v1->set_type(GLMessage::DataType::FLOAT); 4611 arg_v1->add_floatvalue(v1); 4612 4613 // call function 4614 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4615 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4616 glContext->hooks->gl.glUniform2f(location, v0, v1); 4617 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4618 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4619 4620 void *pointerArgs[] = { 4621 }; 4622 4623 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4624 threadStartTime, threadEndTime, 4625 &glmsg, pointerArgs); 4626 glContext->traceGLMessage(&glmsg); 4627 } 4628 4629 void GLTrace_glUniform2fv(GLint location, GLsizei count, const GLfloat * value) { 4630 GLMessage glmsg; 4631 GLTraceContext *glContext = getGLTraceContext(); 4632 4633 glmsg.set_function(GLMessage::glUniform2fv); 4634 4635 // copy argument location 4636 GLMessage_DataType *arg_location = glmsg.add_args(); 4637 arg_location->set_isarray(false); 4638 arg_location->set_type(GLMessage::DataType::INT); 4639 arg_location->add_intvalue(location); 4640 4641 // copy argument count 4642 GLMessage_DataType *arg_count = glmsg.add_args(); 4643 arg_count->set_isarray(false); 4644 arg_count->set_type(GLMessage::DataType::INT); 4645 arg_count->add_intvalue(count); 4646 4647 // copy argument value 4648 GLMessage_DataType *arg_value = glmsg.add_args(); 4649 arg_value->set_isarray(false); 4650 arg_value->set_type(GLMessage::DataType::INT64); 4651 arg_value->add_int64value((uintptr_t)value); 4652 4653 // call function 4654 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4655 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4656 glContext->hooks->gl.glUniform2fv(location, count, value); 4657 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4658 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4659 4660 void *pointerArgs[] = { 4661 (void *) value, 4662 }; 4663 4664 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4665 threadStartTime, threadEndTime, 4666 &glmsg, pointerArgs); 4667 glContext->traceGLMessage(&glmsg); 4668 } 4669 4670 void GLTrace_glUniform2i(GLint location, GLint v0, GLint v1) { 4671 GLMessage glmsg; 4672 GLTraceContext *glContext = getGLTraceContext(); 4673 4674 glmsg.set_function(GLMessage::glUniform2i); 4675 4676 // copy argument location 4677 GLMessage_DataType *arg_location = glmsg.add_args(); 4678 arg_location->set_isarray(false); 4679 arg_location->set_type(GLMessage::DataType::INT); 4680 arg_location->add_intvalue(location); 4681 4682 // copy argument v0 4683 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4684 arg_v0->set_isarray(false); 4685 arg_v0->set_type(GLMessage::DataType::INT); 4686 arg_v0->add_intvalue(v0); 4687 4688 // copy argument v1 4689 GLMessage_DataType *arg_v1 = glmsg.add_args(); 4690 arg_v1->set_isarray(false); 4691 arg_v1->set_type(GLMessage::DataType::INT); 4692 arg_v1->add_intvalue(v1); 4693 4694 // call function 4695 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4696 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4697 glContext->hooks->gl.glUniform2i(location, v0, v1); 4698 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4699 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4700 4701 void *pointerArgs[] = { 4702 }; 4703 4704 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4705 threadStartTime, threadEndTime, 4706 &glmsg, pointerArgs); 4707 glContext->traceGLMessage(&glmsg); 4708 } 4709 4710 void GLTrace_glUniform2iv(GLint location, GLsizei count, const GLint * value) { 4711 GLMessage glmsg; 4712 GLTraceContext *glContext = getGLTraceContext(); 4713 4714 glmsg.set_function(GLMessage::glUniform2iv); 4715 4716 // copy argument location 4717 GLMessage_DataType *arg_location = glmsg.add_args(); 4718 arg_location->set_isarray(false); 4719 arg_location->set_type(GLMessage::DataType::INT); 4720 arg_location->add_intvalue(location); 4721 4722 // copy argument count 4723 GLMessage_DataType *arg_count = glmsg.add_args(); 4724 arg_count->set_isarray(false); 4725 arg_count->set_type(GLMessage::DataType::INT); 4726 arg_count->add_intvalue(count); 4727 4728 // copy argument value 4729 GLMessage_DataType *arg_value = glmsg.add_args(); 4730 arg_value->set_isarray(false); 4731 arg_value->set_type(GLMessage::DataType::INT64); 4732 arg_value->add_int64value((uintptr_t)value); 4733 4734 // call function 4735 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4736 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4737 glContext->hooks->gl.glUniform2iv(location, count, value); 4738 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4739 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4740 4741 void *pointerArgs[] = { 4742 (void *) value, 4743 }; 4744 4745 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4746 threadStartTime, threadEndTime, 4747 &glmsg, pointerArgs); 4748 glContext->traceGLMessage(&glmsg); 4749 } 4750 4751 void GLTrace_glUniform3f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { 4752 GLMessage glmsg; 4753 GLTraceContext *glContext = getGLTraceContext(); 4754 4755 glmsg.set_function(GLMessage::glUniform3f); 4756 4757 // copy argument location 4758 GLMessage_DataType *arg_location = glmsg.add_args(); 4759 arg_location->set_isarray(false); 4760 arg_location->set_type(GLMessage::DataType::INT); 4761 arg_location->add_intvalue(location); 4762 4763 // copy argument v0 4764 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4765 arg_v0->set_isarray(false); 4766 arg_v0->set_type(GLMessage::DataType::FLOAT); 4767 arg_v0->add_floatvalue(v0); 4768 4769 // copy argument v1 4770 GLMessage_DataType *arg_v1 = glmsg.add_args(); 4771 arg_v1->set_isarray(false); 4772 arg_v1->set_type(GLMessage::DataType::FLOAT); 4773 arg_v1->add_floatvalue(v1); 4774 4775 // copy argument v2 4776 GLMessage_DataType *arg_v2 = glmsg.add_args(); 4777 arg_v2->set_isarray(false); 4778 arg_v2->set_type(GLMessage::DataType::FLOAT); 4779 arg_v2->add_floatvalue(v2); 4780 4781 // call function 4782 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4783 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4784 glContext->hooks->gl.glUniform3f(location, v0, v1, v2); 4785 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4786 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4787 4788 void *pointerArgs[] = { 4789 }; 4790 4791 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4792 threadStartTime, threadEndTime, 4793 &glmsg, pointerArgs); 4794 glContext->traceGLMessage(&glmsg); 4795 } 4796 4797 void GLTrace_glUniform3fv(GLint location, GLsizei count, const GLfloat * value) { 4798 GLMessage glmsg; 4799 GLTraceContext *glContext = getGLTraceContext(); 4800 4801 glmsg.set_function(GLMessage::glUniform3fv); 4802 4803 // copy argument location 4804 GLMessage_DataType *arg_location = glmsg.add_args(); 4805 arg_location->set_isarray(false); 4806 arg_location->set_type(GLMessage::DataType::INT); 4807 arg_location->add_intvalue(location); 4808 4809 // copy argument count 4810 GLMessage_DataType *arg_count = glmsg.add_args(); 4811 arg_count->set_isarray(false); 4812 arg_count->set_type(GLMessage::DataType::INT); 4813 arg_count->add_intvalue(count); 4814 4815 // copy argument value 4816 GLMessage_DataType *arg_value = glmsg.add_args(); 4817 arg_value->set_isarray(false); 4818 arg_value->set_type(GLMessage::DataType::INT64); 4819 arg_value->add_int64value((uintptr_t)value); 4820 4821 // call function 4822 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4823 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4824 glContext->hooks->gl.glUniform3fv(location, count, value); 4825 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4826 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4827 4828 void *pointerArgs[] = { 4829 (void *) value, 4830 }; 4831 4832 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4833 threadStartTime, threadEndTime, 4834 &glmsg, pointerArgs); 4835 glContext->traceGLMessage(&glmsg); 4836 } 4837 4838 void GLTrace_glUniform3i(GLint location, GLint v0, GLint v1, GLint v2) { 4839 GLMessage glmsg; 4840 GLTraceContext *glContext = getGLTraceContext(); 4841 4842 glmsg.set_function(GLMessage::glUniform3i); 4843 4844 // copy argument location 4845 GLMessage_DataType *arg_location = glmsg.add_args(); 4846 arg_location->set_isarray(false); 4847 arg_location->set_type(GLMessage::DataType::INT); 4848 arg_location->add_intvalue(location); 4849 4850 // copy argument v0 4851 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4852 arg_v0->set_isarray(false); 4853 arg_v0->set_type(GLMessage::DataType::INT); 4854 arg_v0->add_intvalue(v0); 4855 4856 // copy argument v1 4857 GLMessage_DataType *arg_v1 = glmsg.add_args(); 4858 arg_v1->set_isarray(false); 4859 arg_v1->set_type(GLMessage::DataType::INT); 4860 arg_v1->add_intvalue(v1); 4861 4862 // copy argument v2 4863 GLMessage_DataType *arg_v2 = glmsg.add_args(); 4864 arg_v2->set_isarray(false); 4865 arg_v2->set_type(GLMessage::DataType::INT); 4866 arg_v2->add_intvalue(v2); 4867 4868 // call function 4869 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4870 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4871 glContext->hooks->gl.glUniform3i(location, v0, v1, v2); 4872 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4873 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4874 4875 void *pointerArgs[] = { 4876 }; 4877 4878 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4879 threadStartTime, threadEndTime, 4880 &glmsg, pointerArgs); 4881 glContext->traceGLMessage(&glmsg); 4882 } 4883 4884 void GLTrace_glUniform3iv(GLint location, GLsizei count, const GLint * value) { 4885 GLMessage glmsg; 4886 GLTraceContext *glContext = getGLTraceContext(); 4887 4888 glmsg.set_function(GLMessage::glUniform3iv); 4889 4890 // copy argument location 4891 GLMessage_DataType *arg_location = glmsg.add_args(); 4892 arg_location->set_isarray(false); 4893 arg_location->set_type(GLMessage::DataType::INT); 4894 arg_location->add_intvalue(location); 4895 4896 // copy argument count 4897 GLMessage_DataType *arg_count = glmsg.add_args(); 4898 arg_count->set_isarray(false); 4899 arg_count->set_type(GLMessage::DataType::INT); 4900 arg_count->add_intvalue(count); 4901 4902 // copy argument value 4903 GLMessage_DataType *arg_value = glmsg.add_args(); 4904 arg_value->set_isarray(false); 4905 arg_value->set_type(GLMessage::DataType::INT64); 4906 arg_value->add_int64value((uintptr_t)value); 4907 4908 // call function 4909 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4910 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4911 glContext->hooks->gl.glUniform3iv(location, count, value); 4912 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4913 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4914 4915 void *pointerArgs[] = { 4916 (void *) value, 4917 }; 4918 4919 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4920 threadStartTime, threadEndTime, 4921 &glmsg, pointerArgs); 4922 glContext->traceGLMessage(&glmsg); 4923 } 4924 4925 void GLTrace_glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { 4926 GLMessage glmsg; 4927 GLTraceContext *glContext = getGLTraceContext(); 4928 4929 glmsg.set_function(GLMessage::glUniform4f); 4930 4931 // copy argument location 4932 GLMessage_DataType *arg_location = glmsg.add_args(); 4933 arg_location->set_isarray(false); 4934 arg_location->set_type(GLMessage::DataType::INT); 4935 arg_location->add_intvalue(location); 4936 4937 // copy argument v0 4938 GLMessage_DataType *arg_v0 = glmsg.add_args(); 4939 arg_v0->set_isarray(false); 4940 arg_v0->set_type(GLMessage::DataType::FLOAT); 4941 arg_v0->add_floatvalue(v0); 4942 4943 // copy argument v1 4944 GLMessage_DataType *arg_v1 = glmsg.add_args(); 4945 arg_v1->set_isarray(false); 4946 arg_v1->set_type(GLMessage::DataType::FLOAT); 4947 arg_v1->add_floatvalue(v1); 4948 4949 // copy argument v2 4950 GLMessage_DataType *arg_v2 = glmsg.add_args(); 4951 arg_v2->set_isarray(false); 4952 arg_v2->set_type(GLMessage::DataType::FLOAT); 4953 arg_v2->add_floatvalue(v2); 4954 4955 // copy argument v3 4956 GLMessage_DataType *arg_v3 = glmsg.add_args(); 4957 arg_v3->set_isarray(false); 4958 arg_v3->set_type(GLMessage::DataType::FLOAT); 4959 arg_v3->add_floatvalue(v3); 4960 4961 // call function 4962 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 4963 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 4964 glContext->hooks->gl.glUniform4f(location, v0, v1, v2, v3); 4965 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 4966 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 4967 4968 void *pointerArgs[] = { 4969 }; 4970 4971 fixupGLMessage(glContext, wallStartTime, wallEndTime, 4972 threadStartTime, threadEndTime, 4973 &glmsg, pointerArgs); 4974 glContext->traceGLMessage(&glmsg); 4975 } 4976 4977 void GLTrace_glUniform4fv(GLint location, GLsizei count, const GLfloat * value) { 4978 GLMessage glmsg; 4979 GLTraceContext *glContext = getGLTraceContext(); 4980 4981 glmsg.set_function(GLMessage::glUniform4fv); 4982 4983 // copy argument location 4984 GLMessage_DataType *arg_location = glmsg.add_args(); 4985 arg_location->set_isarray(false); 4986 arg_location->set_type(GLMessage::DataType::INT); 4987 arg_location->add_intvalue(location); 4988 4989 // copy argument count 4990 GLMessage_DataType *arg_count = glmsg.add_args(); 4991 arg_count->set_isarray(false); 4992 arg_count->set_type(GLMessage::DataType::INT); 4993 arg_count->add_intvalue(count); 4994 4995 // copy argument value 4996 GLMessage_DataType *arg_value = glmsg.add_args(); 4997 arg_value->set_isarray(false); 4998 arg_value->set_type(GLMessage::DataType::INT64); 4999 arg_value->add_int64value((uintptr_t)value); 5000 5001 // call function 5002 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5003 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5004 glContext->hooks->gl.glUniform4fv(location, count, value); 5005 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5006 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5007 5008 void *pointerArgs[] = { 5009 (void *) value, 5010 }; 5011 5012 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5013 threadStartTime, threadEndTime, 5014 &glmsg, pointerArgs); 5015 glContext->traceGLMessage(&glmsg); 5016 } 5017 5018 void GLTrace_glUniform4i(GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { 5019 GLMessage glmsg; 5020 GLTraceContext *glContext = getGLTraceContext(); 5021 5022 glmsg.set_function(GLMessage::glUniform4i); 5023 5024 // copy argument location 5025 GLMessage_DataType *arg_location = glmsg.add_args(); 5026 arg_location->set_isarray(false); 5027 arg_location->set_type(GLMessage::DataType::INT); 5028 arg_location->add_intvalue(location); 5029 5030 // copy argument v0 5031 GLMessage_DataType *arg_v0 = glmsg.add_args(); 5032 arg_v0->set_isarray(false); 5033 arg_v0->set_type(GLMessage::DataType::INT); 5034 arg_v0->add_intvalue(v0); 5035 5036 // copy argument v1 5037 GLMessage_DataType *arg_v1 = glmsg.add_args(); 5038 arg_v1->set_isarray(false); 5039 arg_v1->set_type(GLMessage::DataType::INT); 5040 arg_v1->add_intvalue(v1); 5041 5042 // copy argument v2 5043 GLMessage_DataType *arg_v2 = glmsg.add_args(); 5044 arg_v2->set_isarray(false); 5045 arg_v2->set_type(GLMessage::DataType::INT); 5046 arg_v2->add_intvalue(v2); 5047 5048 // copy argument v3 5049 GLMessage_DataType *arg_v3 = glmsg.add_args(); 5050 arg_v3->set_isarray(false); 5051 arg_v3->set_type(GLMessage::DataType::INT); 5052 arg_v3->add_intvalue(v3); 5053 5054 // call function 5055 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5056 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5057 glContext->hooks->gl.glUniform4i(location, v0, v1, v2, v3); 5058 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5059 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5060 5061 void *pointerArgs[] = { 5062 }; 5063 5064 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5065 threadStartTime, threadEndTime, 5066 &glmsg, pointerArgs); 5067 glContext->traceGLMessage(&glmsg); 5068 } 5069 5070 void GLTrace_glUniform4iv(GLint location, GLsizei count, const GLint * value) { 5071 GLMessage glmsg; 5072 GLTraceContext *glContext = getGLTraceContext(); 5073 5074 glmsg.set_function(GLMessage::glUniform4iv); 5075 5076 // copy argument location 5077 GLMessage_DataType *arg_location = glmsg.add_args(); 5078 arg_location->set_isarray(false); 5079 arg_location->set_type(GLMessage::DataType::INT); 5080 arg_location->add_intvalue(location); 5081 5082 // copy argument count 5083 GLMessage_DataType *arg_count = glmsg.add_args(); 5084 arg_count->set_isarray(false); 5085 arg_count->set_type(GLMessage::DataType::INT); 5086 arg_count->add_intvalue(count); 5087 5088 // copy argument value 5089 GLMessage_DataType *arg_value = glmsg.add_args(); 5090 arg_value->set_isarray(false); 5091 arg_value->set_type(GLMessage::DataType::INT64); 5092 arg_value->add_int64value((uintptr_t)value); 5093 5094 // call function 5095 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5096 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5097 glContext->hooks->gl.glUniform4iv(location, count, value); 5098 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5099 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5100 5101 void *pointerArgs[] = { 5102 (void *) value, 5103 }; 5104 5105 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5106 threadStartTime, threadEndTime, 5107 &glmsg, pointerArgs); 5108 glContext->traceGLMessage(&glmsg); 5109 } 5110 5111 void GLTrace_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 5112 GLMessage glmsg; 5113 GLTraceContext *glContext = getGLTraceContext(); 5114 5115 glmsg.set_function(GLMessage::glUniformMatrix2fv); 5116 5117 // copy argument location 5118 GLMessage_DataType *arg_location = glmsg.add_args(); 5119 arg_location->set_isarray(false); 5120 arg_location->set_type(GLMessage::DataType::INT); 5121 arg_location->add_intvalue(location); 5122 5123 // copy argument count 5124 GLMessage_DataType *arg_count = glmsg.add_args(); 5125 arg_count->set_isarray(false); 5126 arg_count->set_type(GLMessage::DataType::INT); 5127 arg_count->add_intvalue(count); 5128 5129 // copy argument transpose 5130 GLMessage_DataType *arg_transpose = glmsg.add_args(); 5131 arg_transpose->set_isarray(false); 5132 arg_transpose->set_type(GLMessage::DataType::BOOL); 5133 arg_transpose->add_boolvalue(transpose); 5134 5135 // copy argument value 5136 GLMessage_DataType *arg_value = glmsg.add_args(); 5137 arg_value->set_isarray(false); 5138 arg_value->set_type(GLMessage::DataType::INT64); 5139 arg_value->add_int64value((uintptr_t)value); 5140 5141 // call function 5142 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5143 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5144 glContext->hooks->gl.glUniformMatrix2fv(location, count, transpose, value); 5145 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5146 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5147 5148 void *pointerArgs[] = { 5149 (void *) value, 5150 }; 5151 5152 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5153 threadStartTime, threadEndTime, 5154 &glmsg, pointerArgs); 5155 glContext->traceGLMessage(&glmsg); 5156 } 5157 5158 void GLTrace_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 5159 GLMessage glmsg; 5160 GLTraceContext *glContext = getGLTraceContext(); 5161 5162 glmsg.set_function(GLMessage::glUniformMatrix3fv); 5163 5164 // copy argument location 5165 GLMessage_DataType *arg_location = glmsg.add_args(); 5166 arg_location->set_isarray(false); 5167 arg_location->set_type(GLMessage::DataType::INT); 5168 arg_location->add_intvalue(location); 5169 5170 // copy argument count 5171 GLMessage_DataType *arg_count = glmsg.add_args(); 5172 arg_count->set_isarray(false); 5173 arg_count->set_type(GLMessage::DataType::INT); 5174 arg_count->add_intvalue(count); 5175 5176 // copy argument transpose 5177 GLMessage_DataType *arg_transpose = glmsg.add_args(); 5178 arg_transpose->set_isarray(false); 5179 arg_transpose->set_type(GLMessage::DataType::BOOL); 5180 arg_transpose->add_boolvalue(transpose); 5181 5182 // copy argument value 5183 GLMessage_DataType *arg_value = glmsg.add_args(); 5184 arg_value->set_isarray(false); 5185 arg_value->set_type(GLMessage::DataType::INT64); 5186 arg_value->add_int64value((uintptr_t)value); 5187 5188 // call function 5189 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5190 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5191 glContext->hooks->gl.glUniformMatrix3fv(location, count, transpose, value); 5192 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5193 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5194 5195 void *pointerArgs[] = { 5196 (void *) value, 5197 }; 5198 5199 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5200 threadStartTime, threadEndTime, 5201 &glmsg, pointerArgs); 5202 glContext->traceGLMessage(&glmsg); 5203 } 5204 5205 void GLTrace_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 5206 GLMessage glmsg; 5207 GLTraceContext *glContext = getGLTraceContext(); 5208 5209 glmsg.set_function(GLMessage::glUniformMatrix4fv); 5210 5211 // copy argument location 5212 GLMessage_DataType *arg_location = glmsg.add_args(); 5213 arg_location->set_isarray(false); 5214 arg_location->set_type(GLMessage::DataType::INT); 5215 arg_location->add_intvalue(location); 5216 5217 // copy argument count 5218 GLMessage_DataType *arg_count = glmsg.add_args(); 5219 arg_count->set_isarray(false); 5220 arg_count->set_type(GLMessage::DataType::INT); 5221 arg_count->add_intvalue(count); 5222 5223 // copy argument transpose 5224 GLMessage_DataType *arg_transpose = glmsg.add_args(); 5225 arg_transpose->set_isarray(false); 5226 arg_transpose->set_type(GLMessage::DataType::BOOL); 5227 arg_transpose->add_boolvalue(transpose); 5228 5229 // copy argument value 5230 GLMessage_DataType *arg_value = glmsg.add_args(); 5231 arg_value->set_isarray(false); 5232 arg_value->set_type(GLMessage::DataType::INT64); 5233 arg_value->add_int64value((uintptr_t)value); 5234 5235 // call function 5236 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5237 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5238 glContext->hooks->gl.glUniformMatrix4fv(location, count, transpose, value); 5239 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5240 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5241 5242 void *pointerArgs[] = { 5243 (void *) value, 5244 }; 5245 5246 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5247 threadStartTime, threadEndTime, 5248 &glmsg, pointerArgs); 5249 glContext->traceGLMessage(&glmsg); 5250 } 5251 5252 void GLTrace_glUseProgram(GLuint program) { 5253 GLMessage glmsg; 5254 GLTraceContext *glContext = getGLTraceContext(); 5255 5256 glmsg.set_function(GLMessage::glUseProgram); 5257 5258 // copy argument program 5259 GLMessage_DataType *arg_program = glmsg.add_args(); 5260 arg_program->set_isarray(false); 5261 arg_program->set_type(GLMessage::DataType::INT); 5262 arg_program->add_intvalue(program); 5263 5264 // call function 5265 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5266 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5267 glContext->hooks->gl.glUseProgram(program); 5268 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5269 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5270 5271 void *pointerArgs[] = { 5272 }; 5273 5274 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5275 threadStartTime, threadEndTime, 5276 &glmsg, pointerArgs); 5277 glContext->traceGLMessage(&glmsg); 5278 } 5279 5280 void GLTrace_glValidateProgram(GLuint program) { 5281 GLMessage glmsg; 5282 GLTraceContext *glContext = getGLTraceContext(); 5283 5284 glmsg.set_function(GLMessage::glValidateProgram); 5285 5286 // copy argument program 5287 GLMessage_DataType *arg_program = glmsg.add_args(); 5288 arg_program->set_isarray(false); 5289 arg_program->set_type(GLMessage::DataType::INT); 5290 arg_program->add_intvalue(program); 5291 5292 // call function 5293 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5294 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5295 glContext->hooks->gl.glValidateProgram(program); 5296 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5297 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5298 5299 void *pointerArgs[] = { 5300 }; 5301 5302 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5303 threadStartTime, threadEndTime, 5304 &glmsg, pointerArgs); 5305 glContext->traceGLMessage(&glmsg); 5306 } 5307 5308 void GLTrace_glVertexAttrib1f(GLuint index, GLfloat x) { 5309 GLMessage glmsg; 5310 GLTraceContext *glContext = getGLTraceContext(); 5311 5312 glmsg.set_function(GLMessage::glVertexAttrib1f); 5313 5314 // copy argument index 5315 GLMessage_DataType *arg_index = glmsg.add_args(); 5316 arg_index->set_isarray(false); 5317 arg_index->set_type(GLMessage::DataType::INT); 5318 arg_index->add_intvalue(index); 5319 5320 // copy argument x 5321 GLMessage_DataType *arg_x = glmsg.add_args(); 5322 arg_x->set_isarray(false); 5323 arg_x->set_type(GLMessage::DataType::FLOAT); 5324 arg_x->add_floatvalue(x); 5325 5326 // call function 5327 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5328 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5329 glContext->hooks->gl.glVertexAttrib1f(index, x); 5330 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5331 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5332 5333 void *pointerArgs[] = { 5334 }; 5335 5336 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5337 threadStartTime, threadEndTime, 5338 &glmsg, pointerArgs); 5339 glContext->traceGLMessage(&glmsg); 5340 } 5341 5342 void GLTrace_glVertexAttrib1fv(GLuint index, const GLfloat * v) { 5343 GLMessage glmsg; 5344 GLTraceContext *glContext = getGLTraceContext(); 5345 5346 glmsg.set_function(GLMessage::glVertexAttrib1fv); 5347 5348 // copy argument index 5349 GLMessage_DataType *arg_index = glmsg.add_args(); 5350 arg_index->set_isarray(false); 5351 arg_index->set_type(GLMessage::DataType::INT); 5352 arg_index->add_intvalue(index); 5353 5354 // copy argument v 5355 GLMessage_DataType *arg_v = glmsg.add_args(); 5356 arg_v->set_isarray(false); 5357 arg_v->set_type(GLMessage::DataType::INT64); 5358 arg_v->add_int64value((uintptr_t)v); 5359 5360 // call function 5361 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5362 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5363 glContext->hooks->gl.glVertexAttrib1fv(index, v); 5364 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5365 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5366 5367 void *pointerArgs[] = { 5368 (void *) v, 5369 }; 5370 5371 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5372 threadStartTime, threadEndTime, 5373 &glmsg, pointerArgs); 5374 glContext->traceGLMessage(&glmsg); 5375 } 5376 5377 void GLTrace_glVertexAttrib2f(GLuint index, GLfloat x, GLfloat y) { 5378 GLMessage glmsg; 5379 GLTraceContext *glContext = getGLTraceContext(); 5380 5381 glmsg.set_function(GLMessage::glVertexAttrib2f); 5382 5383 // copy argument index 5384 GLMessage_DataType *arg_index = glmsg.add_args(); 5385 arg_index->set_isarray(false); 5386 arg_index->set_type(GLMessage::DataType::INT); 5387 arg_index->add_intvalue(index); 5388 5389 // copy argument x 5390 GLMessage_DataType *arg_x = glmsg.add_args(); 5391 arg_x->set_isarray(false); 5392 arg_x->set_type(GLMessage::DataType::FLOAT); 5393 arg_x->add_floatvalue(x); 5394 5395 // copy argument y 5396 GLMessage_DataType *arg_y = glmsg.add_args(); 5397 arg_y->set_isarray(false); 5398 arg_y->set_type(GLMessage::DataType::FLOAT); 5399 arg_y->add_floatvalue(y); 5400 5401 // call function 5402 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5403 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5404 glContext->hooks->gl.glVertexAttrib2f(index, x, y); 5405 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5406 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5407 5408 void *pointerArgs[] = { 5409 }; 5410 5411 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5412 threadStartTime, threadEndTime, 5413 &glmsg, pointerArgs); 5414 glContext->traceGLMessage(&glmsg); 5415 } 5416 5417 void GLTrace_glVertexAttrib2fv(GLuint index, const GLfloat * v) { 5418 GLMessage glmsg; 5419 GLTraceContext *glContext = getGLTraceContext(); 5420 5421 glmsg.set_function(GLMessage::glVertexAttrib2fv); 5422 5423 // copy argument index 5424 GLMessage_DataType *arg_index = glmsg.add_args(); 5425 arg_index->set_isarray(false); 5426 arg_index->set_type(GLMessage::DataType::INT); 5427 arg_index->add_intvalue(index); 5428 5429 // copy argument v 5430 GLMessage_DataType *arg_v = glmsg.add_args(); 5431 arg_v->set_isarray(false); 5432 arg_v->set_type(GLMessage::DataType::INT64); 5433 arg_v->add_int64value((uintptr_t)v); 5434 5435 // call function 5436 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5437 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5438 glContext->hooks->gl.glVertexAttrib2fv(index, v); 5439 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5440 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5441 5442 void *pointerArgs[] = { 5443 (void *) v, 5444 }; 5445 5446 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5447 threadStartTime, threadEndTime, 5448 &glmsg, pointerArgs); 5449 glContext->traceGLMessage(&glmsg); 5450 } 5451 5452 void GLTrace_glVertexAttrib3f(GLuint index, GLfloat x, GLfloat y, GLfloat z) { 5453 GLMessage glmsg; 5454 GLTraceContext *glContext = getGLTraceContext(); 5455 5456 glmsg.set_function(GLMessage::glVertexAttrib3f); 5457 5458 // copy argument index 5459 GLMessage_DataType *arg_index = glmsg.add_args(); 5460 arg_index->set_isarray(false); 5461 arg_index->set_type(GLMessage::DataType::INT); 5462 arg_index->add_intvalue(index); 5463 5464 // copy argument x 5465 GLMessage_DataType *arg_x = glmsg.add_args(); 5466 arg_x->set_isarray(false); 5467 arg_x->set_type(GLMessage::DataType::FLOAT); 5468 arg_x->add_floatvalue(x); 5469 5470 // copy argument y 5471 GLMessage_DataType *arg_y = glmsg.add_args(); 5472 arg_y->set_isarray(false); 5473 arg_y->set_type(GLMessage::DataType::FLOAT); 5474 arg_y->add_floatvalue(y); 5475 5476 // copy argument z 5477 GLMessage_DataType *arg_z = glmsg.add_args(); 5478 arg_z->set_isarray(false); 5479 arg_z->set_type(GLMessage::DataType::FLOAT); 5480 arg_z->add_floatvalue(z); 5481 5482 // call function 5483 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5484 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5485 glContext->hooks->gl.glVertexAttrib3f(index, x, y, z); 5486 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5487 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5488 5489 void *pointerArgs[] = { 5490 }; 5491 5492 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5493 threadStartTime, threadEndTime, 5494 &glmsg, pointerArgs); 5495 glContext->traceGLMessage(&glmsg); 5496 } 5497 5498 void GLTrace_glVertexAttrib3fv(GLuint index, const GLfloat * v) { 5499 GLMessage glmsg; 5500 GLTraceContext *glContext = getGLTraceContext(); 5501 5502 glmsg.set_function(GLMessage::glVertexAttrib3fv); 5503 5504 // copy argument index 5505 GLMessage_DataType *arg_index = glmsg.add_args(); 5506 arg_index->set_isarray(false); 5507 arg_index->set_type(GLMessage::DataType::INT); 5508 arg_index->add_intvalue(index); 5509 5510 // copy argument v 5511 GLMessage_DataType *arg_v = glmsg.add_args(); 5512 arg_v->set_isarray(false); 5513 arg_v->set_type(GLMessage::DataType::INT64); 5514 arg_v->add_int64value((uintptr_t)v); 5515 5516 // call function 5517 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5518 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5519 glContext->hooks->gl.glVertexAttrib3fv(index, v); 5520 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5521 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5522 5523 void *pointerArgs[] = { 5524 (void *) v, 5525 }; 5526 5527 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5528 threadStartTime, threadEndTime, 5529 &glmsg, pointerArgs); 5530 glContext->traceGLMessage(&glmsg); 5531 } 5532 5533 void GLTrace_glVertexAttrib4f(GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { 5534 GLMessage glmsg; 5535 GLTraceContext *glContext = getGLTraceContext(); 5536 5537 glmsg.set_function(GLMessage::glVertexAttrib4f); 5538 5539 // copy argument index 5540 GLMessage_DataType *arg_index = glmsg.add_args(); 5541 arg_index->set_isarray(false); 5542 arg_index->set_type(GLMessage::DataType::INT); 5543 arg_index->add_intvalue(index); 5544 5545 // copy argument x 5546 GLMessage_DataType *arg_x = glmsg.add_args(); 5547 arg_x->set_isarray(false); 5548 arg_x->set_type(GLMessage::DataType::FLOAT); 5549 arg_x->add_floatvalue(x); 5550 5551 // copy argument y 5552 GLMessage_DataType *arg_y = glmsg.add_args(); 5553 arg_y->set_isarray(false); 5554 arg_y->set_type(GLMessage::DataType::FLOAT); 5555 arg_y->add_floatvalue(y); 5556 5557 // copy argument z 5558 GLMessage_DataType *arg_z = glmsg.add_args(); 5559 arg_z->set_isarray(false); 5560 arg_z->set_type(GLMessage::DataType::FLOAT); 5561 arg_z->add_floatvalue(z); 5562 5563 // copy argument w 5564 GLMessage_DataType *arg_w = glmsg.add_args(); 5565 arg_w->set_isarray(false); 5566 arg_w->set_type(GLMessage::DataType::FLOAT); 5567 arg_w->add_floatvalue(w); 5568 5569 // call function 5570 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5571 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5572 glContext->hooks->gl.glVertexAttrib4f(index, x, y, z, w); 5573 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5574 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5575 5576 void *pointerArgs[] = { 5577 }; 5578 5579 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5580 threadStartTime, threadEndTime, 5581 &glmsg, pointerArgs); 5582 glContext->traceGLMessage(&glmsg); 5583 } 5584 5585 void GLTrace_glVertexAttrib4fv(GLuint index, const GLfloat * v) { 5586 GLMessage glmsg; 5587 GLTraceContext *glContext = getGLTraceContext(); 5588 5589 glmsg.set_function(GLMessage::glVertexAttrib4fv); 5590 5591 // copy argument index 5592 GLMessage_DataType *arg_index = glmsg.add_args(); 5593 arg_index->set_isarray(false); 5594 arg_index->set_type(GLMessage::DataType::INT); 5595 arg_index->add_intvalue(index); 5596 5597 // copy argument v 5598 GLMessage_DataType *arg_v = glmsg.add_args(); 5599 arg_v->set_isarray(false); 5600 arg_v->set_type(GLMessage::DataType::INT64); 5601 arg_v->add_int64value((uintptr_t)v); 5602 5603 // call function 5604 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5605 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5606 glContext->hooks->gl.glVertexAttrib4fv(index, v); 5607 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5608 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5609 5610 void *pointerArgs[] = { 5611 (void *) v, 5612 }; 5613 5614 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5615 threadStartTime, threadEndTime, 5616 &glmsg, pointerArgs); 5617 glContext->traceGLMessage(&glmsg); 5618 } 5619 5620 void GLTrace_glVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void * pointer) { 5621 GLMessage glmsg; 5622 GLTraceContext *glContext = getGLTraceContext(); 5623 5624 glmsg.set_function(GLMessage::glVertexAttribPointer); 5625 5626 // copy argument index 5627 GLMessage_DataType *arg_index = glmsg.add_args(); 5628 arg_index->set_isarray(false); 5629 arg_index->set_type(GLMessage::DataType::INT); 5630 arg_index->add_intvalue(index); 5631 5632 // copy argument size 5633 GLMessage_DataType *arg_size = glmsg.add_args(); 5634 arg_size->set_isarray(false); 5635 arg_size->set_type(GLMessage::DataType::INT); 5636 arg_size->add_intvalue(size); 5637 5638 // copy argument type 5639 GLMessage_DataType *arg_type = glmsg.add_args(); 5640 arg_type->set_isarray(false); 5641 arg_type->set_type(GLMessage::DataType::ENUM); 5642 arg_type->add_intvalue((int)type); 5643 5644 // copy argument normalized 5645 GLMessage_DataType *arg_normalized = glmsg.add_args(); 5646 arg_normalized->set_isarray(false); 5647 arg_normalized->set_type(GLMessage::DataType::BOOL); 5648 arg_normalized->add_boolvalue(normalized); 5649 5650 // copy argument stride 5651 GLMessage_DataType *arg_stride = glmsg.add_args(); 5652 arg_stride->set_isarray(false); 5653 arg_stride->set_type(GLMessage::DataType::INT); 5654 arg_stride->add_intvalue(stride); 5655 5656 // copy argument pointer 5657 GLMessage_DataType *arg_pointer = glmsg.add_args(); 5658 arg_pointer->set_isarray(false); 5659 arg_pointer->set_type(GLMessage::DataType::INT64); 5660 arg_pointer->add_int64value((uintptr_t)pointer); 5661 5662 // call function 5663 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5664 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5665 glContext->hooks->gl.glVertexAttribPointer(index, size, type, normalized, stride, pointer); 5666 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5667 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5668 5669 void *pointerArgs[] = { 5670 (void *) pointer, 5671 }; 5672 5673 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5674 threadStartTime, threadEndTime, 5675 &glmsg, pointerArgs); 5676 glContext->traceGLMessage(&glmsg); 5677 } 5678 5679 void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { 5680 GLMessage glmsg; 5681 GLTraceContext *glContext = getGLTraceContext(); 5682 5683 glmsg.set_function(GLMessage::glViewport); 5684 5685 // copy argument x 5686 GLMessage_DataType *arg_x = glmsg.add_args(); 5687 arg_x->set_isarray(false); 5688 arg_x->set_type(GLMessage::DataType::INT); 5689 arg_x->add_intvalue(x); 5690 5691 // copy argument y 5692 GLMessage_DataType *arg_y = glmsg.add_args(); 5693 arg_y->set_isarray(false); 5694 arg_y->set_type(GLMessage::DataType::INT); 5695 arg_y->add_intvalue(y); 5696 5697 // copy argument width 5698 GLMessage_DataType *arg_width = glmsg.add_args(); 5699 arg_width->set_isarray(false); 5700 arg_width->set_type(GLMessage::DataType::INT); 5701 arg_width->add_intvalue(width); 5702 5703 // copy argument height 5704 GLMessage_DataType *arg_height = glmsg.add_args(); 5705 arg_height->set_isarray(false); 5706 arg_height->set_type(GLMessage::DataType::INT); 5707 arg_height->add_intvalue(height); 5708 5709 // call function 5710 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5711 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5712 glContext->hooks->gl.glViewport(x, y, width, height); 5713 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5714 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5715 5716 void *pointerArgs[] = { 5717 }; 5718 5719 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5720 threadStartTime, threadEndTime, 5721 &glmsg, pointerArgs); 5722 glContext->traceGLMessage(&glmsg); 5723 } 5724 5725 void GLTrace_glReadBuffer(GLenum mode) { 5726 GLMessage glmsg; 5727 GLTraceContext *glContext = getGLTraceContext(); 5728 5729 glmsg.set_function(GLMessage::glReadBuffer); 5730 5731 // copy argument mode 5732 GLMessage_DataType *arg_mode = glmsg.add_args(); 5733 arg_mode->set_isarray(false); 5734 arg_mode->set_type(GLMessage::DataType::ENUM); 5735 arg_mode->add_intvalue((int)mode); 5736 5737 // call function 5738 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5739 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5740 glContext->hooks->gl.glReadBuffer(mode); 5741 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5742 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5743 5744 void *pointerArgs[] = { 5745 }; 5746 5747 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5748 threadStartTime, threadEndTime, 5749 &glmsg, pointerArgs); 5750 glContext->traceGLMessage(&glmsg); 5751 } 5752 5753 void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void * indices) { 5754 GLMessage glmsg; 5755 GLTraceContext *glContext = getGLTraceContext(); 5756 5757 glmsg.set_function(GLMessage::glDrawRangeElements); 5758 5759 // copy argument mode 5760 GLMessage_DataType *arg_mode = glmsg.add_args(); 5761 arg_mode->set_isarray(false); 5762 arg_mode->set_type(GLMessage::DataType::ENUM); 5763 arg_mode->add_intvalue((int)mode); 5764 5765 // copy argument start 5766 GLMessage_DataType *arg_start = glmsg.add_args(); 5767 arg_start->set_isarray(false); 5768 arg_start->set_type(GLMessage::DataType::INT); 5769 arg_start->add_intvalue(start); 5770 5771 // copy argument end 5772 GLMessage_DataType *arg_end = glmsg.add_args(); 5773 arg_end->set_isarray(false); 5774 arg_end->set_type(GLMessage::DataType::INT); 5775 arg_end->add_intvalue(end); 5776 5777 // copy argument count 5778 GLMessage_DataType *arg_count = glmsg.add_args(); 5779 arg_count->set_isarray(false); 5780 arg_count->set_type(GLMessage::DataType::INT); 5781 arg_count->add_intvalue(count); 5782 5783 // copy argument type 5784 GLMessage_DataType *arg_type = glmsg.add_args(); 5785 arg_type->set_isarray(false); 5786 arg_type->set_type(GLMessage::DataType::ENUM); 5787 arg_type->add_intvalue((int)type); 5788 5789 // copy argument indices 5790 GLMessage_DataType *arg_indices = glmsg.add_args(); 5791 arg_indices->set_isarray(false); 5792 arg_indices->set_type(GLMessage::DataType::INT64); 5793 arg_indices->add_int64value((uintptr_t)indices); 5794 5795 // call function 5796 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5797 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5798 glContext->hooks->gl.glDrawRangeElements(mode, start, end, count, type, indices); 5799 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5800 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5801 5802 void *pointerArgs[] = { 5803 (void *) indices, 5804 }; 5805 5806 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5807 threadStartTime, threadEndTime, 5808 &glmsg, pointerArgs); 5809 glContext->traceGLMessage(&glmsg); 5810 } 5811 5812 void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) { 5813 GLMessage glmsg; 5814 GLTraceContext *glContext = getGLTraceContext(); 5815 5816 glmsg.set_function(GLMessage::glTexImage3D); 5817 5818 // copy argument target 5819 GLMessage_DataType *arg_target = glmsg.add_args(); 5820 arg_target->set_isarray(false); 5821 arg_target->set_type(GLMessage::DataType::ENUM); 5822 arg_target->add_intvalue((int)target); 5823 5824 // copy argument level 5825 GLMessage_DataType *arg_level = glmsg.add_args(); 5826 arg_level->set_isarray(false); 5827 arg_level->set_type(GLMessage::DataType::INT); 5828 arg_level->add_intvalue(level); 5829 5830 // copy argument internalformat 5831 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 5832 arg_internalformat->set_isarray(false); 5833 arg_internalformat->set_type(GLMessage::DataType::INT); 5834 arg_internalformat->add_intvalue(internalformat); 5835 5836 // copy argument width 5837 GLMessage_DataType *arg_width = glmsg.add_args(); 5838 arg_width->set_isarray(false); 5839 arg_width->set_type(GLMessage::DataType::INT); 5840 arg_width->add_intvalue(width); 5841 5842 // copy argument height 5843 GLMessage_DataType *arg_height = glmsg.add_args(); 5844 arg_height->set_isarray(false); 5845 arg_height->set_type(GLMessage::DataType::INT); 5846 arg_height->add_intvalue(height); 5847 5848 // copy argument depth 5849 GLMessage_DataType *arg_depth = glmsg.add_args(); 5850 arg_depth->set_isarray(false); 5851 arg_depth->set_type(GLMessage::DataType::INT); 5852 arg_depth->add_intvalue(depth); 5853 5854 // copy argument border 5855 GLMessage_DataType *arg_border = glmsg.add_args(); 5856 arg_border->set_isarray(false); 5857 arg_border->set_type(GLMessage::DataType::INT); 5858 arg_border->add_intvalue(border); 5859 5860 // copy argument format 5861 GLMessage_DataType *arg_format = glmsg.add_args(); 5862 arg_format->set_isarray(false); 5863 arg_format->set_type(GLMessage::DataType::ENUM); 5864 arg_format->add_intvalue((int)format); 5865 5866 // copy argument type 5867 GLMessage_DataType *arg_type = glmsg.add_args(); 5868 arg_type->set_isarray(false); 5869 arg_type->set_type(GLMessage::DataType::ENUM); 5870 arg_type->add_intvalue((int)type); 5871 5872 // copy argument pixels 5873 GLMessage_DataType *arg_pixels = glmsg.add_args(); 5874 arg_pixels->set_isarray(false); 5875 arg_pixels->set_type(GLMessage::DataType::INT64); 5876 arg_pixels->add_int64value((uintptr_t)pixels); 5877 5878 // call function 5879 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5880 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5881 glContext->hooks->gl.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); 5882 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5883 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5884 5885 void *pointerArgs[] = { 5886 (void *) pixels, 5887 }; 5888 5889 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5890 threadStartTime, threadEndTime, 5891 &glmsg, pointerArgs); 5892 glContext->traceGLMessage(&glmsg); 5893 } 5894 5895 void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) { 5896 GLMessage glmsg; 5897 GLTraceContext *glContext = getGLTraceContext(); 5898 5899 glmsg.set_function(GLMessage::glTexSubImage3D); 5900 5901 // copy argument target 5902 GLMessage_DataType *arg_target = glmsg.add_args(); 5903 arg_target->set_isarray(false); 5904 arg_target->set_type(GLMessage::DataType::ENUM); 5905 arg_target->add_intvalue((int)target); 5906 5907 // copy argument level 5908 GLMessage_DataType *arg_level = glmsg.add_args(); 5909 arg_level->set_isarray(false); 5910 arg_level->set_type(GLMessage::DataType::INT); 5911 arg_level->add_intvalue(level); 5912 5913 // copy argument xoffset 5914 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 5915 arg_xoffset->set_isarray(false); 5916 arg_xoffset->set_type(GLMessage::DataType::INT); 5917 arg_xoffset->add_intvalue(xoffset); 5918 5919 // copy argument yoffset 5920 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 5921 arg_yoffset->set_isarray(false); 5922 arg_yoffset->set_type(GLMessage::DataType::INT); 5923 arg_yoffset->add_intvalue(yoffset); 5924 5925 // copy argument zoffset 5926 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 5927 arg_zoffset->set_isarray(false); 5928 arg_zoffset->set_type(GLMessage::DataType::INT); 5929 arg_zoffset->add_intvalue(zoffset); 5930 5931 // copy argument width 5932 GLMessage_DataType *arg_width = glmsg.add_args(); 5933 arg_width->set_isarray(false); 5934 arg_width->set_type(GLMessage::DataType::INT); 5935 arg_width->add_intvalue(width); 5936 5937 // copy argument height 5938 GLMessage_DataType *arg_height = glmsg.add_args(); 5939 arg_height->set_isarray(false); 5940 arg_height->set_type(GLMessage::DataType::INT); 5941 arg_height->add_intvalue(height); 5942 5943 // copy argument depth 5944 GLMessage_DataType *arg_depth = glmsg.add_args(); 5945 arg_depth->set_isarray(false); 5946 arg_depth->set_type(GLMessage::DataType::INT); 5947 arg_depth->add_intvalue(depth); 5948 5949 // copy argument format 5950 GLMessage_DataType *arg_format = glmsg.add_args(); 5951 arg_format->set_isarray(false); 5952 arg_format->set_type(GLMessage::DataType::ENUM); 5953 arg_format->add_intvalue((int)format); 5954 5955 // copy argument type 5956 GLMessage_DataType *arg_type = glmsg.add_args(); 5957 arg_type->set_isarray(false); 5958 arg_type->set_type(GLMessage::DataType::ENUM); 5959 arg_type->add_intvalue((int)type); 5960 5961 // copy argument pixels 5962 GLMessage_DataType *arg_pixels = glmsg.add_args(); 5963 arg_pixels->set_isarray(false); 5964 arg_pixels->set_type(GLMessage::DataType::INT64); 5965 arg_pixels->add_int64value((uintptr_t)pixels); 5966 5967 // call function 5968 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 5969 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 5970 glContext->hooks->gl.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); 5971 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 5972 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 5973 5974 void *pointerArgs[] = { 5975 (void *) pixels, 5976 }; 5977 5978 fixupGLMessage(glContext, wallStartTime, wallEndTime, 5979 threadStartTime, threadEndTime, 5980 &glmsg, pointerArgs); 5981 glContext->traceGLMessage(&glmsg); 5982 } 5983 5984 void GLTrace_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { 5985 GLMessage glmsg; 5986 GLTraceContext *glContext = getGLTraceContext(); 5987 5988 glmsg.set_function(GLMessage::glCopyTexSubImage3D); 5989 5990 // copy argument target 5991 GLMessage_DataType *arg_target = glmsg.add_args(); 5992 arg_target->set_isarray(false); 5993 arg_target->set_type(GLMessage::DataType::ENUM); 5994 arg_target->add_intvalue((int)target); 5995 5996 // copy argument level 5997 GLMessage_DataType *arg_level = glmsg.add_args(); 5998 arg_level->set_isarray(false); 5999 arg_level->set_type(GLMessage::DataType::INT); 6000 arg_level->add_intvalue(level); 6001 6002 // copy argument xoffset 6003 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 6004 arg_xoffset->set_isarray(false); 6005 arg_xoffset->set_type(GLMessage::DataType::INT); 6006 arg_xoffset->add_intvalue(xoffset); 6007 6008 // copy argument yoffset 6009 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 6010 arg_yoffset->set_isarray(false); 6011 arg_yoffset->set_type(GLMessage::DataType::INT); 6012 arg_yoffset->add_intvalue(yoffset); 6013 6014 // copy argument zoffset 6015 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 6016 arg_zoffset->set_isarray(false); 6017 arg_zoffset->set_type(GLMessage::DataType::INT); 6018 arg_zoffset->add_intvalue(zoffset); 6019 6020 // copy argument x 6021 GLMessage_DataType *arg_x = glmsg.add_args(); 6022 arg_x->set_isarray(false); 6023 arg_x->set_type(GLMessage::DataType::INT); 6024 arg_x->add_intvalue(x); 6025 6026 // copy argument y 6027 GLMessage_DataType *arg_y = glmsg.add_args(); 6028 arg_y->set_isarray(false); 6029 arg_y->set_type(GLMessage::DataType::INT); 6030 arg_y->add_intvalue(y); 6031 6032 // copy argument width 6033 GLMessage_DataType *arg_width = glmsg.add_args(); 6034 arg_width->set_isarray(false); 6035 arg_width->set_type(GLMessage::DataType::INT); 6036 arg_width->add_intvalue(width); 6037 6038 // copy argument height 6039 GLMessage_DataType *arg_height = glmsg.add_args(); 6040 arg_height->set_isarray(false); 6041 arg_height->set_type(GLMessage::DataType::INT); 6042 arg_height->add_intvalue(height); 6043 6044 // call function 6045 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6046 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6047 glContext->hooks->gl.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); 6048 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6049 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6050 6051 void *pointerArgs[] = { 6052 }; 6053 6054 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6055 threadStartTime, threadEndTime, 6056 &glmsg, pointerArgs); 6057 glContext->traceGLMessage(&glmsg); 6058 } 6059 6060 void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) { 6061 GLMessage glmsg; 6062 GLTraceContext *glContext = getGLTraceContext(); 6063 6064 glmsg.set_function(GLMessage::glCompressedTexImage3D); 6065 6066 // copy argument target 6067 GLMessage_DataType *arg_target = glmsg.add_args(); 6068 arg_target->set_isarray(false); 6069 arg_target->set_type(GLMessage::DataType::ENUM); 6070 arg_target->add_intvalue((int)target); 6071 6072 // copy argument level 6073 GLMessage_DataType *arg_level = glmsg.add_args(); 6074 arg_level->set_isarray(false); 6075 arg_level->set_type(GLMessage::DataType::INT); 6076 arg_level->add_intvalue(level); 6077 6078 // copy argument internalformat 6079 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 6080 arg_internalformat->set_isarray(false); 6081 arg_internalformat->set_type(GLMessage::DataType::ENUM); 6082 arg_internalformat->add_intvalue((int)internalformat); 6083 6084 // copy argument width 6085 GLMessage_DataType *arg_width = glmsg.add_args(); 6086 arg_width->set_isarray(false); 6087 arg_width->set_type(GLMessage::DataType::INT); 6088 arg_width->add_intvalue(width); 6089 6090 // copy argument height 6091 GLMessage_DataType *arg_height = glmsg.add_args(); 6092 arg_height->set_isarray(false); 6093 arg_height->set_type(GLMessage::DataType::INT); 6094 arg_height->add_intvalue(height); 6095 6096 // copy argument depth 6097 GLMessage_DataType *arg_depth = glmsg.add_args(); 6098 arg_depth->set_isarray(false); 6099 arg_depth->set_type(GLMessage::DataType::INT); 6100 arg_depth->add_intvalue(depth); 6101 6102 // copy argument border 6103 GLMessage_DataType *arg_border = glmsg.add_args(); 6104 arg_border->set_isarray(false); 6105 arg_border->set_type(GLMessage::DataType::INT); 6106 arg_border->add_intvalue(border); 6107 6108 // copy argument imageSize 6109 GLMessage_DataType *arg_imageSize = glmsg.add_args(); 6110 arg_imageSize->set_isarray(false); 6111 arg_imageSize->set_type(GLMessage::DataType::INT); 6112 arg_imageSize->add_intvalue(imageSize); 6113 6114 // copy argument data 6115 GLMessage_DataType *arg_data = glmsg.add_args(); 6116 arg_data->set_isarray(false); 6117 arg_data->set_type(GLMessage::DataType::INT64); 6118 arg_data->add_int64value((uintptr_t)data); 6119 6120 // call function 6121 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6122 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6123 glContext->hooks->gl.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); 6124 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6125 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6126 6127 void *pointerArgs[] = { 6128 (void *) data, 6129 }; 6130 6131 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6132 threadStartTime, threadEndTime, 6133 &glmsg, pointerArgs); 6134 glContext->traceGLMessage(&glmsg); 6135 } 6136 6137 void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) { 6138 GLMessage glmsg; 6139 GLTraceContext *glContext = getGLTraceContext(); 6140 6141 glmsg.set_function(GLMessage::glCompressedTexSubImage3D); 6142 6143 // copy argument target 6144 GLMessage_DataType *arg_target = glmsg.add_args(); 6145 arg_target->set_isarray(false); 6146 arg_target->set_type(GLMessage::DataType::ENUM); 6147 arg_target->add_intvalue((int)target); 6148 6149 // copy argument level 6150 GLMessage_DataType *arg_level = glmsg.add_args(); 6151 arg_level->set_isarray(false); 6152 arg_level->set_type(GLMessage::DataType::INT); 6153 arg_level->add_intvalue(level); 6154 6155 // copy argument xoffset 6156 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 6157 arg_xoffset->set_isarray(false); 6158 arg_xoffset->set_type(GLMessage::DataType::INT); 6159 arg_xoffset->add_intvalue(xoffset); 6160 6161 // copy argument yoffset 6162 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 6163 arg_yoffset->set_isarray(false); 6164 arg_yoffset->set_type(GLMessage::DataType::INT); 6165 arg_yoffset->add_intvalue(yoffset); 6166 6167 // copy argument zoffset 6168 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 6169 arg_zoffset->set_isarray(false); 6170 arg_zoffset->set_type(GLMessage::DataType::INT); 6171 arg_zoffset->add_intvalue(zoffset); 6172 6173 // copy argument width 6174 GLMessage_DataType *arg_width = glmsg.add_args(); 6175 arg_width->set_isarray(false); 6176 arg_width->set_type(GLMessage::DataType::INT); 6177 arg_width->add_intvalue(width); 6178 6179 // copy argument height 6180 GLMessage_DataType *arg_height = glmsg.add_args(); 6181 arg_height->set_isarray(false); 6182 arg_height->set_type(GLMessage::DataType::INT); 6183 arg_height->add_intvalue(height); 6184 6185 // copy argument depth 6186 GLMessage_DataType *arg_depth = glmsg.add_args(); 6187 arg_depth->set_isarray(false); 6188 arg_depth->set_type(GLMessage::DataType::INT); 6189 arg_depth->add_intvalue(depth); 6190 6191 // copy argument format 6192 GLMessage_DataType *arg_format = glmsg.add_args(); 6193 arg_format->set_isarray(false); 6194 arg_format->set_type(GLMessage::DataType::ENUM); 6195 arg_format->add_intvalue((int)format); 6196 6197 // copy argument imageSize 6198 GLMessage_DataType *arg_imageSize = glmsg.add_args(); 6199 arg_imageSize->set_isarray(false); 6200 arg_imageSize->set_type(GLMessage::DataType::INT); 6201 arg_imageSize->add_intvalue(imageSize); 6202 6203 // copy argument data 6204 GLMessage_DataType *arg_data = glmsg.add_args(); 6205 arg_data->set_isarray(false); 6206 arg_data->set_type(GLMessage::DataType::INT64); 6207 arg_data->add_int64value((uintptr_t)data); 6208 6209 // call function 6210 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6211 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6212 glContext->hooks->gl.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); 6213 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6214 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6215 6216 void *pointerArgs[] = { 6217 (void *) data, 6218 }; 6219 6220 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6221 threadStartTime, threadEndTime, 6222 &glmsg, pointerArgs); 6223 glContext->traceGLMessage(&glmsg); 6224 } 6225 6226 void GLTrace_glGenQueries(GLsizei n, GLuint * ids) { 6227 GLMessage glmsg; 6228 GLTraceContext *glContext = getGLTraceContext(); 6229 6230 glmsg.set_function(GLMessage::glGenQueries); 6231 6232 // copy argument n 6233 GLMessage_DataType *arg_n = glmsg.add_args(); 6234 arg_n->set_isarray(false); 6235 arg_n->set_type(GLMessage::DataType::INT); 6236 arg_n->add_intvalue(n); 6237 6238 // copy argument ids 6239 GLMessage_DataType *arg_ids = glmsg.add_args(); 6240 arg_ids->set_isarray(false); 6241 arg_ids->set_type(GLMessage::DataType::INT64); 6242 arg_ids->add_int64value((uintptr_t)ids); 6243 6244 // call function 6245 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6246 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6247 glContext->hooks->gl.glGenQueries(n, ids); 6248 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6249 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6250 6251 void *pointerArgs[] = { 6252 (void *) ids, 6253 }; 6254 6255 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6256 threadStartTime, threadEndTime, 6257 &glmsg, pointerArgs); 6258 glContext->traceGLMessage(&glmsg); 6259 } 6260 6261 void GLTrace_glDeleteQueries(GLsizei n, const GLuint * ids) { 6262 GLMessage glmsg; 6263 GLTraceContext *glContext = getGLTraceContext(); 6264 6265 glmsg.set_function(GLMessage::glDeleteQueries); 6266 6267 // copy argument n 6268 GLMessage_DataType *arg_n = glmsg.add_args(); 6269 arg_n->set_isarray(false); 6270 arg_n->set_type(GLMessage::DataType::INT); 6271 arg_n->add_intvalue(n); 6272 6273 // copy argument ids 6274 GLMessage_DataType *arg_ids = glmsg.add_args(); 6275 arg_ids->set_isarray(false); 6276 arg_ids->set_type(GLMessage::DataType::INT64); 6277 arg_ids->add_int64value((uintptr_t)ids); 6278 6279 // call function 6280 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6281 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6282 glContext->hooks->gl.glDeleteQueries(n, ids); 6283 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6284 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6285 6286 void *pointerArgs[] = { 6287 (void *) ids, 6288 }; 6289 6290 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6291 threadStartTime, threadEndTime, 6292 &glmsg, pointerArgs); 6293 glContext->traceGLMessage(&glmsg); 6294 } 6295 6296 GLboolean GLTrace_glIsQuery(GLuint id) { 6297 GLMessage glmsg; 6298 GLTraceContext *glContext = getGLTraceContext(); 6299 6300 glmsg.set_function(GLMessage::glIsQuery); 6301 6302 // copy argument id 6303 GLMessage_DataType *arg_id = glmsg.add_args(); 6304 arg_id->set_isarray(false); 6305 arg_id->set_type(GLMessage::DataType::INT); 6306 arg_id->add_intvalue(id); 6307 6308 // call function 6309 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6310 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6311 GLboolean retValue = glContext->hooks->gl.glIsQuery(id); 6312 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6313 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6314 6315 // set return value 6316 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 6317 rt->set_isarray(false); 6318 rt->set_type(GLMessage::DataType::BOOL); 6319 rt->add_boolvalue(retValue); 6320 6321 void *pointerArgs[] = { 6322 }; 6323 6324 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6325 threadStartTime, threadEndTime, 6326 &glmsg, pointerArgs); 6327 glContext->traceGLMessage(&glmsg); 6328 6329 return retValue; 6330 } 6331 6332 void GLTrace_glBeginQuery(GLenum target, GLuint id) { 6333 GLMessage glmsg; 6334 GLTraceContext *glContext = getGLTraceContext(); 6335 6336 glmsg.set_function(GLMessage::glBeginQuery); 6337 6338 // copy argument target 6339 GLMessage_DataType *arg_target = glmsg.add_args(); 6340 arg_target->set_isarray(false); 6341 arg_target->set_type(GLMessage::DataType::ENUM); 6342 arg_target->add_intvalue((int)target); 6343 6344 // copy argument id 6345 GLMessage_DataType *arg_id = glmsg.add_args(); 6346 arg_id->set_isarray(false); 6347 arg_id->set_type(GLMessage::DataType::INT); 6348 arg_id->add_intvalue(id); 6349 6350 // call function 6351 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6352 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6353 glContext->hooks->gl.glBeginQuery(target, id); 6354 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6355 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6356 6357 void *pointerArgs[] = { 6358 }; 6359 6360 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6361 threadStartTime, threadEndTime, 6362 &glmsg, pointerArgs); 6363 glContext->traceGLMessage(&glmsg); 6364 } 6365 6366 void GLTrace_glEndQuery(GLenum target) { 6367 GLMessage glmsg; 6368 GLTraceContext *glContext = getGLTraceContext(); 6369 6370 glmsg.set_function(GLMessage::glEndQuery); 6371 6372 // copy argument target 6373 GLMessage_DataType *arg_target = glmsg.add_args(); 6374 arg_target->set_isarray(false); 6375 arg_target->set_type(GLMessage::DataType::ENUM); 6376 arg_target->add_intvalue((int)target); 6377 6378 // call function 6379 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6380 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6381 glContext->hooks->gl.glEndQuery(target); 6382 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6383 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6384 6385 void *pointerArgs[] = { 6386 }; 6387 6388 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6389 threadStartTime, threadEndTime, 6390 &glmsg, pointerArgs); 6391 glContext->traceGLMessage(&glmsg); 6392 } 6393 6394 void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint * params) { 6395 GLMessage glmsg; 6396 GLTraceContext *glContext = getGLTraceContext(); 6397 6398 glmsg.set_function(GLMessage::glGetQueryiv); 6399 6400 // copy argument target 6401 GLMessage_DataType *arg_target = glmsg.add_args(); 6402 arg_target->set_isarray(false); 6403 arg_target->set_type(GLMessage::DataType::ENUM); 6404 arg_target->add_intvalue((int)target); 6405 6406 // copy argument pname 6407 GLMessage_DataType *arg_pname = glmsg.add_args(); 6408 arg_pname->set_isarray(false); 6409 arg_pname->set_type(GLMessage::DataType::ENUM); 6410 arg_pname->add_intvalue((int)pname); 6411 6412 // copy argument params 6413 GLMessage_DataType *arg_params = glmsg.add_args(); 6414 arg_params->set_isarray(false); 6415 arg_params->set_type(GLMessage::DataType::INT64); 6416 arg_params->add_int64value((uintptr_t)params); 6417 6418 // call function 6419 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6420 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6421 glContext->hooks->gl.glGetQueryiv(target, pname, params); 6422 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6423 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6424 6425 void *pointerArgs[] = { 6426 (void *) params, 6427 }; 6428 6429 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6430 threadStartTime, threadEndTime, 6431 &glmsg, pointerArgs); 6432 glContext->traceGLMessage(&glmsg); 6433 } 6434 6435 void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint * params) { 6436 GLMessage glmsg; 6437 GLTraceContext *glContext = getGLTraceContext(); 6438 6439 glmsg.set_function(GLMessage::glGetQueryObjectuiv); 6440 6441 // copy argument id 6442 GLMessage_DataType *arg_id = glmsg.add_args(); 6443 arg_id->set_isarray(false); 6444 arg_id->set_type(GLMessage::DataType::INT); 6445 arg_id->add_intvalue(id); 6446 6447 // copy argument pname 6448 GLMessage_DataType *arg_pname = glmsg.add_args(); 6449 arg_pname->set_isarray(false); 6450 arg_pname->set_type(GLMessage::DataType::ENUM); 6451 arg_pname->add_intvalue((int)pname); 6452 6453 // copy argument params 6454 GLMessage_DataType *arg_params = glmsg.add_args(); 6455 arg_params->set_isarray(false); 6456 arg_params->set_type(GLMessage::DataType::INT64); 6457 arg_params->add_int64value((uintptr_t)params); 6458 6459 // call function 6460 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6461 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6462 glContext->hooks->gl.glGetQueryObjectuiv(id, pname, params); 6463 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6464 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6465 6466 void *pointerArgs[] = { 6467 (void *) params, 6468 }; 6469 6470 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6471 threadStartTime, threadEndTime, 6472 &glmsg, pointerArgs); 6473 glContext->traceGLMessage(&glmsg); 6474 } 6475 6476 GLboolean GLTrace_glUnmapBuffer(GLenum target) { 6477 GLMessage glmsg; 6478 GLTraceContext *glContext = getGLTraceContext(); 6479 6480 glmsg.set_function(GLMessage::glUnmapBuffer); 6481 6482 // copy argument target 6483 GLMessage_DataType *arg_target = glmsg.add_args(); 6484 arg_target->set_isarray(false); 6485 arg_target->set_type(GLMessage::DataType::ENUM); 6486 arg_target->add_intvalue((int)target); 6487 6488 // call function 6489 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6490 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6491 GLboolean retValue = glContext->hooks->gl.glUnmapBuffer(target); 6492 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6493 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6494 6495 // set return value 6496 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 6497 rt->set_isarray(false); 6498 rt->set_type(GLMessage::DataType::BOOL); 6499 rt->add_boolvalue(retValue); 6500 6501 void *pointerArgs[] = { 6502 }; 6503 6504 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6505 threadStartTime, threadEndTime, 6506 &glmsg, pointerArgs); 6507 glContext->traceGLMessage(&glmsg); 6508 6509 return retValue; 6510 } 6511 6512 void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, void ** params) { 6513 GLMessage glmsg; 6514 GLTraceContext *glContext = getGLTraceContext(); 6515 6516 glmsg.set_function(GLMessage::glGetBufferPointerv); 6517 6518 // copy argument target 6519 GLMessage_DataType *arg_target = glmsg.add_args(); 6520 arg_target->set_isarray(false); 6521 arg_target->set_type(GLMessage::DataType::ENUM); 6522 arg_target->add_intvalue((int)target); 6523 6524 // copy argument pname 6525 GLMessage_DataType *arg_pname = glmsg.add_args(); 6526 arg_pname->set_isarray(false); 6527 arg_pname->set_type(GLMessage::DataType::ENUM); 6528 arg_pname->add_intvalue((int)pname); 6529 6530 // copy argument params 6531 GLMessage_DataType *arg_params = glmsg.add_args(); 6532 arg_params->set_isarray(false); 6533 arg_params->set_type(GLMessage::DataType::INT64); 6534 arg_params->add_int64value((uintptr_t)params); 6535 6536 // call function 6537 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6538 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6539 glContext->hooks->gl.glGetBufferPointerv(target, pname, params); 6540 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6541 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6542 6543 void *pointerArgs[] = { 6544 (void *) params, 6545 }; 6546 6547 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6548 threadStartTime, threadEndTime, 6549 &glmsg, pointerArgs); 6550 glContext->traceGLMessage(&glmsg); 6551 } 6552 6553 void GLTrace_glDrawBuffers(GLsizei n, const GLenum * bufs) { 6554 GLMessage glmsg; 6555 GLTraceContext *glContext = getGLTraceContext(); 6556 6557 glmsg.set_function(GLMessage::glDrawBuffers); 6558 6559 // copy argument n 6560 GLMessage_DataType *arg_n = glmsg.add_args(); 6561 arg_n->set_isarray(false); 6562 arg_n->set_type(GLMessage::DataType::INT); 6563 arg_n->add_intvalue(n); 6564 6565 // copy argument bufs 6566 GLMessage_DataType *arg_bufs = glmsg.add_args(); 6567 arg_bufs->set_isarray(false); 6568 arg_bufs->set_type(GLMessage::DataType::INT64); 6569 arg_bufs->add_int64value((uintptr_t)bufs); 6570 6571 // call function 6572 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6573 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6574 glContext->hooks->gl.glDrawBuffers(n, bufs); 6575 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6576 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6577 6578 void *pointerArgs[] = { 6579 (void *) bufs, 6580 }; 6581 6582 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6583 threadStartTime, threadEndTime, 6584 &glmsg, pointerArgs); 6585 glContext->traceGLMessage(&glmsg); 6586 } 6587 6588 void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 6589 GLMessage glmsg; 6590 GLTraceContext *glContext = getGLTraceContext(); 6591 6592 glmsg.set_function(GLMessage::glUniformMatrix2x3fv); 6593 6594 // copy argument location 6595 GLMessage_DataType *arg_location = glmsg.add_args(); 6596 arg_location->set_isarray(false); 6597 arg_location->set_type(GLMessage::DataType::INT); 6598 arg_location->add_intvalue(location); 6599 6600 // copy argument count 6601 GLMessage_DataType *arg_count = glmsg.add_args(); 6602 arg_count->set_isarray(false); 6603 arg_count->set_type(GLMessage::DataType::INT); 6604 arg_count->add_intvalue(count); 6605 6606 // copy argument transpose 6607 GLMessage_DataType *arg_transpose = glmsg.add_args(); 6608 arg_transpose->set_isarray(false); 6609 arg_transpose->set_type(GLMessage::DataType::BOOL); 6610 arg_transpose->add_boolvalue(transpose); 6611 6612 // copy argument value 6613 GLMessage_DataType *arg_value = glmsg.add_args(); 6614 arg_value->set_isarray(false); 6615 arg_value->set_type(GLMessage::DataType::INT64); 6616 arg_value->add_int64value((uintptr_t)value); 6617 6618 // call function 6619 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6620 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6621 glContext->hooks->gl.glUniformMatrix2x3fv(location, count, transpose, value); 6622 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6623 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6624 6625 void *pointerArgs[] = { 6626 (void *) value, 6627 }; 6628 6629 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6630 threadStartTime, threadEndTime, 6631 &glmsg, pointerArgs); 6632 glContext->traceGLMessage(&glmsg); 6633 } 6634 6635 void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 6636 GLMessage glmsg; 6637 GLTraceContext *glContext = getGLTraceContext(); 6638 6639 glmsg.set_function(GLMessage::glUniformMatrix3x2fv); 6640 6641 // copy argument location 6642 GLMessage_DataType *arg_location = glmsg.add_args(); 6643 arg_location->set_isarray(false); 6644 arg_location->set_type(GLMessage::DataType::INT); 6645 arg_location->add_intvalue(location); 6646 6647 // copy argument count 6648 GLMessage_DataType *arg_count = glmsg.add_args(); 6649 arg_count->set_isarray(false); 6650 arg_count->set_type(GLMessage::DataType::INT); 6651 arg_count->add_intvalue(count); 6652 6653 // copy argument transpose 6654 GLMessage_DataType *arg_transpose = glmsg.add_args(); 6655 arg_transpose->set_isarray(false); 6656 arg_transpose->set_type(GLMessage::DataType::BOOL); 6657 arg_transpose->add_boolvalue(transpose); 6658 6659 // copy argument value 6660 GLMessage_DataType *arg_value = glmsg.add_args(); 6661 arg_value->set_isarray(false); 6662 arg_value->set_type(GLMessage::DataType::INT64); 6663 arg_value->add_int64value((uintptr_t)value); 6664 6665 // call function 6666 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6667 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6668 glContext->hooks->gl.glUniformMatrix3x2fv(location, count, transpose, value); 6669 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6670 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6671 6672 void *pointerArgs[] = { 6673 (void *) value, 6674 }; 6675 6676 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6677 threadStartTime, threadEndTime, 6678 &glmsg, pointerArgs); 6679 glContext->traceGLMessage(&glmsg); 6680 } 6681 6682 void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 6683 GLMessage glmsg; 6684 GLTraceContext *glContext = getGLTraceContext(); 6685 6686 glmsg.set_function(GLMessage::glUniformMatrix2x4fv); 6687 6688 // copy argument location 6689 GLMessage_DataType *arg_location = glmsg.add_args(); 6690 arg_location->set_isarray(false); 6691 arg_location->set_type(GLMessage::DataType::INT); 6692 arg_location->add_intvalue(location); 6693 6694 // copy argument count 6695 GLMessage_DataType *arg_count = glmsg.add_args(); 6696 arg_count->set_isarray(false); 6697 arg_count->set_type(GLMessage::DataType::INT); 6698 arg_count->add_intvalue(count); 6699 6700 // copy argument transpose 6701 GLMessage_DataType *arg_transpose = glmsg.add_args(); 6702 arg_transpose->set_isarray(false); 6703 arg_transpose->set_type(GLMessage::DataType::BOOL); 6704 arg_transpose->add_boolvalue(transpose); 6705 6706 // copy argument value 6707 GLMessage_DataType *arg_value = glmsg.add_args(); 6708 arg_value->set_isarray(false); 6709 arg_value->set_type(GLMessage::DataType::INT64); 6710 arg_value->add_int64value((uintptr_t)value); 6711 6712 // call function 6713 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6714 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6715 glContext->hooks->gl.glUniformMatrix2x4fv(location, count, transpose, value); 6716 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6717 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6718 6719 void *pointerArgs[] = { 6720 (void *) value, 6721 }; 6722 6723 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6724 threadStartTime, threadEndTime, 6725 &glmsg, pointerArgs); 6726 glContext->traceGLMessage(&glmsg); 6727 } 6728 6729 void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 6730 GLMessage glmsg; 6731 GLTraceContext *glContext = getGLTraceContext(); 6732 6733 glmsg.set_function(GLMessage::glUniformMatrix4x2fv); 6734 6735 // copy argument location 6736 GLMessage_DataType *arg_location = glmsg.add_args(); 6737 arg_location->set_isarray(false); 6738 arg_location->set_type(GLMessage::DataType::INT); 6739 arg_location->add_intvalue(location); 6740 6741 // copy argument count 6742 GLMessage_DataType *arg_count = glmsg.add_args(); 6743 arg_count->set_isarray(false); 6744 arg_count->set_type(GLMessage::DataType::INT); 6745 arg_count->add_intvalue(count); 6746 6747 // copy argument transpose 6748 GLMessage_DataType *arg_transpose = glmsg.add_args(); 6749 arg_transpose->set_isarray(false); 6750 arg_transpose->set_type(GLMessage::DataType::BOOL); 6751 arg_transpose->add_boolvalue(transpose); 6752 6753 // copy argument value 6754 GLMessage_DataType *arg_value = glmsg.add_args(); 6755 arg_value->set_isarray(false); 6756 arg_value->set_type(GLMessage::DataType::INT64); 6757 arg_value->add_int64value((uintptr_t)value); 6758 6759 // call function 6760 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6761 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6762 glContext->hooks->gl.glUniformMatrix4x2fv(location, count, transpose, value); 6763 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6764 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6765 6766 void *pointerArgs[] = { 6767 (void *) value, 6768 }; 6769 6770 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6771 threadStartTime, threadEndTime, 6772 &glmsg, pointerArgs); 6773 glContext->traceGLMessage(&glmsg); 6774 } 6775 6776 void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 6777 GLMessage glmsg; 6778 GLTraceContext *glContext = getGLTraceContext(); 6779 6780 glmsg.set_function(GLMessage::glUniformMatrix3x4fv); 6781 6782 // copy argument location 6783 GLMessage_DataType *arg_location = glmsg.add_args(); 6784 arg_location->set_isarray(false); 6785 arg_location->set_type(GLMessage::DataType::INT); 6786 arg_location->add_intvalue(location); 6787 6788 // copy argument count 6789 GLMessage_DataType *arg_count = glmsg.add_args(); 6790 arg_count->set_isarray(false); 6791 arg_count->set_type(GLMessage::DataType::INT); 6792 arg_count->add_intvalue(count); 6793 6794 // copy argument transpose 6795 GLMessage_DataType *arg_transpose = glmsg.add_args(); 6796 arg_transpose->set_isarray(false); 6797 arg_transpose->set_type(GLMessage::DataType::BOOL); 6798 arg_transpose->add_boolvalue(transpose); 6799 6800 // copy argument value 6801 GLMessage_DataType *arg_value = glmsg.add_args(); 6802 arg_value->set_isarray(false); 6803 arg_value->set_type(GLMessage::DataType::INT64); 6804 arg_value->add_int64value((uintptr_t)value); 6805 6806 // call function 6807 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6808 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6809 glContext->hooks->gl.glUniformMatrix3x4fv(location, count, transpose, value); 6810 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6811 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6812 6813 void *pointerArgs[] = { 6814 (void *) value, 6815 }; 6816 6817 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6818 threadStartTime, threadEndTime, 6819 &glmsg, pointerArgs); 6820 glContext->traceGLMessage(&glmsg); 6821 } 6822 6823 void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 6824 GLMessage glmsg; 6825 GLTraceContext *glContext = getGLTraceContext(); 6826 6827 glmsg.set_function(GLMessage::glUniformMatrix4x3fv); 6828 6829 // copy argument location 6830 GLMessage_DataType *arg_location = glmsg.add_args(); 6831 arg_location->set_isarray(false); 6832 arg_location->set_type(GLMessage::DataType::INT); 6833 arg_location->add_intvalue(location); 6834 6835 // copy argument count 6836 GLMessage_DataType *arg_count = glmsg.add_args(); 6837 arg_count->set_isarray(false); 6838 arg_count->set_type(GLMessage::DataType::INT); 6839 arg_count->add_intvalue(count); 6840 6841 // copy argument transpose 6842 GLMessage_DataType *arg_transpose = glmsg.add_args(); 6843 arg_transpose->set_isarray(false); 6844 arg_transpose->set_type(GLMessage::DataType::BOOL); 6845 arg_transpose->add_boolvalue(transpose); 6846 6847 // copy argument value 6848 GLMessage_DataType *arg_value = glmsg.add_args(); 6849 arg_value->set_isarray(false); 6850 arg_value->set_type(GLMessage::DataType::INT64); 6851 arg_value->add_int64value((uintptr_t)value); 6852 6853 // call function 6854 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6855 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6856 glContext->hooks->gl.glUniformMatrix4x3fv(location, count, transpose, value); 6857 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6858 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6859 6860 void *pointerArgs[] = { 6861 (void *) value, 6862 }; 6863 6864 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6865 threadStartTime, threadEndTime, 6866 &glmsg, pointerArgs); 6867 glContext->traceGLMessage(&glmsg); 6868 } 6869 6870 void GLTrace_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { 6871 GLMessage glmsg; 6872 GLTraceContext *glContext = getGLTraceContext(); 6873 6874 glmsg.set_function(GLMessage::glBlitFramebuffer); 6875 6876 // copy argument srcX0 6877 GLMessage_DataType *arg_srcX0 = glmsg.add_args(); 6878 arg_srcX0->set_isarray(false); 6879 arg_srcX0->set_type(GLMessage::DataType::INT); 6880 arg_srcX0->add_intvalue(srcX0); 6881 6882 // copy argument srcY0 6883 GLMessage_DataType *arg_srcY0 = glmsg.add_args(); 6884 arg_srcY0->set_isarray(false); 6885 arg_srcY0->set_type(GLMessage::DataType::INT); 6886 arg_srcY0->add_intvalue(srcY0); 6887 6888 // copy argument srcX1 6889 GLMessage_DataType *arg_srcX1 = glmsg.add_args(); 6890 arg_srcX1->set_isarray(false); 6891 arg_srcX1->set_type(GLMessage::DataType::INT); 6892 arg_srcX1->add_intvalue(srcX1); 6893 6894 // copy argument srcY1 6895 GLMessage_DataType *arg_srcY1 = glmsg.add_args(); 6896 arg_srcY1->set_isarray(false); 6897 arg_srcY1->set_type(GLMessage::DataType::INT); 6898 arg_srcY1->add_intvalue(srcY1); 6899 6900 // copy argument dstX0 6901 GLMessage_DataType *arg_dstX0 = glmsg.add_args(); 6902 arg_dstX0->set_isarray(false); 6903 arg_dstX0->set_type(GLMessage::DataType::INT); 6904 arg_dstX0->add_intvalue(dstX0); 6905 6906 // copy argument dstY0 6907 GLMessage_DataType *arg_dstY0 = glmsg.add_args(); 6908 arg_dstY0->set_isarray(false); 6909 arg_dstY0->set_type(GLMessage::DataType::INT); 6910 arg_dstY0->add_intvalue(dstY0); 6911 6912 // copy argument dstX1 6913 GLMessage_DataType *arg_dstX1 = glmsg.add_args(); 6914 arg_dstX1->set_isarray(false); 6915 arg_dstX1->set_type(GLMessage::DataType::INT); 6916 arg_dstX1->add_intvalue(dstX1); 6917 6918 // copy argument dstY1 6919 GLMessage_DataType *arg_dstY1 = glmsg.add_args(); 6920 arg_dstY1->set_isarray(false); 6921 arg_dstY1->set_type(GLMessage::DataType::INT); 6922 arg_dstY1->add_intvalue(dstY1); 6923 6924 // copy argument mask 6925 GLMessage_DataType *arg_mask = glmsg.add_args(); 6926 arg_mask->set_isarray(false); 6927 arg_mask->set_type(GLMessage::DataType::INT); 6928 arg_mask->add_intvalue(mask); 6929 6930 // copy argument filter 6931 GLMessage_DataType *arg_filter = glmsg.add_args(); 6932 arg_filter->set_isarray(false); 6933 arg_filter->set_type(GLMessage::DataType::ENUM); 6934 arg_filter->add_intvalue((int)filter); 6935 6936 // call function 6937 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6938 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6939 glContext->hooks->gl.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); 6940 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6941 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6942 6943 void *pointerArgs[] = { 6944 }; 6945 6946 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6947 threadStartTime, threadEndTime, 6948 &glmsg, pointerArgs); 6949 glContext->traceGLMessage(&glmsg); 6950 } 6951 6952 void GLTrace_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { 6953 GLMessage glmsg; 6954 GLTraceContext *glContext = getGLTraceContext(); 6955 6956 glmsg.set_function(GLMessage::glRenderbufferStorageMultisample); 6957 6958 // copy argument target 6959 GLMessage_DataType *arg_target = glmsg.add_args(); 6960 arg_target->set_isarray(false); 6961 arg_target->set_type(GLMessage::DataType::ENUM); 6962 arg_target->add_intvalue((int)target); 6963 6964 // copy argument samples 6965 GLMessage_DataType *arg_samples = glmsg.add_args(); 6966 arg_samples->set_isarray(false); 6967 arg_samples->set_type(GLMessage::DataType::INT); 6968 arg_samples->add_intvalue(samples); 6969 6970 // copy argument internalformat 6971 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 6972 arg_internalformat->set_isarray(false); 6973 arg_internalformat->set_type(GLMessage::DataType::ENUM); 6974 arg_internalformat->add_intvalue((int)internalformat); 6975 6976 // copy argument width 6977 GLMessage_DataType *arg_width = glmsg.add_args(); 6978 arg_width->set_isarray(false); 6979 arg_width->set_type(GLMessage::DataType::INT); 6980 arg_width->add_intvalue(width); 6981 6982 // copy argument height 6983 GLMessage_DataType *arg_height = glmsg.add_args(); 6984 arg_height->set_isarray(false); 6985 arg_height->set_type(GLMessage::DataType::INT); 6986 arg_height->add_intvalue(height); 6987 6988 // call function 6989 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 6990 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 6991 glContext->hooks->gl.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); 6992 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 6993 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 6994 6995 void *pointerArgs[] = { 6996 }; 6997 6998 fixupGLMessage(glContext, wallStartTime, wallEndTime, 6999 threadStartTime, threadEndTime, 7000 &glmsg, pointerArgs); 7001 glContext->traceGLMessage(&glmsg); 7002 } 7003 7004 void GLTrace_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { 7005 GLMessage glmsg; 7006 GLTraceContext *glContext = getGLTraceContext(); 7007 7008 glmsg.set_function(GLMessage::glFramebufferTextureLayer); 7009 7010 // copy argument target 7011 GLMessage_DataType *arg_target = glmsg.add_args(); 7012 arg_target->set_isarray(false); 7013 arg_target->set_type(GLMessage::DataType::ENUM); 7014 arg_target->add_intvalue((int)target); 7015 7016 // copy argument attachment 7017 GLMessage_DataType *arg_attachment = glmsg.add_args(); 7018 arg_attachment->set_isarray(false); 7019 arg_attachment->set_type(GLMessage::DataType::ENUM); 7020 arg_attachment->add_intvalue((int)attachment); 7021 7022 // copy argument texture 7023 GLMessage_DataType *arg_texture = glmsg.add_args(); 7024 arg_texture->set_isarray(false); 7025 arg_texture->set_type(GLMessage::DataType::INT); 7026 arg_texture->add_intvalue(texture); 7027 7028 // copy argument level 7029 GLMessage_DataType *arg_level = glmsg.add_args(); 7030 arg_level->set_isarray(false); 7031 arg_level->set_type(GLMessage::DataType::INT); 7032 arg_level->add_intvalue(level); 7033 7034 // copy argument layer 7035 GLMessage_DataType *arg_layer = glmsg.add_args(); 7036 arg_layer->set_isarray(false); 7037 arg_layer->set_type(GLMessage::DataType::INT); 7038 arg_layer->add_intvalue(layer); 7039 7040 // call function 7041 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7042 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7043 glContext->hooks->gl.glFramebufferTextureLayer(target, attachment, texture, level, layer); 7044 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7045 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7046 7047 void *pointerArgs[] = { 7048 }; 7049 7050 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7051 threadStartTime, threadEndTime, 7052 &glmsg, pointerArgs); 7053 glContext->traceGLMessage(&glmsg); 7054 } 7055 7056 void * GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { 7057 GLMessage glmsg; 7058 GLTraceContext *glContext = getGLTraceContext(); 7059 7060 glmsg.set_function(GLMessage::glMapBufferRange); 7061 7062 // copy argument target 7063 GLMessage_DataType *arg_target = glmsg.add_args(); 7064 arg_target->set_isarray(false); 7065 arg_target->set_type(GLMessage::DataType::ENUM); 7066 arg_target->add_intvalue((int)target); 7067 7068 // copy argument offset 7069 GLMessage_DataType *arg_offset = glmsg.add_args(); 7070 arg_offset->set_isarray(false); 7071 arg_offset->set_type(GLMessage::DataType::INT); 7072 arg_offset->add_intvalue(offset); 7073 7074 // copy argument length 7075 GLMessage_DataType *arg_length = glmsg.add_args(); 7076 arg_length->set_isarray(false); 7077 arg_length->set_type(GLMessage::DataType::INT); 7078 arg_length->add_intvalue(length); 7079 7080 // copy argument access 7081 GLMessage_DataType *arg_access = glmsg.add_args(); 7082 arg_access->set_isarray(false); 7083 arg_access->set_type(GLMessage::DataType::INT); 7084 arg_access->add_intvalue(access); 7085 7086 // call function 7087 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7088 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7089 void * retValue = glContext->hooks->gl.glMapBufferRange(target, offset, length, access); 7090 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7091 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7092 7093 // set return value 7094 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 7095 rt->set_isarray(false); 7096 rt->set_type(GLMessage::DataType::INT64); 7097 rt->add_int64value((uintptr_t)retValue); 7098 7099 void *pointerArgs[] = { 7100 (void *) retValue, 7101 }; 7102 7103 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7104 threadStartTime, threadEndTime, 7105 &glmsg, pointerArgs); 7106 glContext->traceGLMessage(&glmsg); 7107 7108 return retValue; 7109 } 7110 7111 void GLTrace_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) { 7112 GLMessage glmsg; 7113 GLTraceContext *glContext = getGLTraceContext(); 7114 7115 glmsg.set_function(GLMessage::glFlushMappedBufferRange); 7116 7117 // copy argument target 7118 GLMessage_DataType *arg_target = glmsg.add_args(); 7119 arg_target->set_isarray(false); 7120 arg_target->set_type(GLMessage::DataType::ENUM); 7121 arg_target->add_intvalue((int)target); 7122 7123 // copy argument offset 7124 GLMessage_DataType *arg_offset = glmsg.add_args(); 7125 arg_offset->set_isarray(false); 7126 arg_offset->set_type(GLMessage::DataType::INT); 7127 arg_offset->add_intvalue(offset); 7128 7129 // copy argument length 7130 GLMessage_DataType *arg_length = glmsg.add_args(); 7131 arg_length->set_isarray(false); 7132 arg_length->set_type(GLMessage::DataType::INT); 7133 arg_length->add_intvalue(length); 7134 7135 // call function 7136 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7137 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7138 glContext->hooks->gl.glFlushMappedBufferRange(target, offset, length); 7139 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7140 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7141 7142 void *pointerArgs[] = { 7143 }; 7144 7145 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7146 threadStartTime, threadEndTime, 7147 &glmsg, pointerArgs); 7148 glContext->traceGLMessage(&glmsg); 7149 } 7150 7151 void GLTrace_glBindVertexArray(GLuint array) { 7152 GLMessage glmsg; 7153 GLTraceContext *glContext = getGLTraceContext(); 7154 7155 glmsg.set_function(GLMessage::glBindVertexArray); 7156 7157 // copy argument array 7158 GLMessage_DataType *arg_array = glmsg.add_args(); 7159 arg_array->set_isarray(false); 7160 arg_array->set_type(GLMessage::DataType::INT); 7161 arg_array->add_intvalue(array); 7162 7163 // call function 7164 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7165 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7166 glContext->hooks->gl.glBindVertexArray(array); 7167 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7168 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7169 7170 void *pointerArgs[] = { 7171 }; 7172 7173 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7174 threadStartTime, threadEndTime, 7175 &glmsg, pointerArgs); 7176 glContext->traceGLMessage(&glmsg); 7177 } 7178 7179 void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint * arrays) { 7180 GLMessage glmsg; 7181 GLTraceContext *glContext = getGLTraceContext(); 7182 7183 glmsg.set_function(GLMessage::glDeleteVertexArrays); 7184 7185 // copy argument n 7186 GLMessage_DataType *arg_n = glmsg.add_args(); 7187 arg_n->set_isarray(false); 7188 arg_n->set_type(GLMessage::DataType::INT); 7189 arg_n->add_intvalue(n); 7190 7191 // copy argument arrays 7192 GLMessage_DataType *arg_arrays = glmsg.add_args(); 7193 arg_arrays->set_isarray(false); 7194 arg_arrays->set_type(GLMessage::DataType::INT64); 7195 arg_arrays->add_int64value((uintptr_t)arrays); 7196 7197 // call function 7198 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7199 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7200 glContext->hooks->gl.glDeleteVertexArrays(n, arrays); 7201 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7202 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7203 7204 void *pointerArgs[] = { 7205 (void *) arrays, 7206 }; 7207 7208 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7209 threadStartTime, threadEndTime, 7210 &glmsg, pointerArgs); 7211 glContext->traceGLMessage(&glmsg); 7212 } 7213 7214 void GLTrace_glGenVertexArrays(GLsizei n, GLuint * arrays) { 7215 GLMessage glmsg; 7216 GLTraceContext *glContext = getGLTraceContext(); 7217 7218 glmsg.set_function(GLMessage::glGenVertexArrays); 7219 7220 // copy argument n 7221 GLMessage_DataType *arg_n = glmsg.add_args(); 7222 arg_n->set_isarray(false); 7223 arg_n->set_type(GLMessage::DataType::INT); 7224 arg_n->add_intvalue(n); 7225 7226 // copy argument arrays 7227 GLMessage_DataType *arg_arrays = glmsg.add_args(); 7228 arg_arrays->set_isarray(false); 7229 arg_arrays->set_type(GLMessage::DataType::INT64); 7230 arg_arrays->add_int64value((uintptr_t)arrays); 7231 7232 // call function 7233 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7234 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7235 glContext->hooks->gl.glGenVertexArrays(n, arrays); 7236 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7237 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7238 7239 void *pointerArgs[] = { 7240 (void *) arrays, 7241 }; 7242 7243 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7244 threadStartTime, threadEndTime, 7245 &glmsg, pointerArgs); 7246 glContext->traceGLMessage(&glmsg); 7247 } 7248 7249 GLboolean GLTrace_glIsVertexArray(GLuint array) { 7250 GLMessage glmsg; 7251 GLTraceContext *glContext = getGLTraceContext(); 7252 7253 glmsg.set_function(GLMessage::glIsVertexArray); 7254 7255 // copy argument array 7256 GLMessage_DataType *arg_array = glmsg.add_args(); 7257 arg_array->set_isarray(false); 7258 arg_array->set_type(GLMessage::DataType::INT); 7259 arg_array->add_intvalue(array); 7260 7261 // call function 7262 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7263 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7264 GLboolean retValue = glContext->hooks->gl.glIsVertexArray(array); 7265 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7266 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7267 7268 // set return value 7269 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 7270 rt->set_isarray(false); 7271 rt->set_type(GLMessage::DataType::BOOL); 7272 rt->add_boolvalue(retValue); 7273 7274 void *pointerArgs[] = { 7275 }; 7276 7277 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7278 threadStartTime, threadEndTime, 7279 &glmsg, pointerArgs); 7280 glContext->traceGLMessage(&glmsg); 7281 7282 return retValue; 7283 } 7284 7285 void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint * data) { 7286 GLMessage glmsg; 7287 GLTraceContext *glContext = getGLTraceContext(); 7288 7289 glmsg.set_function(GLMessage::glGetIntegeri_v); 7290 7291 // copy argument target 7292 GLMessage_DataType *arg_target = glmsg.add_args(); 7293 arg_target->set_isarray(false); 7294 arg_target->set_type(GLMessage::DataType::ENUM); 7295 arg_target->add_intvalue((int)target); 7296 7297 // copy argument index 7298 GLMessage_DataType *arg_index = glmsg.add_args(); 7299 arg_index->set_isarray(false); 7300 arg_index->set_type(GLMessage::DataType::INT); 7301 arg_index->add_intvalue(index); 7302 7303 // copy argument data 7304 GLMessage_DataType *arg_data = glmsg.add_args(); 7305 arg_data->set_isarray(false); 7306 arg_data->set_type(GLMessage::DataType::INT64); 7307 arg_data->add_int64value((uintptr_t)data); 7308 7309 // call function 7310 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7311 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7312 glContext->hooks->gl.glGetIntegeri_v(target, index, data); 7313 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7314 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7315 7316 void *pointerArgs[] = { 7317 (void *) data, 7318 }; 7319 7320 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7321 threadStartTime, threadEndTime, 7322 &glmsg, pointerArgs); 7323 glContext->traceGLMessage(&glmsg); 7324 } 7325 7326 void GLTrace_glBeginTransformFeedback(GLenum primitiveMode) { 7327 GLMessage glmsg; 7328 GLTraceContext *glContext = getGLTraceContext(); 7329 7330 glmsg.set_function(GLMessage::glBeginTransformFeedback); 7331 7332 // copy argument primitiveMode 7333 GLMessage_DataType *arg_primitiveMode = glmsg.add_args(); 7334 arg_primitiveMode->set_isarray(false); 7335 arg_primitiveMode->set_type(GLMessage::DataType::ENUM); 7336 arg_primitiveMode->add_intvalue((int)primitiveMode); 7337 7338 // call function 7339 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7340 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7341 glContext->hooks->gl.glBeginTransformFeedback(primitiveMode); 7342 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7343 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7344 7345 void *pointerArgs[] = { 7346 }; 7347 7348 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7349 threadStartTime, threadEndTime, 7350 &glmsg, pointerArgs); 7351 glContext->traceGLMessage(&glmsg); 7352 } 7353 7354 void GLTrace_glEndTransformFeedback(void) { 7355 GLMessage glmsg; 7356 GLTraceContext *glContext = getGLTraceContext(); 7357 7358 glmsg.set_function(GLMessage::glEndTransformFeedback); 7359 7360 // call function 7361 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7362 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7363 glContext->hooks->gl.glEndTransformFeedback(); 7364 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7365 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7366 7367 void *pointerArgs[] = { 7368 }; 7369 7370 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7371 threadStartTime, threadEndTime, 7372 &glmsg, pointerArgs); 7373 glContext->traceGLMessage(&glmsg); 7374 } 7375 7376 void GLTrace_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { 7377 GLMessage glmsg; 7378 GLTraceContext *glContext = getGLTraceContext(); 7379 7380 glmsg.set_function(GLMessage::glBindBufferRange); 7381 7382 // copy argument target 7383 GLMessage_DataType *arg_target = glmsg.add_args(); 7384 arg_target->set_isarray(false); 7385 arg_target->set_type(GLMessage::DataType::ENUM); 7386 arg_target->add_intvalue((int)target); 7387 7388 // copy argument index 7389 GLMessage_DataType *arg_index = glmsg.add_args(); 7390 arg_index->set_isarray(false); 7391 arg_index->set_type(GLMessage::DataType::INT); 7392 arg_index->add_intvalue(index); 7393 7394 // copy argument buffer 7395 GLMessage_DataType *arg_buffer = glmsg.add_args(); 7396 arg_buffer->set_isarray(false); 7397 arg_buffer->set_type(GLMessage::DataType::INT); 7398 arg_buffer->add_intvalue(buffer); 7399 7400 // copy argument offset 7401 GLMessage_DataType *arg_offset = glmsg.add_args(); 7402 arg_offset->set_isarray(false); 7403 arg_offset->set_type(GLMessage::DataType::INT); 7404 arg_offset->add_intvalue(offset); 7405 7406 // copy argument size 7407 GLMessage_DataType *arg_size = glmsg.add_args(); 7408 arg_size->set_isarray(false); 7409 arg_size->set_type(GLMessage::DataType::INT); 7410 arg_size->add_intvalue(size); 7411 7412 // call function 7413 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7414 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7415 glContext->hooks->gl.glBindBufferRange(target, index, buffer, offset, size); 7416 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7417 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7418 7419 void *pointerArgs[] = { 7420 }; 7421 7422 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7423 threadStartTime, threadEndTime, 7424 &glmsg, pointerArgs); 7425 glContext->traceGLMessage(&glmsg); 7426 } 7427 7428 void GLTrace_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) { 7429 GLMessage glmsg; 7430 GLTraceContext *glContext = getGLTraceContext(); 7431 7432 glmsg.set_function(GLMessage::glBindBufferBase); 7433 7434 // copy argument target 7435 GLMessage_DataType *arg_target = glmsg.add_args(); 7436 arg_target->set_isarray(false); 7437 arg_target->set_type(GLMessage::DataType::ENUM); 7438 arg_target->add_intvalue((int)target); 7439 7440 // copy argument index 7441 GLMessage_DataType *arg_index = glmsg.add_args(); 7442 arg_index->set_isarray(false); 7443 arg_index->set_type(GLMessage::DataType::INT); 7444 arg_index->add_intvalue(index); 7445 7446 // copy argument buffer 7447 GLMessage_DataType *arg_buffer = glmsg.add_args(); 7448 arg_buffer->set_isarray(false); 7449 arg_buffer->set_type(GLMessage::DataType::INT); 7450 arg_buffer->add_intvalue(buffer); 7451 7452 // call function 7453 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7454 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7455 glContext->hooks->gl.glBindBufferBase(target, index, buffer); 7456 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7457 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7458 7459 void *pointerArgs[] = { 7460 }; 7461 7462 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7463 threadStartTime, threadEndTime, 7464 &glmsg, pointerArgs); 7465 glContext->traceGLMessage(&glmsg); 7466 } 7467 7468 void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar *const* varyings, GLenum bufferMode) { 7469 GLMessage glmsg; 7470 GLTraceContext *glContext = getGLTraceContext(); 7471 7472 glmsg.set_function(GLMessage::glTransformFeedbackVaryings); 7473 7474 // copy argument program 7475 GLMessage_DataType *arg_program = glmsg.add_args(); 7476 arg_program->set_isarray(false); 7477 arg_program->set_type(GLMessage::DataType::INT); 7478 arg_program->add_intvalue(program); 7479 7480 // copy argument count 7481 GLMessage_DataType *arg_count = glmsg.add_args(); 7482 arg_count->set_isarray(false); 7483 arg_count->set_type(GLMessage::DataType::INT); 7484 arg_count->add_intvalue(count); 7485 7486 // copy argument varyings 7487 GLMessage_DataType *arg_varyings = glmsg.add_args(); 7488 arg_varyings->set_isarray(false); 7489 arg_varyings->set_type(GLMessage::DataType::INT64); 7490 arg_varyings->add_int64value((uintptr_t)varyings); 7491 7492 // copy argument bufferMode 7493 GLMessage_DataType *arg_bufferMode = glmsg.add_args(); 7494 arg_bufferMode->set_isarray(false); 7495 arg_bufferMode->set_type(GLMessage::DataType::ENUM); 7496 arg_bufferMode->add_intvalue((int)bufferMode); 7497 7498 // call function 7499 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7500 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7501 glContext->hooks->gl.glTransformFeedbackVaryings(program, count, varyings, bufferMode); 7502 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7503 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7504 7505 void *pointerArgs[] = { 7506 (void *) varyings, 7507 }; 7508 7509 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7510 threadStartTime, threadEndTime, 7511 &glmsg, pointerArgs); 7512 glContext->traceGLMessage(&glmsg); 7513 } 7514 7515 void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name) { 7516 GLMessage glmsg; 7517 GLTraceContext *glContext = getGLTraceContext(); 7518 7519 glmsg.set_function(GLMessage::glGetTransformFeedbackVarying); 7520 7521 // copy argument program 7522 GLMessage_DataType *arg_program = glmsg.add_args(); 7523 arg_program->set_isarray(false); 7524 arg_program->set_type(GLMessage::DataType::INT); 7525 arg_program->add_intvalue(program); 7526 7527 // copy argument index 7528 GLMessage_DataType *arg_index = glmsg.add_args(); 7529 arg_index->set_isarray(false); 7530 arg_index->set_type(GLMessage::DataType::INT); 7531 arg_index->add_intvalue(index); 7532 7533 // copy argument bufSize 7534 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 7535 arg_bufSize->set_isarray(false); 7536 arg_bufSize->set_type(GLMessage::DataType::INT); 7537 arg_bufSize->add_intvalue(bufSize); 7538 7539 // copy argument length 7540 GLMessage_DataType *arg_length = glmsg.add_args(); 7541 arg_length->set_isarray(false); 7542 arg_length->set_type(GLMessage::DataType::INT64); 7543 arg_length->add_int64value((uintptr_t)length); 7544 7545 // copy argument size 7546 GLMessage_DataType *arg_size = glmsg.add_args(); 7547 arg_size->set_isarray(false); 7548 arg_size->set_type(GLMessage::DataType::INT64); 7549 arg_size->add_int64value((uintptr_t)size); 7550 7551 // copy argument type 7552 GLMessage_DataType *arg_type = glmsg.add_args(); 7553 arg_type->set_isarray(false); 7554 arg_type->set_type(GLMessage::DataType::INT64); 7555 arg_type->add_int64value((uintptr_t)type); 7556 7557 // copy argument name 7558 GLMessage_DataType *arg_name = glmsg.add_args(); 7559 arg_name->set_isarray(false); 7560 arg_name->set_type(GLMessage::DataType::INT64); 7561 arg_name->add_int64value((uintptr_t)name); 7562 7563 // call function 7564 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7565 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7566 glContext->hooks->gl.glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); 7567 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7568 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7569 7570 void *pointerArgs[] = { 7571 (void *) length, 7572 (void *) size, 7573 (void *) type, 7574 (void *) name, 7575 }; 7576 7577 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7578 threadStartTime, threadEndTime, 7579 &glmsg, pointerArgs); 7580 glContext->traceGLMessage(&glmsg); 7581 } 7582 7583 void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void * pointer) { 7584 GLMessage glmsg; 7585 GLTraceContext *glContext = getGLTraceContext(); 7586 7587 glmsg.set_function(GLMessage::glVertexAttribIPointer); 7588 7589 // copy argument index 7590 GLMessage_DataType *arg_index = glmsg.add_args(); 7591 arg_index->set_isarray(false); 7592 arg_index->set_type(GLMessage::DataType::INT); 7593 arg_index->add_intvalue(index); 7594 7595 // copy argument size 7596 GLMessage_DataType *arg_size = glmsg.add_args(); 7597 arg_size->set_isarray(false); 7598 arg_size->set_type(GLMessage::DataType::INT); 7599 arg_size->add_intvalue(size); 7600 7601 // copy argument type 7602 GLMessage_DataType *arg_type = glmsg.add_args(); 7603 arg_type->set_isarray(false); 7604 arg_type->set_type(GLMessage::DataType::ENUM); 7605 arg_type->add_intvalue((int)type); 7606 7607 // copy argument stride 7608 GLMessage_DataType *arg_stride = glmsg.add_args(); 7609 arg_stride->set_isarray(false); 7610 arg_stride->set_type(GLMessage::DataType::INT); 7611 arg_stride->add_intvalue(stride); 7612 7613 // copy argument pointer 7614 GLMessage_DataType *arg_pointer = glmsg.add_args(); 7615 arg_pointer->set_isarray(false); 7616 arg_pointer->set_type(GLMessage::DataType::INT64); 7617 arg_pointer->add_int64value((uintptr_t)pointer); 7618 7619 // call function 7620 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7621 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7622 glContext->hooks->gl.glVertexAttribIPointer(index, size, type, stride, pointer); 7623 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7624 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7625 7626 void *pointerArgs[] = { 7627 (void *) pointer, 7628 }; 7629 7630 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7631 threadStartTime, threadEndTime, 7632 &glmsg, pointerArgs); 7633 glContext->traceGLMessage(&glmsg); 7634 } 7635 7636 void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint * params) { 7637 GLMessage glmsg; 7638 GLTraceContext *glContext = getGLTraceContext(); 7639 7640 glmsg.set_function(GLMessage::glGetVertexAttribIiv); 7641 7642 // copy argument index 7643 GLMessage_DataType *arg_index = glmsg.add_args(); 7644 arg_index->set_isarray(false); 7645 arg_index->set_type(GLMessage::DataType::INT); 7646 arg_index->add_intvalue(index); 7647 7648 // copy argument pname 7649 GLMessage_DataType *arg_pname = glmsg.add_args(); 7650 arg_pname->set_isarray(false); 7651 arg_pname->set_type(GLMessage::DataType::ENUM); 7652 arg_pname->add_intvalue((int)pname); 7653 7654 // copy argument params 7655 GLMessage_DataType *arg_params = glmsg.add_args(); 7656 arg_params->set_isarray(false); 7657 arg_params->set_type(GLMessage::DataType::INT64); 7658 arg_params->add_int64value((uintptr_t)params); 7659 7660 // call function 7661 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7662 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7663 glContext->hooks->gl.glGetVertexAttribIiv(index, pname, params); 7664 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7665 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7666 7667 void *pointerArgs[] = { 7668 (void *) params, 7669 }; 7670 7671 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7672 threadStartTime, threadEndTime, 7673 &glmsg, pointerArgs); 7674 glContext->traceGLMessage(&glmsg); 7675 } 7676 7677 void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint * params) { 7678 GLMessage glmsg; 7679 GLTraceContext *glContext = getGLTraceContext(); 7680 7681 glmsg.set_function(GLMessage::glGetVertexAttribIuiv); 7682 7683 // copy argument index 7684 GLMessage_DataType *arg_index = glmsg.add_args(); 7685 arg_index->set_isarray(false); 7686 arg_index->set_type(GLMessage::DataType::INT); 7687 arg_index->add_intvalue(index); 7688 7689 // copy argument pname 7690 GLMessage_DataType *arg_pname = glmsg.add_args(); 7691 arg_pname->set_isarray(false); 7692 arg_pname->set_type(GLMessage::DataType::ENUM); 7693 arg_pname->add_intvalue((int)pname); 7694 7695 // copy argument params 7696 GLMessage_DataType *arg_params = glmsg.add_args(); 7697 arg_params->set_isarray(false); 7698 arg_params->set_type(GLMessage::DataType::INT64); 7699 arg_params->add_int64value((uintptr_t)params); 7700 7701 // call function 7702 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7703 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7704 glContext->hooks->gl.glGetVertexAttribIuiv(index, pname, params); 7705 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7706 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7707 7708 void *pointerArgs[] = { 7709 (void *) params, 7710 }; 7711 7712 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7713 threadStartTime, threadEndTime, 7714 &glmsg, pointerArgs); 7715 glContext->traceGLMessage(&glmsg); 7716 } 7717 7718 void GLTrace_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) { 7719 GLMessage glmsg; 7720 GLTraceContext *glContext = getGLTraceContext(); 7721 7722 glmsg.set_function(GLMessage::glVertexAttribI4i); 7723 7724 // copy argument index 7725 GLMessage_DataType *arg_index = glmsg.add_args(); 7726 arg_index->set_isarray(false); 7727 arg_index->set_type(GLMessage::DataType::INT); 7728 arg_index->add_intvalue(index); 7729 7730 // copy argument x 7731 GLMessage_DataType *arg_x = glmsg.add_args(); 7732 arg_x->set_isarray(false); 7733 arg_x->set_type(GLMessage::DataType::INT); 7734 arg_x->add_intvalue(x); 7735 7736 // copy argument y 7737 GLMessage_DataType *arg_y = glmsg.add_args(); 7738 arg_y->set_isarray(false); 7739 arg_y->set_type(GLMessage::DataType::INT); 7740 arg_y->add_intvalue(y); 7741 7742 // copy argument z 7743 GLMessage_DataType *arg_z = glmsg.add_args(); 7744 arg_z->set_isarray(false); 7745 arg_z->set_type(GLMessage::DataType::INT); 7746 arg_z->add_intvalue(z); 7747 7748 // copy argument w 7749 GLMessage_DataType *arg_w = glmsg.add_args(); 7750 arg_w->set_isarray(false); 7751 arg_w->set_type(GLMessage::DataType::INT); 7752 arg_w->add_intvalue(w); 7753 7754 // call function 7755 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7756 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7757 glContext->hooks->gl.glVertexAttribI4i(index, x, y, z, w); 7758 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7759 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7760 7761 void *pointerArgs[] = { 7762 }; 7763 7764 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7765 threadStartTime, threadEndTime, 7766 &glmsg, pointerArgs); 7767 glContext->traceGLMessage(&glmsg); 7768 } 7769 7770 void GLTrace_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { 7771 GLMessage glmsg; 7772 GLTraceContext *glContext = getGLTraceContext(); 7773 7774 glmsg.set_function(GLMessage::glVertexAttribI4ui); 7775 7776 // copy argument index 7777 GLMessage_DataType *arg_index = glmsg.add_args(); 7778 arg_index->set_isarray(false); 7779 arg_index->set_type(GLMessage::DataType::INT); 7780 arg_index->add_intvalue(index); 7781 7782 // copy argument x 7783 GLMessage_DataType *arg_x = glmsg.add_args(); 7784 arg_x->set_isarray(false); 7785 arg_x->set_type(GLMessage::DataType::INT); 7786 arg_x->add_intvalue(x); 7787 7788 // copy argument y 7789 GLMessage_DataType *arg_y = glmsg.add_args(); 7790 arg_y->set_isarray(false); 7791 arg_y->set_type(GLMessage::DataType::INT); 7792 arg_y->add_intvalue(y); 7793 7794 // copy argument z 7795 GLMessage_DataType *arg_z = glmsg.add_args(); 7796 arg_z->set_isarray(false); 7797 arg_z->set_type(GLMessage::DataType::INT); 7798 arg_z->add_intvalue(z); 7799 7800 // copy argument w 7801 GLMessage_DataType *arg_w = glmsg.add_args(); 7802 arg_w->set_isarray(false); 7803 arg_w->set_type(GLMessage::DataType::INT); 7804 arg_w->add_intvalue(w); 7805 7806 // call function 7807 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7808 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7809 glContext->hooks->gl.glVertexAttribI4ui(index, x, y, z, w); 7810 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7811 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7812 7813 void *pointerArgs[] = { 7814 }; 7815 7816 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7817 threadStartTime, threadEndTime, 7818 &glmsg, pointerArgs); 7819 glContext->traceGLMessage(&glmsg); 7820 } 7821 7822 void GLTrace_glVertexAttribI4iv(GLuint index, const GLint * v) { 7823 GLMessage glmsg; 7824 GLTraceContext *glContext = getGLTraceContext(); 7825 7826 glmsg.set_function(GLMessage::glVertexAttribI4iv); 7827 7828 // copy argument index 7829 GLMessage_DataType *arg_index = glmsg.add_args(); 7830 arg_index->set_isarray(false); 7831 arg_index->set_type(GLMessage::DataType::INT); 7832 arg_index->add_intvalue(index); 7833 7834 // copy argument v 7835 GLMessage_DataType *arg_v = glmsg.add_args(); 7836 arg_v->set_isarray(false); 7837 arg_v->set_type(GLMessage::DataType::INT64); 7838 arg_v->add_int64value((uintptr_t)v); 7839 7840 // call function 7841 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7842 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7843 glContext->hooks->gl.glVertexAttribI4iv(index, v); 7844 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7845 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7846 7847 void *pointerArgs[] = { 7848 (void *) v, 7849 }; 7850 7851 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7852 threadStartTime, threadEndTime, 7853 &glmsg, pointerArgs); 7854 glContext->traceGLMessage(&glmsg); 7855 } 7856 7857 void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint * v) { 7858 GLMessage glmsg; 7859 GLTraceContext *glContext = getGLTraceContext(); 7860 7861 glmsg.set_function(GLMessage::glVertexAttribI4uiv); 7862 7863 // copy argument index 7864 GLMessage_DataType *arg_index = glmsg.add_args(); 7865 arg_index->set_isarray(false); 7866 arg_index->set_type(GLMessage::DataType::INT); 7867 arg_index->add_intvalue(index); 7868 7869 // copy argument v 7870 GLMessage_DataType *arg_v = glmsg.add_args(); 7871 arg_v->set_isarray(false); 7872 arg_v->set_type(GLMessage::DataType::INT64); 7873 arg_v->add_int64value((uintptr_t)v); 7874 7875 // call function 7876 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7877 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7878 glContext->hooks->gl.glVertexAttribI4uiv(index, v); 7879 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7880 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7881 7882 void *pointerArgs[] = { 7883 (void *) v, 7884 }; 7885 7886 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7887 threadStartTime, threadEndTime, 7888 &glmsg, pointerArgs); 7889 glContext->traceGLMessage(&glmsg); 7890 } 7891 7892 void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint * params) { 7893 GLMessage glmsg; 7894 GLTraceContext *glContext = getGLTraceContext(); 7895 7896 glmsg.set_function(GLMessage::glGetUniformuiv); 7897 7898 // copy argument program 7899 GLMessage_DataType *arg_program = glmsg.add_args(); 7900 arg_program->set_isarray(false); 7901 arg_program->set_type(GLMessage::DataType::INT); 7902 arg_program->add_intvalue(program); 7903 7904 // copy argument location 7905 GLMessage_DataType *arg_location = glmsg.add_args(); 7906 arg_location->set_isarray(false); 7907 arg_location->set_type(GLMessage::DataType::INT); 7908 arg_location->add_intvalue(location); 7909 7910 // copy argument params 7911 GLMessage_DataType *arg_params = glmsg.add_args(); 7912 arg_params->set_isarray(false); 7913 arg_params->set_type(GLMessage::DataType::INT64); 7914 arg_params->add_int64value((uintptr_t)params); 7915 7916 // call function 7917 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7918 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7919 glContext->hooks->gl.glGetUniformuiv(program, location, params); 7920 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7921 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7922 7923 void *pointerArgs[] = { 7924 (void *) params, 7925 }; 7926 7927 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7928 threadStartTime, threadEndTime, 7929 &glmsg, pointerArgs); 7930 glContext->traceGLMessage(&glmsg); 7931 } 7932 7933 GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar * name) { 7934 GLMessage glmsg; 7935 GLTraceContext *glContext = getGLTraceContext(); 7936 7937 glmsg.set_function(GLMessage::glGetFragDataLocation); 7938 7939 // copy argument program 7940 GLMessage_DataType *arg_program = glmsg.add_args(); 7941 arg_program->set_isarray(false); 7942 arg_program->set_type(GLMessage::DataType::INT); 7943 arg_program->add_intvalue(program); 7944 7945 // copy argument name 7946 GLMessage_DataType *arg_name = glmsg.add_args(); 7947 arg_name->set_isarray(false); 7948 arg_name->set_type(GLMessage::DataType::INT64); 7949 arg_name->add_int64value((uintptr_t)name); 7950 7951 // call function 7952 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7953 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7954 GLint retValue = glContext->hooks->gl.glGetFragDataLocation(program, name); 7955 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7956 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 7957 7958 // set return value 7959 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 7960 rt->set_isarray(false); 7961 rt->set_type(GLMessage::DataType::INT); 7962 rt->add_intvalue(retValue); 7963 7964 void *pointerArgs[] = { 7965 (void *) name, 7966 }; 7967 7968 fixupGLMessage(glContext, wallStartTime, wallEndTime, 7969 threadStartTime, threadEndTime, 7970 &glmsg, pointerArgs); 7971 glContext->traceGLMessage(&glmsg); 7972 7973 return retValue; 7974 } 7975 7976 void GLTrace_glUniform1ui(GLint location, GLuint v0) { 7977 GLMessage glmsg; 7978 GLTraceContext *glContext = getGLTraceContext(); 7979 7980 glmsg.set_function(GLMessage::glUniform1ui); 7981 7982 // copy argument location 7983 GLMessage_DataType *arg_location = glmsg.add_args(); 7984 arg_location->set_isarray(false); 7985 arg_location->set_type(GLMessage::DataType::INT); 7986 arg_location->add_intvalue(location); 7987 7988 // copy argument v0 7989 GLMessage_DataType *arg_v0 = glmsg.add_args(); 7990 arg_v0->set_isarray(false); 7991 arg_v0->set_type(GLMessage::DataType::INT); 7992 arg_v0->add_intvalue(v0); 7993 7994 // call function 7995 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 7996 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 7997 glContext->hooks->gl.glUniform1ui(location, v0); 7998 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 7999 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8000 8001 void *pointerArgs[] = { 8002 }; 8003 8004 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8005 threadStartTime, threadEndTime, 8006 &glmsg, pointerArgs); 8007 glContext->traceGLMessage(&glmsg); 8008 } 8009 8010 void GLTrace_glUniform2ui(GLint location, GLuint v0, GLuint v1) { 8011 GLMessage glmsg; 8012 GLTraceContext *glContext = getGLTraceContext(); 8013 8014 glmsg.set_function(GLMessage::glUniform2ui); 8015 8016 // copy argument location 8017 GLMessage_DataType *arg_location = glmsg.add_args(); 8018 arg_location->set_isarray(false); 8019 arg_location->set_type(GLMessage::DataType::INT); 8020 arg_location->add_intvalue(location); 8021 8022 // copy argument v0 8023 GLMessage_DataType *arg_v0 = glmsg.add_args(); 8024 arg_v0->set_isarray(false); 8025 arg_v0->set_type(GLMessage::DataType::INT); 8026 arg_v0->add_intvalue(v0); 8027 8028 // copy argument v1 8029 GLMessage_DataType *arg_v1 = glmsg.add_args(); 8030 arg_v1->set_isarray(false); 8031 arg_v1->set_type(GLMessage::DataType::INT); 8032 arg_v1->add_intvalue(v1); 8033 8034 // call function 8035 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8036 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8037 glContext->hooks->gl.glUniform2ui(location, v0, v1); 8038 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8039 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8040 8041 void *pointerArgs[] = { 8042 }; 8043 8044 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8045 threadStartTime, threadEndTime, 8046 &glmsg, pointerArgs); 8047 glContext->traceGLMessage(&glmsg); 8048 } 8049 8050 void GLTrace_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) { 8051 GLMessage glmsg; 8052 GLTraceContext *glContext = getGLTraceContext(); 8053 8054 glmsg.set_function(GLMessage::glUniform3ui); 8055 8056 // copy argument location 8057 GLMessage_DataType *arg_location = glmsg.add_args(); 8058 arg_location->set_isarray(false); 8059 arg_location->set_type(GLMessage::DataType::INT); 8060 arg_location->add_intvalue(location); 8061 8062 // copy argument v0 8063 GLMessage_DataType *arg_v0 = glmsg.add_args(); 8064 arg_v0->set_isarray(false); 8065 arg_v0->set_type(GLMessage::DataType::INT); 8066 arg_v0->add_intvalue(v0); 8067 8068 // copy argument v1 8069 GLMessage_DataType *arg_v1 = glmsg.add_args(); 8070 arg_v1->set_isarray(false); 8071 arg_v1->set_type(GLMessage::DataType::INT); 8072 arg_v1->add_intvalue(v1); 8073 8074 // copy argument v2 8075 GLMessage_DataType *arg_v2 = glmsg.add_args(); 8076 arg_v2->set_isarray(false); 8077 arg_v2->set_type(GLMessage::DataType::INT); 8078 arg_v2->add_intvalue(v2); 8079 8080 // call function 8081 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8082 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8083 glContext->hooks->gl.glUniform3ui(location, v0, v1, v2); 8084 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8085 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8086 8087 void *pointerArgs[] = { 8088 }; 8089 8090 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8091 threadStartTime, threadEndTime, 8092 &glmsg, pointerArgs); 8093 glContext->traceGLMessage(&glmsg); 8094 } 8095 8096 void GLTrace_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { 8097 GLMessage glmsg; 8098 GLTraceContext *glContext = getGLTraceContext(); 8099 8100 glmsg.set_function(GLMessage::glUniform4ui); 8101 8102 // copy argument location 8103 GLMessage_DataType *arg_location = glmsg.add_args(); 8104 arg_location->set_isarray(false); 8105 arg_location->set_type(GLMessage::DataType::INT); 8106 arg_location->add_intvalue(location); 8107 8108 // copy argument v0 8109 GLMessage_DataType *arg_v0 = glmsg.add_args(); 8110 arg_v0->set_isarray(false); 8111 arg_v0->set_type(GLMessage::DataType::INT); 8112 arg_v0->add_intvalue(v0); 8113 8114 // copy argument v1 8115 GLMessage_DataType *arg_v1 = glmsg.add_args(); 8116 arg_v1->set_isarray(false); 8117 arg_v1->set_type(GLMessage::DataType::INT); 8118 arg_v1->add_intvalue(v1); 8119 8120 // copy argument v2 8121 GLMessage_DataType *arg_v2 = glmsg.add_args(); 8122 arg_v2->set_isarray(false); 8123 arg_v2->set_type(GLMessage::DataType::INT); 8124 arg_v2->add_intvalue(v2); 8125 8126 // copy argument v3 8127 GLMessage_DataType *arg_v3 = glmsg.add_args(); 8128 arg_v3->set_isarray(false); 8129 arg_v3->set_type(GLMessage::DataType::INT); 8130 arg_v3->add_intvalue(v3); 8131 8132 // call function 8133 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8134 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8135 glContext->hooks->gl.glUniform4ui(location, v0, v1, v2, v3); 8136 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8137 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8138 8139 void *pointerArgs[] = { 8140 }; 8141 8142 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8143 threadStartTime, threadEndTime, 8144 &glmsg, pointerArgs); 8145 glContext->traceGLMessage(&glmsg); 8146 } 8147 8148 void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint * value) { 8149 GLMessage glmsg; 8150 GLTraceContext *glContext = getGLTraceContext(); 8151 8152 glmsg.set_function(GLMessage::glUniform1uiv); 8153 8154 // copy argument location 8155 GLMessage_DataType *arg_location = glmsg.add_args(); 8156 arg_location->set_isarray(false); 8157 arg_location->set_type(GLMessage::DataType::INT); 8158 arg_location->add_intvalue(location); 8159 8160 // copy argument count 8161 GLMessage_DataType *arg_count = glmsg.add_args(); 8162 arg_count->set_isarray(false); 8163 arg_count->set_type(GLMessage::DataType::INT); 8164 arg_count->add_intvalue(count); 8165 8166 // copy argument value 8167 GLMessage_DataType *arg_value = glmsg.add_args(); 8168 arg_value->set_isarray(false); 8169 arg_value->set_type(GLMessage::DataType::INT64); 8170 arg_value->add_int64value((uintptr_t)value); 8171 8172 // call function 8173 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8174 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8175 glContext->hooks->gl.glUniform1uiv(location, count, value); 8176 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8177 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8178 8179 void *pointerArgs[] = { 8180 (void *) value, 8181 }; 8182 8183 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8184 threadStartTime, threadEndTime, 8185 &glmsg, pointerArgs); 8186 glContext->traceGLMessage(&glmsg); 8187 } 8188 8189 void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint * value) { 8190 GLMessage glmsg; 8191 GLTraceContext *glContext = getGLTraceContext(); 8192 8193 glmsg.set_function(GLMessage::glUniform2uiv); 8194 8195 // copy argument location 8196 GLMessage_DataType *arg_location = glmsg.add_args(); 8197 arg_location->set_isarray(false); 8198 arg_location->set_type(GLMessage::DataType::INT); 8199 arg_location->add_intvalue(location); 8200 8201 // copy argument count 8202 GLMessage_DataType *arg_count = glmsg.add_args(); 8203 arg_count->set_isarray(false); 8204 arg_count->set_type(GLMessage::DataType::INT); 8205 arg_count->add_intvalue(count); 8206 8207 // copy argument value 8208 GLMessage_DataType *arg_value = glmsg.add_args(); 8209 arg_value->set_isarray(false); 8210 arg_value->set_type(GLMessage::DataType::INT64); 8211 arg_value->add_int64value((uintptr_t)value); 8212 8213 // call function 8214 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8215 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8216 glContext->hooks->gl.glUniform2uiv(location, count, value); 8217 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8218 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8219 8220 void *pointerArgs[] = { 8221 (void *) value, 8222 }; 8223 8224 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8225 threadStartTime, threadEndTime, 8226 &glmsg, pointerArgs); 8227 glContext->traceGLMessage(&glmsg); 8228 } 8229 8230 void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint * value) { 8231 GLMessage glmsg; 8232 GLTraceContext *glContext = getGLTraceContext(); 8233 8234 glmsg.set_function(GLMessage::glUniform3uiv); 8235 8236 // copy argument location 8237 GLMessage_DataType *arg_location = glmsg.add_args(); 8238 arg_location->set_isarray(false); 8239 arg_location->set_type(GLMessage::DataType::INT); 8240 arg_location->add_intvalue(location); 8241 8242 // copy argument count 8243 GLMessage_DataType *arg_count = glmsg.add_args(); 8244 arg_count->set_isarray(false); 8245 arg_count->set_type(GLMessage::DataType::INT); 8246 arg_count->add_intvalue(count); 8247 8248 // copy argument value 8249 GLMessage_DataType *arg_value = glmsg.add_args(); 8250 arg_value->set_isarray(false); 8251 arg_value->set_type(GLMessage::DataType::INT64); 8252 arg_value->add_int64value((uintptr_t)value); 8253 8254 // call function 8255 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8256 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8257 glContext->hooks->gl.glUniform3uiv(location, count, value); 8258 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8259 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8260 8261 void *pointerArgs[] = { 8262 (void *) value, 8263 }; 8264 8265 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8266 threadStartTime, threadEndTime, 8267 &glmsg, pointerArgs); 8268 glContext->traceGLMessage(&glmsg); 8269 } 8270 8271 void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint * value) { 8272 GLMessage glmsg; 8273 GLTraceContext *glContext = getGLTraceContext(); 8274 8275 glmsg.set_function(GLMessage::glUniform4uiv); 8276 8277 // copy argument location 8278 GLMessage_DataType *arg_location = glmsg.add_args(); 8279 arg_location->set_isarray(false); 8280 arg_location->set_type(GLMessage::DataType::INT); 8281 arg_location->add_intvalue(location); 8282 8283 // copy argument count 8284 GLMessage_DataType *arg_count = glmsg.add_args(); 8285 arg_count->set_isarray(false); 8286 arg_count->set_type(GLMessage::DataType::INT); 8287 arg_count->add_intvalue(count); 8288 8289 // copy argument value 8290 GLMessage_DataType *arg_value = glmsg.add_args(); 8291 arg_value->set_isarray(false); 8292 arg_value->set_type(GLMessage::DataType::INT64); 8293 arg_value->add_int64value((uintptr_t)value); 8294 8295 // call function 8296 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8297 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8298 glContext->hooks->gl.glUniform4uiv(location, count, value); 8299 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8300 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8301 8302 void *pointerArgs[] = { 8303 (void *) value, 8304 }; 8305 8306 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8307 threadStartTime, threadEndTime, 8308 &glmsg, pointerArgs); 8309 glContext->traceGLMessage(&glmsg); 8310 } 8311 8312 void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint * value) { 8313 GLMessage glmsg; 8314 GLTraceContext *glContext = getGLTraceContext(); 8315 8316 glmsg.set_function(GLMessage::glClearBufferiv); 8317 8318 // copy argument buffer 8319 GLMessage_DataType *arg_buffer = glmsg.add_args(); 8320 arg_buffer->set_isarray(false); 8321 arg_buffer->set_type(GLMessage::DataType::ENUM); 8322 arg_buffer->add_intvalue((int)buffer); 8323 8324 // copy argument drawbuffer 8325 GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); 8326 arg_drawbuffer->set_isarray(false); 8327 arg_drawbuffer->set_type(GLMessage::DataType::INT); 8328 arg_drawbuffer->add_intvalue(drawbuffer); 8329 8330 // copy argument value 8331 GLMessage_DataType *arg_value = glmsg.add_args(); 8332 arg_value->set_isarray(false); 8333 arg_value->set_type(GLMessage::DataType::INT64); 8334 arg_value->add_int64value((uintptr_t)value); 8335 8336 // call function 8337 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8338 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8339 glContext->hooks->gl.glClearBufferiv(buffer, drawbuffer, value); 8340 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8341 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8342 8343 void *pointerArgs[] = { 8344 (void *) value, 8345 }; 8346 8347 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8348 threadStartTime, threadEndTime, 8349 &glmsg, pointerArgs); 8350 glContext->traceGLMessage(&glmsg); 8351 } 8352 8353 void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint * value) { 8354 GLMessage glmsg; 8355 GLTraceContext *glContext = getGLTraceContext(); 8356 8357 glmsg.set_function(GLMessage::glClearBufferuiv); 8358 8359 // copy argument buffer 8360 GLMessage_DataType *arg_buffer = glmsg.add_args(); 8361 arg_buffer->set_isarray(false); 8362 arg_buffer->set_type(GLMessage::DataType::ENUM); 8363 arg_buffer->add_intvalue((int)buffer); 8364 8365 // copy argument drawbuffer 8366 GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); 8367 arg_drawbuffer->set_isarray(false); 8368 arg_drawbuffer->set_type(GLMessage::DataType::INT); 8369 arg_drawbuffer->add_intvalue(drawbuffer); 8370 8371 // copy argument value 8372 GLMessage_DataType *arg_value = glmsg.add_args(); 8373 arg_value->set_isarray(false); 8374 arg_value->set_type(GLMessage::DataType::INT64); 8375 arg_value->add_int64value((uintptr_t)value); 8376 8377 // call function 8378 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8379 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8380 glContext->hooks->gl.glClearBufferuiv(buffer, drawbuffer, value); 8381 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8382 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8383 8384 void *pointerArgs[] = { 8385 (void *) value, 8386 }; 8387 8388 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8389 threadStartTime, threadEndTime, 8390 &glmsg, pointerArgs); 8391 glContext->traceGLMessage(&glmsg); 8392 } 8393 8394 void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat * value) { 8395 GLMessage glmsg; 8396 GLTraceContext *glContext = getGLTraceContext(); 8397 8398 glmsg.set_function(GLMessage::glClearBufferfv); 8399 8400 // copy argument buffer 8401 GLMessage_DataType *arg_buffer = glmsg.add_args(); 8402 arg_buffer->set_isarray(false); 8403 arg_buffer->set_type(GLMessage::DataType::ENUM); 8404 arg_buffer->add_intvalue((int)buffer); 8405 8406 // copy argument drawbuffer 8407 GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); 8408 arg_drawbuffer->set_isarray(false); 8409 arg_drawbuffer->set_type(GLMessage::DataType::INT); 8410 arg_drawbuffer->add_intvalue(drawbuffer); 8411 8412 // copy argument value 8413 GLMessage_DataType *arg_value = glmsg.add_args(); 8414 arg_value->set_isarray(false); 8415 arg_value->set_type(GLMessage::DataType::INT64); 8416 arg_value->add_int64value((uintptr_t)value); 8417 8418 // call function 8419 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8420 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8421 glContext->hooks->gl.glClearBufferfv(buffer, drawbuffer, value); 8422 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8423 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8424 8425 void *pointerArgs[] = { 8426 (void *) value, 8427 }; 8428 8429 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8430 threadStartTime, threadEndTime, 8431 &glmsg, pointerArgs); 8432 glContext->traceGLMessage(&glmsg); 8433 } 8434 8435 void GLTrace_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { 8436 GLMessage glmsg; 8437 GLTraceContext *glContext = getGLTraceContext(); 8438 8439 glmsg.set_function(GLMessage::glClearBufferfi); 8440 8441 // copy argument buffer 8442 GLMessage_DataType *arg_buffer = glmsg.add_args(); 8443 arg_buffer->set_isarray(false); 8444 arg_buffer->set_type(GLMessage::DataType::ENUM); 8445 arg_buffer->add_intvalue((int)buffer); 8446 8447 // copy argument drawbuffer 8448 GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); 8449 arg_drawbuffer->set_isarray(false); 8450 arg_drawbuffer->set_type(GLMessage::DataType::INT); 8451 arg_drawbuffer->add_intvalue(drawbuffer); 8452 8453 // copy argument depth 8454 GLMessage_DataType *arg_depth = glmsg.add_args(); 8455 arg_depth->set_isarray(false); 8456 arg_depth->set_type(GLMessage::DataType::FLOAT); 8457 arg_depth->add_floatvalue(depth); 8458 8459 // copy argument stencil 8460 GLMessage_DataType *arg_stencil = glmsg.add_args(); 8461 arg_stencil->set_isarray(false); 8462 arg_stencil->set_type(GLMessage::DataType::INT); 8463 arg_stencil->add_intvalue(stencil); 8464 8465 // call function 8466 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8467 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8468 glContext->hooks->gl.glClearBufferfi(buffer, drawbuffer, depth, stencil); 8469 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8470 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8471 8472 void *pointerArgs[] = { 8473 }; 8474 8475 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8476 threadStartTime, threadEndTime, 8477 &glmsg, pointerArgs); 8478 glContext->traceGLMessage(&glmsg); 8479 } 8480 8481 const GLubyte * GLTrace_glGetStringi(GLenum name, GLuint index) { 8482 GLMessage glmsg; 8483 GLTraceContext *glContext = getGLTraceContext(); 8484 8485 glmsg.set_function(GLMessage::glGetStringi); 8486 8487 // copy argument name 8488 GLMessage_DataType *arg_name = glmsg.add_args(); 8489 arg_name->set_isarray(false); 8490 arg_name->set_type(GLMessage::DataType::ENUM); 8491 arg_name->add_intvalue((int)name); 8492 8493 // copy argument index 8494 GLMessage_DataType *arg_index = glmsg.add_args(); 8495 arg_index->set_isarray(false); 8496 arg_index->set_type(GLMessage::DataType::INT); 8497 arg_index->add_intvalue(index); 8498 8499 // call function 8500 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8501 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8502 const GLubyte * retValue = glContext->hooks->gl.glGetStringi(name, index); 8503 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8504 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8505 8506 // set return value 8507 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 8508 rt->set_isarray(false); 8509 rt->set_type(GLMessage::DataType::INT64); 8510 rt->add_int64value((uintptr_t)retValue); 8511 8512 void *pointerArgs[] = { 8513 (void *) retValue, 8514 }; 8515 8516 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8517 threadStartTime, threadEndTime, 8518 &glmsg, pointerArgs); 8519 glContext->traceGLMessage(&glmsg); 8520 8521 return retValue; 8522 } 8523 8524 void GLTrace_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { 8525 GLMessage glmsg; 8526 GLTraceContext *glContext = getGLTraceContext(); 8527 8528 glmsg.set_function(GLMessage::glCopyBufferSubData); 8529 8530 // copy argument readTarget 8531 GLMessage_DataType *arg_readTarget = glmsg.add_args(); 8532 arg_readTarget->set_isarray(false); 8533 arg_readTarget->set_type(GLMessage::DataType::ENUM); 8534 arg_readTarget->add_intvalue((int)readTarget); 8535 8536 // copy argument writeTarget 8537 GLMessage_DataType *arg_writeTarget = glmsg.add_args(); 8538 arg_writeTarget->set_isarray(false); 8539 arg_writeTarget->set_type(GLMessage::DataType::ENUM); 8540 arg_writeTarget->add_intvalue((int)writeTarget); 8541 8542 // copy argument readOffset 8543 GLMessage_DataType *arg_readOffset = glmsg.add_args(); 8544 arg_readOffset->set_isarray(false); 8545 arg_readOffset->set_type(GLMessage::DataType::INT); 8546 arg_readOffset->add_intvalue(readOffset); 8547 8548 // copy argument writeOffset 8549 GLMessage_DataType *arg_writeOffset = glmsg.add_args(); 8550 arg_writeOffset->set_isarray(false); 8551 arg_writeOffset->set_type(GLMessage::DataType::INT); 8552 arg_writeOffset->add_intvalue(writeOffset); 8553 8554 // copy argument size 8555 GLMessage_DataType *arg_size = glmsg.add_args(); 8556 arg_size->set_isarray(false); 8557 arg_size->set_type(GLMessage::DataType::INT); 8558 arg_size->add_intvalue(size); 8559 8560 // call function 8561 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8562 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8563 glContext->hooks->gl.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); 8564 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8565 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8566 8567 void *pointerArgs[] = { 8568 }; 8569 8570 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8571 threadStartTime, threadEndTime, 8572 &glmsg, pointerArgs); 8573 glContext->traceGLMessage(&glmsg); 8574 } 8575 8576 void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar *const* uniformNames, GLuint * uniformIndices) { 8577 GLMessage glmsg; 8578 GLTraceContext *glContext = getGLTraceContext(); 8579 8580 glmsg.set_function(GLMessage::glGetUniformIndices); 8581 8582 // copy argument program 8583 GLMessage_DataType *arg_program = glmsg.add_args(); 8584 arg_program->set_isarray(false); 8585 arg_program->set_type(GLMessage::DataType::INT); 8586 arg_program->add_intvalue(program); 8587 8588 // copy argument uniformCount 8589 GLMessage_DataType *arg_uniformCount = glmsg.add_args(); 8590 arg_uniformCount->set_isarray(false); 8591 arg_uniformCount->set_type(GLMessage::DataType::INT); 8592 arg_uniformCount->add_intvalue(uniformCount); 8593 8594 // copy argument uniformNames 8595 GLMessage_DataType *arg_uniformNames = glmsg.add_args(); 8596 arg_uniformNames->set_isarray(false); 8597 arg_uniformNames->set_type(GLMessage::DataType::INT64); 8598 arg_uniformNames->add_int64value((uintptr_t)uniformNames); 8599 8600 // copy argument uniformIndices 8601 GLMessage_DataType *arg_uniformIndices = glmsg.add_args(); 8602 arg_uniformIndices->set_isarray(false); 8603 arg_uniformIndices->set_type(GLMessage::DataType::INT64); 8604 arg_uniformIndices->add_int64value((uintptr_t)uniformIndices); 8605 8606 // call function 8607 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8608 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8609 glContext->hooks->gl.glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); 8610 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8611 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8612 8613 void *pointerArgs[] = { 8614 (void *) uniformNames, 8615 (void *) uniformIndices, 8616 }; 8617 8618 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8619 threadStartTime, threadEndTime, 8620 &glmsg, pointerArgs); 8621 glContext->traceGLMessage(&glmsg); 8622 } 8623 8624 void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params) { 8625 GLMessage glmsg; 8626 GLTraceContext *glContext = getGLTraceContext(); 8627 8628 glmsg.set_function(GLMessage::glGetActiveUniformsiv); 8629 8630 // copy argument program 8631 GLMessage_DataType *arg_program = glmsg.add_args(); 8632 arg_program->set_isarray(false); 8633 arg_program->set_type(GLMessage::DataType::INT); 8634 arg_program->add_intvalue(program); 8635 8636 // copy argument uniformCount 8637 GLMessage_DataType *arg_uniformCount = glmsg.add_args(); 8638 arg_uniformCount->set_isarray(false); 8639 arg_uniformCount->set_type(GLMessage::DataType::INT); 8640 arg_uniformCount->add_intvalue(uniformCount); 8641 8642 // copy argument uniformIndices 8643 GLMessage_DataType *arg_uniformIndices = glmsg.add_args(); 8644 arg_uniformIndices->set_isarray(false); 8645 arg_uniformIndices->set_type(GLMessage::DataType::INT64); 8646 arg_uniformIndices->add_int64value((uintptr_t)uniformIndices); 8647 8648 // copy argument pname 8649 GLMessage_DataType *arg_pname = glmsg.add_args(); 8650 arg_pname->set_isarray(false); 8651 arg_pname->set_type(GLMessage::DataType::ENUM); 8652 arg_pname->add_intvalue((int)pname); 8653 8654 // copy argument params 8655 GLMessage_DataType *arg_params = glmsg.add_args(); 8656 arg_params->set_isarray(false); 8657 arg_params->set_type(GLMessage::DataType::INT64); 8658 arg_params->add_int64value((uintptr_t)params); 8659 8660 // call function 8661 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8662 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8663 glContext->hooks->gl.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); 8664 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8665 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8666 8667 void *pointerArgs[] = { 8668 (void *) uniformIndices, 8669 (void *) params, 8670 }; 8671 8672 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8673 threadStartTime, threadEndTime, 8674 &glmsg, pointerArgs); 8675 glContext->traceGLMessage(&glmsg); 8676 } 8677 8678 GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar * uniformBlockName) { 8679 GLMessage glmsg; 8680 GLTraceContext *glContext = getGLTraceContext(); 8681 8682 glmsg.set_function(GLMessage::glGetUniformBlockIndex); 8683 8684 // copy argument program 8685 GLMessage_DataType *arg_program = glmsg.add_args(); 8686 arg_program->set_isarray(false); 8687 arg_program->set_type(GLMessage::DataType::INT); 8688 arg_program->add_intvalue(program); 8689 8690 // copy argument uniformBlockName 8691 GLMessage_DataType *arg_uniformBlockName = glmsg.add_args(); 8692 arg_uniformBlockName->set_isarray(false); 8693 arg_uniformBlockName->set_type(GLMessage::DataType::INT64); 8694 arg_uniformBlockName->add_int64value((uintptr_t)uniformBlockName); 8695 8696 // call function 8697 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8698 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8699 GLuint retValue = glContext->hooks->gl.glGetUniformBlockIndex(program, uniformBlockName); 8700 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8701 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8702 8703 // set return value 8704 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 8705 rt->set_isarray(false); 8706 rt->set_type(GLMessage::DataType::INT); 8707 rt->add_intvalue(retValue); 8708 8709 void *pointerArgs[] = { 8710 (void *) uniformBlockName, 8711 }; 8712 8713 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8714 threadStartTime, threadEndTime, 8715 &glmsg, pointerArgs); 8716 glContext->traceGLMessage(&glmsg); 8717 8718 return retValue; 8719 } 8720 8721 void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params) { 8722 GLMessage glmsg; 8723 GLTraceContext *glContext = getGLTraceContext(); 8724 8725 glmsg.set_function(GLMessage::glGetActiveUniformBlockiv); 8726 8727 // copy argument program 8728 GLMessage_DataType *arg_program = glmsg.add_args(); 8729 arg_program->set_isarray(false); 8730 arg_program->set_type(GLMessage::DataType::INT); 8731 arg_program->add_intvalue(program); 8732 8733 // copy argument uniformBlockIndex 8734 GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args(); 8735 arg_uniformBlockIndex->set_isarray(false); 8736 arg_uniformBlockIndex->set_type(GLMessage::DataType::INT); 8737 arg_uniformBlockIndex->add_intvalue(uniformBlockIndex); 8738 8739 // copy argument pname 8740 GLMessage_DataType *arg_pname = glmsg.add_args(); 8741 arg_pname->set_isarray(false); 8742 arg_pname->set_type(GLMessage::DataType::ENUM); 8743 arg_pname->add_intvalue((int)pname); 8744 8745 // copy argument params 8746 GLMessage_DataType *arg_params = glmsg.add_args(); 8747 arg_params->set_isarray(false); 8748 arg_params->set_type(GLMessage::DataType::INT64); 8749 arg_params->add_int64value((uintptr_t)params); 8750 8751 // call function 8752 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8753 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8754 glContext->hooks->gl.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); 8755 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8756 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8757 8758 void *pointerArgs[] = { 8759 (void *) params, 8760 }; 8761 8762 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8763 threadStartTime, threadEndTime, 8764 &glmsg, pointerArgs); 8765 glContext->traceGLMessage(&glmsg); 8766 } 8767 8768 void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName) { 8769 GLMessage glmsg; 8770 GLTraceContext *glContext = getGLTraceContext(); 8771 8772 glmsg.set_function(GLMessage::glGetActiveUniformBlockName); 8773 8774 // copy argument program 8775 GLMessage_DataType *arg_program = glmsg.add_args(); 8776 arg_program->set_isarray(false); 8777 arg_program->set_type(GLMessage::DataType::INT); 8778 arg_program->add_intvalue(program); 8779 8780 // copy argument uniformBlockIndex 8781 GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args(); 8782 arg_uniformBlockIndex->set_isarray(false); 8783 arg_uniformBlockIndex->set_type(GLMessage::DataType::INT); 8784 arg_uniformBlockIndex->add_intvalue(uniformBlockIndex); 8785 8786 // copy argument bufSize 8787 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 8788 arg_bufSize->set_isarray(false); 8789 arg_bufSize->set_type(GLMessage::DataType::INT); 8790 arg_bufSize->add_intvalue(bufSize); 8791 8792 // copy argument length 8793 GLMessage_DataType *arg_length = glmsg.add_args(); 8794 arg_length->set_isarray(false); 8795 arg_length->set_type(GLMessage::DataType::INT64); 8796 arg_length->add_int64value((uintptr_t)length); 8797 8798 // copy argument uniformBlockName 8799 GLMessage_DataType *arg_uniformBlockName = glmsg.add_args(); 8800 arg_uniformBlockName->set_isarray(false); 8801 arg_uniformBlockName->set_type(GLMessage::DataType::INT64); 8802 arg_uniformBlockName->add_int64value((uintptr_t)uniformBlockName); 8803 8804 // call function 8805 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8806 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8807 glContext->hooks->gl.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); 8808 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8809 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8810 8811 void *pointerArgs[] = { 8812 (void *) length, 8813 (void *) uniformBlockName, 8814 }; 8815 8816 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8817 threadStartTime, threadEndTime, 8818 &glmsg, pointerArgs); 8819 glContext->traceGLMessage(&glmsg); 8820 } 8821 8822 void GLTrace_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { 8823 GLMessage glmsg; 8824 GLTraceContext *glContext = getGLTraceContext(); 8825 8826 glmsg.set_function(GLMessage::glUniformBlockBinding); 8827 8828 // copy argument program 8829 GLMessage_DataType *arg_program = glmsg.add_args(); 8830 arg_program->set_isarray(false); 8831 arg_program->set_type(GLMessage::DataType::INT); 8832 arg_program->add_intvalue(program); 8833 8834 // copy argument uniformBlockIndex 8835 GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args(); 8836 arg_uniformBlockIndex->set_isarray(false); 8837 arg_uniformBlockIndex->set_type(GLMessage::DataType::INT); 8838 arg_uniformBlockIndex->add_intvalue(uniformBlockIndex); 8839 8840 // copy argument uniformBlockBinding 8841 GLMessage_DataType *arg_uniformBlockBinding = glmsg.add_args(); 8842 arg_uniformBlockBinding->set_isarray(false); 8843 arg_uniformBlockBinding->set_type(GLMessage::DataType::INT); 8844 arg_uniformBlockBinding->add_intvalue(uniformBlockBinding); 8845 8846 // call function 8847 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8848 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8849 glContext->hooks->gl.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); 8850 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8851 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8852 8853 void *pointerArgs[] = { 8854 }; 8855 8856 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8857 threadStartTime, threadEndTime, 8858 &glmsg, pointerArgs); 8859 glContext->traceGLMessage(&glmsg); 8860 } 8861 8862 void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instancecount) { 8863 GLMessage glmsg; 8864 GLTraceContext *glContext = getGLTraceContext(); 8865 8866 glmsg.set_function(GLMessage::glDrawArraysInstanced); 8867 8868 // copy argument mode 8869 GLMessage_DataType *arg_mode = glmsg.add_args(); 8870 arg_mode->set_isarray(false); 8871 arg_mode->set_type(GLMessage::DataType::ENUM); 8872 arg_mode->add_intvalue((int)mode); 8873 8874 // copy argument first 8875 GLMessage_DataType *arg_first = glmsg.add_args(); 8876 arg_first->set_isarray(false); 8877 arg_first->set_type(GLMessage::DataType::INT); 8878 arg_first->add_intvalue(first); 8879 8880 // copy argument count 8881 GLMessage_DataType *arg_count = glmsg.add_args(); 8882 arg_count->set_isarray(false); 8883 arg_count->set_type(GLMessage::DataType::INT); 8884 arg_count->add_intvalue(count); 8885 8886 // copy argument instancecount 8887 GLMessage_DataType *arg_instancecount = glmsg.add_args(); 8888 arg_instancecount->set_isarray(false); 8889 arg_instancecount->set_type(GLMessage::DataType::INT); 8890 arg_instancecount->add_intvalue(instancecount); 8891 8892 // call function 8893 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8894 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8895 glContext->hooks->gl.glDrawArraysInstanced(mode, first, count, instancecount); 8896 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8897 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8898 8899 void *pointerArgs[] = { 8900 }; 8901 8902 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8903 threadStartTime, threadEndTime, 8904 &glmsg, pointerArgs); 8905 glContext->traceGLMessage(&glmsg); 8906 } 8907 8908 void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei instancecount) { 8909 GLMessage glmsg; 8910 GLTraceContext *glContext = getGLTraceContext(); 8911 8912 glmsg.set_function(GLMessage::glDrawElementsInstanced); 8913 8914 // copy argument mode 8915 GLMessage_DataType *arg_mode = glmsg.add_args(); 8916 arg_mode->set_isarray(false); 8917 arg_mode->set_type(GLMessage::DataType::ENUM); 8918 arg_mode->add_intvalue((int)mode); 8919 8920 // copy argument count 8921 GLMessage_DataType *arg_count = glmsg.add_args(); 8922 arg_count->set_isarray(false); 8923 arg_count->set_type(GLMessage::DataType::INT); 8924 arg_count->add_intvalue(count); 8925 8926 // copy argument type 8927 GLMessage_DataType *arg_type = glmsg.add_args(); 8928 arg_type->set_isarray(false); 8929 arg_type->set_type(GLMessage::DataType::ENUM); 8930 arg_type->add_intvalue((int)type); 8931 8932 // copy argument indices 8933 GLMessage_DataType *arg_indices = glmsg.add_args(); 8934 arg_indices->set_isarray(false); 8935 arg_indices->set_type(GLMessage::DataType::INT64); 8936 arg_indices->add_int64value((uintptr_t)indices); 8937 8938 // copy argument instancecount 8939 GLMessage_DataType *arg_instancecount = glmsg.add_args(); 8940 arg_instancecount->set_isarray(false); 8941 arg_instancecount->set_type(GLMessage::DataType::INT); 8942 arg_instancecount->add_intvalue(instancecount); 8943 8944 // call function 8945 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8946 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8947 glContext->hooks->gl.glDrawElementsInstanced(mode, count, type, indices, instancecount); 8948 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8949 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8950 8951 void *pointerArgs[] = { 8952 (void *) indices, 8953 }; 8954 8955 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8956 threadStartTime, threadEndTime, 8957 &glmsg, pointerArgs); 8958 glContext->traceGLMessage(&glmsg); 8959 } 8960 8961 GLsync GLTrace_glFenceSync(GLenum condition, GLbitfield flags) { 8962 GLMessage glmsg; 8963 GLTraceContext *glContext = getGLTraceContext(); 8964 8965 glmsg.set_function(GLMessage::glFenceSync); 8966 8967 // copy argument condition 8968 GLMessage_DataType *arg_condition = glmsg.add_args(); 8969 arg_condition->set_isarray(false); 8970 arg_condition->set_type(GLMessage::DataType::ENUM); 8971 arg_condition->add_intvalue((int)condition); 8972 8973 // copy argument flags 8974 GLMessage_DataType *arg_flags = glmsg.add_args(); 8975 arg_flags->set_isarray(false); 8976 arg_flags->set_type(GLMessage::DataType::INT); 8977 arg_flags->add_intvalue(flags); 8978 8979 // call function 8980 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 8981 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 8982 GLsync retValue = glContext->hooks->gl.glFenceSync(condition, flags); 8983 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 8984 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 8985 8986 // set return value 8987 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 8988 rt->set_isarray(false); 8989 rt->set_type(GLMessage::DataType::INT64); 8990 rt->add_int64value((uintptr_t)retValue); 8991 8992 void *pointerArgs[] = { 8993 (void *) retValue, 8994 }; 8995 8996 fixupGLMessage(glContext, wallStartTime, wallEndTime, 8997 threadStartTime, threadEndTime, 8998 &glmsg, pointerArgs); 8999 glContext->traceGLMessage(&glmsg); 9000 9001 return retValue; 9002 } 9003 9004 GLboolean GLTrace_glIsSync(GLsync sync) { 9005 GLMessage glmsg; 9006 GLTraceContext *glContext = getGLTraceContext(); 9007 9008 glmsg.set_function(GLMessage::glIsSync); 9009 9010 // copy argument sync 9011 GLMessage_DataType *arg_sync = glmsg.add_args(); 9012 arg_sync->set_isarray(false); 9013 arg_sync->set_type(GLMessage::DataType::INT64); 9014 arg_sync->add_int64value((uintptr_t)sync); 9015 9016 // call function 9017 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9018 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9019 GLboolean retValue = glContext->hooks->gl.glIsSync(sync); 9020 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9021 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9022 9023 // set return value 9024 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 9025 rt->set_isarray(false); 9026 rt->set_type(GLMessage::DataType::BOOL); 9027 rt->add_boolvalue(retValue); 9028 9029 void *pointerArgs[] = { 9030 (void *) sync, 9031 }; 9032 9033 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9034 threadStartTime, threadEndTime, 9035 &glmsg, pointerArgs); 9036 glContext->traceGLMessage(&glmsg); 9037 9038 return retValue; 9039 } 9040 9041 void GLTrace_glDeleteSync(GLsync sync) { 9042 GLMessage glmsg; 9043 GLTraceContext *glContext = getGLTraceContext(); 9044 9045 glmsg.set_function(GLMessage::glDeleteSync); 9046 9047 // copy argument sync 9048 GLMessage_DataType *arg_sync = glmsg.add_args(); 9049 arg_sync->set_isarray(false); 9050 arg_sync->set_type(GLMessage::DataType::INT64); 9051 arg_sync->add_int64value((uintptr_t)sync); 9052 9053 // call function 9054 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9055 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9056 glContext->hooks->gl.glDeleteSync(sync); 9057 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9058 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9059 9060 void *pointerArgs[] = { 9061 (void *) sync, 9062 }; 9063 9064 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9065 threadStartTime, threadEndTime, 9066 &glmsg, pointerArgs); 9067 glContext->traceGLMessage(&glmsg); 9068 } 9069 9070 GLenum GLTrace_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { 9071 GLMessage glmsg; 9072 GLTraceContext *glContext = getGLTraceContext(); 9073 9074 glmsg.set_function(GLMessage::glClientWaitSync); 9075 9076 // copy argument sync 9077 GLMessage_DataType *arg_sync = glmsg.add_args(); 9078 arg_sync->set_isarray(false); 9079 arg_sync->set_type(GLMessage::DataType::INT64); 9080 arg_sync->add_int64value((uintptr_t)sync); 9081 9082 // copy argument flags 9083 GLMessage_DataType *arg_flags = glmsg.add_args(); 9084 arg_flags->set_isarray(false); 9085 arg_flags->set_type(GLMessage::DataType::INT); 9086 arg_flags->add_intvalue(flags); 9087 9088 // copy argument timeout 9089 GLMessage_DataType *arg_timeout = glmsg.add_args(); 9090 arg_timeout->set_isarray(false); 9091 arg_timeout->set_type(GLMessage::DataType::INT64); 9092 arg_timeout->add_int64value(timeout); 9093 9094 // call function 9095 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9096 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9097 GLenum retValue = glContext->hooks->gl.glClientWaitSync(sync, flags, timeout); 9098 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9099 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9100 9101 // set return value 9102 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 9103 rt->set_isarray(false); 9104 rt->set_type(GLMessage::DataType::ENUM); 9105 rt->add_intvalue((int)retValue); 9106 9107 void *pointerArgs[] = { 9108 (void *) sync, 9109 }; 9110 9111 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9112 threadStartTime, threadEndTime, 9113 &glmsg, pointerArgs); 9114 glContext->traceGLMessage(&glmsg); 9115 9116 return retValue; 9117 } 9118 9119 void GLTrace_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { 9120 GLMessage glmsg; 9121 GLTraceContext *glContext = getGLTraceContext(); 9122 9123 glmsg.set_function(GLMessage::glWaitSync); 9124 9125 // copy argument sync 9126 GLMessage_DataType *arg_sync = glmsg.add_args(); 9127 arg_sync->set_isarray(false); 9128 arg_sync->set_type(GLMessage::DataType::INT64); 9129 arg_sync->add_int64value((uintptr_t)sync); 9130 9131 // copy argument flags 9132 GLMessage_DataType *arg_flags = glmsg.add_args(); 9133 arg_flags->set_isarray(false); 9134 arg_flags->set_type(GLMessage::DataType::INT); 9135 arg_flags->add_intvalue(flags); 9136 9137 // copy argument timeout 9138 GLMessage_DataType *arg_timeout = glmsg.add_args(); 9139 arg_timeout->set_isarray(false); 9140 arg_timeout->set_type(GLMessage::DataType::INT64); 9141 arg_timeout->add_int64value(timeout); 9142 9143 // call function 9144 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9145 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9146 glContext->hooks->gl.glWaitSync(sync, flags, timeout); 9147 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9148 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9149 9150 void *pointerArgs[] = { 9151 (void *) sync, 9152 }; 9153 9154 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9155 threadStartTime, threadEndTime, 9156 &glmsg, pointerArgs); 9157 glContext->traceGLMessage(&glmsg); 9158 } 9159 9160 void GLTrace_glGetInteger64v(GLenum pname, GLint64 * data) { 9161 GLMessage glmsg; 9162 GLTraceContext *glContext = getGLTraceContext(); 9163 9164 glmsg.set_function(GLMessage::glGetInteger64v); 9165 9166 // copy argument pname 9167 GLMessage_DataType *arg_pname = glmsg.add_args(); 9168 arg_pname->set_isarray(false); 9169 arg_pname->set_type(GLMessage::DataType::ENUM); 9170 arg_pname->add_intvalue((int)pname); 9171 9172 // copy argument data 9173 GLMessage_DataType *arg_data = glmsg.add_args(); 9174 arg_data->set_isarray(false); 9175 arg_data->set_type(GLMessage::DataType::INT64); 9176 arg_data->add_int64value((uintptr_t)data); 9177 9178 // call function 9179 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9180 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9181 glContext->hooks->gl.glGetInteger64v(pname, data); 9182 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9183 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9184 9185 void *pointerArgs[] = { 9186 (void *) data, 9187 }; 9188 9189 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9190 threadStartTime, threadEndTime, 9191 &glmsg, pointerArgs); 9192 glContext->traceGLMessage(&glmsg); 9193 } 9194 9195 void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) { 9196 GLMessage glmsg; 9197 GLTraceContext *glContext = getGLTraceContext(); 9198 9199 glmsg.set_function(GLMessage::glGetSynciv); 9200 9201 // copy argument sync 9202 GLMessage_DataType *arg_sync = glmsg.add_args(); 9203 arg_sync->set_isarray(false); 9204 arg_sync->set_type(GLMessage::DataType::INT64); 9205 arg_sync->add_int64value((uintptr_t)sync); 9206 9207 // copy argument pname 9208 GLMessage_DataType *arg_pname = glmsg.add_args(); 9209 arg_pname->set_isarray(false); 9210 arg_pname->set_type(GLMessage::DataType::ENUM); 9211 arg_pname->add_intvalue((int)pname); 9212 9213 // copy argument bufSize 9214 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 9215 arg_bufSize->set_isarray(false); 9216 arg_bufSize->set_type(GLMessage::DataType::INT); 9217 arg_bufSize->add_intvalue(bufSize); 9218 9219 // copy argument length 9220 GLMessage_DataType *arg_length = glmsg.add_args(); 9221 arg_length->set_isarray(false); 9222 arg_length->set_type(GLMessage::DataType::INT64); 9223 arg_length->add_int64value((uintptr_t)length); 9224 9225 // copy argument values 9226 GLMessage_DataType *arg_values = glmsg.add_args(); 9227 arg_values->set_isarray(false); 9228 arg_values->set_type(GLMessage::DataType::INT64); 9229 arg_values->add_int64value((uintptr_t)values); 9230 9231 // call function 9232 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9233 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9234 glContext->hooks->gl.glGetSynciv(sync, pname, bufSize, length, values); 9235 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9236 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9237 9238 void *pointerArgs[] = { 9239 (void *) sync, 9240 (void *) length, 9241 (void *) values, 9242 }; 9243 9244 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9245 threadStartTime, threadEndTime, 9246 &glmsg, pointerArgs); 9247 glContext->traceGLMessage(&glmsg); 9248 } 9249 9250 void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64 * data) { 9251 GLMessage glmsg; 9252 GLTraceContext *glContext = getGLTraceContext(); 9253 9254 glmsg.set_function(GLMessage::glGetInteger64i_v); 9255 9256 // copy argument target 9257 GLMessage_DataType *arg_target = glmsg.add_args(); 9258 arg_target->set_isarray(false); 9259 arg_target->set_type(GLMessage::DataType::ENUM); 9260 arg_target->add_intvalue((int)target); 9261 9262 // copy argument index 9263 GLMessage_DataType *arg_index = glmsg.add_args(); 9264 arg_index->set_isarray(false); 9265 arg_index->set_type(GLMessage::DataType::INT); 9266 arg_index->add_intvalue(index); 9267 9268 // copy argument data 9269 GLMessage_DataType *arg_data = glmsg.add_args(); 9270 arg_data->set_isarray(false); 9271 arg_data->set_type(GLMessage::DataType::INT64); 9272 arg_data->add_int64value((uintptr_t)data); 9273 9274 // call function 9275 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9276 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9277 glContext->hooks->gl.glGetInteger64i_v(target, index, data); 9278 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9279 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9280 9281 void *pointerArgs[] = { 9282 (void *) data, 9283 }; 9284 9285 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9286 threadStartTime, threadEndTime, 9287 &glmsg, pointerArgs); 9288 glContext->traceGLMessage(&glmsg); 9289 } 9290 9291 void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64 * params) { 9292 GLMessage glmsg; 9293 GLTraceContext *glContext = getGLTraceContext(); 9294 9295 glmsg.set_function(GLMessage::glGetBufferParameteri64v); 9296 9297 // copy argument target 9298 GLMessage_DataType *arg_target = glmsg.add_args(); 9299 arg_target->set_isarray(false); 9300 arg_target->set_type(GLMessage::DataType::ENUM); 9301 arg_target->add_intvalue((int)target); 9302 9303 // copy argument pname 9304 GLMessage_DataType *arg_pname = glmsg.add_args(); 9305 arg_pname->set_isarray(false); 9306 arg_pname->set_type(GLMessage::DataType::ENUM); 9307 arg_pname->add_intvalue((int)pname); 9308 9309 // copy argument params 9310 GLMessage_DataType *arg_params = glmsg.add_args(); 9311 arg_params->set_isarray(false); 9312 arg_params->set_type(GLMessage::DataType::INT64); 9313 arg_params->add_int64value((uintptr_t)params); 9314 9315 // call function 9316 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9317 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9318 glContext->hooks->gl.glGetBufferParameteri64v(target, pname, params); 9319 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9320 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9321 9322 void *pointerArgs[] = { 9323 (void *) params, 9324 }; 9325 9326 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9327 threadStartTime, threadEndTime, 9328 &glmsg, pointerArgs); 9329 glContext->traceGLMessage(&glmsg); 9330 } 9331 9332 void GLTrace_glGenSamplers(GLsizei count, GLuint * samplers) { 9333 GLMessage glmsg; 9334 GLTraceContext *glContext = getGLTraceContext(); 9335 9336 glmsg.set_function(GLMessage::glGenSamplers); 9337 9338 // copy argument count 9339 GLMessage_DataType *arg_count = glmsg.add_args(); 9340 arg_count->set_isarray(false); 9341 arg_count->set_type(GLMessage::DataType::INT); 9342 arg_count->add_intvalue(count); 9343 9344 // copy argument samplers 9345 GLMessage_DataType *arg_samplers = glmsg.add_args(); 9346 arg_samplers->set_isarray(false); 9347 arg_samplers->set_type(GLMessage::DataType::INT64); 9348 arg_samplers->add_int64value((uintptr_t)samplers); 9349 9350 // call function 9351 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9352 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9353 glContext->hooks->gl.glGenSamplers(count, samplers); 9354 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9355 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9356 9357 void *pointerArgs[] = { 9358 (void *) samplers, 9359 }; 9360 9361 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9362 threadStartTime, threadEndTime, 9363 &glmsg, pointerArgs); 9364 glContext->traceGLMessage(&glmsg); 9365 } 9366 9367 void GLTrace_glDeleteSamplers(GLsizei count, const GLuint * samplers) { 9368 GLMessage glmsg; 9369 GLTraceContext *glContext = getGLTraceContext(); 9370 9371 glmsg.set_function(GLMessage::glDeleteSamplers); 9372 9373 // copy argument count 9374 GLMessage_DataType *arg_count = glmsg.add_args(); 9375 arg_count->set_isarray(false); 9376 arg_count->set_type(GLMessage::DataType::INT); 9377 arg_count->add_intvalue(count); 9378 9379 // copy argument samplers 9380 GLMessage_DataType *arg_samplers = glmsg.add_args(); 9381 arg_samplers->set_isarray(false); 9382 arg_samplers->set_type(GLMessage::DataType::INT64); 9383 arg_samplers->add_int64value((uintptr_t)samplers); 9384 9385 // call function 9386 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9387 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9388 glContext->hooks->gl.glDeleteSamplers(count, samplers); 9389 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9390 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9391 9392 void *pointerArgs[] = { 9393 (void *) samplers, 9394 }; 9395 9396 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9397 threadStartTime, threadEndTime, 9398 &glmsg, pointerArgs); 9399 glContext->traceGLMessage(&glmsg); 9400 } 9401 9402 GLboolean GLTrace_glIsSampler(GLuint sampler) { 9403 GLMessage glmsg; 9404 GLTraceContext *glContext = getGLTraceContext(); 9405 9406 glmsg.set_function(GLMessage::glIsSampler); 9407 9408 // copy argument sampler 9409 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9410 arg_sampler->set_isarray(false); 9411 arg_sampler->set_type(GLMessage::DataType::INT); 9412 arg_sampler->add_intvalue(sampler); 9413 9414 // call function 9415 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9416 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9417 GLboolean retValue = glContext->hooks->gl.glIsSampler(sampler); 9418 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9419 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9420 9421 // set return value 9422 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 9423 rt->set_isarray(false); 9424 rt->set_type(GLMessage::DataType::BOOL); 9425 rt->add_boolvalue(retValue); 9426 9427 void *pointerArgs[] = { 9428 }; 9429 9430 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9431 threadStartTime, threadEndTime, 9432 &glmsg, pointerArgs); 9433 glContext->traceGLMessage(&glmsg); 9434 9435 return retValue; 9436 } 9437 9438 void GLTrace_glBindSampler(GLuint unit, GLuint sampler) { 9439 GLMessage glmsg; 9440 GLTraceContext *glContext = getGLTraceContext(); 9441 9442 glmsg.set_function(GLMessage::glBindSampler); 9443 9444 // copy argument unit 9445 GLMessage_DataType *arg_unit = glmsg.add_args(); 9446 arg_unit->set_isarray(false); 9447 arg_unit->set_type(GLMessage::DataType::INT); 9448 arg_unit->add_intvalue(unit); 9449 9450 // copy argument sampler 9451 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9452 arg_sampler->set_isarray(false); 9453 arg_sampler->set_type(GLMessage::DataType::INT); 9454 arg_sampler->add_intvalue(sampler); 9455 9456 // call function 9457 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9458 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9459 glContext->hooks->gl.glBindSampler(unit, sampler); 9460 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9461 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9462 9463 void *pointerArgs[] = { 9464 }; 9465 9466 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9467 threadStartTime, threadEndTime, 9468 &glmsg, pointerArgs); 9469 glContext->traceGLMessage(&glmsg); 9470 } 9471 9472 void GLTrace_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) { 9473 GLMessage glmsg; 9474 GLTraceContext *glContext = getGLTraceContext(); 9475 9476 glmsg.set_function(GLMessage::glSamplerParameteri); 9477 9478 // copy argument sampler 9479 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9480 arg_sampler->set_isarray(false); 9481 arg_sampler->set_type(GLMessage::DataType::INT); 9482 arg_sampler->add_intvalue(sampler); 9483 9484 // copy argument pname 9485 GLMessage_DataType *arg_pname = glmsg.add_args(); 9486 arg_pname->set_isarray(false); 9487 arg_pname->set_type(GLMessage::DataType::ENUM); 9488 arg_pname->add_intvalue((int)pname); 9489 9490 // copy argument param 9491 GLMessage_DataType *arg_param = glmsg.add_args(); 9492 arg_param->set_isarray(false); 9493 arg_param->set_type(GLMessage::DataType::INT); 9494 arg_param->add_intvalue(param); 9495 9496 // call function 9497 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9498 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9499 glContext->hooks->gl.glSamplerParameteri(sampler, pname, param); 9500 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9501 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9502 9503 void *pointerArgs[] = { 9504 }; 9505 9506 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9507 threadStartTime, threadEndTime, 9508 &glmsg, pointerArgs); 9509 glContext->traceGLMessage(&glmsg); 9510 } 9511 9512 void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint * param) { 9513 GLMessage glmsg; 9514 GLTraceContext *glContext = getGLTraceContext(); 9515 9516 glmsg.set_function(GLMessage::glSamplerParameteriv); 9517 9518 // copy argument sampler 9519 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9520 arg_sampler->set_isarray(false); 9521 arg_sampler->set_type(GLMessage::DataType::INT); 9522 arg_sampler->add_intvalue(sampler); 9523 9524 // copy argument pname 9525 GLMessage_DataType *arg_pname = glmsg.add_args(); 9526 arg_pname->set_isarray(false); 9527 arg_pname->set_type(GLMessage::DataType::ENUM); 9528 arg_pname->add_intvalue((int)pname); 9529 9530 // copy argument param 9531 GLMessage_DataType *arg_param = glmsg.add_args(); 9532 arg_param->set_isarray(false); 9533 arg_param->set_type(GLMessage::DataType::INT64); 9534 arg_param->add_int64value((uintptr_t)param); 9535 9536 // call function 9537 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9538 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9539 glContext->hooks->gl.glSamplerParameteriv(sampler, pname, param); 9540 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9541 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9542 9543 void *pointerArgs[] = { 9544 (void *) param, 9545 }; 9546 9547 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9548 threadStartTime, threadEndTime, 9549 &glmsg, pointerArgs); 9550 glContext->traceGLMessage(&glmsg); 9551 } 9552 9553 void GLTrace_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) { 9554 GLMessage glmsg; 9555 GLTraceContext *glContext = getGLTraceContext(); 9556 9557 glmsg.set_function(GLMessage::glSamplerParameterf); 9558 9559 // copy argument sampler 9560 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9561 arg_sampler->set_isarray(false); 9562 arg_sampler->set_type(GLMessage::DataType::INT); 9563 arg_sampler->add_intvalue(sampler); 9564 9565 // copy argument pname 9566 GLMessage_DataType *arg_pname = glmsg.add_args(); 9567 arg_pname->set_isarray(false); 9568 arg_pname->set_type(GLMessage::DataType::ENUM); 9569 arg_pname->add_intvalue((int)pname); 9570 9571 // copy argument param 9572 GLMessage_DataType *arg_param = glmsg.add_args(); 9573 arg_param->set_isarray(false); 9574 arg_param->set_type(GLMessage::DataType::FLOAT); 9575 arg_param->add_floatvalue(param); 9576 9577 // call function 9578 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9579 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9580 glContext->hooks->gl.glSamplerParameterf(sampler, pname, param); 9581 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9582 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9583 9584 void *pointerArgs[] = { 9585 }; 9586 9587 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9588 threadStartTime, threadEndTime, 9589 &glmsg, pointerArgs); 9590 glContext->traceGLMessage(&glmsg); 9591 } 9592 9593 void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat * param) { 9594 GLMessage glmsg; 9595 GLTraceContext *glContext = getGLTraceContext(); 9596 9597 glmsg.set_function(GLMessage::glSamplerParameterfv); 9598 9599 // copy argument sampler 9600 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9601 arg_sampler->set_isarray(false); 9602 arg_sampler->set_type(GLMessage::DataType::INT); 9603 arg_sampler->add_intvalue(sampler); 9604 9605 // copy argument pname 9606 GLMessage_DataType *arg_pname = glmsg.add_args(); 9607 arg_pname->set_isarray(false); 9608 arg_pname->set_type(GLMessage::DataType::ENUM); 9609 arg_pname->add_intvalue((int)pname); 9610 9611 // copy argument param 9612 GLMessage_DataType *arg_param = glmsg.add_args(); 9613 arg_param->set_isarray(false); 9614 arg_param->set_type(GLMessage::DataType::INT64); 9615 arg_param->add_int64value((uintptr_t)param); 9616 9617 // call function 9618 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9619 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9620 glContext->hooks->gl.glSamplerParameterfv(sampler, pname, param); 9621 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9622 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9623 9624 void *pointerArgs[] = { 9625 (void *) param, 9626 }; 9627 9628 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9629 threadStartTime, threadEndTime, 9630 &glmsg, pointerArgs); 9631 glContext->traceGLMessage(&glmsg); 9632 } 9633 9634 void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint * params) { 9635 GLMessage glmsg; 9636 GLTraceContext *glContext = getGLTraceContext(); 9637 9638 glmsg.set_function(GLMessage::glGetSamplerParameteriv); 9639 9640 // copy argument sampler 9641 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9642 arg_sampler->set_isarray(false); 9643 arg_sampler->set_type(GLMessage::DataType::INT); 9644 arg_sampler->add_intvalue(sampler); 9645 9646 // copy argument pname 9647 GLMessage_DataType *arg_pname = glmsg.add_args(); 9648 arg_pname->set_isarray(false); 9649 arg_pname->set_type(GLMessage::DataType::ENUM); 9650 arg_pname->add_intvalue((int)pname); 9651 9652 // copy argument params 9653 GLMessage_DataType *arg_params = glmsg.add_args(); 9654 arg_params->set_isarray(false); 9655 arg_params->set_type(GLMessage::DataType::INT64); 9656 arg_params->add_int64value((uintptr_t)params); 9657 9658 // call function 9659 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9660 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9661 glContext->hooks->gl.glGetSamplerParameteriv(sampler, pname, params); 9662 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9663 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9664 9665 void *pointerArgs[] = { 9666 (void *) params, 9667 }; 9668 9669 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9670 threadStartTime, threadEndTime, 9671 &glmsg, pointerArgs); 9672 glContext->traceGLMessage(&glmsg); 9673 } 9674 9675 void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat * params) { 9676 GLMessage glmsg; 9677 GLTraceContext *glContext = getGLTraceContext(); 9678 9679 glmsg.set_function(GLMessage::glGetSamplerParameterfv); 9680 9681 // copy argument sampler 9682 GLMessage_DataType *arg_sampler = glmsg.add_args(); 9683 arg_sampler->set_isarray(false); 9684 arg_sampler->set_type(GLMessage::DataType::INT); 9685 arg_sampler->add_intvalue(sampler); 9686 9687 // copy argument pname 9688 GLMessage_DataType *arg_pname = glmsg.add_args(); 9689 arg_pname->set_isarray(false); 9690 arg_pname->set_type(GLMessage::DataType::ENUM); 9691 arg_pname->add_intvalue((int)pname); 9692 9693 // copy argument params 9694 GLMessage_DataType *arg_params = glmsg.add_args(); 9695 arg_params->set_isarray(false); 9696 arg_params->set_type(GLMessage::DataType::INT64); 9697 arg_params->add_int64value((uintptr_t)params); 9698 9699 // call function 9700 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9701 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9702 glContext->hooks->gl.glGetSamplerParameterfv(sampler, pname, params); 9703 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9704 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9705 9706 void *pointerArgs[] = { 9707 (void *) params, 9708 }; 9709 9710 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9711 threadStartTime, threadEndTime, 9712 &glmsg, pointerArgs); 9713 glContext->traceGLMessage(&glmsg); 9714 } 9715 9716 void GLTrace_glVertexAttribDivisor(GLuint index, GLuint divisor) { 9717 GLMessage glmsg; 9718 GLTraceContext *glContext = getGLTraceContext(); 9719 9720 glmsg.set_function(GLMessage::glVertexAttribDivisor); 9721 9722 // copy argument index 9723 GLMessage_DataType *arg_index = glmsg.add_args(); 9724 arg_index->set_isarray(false); 9725 arg_index->set_type(GLMessage::DataType::INT); 9726 arg_index->add_intvalue(index); 9727 9728 // copy argument divisor 9729 GLMessage_DataType *arg_divisor = glmsg.add_args(); 9730 arg_divisor->set_isarray(false); 9731 arg_divisor->set_type(GLMessage::DataType::INT); 9732 arg_divisor->add_intvalue(divisor); 9733 9734 // call function 9735 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9736 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9737 glContext->hooks->gl.glVertexAttribDivisor(index, divisor); 9738 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9739 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9740 9741 void *pointerArgs[] = { 9742 }; 9743 9744 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9745 threadStartTime, threadEndTime, 9746 &glmsg, pointerArgs); 9747 glContext->traceGLMessage(&glmsg); 9748 } 9749 9750 void GLTrace_glBindTransformFeedback(GLenum target, GLuint id) { 9751 GLMessage glmsg; 9752 GLTraceContext *glContext = getGLTraceContext(); 9753 9754 glmsg.set_function(GLMessage::glBindTransformFeedback); 9755 9756 // copy argument target 9757 GLMessage_DataType *arg_target = glmsg.add_args(); 9758 arg_target->set_isarray(false); 9759 arg_target->set_type(GLMessage::DataType::ENUM); 9760 arg_target->add_intvalue((int)target); 9761 9762 // copy argument id 9763 GLMessage_DataType *arg_id = glmsg.add_args(); 9764 arg_id->set_isarray(false); 9765 arg_id->set_type(GLMessage::DataType::INT); 9766 arg_id->add_intvalue(id); 9767 9768 // call function 9769 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9770 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9771 glContext->hooks->gl.glBindTransformFeedback(target, id); 9772 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9773 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9774 9775 void *pointerArgs[] = { 9776 }; 9777 9778 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9779 threadStartTime, threadEndTime, 9780 &glmsg, pointerArgs); 9781 glContext->traceGLMessage(&glmsg); 9782 } 9783 9784 void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint * ids) { 9785 GLMessage glmsg; 9786 GLTraceContext *glContext = getGLTraceContext(); 9787 9788 glmsg.set_function(GLMessage::glDeleteTransformFeedbacks); 9789 9790 // copy argument n 9791 GLMessage_DataType *arg_n = glmsg.add_args(); 9792 arg_n->set_isarray(false); 9793 arg_n->set_type(GLMessage::DataType::INT); 9794 arg_n->add_intvalue(n); 9795 9796 // copy argument ids 9797 GLMessage_DataType *arg_ids = glmsg.add_args(); 9798 arg_ids->set_isarray(false); 9799 arg_ids->set_type(GLMessage::DataType::INT64); 9800 arg_ids->add_int64value((uintptr_t)ids); 9801 9802 // call function 9803 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9804 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9805 glContext->hooks->gl.glDeleteTransformFeedbacks(n, ids); 9806 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9807 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9808 9809 void *pointerArgs[] = { 9810 (void *) ids, 9811 }; 9812 9813 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9814 threadStartTime, threadEndTime, 9815 &glmsg, pointerArgs); 9816 glContext->traceGLMessage(&glmsg); 9817 } 9818 9819 void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint * ids) { 9820 GLMessage glmsg; 9821 GLTraceContext *glContext = getGLTraceContext(); 9822 9823 glmsg.set_function(GLMessage::glGenTransformFeedbacks); 9824 9825 // copy argument n 9826 GLMessage_DataType *arg_n = glmsg.add_args(); 9827 arg_n->set_isarray(false); 9828 arg_n->set_type(GLMessage::DataType::INT); 9829 arg_n->add_intvalue(n); 9830 9831 // copy argument ids 9832 GLMessage_DataType *arg_ids = glmsg.add_args(); 9833 arg_ids->set_isarray(false); 9834 arg_ids->set_type(GLMessage::DataType::INT64); 9835 arg_ids->add_int64value((uintptr_t)ids); 9836 9837 // call function 9838 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9839 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9840 glContext->hooks->gl.glGenTransformFeedbacks(n, ids); 9841 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9842 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9843 9844 void *pointerArgs[] = { 9845 (void *) ids, 9846 }; 9847 9848 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9849 threadStartTime, threadEndTime, 9850 &glmsg, pointerArgs); 9851 glContext->traceGLMessage(&glmsg); 9852 } 9853 9854 GLboolean GLTrace_glIsTransformFeedback(GLuint id) { 9855 GLMessage glmsg; 9856 GLTraceContext *glContext = getGLTraceContext(); 9857 9858 glmsg.set_function(GLMessage::glIsTransformFeedback); 9859 9860 // copy argument id 9861 GLMessage_DataType *arg_id = glmsg.add_args(); 9862 arg_id->set_isarray(false); 9863 arg_id->set_type(GLMessage::DataType::INT); 9864 arg_id->add_intvalue(id); 9865 9866 // call function 9867 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9868 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9869 GLboolean retValue = glContext->hooks->gl.glIsTransformFeedback(id); 9870 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9871 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9872 9873 // set return value 9874 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 9875 rt->set_isarray(false); 9876 rt->set_type(GLMessage::DataType::BOOL); 9877 rt->add_boolvalue(retValue); 9878 9879 void *pointerArgs[] = { 9880 }; 9881 9882 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9883 threadStartTime, threadEndTime, 9884 &glmsg, pointerArgs); 9885 glContext->traceGLMessage(&glmsg); 9886 9887 return retValue; 9888 } 9889 9890 void GLTrace_glPauseTransformFeedback(void) { 9891 GLMessage glmsg; 9892 GLTraceContext *glContext = getGLTraceContext(); 9893 9894 glmsg.set_function(GLMessage::glPauseTransformFeedback); 9895 9896 // call function 9897 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9898 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9899 glContext->hooks->gl.glPauseTransformFeedback(); 9900 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9901 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9902 9903 void *pointerArgs[] = { 9904 }; 9905 9906 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9907 threadStartTime, threadEndTime, 9908 &glmsg, pointerArgs); 9909 glContext->traceGLMessage(&glmsg); 9910 } 9911 9912 void GLTrace_glResumeTransformFeedback(void) { 9913 GLMessage glmsg; 9914 GLTraceContext *glContext = getGLTraceContext(); 9915 9916 glmsg.set_function(GLMessage::glResumeTransformFeedback); 9917 9918 // call function 9919 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9920 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9921 glContext->hooks->gl.glResumeTransformFeedback(); 9922 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9923 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9924 9925 void *pointerArgs[] = { 9926 }; 9927 9928 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9929 threadStartTime, threadEndTime, 9930 &glmsg, pointerArgs); 9931 glContext->traceGLMessage(&glmsg); 9932 } 9933 9934 void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) { 9935 GLMessage glmsg; 9936 GLTraceContext *glContext = getGLTraceContext(); 9937 9938 glmsg.set_function(GLMessage::glGetProgramBinary); 9939 9940 // copy argument program 9941 GLMessage_DataType *arg_program = glmsg.add_args(); 9942 arg_program->set_isarray(false); 9943 arg_program->set_type(GLMessage::DataType::INT); 9944 arg_program->add_intvalue(program); 9945 9946 // copy argument bufSize 9947 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 9948 arg_bufSize->set_isarray(false); 9949 arg_bufSize->set_type(GLMessage::DataType::INT); 9950 arg_bufSize->add_intvalue(bufSize); 9951 9952 // copy argument length 9953 GLMessage_DataType *arg_length = glmsg.add_args(); 9954 arg_length->set_isarray(false); 9955 arg_length->set_type(GLMessage::DataType::INT64); 9956 arg_length->add_int64value((uintptr_t)length); 9957 9958 // copy argument binaryFormat 9959 GLMessage_DataType *arg_binaryFormat = glmsg.add_args(); 9960 arg_binaryFormat->set_isarray(false); 9961 arg_binaryFormat->set_type(GLMessage::DataType::INT64); 9962 arg_binaryFormat->add_int64value((uintptr_t)binaryFormat); 9963 9964 // copy argument binary 9965 GLMessage_DataType *arg_binary = glmsg.add_args(); 9966 arg_binary->set_isarray(false); 9967 arg_binary->set_type(GLMessage::DataType::INT64); 9968 arg_binary->add_int64value((uintptr_t)binary); 9969 9970 // call function 9971 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 9972 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 9973 glContext->hooks->gl.glGetProgramBinary(program, bufSize, length, binaryFormat, binary); 9974 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 9975 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 9976 9977 void *pointerArgs[] = { 9978 (void *) length, 9979 (void *) binaryFormat, 9980 (void *) binary, 9981 }; 9982 9983 fixupGLMessage(glContext, wallStartTime, wallEndTime, 9984 threadStartTime, threadEndTime, 9985 &glmsg, pointerArgs); 9986 glContext->traceGLMessage(&glmsg); 9987 } 9988 9989 void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const void * binary, GLsizei length) { 9990 GLMessage glmsg; 9991 GLTraceContext *glContext = getGLTraceContext(); 9992 9993 glmsg.set_function(GLMessage::glProgramBinary); 9994 9995 // copy argument program 9996 GLMessage_DataType *arg_program = glmsg.add_args(); 9997 arg_program->set_isarray(false); 9998 arg_program->set_type(GLMessage::DataType::INT); 9999 arg_program->add_intvalue(program); 10000 10001 // copy argument binaryFormat 10002 GLMessage_DataType *arg_binaryFormat = glmsg.add_args(); 10003 arg_binaryFormat->set_isarray(false); 10004 arg_binaryFormat->set_type(GLMessage::DataType::ENUM); 10005 arg_binaryFormat->add_intvalue((int)binaryFormat); 10006 10007 // copy argument binary 10008 GLMessage_DataType *arg_binary = glmsg.add_args(); 10009 arg_binary->set_isarray(false); 10010 arg_binary->set_type(GLMessage::DataType::INT64); 10011 arg_binary->add_int64value((uintptr_t)binary); 10012 10013 // copy argument length 10014 GLMessage_DataType *arg_length = glmsg.add_args(); 10015 arg_length->set_isarray(false); 10016 arg_length->set_type(GLMessage::DataType::INT); 10017 arg_length->add_intvalue(length); 10018 10019 // call function 10020 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10021 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10022 glContext->hooks->gl.glProgramBinary(program, binaryFormat, binary, length); 10023 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10024 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10025 10026 void *pointerArgs[] = { 10027 (void *) binary, 10028 }; 10029 10030 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10031 threadStartTime, threadEndTime, 10032 &glmsg, pointerArgs); 10033 glContext->traceGLMessage(&glmsg); 10034 } 10035 10036 void GLTrace_glProgramParameteri(GLuint program, GLenum pname, GLint value) { 10037 GLMessage glmsg; 10038 GLTraceContext *glContext = getGLTraceContext(); 10039 10040 glmsg.set_function(GLMessage::glProgramParameteri); 10041 10042 // copy argument program 10043 GLMessage_DataType *arg_program = glmsg.add_args(); 10044 arg_program->set_isarray(false); 10045 arg_program->set_type(GLMessage::DataType::INT); 10046 arg_program->add_intvalue(program); 10047 10048 // copy argument pname 10049 GLMessage_DataType *arg_pname = glmsg.add_args(); 10050 arg_pname->set_isarray(false); 10051 arg_pname->set_type(GLMessage::DataType::ENUM); 10052 arg_pname->add_intvalue((int)pname); 10053 10054 // copy argument value 10055 GLMessage_DataType *arg_value = glmsg.add_args(); 10056 arg_value->set_isarray(false); 10057 arg_value->set_type(GLMessage::DataType::INT); 10058 arg_value->add_intvalue(value); 10059 10060 // call function 10061 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10062 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10063 glContext->hooks->gl.glProgramParameteri(program, pname, value); 10064 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10065 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10066 10067 void *pointerArgs[] = { 10068 }; 10069 10070 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10071 threadStartTime, threadEndTime, 10072 &glmsg, pointerArgs); 10073 glContext->traceGLMessage(&glmsg); 10074 } 10075 10076 void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments) { 10077 GLMessage glmsg; 10078 GLTraceContext *glContext = getGLTraceContext(); 10079 10080 glmsg.set_function(GLMessage::glInvalidateFramebuffer); 10081 10082 // copy argument target 10083 GLMessage_DataType *arg_target = glmsg.add_args(); 10084 arg_target->set_isarray(false); 10085 arg_target->set_type(GLMessage::DataType::ENUM); 10086 arg_target->add_intvalue((int)target); 10087 10088 // copy argument numAttachments 10089 GLMessage_DataType *arg_numAttachments = glmsg.add_args(); 10090 arg_numAttachments->set_isarray(false); 10091 arg_numAttachments->set_type(GLMessage::DataType::INT); 10092 arg_numAttachments->add_intvalue(numAttachments); 10093 10094 // copy argument attachments 10095 GLMessage_DataType *arg_attachments = glmsg.add_args(); 10096 arg_attachments->set_isarray(false); 10097 arg_attachments->set_type(GLMessage::DataType::INT64); 10098 arg_attachments->add_int64value((uintptr_t)attachments); 10099 10100 // call function 10101 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10102 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10103 glContext->hooks->gl.glInvalidateFramebuffer(target, numAttachments, attachments); 10104 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10105 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10106 10107 void *pointerArgs[] = { 10108 (void *) attachments, 10109 }; 10110 10111 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10112 threadStartTime, threadEndTime, 10113 &glmsg, pointerArgs); 10114 glContext->traceGLMessage(&glmsg); 10115 } 10116 10117 void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height) { 10118 GLMessage glmsg; 10119 GLTraceContext *glContext = getGLTraceContext(); 10120 10121 glmsg.set_function(GLMessage::glInvalidateSubFramebuffer); 10122 10123 // copy argument target 10124 GLMessage_DataType *arg_target = glmsg.add_args(); 10125 arg_target->set_isarray(false); 10126 arg_target->set_type(GLMessage::DataType::ENUM); 10127 arg_target->add_intvalue((int)target); 10128 10129 // copy argument numAttachments 10130 GLMessage_DataType *arg_numAttachments = glmsg.add_args(); 10131 arg_numAttachments->set_isarray(false); 10132 arg_numAttachments->set_type(GLMessage::DataType::INT); 10133 arg_numAttachments->add_intvalue(numAttachments); 10134 10135 // copy argument attachments 10136 GLMessage_DataType *arg_attachments = glmsg.add_args(); 10137 arg_attachments->set_isarray(false); 10138 arg_attachments->set_type(GLMessage::DataType::INT64); 10139 arg_attachments->add_int64value((uintptr_t)attachments); 10140 10141 // copy argument x 10142 GLMessage_DataType *arg_x = glmsg.add_args(); 10143 arg_x->set_isarray(false); 10144 arg_x->set_type(GLMessage::DataType::INT); 10145 arg_x->add_intvalue(x); 10146 10147 // copy argument y 10148 GLMessage_DataType *arg_y = glmsg.add_args(); 10149 arg_y->set_isarray(false); 10150 arg_y->set_type(GLMessage::DataType::INT); 10151 arg_y->add_intvalue(y); 10152 10153 // copy argument width 10154 GLMessage_DataType *arg_width = glmsg.add_args(); 10155 arg_width->set_isarray(false); 10156 arg_width->set_type(GLMessage::DataType::INT); 10157 arg_width->add_intvalue(width); 10158 10159 // copy argument height 10160 GLMessage_DataType *arg_height = glmsg.add_args(); 10161 arg_height->set_isarray(false); 10162 arg_height->set_type(GLMessage::DataType::INT); 10163 arg_height->add_intvalue(height); 10164 10165 // call function 10166 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10167 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10168 glContext->hooks->gl.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); 10169 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10170 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10171 10172 void *pointerArgs[] = { 10173 (void *) attachments, 10174 }; 10175 10176 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10177 threadStartTime, threadEndTime, 10178 &glmsg, pointerArgs); 10179 glContext->traceGLMessage(&glmsg); 10180 } 10181 10182 void GLTrace_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { 10183 GLMessage glmsg; 10184 GLTraceContext *glContext = getGLTraceContext(); 10185 10186 glmsg.set_function(GLMessage::glTexStorage2D); 10187 10188 // copy argument target 10189 GLMessage_DataType *arg_target = glmsg.add_args(); 10190 arg_target->set_isarray(false); 10191 arg_target->set_type(GLMessage::DataType::ENUM); 10192 arg_target->add_intvalue((int)target); 10193 10194 // copy argument levels 10195 GLMessage_DataType *arg_levels = glmsg.add_args(); 10196 arg_levels->set_isarray(false); 10197 arg_levels->set_type(GLMessage::DataType::INT); 10198 arg_levels->add_intvalue(levels); 10199 10200 // copy argument internalformat 10201 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 10202 arg_internalformat->set_isarray(false); 10203 arg_internalformat->set_type(GLMessage::DataType::ENUM); 10204 arg_internalformat->add_intvalue((int)internalformat); 10205 10206 // copy argument width 10207 GLMessage_DataType *arg_width = glmsg.add_args(); 10208 arg_width->set_isarray(false); 10209 arg_width->set_type(GLMessage::DataType::INT); 10210 arg_width->add_intvalue(width); 10211 10212 // copy argument height 10213 GLMessage_DataType *arg_height = glmsg.add_args(); 10214 arg_height->set_isarray(false); 10215 arg_height->set_type(GLMessage::DataType::INT); 10216 arg_height->add_intvalue(height); 10217 10218 // call function 10219 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10220 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10221 glContext->hooks->gl.glTexStorage2D(target, levels, internalformat, width, height); 10222 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10223 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10224 10225 void *pointerArgs[] = { 10226 }; 10227 10228 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10229 threadStartTime, threadEndTime, 10230 &glmsg, pointerArgs); 10231 glContext->traceGLMessage(&glmsg); 10232 } 10233 10234 void GLTrace_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { 10235 GLMessage glmsg; 10236 GLTraceContext *glContext = getGLTraceContext(); 10237 10238 glmsg.set_function(GLMessage::glTexStorage3D); 10239 10240 // copy argument target 10241 GLMessage_DataType *arg_target = glmsg.add_args(); 10242 arg_target->set_isarray(false); 10243 arg_target->set_type(GLMessage::DataType::ENUM); 10244 arg_target->add_intvalue((int)target); 10245 10246 // copy argument levels 10247 GLMessage_DataType *arg_levels = glmsg.add_args(); 10248 arg_levels->set_isarray(false); 10249 arg_levels->set_type(GLMessage::DataType::INT); 10250 arg_levels->add_intvalue(levels); 10251 10252 // copy argument internalformat 10253 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 10254 arg_internalformat->set_isarray(false); 10255 arg_internalformat->set_type(GLMessage::DataType::ENUM); 10256 arg_internalformat->add_intvalue((int)internalformat); 10257 10258 // copy argument width 10259 GLMessage_DataType *arg_width = glmsg.add_args(); 10260 arg_width->set_isarray(false); 10261 arg_width->set_type(GLMessage::DataType::INT); 10262 arg_width->add_intvalue(width); 10263 10264 // copy argument height 10265 GLMessage_DataType *arg_height = glmsg.add_args(); 10266 arg_height->set_isarray(false); 10267 arg_height->set_type(GLMessage::DataType::INT); 10268 arg_height->add_intvalue(height); 10269 10270 // copy argument depth 10271 GLMessage_DataType *arg_depth = glmsg.add_args(); 10272 arg_depth->set_isarray(false); 10273 arg_depth->set_type(GLMessage::DataType::INT); 10274 arg_depth->add_intvalue(depth); 10275 10276 // call function 10277 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10278 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10279 glContext->hooks->gl.glTexStorage3D(target, levels, internalformat, width, height, depth); 10280 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10281 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10282 10283 void *pointerArgs[] = { 10284 }; 10285 10286 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10287 threadStartTime, threadEndTime, 10288 &glmsg, pointerArgs); 10289 glContext->traceGLMessage(&glmsg); 10290 } 10291 10292 void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params) { 10293 GLMessage glmsg; 10294 GLTraceContext *glContext = getGLTraceContext(); 10295 10296 glmsg.set_function(GLMessage::glGetInternalformativ); 10297 10298 // copy argument target 10299 GLMessage_DataType *arg_target = glmsg.add_args(); 10300 arg_target->set_isarray(false); 10301 arg_target->set_type(GLMessage::DataType::ENUM); 10302 arg_target->add_intvalue((int)target); 10303 10304 // copy argument internalformat 10305 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 10306 arg_internalformat->set_isarray(false); 10307 arg_internalformat->set_type(GLMessage::DataType::ENUM); 10308 arg_internalformat->add_intvalue((int)internalformat); 10309 10310 // copy argument pname 10311 GLMessage_DataType *arg_pname = glmsg.add_args(); 10312 arg_pname->set_isarray(false); 10313 arg_pname->set_type(GLMessage::DataType::ENUM); 10314 arg_pname->add_intvalue((int)pname); 10315 10316 // copy argument bufSize 10317 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 10318 arg_bufSize->set_isarray(false); 10319 arg_bufSize->set_type(GLMessage::DataType::INT); 10320 arg_bufSize->add_intvalue(bufSize); 10321 10322 // copy argument params 10323 GLMessage_DataType *arg_params = glmsg.add_args(); 10324 arg_params->set_isarray(false); 10325 arg_params->set_type(GLMessage::DataType::INT64); 10326 arg_params->add_int64value((uintptr_t)params); 10327 10328 // call function 10329 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10330 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10331 glContext->hooks->gl.glGetInternalformativ(target, internalformat, pname, bufSize, params); 10332 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10333 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10334 10335 void *pointerArgs[] = { 10336 (void *) params, 10337 }; 10338 10339 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10340 threadStartTime, threadEndTime, 10341 &glmsg, pointerArgs); 10342 glContext->traceGLMessage(&glmsg); 10343 } 10344 10345 void GLTrace_glDispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z) { 10346 GLMessage glmsg; 10347 GLTraceContext *glContext = getGLTraceContext(); 10348 10349 glmsg.set_function(GLMessage::glDispatchCompute); 10350 10351 // copy argument num_groups_x 10352 GLMessage_DataType *arg_num_groups_x = glmsg.add_args(); 10353 arg_num_groups_x->set_isarray(false); 10354 arg_num_groups_x->set_type(GLMessage::DataType::INT); 10355 arg_num_groups_x->add_intvalue(num_groups_x); 10356 10357 // copy argument num_groups_y 10358 GLMessage_DataType *arg_num_groups_y = glmsg.add_args(); 10359 arg_num_groups_y->set_isarray(false); 10360 arg_num_groups_y->set_type(GLMessage::DataType::INT); 10361 arg_num_groups_y->add_intvalue(num_groups_y); 10362 10363 // copy argument num_groups_z 10364 GLMessage_DataType *arg_num_groups_z = glmsg.add_args(); 10365 arg_num_groups_z->set_isarray(false); 10366 arg_num_groups_z->set_type(GLMessage::DataType::INT); 10367 arg_num_groups_z->add_intvalue(num_groups_z); 10368 10369 // call function 10370 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10371 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10372 glContext->hooks->gl.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); 10373 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10374 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10375 10376 void *pointerArgs[] = { 10377 }; 10378 10379 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10380 threadStartTime, threadEndTime, 10381 &glmsg, pointerArgs); 10382 glContext->traceGLMessage(&glmsg); 10383 } 10384 10385 void GLTrace_glDispatchComputeIndirect(GLintptr indirect) { 10386 GLMessage glmsg; 10387 GLTraceContext *glContext = getGLTraceContext(); 10388 10389 glmsg.set_function(GLMessage::glDispatchComputeIndirect); 10390 10391 // copy argument indirect 10392 GLMessage_DataType *arg_indirect = glmsg.add_args(); 10393 arg_indirect->set_isarray(false); 10394 arg_indirect->set_type(GLMessage::DataType::INT); 10395 arg_indirect->add_intvalue(indirect); 10396 10397 // call function 10398 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10399 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10400 glContext->hooks->gl.glDispatchComputeIndirect(indirect); 10401 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10402 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10403 10404 void *pointerArgs[] = { 10405 }; 10406 10407 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10408 threadStartTime, threadEndTime, 10409 &glmsg, pointerArgs); 10410 glContext->traceGLMessage(&glmsg); 10411 } 10412 10413 void GLTrace_glDrawArraysIndirect(GLenum mode, const void * indirect) { 10414 GLMessage glmsg; 10415 GLTraceContext *glContext = getGLTraceContext(); 10416 10417 glmsg.set_function(GLMessage::glDrawArraysIndirect); 10418 10419 // copy argument mode 10420 GLMessage_DataType *arg_mode = glmsg.add_args(); 10421 arg_mode->set_isarray(false); 10422 arg_mode->set_type(GLMessage::DataType::ENUM); 10423 arg_mode->add_intvalue((int)mode); 10424 10425 // copy argument indirect 10426 GLMessage_DataType *arg_indirect = glmsg.add_args(); 10427 arg_indirect->set_isarray(false); 10428 arg_indirect->set_type(GLMessage::DataType::INT64); 10429 arg_indirect->add_int64value((uintptr_t)indirect); 10430 10431 // call function 10432 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10433 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10434 glContext->hooks->gl.glDrawArraysIndirect(mode, indirect); 10435 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10436 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10437 10438 void *pointerArgs[] = { 10439 (void *) indirect, 10440 }; 10441 10442 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10443 threadStartTime, threadEndTime, 10444 &glmsg, pointerArgs); 10445 glContext->traceGLMessage(&glmsg); 10446 } 10447 10448 void GLTrace_glDrawElementsIndirect(GLenum mode, GLenum type, const void * indirect) { 10449 GLMessage glmsg; 10450 GLTraceContext *glContext = getGLTraceContext(); 10451 10452 glmsg.set_function(GLMessage::glDrawElementsIndirect); 10453 10454 // copy argument mode 10455 GLMessage_DataType *arg_mode = glmsg.add_args(); 10456 arg_mode->set_isarray(false); 10457 arg_mode->set_type(GLMessage::DataType::ENUM); 10458 arg_mode->add_intvalue((int)mode); 10459 10460 // copy argument type 10461 GLMessage_DataType *arg_type = glmsg.add_args(); 10462 arg_type->set_isarray(false); 10463 arg_type->set_type(GLMessage::DataType::ENUM); 10464 arg_type->add_intvalue((int)type); 10465 10466 // copy argument indirect 10467 GLMessage_DataType *arg_indirect = glmsg.add_args(); 10468 arg_indirect->set_isarray(false); 10469 arg_indirect->set_type(GLMessage::DataType::INT64); 10470 arg_indirect->add_int64value((uintptr_t)indirect); 10471 10472 // call function 10473 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10474 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10475 glContext->hooks->gl.glDrawElementsIndirect(mode, type, indirect); 10476 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10477 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10478 10479 void *pointerArgs[] = { 10480 (void *) indirect, 10481 }; 10482 10483 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10484 threadStartTime, threadEndTime, 10485 &glmsg, pointerArgs); 10486 glContext->traceGLMessage(&glmsg); 10487 } 10488 10489 void GLTrace_glFramebufferParameteri(GLenum target, GLenum pname, GLint param) { 10490 GLMessage glmsg; 10491 GLTraceContext *glContext = getGLTraceContext(); 10492 10493 glmsg.set_function(GLMessage::glFramebufferParameteri); 10494 10495 // copy argument target 10496 GLMessage_DataType *arg_target = glmsg.add_args(); 10497 arg_target->set_isarray(false); 10498 arg_target->set_type(GLMessage::DataType::ENUM); 10499 arg_target->add_intvalue((int)target); 10500 10501 // copy argument pname 10502 GLMessage_DataType *arg_pname = glmsg.add_args(); 10503 arg_pname->set_isarray(false); 10504 arg_pname->set_type(GLMessage::DataType::ENUM); 10505 arg_pname->add_intvalue((int)pname); 10506 10507 // copy argument param 10508 GLMessage_DataType *arg_param = glmsg.add_args(); 10509 arg_param->set_isarray(false); 10510 arg_param->set_type(GLMessage::DataType::INT); 10511 arg_param->add_intvalue(param); 10512 10513 // call function 10514 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10515 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10516 glContext->hooks->gl.glFramebufferParameteri(target, pname, param); 10517 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10518 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10519 10520 void *pointerArgs[] = { 10521 }; 10522 10523 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10524 threadStartTime, threadEndTime, 10525 &glmsg, pointerArgs); 10526 glContext->traceGLMessage(&glmsg); 10527 } 10528 10529 void GLTrace_glGetFramebufferParameteriv(GLenum target, GLenum pname, GLint * params) { 10530 GLMessage glmsg; 10531 GLTraceContext *glContext = getGLTraceContext(); 10532 10533 glmsg.set_function(GLMessage::glGetFramebufferParameteriv); 10534 10535 // copy argument target 10536 GLMessage_DataType *arg_target = glmsg.add_args(); 10537 arg_target->set_isarray(false); 10538 arg_target->set_type(GLMessage::DataType::ENUM); 10539 arg_target->add_intvalue((int)target); 10540 10541 // copy argument pname 10542 GLMessage_DataType *arg_pname = glmsg.add_args(); 10543 arg_pname->set_isarray(false); 10544 arg_pname->set_type(GLMessage::DataType::ENUM); 10545 arg_pname->add_intvalue((int)pname); 10546 10547 // copy argument params 10548 GLMessage_DataType *arg_params = glmsg.add_args(); 10549 arg_params->set_isarray(false); 10550 arg_params->set_type(GLMessage::DataType::INT64); 10551 arg_params->add_int64value((uintptr_t)params); 10552 10553 // call function 10554 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10555 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10556 glContext->hooks->gl.glGetFramebufferParameteriv(target, pname, params); 10557 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10558 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10559 10560 void *pointerArgs[] = { 10561 (void *) params, 10562 }; 10563 10564 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10565 threadStartTime, threadEndTime, 10566 &glmsg, pointerArgs); 10567 glContext->traceGLMessage(&glmsg); 10568 } 10569 10570 void GLTrace_glGetProgramInterfaceiv(GLuint program, GLenum programInterface, GLenum pname, GLint * params) { 10571 GLMessage glmsg; 10572 GLTraceContext *glContext = getGLTraceContext(); 10573 10574 glmsg.set_function(GLMessage::glGetProgramInterfaceiv); 10575 10576 // copy argument program 10577 GLMessage_DataType *arg_program = glmsg.add_args(); 10578 arg_program->set_isarray(false); 10579 arg_program->set_type(GLMessage::DataType::INT); 10580 arg_program->add_intvalue(program); 10581 10582 // copy argument programInterface 10583 GLMessage_DataType *arg_programInterface = glmsg.add_args(); 10584 arg_programInterface->set_isarray(false); 10585 arg_programInterface->set_type(GLMessage::DataType::ENUM); 10586 arg_programInterface->add_intvalue((int)programInterface); 10587 10588 // copy argument pname 10589 GLMessage_DataType *arg_pname = glmsg.add_args(); 10590 arg_pname->set_isarray(false); 10591 arg_pname->set_type(GLMessage::DataType::ENUM); 10592 arg_pname->add_intvalue((int)pname); 10593 10594 // copy argument params 10595 GLMessage_DataType *arg_params = glmsg.add_args(); 10596 arg_params->set_isarray(false); 10597 arg_params->set_type(GLMessage::DataType::INT64); 10598 arg_params->add_int64value((uintptr_t)params); 10599 10600 // call function 10601 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10602 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10603 glContext->hooks->gl.glGetProgramInterfaceiv(program, programInterface, pname, params); 10604 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10605 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10606 10607 void *pointerArgs[] = { 10608 (void *) params, 10609 }; 10610 10611 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10612 threadStartTime, threadEndTime, 10613 &glmsg, pointerArgs); 10614 glContext->traceGLMessage(&glmsg); 10615 } 10616 10617 GLuint GLTrace_glGetProgramResourceIndex(GLuint program, GLenum programInterface, const GLchar * name) { 10618 GLMessage glmsg; 10619 GLTraceContext *glContext = getGLTraceContext(); 10620 10621 glmsg.set_function(GLMessage::glGetProgramResourceIndex); 10622 10623 // copy argument program 10624 GLMessage_DataType *arg_program = glmsg.add_args(); 10625 arg_program->set_isarray(false); 10626 arg_program->set_type(GLMessage::DataType::INT); 10627 arg_program->add_intvalue(program); 10628 10629 // copy argument programInterface 10630 GLMessage_DataType *arg_programInterface = glmsg.add_args(); 10631 arg_programInterface->set_isarray(false); 10632 arg_programInterface->set_type(GLMessage::DataType::ENUM); 10633 arg_programInterface->add_intvalue((int)programInterface); 10634 10635 // copy argument name 10636 GLMessage_DataType *arg_name = glmsg.add_args(); 10637 arg_name->set_isarray(false); 10638 arg_name->set_type(GLMessage::DataType::INT64); 10639 arg_name->add_int64value((uintptr_t)name); 10640 10641 // call function 10642 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10643 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10644 GLuint retValue = glContext->hooks->gl.glGetProgramResourceIndex(program, programInterface, name); 10645 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10646 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10647 10648 // set return value 10649 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 10650 rt->set_isarray(false); 10651 rt->set_type(GLMessage::DataType::INT); 10652 rt->add_intvalue(retValue); 10653 10654 void *pointerArgs[] = { 10655 (void *) name, 10656 }; 10657 10658 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10659 threadStartTime, threadEndTime, 10660 &glmsg, pointerArgs); 10661 glContext->traceGLMessage(&glmsg); 10662 10663 return retValue; 10664 } 10665 10666 void GLTrace_glGetProgramResourceName(GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name) { 10667 GLMessage glmsg; 10668 GLTraceContext *glContext = getGLTraceContext(); 10669 10670 glmsg.set_function(GLMessage::glGetProgramResourceName); 10671 10672 // copy argument program 10673 GLMessage_DataType *arg_program = glmsg.add_args(); 10674 arg_program->set_isarray(false); 10675 arg_program->set_type(GLMessage::DataType::INT); 10676 arg_program->add_intvalue(program); 10677 10678 // copy argument programInterface 10679 GLMessage_DataType *arg_programInterface = glmsg.add_args(); 10680 arg_programInterface->set_isarray(false); 10681 arg_programInterface->set_type(GLMessage::DataType::ENUM); 10682 arg_programInterface->add_intvalue((int)programInterface); 10683 10684 // copy argument index 10685 GLMessage_DataType *arg_index = glmsg.add_args(); 10686 arg_index->set_isarray(false); 10687 arg_index->set_type(GLMessage::DataType::INT); 10688 arg_index->add_intvalue(index); 10689 10690 // copy argument bufSize 10691 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 10692 arg_bufSize->set_isarray(false); 10693 arg_bufSize->set_type(GLMessage::DataType::INT); 10694 arg_bufSize->add_intvalue(bufSize); 10695 10696 // copy argument length 10697 GLMessage_DataType *arg_length = glmsg.add_args(); 10698 arg_length->set_isarray(false); 10699 arg_length->set_type(GLMessage::DataType::INT64); 10700 arg_length->add_int64value((uintptr_t)length); 10701 10702 // copy argument name 10703 GLMessage_DataType *arg_name = glmsg.add_args(); 10704 arg_name->set_isarray(false); 10705 arg_name->set_type(GLMessage::DataType::INT64); 10706 arg_name->add_int64value((uintptr_t)name); 10707 10708 // call function 10709 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10710 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10711 glContext->hooks->gl.glGetProgramResourceName(program, programInterface, index, bufSize, length, name); 10712 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10713 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10714 10715 void *pointerArgs[] = { 10716 (void *) length, 10717 (void *) name, 10718 }; 10719 10720 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10721 threadStartTime, threadEndTime, 10722 &glmsg, pointerArgs); 10723 glContext->traceGLMessage(&glmsg); 10724 } 10725 10726 void GLTrace_glGetProgramResourceiv(GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params) { 10727 GLMessage glmsg; 10728 GLTraceContext *glContext = getGLTraceContext(); 10729 10730 glmsg.set_function(GLMessage::glGetProgramResourceiv); 10731 10732 // copy argument program 10733 GLMessage_DataType *arg_program = glmsg.add_args(); 10734 arg_program->set_isarray(false); 10735 arg_program->set_type(GLMessage::DataType::INT); 10736 arg_program->add_intvalue(program); 10737 10738 // copy argument programInterface 10739 GLMessage_DataType *arg_programInterface = glmsg.add_args(); 10740 arg_programInterface->set_isarray(false); 10741 arg_programInterface->set_type(GLMessage::DataType::ENUM); 10742 arg_programInterface->add_intvalue((int)programInterface); 10743 10744 // copy argument index 10745 GLMessage_DataType *arg_index = glmsg.add_args(); 10746 arg_index->set_isarray(false); 10747 arg_index->set_type(GLMessage::DataType::INT); 10748 arg_index->add_intvalue(index); 10749 10750 // copy argument propCount 10751 GLMessage_DataType *arg_propCount = glmsg.add_args(); 10752 arg_propCount->set_isarray(false); 10753 arg_propCount->set_type(GLMessage::DataType::INT); 10754 arg_propCount->add_intvalue(propCount); 10755 10756 // copy argument props 10757 GLMessage_DataType *arg_props = glmsg.add_args(); 10758 arg_props->set_isarray(false); 10759 arg_props->set_type(GLMessage::DataType::INT64); 10760 arg_props->add_int64value((uintptr_t)props); 10761 10762 // copy argument bufSize 10763 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 10764 arg_bufSize->set_isarray(false); 10765 arg_bufSize->set_type(GLMessage::DataType::INT); 10766 arg_bufSize->add_intvalue(bufSize); 10767 10768 // copy argument length 10769 GLMessage_DataType *arg_length = glmsg.add_args(); 10770 arg_length->set_isarray(false); 10771 arg_length->set_type(GLMessage::DataType::INT64); 10772 arg_length->add_int64value((uintptr_t)length); 10773 10774 // copy argument params 10775 GLMessage_DataType *arg_params = glmsg.add_args(); 10776 arg_params->set_isarray(false); 10777 arg_params->set_type(GLMessage::DataType::INT64); 10778 arg_params->add_int64value((uintptr_t)params); 10779 10780 // call function 10781 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10782 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10783 glContext->hooks->gl.glGetProgramResourceiv(program, programInterface, index, propCount, props, bufSize, length, params); 10784 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10785 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10786 10787 void *pointerArgs[] = { 10788 (void *) props, 10789 (void *) length, 10790 (void *) params, 10791 }; 10792 10793 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10794 threadStartTime, threadEndTime, 10795 &glmsg, pointerArgs); 10796 glContext->traceGLMessage(&glmsg); 10797 } 10798 10799 GLint GLTrace_glGetProgramResourceLocation(GLuint program, GLenum programInterface, const GLchar * name) { 10800 GLMessage glmsg; 10801 GLTraceContext *glContext = getGLTraceContext(); 10802 10803 glmsg.set_function(GLMessage::glGetProgramResourceLocation); 10804 10805 // copy argument program 10806 GLMessage_DataType *arg_program = glmsg.add_args(); 10807 arg_program->set_isarray(false); 10808 arg_program->set_type(GLMessage::DataType::INT); 10809 arg_program->add_intvalue(program); 10810 10811 // copy argument programInterface 10812 GLMessage_DataType *arg_programInterface = glmsg.add_args(); 10813 arg_programInterface->set_isarray(false); 10814 arg_programInterface->set_type(GLMessage::DataType::ENUM); 10815 arg_programInterface->add_intvalue((int)programInterface); 10816 10817 // copy argument name 10818 GLMessage_DataType *arg_name = glmsg.add_args(); 10819 arg_name->set_isarray(false); 10820 arg_name->set_type(GLMessage::DataType::INT64); 10821 arg_name->add_int64value((uintptr_t)name); 10822 10823 // call function 10824 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10825 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10826 GLint retValue = glContext->hooks->gl.glGetProgramResourceLocation(program, programInterface, name); 10827 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10828 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10829 10830 // set return value 10831 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 10832 rt->set_isarray(false); 10833 rt->set_type(GLMessage::DataType::INT); 10834 rt->add_intvalue(retValue); 10835 10836 void *pointerArgs[] = { 10837 (void *) name, 10838 }; 10839 10840 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10841 threadStartTime, threadEndTime, 10842 &glmsg, pointerArgs); 10843 glContext->traceGLMessage(&glmsg); 10844 10845 return retValue; 10846 } 10847 10848 void GLTrace_glUseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program) { 10849 GLMessage glmsg; 10850 GLTraceContext *glContext = getGLTraceContext(); 10851 10852 glmsg.set_function(GLMessage::glUseProgramStages); 10853 10854 // copy argument pipeline 10855 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 10856 arg_pipeline->set_isarray(false); 10857 arg_pipeline->set_type(GLMessage::DataType::INT); 10858 arg_pipeline->add_intvalue(pipeline); 10859 10860 // copy argument stages 10861 GLMessage_DataType *arg_stages = glmsg.add_args(); 10862 arg_stages->set_isarray(false); 10863 arg_stages->set_type(GLMessage::DataType::INT); 10864 arg_stages->add_intvalue(stages); 10865 10866 // copy argument program 10867 GLMessage_DataType *arg_program = glmsg.add_args(); 10868 arg_program->set_isarray(false); 10869 arg_program->set_type(GLMessage::DataType::INT); 10870 arg_program->add_intvalue(program); 10871 10872 // call function 10873 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10874 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10875 glContext->hooks->gl.glUseProgramStages(pipeline, stages, program); 10876 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10877 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10878 10879 void *pointerArgs[] = { 10880 }; 10881 10882 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10883 threadStartTime, threadEndTime, 10884 &glmsg, pointerArgs); 10885 glContext->traceGLMessage(&glmsg); 10886 } 10887 10888 void GLTrace_glActiveShaderProgram(GLuint pipeline, GLuint program) { 10889 GLMessage glmsg; 10890 GLTraceContext *glContext = getGLTraceContext(); 10891 10892 glmsg.set_function(GLMessage::glActiveShaderProgram); 10893 10894 // copy argument pipeline 10895 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 10896 arg_pipeline->set_isarray(false); 10897 arg_pipeline->set_type(GLMessage::DataType::INT); 10898 arg_pipeline->add_intvalue(pipeline); 10899 10900 // copy argument program 10901 GLMessage_DataType *arg_program = glmsg.add_args(); 10902 arg_program->set_isarray(false); 10903 arg_program->set_type(GLMessage::DataType::INT); 10904 arg_program->add_intvalue(program); 10905 10906 // call function 10907 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10908 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10909 glContext->hooks->gl.glActiveShaderProgram(pipeline, program); 10910 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10911 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10912 10913 void *pointerArgs[] = { 10914 }; 10915 10916 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10917 threadStartTime, threadEndTime, 10918 &glmsg, pointerArgs); 10919 glContext->traceGLMessage(&glmsg); 10920 } 10921 10922 GLuint GLTrace_glCreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const* strings) { 10923 GLMessage glmsg; 10924 GLTraceContext *glContext = getGLTraceContext(); 10925 10926 glmsg.set_function(GLMessage::glCreateShaderProgramv); 10927 10928 // copy argument type 10929 GLMessage_DataType *arg_type = glmsg.add_args(); 10930 arg_type->set_isarray(false); 10931 arg_type->set_type(GLMessage::DataType::ENUM); 10932 arg_type->add_intvalue((int)type); 10933 10934 // copy argument count 10935 GLMessage_DataType *arg_count = glmsg.add_args(); 10936 arg_count->set_isarray(false); 10937 arg_count->set_type(GLMessage::DataType::INT); 10938 arg_count->add_intvalue(count); 10939 10940 // copy argument strings 10941 GLMessage_DataType *arg_strings = glmsg.add_args(); 10942 arg_strings->set_isarray(false); 10943 arg_strings->set_type(GLMessage::DataType::INT64); 10944 arg_strings->add_int64value((uintptr_t)strings); 10945 10946 // call function 10947 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10948 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10949 GLuint retValue = glContext->hooks->gl.glCreateShaderProgramv(type, count, strings); 10950 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10951 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10952 10953 // set return value 10954 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 10955 rt->set_isarray(false); 10956 rt->set_type(GLMessage::DataType::INT); 10957 rt->add_intvalue(retValue); 10958 10959 void *pointerArgs[] = { 10960 (void *) strings, 10961 }; 10962 10963 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10964 threadStartTime, threadEndTime, 10965 &glmsg, pointerArgs); 10966 glContext->traceGLMessage(&glmsg); 10967 10968 return retValue; 10969 } 10970 10971 void GLTrace_glBindProgramPipeline(GLuint pipeline) { 10972 GLMessage glmsg; 10973 GLTraceContext *glContext = getGLTraceContext(); 10974 10975 glmsg.set_function(GLMessage::glBindProgramPipeline); 10976 10977 // copy argument pipeline 10978 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 10979 arg_pipeline->set_isarray(false); 10980 arg_pipeline->set_type(GLMessage::DataType::INT); 10981 arg_pipeline->add_intvalue(pipeline); 10982 10983 // call function 10984 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 10985 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 10986 glContext->hooks->gl.glBindProgramPipeline(pipeline); 10987 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 10988 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 10989 10990 void *pointerArgs[] = { 10991 }; 10992 10993 fixupGLMessage(glContext, wallStartTime, wallEndTime, 10994 threadStartTime, threadEndTime, 10995 &glmsg, pointerArgs); 10996 glContext->traceGLMessage(&glmsg); 10997 } 10998 10999 void GLTrace_glDeleteProgramPipelines(GLsizei n, const GLuint * pipelines) { 11000 GLMessage glmsg; 11001 GLTraceContext *glContext = getGLTraceContext(); 11002 11003 glmsg.set_function(GLMessage::glDeleteProgramPipelines); 11004 11005 // copy argument n 11006 GLMessage_DataType *arg_n = glmsg.add_args(); 11007 arg_n->set_isarray(false); 11008 arg_n->set_type(GLMessage::DataType::INT); 11009 arg_n->add_intvalue(n); 11010 11011 // copy argument pipelines 11012 GLMessage_DataType *arg_pipelines = glmsg.add_args(); 11013 arg_pipelines->set_isarray(false); 11014 arg_pipelines->set_type(GLMessage::DataType::INT64); 11015 arg_pipelines->add_int64value((uintptr_t)pipelines); 11016 11017 // call function 11018 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11019 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11020 glContext->hooks->gl.glDeleteProgramPipelines(n, pipelines); 11021 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11022 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11023 11024 void *pointerArgs[] = { 11025 (void *) pipelines, 11026 }; 11027 11028 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11029 threadStartTime, threadEndTime, 11030 &glmsg, pointerArgs); 11031 glContext->traceGLMessage(&glmsg); 11032 } 11033 11034 void GLTrace_glGenProgramPipelines(GLsizei n, GLuint * pipelines) { 11035 GLMessage glmsg; 11036 GLTraceContext *glContext = getGLTraceContext(); 11037 11038 glmsg.set_function(GLMessage::glGenProgramPipelines); 11039 11040 // copy argument n 11041 GLMessage_DataType *arg_n = glmsg.add_args(); 11042 arg_n->set_isarray(false); 11043 arg_n->set_type(GLMessage::DataType::INT); 11044 arg_n->add_intvalue(n); 11045 11046 // copy argument pipelines 11047 GLMessage_DataType *arg_pipelines = glmsg.add_args(); 11048 arg_pipelines->set_isarray(false); 11049 arg_pipelines->set_type(GLMessage::DataType::INT64); 11050 arg_pipelines->add_int64value((uintptr_t)pipelines); 11051 11052 // call function 11053 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11054 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11055 glContext->hooks->gl.glGenProgramPipelines(n, pipelines); 11056 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11057 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11058 11059 void *pointerArgs[] = { 11060 (void *) pipelines, 11061 }; 11062 11063 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11064 threadStartTime, threadEndTime, 11065 &glmsg, pointerArgs); 11066 glContext->traceGLMessage(&glmsg); 11067 } 11068 11069 GLboolean GLTrace_glIsProgramPipeline(GLuint pipeline) { 11070 GLMessage glmsg; 11071 GLTraceContext *glContext = getGLTraceContext(); 11072 11073 glmsg.set_function(GLMessage::glIsProgramPipeline); 11074 11075 // copy argument pipeline 11076 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 11077 arg_pipeline->set_isarray(false); 11078 arg_pipeline->set_type(GLMessage::DataType::INT); 11079 arg_pipeline->add_intvalue(pipeline); 11080 11081 // call function 11082 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11083 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11084 GLboolean retValue = glContext->hooks->gl.glIsProgramPipeline(pipeline); 11085 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11086 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11087 11088 // set return value 11089 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 11090 rt->set_isarray(false); 11091 rt->set_type(GLMessage::DataType::BOOL); 11092 rt->add_boolvalue(retValue); 11093 11094 void *pointerArgs[] = { 11095 }; 11096 11097 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11098 threadStartTime, threadEndTime, 11099 &glmsg, pointerArgs); 11100 glContext->traceGLMessage(&glmsg); 11101 11102 return retValue; 11103 } 11104 11105 void GLTrace_glGetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint * params) { 11106 GLMessage glmsg; 11107 GLTraceContext *glContext = getGLTraceContext(); 11108 11109 glmsg.set_function(GLMessage::glGetProgramPipelineiv); 11110 11111 // copy argument pipeline 11112 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 11113 arg_pipeline->set_isarray(false); 11114 arg_pipeline->set_type(GLMessage::DataType::INT); 11115 arg_pipeline->add_intvalue(pipeline); 11116 11117 // copy argument pname 11118 GLMessage_DataType *arg_pname = glmsg.add_args(); 11119 arg_pname->set_isarray(false); 11120 arg_pname->set_type(GLMessage::DataType::ENUM); 11121 arg_pname->add_intvalue((int)pname); 11122 11123 // copy argument params 11124 GLMessage_DataType *arg_params = glmsg.add_args(); 11125 arg_params->set_isarray(false); 11126 arg_params->set_type(GLMessage::DataType::INT64); 11127 arg_params->add_int64value((uintptr_t)params); 11128 11129 // call function 11130 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11131 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11132 glContext->hooks->gl.glGetProgramPipelineiv(pipeline, pname, params); 11133 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11134 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11135 11136 void *pointerArgs[] = { 11137 (void *) params, 11138 }; 11139 11140 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11141 threadStartTime, threadEndTime, 11142 &glmsg, pointerArgs); 11143 glContext->traceGLMessage(&glmsg); 11144 } 11145 11146 void GLTrace_glProgramUniform1i(GLuint program, GLint location, GLint v0) { 11147 GLMessage glmsg; 11148 GLTraceContext *glContext = getGLTraceContext(); 11149 11150 glmsg.set_function(GLMessage::glProgramUniform1i); 11151 11152 // copy argument program 11153 GLMessage_DataType *arg_program = glmsg.add_args(); 11154 arg_program->set_isarray(false); 11155 arg_program->set_type(GLMessage::DataType::INT); 11156 arg_program->add_intvalue(program); 11157 11158 // copy argument location 11159 GLMessage_DataType *arg_location = glmsg.add_args(); 11160 arg_location->set_isarray(false); 11161 arg_location->set_type(GLMessage::DataType::INT); 11162 arg_location->add_intvalue(location); 11163 11164 // copy argument v0 11165 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11166 arg_v0->set_isarray(false); 11167 arg_v0->set_type(GLMessage::DataType::INT); 11168 arg_v0->add_intvalue(v0); 11169 11170 // call function 11171 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11172 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11173 glContext->hooks->gl.glProgramUniform1i(program, location, v0); 11174 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11175 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11176 11177 void *pointerArgs[] = { 11178 }; 11179 11180 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11181 threadStartTime, threadEndTime, 11182 &glmsg, pointerArgs); 11183 glContext->traceGLMessage(&glmsg); 11184 } 11185 11186 void GLTrace_glProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1) { 11187 GLMessage glmsg; 11188 GLTraceContext *glContext = getGLTraceContext(); 11189 11190 glmsg.set_function(GLMessage::glProgramUniform2i); 11191 11192 // copy argument program 11193 GLMessage_DataType *arg_program = glmsg.add_args(); 11194 arg_program->set_isarray(false); 11195 arg_program->set_type(GLMessage::DataType::INT); 11196 arg_program->add_intvalue(program); 11197 11198 // copy argument location 11199 GLMessage_DataType *arg_location = glmsg.add_args(); 11200 arg_location->set_isarray(false); 11201 arg_location->set_type(GLMessage::DataType::INT); 11202 arg_location->add_intvalue(location); 11203 11204 // copy argument v0 11205 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11206 arg_v0->set_isarray(false); 11207 arg_v0->set_type(GLMessage::DataType::INT); 11208 arg_v0->add_intvalue(v0); 11209 11210 // copy argument v1 11211 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11212 arg_v1->set_isarray(false); 11213 arg_v1->set_type(GLMessage::DataType::INT); 11214 arg_v1->add_intvalue(v1); 11215 11216 // call function 11217 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11218 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11219 glContext->hooks->gl.glProgramUniform2i(program, location, v0, v1); 11220 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11221 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11222 11223 void *pointerArgs[] = { 11224 }; 11225 11226 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11227 threadStartTime, threadEndTime, 11228 &glmsg, pointerArgs); 11229 glContext->traceGLMessage(&glmsg); 11230 } 11231 11232 void GLTrace_glProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { 11233 GLMessage glmsg; 11234 GLTraceContext *glContext = getGLTraceContext(); 11235 11236 glmsg.set_function(GLMessage::glProgramUniform3i); 11237 11238 // copy argument program 11239 GLMessage_DataType *arg_program = glmsg.add_args(); 11240 arg_program->set_isarray(false); 11241 arg_program->set_type(GLMessage::DataType::INT); 11242 arg_program->add_intvalue(program); 11243 11244 // copy argument location 11245 GLMessage_DataType *arg_location = glmsg.add_args(); 11246 arg_location->set_isarray(false); 11247 arg_location->set_type(GLMessage::DataType::INT); 11248 arg_location->add_intvalue(location); 11249 11250 // copy argument v0 11251 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11252 arg_v0->set_isarray(false); 11253 arg_v0->set_type(GLMessage::DataType::INT); 11254 arg_v0->add_intvalue(v0); 11255 11256 // copy argument v1 11257 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11258 arg_v1->set_isarray(false); 11259 arg_v1->set_type(GLMessage::DataType::INT); 11260 arg_v1->add_intvalue(v1); 11261 11262 // copy argument v2 11263 GLMessage_DataType *arg_v2 = glmsg.add_args(); 11264 arg_v2->set_isarray(false); 11265 arg_v2->set_type(GLMessage::DataType::INT); 11266 arg_v2->add_intvalue(v2); 11267 11268 // call function 11269 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11270 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11271 glContext->hooks->gl.glProgramUniform3i(program, location, v0, v1, v2); 11272 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11273 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11274 11275 void *pointerArgs[] = { 11276 }; 11277 11278 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11279 threadStartTime, threadEndTime, 11280 &glmsg, pointerArgs); 11281 glContext->traceGLMessage(&glmsg); 11282 } 11283 11284 void GLTrace_glProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { 11285 GLMessage glmsg; 11286 GLTraceContext *glContext = getGLTraceContext(); 11287 11288 glmsg.set_function(GLMessage::glProgramUniform4i); 11289 11290 // copy argument program 11291 GLMessage_DataType *arg_program = glmsg.add_args(); 11292 arg_program->set_isarray(false); 11293 arg_program->set_type(GLMessage::DataType::INT); 11294 arg_program->add_intvalue(program); 11295 11296 // copy argument location 11297 GLMessage_DataType *arg_location = glmsg.add_args(); 11298 arg_location->set_isarray(false); 11299 arg_location->set_type(GLMessage::DataType::INT); 11300 arg_location->add_intvalue(location); 11301 11302 // copy argument v0 11303 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11304 arg_v0->set_isarray(false); 11305 arg_v0->set_type(GLMessage::DataType::INT); 11306 arg_v0->add_intvalue(v0); 11307 11308 // copy argument v1 11309 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11310 arg_v1->set_isarray(false); 11311 arg_v1->set_type(GLMessage::DataType::INT); 11312 arg_v1->add_intvalue(v1); 11313 11314 // copy argument v2 11315 GLMessage_DataType *arg_v2 = glmsg.add_args(); 11316 arg_v2->set_isarray(false); 11317 arg_v2->set_type(GLMessage::DataType::INT); 11318 arg_v2->add_intvalue(v2); 11319 11320 // copy argument v3 11321 GLMessage_DataType *arg_v3 = glmsg.add_args(); 11322 arg_v3->set_isarray(false); 11323 arg_v3->set_type(GLMessage::DataType::INT); 11324 arg_v3->add_intvalue(v3); 11325 11326 // call function 11327 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11328 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11329 glContext->hooks->gl.glProgramUniform4i(program, location, v0, v1, v2, v3); 11330 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11331 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11332 11333 void *pointerArgs[] = { 11334 }; 11335 11336 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11337 threadStartTime, threadEndTime, 11338 &glmsg, pointerArgs); 11339 glContext->traceGLMessage(&glmsg); 11340 } 11341 11342 void GLTrace_glProgramUniform1ui(GLuint program, GLint location, GLuint v0) { 11343 GLMessage glmsg; 11344 GLTraceContext *glContext = getGLTraceContext(); 11345 11346 glmsg.set_function(GLMessage::glProgramUniform1ui); 11347 11348 // copy argument program 11349 GLMessage_DataType *arg_program = glmsg.add_args(); 11350 arg_program->set_isarray(false); 11351 arg_program->set_type(GLMessage::DataType::INT); 11352 arg_program->add_intvalue(program); 11353 11354 // copy argument location 11355 GLMessage_DataType *arg_location = glmsg.add_args(); 11356 arg_location->set_isarray(false); 11357 arg_location->set_type(GLMessage::DataType::INT); 11358 arg_location->add_intvalue(location); 11359 11360 // copy argument v0 11361 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11362 arg_v0->set_isarray(false); 11363 arg_v0->set_type(GLMessage::DataType::INT); 11364 arg_v0->add_intvalue(v0); 11365 11366 // call function 11367 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11368 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11369 glContext->hooks->gl.glProgramUniform1ui(program, location, v0); 11370 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11371 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11372 11373 void *pointerArgs[] = { 11374 }; 11375 11376 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11377 threadStartTime, threadEndTime, 11378 &glmsg, pointerArgs); 11379 glContext->traceGLMessage(&glmsg); 11380 } 11381 11382 void GLTrace_glProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1) { 11383 GLMessage glmsg; 11384 GLTraceContext *glContext = getGLTraceContext(); 11385 11386 glmsg.set_function(GLMessage::glProgramUniform2ui); 11387 11388 // copy argument program 11389 GLMessage_DataType *arg_program = glmsg.add_args(); 11390 arg_program->set_isarray(false); 11391 arg_program->set_type(GLMessage::DataType::INT); 11392 arg_program->add_intvalue(program); 11393 11394 // copy argument location 11395 GLMessage_DataType *arg_location = glmsg.add_args(); 11396 arg_location->set_isarray(false); 11397 arg_location->set_type(GLMessage::DataType::INT); 11398 arg_location->add_intvalue(location); 11399 11400 // copy argument v0 11401 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11402 arg_v0->set_isarray(false); 11403 arg_v0->set_type(GLMessage::DataType::INT); 11404 arg_v0->add_intvalue(v0); 11405 11406 // copy argument v1 11407 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11408 arg_v1->set_isarray(false); 11409 arg_v1->set_type(GLMessage::DataType::INT); 11410 arg_v1->add_intvalue(v1); 11411 11412 // call function 11413 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11414 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11415 glContext->hooks->gl.glProgramUniform2ui(program, location, v0, v1); 11416 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11417 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11418 11419 void *pointerArgs[] = { 11420 }; 11421 11422 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11423 threadStartTime, threadEndTime, 11424 &glmsg, pointerArgs); 11425 glContext->traceGLMessage(&glmsg); 11426 } 11427 11428 void GLTrace_glProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { 11429 GLMessage glmsg; 11430 GLTraceContext *glContext = getGLTraceContext(); 11431 11432 glmsg.set_function(GLMessage::glProgramUniform3ui); 11433 11434 // copy argument program 11435 GLMessage_DataType *arg_program = glmsg.add_args(); 11436 arg_program->set_isarray(false); 11437 arg_program->set_type(GLMessage::DataType::INT); 11438 arg_program->add_intvalue(program); 11439 11440 // copy argument location 11441 GLMessage_DataType *arg_location = glmsg.add_args(); 11442 arg_location->set_isarray(false); 11443 arg_location->set_type(GLMessage::DataType::INT); 11444 arg_location->add_intvalue(location); 11445 11446 // copy argument v0 11447 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11448 arg_v0->set_isarray(false); 11449 arg_v0->set_type(GLMessage::DataType::INT); 11450 arg_v0->add_intvalue(v0); 11451 11452 // copy argument v1 11453 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11454 arg_v1->set_isarray(false); 11455 arg_v1->set_type(GLMessage::DataType::INT); 11456 arg_v1->add_intvalue(v1); 11457 11458 // copy argument v2 11459 GLMessage_DataType *arg_v2 = glmsg.add_args(); 11460 arg_v2->set_isarray(false); 11461 arg_v2->set_type(GLMessage::DataType::INT); 11462 arg_v2->add_intvalue(v2); 11463 11464 // call function 11465 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11466 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11467 glContext->hooks->gl.glProgramUniform3ui(program, location, v0, v1, v2); 11468 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11469 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11470 11471 void *pointerArgs[] = { 11472 }; 11473 11474 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11475 threadStartTime, threadEndTime, 11476 &glmsg, pointerArgs); 11477 glContext->traceGLMessage(&glmsg); 11478 } 11479 11480 void GLTrace_glProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { 11481 GLMessage glmsg; 11482 GLTraceContext *glContext = getGLTraceContext(); 11483 11484 glmsg.set_function(GLMessage::glProgramUniform4ui); 11485 11486 // copy argument program 11487 GLMessage_DataType *arg_program = glmsg.add_args(); 11488 arg_program->set_isarray(false); 11489 arg_program->set_type(GLMessage::DataType::INT); 11490 arg_program->add_intvalue(program); 11491 11492 // copy argument location 11493 GLMessage_DataType *arg_location = glmsg.add_args(); 11494 arg_location->set_isarray(false); 11495 arg_location->set_type(GLMessage::DataType::INT); 11496 arg_location->add_intvalue(location); 11497 11498 // copy argument v0 11499 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11500 arg_v0->set_isarray(false); 11501 arg_v0->set_type(GLMessage::DataType::INT); 11502 arg_v0->add_intvalue(v0); 11503 11504 // copy argument v1 11505 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11506 arg_v1->set_isarray(false); 11507 arg_v1->set_type(GLMessage::DataType::INT); 11508 arg_v1->add_intvalue(v1); 11509 11510 // copy argument v2 11511 GLMessage_DataType *arg_v2 = glmsg.add_args(); 11512 arg_v2->set_isarray(false); 11513 arg_v2->set_type(GLMessage::DataType::INT); 11514 arg_v2->add_intvalue(v2); 11515 11516 // copy argument v3 11517 GLMessage_DataType *arg_v3 = glmsg.add_args(); 11518 arg_v3->set_isarray(false); 11519 arg_v3->set_type(GLMessage::DataType::INT); 11520 arg_v3->add_intvalue(v3); 11521 11522 // call function 11523 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11524 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11525 glContext->hooks->gl.glProgramUniform4ui(program, location, v0, v1, v2, v3); 11526 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11527 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11528 11529 void *pointerArgs[] = { 11530 }; 11531 11532 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11533 threadStartTime, threadEndTime, 11534 &glmsg, pointerArgs); 11535 glContext->traceGLMessage(&glmsg); 11536 } 11537 11538 void GLTrace_glProgramUniform1f(GLuint program, GLint location, GLfloat v0) { 11539 GLMessage glmsg; 11540 GLTraceContext *glContext = getGLTraceContext(); 11541 11542 glmsg.set_function(GLMessage::glProgramUniform1f); 11543 11544 // copy argument program 11545 GLMessage_DataType *arg_program = glmsg.add_args(); 11546 arg_program->set_isarray(false); 11547 arg_program->set_type(GLMessage::DataType::INT); 11548 arg_program->add_intvalue(program); 11549 11550 // copy argument location 11551 GLMessage_DataType *arg_location = glmsg.add_args(); 11552 arg_location->set_isarray(false); 11553 arg_location->set_type(GLMessage::DataType::INT); 11554 arg_location->add_intvalue(location); 11555 11556 // copy argument v0 11557 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11558 arg_v0->set_isarray(false); 11559 arg_v0->set_type(GLMessage::DataType::FLOAT); 11560 arg_v0->add_floatvalue(v0); 11561 11562 // call function 11563 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11564 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11565 glContext->hooks->gl.glProgramUniform1f(program, location, v0); 11566 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11567 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11568 11569 void *pointerArgs[] = { 11570 }; 11571 11572 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11573 threadStartTime, threadEndTime, 11574 &glmsg, pointerArgs); 11575 glContext->traceGLMessage(&glmsg); 11576 } 11577 11578 void GLTrace_glProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1) { 11579 GLMessage glmsg; 11580 GLTraceContext *glContext = getGLTraceContext(); 11581 11582 glmsg.set_function(GLMessage::glProgramUniform2f); 11583 11584 // copy argument program 11585 GLMessage_DataType *arg_program = glmsg.add_args(); 11586 arg_program->set_isarray(false); 11587 arg_program->set_type(GLMessage::DataType::INT); 11588 arg_program->add_intvalue(program); 11589 11590 // copy argument location 11591 GLMessage_DataType *arg_location = glmsg.add_args(); 11592 arg_location->set_isarray(false); 11593 arg_location->set_type(GLMessage::DataType::INT); 11594 arg_location->add_intvalue(location); 11595 11596 // copy argument v0 11597 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11598 arg_v0->set_isarray(false); 11599 arg_v0->set_type(GLMessage::DataType::FLOAT); 11600 arg_v0->add_floatvalue(v0); 11601 11602 // copy argument v1 11603 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11604 arg_v1->set_isarray(false); 11605 arg_v1->set_type(GLMessage::DataType::FLOAT); 11606 arg_v1->add_floatvalue(v1); 11607 11608 // call function 11609 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11610 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11611 glContext->hooks->gl.glProgramUniform2f(program, location, v0, v1); 11612 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11613 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11614 11615 void *pointerArgs[] = { 11616 }; 11617 11618 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11619 threadStartTime, threadEndTime, 11620 &glmsg, pointerArgs); 11621 glContext->traceGLMessage(&glmsg); 11622 } 11623 11624 void GLTrace_glProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { 11625 GLMessage glmsg; 11626 GLTraceContext *glContext = getGLTraceContext(); 11627 11628 glmsg.set_function(GLMessage::glProgramUniform3f); 11629 11630 // copy argument program 11631 GLMessage_DataType *arg_program = glmsg.add_args(); 11632 arg_program->set_isarray(false); 11633 arg_program->set_type(GLMessage::DataType::INT); 11634 arg_program->add_intvalue(program); 11635 11636 // copy argument location 11637 GLMessage_DataType *arg_location = glmsg.add_args(); 11638 arg_location->set_isarray(false); 11639 arg_location->set_type(GLMessage::DataType::INT); 11640 arg_location->add_intvalue(location); 11641 11642 // copy argument v0 11643 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11644 arg_v0->set_isarray(false); 11645 arg_v0->set_type(GLMessage::DataType::FLOAT); 11646 arg_v0->add_floatvalue(v0); 11647 11648 // copy argument v1 11649 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11650 arg_v1->set_isarray(false); 11651 arg_v1->set_type(GLMessage::DataType::FLOAT); 11652 arg_v1->add_floatvalue(v1); 11653 11654 // copy argument v2 11655 GLMessage_DataType *arg_v2 = glmsg.add_args(); 11656 arg_v2->set_isarray(false); 11657 arg_v2->set_type(GLMessage::DataType::FLOAT); 11658 arg_v2->add_floatvalue(v2); 11659 11660 // call function 11661 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11662 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11663 glContext->hooks->gl.glProgramUniform3f(program, location, v0, v1, v2); 11664 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11665 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11666 11667 void *pointerArgs[] = { 11668 }; 11669 11670 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11671 threadStartTime, threadEndTime, 11672 &glmsg, pointerArgs); 11673 glContext->traceGLMessage(&glmsg); 11674 } 11675 11676 void GLTrace_glProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { 11677 GLMessage glmsg; 11678 GLTraceContext *glContext = getGLTraceContext(); 11679 11680 glmsg.set_function(GLMessage::glProgramUniform4f); 11681 11682 // copy argument program 11683 GLMessage_DataType *arg_program = glmsg.add_args(); 11684 arg_program->set_isarray(false); 11685 arg_program->set_type(GLMessage::DataType::INT); 11686 arg_program->add_intvalue(program); 11687 11688 // copy argument location 11689 GLMessage_DataType *arg_location = glmsg.add_args(); 11690 arg_location->set_isarray(false); 11691 arg_location->set_type(GLMessage::DataType::INT); 11692 arg_location->add_intvalue(location); 11693 11694 // copy argument v0 11695 GLMessage_DataType *arg_v0 = glmsg.add_args(); 11696 arg_v0->set_isarray(false); 11697 arg_v0->set_type(GLMessage::DataType::FLOAT); 11698 arg_v0->add_floatvalue(v0); 11699 11700 // copy argument v1 11701 GLMessage_DataType *arg_v1 = glmsg.add_args(); 11702 arg_v1->set_isarray(false); 11703 arg_v1->set_type(GLMessage::DataType::FLOAT); 11704 arg_v1->add_floatvalue(v1); 11705 11706 // copy argument v2 11707 GLMessage_DataType *arg_v2 = glmsg.add_args(); 11708 arg_v2->set_isarray(false); 11709 arg_v2->set_type(GLMessage::DataType::FLOAT); 11710 arg_v2->add_floatvalue(v2); 11711 11712 // copy argument v3 11713 GLMessage_DataType *arg_v3 = glmsg.add_args(); 11714 arg_v3->set_isarray(false); 11715 arg_v3->set_type(GLMessage::DataType::FLOAT); 11716 arg_v3->add_floatvalue(v3); 11717 11718 // call function 11719 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11720 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11721 glContext->hooks->gl.glProgramUniform4f(program, location, v0, v1, v2, v3); 11722 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11723 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11724 11725 void *pointerArgs[] = { 11726 }; 11727 11728 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11729 threadStartTime, threadEndTime, 11730 &glmsg, pointerArgs); 11731 glContext->traceGLMessage(&glmsg); 11732 } 11733 11734 void GLTrace_glProgramUniform1iv(GLuint program, GLint location, GLsizei count, const GLint * value) { 11735 GLMessage glmsg; 11736 GLTraceContext *glContext = getGLTraceContext(); 11737 11738 glmsg.set_function(GLMessage::glProgramUniform1iv); 11739 11740 // copy argument program 11741 GLMessage_DataType *arg_program = glmsg.add_args(); 11742 arg_program->set_isarray(false); 11743 arg_program->set_type(GLMessage::DataType::INT); 11744 arg_program->add_intvalue(program); 11745 11746 // copy argument location 11747 GLMessage_DataType *arg_location = glmsg.add_args(); 11748 arg_location->set_isarray(false); 11749 arg_location->set_type(GLMessage::DataType::INT); 11750 arg_location->add_intvalue(location); 11751 11752 // copy argument count 11753 GLMessage_DataType *arg_count = glmsg.add_args(); 11754 arg_count->set_isarray(false); 11755 arg_count->set_type(GLMessage::DataType::INT); 11756 arg_count->add_intvalue(count); 11757 11758 // copy argument value 11759 GLMessage_DataType *arg_value = glmsg.add_args(); 11760 arg_value->set_isarray(false); 11761 arg_value->set_type(GLMessage::DataType::INT64); 11762 arg_value->add_int64value((uintptr_t)value); 11763 11764 // call function 11765 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11766 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11767 glContext->hooks->gl.glProgramUniform1iv(program, location, count, value); 11768 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11769 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11770 11771 void *pointerArgs[] = { 11772 (void *) value, 11773 }; 11774 11775 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11776 threadStartTime, threadEndTime, 11777 &glmsg, pointerArgs); 11778 glContext->traceGLMessage(&glmsg); 11779 } 11780 11781 void GLTrace_glProgramUniform2iv(GLuint program, GLint location, GLsizei count, const GLint * value) { 11782 GLMessage glmsg; 11783 GLTraceContext *glContext = getGLTraceContext(); 11784 11785 glmsg.set_function(GLMessage::glProgramUniform2iv); 11786 11787 // copy argument program 11788 GLMessage_DataType *arg_program = glmsg.add_args(); 11789 arg_program->set_isarray(false); 11790 arg_program->set_type(GLMessage::DataType::INT); 11791 arg_program->add_intvalue(program); 11792 11793 // copy argument location 11794 GLMessage_DataType *arg_location = glmsg.add_args(); 11795 arg_location->set_isarray(false); 11796 arg_location->set_type(GLMessage::DataType::INT); 11797 arg_location->add_intvalue(location); 11798 11799 // copy argument count 11800 GLMessage_DataType *arg_count = glmsg.add_args(); 11801 arg_count->set_isarray(false); 11802 arg_count->set_type(GLMessage::DataType::INT); 11803 arg_count->add_intvalue(count); 11804 11805 // copy argument value 11806 GLMessage_DataType *arg_value = glmsg.add_args(); 11807 arg_value->set_isarray(false); 11808 arg_value->set_type(GLMessage::DataType::INT64); 11809 arg_value->add_int64value((uintptr_t)value); 11810 11811 // call function 11812 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11813 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11814 glContext->hooks->gl.glProgramUniform2iv(program, location, count, value); 11815 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11816 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11817 11818 void *pointerArgs[] = { 11819 (void *) value, 11820 }; 11821 11822 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11823 threadStartTime, threadEndTime, 11824 &glmsg, pointerArgs); 11825 glContext->traceGLMessage(&glmsg); 11826 } 11827 11828 void GLTrace_glProgramUniform3iv(GLuint program, GLint location, GLsizei count, const GLint * value) { 11829 GLMessage glmsg; 11830 GLTraceContext *glContext = getGLTraceContext(); 11831 11832 glmsg.set_function(GLMessage::glProgramUniform3iv); 11833 11834 // copy argument program 11835 GLMessage_DataType *arg_program = glmsg.add_args(); 11836 arg_program->set_isarray(false); 11837 arg_program->set_type(GLMessage::DataType::INT); 11838 arg_program->add_intvalue(program); 11839 11840 // copy argument location 11841 GLMessage_DataType *arg_location = glmsg.add_args(); 11842 arg_location->set_isarray(false); 11843 arg_location->set_type(GLMessage::DataType::INT); 11844 arg_location->add_intvalue(location); 11845 11846 // copy argument count 11847 GLMessage_DataType *arg_count = glmsg.add_args(); 11848 arg_count->set_isarray(false); 11849 arg_count->set_type(GLMessage::DataType::INT); 11850 arg_count->add_intvalue(count); 11851 11852 // copy argument value 11853 GLMessage_DataType *arg_value = glmsg.add_args(); 11854 arg_value->set_isarray(false); 11855 arg_value->set_type(GLMessage::DataType::INT64); 11856 arg_value->add_int64value((uintptr_t)value); 11857 11858 // call function 11859 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11860 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11861 glContext->hooks->gl.glProgramUniform3iv(program, location, count, value); 11862 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11863 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11864 11865 void *pointerArgs[] = { 11866 (void *) value, 11867 }; 11868 11869 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11870 threadStartTime, threadEndTime, 11871 &glmsg, pointerArgs); 11872 glContext->traceGLMessage(&glmsg); 11873 } 11874 11875 void GLTrace_glProgramUniform4iv(GLuint program, GLint location, GLsizei count, const GLint * value) { 11876 GLMessage glmsg; 11877 GLTraceContext *glContext = getGLTraceContext(); 11878 11879 glmsg.set_function(GLMessage::glProgramUniform4iv); 11880 11881 // copy argument program 11882 GLMessage_DataType *arg_program = glmsg.add_args(); 11883 arg_program->set_isarray(false); 11884 arg_program->set_type(GLMessage::DataType::INT); 11885 arg_program->add_intvalue(program); 11886 11887 // copy argument location 11888 GLMessage_DataType *arg_location = glmsg.add_args(); 11889 arg_location->set_isarray(false); 11890 arg_location->set_type(GLMessage::DataType::INT); 11891 arg_location->add_intvalue(location); 11892 11893 // copy argument count 11894 GLMessage_DataType *arg_count = glmsg.add_args(); 11895 arg_count->set_isarray(false); 11896 arg_count->set_type(GLMessage::DataType::INT); 11897 arg_count->add_intvalue(count); 11898 11899 // copy argument value 11900 GLMessage_DataType *arg_value = glmsg.add_args(); 11901 arg_value->set_isarray(false); 11902 arg_value->set_type(GLMessage::DataType::INT64); 11903 arg_value->add_int64value((uintptr_t)value); 11904 11905 // call function 11906 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11907 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11908 glContext->hooks->gl.glProgramUniform4iv(program, location, count, value); 11909 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11910 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11911 11912 void *pointerArgs[] = { 11913 (void *) value, 11914 }; 11915 11916 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11917 threadStartTime, threadEndTime, 11918 &glmsg, pointerArgs); 11919 glContext->traceGLMessage(&glmsg); 11920 } 11921 11922 void GLTrace_glProgramUniform1uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) { 11923 GLMessage glmsg; 11924 GLTraceContext *glContext = getGLTraceContext(); 11925 11926 glmsg.set_function(GLMessage::glProgramUniform1uiv); 11927 11928 // copy argument program 11929 GLMessage_DataType *arg_program = glmsg.add_args(); 11930 arg_program->set_isarray(false); 11931 arg_program->set_type(GLMessage::DataType::INT); 11932 arg_program->add_intvalue(program); 11933 11934 // copy argument location 11935 GLMessage_DataType *arg_location = glmsg.add_args(); 11936 arg_location->set_isarray(false); 11937 arg_location->set_type(GLMessage::DataType::INT); 11938 arg_location->add_intvalue(location); 11939 11940 // copy argument count 11941 GLMessage_DataType *arg_count = glmsg.add_args(); 11942 arg_count->set_isarray(false); 11943 arg_count->set_type(GLMessage::DataType::INT); 11944 arg_count->add_intvalue(count); 11945 11946 // copy argument value 11947 GLMessage_DataType *arg_value = glmsg.add_args(); 11948 arg_value->set_isarray(false); 11949 arg_value->set_type(GLMessage::DataType::INT64); 11950 arg_value->add_int64value((uintptr_t)value); 11951 11952 // call function 11953 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 11954 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 11955 glContext->hooks->gl.glProgramUniform1uiv(program, location, count, value); 11956 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 11957 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 11958 11959 void *pointerArgs[] = { 11960 (void *) value, 11961 }; 11962 11963 fixupGLMessage(glContext, wallStartTime, wallEndTime, 11964 threadStartTime, threadEndTime, 11965 &glmsg, pointerArgs); 11966 glContext->traceGLMessage(&glmsg); 11967 } 11968 11969 void GLTrace_glProgramUniform2uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) { 11970 GLMessage glmsg; 11971 GLTraceContext *glContext = getGLTraceContext(); 11972 11973 glmsg.set_function(GLMessage::glProgramUniform2uiv); 11974 11975 // copy argument program 11976 GLMessage_DataType *arg_program = glmsg.add_args(); 11977 arg_program->set_isarray(false); 11978 arg_program->set_type(GLMessage::DataType::INT); 11979 arg_program->add_intvalue(program); 11980 11981 // copy argument location 11982 GLMessage_DataType *arg_location = glmsg.add_args(); 11983 arg_location->set_isarray(false); 11984 arg_location->set_type(GLMessage::DataType::INT); 11985 arg_location->add_intvalue(location); 11986 11987 // copy argument count 11988 GLMessage_DataType *arg_count = glmsg.add_args(); 11989 arg_count->set_isarray(false); 11990 arg_count->set_type(GLMessage::DataType::INT); 11991 arg_count->add_intvalue(count); 11992 11993 // copy argument value 11994 GLMessage_DataType *arg_value = glmsg.add_args(); 11995 arg_value->set_isarray(false); 11996 arg_value->set_type(GLMessage::DataType::INT64); 11997 arg_value->add_int64value((uintptr_t)value); 11998 11999 // call function 12000 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12001 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12002 glContext->hooks->gl.glProgramUniform2uiv(program, location, count, value); 12003 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12004 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12005 12006 void *pointerArgs[] = { 12007 (void *) value, 12008 }; 12009 12010 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12011 threadStartTime, threadEndTime, 12012 &glmsg, pointerArgs); 12013 glContext->traceGLMessage(&glmsg); 12014 } 12015 12016 void GLTrace_glProgramUniform3uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) { 12017 GLMessage glmsg; 12018 GLTraceContext *glContext = getGLTraceContext(); 12019 12020 glmsg.set_function(GLMessage::glProgramUniform3uiv); 12021 12022 // copy argument program 12023 GLMessage_DataType *arg_program = glmsg.add_args(); 12024 arg_program->set_isarray(false); 12025 arg_program->set_type(GLMessage::DataType::INT); 12026 arg_program->add_intvalue(program); 12027 12028 // copy argument location 12029 GLMessage_DataType *arg_location = glmsg.add_args(); 12030 arg_location->set_isarray(false); 12031 arg_location->set_type(GLMessage::DataType::INT); 12032 arg_location->add_intvalue(location); 12033 12034 // copy argument count 12035 GLMessage_DataType *arg_count = glmsg.add_args(); 12036 arg_count->set_isarray(false); 12037 arg_count->set_type(GLMessage::DataType::INT); 12038 arg_count->add_intvalue(count); 12039 12040 // copy argument value 12041 GLMessage_DataType *arg_value = glmsg.add_args(); 12042 arg_value->set_isarray(false); 12043 arg_value->set_type(GLMessage::DataType::INT64); 12044 arg_value->add_int64value((uintptr_t)value); 12045 12046 // call function 12047 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12048 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12049 glContext->hooks->gl.glProgramUniform3uiv(program, location, count, value); 12050 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12051 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12052 12053 void *pointerArgs[] = { 12054 (void *) value, 12055 }; 12056 12057 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12058 threadStartTime, threadEndTime, 12059 &glmsg, pointerArgs); 12060 glContext->traceGLMessage(&glmsg); 12061 } 12062 12063 void GLTrace_glProgramUniform4uiv(GLuint program, GLint location, GLsizei count, const GLuint * value) { 12064 GLMessage glmsg; 12065 GLTraceContext *glContext = getGLTraceContext(); 12066 12067 glmsg.set_function(GLMessage::glProgramUniform4uiv); 12068 12069 // copy argument program 12070 GLMessage_DataType *arg_program = glmsg.add_args(); 12071 arg_program->set_isarray(false); 12072 arg_program->set_type(GLMessage::DataType::INT); 12073 arg_program->add_intvalue(program); 12074 12075 // copy argument location 12076 GLMessage_DataType *arg_location = glmsg.add_args(); 12077 arg_location->set_isarray(false); 12078 arg_location->set_type(GLMessage::DataType::INT); 12079 arg_location->add_intvalue(location); 12080 12081 // copy argument count 12082 GLMessage_DataType *arg_count = glmsg.add_args(); 12083 arg_count->set_isarray(false); 12084 arg_count->set_type(GLMessage::DataType::INT); 12085 arg_count->add_intvalue(count); 12086 12087 // copy argument value 12088 GLMessage_DataType *arg_value = glmsg.add_args(); 12089 arg_value->set_isarray(false); 12090 arg_value->set_type(GLMessage::DataType::INT64); 12091 arg_value->add_int64value((uintptr_t)value); 12092 12093 // call function 12094 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12095 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12096 glContext->hooks->gl.glProgramUniform4uiv(program, location, count, value); 12097 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12098 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12099 12100 void *pointerArgs[] = { 12101 (void *) value, 12102 }; 12103 12104 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12105 threadStartTime, threadEndTime, 12106 &glmsg, pointerArgs); 12107 glContext->traceGLMessage(&glmsg); 12108 } 12109 12110 void GLTrace_glProgramUniform1fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 12111 GLMessage glmsg; 12112 GLTraceContext *glContext = getGLTraceContext(); 12113 12114 glmsg.set_function(GLMessage::glProgramUniform1fv); 12115 12116 // copy argument program 12117 GLMessage_DataType *arg_program = glmsg.add_args(); 12118 arg_program->set_isarray(false); 12119 arg_program->set_type(GLMessage::DataType::INT); 12120 arg_program->add_intvalue(program); 12121 12122 // copy argument location 12123 GLMessage_DataType *arg_location = glmsg.add_args(); 12124 arg_location->set_isarray(false); 12125 arg_location->set_type(GLMessage::DataType::INT); 12126 arg_location->add_intvalue(location); 12127 12128 // copy argument count 12129 GLMessage_DataType *arg_count = glmsg.add_args(); 12130 arg_count->set_isarray(false); 12131 arg_count->set_type(GLMessage::DataType::INT); 12132 arg_count->add_intvalue(count); 12133 12134 // copy argument value 12135 GLMessage_DataType *arg_value = glmsg.add_args(); 12136 arg_value->set_isarray(false); 12137 arg_value->set_type(GLMessage::DataType::INT64); 12138 arg_value->add_int64value((uintptr_t)value); 12139 12140 // call function 12141 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12142 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12143 glContext->hooks->gl.glProgramUniform1fv(program, location, count, value); 12144 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12145 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12146 12147 void *pointerArgs[] = { 12148 (void *) value, 12149 }; 12150 12151 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12152 threadStartTime, threadEndTime, 12153 &glmsg, pointerArgs); 12154 glContext->traceGLMessage(&glmsg); 12155 } 12156 12157 void GLTrace_glProgramUniform2fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 12158 GLMessage glmsg; 12159 GLTraceContext *glContext = getGLTraceContext(); 12160 12161 glmsg.set_function(GLMessage::glProgramUniform2fv); 12162 12163 // copy argument program 12164 GLMessage_DataType *arg_program = glmsg.add_args(); 12165 arg_program->set_isarray(false); 12166 arg_program->set_type(GLMessage::DataType::INT); 12167 arg_program->add_intvalue(program); 12168 12169 // copy argument location 12170 GLMessage_DataType *arg_location = glmsg.add_args(); 12171 arg_location->set_isarray(false); 12172 arg_location->set_type(GLMessage::DataType::INT); 12173 arg_location->add_intvalue(location); 12174 12175 // copy argument count 12176 GLMessage_DataType *arg_count = glmsg.add_args(); 12177 arg_count->set_isarray(false); 12178 arg_count->set_type(GLMessage::DataType::INT); 12179 arg_count->add_intvalue(count); 12180 12181 // copy argument value 12182 GLMessage_DataType *arg_value = glmsg.add_args(); 12183 arg_value->set_isarray(false); 12184 arg_value->set_type(GLMessage::DataType::INT64); 12185 arg_value->add_int64value((uintptr_t)value); 12186 12187 // call function 12188 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12189 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12190 glContext->hooks->gl.glProgramUniform2fv(program, location, count, value); 12191 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12192 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12193 12194 void *pointerArgs[] = { 12195 (void *) value, 12196 }; 12197 12198 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12199 threadStartTime, threadEndTime, 12200 &glmsg, pointerArgs); 12201 glContext->traceGLMessage(&glmsg); 12202 } 12203 12204 void GLTrace_glProgramUniform3fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 12205 GLMessage glmsg; 12206 GLTraceContext *glContext = getGLTraceContext(); 12207 12208 glmsg.set_function(GLMessage::glProgramUniform3fv); 12209 12210 // copy argument program 12211 GLMessage_DataType *arg_program = glmsg.add_args(); 12212 arg_program->set_isarray(false); 12213 arg_program->set_type(GLMessage::DataType::INT); 12214 arg_program->add_intvalue(program); 12215 12216 // copy argument location 12217 GLMessage_DataType *arg_location = glmsg.add_args(); 12218 arg_location->set_isarray(false); 12219 arg_location->set_type(GLMessage::DataType::INT); 12220 arg_location->add_intvalue(location); 12221 12222 // copy argument count 12223 GLMessage_DataType *arg_count = glmsg.add_args(); 12224 arg_count->set_isarray(false); 12225 arg_count->set_type(GLMessage::DataType::INT); 12226 arg_count->add_intvalue(count); 12227 12228 // copy argument value 12229 GLMessage_DataType *arg_value = glmsg.add_args(); 12230 arg_value->set_isarray(false); 12231 arg_value->set_type(GLMessage::DataType::INT64); 12232 arg_value->add_int64value((uintptr_t)value); 12233 12234 // call function 12235 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12236 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12237 glContext->hooks->gl.glProgramUniform3fv(program, location, count, value); 12238 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12239 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12240 12241 void *pointerArgs[] = { 12242 (void *) value, 12243 }; 12244 12245 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12246 threadStartTime, threadEndTime, 12247 &glmsg, pointerArgs); 12248 glContext->traceGLMessage(&glmsg); 12249 } 12250 12251 void GLTrace_glProgramUniform4fv(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 12252 GLMessage glmsg; 12253 GLTraceContext *glContext = getGLTraceContext(); 12254 12255 glmsg.set_function(GLMessage::glProgramUniform4fv); 12256 12257 // copy argument program 12258 GLMessage_DataType *arg_program = glmsg.add_args(); 12259 arg_program->set_isarray(false); 12260 arg_program->set_type(GLMessage::DataType::INT); 12261 arg_program->add_intvalue(program); 12262 12263 // copy argument location 12264 GLMessage_DataType *arg_location = glmsg.add_args(); 12265 arg_location->set_isarray(false); 12266 arg_location->set_type(GLMessage::DataType::INT); 12267 arg_location->add_intvalue(location); 12268 12269 // copy argument count 12270 GLMessage_DataType *arg_count = glmsg.add_args(); 12271 arg_count->set_isarray(false); 12272 arg_count->set_type(GLMessage::DataType::INT); 12273 arg_count->add_intvalue(count); 12274 12275 // copy argument value 12276 GLMessage_DataType *arg_value = glmsg.add_args(); 12277 arg_value->set_isarray(false); 12278 arg_value->set_type(GLMessage::DataType::INT64); 12279 arg_value->add_int64value((uintptr_t)value); 12280 12281 // call function 12282 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12283 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12284 glContext->hooks->gl.glProgramUniform4fv(program, location, count, value); 12285 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12286 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12287 12288 void *pointerArgs[] = { 12289 (void *) value, 12290 }; 12291 12292 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12293 threadStartTime, threadEndTime, 12294 &glmsg, pointerArgs); 12295 glContext->traceGLMessage(&glmsg); 12296 } 12297 12298 void GLTrace_glProgramUniformMatrix2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12299 GLMessage glmsg; 12300 GLTraceContext *glContext = getGLTraceContext(); 12301 12302 glmsg.set_function(GLMessage::glProgramUniformMatrix2fv); 12303 12304 // copy argument program 12305 GLMessage_DataType *arg_program = glmsg.add_args(); 12306 arg_program->set_isarray(false); 12307 arg_program->set_type(GLMessage::DataType::INT); 12308 arg_program->add_intvalue(program); 12309 12310 // copy argument location 12311 GLMessage_DataType *arg_location = glmsg.add_args(); 12312 arg_location->set_isarray(false); 12313 arg_location->set_type(GLMessage::DataType::INT); 12314 arg_location->add_intvalue(location); 12315 12316 // copy argument count 12317 GLMessage_DataType *arg_count = glmsg.add_args(); 12318 arg_count->set_isarray(false); 12319 arg_count->set_type(GLMessage::DataType::INT); 12320 arg_count->add_intvalue(count); 12321 12322 // copy argument transpose 12323 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12324 arg_transpose->set_isarray(false); 12325 arg_transpose->set_type(GLMessage::DataType::BOOL); 12326 arg_transpose->add_boolvalue(transpose); 12327 12328 // copy argument value 12329 GLMessage_DataType *arg_value = glmsg.add_args(); 12330 arg_value->set_isarray(false); 12331 arg_value->set_type(GLMessage::DataType::INT64); 12332 arg_value->add_int64value((uintptr_t)value); 12333 12334 // call function 12335 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12336 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12337 glContext->hooks->gl.glProgramUniformMatrix2fv(program, location, count, transpose, value); 12338 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12339 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12340 12341 void *pointerArgs[] = { 12342 (void *) value, 12343 }; 12344 12345 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12346 threadStartTime, threadEndTime, 12347 &glmsg, pointerArgs); 12348 glContext->traceGLMessage(&glmsg); 12349 } 12350 12351 void GLTrace_glProgramUniformMatrix3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12352 GLMessage glmsg; 12353 GLTraceContext *glContext = getGLTraceContext(); 12354 12355 glmsg.set_function(GLMessage::glProgramUniformMatrix3fv); 12356 12357 // copy argument program 12358 GLMessage_DataType *arg_program = glmsg.add_args(); 12359 arg_program->set_isarray(false); 12360 arg_program->set_type(GLMessage::DataType::INT); 12361 arg_program->add_intvalue(program); 12362 12363 // copy argument location 12364 GLMessage_DataType *arg_location = glmsg.add_args(); 12365 arg_location->set_isarray(false); 12366 arg_location->set_type(GLMessage::DataType::INT); 12367 arg_location->add_intvalue(location); 12368 12369 // copy argument count 12370 GLMessage_DataType *arg_count = glmsg.add_args(); 12371 arg_count->set_isarray(false); 12372 arg_count->set_type(GLMessage::DataType::INT); 12373 arg_count->add_intvalue(count); 12374 12375 // copy argument transpose 12376 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12377 arg_transpose->set_isarray(false); 12378 arg_transpose->set_type(GLMessage::DataType::BOOL); 12379 arg_transpose->add_boolvalue(transpose); 12380 12381 // copy argument value 12382 GLMessage_DataType *arg_value = glmsg.add_args(); 12383 arg_value->set_isarray(false); 12384 arg_value->set_type(GLMessage::DataType::INT64); 12385 arg_value->add_int64value((uintptr_t)value); 12386 12387 // call function 12388 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12389 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12390 glContext->hooks->gl.glProgramUniformMatrix3fv(program, location, count, transpose, value); 12391 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12392 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12393 12394 void *pointerArgs[] = { 12395 (void *) value, 12396 }; 12397 12398 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12399 threadStartTime, threadEndTime, 12400 &glmsg, pointerArgs); 12401 glContext->traceGLMessage(&glmsg); 12402 } 12403 12404 void GLTrace_glProgramUniformMatrix4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12405 GLMessage glmsg; 12406 GLTraceContext *glContext = getGLTraceContext(); 12407 12408 glmsg.set_function(GLMessage::glProgramUniformMatrix4fv); 12409 12410 // copy argument program 12411 GLMessage_DataType *arg_program = glmsg.add_args(); 12412 arg_program->set_isarray(false); 12413 arg_program->set_type(GLMessage::DataType::INT); 12414 arg_program->add_intvalue(program); 12415 12416 // copy argument location 12417 GLMessage_DataType *arg_location = glmsg.add_args(); 12418 arg_location->set_isarray(false); 12419 arg_location->set_type(GLMessage::DataType::INT); 12420 arg_location->add_intvalue(location); 12421 12422 // copy argument count 12423 GLMessage_DataType *arg_count = glmsg.add_args(); 12424 arg_count->set_isarray(false); 12425 arg_count->set_type(GLMessage::DataType::INT); 12426 arg_count->add_intvalue(count); 12427 12428 // copy argument transpose 12429 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12430 arg_transpose->set_isarray(false); 12431 arg_transpose->set_type(GLMessage::DataType::BOOL); 12432 arg_transpose->add_boolvalue(transpose); 12433 12434 // copy argument value 12435 GLMessage_DataType *arg_value = glmsg.add_args(); 12436 arg_value->set_isarray(false); 12437 arg_value->set_type(GLMessage::DataType::INT64); 12438 arg_value->add_int64value((uintptr_t)value); 12439 12440 // call function 12441 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12442 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12443 glContext->hooks->gl.glProgramUniformMatrix4fv(program, location, count, transpose, value); 12444 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12445 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12446 12447 void *pointerArgs[] = { 12448 (void *) value, 12449 }; 12450 12451 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12452 threadStartTime, threadEndTime, 12453 &glmsg, pointerArgs); 12454 glContext->traceGLMessage(&glmsg); 12455 } 12456 12457 void GLTrace_glProgramUniformMatrix2x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12458 GLMessage glmsg; 12459 GLTraceContext *glContext = getGLTraceContext(); 12460 12461 glmsg.set_function(GLMessage::glProgramUniformMatrix2x3fv); 12462 12463 // copy argument program 12464 GLMessage_DataType *arg_program = glmsg.add_args(); 12465 arg_program->set_isarray(false); 12466 arg_program->set_type(GLMessage::DataType::INT); 12467 arg_program->add_intvalue(program); 12468 12469 // copy argument location 12470 GLMessage_DataType *arg_location = glmsg.add_args(); 12471 arg_location->set_isarray(false); 12472 arg_location->set_type(GLMessage::DataType::INT); 12473 arg_location->add_intvalue(location); 12474 12475 // copy argument count 12476 GLMessage_DataType *arg_count = glmsg.add_args(); 12477 arg_count->set_isarray(false); 12478 arg_count->set_type(GLMessage::DataType::INT); 12479 arg_count->add_intvalue(count); 12480 12481 // copy argument transpose 12482 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12483 arg_transpose->set_isarray(false); 12484 arg_transpose->set_type(GLMessage::DataType::BOOL); 12485 arg_transpose->add_boolvalue(transpose); 12486 12487 // copy argument value 12488 GLMessage_DataType *arg_value = glmsg.add_args(); 12489 arg_value->set_isarray(false); 12490 arg_value->set_type(GLMessage::DataType::INT64); 12491 arg_value->add_int64value((uintptr_t)value); 12492 12493 // call function 12494 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12495 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12496 glContext->hooks->gl.glProgramUniformMatrix2x3fv(program, location, count, transpose, value); 12497 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12498 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12499 12500 void *pointerArgs[] = { 12501 (void *) value, 12502 }; 12503 12504 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12505 threadStartTime, threadEndTime, 12506 &glmsg, pointerArgs); 12507 glContext->traceGLMessage(&glmsg); 12508 } 12509 12510 void GLTrace_glProgramUniformMatrix3x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12511 GLMessage glmsg; 12512 GLTraceContext *glContext = getGLTraceContext(); 12513 12514 glmsg.set_function(GLMessage::glProgramUniformMatrix3x2fv); 12515 12516 // copy argument program 12517 GLMessage_DataType *arg_program = glmsg.add_args(); 12518 arg_program->set_isarray(false); 12519 arg_program->set_type(GLMessage::DataType::INT); 12520 arg_program->add_intvalue(program); 12521 12522 // copy argument location 12523 GLMessage_DataType *arg_location = glmsg.add_args(); 12524 arg_location->set_isarray(false); 12525 arg_location->set_type(GLMessage::DataType::INT); 12526 arg_location->add_intvalue(location); 12527 12528 // copy argument count 12529 GLMessage_DataType *arg_count = glmsg.add_args(); 12530 arg_count->set_isarray(false); 12531 arg_count->set_type(GLMessage::DataType::INT); 12532 arg_count->add_intvalue(count); 12533 12534 // copy argument transpose 12535 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12536 arg_transpose->set_isarray(false); 12537 arg_transpose->set_type(GLMessage::DataType::BOOL); 12538 arg_transpose->add_boolvalue(transpose); 12539 12540 // copy argument value 12541 GLMessage_DataType *arg_value = glmsg.add_args(); 12542 arg_value->set_isarray(false); 12543 arg_value->set_type(GLMessage::DataType::INT64); 12544 arg_value->add_int64value((uintptr_t)value); 12545 12546 // call function 12547 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12548 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12549 glContext->hooks->gl.glProgramUniformMatrix3x2fv(program, location, count, transpose, value); 12550 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12551 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12552 12553 void *pointerArgs[] = { 12554 (void *) value, 12555 }; 12556 12557 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12558 threadStartTime, threadEndTime, 12559 &glmsg, pointerArgs); 12560 glContext->traceGLMessage(&glmsg); 12561 } 12562 12563 void GLTrace_glProgramUniformMatrix2x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12564 GLMessage glmsg; 12565 GLTraceContext *glContext = getGLTraceContext(); 12566 12567 glmsg.set_function(GLMessage::glProgramUniformMatrix2x4fv); 12568 12569 // copy argument program 12570 GLMessage_DataType *arg_program = glmsg.add_args(); 12571 arg_program->set_isarray(false); 12572 arg_program->set_type(GLMessage::DataType::INT); 12573 arg_program->add_intvalue(program); 12574 12575 // copy argument location 12576 GLMessage_DataType *arg_location = glmsg.add_args(); 12577 arg_location->set_isarray(false); 12578 arg_location->set_type(GLMessage::DataType::INT); 12579 arg_location->add_intvalue(location); 12580 12581 // copy argument count 12582 GLMessage_DataType *arg_count = glmsg.add_args(); 12583 arg_count->set_isarray(false); 12584 arg_count->set_type(GLMessage::DataType::INT); 12585 arg_count->add_intvalue(count); 12586 12587 // copy argument transpose 12588 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12589 arg_transpose->set_isarray(false); 12590 arg_transpose->set_type(GLMessage::DataType::BOOL); 12591 arg_transpose->add_boolvalue(transpose); 12592 12593 // copy argument value 12594 GLMessage_DataType *arg_value = glmsg.add_args(); 12595 arg_value->set_isarray(false); 12596 arg_value->set_type(GLMessage::DataType::INT64); 12597 arg_value->add_int64value((uintptr_t)value); 12598 12599 // call function 12600 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12601 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12602 glContext->hooks->gl.glProgramUniformMatrix2x4fv(program, location, count, transpose, value); 12603 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12604 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12605 12606 void *pointerArgs[] = { 12607 (void *) value, 12608 }; 12609 12610 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12611 threadStartTime, threadEndTime, 12612 &glmsg, pointerArgs); 12613 glContext->traceGLMessage(&glmsg); 12614 } 12615 12616 void GLTrace_glProgramUniformMatrix4x2fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12617 GLMessage glmsg; 12618 GLTraceContext *glContext = getGLTraceContext(); 12619 12620 glmsg.set_function(GLMessage::glProgramUniformMatrix4x2fv); 12621 12622 // copy argument program 12623 GLMessage_DataType *arg_program = glmsg.add_args(); 12624 arg_program->set_isarray(false); 12625 arg_program->set_type(GLMessage::DataType::INT); 12626 arg_program->add_intvalue(program); 12627 12628 // copy argument location 12629 GLMessage_DataType *arg_location = glmsg.add_args(); 12630 arg_location->set_isarray(false); 12631 arg_location->set_type(GLMessage::DataType::INT); 12632 arg_location->add_intvalue(location); 12633 12634 // copy argument count 12635 GLMessage_DataType *arg_count = glmsg.add_args(); 12636 arg_count->set_isarray(false); 12637 arg_count->set_type(GLMessage::DataType::INT); 12638 arg_count->add_intvalue(count); 12639 12640 // copy argument transpose 12641 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12642 arg_transpose->set_isarray(false); 12643 arg_transpose->set_type(GLMessage::DataType::BOOL); 12644 arg_transpose->add_boolvalue(transpose); 12645 12646 // copy argument value 12647 GLMessage_DataType *arg_value = glmsg.add_args(); 12648 arg_value->set_isarray(false); 12649 arg_value->set_type(GLMessage::DataType::INT64); 12650 arg_value->add_int64value((uintptr_t)value); 12651 12652 // call function 12653 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12654 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12655 glContext->hooks->gl.glProgramUniformMatrix4x2fv(program, location, count, transpose, value); 12656 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12657 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12658 12659 void *pointerArgs[] = { 12660 (void *) value, 12661 }; 12662 12663 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12664 threadStartTime, threadEndTime, 12665 &glmsg, pointerArgs); 12666 glContext->traceGLMessage(&glmsg); 12667 } 12668 12669 void GLTrace_glProgramUniformMatrix3x4fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12670 GLMessage glmsg; 12671 GLTraceContext *glContext = getGLTraceContext(); 12672 12673 glmsg.set_function(GLMessage::glProgramUniformMatrix3x4fv); 12674 12675 // copy argument program 12676 GLMessage_DataType *arg_program = glmsg.add_args(); 12677 arg_program->set_isarray(false); 12678 arg_program->set_type(GLMessage::DataType::INT); 12679 arg_program->add_intvalue(program); 12680 12681 // copy argument location 12682 GLMessage_DataType *arg_location = glmsg.add_args(); 12683 arg_location->set_isarray(false); 12684 arg_location->set_type(GLMessage::DataType::INT); 12685 arg_location->add_intvalue(location); 12686 12687 // copy argument count 12688 GLMessage_DataType *arg_count = glmsg.add_args(); 12689 arg_count->set_isarray(false); 12690 arg_count->set_type(GLMessage::DataType::INT); 12691 arg_count->add_intvalue(count); 12692 12693 // copy argument transpose 12694 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12695 arg_transpose->set_isarray(false); 12696 arg_transpose->set_type(GLMessage::DataType::BOOL); 12697 arg_transpose->add_boolvalue(transpose); 12698 12699 // copy argument value 12700 GLMessage_DataType *arg_value = glmsg.add_args(); 12701 arg_value->set_isarray(false); 12702 arg_value->set_type(GLMessage::DataType::INT64); 12703 arg_value->add_int64value((uintptr_t)value); 12704 12705 // call function 12706 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12707 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12708 glContext->hooks->gl.glProgramUniformMatrix3x4fv(program, location, count, transpose, value); 12709 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12710 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12711 12712 void *pointerArgs[] = { 12713 (void *) value, 12714 }; 12715 12716 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12717 threadStartTime, threadEndTime, 12718 &glmsg, pointerArgs); 12719 glContext->traceGLMessage(&glmsg); 12720 } 12721 12722 void GLTrace_glProgramUniformMatrix4x3fv(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 12723 GLMessage glmsg; 12724 GLTraceContext *glContext = getGLTraceContext(); 12725 12726 glmsg.set_function(GLMessage::glProgramUniformMatrix4x3fv); 12727 12728 // copy argument program 12729 GLMessage_DataType *arg_program = glmsg.add_args(); 12730 arg_program->set_isarray(false); 12731 arg_program->set_type(GLMessage::DataType::INT); 12732 arg_program->add_intvalue(program); 12733 12734 // copy argument location 12735 GLMessage_DataType *arg_location = glmsg.add_args(); 12736 arg_location->set_isarray(false); 12737 arg_location->set_type(GLMessage::DataType::INT); 12738 arg_location->add_intvalue(location); 12739 12740 // copy argument count 12741 GLMessage_DataType *arg_count = glmsg.add_args(); 12742 arg_count->set_isarray(false); 12743 arg_count->set_type(GLMessage::DataType::INT); 12744 arg_count->add_intvalue(count); 12745 12746 // copy argument transpose 12747 GLMessage_DataType *arg_transpose = glmsg.add_args(); 12748 arg_transpose->set_isarray(false); 12749 arg_transpose->set_type(GLMessage::DataType::BOOL); 12750 arg_transpose->add_boolvalue(transpose); 12751 12752 // copy argument value 12753 GLMessage_DataType *arg_value = glmsg.add_args(); 12754 arg_value->set_isarray(false); 12755 arg_value->set_type(GLMessage::DataType::INT64); 12756 arg_value->add_int64value((uintptr_t)value); 12757 12758 // call function 12759 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12760 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12761 glContext->hooks->gl.glProgramUniformMatrix4x3fv(program, location, count, transpose, value); 12762 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12763 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12764 12765 void *pointerArgs[] = { 12766 (void *) value, 12767 }; 12768 12769 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12770 threadStartTime, threadEndTime, 12771 &glmsg, pointerArgs); 12772 glContext->traceGLMessage(&glmsg); 12773 } 12774 12775 void GLTrace_glValidateProgramPipeline(GLuint pipeline) { 12776 GLMessage glmsg; 12777 GLTraceContext *glContext = getGLTraceContext(); 12778 12779 glmsg.set_function(GLMessage::glValidateProgramPipeline); 12780 12781 // copy argument pipeline 12782 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 12783 arg_pipeline->set_isarray(false); 12784 arg_pipeline->set_type(GLMessage::DataType::INT); 12785 arg_pipeline->add_intvalue(pipeline); 12786 12787 // call function 12788 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12789 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12790 glContext->hooks->gl.glValidateProgramPipeline(pipeline); 12791 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12792 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12793 12794 void *pointerArgs[] = { 12795 }; 12796 12797 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12798 threadStartTime, threadEndTime, 12799 &glmsg, pointerArgs); 12800 glContext->traceGLMessage(&glmsg); 12801 } 12802 12803 void GLTrace_glGetProgramPipelineInfoLog(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { 12804 GLMessage glmsg; 12805 GLTraceContext *glContext = getGLTraceContext(); 12806 12807 glmsg.set_function(GLMessage::glGetProgramPipelineInfoLog); 12808 12809 // copy argument pipeline 12810 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 12811 arg_pipeline->set_isarray(false); 12812 arg_pipeline->set_type(GLMessage::DataType::INT); 12813 arg_pipeline->add_intvalue(pipeline); 12814 12815 // copy argument bufSize 12816 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 12817 arg_bufSize->set_isarray(false); 12818 arg_bufSize->set_type(GLMessage::DataType::INT); 12819 arg_bufSize->add_intvalue(bufSize); 12820 12821 // copy argument length 12822 GLMessage_DataType *arg_length = glmsg.add_args(); 12823 arg_length->set_isarray(false); 12824 arg_length->set_type(GLMessage::DataType::INT64); 12825 arg_length->add_int64value((uintptr_t)length); 12826 12827 // copy argument infoLog 12828 GLMessage_DataType *arg_infoLog = glmsg.add_args(); 12829 arg_infoLog->set_isarray(false); 12830 arg_infoLog->set_type(GLMessage::DataType::INT64); 12831 arg_infoLog->add_int64value((uintptr_t)infoLog); 12832 12833 // call function 12834 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12835 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12836 glContext->hooks->gl.glGetProgramPipelineInfoLog(pipeline, bufSize, length, infoLog); 12837 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12838 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12839 12840 void *pointerArgs[] = { 12841 (void *) length, 12842 (void *) infoLog, 12843 }; 12844 12845 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12846 threadStartTime, threadEndTime, 12847 &glmsg, pointerArgs); 12848 glContext->traceGLMessage(&glmsg); 12849 } 12850 12851 void GLTrace_glBindImageTexture(GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format) { 12852 GLMessage glmsg; 12853 GLTraceContext *glContext = getGLTraceContext(); 12854 12855 glmsg.set_function(GLMessage::glBindImageTexture); 12856 12857 // copy argument unit 12858 GLMessage_DataType *arg_unit = glmsg.add_args(); 12859 arg_unit->set_isarray(false); 12860 arg_unit->set_type(GLMessage::DataType::INT); 12861 arg_unit->add_intvalue(unit); 12862 12863 // copy argument texture 12864 GLMessage_DataType *arg_texture = glmsg.add_args(); 12865 arg_texture->set_isarray(false); 12866 arg_texture->set_type(GLMessage::DataType::INT); 12867 arg_texture->add_intvalue(texture); 12868 12869 // copy argument level 12870 GLMessage_DataType *arg_level = glmsg.add_args(); 12871 arg_level->set_isarray(false); 12872 arg_level->set_type(GLMessage::DataType::INT); 12873 arg_level->add_intvalue(level); 12874 12875 // copy argument layered 12876 GLMessage_DataType *arg_layered = glmsg.add_args(); 12877 arg_layered->set_isarray(false); 12878 arg_layered->set_type(GLMessage::DataType::BOOL); 12879 arg_layered->add_boolvalue(layered); 12880 12881 // copy argument layer 12882 GLMessage_DataType *arg_layer = glmsg.add_args(); 12883 arg_layer->set_isarray(false); 12884 arg_layer->set_type(GLMessage::DataType::INT); 12885 arg_layer->add_intvalue(layer); 12886 12887 // copy argument access 12888 GLMessage_DataType *arg_access = glmsg.add_args(); 12889 arg_access->set_isarray(false); 12890 arg_access->set_type(GLMessage::DataType::ENUM); 12891 arg_access->add_intvalue((int)access); 12892 12893 // copy argument format 12894 GLMessage_DataType *arg_format = glmsg.add_args(); 12895 arg_format->set_isarray(false); 12896 arg_format->set_type(GLMessage::DataType::ENUM); 12897 arg_format->add_intvalue((int)format); 12898 12899 // call function 12900 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12901 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12902 glContext->hooks->gl.glBindImageTexture(unit, texture, level, layered, layer, access, format); 12903 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12904 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12905 12906 void *pointerArgs[] = { 12907 }; 12908 12909 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12910 threadStartTime, threadEndTime, 12911 &glmsg, pointerArgs); 12912 glContext->traceGLMessage(&glmsg); 12913 } 12914 12915 void GLTrace_glGetBooleani_v(GLenum target, GLuint index, GLboolean * data) { 12916 GLMessage glmsg; 12917 GLTraceContext *glContext = getGLTraceContext(); 12918 12919 glmsg.set_function(GLMessage::glGetBooleani_v); 12920 12921 // copy argument target 12922 GLMessage_DataType *arg_target = glmsg.add_args(); 12923 arg_target->set_isarray(false); 12924 arg_target->set_type(GLMessage::DataType::ENUM); 12925 arg_target->add_intvalue((int)target); 12926 12927 // copy argument index 12928 GLMessage_DataType *arg_index = glmsg.add_args(); 12929 arg_index->set_isarray(false); 12930 arg_index->set_type(GLMessage::DataType::INT); 12931 arg_index->add_intvalue(index); 12932 12933 // copy argument data 12934 GLMessage_DataType *arg_data = glmsg.add_args(); 12935 arg_data->set_isarray(false); 12936 arg_data->set_type(GLMessage::DataType::INT64); 12937 arg_data->add_int64value((uintptr_t)data); 12938 12939 // call function 12940 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12941 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12942 glContext->hooks->gl.glGetBooleani_v(target, index, data); 12943 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12944 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12945 12946 void *pointerArgs[] = { 12947 (void *) data, 12948 }; 12949 12950 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12951 threadStartTime, threadEndTime, 12952 &glmsg, pointerArgs); 12953 glContext->traceGLMessage(&glmsg); 12954 } 12955 12956 void GLTrace_glMemoryBarrier(GLbitfield barriers) { 12957 GLMessage glmsg; 12958 GLTraceContext *glContext = getGLTraceContext(); 12959 12960 glmsg.set_function(GLMessage::glMemoryBarrier); 12961 12962 // copy argument barriers 12963 GLMessage_DataType *arg_barriers = glmsg.add_args(); 12964 arg_barriers->set_isarray(false); 12965 arg_barriers->set_type(GLMessage::DataType::INT); 12966 arg_barriers->add_intvalue(barriers); 12967 12968 // call function 12969 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12970 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12971 glContext->hooks->gl.glMemoryBarrier(barriers); 12972 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 12973 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 12974 12975 void *pointerArgs[] = { 12976 }; 12977 12978 fixupGLMessage(glContext, wallStartTime, wallEndTime, 12979 threadStartTime, threadEndTime, 12980 &glmsg, pointerArgs); 12981 glContext->traceGLMessage(&glmsg); 12982 } 12983 12984 void GLTrace_glMemoryBarrierByRegion(GLbitfield barriers) { 12985 GLMessage glmsg; 12986 GLTraceContext *glContext = getGLTraceContext(); 12987 12988 glmsg.set_function(GLMessage::glMemoryBarrierByRegion); 12989 12990 // copy argument barriers 12991 GLMessage_DataType *arg_barriers = glmsg.add_args(); 12992 arg_barriers->set_isarray(false); 12993 arg_barriers->set_type(GLMessage::DataType::INT); 12994 arg_barriers->add_intvalue(barriers); 12995 12996 // call function 12997 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 12998 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 12999 glContext->hooks->gl.glMemoryBarrierByRegion(barriers); 13000 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13001 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13002 13003 void *pointerArgs[] = { 13004 }; 13005 13006 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13007 threadStartTime, threadEndTime, 13008 &glmsg, pointerArgs); 13009 glContext->traceGLMessage(&glmsg); 13010 } 13011 13012 void GLTrace_glTexStorage2DMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations) { 13013 GLMessage glmsg; 13014 GLTraceContext *glContext = getGLTraceContext(); 13015 13016 glmsg.set_function(GLMessage::glTexStorage2DMultisample); 13017 13018 // copy argument target 13019 GLMessage_DataType *arg_target = glmsg.add_args(); 13020 arg_target->set_isarray(false); 13021 arg_target->set_type(GLMessage::DataType::ENUM); 13022 arg_target->add_intvalue((int)target); 13023 13024 // copy argument samples 13025 GLMessage_DataType *arg_samples = glmsg.add_args(); 13026 arg_samples->set_isarray(false); 13027 arg_samples->set_type(GLMessage::DataType::INT); 13028 arg_samples->add_intvalue(samples); 13029 13030 // copy argument internalformat 13031 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 13032 arg_internalformat->set_isarray(false); 13033 arg_internalformat->set_type(GLMessage::DataType::ENUM); 13034 arg_internalformat->add_intvalue((int)internalformat); 13035 13036 // copy argument width 13037 GLMessage_DataType *arg_width = glmsg.add_args(); 13038 arg_width->set_isarray(false); 13039 arg_width->set_type(GLMessage::DataType::INT); 13040 arg_width->add_intvalue(width); 13041 13042 // copy argument height 13043 GLMessage_DataType *arg_height = glmsg.add_args(); 13044 arg_height->set_isarray(false); 13045 arg_height->set_type(GLMessage::DataType::INT); 13046 arg_height->add_intvalue(height); 13047 13048 // copy argument fixedsamplelocations 13049 GLMessage_DataType *arg_fixedsamplelocations = glmsg.add_args(); 13050 arg_fixedsamplelocations->set_isarray(false); 13051 arg_fixedsamplelocations->set_type(GLMessage::DataType::BOOL); 13052 arg_fixedsamplelocations->add_boolvalue(fixedsamplelocations); 13053 13054 // call function 13055 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13056 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13057 glContext->hooks->gl.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); 13058 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13059 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13060 13061 void *pointerArgs[] = { 13062 }; 13063 13064 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13065 threadStartTime, threadEndTime, 13066 &glmsg, pointerArgs); 13067 glContext->traceGLMessage(&glmsg); 13068 } 13069 13070 void GLTrace_glGetMultisamplefv(GLenum pname, GLuint index, GLfloat * val) { 13071 GLMessage glmsg; 13072 GLTraceContext *glContext = getGLTraceContext(); 13073 13074 glmsg.set_function(GLMessage::glGetMultisamplefv); 13075 13076 // copy argument pname 13077 GLMessage_DataType *arg_pname = glmsg.add_args(); 13078 arg_pname->set_isarray(false); 13079 arg_pname->set_type(GLMessage::DataType::ENUM); 13080 arg_pname->add_intvalue((int)pname); 13081 13082 // copy argument index 13083 GLMessage_DataType *arg_index = glmsg.add_args(); 13084 arg_index->set_isarray(false); 13085 arg_index->set_type(GLMessage::DataType::INT); 13086 arg_index->add_intvalue(index); 13087 13088 // copy argument val 13089 GLMessage_DataType *arg_val = glmsg.add_args(); 13090 arg_val->set_isarray(false); 13091 arg_val->set_type(GLMessage::DataType::INT64); 13092 arg_val->add_int64value((uintptr_t)val); 13093 13094 // call function 13095 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13096 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13097 glContext->hooks->gl.glGetMultisamplefv(pname, index, val); 13098 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13099 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13100 13101 void *pointerArgs[] = { 13102 (void *) val, 13103 }; 13104 13105 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13106 threadStartTime, threadEndTime, 13107 &glmsg, pointerArgs); 13108 glContext->traceGLMessage(&glmsg); 13109 } 13110 13111 void GLTrace_glSampleMaski(GLuint maskNumber, GLbitfield mask) { 13112 GLMessage glmsg; 13113 GLTraceContext *glContext = getGLTraceContext(); 13114 13115 glmsg.set_function(GLMessage::glSampleMaski); 13116 13117 // copy argument maskNumber 13118 GLMessage_DataType *arg_maskNumber = glmsg.add_args(); 13119 arg_maskNumber->set_isarray(false); 13120 arg_maskNumber->set_type(GLMessage::DataType::INT); 13121 arg_maskNumber->add_intvalue(maskNumber); 13122 13123 // copy argument mask 13124 GLMessage_DataType *arg_mask = glmsg.add_args(); 13125 arg_mask->set_isarray(false); 13126 arg_mask->set_type(GLMessage::DataType::INT); 13127 arg_mask->add_intvalue(mask); 13128 13129 // call function 13130 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13131 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13132 glContext->hooks->gl.glSampleMaski(maskNumber, mask); 13133 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13134 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13135 13136 void *pointerArgs[] = { 13137 }; 13138 13139 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13140 threadStartTime, threadEndTime, 13141 &glmsg, pointerArgs); 13142 glContext->traceGLMessage(&glmsg); 13143 } 13144 13145 void GLTrace_glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint * params) { 13146 GLMessage glmsg; 13147 GLTraceContext *glContext = getGLTraceContext(); 13148 13149 glmsg.set_function(GLMessage::glGetTexLevelParameteriv); 13150 13151 // copy argument target 13152 GLMessage_DataType *arg_target = glmsg.add_args(); 13153 arg_target->set_isarray(false); 13154 arg_target->set_type(GLMessage::DataType::ENUM); 13155 arg_target->add_intvalue((int)target); 13156 13157 // copy argument level 13158 GLMessage_DataType *arg_level = glmsg.add_args(); 13159 arg_level->set_isarray(false); 13160 arg_level->set_type(GLMessage::DataType::INT); 13161 arg_level->add_intvalue(level); 13162 13163 // copy argument pname 13164 GLMessage_DataType *arg_pname = glmsg.add_args(); 13165 arg_pname->set_isarray(false); 13166 arg_pname->set_type(GLMessage::DataType::ENUM); 13167 arg_pname->add_intvalue((int)pname); 13168 13169 // copy argument params 13170 GLMessage_DataType *arg_params = glmsg.add_args(); 13171 arg_params->set_isarray(false); 13172 arg_params->set_type(GLMessage::DataType::INT64); 13173 arg_params->add_int64value((uintptr_t)params); 13174 13175 // call function 13176 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13177 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13178 glContext->hooks->gl.glGetTexLevelParameteriv(target, level, pname, params); 13179 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13180 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13181 13182 void *pointerArgs[] = { 13183 (void *) params, 13184 }; 13185 13186 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13187 threadStartTime, threadEndTime, 13188 &glmsg, pointerArgs); 13189 glContext->traceGLMessage(&glmsg); 13190 } 13191 13192 void GLTrace_glGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat * params) { 13193 GLMessage glmsg; 13194 GLTraceContext *glContext = getGLTraceContext(); 13195 13196 glmsg.set_function(GLMessage::glGetTexLevelParameterfv); 13197 13198 // copy argument target 13199 GLMessage_DataType *arg_target = glmsg.add_args(); 13200 arg_target->set_isarray(false); 13201 arg_target->set_type(GLMessage::DataType::ENUM); 13202 arg_target->add_intvalue((int)target); 13203 13204 // copy argument level 13205 GLMessage_DataType *arg_level = glmsg.add_args(); 13206 arg_level->set_isarray(false); 13207 arg_level->set_type(GLMessage::DataType::INT); 13208 arg_level->add_intvalue(level); 13209 13210 // copy argument pname 13211 GLMessage_DataType *arg_pname = glmsg.add_args(); 13212 arg_pname->set_isarray(false); 13213 arg_pname->set_type(GLMessage::DataType::ENUM); 13214 arg_pname->add_intvalue((int)pname); 13215 13216 // copy argument params 13217 GLMessage_DataType *arg_params = glmsg.add_args(); 13218 arg_params->set_isarray(false); 13219 arg_params->set_type(GLMessage::DataType::INT64); 13220 arg_params->add_int64value((uintptr_t)params); 13221 13222 // call function 13223 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13224 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13225 glContext->hooks->gl.glGetTexLevelParameterfv(target, level, pname, params); 13226 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13227 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13228 13229 void *pointerArgs[] = { 13230 (void *) params, 13231 }; 13232 13233 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13234 threadStartTime, threadEndTime, 13235 &glmsg, pointerArgs); 13236 glContext->traceGLMessage(&glmsg); 13237 } 13238 13239 void GLTrace_glBindVertexBuffer(GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride) { 13240 GLMessage glmsg; 13241 GLTraceContext *glContext = getGLTraceContext(); 13242 13243 glmsg.set_function(GLMessage::glBindVertexBuffer); 13244 13245 // copy argument bindingindex 13246 GLMessage_DataType *arg_bindingindex = glmsg.add_args(); 13247 arg_bindingindex->set_isarray(false); 13248 arg_bindingindex->set_type(GLMessage::DataType::INT); 13249 arg_bindingindex->add_intvalue(bindingindex); 13250 13251 // copy argument buffer 13252 GLMessage_DataType *arg_buffer = glmsg.add_args(); 13253 arg_buffer->set_isarray(false); 13254 arg_buffer->set_type(GLMessage::DataType::INT); 13255 arg_buffer->add_intvalue(buffer); 13256 13257 // copy argument offset 13258 GLMessage_DataType *arg_offset = glmsg.add_args(); 13259 arg_offset->set_isarray(false); 13260 arg_offset->set_type(GLMessage::DataType::INT); 13261 arg_offset->add_intvalue(offset); 13262 13263 // copy argument stride 13264 GLMessage_DataType *arg_stride = glmsg.add_args(); 13265 arg_stride->set_isarray(false); 13266 arg_stride->set_type(GLMessage::DataType::INT); 13267 arg_stride->add_intvalue(stride); 13268 13269 // call function 13270 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13271 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13272 glContext->hooks->gl.glBindVertexBuffer(bindingindex, buffer, offset, stride); 13273 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13274 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13275 13276 void *pointerArgs[] = { 13277 }; 13278 13279 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13280 threadStartTime, threadEndTime, 13281 &glmsg, pointerArgs); 13282 glContext->traceGLMessage(&glmsg); 13283 } 13284 13285 void GLTrace_glVertexAttribFormat(GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset) { 13286 GLMessage glmsg; 13287 GLTraceContext *glContext = getGLTraceContext(); 13288 13289 glmsg.set_function(GLMessage::glVertexAttribFormat); 13290 13291 // copy argument attribindex 13292 GLMessage_DataType *arg_attribindex = glmsg.add_args(); 13293 arg_attribindex->set_isarray(false); 13294 arg_attribindex->set_type(GLMessage::DataType::INT); 13295 arg_attribindex->add_intvalue(attribindex); 13296 13297 // copy argument size 13298 GLMessage_DataType *arg_size = glmsg.add_args(); 13299 arg_size->set_isarray(false); 13300 arg_size->set_type(GLMessage::DataType::INT); 13301 arg_size->add_intvalue(size); 13302 13303 // copy argument type 13304 GLMessage_DataType *arg_type = glmsg.add_args(); 13305 arg_type->set_isarray(false); 13306 arg_type->set_type(GLMessage::DataType::ENUM); 13307 arg_type->add_intvalue((int)type); 13308 13309 // copy argument normalized 13310 GLMessage_DataType *arg_normalized = glmsg.add_args(); 13311 arg_normalized->set_isarray(false); 13312 arg_normalized->set_type(GLMessage::DataType::BOOL); 13313 arg_normalized->add_boolvalue(normalized); 13314 13315 // copy argument relativeoffset 13316 GLMessage_DataType *arg_relativeoffset = glmsg.add_args(); 13317 arg_relativeoffset->set_isarray(false); 13318 arg_relativeoffset->set_type(GLMessage::DataType::INT); 13319 arg_relativeoffset->add_intvalue(relativeoffset); 13320 13321 // call function 13322 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13323 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13324 glContext->hooks->gl.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); 13325 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13326 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13327 13328 void *pointerArgs[] = { 13329 }; 13330 13331 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13332 threadStartTime, threadEndTime, 13333 &glmsg, pointerArgs); 13334 glContext->traceGLMessage(&glmsg); 13335 } 13336 13337 void GLTrace_glVertexAttribIFormat(GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset) { 13338 GLMessage glmsg; 13339 GLTraceContext *glContext = getGLTraceContext(); 13340 13341 glmsg.set_function(GLMessage::glVertexAttribIFormat); 13342 13343 // copy argument attribindex 13344 GLMessage_DataType *arg_attribindex = glmsg.add_args(); 13345 arg_attribindex->set_isarray(false); 13346 arg_attribindex->set_type(GLMessage::DataType::INT); 13347 arg_attribindex->add_intvalue(attribindex); 13348 13349 // copy argument size 13350 GLMessage_DataType *arg_size = glmsg.add_args(); 13351 arg_size->set_isarray(false); 13352 arg_size->set_type(GLMessage::DataType::INT); 13353 arg_size->add_intvalue(size); 13354 13355 // copy argument type 13356 GLMessage_DataType *arg_type = glmsg.add_args(); 13357 arg_type->set_isarray(false); 13358 arg_type->set_type(GLMessage::DataType::ENUM); 13359 arg_type->add_intvalue((int)type); 13360 13361 // copy argument relativeoffset 13362 GLMessage_DataType *arg_relativeoffset = glmsg.add_args(); 13363 arg_relativeoffset->set_isarray(false); 13364 arg_relativeoffset->set_type(GLMessage::DataType::INT); 13365 arg_relativeoffset->add_intvalue(relativeoffset); 13366 13367 // call function 13368 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13369 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13370 glContext->hooks->gl.glVertexAttribIFormat(attribindex, size, type, relativeoffset); 13371 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13372 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13373 13374 void *pointerArgs[] = { 13375 }; 13376 13377 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13378 threadStartTime, threadEndTime, 13379 &glmsg, pointerArgs); 13380 glContext->traceGLMessage(&glmsg); 13381 } 13382 13383 void GLTrace_glVertexAttribBinding(GLuint attribindex, GLuint bindingindex) { 13384 GLMessage glmsg; 13385 GLTraceContext *glContext = getGLTraceContext(); 13386 13387 glmsg.set_function(GLMessage::glVertexAttribBinding); 13388 13389 // copy argument attribindex 13390 GLMessage_DataType *arg_attribindex = glmsg.add_args(); 13391 arg_attribindex->set_isarray(false); 13392 arg_attribindex->set_type(GLMessage::DataType::INT); 13393 arg_attribindex->add_intvalue(attribindex); 13394 13395 // copy argument bindingindex 13396 GLMessage_DataType *arg_bindingindex = glmsg.add_args(); 13397 arg_bindingindex->set_isarray(false); 13398 arg_bindingindex->set_type(GLMessage::DataType::INT); 13399 arg_bindingindex->add_intvalue(bindingindex); 13400 13401 // call function 13402 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13403 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13404 glContext->hooks->gl.glVertexAttribBinding(attribindex, bindingindex); 13405 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13406 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13407 13408 void *pointerArgs[] = { 13409 }; 13410 13411 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13412 threadStartTime, threadEndTime, 13413 &glmsg, pointerArgs); 13414 glContext->traceGLMessage(&glmsg); 13415 } 13416 13417 void GLTrace_glVertexBindingDivisor(GLuint bindingindex, GLuint divisor) { 13418 GLMessage glmsg; 13419 GLTraceContext *glContext = getGLTraceContext(); 13420 13421 glmsg.set_function(GLMessage::glVertexBindingDivisor); 13422 13423 // copy argument bindingindex 13424 GLMessage_DataType *arg_bindingindex = glmsg.add_args(); 13425 arg_bindingindex->set_isarray(false); 13426 arg_bindingindex->set_type(GLMessage::DataType::INT); 13427 arg_bindingindex->add_intvalue(bindingindex); 13428 13429 // copy argument divisor 13430 GLMessage_DataType *arg_divisor = glmsg.add_args(); 13431 arg_divisor->set_isarray(false); 13432 arg_divisor->set_type(GLMessage::DataType::INT); 13433 arg_divisor->add_intvalue(divisor); 13434 13435 // call function 13436 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13437 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13438 glContext->hooks->gl.glVertexBindingDivisor(bindingindex, divisor); 13439 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13440 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13441 13442 void *pointerArgs[] = { 13443 }; 13444 13445 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13446 threadStartTime, threadEndTime, 13447 &glmsg, pointerArgs); 13448 glContext->traceGLMessage(&glmsg); 13449 } 13450 13451 13452 // Definitions for GL2Ext APIs 13453 13454 void GLTrace_glBlendBarrierKHR(void) { 13455 GLMessage glmsg; 13456 GLTraceContext *glContext = getGLTraceContext(); 13457 13458 glmsg.set_function(GLMessage::glBlendBarrierKHR); 13459 13460 // call function 13461 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13462 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13463 glContext->hooks->gl.glBlendBarrierKHR(); 13464 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13465 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13466 13467 void *pointerArgs[] = { 13468 }; 13469 13470 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13471 threadStartTime, threadEndTime, 13472 &glmsg, pointerArgs); 13473 glContext->traceGLMessage(&glmsg); 13474 } 13475 13476 void GLTrace_glDebugMessageControlKHR(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled) { 13477 GLMessage glmsg; 13478 GLTraceContext *glContext = getGLTraceContext(); 13479 13480 glmsg.set_function(GLMessage::glDebugMessageControlKHR); 13481 13482 // copy argument source 13483 GLMessage_DataType *arg_source = glmsg.add_args(); 13484 arg_source->set_isarray(false); 13485 arg_source->set_type(GLMessage::DataType::ENUM); 13486 arg_source->add_intvalue((int)source); 13487 13488 // copy argument type 13489 GLMessage_DataType *arg_type = glmsg.add_args(); 13490 arg_type->set_isarray(false); 13491 arg_type->set_type(GLMessage::DataType::ENUM); 13492 arg_type->add_intvalue((int)type); 13493 13494 // copy argument severity 13495 GLMessage_DataType *arg_severity = glmsg.add_args(); 13496 arg_severity->set_isarray(false); 13497 arg_severity->set_type(GLMessage::DataType::ENUM); 13498 arg_severity->add_intvalue((int)severity); 13499 13500 // copy argument count 13501 GLMessage_DataType *arg_count = glmsg.add_args(); 13502 arg_count->set_isarray(false); 13503 arg_count->set_type(GLMessage::DataType::INT); 13504 arg_count->add_intvalue(count); 13505 13506 // copy argument ids 13507 GLMessage_DataType *arg_ids = glmsg.add_args(); 13508 arg_ids->set_isarray(false); 13509 arg_ids->set_type(GLMessage::DataType::INT64); 13510 arg_ids->add_int64value((uintptr_t)ids); 13511 13512 // copy argument enabled 13513 GLMessage_DataType *arg_enabled = glmsg.add_args(); 13514 arg_enabled->set_isarray(false); 13515 arg_enabled->set_type(GLMessage::DataType::BOOL); 13516 arg_enabled->add_boolvalue(enabled); 13517 13518 // call function 13519 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13520 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13521 glContext->hooks->gl.glDebugMessageControlKHR(source, type, severity, count, ids, enabled); 13522 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13523 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13524 13525 void *pointerArgs[] = { 13526 (void *) ids, 13527 }; 13528 13529 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13530 threadStartTime, threadEndTime, 13531 &glmsg, pointerArgs); 13532 glContext->traceGLMessage(&glmsg); 13533 } 13534 13535 void GLTrace_glDebugMessageInsertKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf) { 13536 GLMessage glmsg; 13537 GLTraceContext *glContext = getGLTraceContext(); 13538 13539 glmsg.set_function(GLMessage::glDebugMessageInsertKHR); 13540 13541 // copy argument source 13542 GLMessage_DataType *arg_source = glmsg.add_args(); 13543 arg_source->set_isarray(false); 13544 arg_source->set_type(GLMessage::DataType::ENUM); 13545 arg_source->add_intvalue((int)source); 13546 13547 // copy argument type 13548 GLMessage_DataType *arg_type = glmsg.add_args(); 13549 arg_type->set_isarray(false); 13550 arg_type->set_type(GLMessage::DataType::ENUM); 13551 arg_type->add_intvalue((int)type); 13552 13553 // copy argument id 13554 GLMessage_DataType *arg_id = glmsg.add_args(); 13555 arg_id->set_isarray(false); 13556 arg_id->set_type(GLMessage::DataType::INT); 13557 arg_id->add_intvalue(id); 13558 13559 // copy argument severity 13560 GLMessage_DataType *arg_severity = glmsg.add_args(); 13561 arg_severity->set_isarray(false); 13562 arg_severity->set_type(GLMessage::DataType::ENUM); 13563 arg_severity->add_intvalue((int)severity); 13564 13565 // copy argument length 13566 GLMessage_DataType *arg_length = glmsg.add_args(); 13567 arg_length->set_isarray(false); 13568 arg_length->set_type(GLMessage::DataType::INT); 13569 arg_length->add_intvalue(length); 13570 13571 // copy argument buf 13572 GLMessage_DataType *arg_buf = glmsg.add_args(); 13573 arg_buf->set_isarray(false); 13574 arg_buf->set_type(GLMessage::DataType::INT64); 13575 arg_buf->add_int64value((uintptr_t)buf); 13576 13577 // call function 13578 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13579 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13580 glContext->hooks->gl.glDebugMessageInsertKHR(source, type, id, severity, length, buf); 13581 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13582 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13583 13584 void *pointerArgs[] = { 13585 (void *) buf, 13586 }; 13587 13588 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13589 threadStartTime, threadEndTime, 13590 &glmsg, pointerArgs); 13591 glContext->traceGLMessage(&glmsg); 13592 } 13593 13594 void GLTrace_glDebugMessageCallbackKHR(GLDEBUGPROCKHR callback, const void * userParam) { 13595 GLMessage glmsg; 13596 GLTraceContext *glContext = getGLTraceContext(); 13597 13598 glmsg.set_function(GLMessage::glDebugMessageCallbackKHR); 13599 13600 // copy argument callback 13601 GLMessage_DataType *arg_callback = glmsg.add_args(); 13602 arg_callback->set_isarray(false); 13603 arg_callback->set_type(GLMessage::DataType::INT64); 13604 arg_callback->add_int64value((uintptr_t)callback); 13605 13606 // copy argument userParam 13607 GLMessage_DataType *arg_userParam = glmsg.add_args(); 13608 arg_userParam->set_isarray(false); 13609 arg_userParam->set_type(GLMessage::DataType::INT64); 13610 arg_userParam->add_int64value((uintptr_t)userParam); 13611 13612 // call function 13613 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13614 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13615 glContext->hooks->gl.glDebugMessageCallbackKHR(callback, userParam); 13616 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13617 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13618 13619 void *pointerArgs[] = { 13620 (void *) callback, 13621 (void *) userParam, 13622 }; 13623 13624 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13625 threadStartTime, threadEndTime, 13626 &glmsg, pointerArgs); 13627 glContext->traceGLMessage(&glmsg); 13628 } 13629 13630 GLuint GLTrace_glGetDebugMessageLogKHR(GLuint count, GLsizei bufSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog) { 13631 GLMessage glmsg; 13632 GLTraceContext *glContext = getGLTraceContext(); 13633 13634 glmsg.set_function(GLMessage::glGetDebugMessageLogKHR); 13635 13636 // copy argument count 13637 GLMessage_DataType *arg_count = glmsg.add_args(); 13638 arg_count->set_isarray(false); 13639 arg_count->set_type(GLMessage::DataType::INT); 13640 arg_count->add_intvalue(count); 13641 13642 // copy argument bufSize 13643 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 13644 arg_bufSize->set_isarray(false); 13645 arg_bufSize->set_type(GLMessage::DataType::INT); 13646 arg_bufSize->add_intvalue(bufSize); 13647 13648 // copy argument sources 13649 GLMessage_DataType *arg_sources = glmsg.add_args(); 13650 arg_sources->set_isarray(false); 13651 arg_sources->set_type(GLMessage::DataType::INT64); 13652 arg_sources->add_int64value((uintptr_t)sources); 13653 13654 // copy argument types 13655 GLMessage_DataType *arg_types = glmsg.add_args(); 13656 arg_types->set_isarray(false); 13657 arg_types->set_type(GLMessage::DataType::INT64); 13658 arg_types->add_int64value((uintptr_t)types); 13659 13660 // copy argument ids 13661 GLMessage_DataType *arg_ids = glmsg.add_args(); 13662 arg_ids->set_isarray(false); 13663 arg_ids->set_type(GLMessage::DataType::INT64); 13664 arg_ids->add_int64value((uintptr_t)ids); 13665 13666 // copy argument severities 13667 GLMessage_DataType *arg_severities = glmsg.add_args(); 13668 arg_severities->set_isarray(false); 13669 arg_severities->set_type(GLMessage::DataType::INT64); 13670 arg_severities->add_int64value((uintptr_t)severities); 13671 13672 // copy argument lengths 13673 GLMessage_DataType *arg_lengths = glmsg.add_args(); 13674 arg_lengths->set_isarray(false); 13675 arg_lengths->set_type(GLMessage::DataType::INT64); 13676 arg_lengths->add_int64value((uintptr_t)lengths); 13677 13678 // copy argument messageLog 13679 GLMessage_DataType *arg_messageLog = glmsg.add_args(); 13680 arg_messageLog->set_isarray(false); 13681 arg_messageLog->set_type(GLMessage::DataType::INT64); 13682 arg_messageLog->add_int64value((uintptr_t)messageLog); 13683 13684 // call function 13685 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13686 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13687 GLuint retValue = glContext->hooks->gl.glGetDebugMessageLogKHR(count, bufSize, sources, types, ids, severities, lengths, messageLog); 13688 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13689 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13690 13691 // set return value 13692 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 13693 rt->set_isarray(false); 13694 rt->set_type(GLMessage::DataType::INT); 13695 rt->add_intvalue(retValue); 13696 13697 void *pointerArgs[] = { 13698 (void *) sources, 13699 (void *) types, 13700 (void *) ids, 13701 (void *) severities, 13702 (void *) lengths, 13703 (void *) messageLog, 13704 }; 13705 13706 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13707 threadStartTime, threadEndTime, 13708 &glmsg, pointerArgs); 13709 glContext->traceGLMessage(&glmsg); 13710 13711 return retValue; 13712 } 13713 13714 void GLTrace_glPushDebugGroupKHR(GLenum source, GLuint id, GLsizei length, const GLchar * message) { 13715 GLMessage glmsg; 13716 GLTraceContext *glContext = getGLTraceContext(); 13717 13718 glmsg.set_function(GLMessage::glPushDebugGroupKHR); 13719 13720 // copy argument source 13721 GLMessage_DataType *arg_source = glmsg.add_args(); 13722 arg_source->set_isarray(false); 13723 arg_source->set_type(GLMessage::DataType::ENUM); 13724 arg_source->add_intvalue((int)source); 13725 13726 // copy argument id 13727 GLMessage_DataType *arg_id = glmsg.add_args(); 13728 arg_id->set_isarray(false); 13729 arg_id->set_type(GLMessage::DataType::INT); 13730 arg_id->add_intvalue(id); 13731 13732 // copy argument length 13733 GLMessage_DataType *arg_length = glmsg.add_args(); 13734 arg_length->set_isarray(false); 13735 arg_length->set_type(GLMessage::DataType::INT); 13736 arg_length->add_intvalue(length); 13737 13738 // copy argument message 13739 GLMessage_DataType *arg_message = glmsg.add_args(); 13740 arg_message->set_isarray(false); 13741 arg_message->set_type(GLMessage::DataType::INT64); 13742 arg_message->add_int64value((uintptr_t)message); 13743 13744 // call function 13745 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13746 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13747 glContext->hooks->gl.glPushDebugGroupKHR(source, id, length, message); 13748 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13749 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13750 13751 void *pointerArgs[] = { 13752 (void *) message, 13753 }; 13754 13755 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13756 threadStartTime, threadEndTime, 13757 &glmsg, pointerArgs); 13758 glContext->traceGLMessage(&glmsg); 13759 } 13760 13761 void GLTrace_glPopDebugGroupKHR(void) { 13762 GLMessage glmsg; 13763 GLTraceContext *glContext = getGLTraceContext(); 13764 13765 glmsg.set_function(GLMessage::glPopDebugGroupKHR); 13766 13767 // call function 13768 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13769 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13770 glContext->hooks->gl.glPopDebugGroupKHR(); 13771 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13772 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13773 13774 void *pointerArgs[] = { 13775 }; 13776 13777 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13778 threadStartTime, threadEndTime, 13779 &glmsg, pointerArgs); 13780 glContext->traceGLMessage(&glmsg); 13781 } 13782 13783 void GLTrace_glObjectLabelKHR(GLenum identifier, GLuint name, GLsizei length, const GLchar * label) { 13784 GLMessage glmsg; 13785 GLTraceContext *glContext = getGLTraceContext(); 13786 13787 glmsg.set_function(GLMessage::glObjectLabelKHR); 13788 13789 // copy argument identifier 13790 GLMessage_DataType *arg_identifier = glmsg.add_args(); 13791 arg_identifier->set_isarray(false); 13792 arg_identifier->set_type(GLMessage::DataType::ENUM); 13793 arg_identifier->add_intvalue((int)identifier); 13794 13795 // copy argument name 13796 GLMessage_DataType *arg_name = glmsg.add_args(); 13797 arg_name->set_isarray(false); 13798 arg_name->set_type(GLMessage::DataType::INT); 13799 arg_name->add_intvalue(name); 13800 13801 // copy argument length 13802 GLMessage_DataType *arg_length = glmsg.add_args(); 13803 arg_length->set_isarray(false); 13804 arg_length->set_type(GLMessage::DataType::INT); 13805 arg_length->add_intvalue(length); 13806 13807 // copy argument label 13808 GLMessage_DataType *arg_label = glmsg.add_args(); 13809 arg_label->set_isarray(false); 13810 arg_label->set_type(GLMessage::DataType::INT64); 13811 arg_label->add_int64value((uintptr_t)label); 13812 13813 // call function 13814 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13815 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13816 glContext->hooks->gl.glObjectLabelKHR(identifier, name, length, label); 13817 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13818 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13819 13820 void *pointerArgs[] = { 13821 (void *) label, 13822 }; 13823 13824 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13825 threadStartTime, threadEndTime, 13826 &glmsg, pointerArgs); 13827 glContext->traceGLMessage(&glmsg); 13828 } 13829 13830 void GLTrace_glGetObjectLabelKHR(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label) { 13831 GLMessage glmsg; 13832 GLTraceContext *glContext = getGLTraceContext(); 13833 13834 glmsg.set_function(GLMessage::glGetObjectLabelKHR); 13835 13836 // copy argument identifier 13837 GLMessage_DataType *arg_identifier = glmsg.add_args(); 13838 arg_identifier->set_isarray(false); 13839 arg_identifier->set_type(GLMessage::DataType::ENUM); 13840 arg_identifier->add_intvalue((int)identifier); 13841 13842 // copy argument name 13843 GLMessage_DataType *arg_name = glmsg.add_args(); 13844 arg_name->set_isarray(false); 13845 arg_name->set_type(GLMessage::DataType::INT); 13846 arg_name->add_intvalue(name); 13847 13848 // copy argument bufSize 13849 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 13850 arg_bufSize->set_isarray(false); 13851 arg_bufSize->set_type(GLMessage::DataType::INT); 13852 arg_bufSize->add_intvalue(bufSize); 13853 13854 // copy argument length 13855 GLMessage_DataType *arg_length = glmsg.add_args(); 13856 arg_length->set_isarray(false); 13857 arg_length->set_type(GLMessage::DataType::INT64); 13858 arg_length->add_int64value((uintptr_t)length); 13859 13860 // copy argument label 13861 GLMessage_DataType *arg_label = glmsg.add_args(); 13862 arg_label->set_isarray(false); 13863 arg_label->set_type(GLMessage::DataType::INT64); 13864 arg_label->add_int64value((uintptr_t)label); 13865 13866 // call function 13867 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13868 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13869 glContext->hooks->gl.glGetObjectLabelKHR(identifier, name, bufSize, length, label); 13870 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13871 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13872 13873 void *pointerArgs[] = { 13874 (void *) length, 13875 (void *) label, 13876 }; 13877 13878 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13879 threadStartTime, threadEndTime, 13880 &glmsg, pointerArgs); 13881 glContext->traceGLMessage(&glmsg); 13882 } 13883 13884 void GLTrace_glObjectPtrLabelKHR(const void * ptr, GLsizei length, const GLchar * label) { 13885 GLMessage glmsg; 13886 GLTraceContext *glContext = getGLTraceContext(); 13887 13888 glmsg.set_function(GLMessage::glObjectPtrLabelKHR); 13889 13890 // copy argument ptr 13891 GLMessage_DataType *arg_ptr = glmsg.add_args(); 13892 arg_ptr->set_isarray(false); 13893 arg_ptr->set_type(GLMessage::DataType::INT64); 13894 arg_ptr->add_int64value((uintptr_t)ptr); 13895 13896 // copy argument length 13897 GLMessage_DataType *arg_length = glmsg.add_args(); 13898 arg_length->set_isarray(false); 13899 arg_length->set_type(GLMessage::DataType::INT); 13900 arg_length->add_intvalue(length); 13901 13902 // copy argument label 13903 GLMessage_DataType *arg_label = glmsg.add_args(); 13904 arg_label->set_isarray(false); 13905 arg_label->set_type(GLMessage::DataType::INT64); 13906 arg_label->add_int64value((uintptr_t)label); 13907 13908 // call function 13909 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13910 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13911 glContext->hooks->gl.glObjectPtrLabelKHR(ptr, length, label); 13912 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13913 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13914 13915 void *pointerArgs[] = { 13916 (void *) ptr, 13917 (void *) label, 13918 }; 13919 13920 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13921 threadStartTime, threadEndTime, 13922 &glmsg, pointerArgs); 13923 glContext->traceGLMessage(&glmsg); 13924 } 13925 13926 void GLTrace_glGetObjectPtrLabelKHR(const void * ptr, GLsizei bufSize, GLsizei * length, GLchar * label) { 13927 GLMessage glmsg; 13928 GLTraceContext *glContext = getGLTraceContext(); 13929 13930 glmsg.set_function(GLMessage::glGetObjectPtrLabelKHR); 13931 13932 // copy argument ptr 13933 GLMessage_DataType *arg_ptr = glmsg.add_args(); 13934 arg_ptr->set_isarray(false); 13935 arg_ptr->set_type(GLMessage::DataType::INT64); 13936 arg_ptr->add_int64value((uintptr_t)ptr); 13937 13938 // copy argument bufSize 13939 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 13940 arg_bufSize->set_isarray(false); 13941 arg_bufSize->set_type(GLMessage::DataType::INT); 13942 arg_bufSize->add_intvalue(bufSize); 13943 13944 // copy argument length 13945 GLMessage_DataType *arg_length = glmsg.add_args(); 13946 arg_length->set_isarray(false); 13947 arg_length->set_type(GLMessage::DataType::INT64); 13948 arg_length->add_int64value((uintptr_t)length); 13949 13950 // copy argument label 13951 GLMessage_DataType *arg_label = glmsg.add_args(); 13952 arg_label->set_isarray(false); 13953 arg_label->set_type(GLMessage::DataType::INT64); 13954 arg_label->add_int64value((uintptr_t)label); 13955 13956 // call function 13957 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13958 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13959 glContext->hooks->gl.glGetObjectPtrLabelKHR(ptr, bufSize, length, label); 13960 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13961 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13962 13963 void *pointerArgs[] = { 13964 (void *) ptr, 13965 (void *) length, 13966 (void *) label, 13967 }; 13968 13969 fixupGLMessage(glContext, wallStartTime, wallEndTime, 13970 threadStartTime, threadEndTime, 13971 &glmsg, pointerArgs); 13972 glContext->traceGLMessage(&glmsg); 13973 } 13974 13975 void GLTrace_glGetPointervKHR(GLenum pname, void ** params) { 13976 GLMessage glmsg; 13977 GLTraceContext *glContext = getGLTraceContext(); 13978 13979 glmsg.set_function(GLMessage::glGetPointervKHR); 13980 13981 // copy argument pname 13982 GLMessage_DataType *arg_pname = glmsg.add_args(); 13983 arg_pname->set_isarray(false); 13984 arg_pname->set_type(GLMessage::DataType::ENUM); 13985 arg_pname->add_intvalue((int)pname); 13986 13987 // copy argument params 13988 GLMessage_DataType *arg_params = glmsg.add_args(); 13989 arg_params->set_isarray(false); 13990 arg_params->set_type(GLMessage::DataType::INT64); 13991 arg_params->add_int64value((uintptr_t)params); 13992 13993 // call function 13994 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 13995 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 13996 glContext->hooks->gl.glGetPointervKHR(pname, params); 13997 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 13998 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 13999 14000 void *pointerArgs[] = { 14001 (void *) params, 14002 }; 14003 14004 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14005 threadStartTime, threadEndTime, 14006 &glmsg, pointerArgs); 14007 glContext->traceGLMessage(&glmsg); 14008 } 14009 14010 void GLTrace_glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) { 14011 GLMessage glmsg; 14012 GLTraceContext *glContext = getGLTraceContext(); 14013 14014 glmsg.set_function(GLMessage::glEGLImageTargetTexture2DOES); 14015 14016 // copy argument target 14017 GLMessage_DataType *arg_target = glmsg.add_args(); 14018 arg_target->set_isarray(false); 14019 arg_target->set_type(GLMessage::DataType::ENUM); 14020 arg_target->add_intvalue((int)target); 14021 14022 // copy argument image 14023 GLMessage_DataType *arg_image = glmsg.add_args(); 14024 arg_image->set_isarray(false); 14025 arg_image->set_type(GLMessage::DataType::INT64); 14026 arg_image->add_int64value((uintptr_t)image); 14027 14028 // call function 14029 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14030 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14031 glContext->hooks->gl.glEGLImageTargetTexture2DOES(target, image); 14032 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14033 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14034 14035 void *pointerArgs[] = { 14036 (void *) image, 14037 }; 14038 14039 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14040 threadStartTime, threadEndTime, 14041 &glmsg, pointerArgs); 14042 glContext->traceGLMessage(&glmsg); 14043 } 14044 14045 void GLTrace_glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) { 14046 GLMessage glmsg; 14047 GLTraceContext *glContext = getGLTraceContext(); 14048 14049 glmsg.set_function(GLMessage::glEGLImageTargetRenderbufferStorageOES); 14050 14051 // copy argument target 14052 GLMessage_DataType *arg_target = glmsg.add_args(); 14053 arg_target->set_isarray(false); 14054 arg_target->set_type(GLMessage::DataType::ENUM); 14055 arg_target->add_intvalue((int)target); 14056 14057 // copy argument image 14058 GLMessage_DataType *arg_image = glmsg.add_args(); 14059 arg_image->set_isarray(false); 14060 arg_image->set_type(GLMessage::DataType::INT64); 14061 arg_image->add_int64value((uintptr_t)image); 14062 14063 // call function 14064 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14065 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14066 glContext->hooks->gl.glEGLImageTargetRenderbufferStorageOES(target, image); 14067 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14068 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14069 14070 void *pointerArgs[] = { 14071 (void *) image, 14072 }; 14073 14074 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14075 threadStartTime, threadEndTime, 14076 &glmsg, pointerArgs); 14077 glContext->traceGLMessage(&glmsg); 14078 } 14079 14080 void GLTrace_glGetProgramBinaryOES(GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, void * binary) { 14081 GLMessage glmsg; 14082 GLTraceContext *glContext = getGLTraceContext(); 14083 14084 glmsg.set_function(GLMessage::glGetProgramBinaryOES); 14085 14086 // copy argument program 14087 GLMessage_DataType *arg_program = glmsg.add_args(); 14088 arg_program->set_isarray(false); 14089 arg_program->set_type(GLMessage::DataType::INT); 14090 arg_program->add_intvalue(program); 14091 14092 // copy argument bufSize 14093 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 14094 arg_bufSize->set_isarray(false); 14095 arg_bufSize->set_type(GLMessage::DataType::INT); 14096 arg_bufSize->add_intvalue(bufSize); 14097 14098 // copy argument length 14099 GLMessage_DataType *arg_length = glmsg.add_args(); 14100 arg_length->set_isarray(false); 14101 arg_length->set_type(GLMessage::DataType::INT64); 14102 arg_length->add_int64value((uintptr_t)length); 14103 14104 // copy argument binaryFormat 14105 GLMessage_DataType *arg_binaryFormat = glmsg.add_args(); 14106 arg_binaryFormat->set_isarray(false); 14107 arg_binaryFormat->set_type(GLMessage::DataType::INT64); 14108 arg_binaryFormat->add_int64value((uintptr_t)binaryFormat); 14109 14110 // copy argument binary 14111 GLMessage_DataType *arg_binary = glmsg.add_args(); 14112 arg_binary->set_isarray(false); 14113 arg_binary->set_type(GLMessage::DataType::INT64); 14114 arg_binary->add_int64value((uintptr_t)binary); 14115 14116 // call function 14117 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14118 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14119 glContext->hooks->gl.glGetProgramBinaryOES(program, bufSize, length, binaryFormat, binary); 14120 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14121 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14122 14123 void *pointerArgs[] = { 14124 (void *) length, 14125 (void *) binaryFormat, 14126 (void *) binary, 14127 }; 14128 14129 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14130 threadStartTime, threadEndTime, 14131 &glmsg, pointerArgs); 14132 glContext->traceGLMessage(&glmsg); 14133 } 14134 14135 void GLTrace_glProgramBinaryOES(GLuint program, GLenum binaryFormat, const void * binary, GLint length) { 14136 GLMessage glmsg; 14137 GLTraceContext *glContext = getGLTraceContext(); 14138 14139 glmsg.set_function(GLMessage::glProgramBinaryOES); 14140 14141 // copy argument program 14142 GLMessage_DataType *arg_program = glmsg.add_args(); 14143 arg_program->set_isarray(false); 14144 arg_program->set_type(GLMessage::DataType::INT); 14145 arg_program->add_intvalue(program); 14146 14147 // copy argument binaryFormat 14148 GLMessage_DataType *arg_binaryFormat = glmsg.add_args(); 14149 arg_binaryFormat->set_isarray(false); 14150 arg_binaryFormat->set_type(GLMessage::DataType::ENUM); 14151 arg_binaryFormat->add_intvalue((int)binaryFormat); 14152 14153 // copy argument binary 14154 GLMessage_DataType *arg_binary = glmsg.add_args(); 14155 arg_binary->set_isarray(false); 14156 arg_binary->set_type(GLMessage::DataType::INT64); 14157 arg_binary->add_int64value((uintptr_t)binary); 14158 14159 // copy argument length 14160 GLMessage_DataType *arg_length = glmsg.add_args(); 14161 arg_length->set_isarray(false); 14162 arg_length->set_type(GLMessage::DataType::INT); 14163 arg_length->add_intvalue(length); 14164 14165 // call function 14166 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14167 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14168 glContext->hooks->gl.glProgramBinaryOES(program, binaryFormat, binary, length); 14169 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14170 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14171 14172 void *pointerArgs[] = { 14173 (void *) binary, 14174 }; 14175 14176 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14177 threadStartTime, threadEndTime, 14178 &glmsg, pointerArgs); 14179 glContext->traceGLMessage(&glmsg); 14180 } 14181 14182 void * GLTrace_glMapBufferOES(GLenum target, GLenum access) { 14183 GLMessage glmsg; 14184 GLTraceContext *glContext = getGLTraceContext(); 14185 14186 glmsg.set_function(GLMessage::glMapBufferOES); 14187 14188 // copy argument target 14189 GLMessage_DataType *arg_target = glmsg.add_args(); 14190 arg_target->set_isarray(false); 14191 arg_target->set_type(GLMessage::DataType::ENUM); 14192 arg_target->add_intvalue((int)target); 14193 14194 // copy argument access 14195 GLMessage_DataType *arg_access = glmsg.add_args(); 14196 arg_access->set_isarray(false); 14197 arg_access->set_type(GLMessage::DataType::ENUM); 14198 arg_access->add_intvalue((int)access); 14199 14200 // call function 14201 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14202 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14203 void * retValue = glContext->hooks->gl.glMapBufferOES(target, access); 14204 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14205 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14206 14207 // set return value 14208 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 14209 rt->set_isarray(false); 14210 rt->set_type(GLMessage::DataType::INT64); 14211 rt->add_int64value((uintptr_t)retValue); 14212 14213 void *pointerArgs[] = { 14214 (void *) retValue, 14215 }; 14216 14217 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14218 threadStartTime, threadEndTime, 14219 &glmsg, pointerArgs); 14220 glContext->traceGLMessage(&glmsg); 14221 14222 return retValue; 14223 } 14224 14225 GLboolean GLTrace_glUnmapBufferOES(GLenum target) { 14226 GLMessage glmsg; 14227 GLTraceContext *glContext = getGLTraceContext(); 14228 14229 glmsg.set_function(GLMessage::glUnmapBufferOES); 14230 14231 // copy argument target 14232 GLMessage_DataType *arg_target = glmsg.add_args(); 14233 arg_target->set_isarray(false); 14234 arg_target->set_type(GLMessage::DataType::ENUM); 14235 arg_target->add_intvalue((int)target); 14236 14237 // call function 14238 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14239 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14240 GLboolean retValue = glContext->hooks->gl.glUnmapBufferOES(target); 14241 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14242 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14243 14244 // set return value 14245 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 14246 rt->set_isarray(false); 14247 rt->set_type(GLMessage::DataType::BOOL); 14248 rt->add_boolvalue(retValue); 14249 14250 void *pointerArgs[] = { 14251 }; 14252 14253 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14254 threadStartTime, threadEndTime, 14255 &glmsg, pointerArgs); 14256 glContext->traceGLMessage(&glmsg); 14257 14258 return retValue; 14259 } 14260 14261 void GLTrace_glGetBufferPointervOES(GLenum target, GLenum pname, void ** params) { 14262 GLMessage glmsg; 14263 GLTraceContext *glContext = getGLTraceContext(); 14264 14265 glmsg.set_function(GLMessage::glGetBufferPointervOES); 14266 14267 // copy argument target 14268 GLMessage_DataType *arg_target = glmsg.add_args(); 14269 arg_target->set_isarray(false); 14270 arg_target->set_type(GLMessage::DataType::ENUM); 14271 arg_target->add_intvalue((int)target); 14272 14273 // copy argument pname 14274 GLMessage_DataType *arg_pname = glmsg.add_args(); 14275 arg_pname->set_isarray(false); 14276 arg_pname->set_type(GLMessage::DataType::ENUM); 14277 arg_pname->add_intvalue((int)pname); 14278 14279 // copy argument params 14280 GLMessage_DataType *arg_params = glmsg.add_args(); 14281 arg_params->set_isarray(false); 14282 arg_params->set_type(GLMessage::DataType::INT64); 14283 arg_params->add_int64value((uintptr_t)params); 14284 14285 // call function 14286 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14287 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14288 glContext->hooks->gl.glGetBufferPointervOES(target, pname, params); 14289 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14290 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14291 14292 void *pointerArgs[] = { 14293 (void *) params, 14294 }; 14295 14296 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14297 threadStartTime, threadEndTime, 14298 &glmsg, pointerArgs); 14299 glContext->traceGLMessage(&glmsg); 14300 } 14301 14302 void GLTrace_glMinSampleShadingOES(GLfloat value) { 14303 GLMessage glmsg; 14304 GLTraceContext *glContext = getGLTraceContext(); 14305 14306 glmsg.set_function(GLMessage::glMinSampleShadingOES); 14307 14308 // copy argument value 14309 GLMessage_DataType *arg_value = glmsg.add_args(); 14310 arg_value->set_isarray(false); 14311 arg_value->set_type(GLMessage::DataType::FLOAT); 14312 arg_value->add_floatvalue(value); 14313 14314 // call function 14315 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14316 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14317 glContext->hooks->gl.glMinSampleShadingOES(value); 14318 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14319 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14320 14321 void *pointerArgs[] = { 14322 }; 14323 14324 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14325 threadStartTime, threadEndTime, 14326 &glmsg, pointerArgs); 14327 glContext->traceGLMessage(&glmsg); 14328 } 14329 14330 void GLTrace_glTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void * pixels) { 14331 GLMessage glmsg; 14332 GLTraceContext *glContext = getGLTraceContext(); 14333 14334 glmsg.set_function(GLMessage::glTexImage3DOES); 14335 14336 // copy argument target 14337 GLMessage_DataType *arg_target = glmsg.add_args(); 14338 arg_target->set_isarray(false); 14339 arg_target->set_type(GLMessage::DataType::ENUM); 14340 arg_target->add_intvalue((int)target); 14341 14342 // copy argument level 14343 GLMessage_DataType *arg_level = glmsg.add_args(); 14344 arg_level->set_isarray(false); 14345 arg_level->set_type(GLMessage::DataType::INT); 14346 arg_level->add_intvalue(level); 14347 14348 // copy argument internalformat 14349 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 14350 arg_internalformat->set_isarray(false); 14351 arg_internalformat->set_type(GLMessage::DataType::ENUM); 14352 arg_internalformat->add_intvalue((int)internalformat); 14353 14354 // copy argument width 14355 GLMessage_DataType *arg_width = glmsg.add_args(); 14356 arg_width->set_isarray(false); 14357 arg_width->set_type(GLMessage::DataType::INT); 14358 arg_width->add_intvalue(width); 14359 14360 // copy argument height 14361 GLMessage_DataType *arg_height = glmsg.add_args(); 14362 arg_height->set_isarray(false); 14363 arg_height->set_type(GLMessage::DataType::INT); 14364 arg_height->add_intvalue(height); 14365 14366 // copy argument depth 14367 GLMessage_DataType *arg_depth = glmsg.add_args(); 14368 arg_depth->set_isarray(false); 14369 arg_depth->set_type(GLMessage::DataType::INT); 14370 arg_depth->add_intvalue(depth); 14371 14372 // copy argument border 14373 GLMessage_DataType *arg_border = glmsg.add_args(); 14374 arg_border->set_isarray(false); 14375 arg_border->set_type(GLMessage::DataType::INT); 14376 arg_border->add_intvalue(border); 14377 14378 // copy argument format 14379 GLMessage_DataType *arg_format = glmsg.add_args(); 14380 arg_format->set_isarray(false); 14381 arg_format->set_type(GLMessage::DataType::ENUM); 14382 arg_format->add_intvalue((int)format); 14383 14384 // copy argument type 14385 GLMessage_DataType *arg_type = glmsg.add_args(); 14386 arg_type->set_isarray(false); 14387 arg_type->set_type(GLMessage::DataType::ENUM); 14388 arg_type->add_intvalue((int)type); 14389 14390 // copy argument pixels 14391 GLMessage_DataType *arg_pixels = glmsg.add_args(); 14392 arg_pixels->set_isarray(false); 14393 arg_pixels->set_type(GLMessage::DataType::INT64); 14394 arg_pixels->add_int64value((uintptr_t)pixels); 14395 14396 // call function 14397 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14398 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14399 glContext->hooks->gl.glTexImage3DOES(target, level, internalformat, width, height, depth, border, format, type, pixels); 14400 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14401 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14402 14403 void *pointerArgs[] = { 14404 (void *) pixels, 14405 }; 14406 14407 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14408 threadStartTime, threadEndTime, 14409 &glmsg, pointerArgs); 14410 glContext->traceGLMessage(&glmsg); 14411 } 14412 14413 void GLTrace_glTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void * pixels) { 14414 GLMessage glmsg; 14415 GLTraceContext *glContext = getGLTraceContext(); 14416 14417 glmsg.set_function(GLMessage::glTexSubImage3DOES); 14418 14419 // copy argument target 14420 GLMessage_DataType *arg_target = glmsg.add_args(); 14421 arg_target->set_isarray(false); 14422 arg_target->set_type(GLMessage::DataType::ENUM); 14423 arg_target->add_intvalue((int)target); 14424 14425 // copy argument level 14426 GLMessage_DataType *arg_level = glmsg.add_args(); 14427 arg_level->set_isarray(false); 14428 arg_level->set_type(GLMessage::DataType::INT); 14429 arg_level->add_intvalue(level); 14430 14431 // copy argument xoffset 14432 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 14433 arg_xoffset->set_isarray(false); 14434 arg_xoffset->set_type(GLMessage::DataType::INT); 14435 arg_xoffset->add_intvalue(xoffset); 14436 14437 // copy argument yoffset 14438 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 14439 arg_yoffset->set_isarray(false); 14440 arg_yoffset->set_type(GLMessage::DataType::INT); 14441 arg_yoffset->add_intvalue(yoffset); 14442 14443 // copy argument zoffset 14444 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 14445 arg_zoffset->set_isarray(false); 14446 arg_zoffset->set_type(GLMessage::DataType::INT); 14447 arg_zoffset->add_intvalue(zoffset); 14448 14449 // copy argument width 14450 GLMessage_DataType *arg_width = glmsg.add_args(); 14451 arg_width->set_isarray(false); 14452 arg_width->set_type(GLMessage::DataType::INT); 14453 arg_width->add_intvalue(width); 14454 14455 // copy argument height 14456 GLMessage_DataType *arg_height = glmsg.add_args(); 14457 arg_height->set_isarray(false); 14458 arg_height->set_type(GLMessage::DataType::INT); 14459 arg_height->add_intvalue(height); 14460 14461 // copy argument depth 14462 GLMessage_DataType *arg_depth = glmsg.add_args(); 14463 arg_depth->set_isarray(false); 14464 arg_depth->set_type(GLMessage::DataType::INT); 14465 arg_depth->add_intvalue(depth); 14466 14467 // copy argument format 14468 GLMessage_DataType *arg_format = glmsg.add_args(); 14469 arg_format->set_isarray(false); 14470 arg_format->set_type(GLMessage::DataType::ENUM); 14471 arg_format->add_intvalue((int)format); 14472 14473 // copy argument type 14474 GLMessage_DataType *arg_type = glmsg.add_args(); 14475 arg_type->set_isarray(false); 14476 arg_type->set_type(GLMessage::DataType::ENUM); 14477 arg_type->add_intvalue((int)type); 14478 14479 // copy argument pixels 14480 GLMessage_DataType *arg_pixels = glmsg.add_args(); 14481 arg_pixels->set_isarray(false); 14482 arg_pixels->set_type(GLMessage::DataType::INT64); 14483 arg_pixels->add_int64value((uintptr_t)pixels); 14484 14485 // call function 14486 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14487 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14488 glContext->hooks->gl.glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); 14489 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14490 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14491 14492 void *pointerArgs[] = { 14493 (void *) pixels, 14494 }; 14495 14496 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14497 threadStartTime, threadEndTime, 14498 &glmsg, pointerArgs); 14499 glContext->traceGLMessage(&glmsg); 14500 } 14501 14502 void GLTrace_glCopyTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { 14503 GLMessage glmsg; 14504 GLTraceContext *glContext = getGLTraceContext(); 14505 14506 glmsg.set_function(GLMessage::glCopyTexSubImage3DOES); 14507 14508 // copy argument target 14509 GLMessage_DataType *arg_target = glmsg.add_args(); 14510 arg_target->set_isarray(false); 14511 arg_target->set_type(GLMessage::DataType::ENUM); 14512 arg_target->add_intvalue((int)target); 14513 14514 // copy argument level 14515 GLMessage_DataType *arg_level = glmsg.add_args(); 14516 arg_level->set_isarray(false); 14517 arg_level->set_type(GLMessage::DataType::INT); 14518 arg_level->add_intvalue(level); 14519 14520 // copy argument xoffset 14521 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 14522 arg_xoffset->set_isarray(false); 14523 arg_xoffset->set_type(GLMessage::DataType::INT); 14524 arg_xoffset->add_intvalue(xoffset); 14525 14526 // copy argument yoffset 14527 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 14528 arg_yoffset->set_isarray(false); 14529 arg_yoffset->set_type(GLMessage::DataType::INT); 14530 arg_yoffset->add_intvalue(yoffset); 14531 14532 // copy argument zoffset 14533 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 14534 arg_zoffset->set_isarray(false); 14535 arg_zoffset->set_type(GLMessage::DataType::INT); 14536 arg_zoffset->add_intvalue(zoffset); 14537 14538 // copy argument x 14539 GLMessage_DataType *arg_x = glmsg.add_args(); 14540 arg_x->set_isarray(false); 14541 arg_x->set_type(GLMessage::DataType::INT); 14542 arg_x->add_intvalue(x); 14543 14544 // copy argument y 14545 GLMessage_DataType *arg_y = glmsg.add_args(); 14546 arg_y->set_isarray(false); 14547 arg_y->set_type(GLMessage::DataType::INT); 14548 arg_y->add_intvalue(y); 14549 14550 // copy argument width 14551 GLMessage_DataType *arg_width = glmsg.add_args(); 14552 arg_width->set_isarray(false); 14553 arg_width->set_type(GLMessage::DataType::INT); 14554 arg_width->add_intvalue(width); 14555 14556 // copy argument height 14557 GLMessage_DataType *arg_height = glmsg.add_args(); 14558 arg_height->set_isarray(false); 14559 arg_height->set_type(GLMessage::DataType::INT); 14560 arg_height->add_intvalue(height); 14561 14562 // call function 14563 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14564 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14565 glContext->hooks->gl.glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); 14566 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14567 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14568 14569 void *pointerArgs[] = { 14570 }; 14571 14572 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14573 threadStartTime, threadEndTime, 14574 &glmsg, pointerArgs); 14575 glContext->traceGLMessage(&glmsg); 14576 } 14577 14578 void GLTrace_glCompressedTexImage3DOES(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void * data) { 14579 GLMessage glmsg; 14580 GLTraceContext *glContext = getGLTraceContext(); 14581 14582 glmsg.set_function(GLMessage::glCompressedTexImage3DOES); 14583 14584 // copy argument target 14585 GLMessage_DataType *arg_target = glmsg.add_args(); 14586 arg_target->set_isarray(false); 14587 arg_target->set_type(GLMessage::DataType::ENUM); 14588 arg_target->add_intvalue((int)target); 14589 14590 // copy argument level 14591 GLMessage_DataType *arg_level = glmsg.add_args(); 14592 arg_level->set_isarray(false); 14593 arg_level->set_type(GLMessage::DataType::INT); 14594 arg_level->add_intvalue(level); 14595 14596 // copy argument internalformat 14597 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 14598 arg_internalformat->set_isarray(false); 14599 arg_internalformat->set_type(GLMessage::DataType::ENUM); 14600 arg_internalformat->add_intvalue((int)internalformat); 14601 14602 // copy argument width 14603 GLMessage_DataType *arg_width = glmsg.add_args(); 14604 arg_width->set_isarray(false); 14605 arg_width->set_type(GLMessage::DataType::INT); 14606 arg_width->add_intvalue(width); 14607 14608 // copy argument height 14609 GLMessage_DataType *arg_height = glmsg.add_args(); 14610 arg_height->set_isarray(false); 14611 arg_height->set_type(GLMessage::DataType::INT); 14612 arg_height->add_intvalue(height); 14613 14614 // copy argument depth 14615 GLMessage_DataType *arg_depth = glmsg.add_args(); 14616 arg_depth->set_isarray(false); 14617 arg_depth->set_type(GLMessage::DataType::INT); 14618 arg_depth->add_intvalue(depth); 14619 14620 // copy argument border 14621 GLMessage_DataType *arg_border = glmsg.add_args(); 14622 arg_border->set_isarray(false); 14623 arg_border->set_type(GLMessage::DataType::INT); 14624 arg_border->add_intvalue(border); 14625 14626 // copy argument imageSize 14627 GLMessage_DataType *arg_imageSize = glmsg.add_args(); 14628 arg_imageSize->set_isarray(false); 14629 arg_imageSize->set_type(GLMessage::DataType::INT); 14630 arg_imageSize->add_intvalue(imageSize); 14631 14632 // copy argument data 14633 GLMessage_DataType *arg_data = glmsg.add_args(); 14634 arg_data->set_isarray(false); 14635 arg_data->set_type(GLMessage::DataType::INT64); 14636 arg_data->add_int64value((uintptr_t)data); 14637 14638 // call function 14639 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14640 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14641 glContext->hooks->gl.glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data); 14642 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14643 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14644 14645 void *pointerArgs[] = { 14646 (void *) data, 14647 }; 14648 14649 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14650 threadStartTime, threadEndTime, 14651 &glmsg, pointerArgs); 14652 glContext->traceGLMessage(&glmsg); 14653 } 14654 14655 void GLTrace_glCompressedTexSubImage3DOES(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void * data) { 14656 GLMessage glmsg; 14657 GLTraceContext *glContext = getGLTraceContext(); 14658 14659 glmsg.set_function(GLMessage::glCompressedTexSubImage3DOES); 14660 14661 // copy argument target 14662 GLMessage_DataType *arg_target = glmsg.add_args(); 14663 arg_target->set_isarray(false); 14664 arg_target->set_type(GLMessage::DataType::ENUM); 14665 arg_target->add_intvalue((int)target); 14666 14667 // copy argument level 14668 GLMessage_DataType *arg_level = glmsg.add_args(); 14669 arg_level->set_isarray(false); 14670 arg_level->set_type(GLMessage::DataType::INT); 14671 arg_level->add_intvalue(level); 14672 14673 // copy argument xoffset 14674 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 14675 arg_xoffset->set_isarray(false); 14676 arg_xoffset->set_type(GLMessage::DataType::INT); 14677 arg_xoffset->add_intvalue(xoffset); 14678 14679 // copy argument yoffset 14680 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 14681 arg_yoffset->set_isarray(false); 14682 arg_yoffset->set_type(GLMessage::DataType::INT); 14683 arg_yoffset->add_intvalue(yoffset); 14684 14685 // copy argument zoffset 14686 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 14687 arg_zoffset->set_isarray(false); 14688 arg_zoffset->set_type(GLMessage::DataType::INT); 14689 arg_zoffset->add_intvalue(zoffset); 14690 14691 // copy argument width 14692 GLMessage_DataType *arg_width = glmsg.add_args(); 14693 arg_width->set_isarray(false); 14694 arg_width->set_type(GLMessage::DataType::INT); 14695 arg_width->add_intvalue(width); 14696 14697 // copy argument height 14698 GLMessage_DataType *arg_height = glmsg.add_args(); 14699 arg_height->set_isarray(false); 14700 arg_height->set_type(GLMessage::DataType::INT); 14701 arg_height->add_intvalue(height); 14702 14703 // copy argument depth 14704 GLMessage_DataType *arg_depth = glmsg.add_args(); 14705 arg_depth->set_isarray(false); 14706 arg_depth->set_type(GLMessage::DataType::INT); 14707 arg_depth->add_intvalue(depth); 14708 14709 // copy argument format 14710 GLMessage_DataType *arg_format = glmsg.add_args(); 14711 arg_format->set_isarray(false); 14712 arg_format->set_type(GLMessage::DataType::ENUM); 14713 arg_format->add_intvalue((int)format); 14714 14715 // copy argument imageSize 14716 GLMessage_DataType *arg_imageSize = glmsg.add_args(); 14717 arg_imageSize->set_isarray(false); 14718 arg_imageSize->set_type(GLMessage::DataType::INT); 14719 arg_imageSize->add_intvalue(imageSize); 14720 14721 // copy argument data 14722 GLMessage_DataType *arg_data = glmsg.add_args(); 14723 arg_data->set_isarray(false); 14724 arg_data->set_type(GLMessage::DataType::INT64); 14725 arg_data->add_int64value((uintptr_t)data); 14726 14727 // call function 14728 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14729 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14730 glContext->hooks->gl.glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); 14731 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14732 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14733 14734 void *pointerArgs[] = { 14735 (void *) data, 14736 }; 14737 14738 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14739 threadStartTime, threadEndTime, 14740 &glmsg, pointerArgs); 14741 glContext->traceGLMessage(&glmsg); 14742 } 14743 14744 void GLTrace_glFramebufferTexture3DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { 14745 GLMessage glmsg; 14746 GLTraceContext *glContext = getGLTraceContext(); 14747 14748 glmsg.set_function(GLMessage::glFramebufferTexture3DOES); 14749 14750 // copy argument target 14751 GLMessage_DataType *arg_target = glmsg.add_args(); 14752 arg_target->set_isarray(false); 14753 arg_target->set_type(GLMessage::DataType::ENUM); 14754 arg_target->add_intvalue((int)target); 14755 14756 // copy argument attachment 14757 GLMessage_DataType *arg_attachment = glmsg.add_args(); 14758 arg_attachment->set_isarray(false); 14759 arg_attachment->set_type(GLMessage::DataType::ENUM); 14760 arg_attachment->add_intvalue((int)attachment); 14761 14762 // copy argument textarget 14763 GLMessage_DataType *arg_textarget = glmsg.add_args(); 14764 arg_textarget->set_isarray(false); 14765 arg_textarget->set_type(GLMessage::DataType::ENUM); 14766 arg_textarget->add_intvalue((int)textarget); 14767 14768 // copy argument texture 14769 GLMessage_DataType *arg_texture = glmsg.add_args(); 14770 arg_texture->set_isarray(false); 14771 arg_texture->set_type(GLMessage::DataType::INT); 14772 arg_texture->add_intvalue(texture); 14773 14774 // copy argument level 14775 GLMessage_DataType *arg_level = glmsg.add_args(); 14776 arg_level->set_isarray(false); 14777 arg_level->set_type(GLMessage::DataType::INT); 14778 arg_level->add_intvalue(level); 14779 14780 // copy argument zoffset 14781 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 14782 arg_zoffset->set_isarray(false); 14783 arg_zoffset->set_type(GLMessage::DataType::INT); 14784 arg_zoffset->add_intvalue(zoffset); 14785 14786 // call function 14787 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14788 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14789 glContext->hooks->gl.glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); 14790 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14791 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14792 14793 void *pointerArgs[] = { 14794 }; 14795 14796 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14797 threadStartTime, threadEndTime, 14798 &glmsg, pointerArgs); 14799 glContext->traceGLMessage(&glmsg); 14800 } 14801 14802 void GLTrace_glTexStorage3DMultisampleOES(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations) { 14803 GLMessage glmsg; 14804 GLTraceContext *glContext = getGLTraceContext(); 14805 14806 glmsg.set_function(GLMessage::glTexStorage3DMultisampleOES); 14807 14808 // copy argument target 14809 GLMessage_DataType *arg_target = glmsg.add_args(); 14810 arg_target->set_isarray(false); 14811 arg_target->set_type(GLMessage::DataType::ENUM); 14812 arg_target->add_intvalue((int)target); 14813 14814 // copy argument samples 14815 GLMessage_DataType *arg_samples = glmsg.add_args(); 14816 arg_samples->set_isarray(false); 14817 arg_samples->set_type(GLMessage::DataType::INT); 14818 arg_samples->add_intvalue(samples); 14819 14820 // copy argument internalformat 14821 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 14822 arg_internalformat->set_isarray(false); 14823 arg_internalformat->set_type(GLMessage::DataType::ENUM); 14824 arg_internalformat->add_intvalue((int)internalformat); 14825 14826 // copy argument width 14827 GLMessage_DataType *arg_width = glmsg.add_args(); 14828 arg_width->set_isarray(false); 14829 arg_width->set_type(GLMessage::DataType::INT); 14830 arg_width->add_intvalue(width); 14831 14832 // copy argument height 14833 GLMessage_DataType *arg_height = glmsg.add_args(); 14834 arg_height->set_isarray(false); 14835 arg_height->set_type(GLMessage::DataType::INT); 14836 arg_height->add_intvalue(height); 14837 14838 // copy argument depth 14839 GLMessage_DataType *arg_depth = glmsg.add_args(); 14840 arg_depth->set_isarray(false); 14841 arg_depth->set_type(GLMessage::DataType::INT); 14842 arg_depth->add_intvalue(depth); 14843 14844 // copy argument fixedsamplelocations 14845 GLMessage_DataType *arg_fixedsamplelocations = glmsg.add_args(); 14846 arg_fixedsamplelocations->set_isarray(false); 14847 arg_fixedsamplelocations->set_type(GLMessage::DataType::BOOL); 14848 arg_fixedsamplelocations->add_boolvalue(fixedsamplelocations); 14849 14850 // call function 14851 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14852 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14853 glContext->hooks->gl.glTexStorage3DMultisampleOES(target, samples, internalformat, width, height, depth, fixedsamplelocations); 14854 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14855 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14856 14857 void *pointerArgs[] = { 14858 }; 14859 14860 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14861 threadStartTime, threadEndTime, 14862 &glmsg, pointerArgs); 14863 glContext->traceGLMessage(&glmsg); 14864 } 14865 14866 void GLTrace_glBindVertexArrayOES(GLuint array) { 14867 GLMessage glmsg; 14868 GLTraceContext *glContext = getGLTraceContext(); 14869 14870 glmsg.set_function(GLMessage::glBindVertexArrayOES); 14871 14872 // copy argument array 14873 GLMessage_DataType *arg_array = glmsg.add_args(); 14874 arg_array->set_isarray(false); 14875 arg_array->set_type(GLMessage::DataType::INT); 14876 arg_array->add_intvalue(array); 14877 14878 // call function 14879 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14880 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14881 glContext->hooks->gl.glBindVertexArrayOES(array); 14882 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14883 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14884 14885 void *pointerArgs[] = { 14886 }; 14887 14888 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14889 threadStartTime, threadEndTime, 14890 &glmsg, pointerArgs); 14891 glContext->traceGLMessage(&glmsg); 14892 } 14893 14894 void GLTrace_glDeleteVertexArraysOES(GLsizei n, const GLuint * arrays) { 14895 GLMessage glmsg; 14896 GLTraceContext *glContext = getGLTraceContext(); 14897 14898 glmsg.set_function(GLMessage::glDeleteVertexArraysOES); 14899 14900 // copy argument n 14901 GLMessage_DataType *arg_n = glmsg.add_args(); 14902 arg_n->set_isarray(false); 14903 arg_n->set_type(GLMessage::DataType::INT); 14904 arg_n->add_intvalue(n); 14905 14906 // copy argument arrays 14907 GLMessage_DataType *arg_arrays = glmsg.add_args(); 14908 arg_arrays->set_isarray(false); 14909 arg_arrays->set_type(GLMessage::DataType::INT64); 14910 arg_arrays->add_int64value((uintptr_t)arrays); 14911 14912 // call function 14913 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14914 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14915 glContext->hooks->gl.glDeleteVertexArraysOES(n, arrays); 14916 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14917 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14918 14919 void *pointerArgs[] = { 14920 (void *) arrays, 14921 }; 14922 14923 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14924 threadStartTime, threadEndTime, 14925 &glmsg, pointerArgs); 14926 glContext->traceGLMessage(&glmsg); 14927 } 14928 14929 void GLTrace_glGenVertexArraysOES(GLsizei n, GLuint * arrays) { 14930 GLMessage glmsg; 14931 GLTraceContext *glContext = getGLTraceContext(); 14932 14933 glmsg.set_function(GLMessage::glGenVertexArraysOES); 14934 14935 // copy argument n 14936 GLMessage_DataType *arg_n = glmsg.add_args(); 14937 arg_n->set_isarray(false); 14938 arg_n->set_type(GLMessage::DataType::INT); 14939 arg_n->add_intvalue(n); 14940 14941 // copy argument arrays 14942 GLMessage_DataType *arg_arrays = glmsg.add_args(); 14943 arg_arrays->set_isarray(false); 14944 arg_arrays->set_type(GLMessage::DataType::INT64); 14945 arg_arrays->add_int64value((uintptr_t)arrays); 14946 14947 // call function 14948 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14949 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14950 glContext->hooks->gl.glGenVertexArraysOES(n, arrays); 14951 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14952 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14953 14954 void *pointerArgs[] = { 14955 (void *) arrays, 14956 }; 14957 14958 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14959 threadStartTime, threadEndTime, 14960 &glmsg, pointerArgs); 14961 glContext->traceGLMessage(&glmsg); 14962 } 14963 14964 GLboolean GLTrace_glIsVertexArrayOES(GLuint array) { 14965 GLMessage glmsg; 14966 GLTraceContext *glContext = getGLTraceContext(); 14967 14968 glmsg.set_function(GLMessage::glIsVertexArrayOES); 14969 14970 // copy argument array 14971 GLMessage_DataType *arg_array = glmsg.add_args(); 14972 arg_array->set_isarray(false); 14973 arg_array->set_type(GLMessage::DataType::INT); 14974 arg_array->add_intvalue(array); 14975 14976 // call function 14977 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 14978 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 14979 GLboolean retValue = glContext->hooks->gl.glIsVertexArrayOES(array); 14980 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 14981 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 14982 14983 // set return value 14984 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 14985 rt->set_isarray(false); 14986 rt->set_type(GLMessage::DataType::BOOL); 14987 rt->add_boolvalue(retValue); 14988 14989 void *pointerArgs[] = { 14990 }; 14991 14992 fixupGLMessage(glContext, wallStartTime, wallEndTime, 14993 threadStartTime, threadEndTime, 14994 &glmsg, pointerArgs); 14995 glContext->traceGLMessage(&glmsg); 14996 14997 return retValue; 14998 } 14999 15000 void GLTrace_glGetPerfMonitorGroupsAMD(GLint * numGroups, GLsizei groupsSize, GLuint * groups) { 15001 GLMessage glmsg; 15002 GLTraceContext *glContext = getGLTraceContext(); 15003 15004 glmsg.set_function(GLMessage::glGetPerfMonitorGroupsAMD); 15005 15006 // copy argument numGroups 15007 GLMessage_DataType *arg_numGroups = glmsg.add_args(); 15008 arg_numGroups->set_isarray(false); 15009 arg_numGroups->set_type(GLMessage::DataType::INT64); 15010 arg_numGroups->add_int64value((uintptr_t)numGroups); 15011 15012 // copy argument groupsSize 15013 GLMessage_DataType *arg_groupsSize = glmsg.add_args(); 15014 arg_groupsSize->set_isarray(false); 15015 arg_groupsSize->set_type(GLMessage::DataType::INT); 15016 arg_groupsSize->add_intvalue(groupsSize); 15017 15018 // copy argument groups 15019 GLMessage_DataType *arg_groups = glmsg.add_args(); 15020 arg_groups->set_isarray(false); 15021 arg_groups->set_type(GLMessage::DataType::INT64); 15022 arg_groups->add_int64value((uintptr_t)groups); 15023 15024 // call function 15025 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15026 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15027 glContext->hooks->gl.glGetPerfMonitorGroupsAMD(numGroups, groupsSize, groups); 15028 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15029 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15030 15031 void *pointerArgs[] = { 15032 (void *) numGroups, 15033 (void *) groups, 15034 }; 15035 15036 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15037 threadStartTime, threadEndTime, 15038 &glmsg, pointerArgs); 15039 glContext->traceGLMessage(&glmsg); 15040 } 15041 15042 void GLTrace_glGetPerfMonitorCountersAMD(GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei counterSize, GLuint * counters) { 15043 GLMessage glmsg; 15044 GLTraceContext *glContext = getGLTraceContext(); 15045 15046 glmsg.set_function(GLMessage::glGetPerfMonitorCountersAMD); 15047 15048 // copy argument group 15049 GLMessage_DataType *arg_group = glmsg.add_args(); 15050 arg_group->set_isarray(false); 15051 arg_group->set_type(GLMessage::DataType::INT); 15052 arg_group->add_intvalue(group); 15053 15054 // copy argument numCounters 15055 GLMessage_DataType *arg_numCounters = glmsg.add_args(); 15056 arg_numCounters->set_isarray(false); 15057 arg_numCounters->set_type(GLMessage::DataType::INT64); 15058 arg_numCounters->add_int64value((uintptr_t)numCounters); 15059 15060 // copy argument maxActiveCounters 15061 GLMessage_DataType *arg_maxActiveCounters = glmsg.add_args(); 15062 arg_maxActiveCounters->set_isarray(false); 15063 arg_maxActiveCounters->set_type(GLMessage::DataType::INT64); 15064 arg_maxActiveCounters->add_int64value((uintptr_t)maxActiveCounters); 15065 15066 // copy argument counterSize 15067 GLMessage_DataType *arg_counterSize = glmsg.add_args(); 15068 arg_counterSize->set_isarray(false); 15069 arg_counterSize->set_type(GLMessage::DataType::INT); 15070 arg_counterSize->add_intvalue(counterSize); 15071 15072 // copy argument counters 15073 GLMessage_DataType *arg_counters = glmsg.add_args(); 15074 arg_counters->set_isarray(false); 15075 arg_counters->set_type(GLMessage::DataType::INT64); 15076 arg_counters->add_int64value((uintptr_t)counters); 15077 15078 // call function 15079 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15080 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15081 glContext->hooks->gl.glGetPerfMonitorCountersAMD(group, numCounters, maxActiveCounters, counterSize, counters); 15082 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15083 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15084 15085 void *pointerArgs[] = { 15086 (void *) numCounters, 15087 (void *) maxActiveCounters, 15088 (void *) counters, 15089 }; 15090 15091 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15092 threadStartTime, threadEndTime, 15093 &glmsg, pointerArgs); 15094 glContext->traceGLMessage(&glmsg); 15095 } 15096 15097 void GLTrace_glGetPerfMonitorGroupStringAMD(GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString) { 15098 GLMessage glmsg; 15099 GLTraceContext *glContext = getGLTraceContext(); 15100 15101 glmsg.set_function(GLMessage::glGetPerfMonitorGroupStringAMD); 15102 15103 // copy argument group 15104 GLMessage_DataType *arg_group = glmsg.add_args(); 15105 arg_group->set_isarray(false); 15106 arg_group->set_type(GLMessage::DataType::INT); 15107 arg_group->add_intvalue(group); 15108 15109 // copy argument bufSize 15110 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 15111 arg_bufSize->set_isarray(false); 15112 arg_bufSize->set_type(GLMessage::DataType::INT); 15113 arg_bufSize->add_intvalue(bufSize); 15114 15115 // copy argument length 15116 GLMessage_DataType *arg_length = glmsg.add_args(); 15117 arg_length->set_isarray(false); 15118 arg_length->set_type(GLMessage::DataType::INT64); 15119 arg_length->add_int64value((uintptr_t)length); 15120 15121 // copy argument groupString 15122 GLMessage_DataType *arg_groupString = glmsg.add_args(); 15123 arg_groupString->set_isarray(false); 15124 arg_groupString->set_type(GLMessage::DataType::INT64); 15125 arg_groupString->add_int64value((uintptr_t)groupString); 15126 15127 // call function 15128 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15129 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15130 glContext->hooks->gl.glGetPerfMonitorGroupStringAMD(group, bufSize, length, groupString); 15131 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15132 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15133 15134 void *pointerArgs[] = { 15135 (void *) length, 15136 (void *) groupString, 15137 }; 15138 15139 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15140 threadStartTime, threadEndTime, 15141 &glmsg, pointerArgs); 15142 glContext->traceGLMessage(&glmsg); 15143 } 15144 15145 void GLTrace_glGetPerfMonitorCounterStringAMD(GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString) { 15146 GLMessage glmsg; 15147 GLTraceContext *glContext = getGLTraceContext(); 15148 15149 glmsg.set_function(GLMessage::glGetPerfMonitorCounterStringAMD); 15150 15151 // copy argument group 15152 GLMessage_DataType *arg_group = glmsg.add_args(); 15153 arg_group->set_isarray(false); 15154 arg_group->set_type(GLMessage::DataType::INT); 15155 arg_group->add_intvalue(group); 15156 15157 // copy argument counter 15158 GLMessage_DataType *arg_counter = glmsg.add_args(); 15159 arg_counter->set_isarray(false); 15160 arg_counter->set_type(GLMessage::DataType::INT); 15161 arg_counter->add_intvalue(counter); 15162 15163 // copy argument bufSize 15164 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 15165 arg_bufSize->set_isarray(false); 15166 arg_bufSize->set_type(GLMessage::DataType::INT); 15167 arg_bufSize->add_intvalue(bufSize); 15168 15169 // copy argument length 15170 GLMessage_DataType *arg_length = glmsg.add_args(); 15171 arg_length->set_isarray(false); 15172 arg_length->set_type(GLMessage::DataType::INT64); 15173 arg_length->add_int64value((uintptr_t)length); 15174 15175 // copy argument counterString 15176 GLMessage_DataType *arg_counterString = glmsg.add_args(); 15177 arg_counterString->set_isarray(false); 15178 arg_counterString->set_type(GLMessage::DataType::INT64); 15179 arg_counterString->add_int64value((uintptr_t)counterString); 15180 15181 // call function 15182 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15183 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15184 glContext->hooks->gl.glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length, counterString); 15185 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15186 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15187 15188 void *pointerArgs[] = { 15189 (void *) length, 15190 (void *) counterString, 15191 }; 15192 15193 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15194 threadStartTime, threadEndTime, 15195 &glmsg, pointerArgs); 15196 glContext->traceGLMessage(&glmsg); 15197 } 15198 15199 void GLTrace_glGetPerfMonitorCounterInfoAMD(GLuint group, GLuint counter, GLenum pname, void * data) { 15200 GLMessage glmsg; 15201 GLTraceContext *glContext = getGLTraceContext(); 15202 15203 glmsg.set_function(GLMessage::glGetPerfMonitorCounterInfoAMD); 15204 15205 // copy argument group 15206 GLMessage_DataType *arg_group = glmsg.add_args(); 15207 arg_group->set_isarray(false); 15208 arg_group->set_type(GLMessage::DataType::INT); 15209 arg_group->add_intvalue(group); 15210 15211 // copy argument counter 15212 GLMessage_DataType *arg_counter = glmsg.add_args(); 15213 arg_counter->set_isarray(false); 15214 arg_counter->set_type(GLMessage::DataType::INT); 15215 arg_counter->add_intvalue(counter); 15216 15217 // copy argument pname 15218 GLMessage_DataType *arg_pname = glmsg.add_args(); 15219 arg_pname->set_isarray(false); 15220 arg_pname->set_type(GLMessage::DataType::ENUM); 15221 arg_pname->add_intvalue((int)pname); 15222 15223 // copy argument data 15224 GLMessage_DataType *arg_data = glmsg.add_args(); 15225 arg_data->set_isarray(false); 15226 arg_data->set_type(GLMessage::DataType::INT64); 15227 arg_data->add_int64value((uintptr_t)data); 15228 15229 // call function 15230 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15231 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15232 glContext->hooks->gl.glGetPerfMonitorCounterInfoAMD(group, counter, pname, data); 15233 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15234 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15235 15236 void *pointerArgs[] = { 15237 (void *) data, 15238 }; 15239 15240 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15241 threadStartTime, threadEndTime, 15242 &glmsg, pointerArgs); 15243 glContext->traceGLMessage(&glmsg); 15244 } 15245 15246 void GLTrace_glGenPerfMonitorsAMD(GLsizei n, GLuint * monitors) { 15247 GLMessage glmsg; 15248 GLTraceContext *glContext = getGLTraceContext(); 15249 15250 glmsg.set_function(GLMessage::glGenPerfMonitorsAMD); 15251 15252 // copy argument n 15253 GLMessage_DataType *arg_n = glmsg.add_args(); 15254 arg_n->set_isarray(false); 15255 arg_n->set_type(GLMessage::DataType::INT); 15256 arg_n->add_intvalue(n); 15257 15258 // copy argument monitors 15259 GLMessage_DataType *arg_monitors = glmsg.add_args(); 15260 arg_monitors->set_isarray(false); 15261 arg_monitors->set_type(GLMessage::DataType::INT64); 15262 arg_monitors->add_int64value((uintptr_t)monitors); 15263 15264 // call function 15265 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15266 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15267 glContext->hooks->gl.glGenPerfMonitorsAMD(n, monitors); 15268 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15269 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15270 15271 void *pointerArgs[] = { 15272 (void *) monitors, 15273 }; 15274 15275 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15276 threadStartTime, threadEndTime, 15277 &glmsg, pointerArgs); 15278 glContext->traceGLMessage(&glmsg); 15279 } 15280 15281 void GLTrace_glDeletePerfMonitorsAMD(GLsizei n, GLuint * monitors) { 15282 GLMessage glmsg; 15283 GLTraceContext *glContext = getGLTraceContext(); 15284 15285 glmsg.set_function(GLMessage::glDeletePerfMonitorsAMD); 15286 15287 // copy argument n 15288 GLMessage_DataType *arg_n = glmsg.add_args(); 15289 arg_n->set_isarray(false); 15290 arg_n->set_type(GLMessage::DataType::INT); 15291 arg_n->add_intvalue(n); 15292 15293 // copy argument monitors 15294 GLMessage_DataType *arg_monitors = glmsg.add_args(); 15295 arg_monitors->set_isarray(false); 15296 arg_monitors->set_type(GLMessage::DataType::INT64); 15297 arg_monitors->add_int64value((uintptr_t)monitors); 15298 15299 // call function 15300 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15301 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15302 glContext->hooks->gl.glDeletePerfMonitorsAMD(n, monitors); 15303 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15304 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15305 15306 void *pointerArgs[] = { 15307 (void *) monitors, 15308 }; 15309 15310 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15311 threadStartTime, threadEndTime, 15312 &glmsg, pointerArgs); 15313 glContext->traceGLMessage(&glmsg); 15314 } 15315 15316 void GLTrace_glSelectPerfMonitorCountersAMD(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList) { 15317 GLMessage glmsg; 15318 GLTraceContext *glContext = getGLTraceContext(); 15319 15320 glmsg.set_function(GLMessage::glSelectPerfMonitorCountersAMD); 15321 15322 // copy argument monitor 15323 GLMessage_DataType *arg_monitor = glmsg.add_args(); 15324 arg_monitor->set_isarray(false); 15325 arg_monitor->set_type(GLMessage::DataType::INT); 15326 arg_monitor->add_intvalue(monitor); 15327 15328 // copy argument enable 15329 GLMessage_DataType *arg_enable = glmsg.add_args(); 15330 arg_enable->set_isarray(false); 15331 arg_enable->set_type(GLMessage::DataType::BOOL); 15332 arg_enable->add_boolvalue(enable); 15333 15334 // copy argument group 15335 GLMessage_DataType *arg_group = glmsg.add_args(); 15336 arg_group->set_isarray(false); 15337 arg_group->set_type(GLMessage::DataType::INT); 15338 arg_group->add_intvalue(group); 15339 15340 // copy argument numCounters 15341 GLMessage_DataType *arg_numCounters = glmsg.add_args(); 15342 arg_numCounters->set_isarray(false); 15343 arg_numCounters->set_type(GLMessage::DataType::INT); 15344 arg_numCounters->add_intvalue(numCounters); 15345 15346 // copy argument counterList 15347 GLMessage_DataType *arg_counterList = glmsg.add_args(); 15348 arg_counterList->set_isarray(false); 15349 arg_counterList->set_type(GLMessage::DataType::INT64); 15350 arg_counterList->add_int64value((uintptr_t)counterList); 15351 15352 // call function 15353 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15354 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15355 glContext->hooks->gl.glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList); 15356 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15357 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15358 15359 void *pointerArgs[] = { 15360 (void *) counterList, 15361 }; 15362 15363 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15364 threadStartTime, threadEndTime, 15365 &glmsg, pointerArgs); 15366 glContext->traceGLMessage(&glmsg); 15367 } 15368 15369 void GLTrace_glBeginPerfMonitorAMD(GLuint monitor) { 15370 GLMessage glmsg; 15371 GLTraceContext *glContext = getGLTraceContext(); 15372 15373 glmsg.set_function(GLMessage::glBeginPerfMonitorAMD); 15374 15375 // copy argument monitor 15376 GLMessage_DataType *arg_monitor = glmsg.add_args(); 15377 arg_monitor->set_isarray(false); 15378 arg_monitor->set_type(GLMessage::DataType::INT); 15379 arg_monitor->add_intvalue(monitor); 15380 15381 // call function 15382 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15383 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15384 glContext->hooks->gl.glBeginPerfMonitorAMD(monitor); 15385 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15386 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15387 15388 void *pointerArgs[] = { 15389 }; 15390 15391 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15392 threadStartTime, threadEndTime, 15393 &glmsg, pointerArgs); 15394 glContext->traceGLMessage(&glmsg); 15395 } 15396 15397 void GLTrace_glEndPerfMonitorAMD(GLuint monitor) { 15398 GLMessage glmsg; 15399 GLTraceContext *glContext = getGLTraceContext(); 15400 15401 glmsg.set_function(GLMessage::glEndPerfMonitorAMD); 15402 15403 // copy argument monitor 15404 GLMessage_DataType *arg_monitor = glmsg.add_args(); 15405 arg_monitor->set_isarray(false); 15406 arg_monitor->set_type(GLMessage::DataType::INT); 15407 arg_monitor->add_intvalue(monitor); 15408 15409 // call function 15410 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15411 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15412 glContext->hooks->gl.glEndPerfMonitorAMD(monitor); 15413 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15414 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15415 15416 void *pointerArgs[] = { 15417 }; 15418 15419 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15420 threadStartTime, threadEndTime, 15421 &glmsg, pointerArgs); 15422 glContext->traceGLMessage(&glmsg); 15423 } 15424 15425 void GLTrace_glGetPerfMonitorCounterDataAMD(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten) { 15426 GLMessage glmsg; 15427 GLTraceContext *glContext = getGLTraceContext(); 15428 15429 glmsg.set_function(GLMessage::glGetPerfMonitorCounterDataAMD); 15430 15431 // copy argument monitor 15432 GLMessage_DataType *arg_monitor = glmsg.add_args(); 15433 arg_monitor->set_isarray(false); 15434 arg_monitor->set_type(GLMessage::DataType::INT); 15435 arg_monitor->add_intvalue(monitor); 15436 15437 // copy argument pname 15438 GLMessage_DataType *arg_pname = glmsg.add_args(); 15439 arg_pname->set_isarray(false); 15440 arg_pname->set_type(GLMessage::DataType::ENUM); 15441 arg_pname->add_intvalue((int)pname); 15442 15443 // copy argument dataSize 15444 GLMessage_DataType *arg_dataSize = glmsg.add_args(); 15445 arg_dataSize->set_isarray(false); 15446 arg_dataSize->set_type(GLMessage::DataType::INT); 15447 arg_dataSize->add_intvalue(dataSize); 15448 15449 // copy argument data 15450 GLMessage_DataType *arg_data = glmsg.add_args(); 15451 arg_data->set_isarray(false); 15452 arg_data->set_type(GLMessage::DataType::INT64); 15453 arg_data->add_int64value((uintptr_t)data); 15454 15455 // copy argument bytesWritten 15456 GLMessage_DataType *arg_bytesWritten = glmsg.add_args(); 15457 arg_bytesWritten->set_isarray(false); 15458 arg_bytesWritten->set_type(GLMessage::DataType::INT64); 15459 arg_bytesWritten->add_int64value((uintptr_t)bytesWritten); 15460 15461 // call function 15462 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15463 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15464 glContext->hooks->gl.glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data, bytesWritten); 15465 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15466 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15467 15468 void *pointerArgs[] = { 15469 (void *) data, 15470 (void *) bytesWritten, 15471 }; 15472 15473 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15474 threadStartTime, threadEndTime, 15475 &glmsg, pointerArgs); 15476 glContext->traceGLMessage(&glmsg); 15477 } 15478 15479 void GLTrace_glBlitFramebufferANGLE(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { 15480 GLMessage glmsg; 15481 GLTraceContext *glContext = getGLTraceContext(); 15482 15483 glmsg.set_function(GLMessage::glBlitFramebufferANGLE); 15484 15485 // copy argument srcX0 15486 GLMessage_DataType *arg_srcX0 = glmsg.add_args(); 15487 arg_srcX0->set_isarray(false); 15488 arg_srcX0->set_type(GLMessage::DataType::INT); 15489 arg_srcX0->add_intvalue(srcX0); 15490 15491 // copy argument srcY0 15492 GLMessage_DataType *arg_srcY0 = glmsg.add_args(); 15493 arg_srcY0->set_isarray(false); 15494 arg_srcY0->set_type(GLMessage::DataType::INT); 15495 arg_srcY0->add_intvalue(srcY0); 15496 15497 // copy argument srcX1 15498 GLMessage_DataType *arg_srcX1 = glmsg.add_args(); 15499 arg_srcX1->set_isarray(false); 15500 arg_srcX1->set_type(GLMessage::DataType::INT); 15501 arg_srcX1->add_intvalue(srcX1); 15502 15503 // copy argument srcY1 15504 GLMessage_DataType *arg_srcY1 = glmsg.add_args(); 15505 arg_srcY1->set_isarray(false); 15506 arg_srcY1->set_type(GLMessage::DataType::INT); 15507 arg_srcY1->add_intvalue(srcY1); 15508 15509 // copy argument dstX0 15510 GLMessage_DataType *arg_dstX0 = glmsg.add_args(); 15511 arg_dstX0->set_isarray(false); 15512 arg_dstX0->set_type(GLMessage::DataType::INT); 15513 arg_dstX0->add_intvalue(dstX0); 15514 15515 // copy argument dstY0 15516 GLMessage_DataType *arg_dstY0 = glmsg.add_args(); 15517 arg_dstY0->set_isarray(false); 15518 arg_dstY0->set_type(GLMessage::DataType::INT); 15519 arg_dstY0->add_intvalue(dstY0); 15520 15521 // copy argument dstX1 15522 GLMessage_DataType *arg_dstX1 = glmsg.add_args(); 15523 arg_dstX1->set_isarray(false); 15524 arg_dstX1->set_type(GLMessage::DataType::INT); 15525 arg_dstX1->add_intvalue(dstX1); 15526 15527 // copy argument dstY1 15528 GLMessage_DataType *arg_dstY1 = glmsg.add_args(); 15529 arg_dstY1->set_isarray(false); 15530 arg_dstY1->set_type(GLMessage::DataType::INT); 15531 arg_dstY1->add_intvalue(dstY1); 15532 15533 // copy argument mask 15534 GLMessage_DataType *arg_mask = glmsg.add_args(); 15535 arg_mask->set_isarray(false); 15536 arg_mask->set_type(GLMessage::DataType::INT); 15537 arg_mask->add_intvalue(mask); 15538 15539 // copy argument filter 15540 GLMessage_DataType *arg_filter = glmsg.add_args(); 15541 arg_filter->set_isarray(false); 15542 arg_filter->set_type(GLMessage::DataType::ENUM); 15543 arg_filter->add_intvalue((int)filter); 15544 15545 // call function 15546 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15547 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15548 glContext->hooks->gl.glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); 15549 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15550 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15551 15552 void *pointerArgs[] = { 15553 }; 15554 15555 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15556 threadStartTime, threadEndTime, 15557 &glmsg, pointerArgs); 15558 glContext->traceGLMessage(&glmsg); 15559 } 15560 15561 void GLTrace_glRenderbufferStorageMultisampleANGLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { 15562 GLMessage glmsg; 15563 GLTraceContext *glContext = getGLTraceContext(); 15564 15565 glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleANGLE); 15566 15567 // copy argument target 15568 GLMessage_DataType *arg_target = glmsg.add_args(); 15569 arg_target->set_isarray(false); 15570 arg_target->set_type(GLMessage::DataType::ENUM); 15571 arg_target->add_intvalue((int)target); 15572 15573 // copy argument samples 15574 GLMessage_DataType *arg_samples = glmsg.add_args(); 15575 arg_samples->set_isarray(false); 15576 arg_samples->set_type(GLMessage::DataType::INT); 15577 arg_samples->add_intvalue(samples); 15578 15579 // copy argument internalformat 15580 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 15581 arg_internalformat->set_isarray(false); 15582 arg_internalformat->set_type(GLMessage::DataType::ENUM); 15583 arg_internalformat->add_intvalue((int)internalformat); 15584 15585 // copy argument width 15586 GLMessage_DataType *arg_width = glmsg.add_args(); 15587 arg_width->set_isarray(false); 15588 arg_width->set_type(GLMessage::DataType::INT); 15589 arg_width->add_intvalue(width); 15590 15591 // copy argument height 15592 GLMessage_DataType *arg_height = glmsg.add_args(); 15593 arg_height->set_isarray(false); 15594 arg_height->set_type(GLMessage::DataType::INT); 15595 arg_height->add_intvalue(height); 15596 15597 // call function 15598 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15599 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15600 glContext->hooks->gl.glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); 15601 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15602 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15603 15604 void *pointerArgs[] = { 15605 }; 15606 15607 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15608 threadStartTime, threadEndTime, 15609 &glmsg, pointerArgs); 15610 glContext->traceGLMessage(&glmsg); 15611 } 15612 15613 void GLTrace_glDrawArraysInstancedANGLE(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { 15614 GLMessage glmsg; 15615 GLTraceContext *glContext = getGLTraceContext(); 15616 15617 glmsg.set_function(GLMessage::glDrawArraysInstancedANGLE); 15618 15619 // copy argument mode 15620 GLMessage_DataType *arg_mode = glmsg.add_args(); 15621 arg_mode->set_isarray(false); 15622 arg_mode->set_type(GLMessage::DataType::ENUM); 15623 arg_mode->add_intvalue((int)mode); 15624 15625 // copy argument first 15626 GLMessage_DataType *arg_first = glmsg.add_args(); 15627 arg_first->set_isarray(false); 15628 arg_first->set_type(GLMessage::DataType::INT); 15629 arg_first->add_intvalue(first); 15630 15631 // copy argument count 15632 GLMessage_DataType *arg_count = glmsg.add_args(); 15633 arg_count->set_isarray(false); 15634 arg_count->set_type(GLMessage::DataType::INT); 15635 arg_count->add_intvalue(count); 15636 15637 // copy argument primcount 15638 GLMessage_DataType *arg_primcount = glmsg.add_args(); 15639 arg_primcount->set_isarray(false); 15640 arg_primcount->set_type(GLMessage::DataType::INT); 15641 arg_primcount->add_intvalue(primcount); 15642 15643 // call function 15644 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15645 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15646 glContext->hooks->gl.glDrawArraysInstancedANGLE(mode, first, count, primcount); 15647 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15648 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15649 15650 void *pointerArgs[] = { 15651 }; 15652 15653 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15654 threadStartTime, threadEndTime, 15655 &glmsg, pointerArgs); 15656 glContext->traceGLMessage(&glmsg); 15657 } 15658 15659 void GLTrace_glDrawElementsInstancedANGLE(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) { 15660 GLMessage glmsg; 15661 GLTraceContext *glContext = getGLTraceContext(); 15662 15663 glmsg.set_function(GLMessage::glDrawElementsInstancedANGLE); 15664 15665 // copy argument mode 15666 GLMessage_DataType *arg_mode = glmsg.add_args(); 15667 arg_mode->set_isarray(false); 15668 arg_mode->set_type(GLMessage::DataType::ENUM); 15669 arg_mode->add_intvalue((int)mode); 15670 15671 // copy argument count 15672 GLMessage_DataType *arg_count = glmsg.add_args(); 15673 arg_count->set_isarray(false); 15674 arg_count->set_type(GLMessage::DataType::INT); 15675 arg_count->add_intvalue(count); 15676 15677 // copy argument type 15678 GLMessage_DataType *arg_type = glmsg.add_args(); 15679 arg_type->set_isarray(false); 15680 arg_type->set_type(GLMessage::DataType::ENUM); 15681 arg_type->add_intvalue((int)type); 15682 15683 // copy argument indices 15684 GLMessage_DataType *arg_indices = glmsg.add_args(); 15685 arg_indices->set_isarray(false); 15686 arg_indices->set_type(GLMessage::DataType::INT64); 15687 arg_indices->add_int64value((uintptr_t)indices); 15688 15689 // copy argument primcount 15690 GLMessage_DataType *arg_primcount = glmsg.add_args(); 15691 arg_primcount->set_isarray(false); 15692 arg_primcount->set_type(GLMessage::DataType::INT); 15693 arg_primcount->add_intvalue(primcount); 15694 15695 // call function 15696 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15697 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15698 glContext->hooks->gl.glDrawElementsInstancedANGLE(mode, count, type, indices, primcount); 15699 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15700 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15701 15702 void *pointerArgs[] = { 15703 (void *) indices, 15704 }; 15705 15706 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15707 threadStartTime, threadEndTime, 15708 &glmsg, pointerArgs); 15709 glContext->traceGLMessage(&glmsg); 15710 } 15711 15712 void GLTrace_glVertexAttribDivisorANGLE(GLuint index, GLuint divisor) { 15713 GLMessage glmsg; 15714 GLTraceContext *glContext = getGLTraceContext(); 15715 15716 glmsg.set_function(GLMessage::glVertexAttribDivisorANGLE); 15717 15718 // copy argument index 15719 GLMessage_DataType *arg_index = glmsg.add_args(); 15720 arg_index->set_isarray(false); 15721 arg_index->set_type(GLMessage::DataType::INT); 15722 arg_index->add_intvalue(index); 15723 15724 // copy argument divisor 15725 GLMessage_DataType *arg_divisor = glmsg.add_args(); 15726 arg_divisor->set_isarray(false); 15727 arg_divisor->set_type(GLMessage::DataType::INT); 15728 arg_divisor->add_intvalue(divisor); 15729 15730 // call function 15731 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15732 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15733 glContext->hooks->gl.glVertexAttribDivisorANGLE(index, divisor); 15734 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15735 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15736 15737 void *pointerArgs[] = { 15738 }; 15739 15740 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15741 threadStartTime, threadEndTime, 15742 &glmsg, pointerArgs); 15743 glContext->traceGLMessage(&glmsg); 15744 } 15745 15746 void GLTrace_glGetTranslatedShaderSourceANGLE(GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source) { 15747 GLMessage glmsg; 15748 GLTraceContext *glContext = getGLTraceContext(); 15749 15750 glmsg.set_function(GLMessage::glGetTranslatedShaderSourceANGLE); 15751 15752 // copy argument shader 15753 GLMessage_DataType *arg_shader = glmsg.add_args(); 15754 arg_shader->set_isarray(false); 15755 arg_shader->set_type(GLMessage::DataType::INT); 15756 arg_shader->add_intvalue(shader); 15757 15758 // copy argument bufsize 15759 GLMessage_DataType *arg_bufsize = glmsg.add_args(); 15760 arg_bufsize->set_isarray(false); 15761 arg_bufsize->set_type(GLMessage::DataType::INT); 15762 arg_bufsize->add_intvalue(bufsize); 15763 15764 // copy argument length 15765 GLMessage_DataType *arg_length = glmsg.add_args(); 15766 arg_length->set_isarray(false); 15767 arg_length->set_type(GLMessage::DataType::INT64); 15768 arg_length->add_int64value((uintptr_t)length); 15769 15770 // copy argument source 15771 GLMessage_DataType *arg_source = glmsg.add_args(); 15772 arg_source->set_isarray(false); 15773 arg_source->set_type(GLMessage::DataType::INT64); 15774 arg_source->add_int64value((uintptr_t)source); 15775 15776 // call function 15777 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15778 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15779 glContext->hooks->gl.glGetTranslatedShaderSourceANGLE(shader, bufsize, length, source); 15780 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15781 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15782 15783 void *pointerArgs[] = { 15784 (void *) length, 15785 (void *) source, 15786 }; 15787 15788 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15789 threadStartTime, threadEndTime, 15790 &glmsg, pointerArgs); 15791 glContext->traceGLMessage(&glmsg); 15792 } 15793 15794 void GLTrace_glCopyTextureLevelsAPPLE(GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount) { 15795 GLMessage glmsg; 15796 GLTraceContext *glContext = getGLTraceContext(); 15797 15798 glmsg.set_function(GLMessage::glCopyTextureLevelsAPPLE); 15799 15800 // copy argument destinationTexture 15801 GLMessage_DataType *arg_destinationTexture = glmsg.add_args(); 15802 arg_destinationTexture->set_isarray(false); 15803 arg_destinationTexture->set_type(GLMessage::DataType::INT); 15804 arg_destinationTexture->add_intvalue(destinationTexture); 15805 15806 // copy argument sourceTexture 15807 GLMessage_DataType *arg_sourceTexture = glmsg.add_args(); 15808 arg_sourceTexture->set_isarray(false); 15809 arg_sourceTexture->set_type(GLMessage::DataType::INT); 15810 arg_sourceTexture->add_intvalue(sourceTexture); 15811 15812 // copy argument sourceBaseLevel 15813 GLMessage_DataType *arg_sourceBaseLevel = glmsg.add_args(); 15814 arg_sourceBaseLevel->set_isarray(false); 15815 arg_sourceBaseLevel->set_type(GLMessage::DataType::INT); 15816 arg_sourceBaseLevel->add_intvalue(sourceBaseLevel); 15817 15818 // copy argument sourceLevelCount 15819 GLMessage_DataType *arg_sourceLevelCount = glmsg.add_args(); 15820 arg_sourceLevelCount->set_isarray(false); 15821 arg_sourceLevelCount->set_type(GLMessage::DataType::INT); 15822 arg_sourceLevelCount->add_intvalue(sourceLevelCount); 15823 15824 // call function 15825 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15826 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15827 glContext->hooks->gl.glCopyTextureLevelsAPPLE(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount); 15828 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15829 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15830 15831 void *pointerArgs[] = { 15832 }; 15833 15834 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15835 threadStartTime, threadEndTime, 15836 &glmsg, pointerArgs); 15837 glContext->traceGLMessage(&glmsg); 15838 } 15839 15840 void GLTrace_glRenderbufferStorageMultisampleAPPLE(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { 15841 GLMessage glmsg; 15842 GLTraceContext *glContext = getGLTraceContext(); 15843 15844 glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleAPPLE); 15845 15846 // copy argument target 15847 GLMessage_DataType *arg_target = glmsg.add_args(); 15848 arg_target->set_isarray(false); 15849 arg_target->set_type(GLMessage::DataType::ENUM); 15850 arg_target->add_intvalue((int)target); 15851 15852 // copy argument samples 15853 GLMessage_DataType *arg_samples = glmsg.add_args(); 15854 arg_samples->set_isarray(false); 15855 arg_samples->set_type(GLMessage::DataType::INT); 15856 arg_samples->add_intvalue(samples); 15857 15858 // copy argument internalformat 15859 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 15860 arg_internalformat->set_isarray(false); 15861 arg_internalformat->set_type(GLMessage::DataType::ENUM); 15862 arg_internalformat->add_intvalue((int)internalformat); 15863 15864 // copy argument width 15865 GLMessage_DataType *arg_width = glmsg.add_args(); 15866 arg_width->set_isarray(false); 15867 arg_width->set_type(GLMessage::DataType::INT); 15868 arg_width->add_intvalue(width); 15869 15870 // copy argument height 15871 GLMessage_DataType *arg_height = glmsg.add_args(); 15872 arg_height->set_isarray(false); 15873 arg_height->set_type(GLMessage::DataType::INT); 15874 arg_height->add_intvalue(height); 15875 15876 // call function 15877 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15878 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15879 glContext->hooks->gl.glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height); 15880 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15881 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15882 15883 void *pointerArgs[] = { 15884 }; 15885 15886 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15887 threadStartTime, threadEndTime, 15888 &glmsg, pointerArgs); 15889 glContext->traceGLMessage(&glmsg); 15890 } 15891 15892 void GLTrace_glResolveMultisampleFramebufferAPPLE(void) { 15893 GLMessage glmsg; 15894 GLTraceContext *glContext = getGLTraceContext(); 15895 15896 glmsg.set_function(GLMessage::glResolveMultisampleFramebufferAPPLE); 15897 15898 // call function 15899 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15900 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15901 glContext->hooks->gl.glResolveMultisampleFramebufferAPPLE(); 15902 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15903 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15904 15905 void *pointerArgs[] = { 15906 }; 15907 15908 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15909 threadStartTime, threadEndTime, 15910 &glmsg, pointerArgs); 15911 glContext->traceGLMessage(&glmsg); 15912 } 15913 15914 GLsync GLTrace_glFenceSyncAPPLE(GLenum condition, GLbitfield flags) { 15915 GLMessage glmsg; 15916 GLTraceContext *glContext = getGLTraceContext(); 15917 15918 glmsg.set_function(GLMessage::glFenceSyncAPPLE); 15919 15920 // copy argument condition 15921 GLMessage_DataType *arg_condition = glmsg.add_args(); 15922 arg_condition->set_isarray(false); 15923 arg_condition->set_type(GLMessage::DataType::ENUM); 15924 arg_condition->add_intvalue((int)condition); 15925 15926 // copy argument flags 15927 GLMessage_DataType *arg_flags = glmsg.add_args(); 15928 arg_flags->set_isarray(false); 15929 arg_flags->set_type(GLMessage::DataType::INT); 15930 arg_flags->add_intvalue(flags); 15931 15932 // call function 15933 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15934 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15935 GLsync retValue = glContext->hooks->gl.glFenceSyncAPPLE(condition, flags); 15936 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15937 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15938 15939 // set return value 15940 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 15941 rt->set_isarray(false); 15942 rt->set_type(GLMessage::DataType::INT64); 15943 rt->add_int64value((uintptr_t)retValue); 15944 15945 void *pointerArgs[] = { 15946 (void *) retValue, 15947 }; 15948 15949 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15950 threadStartTime, threadEndTime, 15951 &glmsg, pointerArgs); 15952 glContext->traceGLMessage(&glmsg); 15953 15954 return retValue; 15955 } 15956 15957 GLboolean GLTrace_glIsSyncAPPLE(GLsync sync) { 15958 GLMessage glmsg; 15959 GLTraceContext *glContext = getGLTraceContext(); 15960 15961 glmsg.set_function(GLMessage::glIsSyncAPPLE); 15962 15963 // copy argument sync 15964 GLMessage_DataType *arg_sync = glmsg.add_args(); 15965 arg_sync->set_isarray(false); 15966 arg_sync->set_type(GLMessage::DataType::INT64); 15967 arg_sync->add_int64value((uintptr_t)sync); 15968 15969 // call function 15970 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 15971 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 15972 GLboolean retValue = glContext->hooks->gl.glIsSyncAPPLE(sync); 15973 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 15974 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 15975 15976 // set return value 15977 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 15978 rt->set_isarray(false); 15979 rt->set_type(GLMessage::DataType::BOOL); 15980 rt->add_boolvalue(retValue); 15981 15982 void *pointerArgs[] = { 15983 (void *) sync, 15984 }; 15985 15986 fixupGLMessage(glContext, wallStartTime, wallEndTime, 15987 threadStartTime, threadEndTime, 15988 &glmsg, pointerArgs); 15989 glContext->traceGLMessage(&glmsg); 15990 15991 return retValue; 15992 } 15993 15994 void GLTrace_glDeleteSyncAPPLE(GLsync sync) { 15995 GLMessage glmsg; 15996 GLTraceContext *glContext = getGLTraceContext(); 15997 15998 glmsg.set_function(GLMessage::glDeleteSyncAPPLE); 15999 16000 // copy argument sync 16001 GLMessage_DataType *arg_sync = glmsg.add_args(); 16002 arg_sync->set_isarray(false); 16003 arg_sync->set_type(GLMessage::DataType::INT64); 16004 arg_sync->add_int64value((uintptr_t)sync); 16005 16006 // call function 16007 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16008 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16009 glContext->hooks->gl.glDeleteSyncAPPLE(sync); 16010 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16011 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16012 16013 void *pointerArgs[] = { 16014 (void *) sync, 16015 }; 16016 16017 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16018 threadStartTime, threadEndTime, 16019 &glmsg, pointerArgs); 16020 glContext->traceGLMessage(&glmsg); 16021 } 16022 16023 GLenum GLTrace_glClientWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout) { 16024 GLMessage glmsg; 16025 GLTraceContext *glContext = getGLTraceContext(); 16026 16027 glmsg.set_function(GLMessage::glClientWaitSyncAPPLE); 16028 16029 // copy argument sync 16030 GLMessage_DataType *arg_sync = glmsg.add_args(); 16031 arg_sync->set_isarray(false); 16032 arg_sync->set_type(GLMessage::DataType::INT64); 16033 arg_sync->add_int64value((uintptr_t)sync); 16034 16035 // copy argument flags 16036 GLMessage_DataType *arg_flags = glmsg.add_args(); 16037 arg_flags->set_isarray(false); 16038 arg_flags->set_type(GLMessage::DataType::INT); 16039 arg_flags->add_intvalue(flags); 16040 16041 // copy argument timeout 16042 GLMessage_DataType *arg_timeout = glmsg.add_args(); 16043 arg_timeout->set_isarray(false); 16044 arg_timeout->set_type(GLMessage::DataType::INT64); 16045 arg_timeout->add_int64value(timeout); 16046 16047 // call function 16048 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16049 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16050 GLenum retValue = glContext->hooks->gl.glClientWaitSyncAPPLE(sync, flags, timeout); 16051 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16052 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16053 16054 // set return value 16055 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 16056 rt->set_isarray(false); 16057 rt->set_type(GLMessage::DataType::ENUM); 16058 rt->add_intvalue((int)retValue); 16059 16060 void *pointerArgs[] = { 16061 (void *) sync, 16062 }; 16063 16064 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16065 threadStartTime, threadEndTime, 16066 &glmsg, pointerArgs); 16067 glContext->traceGLMessage(&glmsg); 16068 16069 return retValue; 16070 } 16071 16072 void GLTrace_glWaitSyncAPPLE(GLsync sync, GLbitfield flags, GLuint64 timeout) { 16073 GLMessage glmsg; 16074 GLTraceContext *glContext = getGLTraceContext(); 16075 16076 glmsg.set_function(GLMessage::glWaitSyncAPPLE); 16077 16078 // copy argument sync 16079 GLMessage_DataType *arg_sync = glmsg.add_args(); 16080 arg_sync->set_isarray(false); 16081 arg_sync->set_type(GLMessage::DataType::INT64); 16082 arg_sync->add_int64value((uintptr_t)sync); 16083 16084 // copy argument flags 16085 GLMessage_DataType *arg_flags = glmsg.add_args(); 16086 arg_flags->set_isarray(false); 16087 arg_flags->set_type(GLMessage::DataType::INT); 16088 arg_flags->add_intvalue(flags); 16089 16090 // copy argument timeout 16091 GLMessage_DataType *arg_timeout = glmsg.add_args(); 16092 arg_timeout->set_isarray(false); 16093 arg_timeout->set_type(GLMessage::DataType::INT64); 16094 arg_timeout->add_int64value(timeout); 16095 16096 // call function 16097 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16098 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16099 glContext->hooks->gl.glWaitSyncAPPLE(sync, flags, timeout); 16100 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16101 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16102 16103 void *pointerArgs[] = { 16104 (void *) sync, 16105 }; 16106 16107 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16108 threadStartTime, threadEndTime, 16109 &glmsg, pointerArgs); 16110 glContext->traceGLMessage(&glmsg); 16111 } 16112 16113 void GLTrace_glGetInteger64vAPPLE(GLenum pname, GLint64 * params) { 16114 GLMessage glmsg; 16115 GLTraceContext *glContext = getGLTraceContext(); 16116 16117 glmsg.set_function(GLMessage::glGetInteger64vAPPLE); 16118 16119 // copy argument pname 16120 GLMessage_DataType *arg_pname = glmsg.add_args(); 16121 arg_pname->set_isarray(false); 16122 arg_pname->set_type(GLMessage::DataType::ENUM); 16123 arg_pname->add_intvalue((int)pname); 16124 16125 // copy argument params 16126 GLMessage_DataType *arg_params = glmsg.add_args(); 16127 arg_params->set_isarray(false); 16128 arg_params->set_type(GLMessage::DataType::INT64); 16129 arg_params->add_int64value((uintptr_t)params); 16130 16131 // call function 16132 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16133 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16134 glContext->hooks->gl.glGetInteger64vAPPLE(pname, params); 16135 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16136 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16137 16138 void *pointerArgs[] = { 16139 (void *) params, 16140 }; 16141 16142 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16143 threadStartTime, threadEndTime, 16144 &glmsg, pointerArgs); 16145 glContext->traceGLMessage(&glmsg); 16146 } 16147 16148 void GLTrace_glGetSyncivAPPLE(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values) { 16149 GLMessage glmsg; 16150 GLTraceContext *glContext = getGLTraceContext(); 16151 16152 glmsg.set_function(GLMessage::glGetSyncivAPPLE); 16153 16154 // copy argument sync 16155 GLMessage_DataType *arg_sync = glmsg.add_args(); 16156 arg_sync->set_isarray(false); 16157 arg_sync->set_type(GLMessage::DataType::INT64); 16158 arg_sync->add_int64value((uintptr_t)sync); 16159 16160 // copy argument pname 16161 GLMessage_DataType *arg_pname = glmsg.add_args(); 16162 arg_pname->set_isarray(false); 16163 arg_pname->set_type(GLMessage::DataType::ENUM); 16164 arg_pname->add_intvalue((int)pname); 16165 16166 // copy argument bufSize 16167 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 16168 arg_bufSize->set_isarray(false); 16169 arg_bufSize->set_type(GLMessage::DataType::INT); 16170 arg_bufSize->add_intvalue(bufSize); 16171 16172 // copy argument length 16173 GLMessage_DataType *arg_length = glmsg.add_args(); 16174 arg_length->set_isarray(false); 16175 arg_length->set_type(GLMessage::DataType::INT64); 16176 arg_length->add_int64value((uintptr_t)length); 16177 16178 // copy argument values 16179 GLMessage_DataType *arg_values = glmsg.add_args(); 16180 arg_values->set_isarray(false); 16181 arg_values->set_type(GLMessage::DataType::INT64); 16182 arg_values->add_int64value((uintptr_t)values); 16183 16184 // call function 16185 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16186 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16187 glContext->hooks->gl.glGetSyncivAPPLE(sync, pname, bufSize, length, values); 16188 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16189 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16190 16191 void *pointerArgs[] = { 16192 (void *) sync, 16193 (void *) length, 16194 (void *) values, 16195 }; 16196 16197 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16198 threadStartTime, threadEndTime, 16199 &glmsg, pointerArgs); 16200 glContext->traceGLMessage(&glmsg); 16201 } 16202 16203 void GLTrace_glCopyImageSubDataEXT(GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth) { 16204 GLMessage glmsg; 16205 GLTraceContext *glContext = getGLTraceContext(); 16206 16207 glmsg.set_function(GLMessage::glCopyImageSubDataEXT); 16208 16209 // copy argument srcName 16210 GLMessage_DataType *arg_srcName = glmsg.add_args(); 16211 arg_srcName->set_isarray(false); 16212 arg_srcName->set_type(GLMessage::DataType::INT); 16213 arg_srcName->add_intvalue(srcName); 16214 16215 // copy argument srcTarget 16216 GLMessage_DataType *arg_srcTarget = glmsg.add_args(); 16217 arg_srcTarget->set_isarray(false); 16218 arg_srcTarget->set_type(GLMessage::DataType::ENUM); 16219 arg_srcTarget->add_intvalue((int)srcTarget); 16220 16221 // copy argument srcLevel 16222 GLMessage_DataType *arg_srcLevel = glmsg.add_args(); 16223 arg_srcLevel->set_isarray(false); 16224 arg_srcLevel->set_type(GLMessage::DataType::INT); 16225 arg_srcLevel->add_intvalue(srcLevel); 16226 16227 // copy argument srcX 16228 GLMessage_DataType *arg_srcX = glmsg.add_args(); 16229 arg_srcX->set_isarray(false); 16230 arg_srcX->set_type(GLMessage::DataType::INT); 16231 arg_srcX->add_intvalue(srcX); 16232 16233 // copy argument srcY 16234 GLMessage_DataType *arg_srcY = glmsg.add_args(); 16235 arg_srcY->set_isarray(false); 16236 arg_srcY->set_type(GLMessage::DataType::INT); 16237 arg_srcY->add_intvalue(srcY); 16238 16239 // copy argument srcZ 16240 GLMessage_DataType *arg_srcZ = glmsg.add_args(); 16241 arg_srcZ->set_isarray(false); 16242 arg_srcZ->set_type(GLMessage::DataType::INT); 16243 arg_srcZ->add_intvalue(srcZ); 16244 16245 // copy argument dstName 16246 GLMessage_DataType *arg_dstName = glmsg.add_args(); 16247 arg_dstName->set_isarray(false); 16248 arg_dstName->set_type(GLMessage::DataType::INT); 16249 arg_dstName->add_intvalue(dstName); 16250 16251 // copy argument dstTarget 16252 GLMessage_DataType *arg_dstTarget = glmsg.add_args(); 16253 arg_dstTarget->set_isarray(false); 16254 arg_dstTarget->set_type(GLMessage::DataType::ENUM); 16255 arg_dstTarget->add_intvalue((int)dstTarget); 16256 16257 // copy argument dstLevel 16258 GLMessage_DataType *arg_dstLevel = glmsg.add_args(); 16259 arg_dstLevel->set_isarray(false); 16260 arg_dstLevel->set_type(GLMessage::DataType::INT); 16261 arg_dstLevel->add_intvalue(dstLevel); 16262 16263 // copy argument dstX 16264 GLMessage_DataType *arg_dstX = glmsg.add_args(); 16265 arg_dstX->set_isarray(false); 16266 arg_dstX->set_type(GLMessage::DataType::INT); 16267 arg_dstX->add_intvalue(dstX); 16268 16269 // copy argument dstY 16270 GLMessage_DataType *arg_dstY = glmsg.add_args(); 16271 arg_dstY->set_isarray(false); 16272 arg_dstY->set_type(GLMessage::DataType::INT); 16273 arg_dstY->add_intvalue(dstY); 16274 16275 // copy argument dstZ 16276 GLMessage_DataType *arg_dstZ = glmsg.add_args(); 16277 arg_dstZ->set_isarray(false); 16278 arg_dstZ->set_type(GLMessage::DataType::INT); 16279 arg_dstZ->add_intvalue(dstZ); 16280 16281 // copy argument srcWidth 16282 GLMessage_DataType *arg_srcWidth = glmsg.add_args(); 16283 arg_srcWidth->set_isarray(false); 16284 arg_srcWidth->set_type(GLMessage::DataType::INT); 16285 arg_srcWidth->add_intvalue(srcWidth); 16286 16287 // copy argument srcHeight 16288 GLMessage_DataType *arg_srcHeight = glmsg.add_args(); 16289 arg_srcHeight->set_isarray(false); 16290 arg_srcHeight->set_type(GLMessage::DataType::INT); 16291 arg_srcHeight->add_intvalue(srcHeight); 16292 16293 // copy argument srcDepth 16294 GLMessage_DataType *arg_srcDepth = glmsg.add_args(); 16295 arg_srcDepth->set_isarray(false); 16296 arg_srcDepth->set_type(GLMessage::DataType::INT); 16297 arg_srcDepth->add_intvalue(srcDepth); 16298 16299 // call function 16300 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16301 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16302 glContext->hooks->gl.glCopyImageSubDataEXT(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); 16303 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16304 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16305 16306 void *pointerArgs[] = { 16307 }; 16308 16309 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16310 threadStartTime, threadEndTime, 16311 &glmsg, pointerArgs); 16312 glContext->traceGLMessage(&glmsg); 16313 } 16314 16315 void GLTrace_glLabelObjectEXT(GLenum type, GLuint object, GLsizei length, const GLchar * label) { 16316 GLMessage glmsg; 16317 GLTraceContext *glContext = getGLTraceContext(); 16318 16319 glmsg.set_function(GLMessage::glLabelObjectEXT); 16320 16321 // copy argument type 16322 GLMessage_DataType *arg_type = glmsg.add_args(); 16323 arg_type->set_isarray(false); 16324 arg_type->set_type(GLMessage::DataType::ENUM); 16325 arg_type->add_intvalue((int)type); 16326 16327 // copy argument object 16328 GLMessage_DataType *arg_object = glmsg.add_args(); 16329 arg_object->set_isarray(false); 16330 arg_object->set_type(GLMessage::DataType::INT); 16331 arg_object->add_intvalue(object); 16332 16333 // copy argument length 16334 GLMessage_DataType *arg_length = glmsg.add_args(); 16335 arg_length->set_isarray(false); 16336 arg_length->set_type(GLMessage::DataType::INT); 16337 arg_length->add_intvalue(length); 16338 16339 // copy argument label 16340 GLMessage_DataType *arg_label = glmsg.add_args(); 16341 arg_label->set_isarray(false); 16342 arg_label->set_type(GLMessage::DataType::INT64); 16343 arg_label->add_int64value((uintptr_t)label); 16344 16345 // call function 16346 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16347 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16348 glContext->hooks->gl.glLabelObjectEXT(type, object, length, label); 16349 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16350 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16351 16352 void *pointerArgs[] = { 16353 (void *) label, 16354 }; 16355 16356 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16357 threadStartTime, threadEndTime, 16358 &glmsg, pointerArgs); 16359 glContext->traceGLMessage(&glmsg); 16360 } 16361 16362 void GLTrace_glGetObjectLabelEXT(GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label) { 16363 GLMessage glmsg; 16364 GLTraceContext *glContext = getGLTraceContext(); 16365 16366 glmsg.set_function(GLMessage::glGetObjectLabelEXT); 16367 16368 // copy argument type 16369 GLMessage_DataType *arg_type = glmsg.add_args(); 16370 arg_type->set_isarray(false); 16371 arg_type->set_type(GLMessage::DataType::ENUM); 16372 arg_type->add_intvalue((int)type); 16373 16374 // copy argument object 16375 GLMessage_DataType *arg_object = glmsg.add_args(); 16376 arg_object->set_isarray(false); 16377 arg_object->set_type(GLMessage::DataType::INT); 16378 arg_object->add_intvalue(object); 16379 16380 // copy argument bufSize 16381 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 16382 arg_bufSize->set_isarray(false); 16383 arg_bufSize->set_type(GLMessage::DataType::INT); 16384 arg_bufSize->add_intvalue(bufSize); 16385 16386 // copy argument length 16387 GLMessage_DataType *arg_length = glmsg.add_args(); 16388 arg_length->set_isarray(false); 16389 arg_length->set_type(GLMessage::DataType::INT64); 16390 arg_length->add_int64value((uintptr_t)length); 16391 16392 // copy argument label 16393 GLMessage_DataType *arg_label = glmsg.add_args(); 16394 arg_label->set_isarray(false); 16395 arg_label->set_type(GLMessage::DataType::INT64); 16396 arg_label->add_int64value((uintptr_t)label); 16397 16398 // call function 16399 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16400 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16401 glContext->hooks->gl.glGetObjectLabelEXT(type, object, bufSize, length, label); 16402 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16403 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16404 16405 void *pointerArgs[] = { 16406 (void *) length, 16407 (void *) label, 16408 }; 16409 16410 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16411 threadStartTime, threadEndTime, 16412 &glmsg, pointerArgs); 16413 glContext->traceGLMessage(&glmsg); 16414 } 16415 16416 void GLTrace_glInsertEventMarkerEXT(GLsizei length, const GLchar * marker) { 16417 GLMessage glmsg; 16418 GLTraceContext *glContext = getGLTraceContext(); 16419 16420 glmsg.set_function(GLMessage::glInsertEventMarkerEXT); 16421 16422 // copy argument length 16423 GLMessage_DataType *arg_length = glmsg.add_args(); 16424 arg_length->set_isarray(false); 16425 arg_length->set_type(GLMessage::DataType::INT); 16426 arg_length->add_intvalue(length); 16427 16428 // copy argument marker 16429 GLMessage_DataType *arg_marker = glmsg.add_args(); 16430 arg_marker->set_isarray(false); 16431 arg_marker->set_type(GLMessage::DataType::INT64); 16432 arg_marker->add_int64value((uintptr_t)marker); 16433 16434 // call function 16435 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16436 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16437 glContext->hooks->gl.glInsertEventMarkerEXT(length, marker); 16438 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16439 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16440 16441 void *pointerArgs[] = { 16442 (void *) marker, 16443 }; 16444 16445 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16446 threadStartTime, threadEndTime, 16447 &glmsg, pointerArgs); 16448 glContext->traceGLMessage(&glmsg); 16449 } 16450 16451 void GLTrace_glPushGroupMarkerEXT(GLsizei length, const GLchar * marker) { 16452 GLMessage glmsg; 16453 GLTraceContext *glContext = getGLTraceContext(); 16454 16455 glmsg.set_function(GLMessage::glPushGroupMarkerEXT); 16456 16457 // copy argument length 16458 GLMessage_DataType *arg_length = glmsg.add_args(); 16459 arg_length->set_isarray(false); 16460 arg_length->set_type(GLMessage::DataType::INT); 16461 arg_length->add_intvalue(length); 16462 16463 // copy argument marker 16464 GLMessage_DataType *arg_marker = glmsg.add_args(); 16465 arg_marker->set_isarray(false); 16466 arg_marker->set_type(GLMessage::DataType::INT64); 16467 arg_marker->add_int64value((uintptr_t)marker); 16468 16469 // call function 16470 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16471 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16472 glContext->hooks->gl.glPushGroupMarkerEXT(length, marker); 16473 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16474 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16475 16476 void *pointerArgs[] = { 16477 (void *) marker, 16478 }; 16479 16480 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16481 threadStartTime, threadEndTime, 16482 &glmsg, pointerArgs); 16483 glContext->traceGLMessage(&glmsg); 16484 } 16485 16486 void GLTrace_glPopGroupMarkerEXT(void) { 16487 GLMessage glmsg; 16488 GLTraceContext *glContext = getGLTraceContext(); 16489 16490 glmsg.set_function(GLMessage::glPopGroupMarkerEXT); 16491 16492 // call function 16493 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16494 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16495 glContext->hooks->gl.glPopGroupMarkerEXT(); 16496 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16497 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16498 16499 void *pointerArgs[] = { 16500 }; 16501 16502 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16503 threadStartTime, threadEndTime, 16504 &glmsg, pointerArgs); 16505 glContext->traceGLMessage(&glmsg); 16506 } 16507 16508 void GLTrace_glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum * attachments) { 16509 GLMessage glmsg; 16510 GLTraceContext *glContext = getGLTraceContext(); 16511 16512 glmsg.set_function(GLMessage::glDiscardFramebufferEXT); 16513 16514 // copy argument target 16515 GLMessage_DataType *arg_target = glmsg.add_args(); 16516 arg_target->set_isarray(false); 16517 arg_target->set_type(GLMessage::DataType::ENUM); 16518 arg_target->add_intvalue((int)target); 16519 16520 // copy argument numAttachments 16521 GLMessage_DataType *arg_numAttachments = glmsg.add_args(); 16522 arg_numAttachments->set_isarray(false); 16523 arg_numAttachments->set_type(GLMessage::DataType::INT); 16524 arg_numAttachments->add_intvalue(numAttachments); 16525 16526 // copy argument attachments 16527 GLMessage_DataType *arg_attachments = glmsg.add_args(); 16528 arg_attachments->set_isarray(false); 16529 arg_attachments->set_type(GLMessage::DataType::INT64); 16530 arg_attachments->add_int64value((uintptr_t)attachments); 16531 16532 // call function 16533 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16534 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16535 glContext->hooks->gl.glDiscardFramebufferEXT(target, numAttachments, attachments); 16536 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16537 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16538 16539 void *pointerArgs[] = { 16540 (void *) attachments, 16541 }; 16542 16543 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16544 threadStartTime, threadEndTime, 16545 &glmsg, pointerArgs); 16546 glContext->traceGLMessage(&glmsg); 16547 } 16548 16549 void GLTrace_glGenQueriesEXT(GLsizei n, GLuint * ids) { 16550 GLMessage glmsg; 16551 GLTraceContext *glContext = getGLTraceContext(); 16552 16553 glmsg.set_function(GLMessage::glGenQueriesEXT); 16554 16555 // copy argument n 16556 GLMessage_DataType *arg_n = glmsg.add_args(); 16557 arg_n->set_isarray(false); 16558 arg_n->set_type(GLMessage::DataType::INT); 16559 arg_n->add_intvalue(n); 16560 16561 // copy argument ids 16562 GLMessage_DataType *arg_ids = glmsg.add_args(); 16563 arg_ids->set_isarray(false); 16564 arg_ids->set_type(GLMessage::DataType::INT64); 16565 arg_ids->add_int64value((uintptr_t)ids); 16566 16567 // call function 16568 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16569 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16570 glContext->hooks->gl.glGenQueriesEXT(n, ids); 16571 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16572 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16573 16574 void *pointerArgs[] = { 16575 (void *) ids, 16576 }; 16577 16578 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16579 threadStartTime, threadEndTime, 16580 &glmsg, pointerArgs); 16581 glContext->traceGLMessage(&glmsg); 16582 } 16583 16584 void GLTrace_glDeleteQueriesEXT(GLsizei n, const GLuint * ids) { 16585 GLMessage glmsg; 16586 GLTraceContext *glContext = getGLTraceContext(); 16587 16588 glmsg.set_function(GLMessage::glDeleteQueriesEXT); 16589 16590 // copy argument n 16591 GLMessage_DataType *arg_n = glmsg.add_args(); 16592 arg_n->set_isarray(false); 16593 arg_n->set_type(GLMessage::DataType::INT); 16594 arg_n->add_intvalue(n); 16595 16596 // copy argument ids 16597 GLMessage_DataType *arg_ids = glmsg.add_args(); 16598 arg_ids->set_isarray(false); 16599 arg_ids->set_type(GLMessage::DataType::INT64); 16600 arg_ids->add_int64value((uintptr_t)ids); 16601 16602 // call function 16603 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16604 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16605 glContext->hooks->gl.glDeleteQueriesEXT(n, ids); 16606 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16607 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16608 16609 void *pointerArgs[] = { 16610 (void *) ids, 16611 }; 16612 16613 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16614 threadStartTime, threadEndTime, 16615 &glmsg, pointerArgs); 16616 glContext->traceGLMessage(&glmsg); 16617 } 16618 16619 GLboolean GLTrace_glIsQueryEXT(GLuint id) { 16620 GLMessage glmsg; 16621 GLTraceContext *glContext = getGLTraceContext(); 16622 16623 glmsg.set_function(GLMessage::glIsQueryEXT); 16624 16625 // copy argument id 16626 GLMessage_DataType *arg_id = glmsg.add_args(); 16627 arg_id->set_isarray(false); 16628 arg_id->set_type(GLMessage::DataType::INT); 16629 arg_id->add_intvalue(id); 16630 16631 // call function 16632 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16633 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16634 GLboolean retValue = glContext->hooks->gl.glIsQueryEXT(id); 16635 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16636 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16637 16638 // set return value 16639 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 16640 rt->set_isarray(false); 16641 rt->set_type(GLMessage::DataType::BOOL); 16642 rt->add_boolvalue(retValue); 16643 16644 void *pointerArgs[] = { 16645 }; 16646 16647 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16648 threadStartTime, threadEndTime, 16649 &glmsg, pointerArgs); 16650 glContext->traceGLMessage(&glmsg); 16651 16652 return retValue; 16653 } 16654 16655 void GLTrace_glBeginQueryEXT(GLenum target, GLuint id) { 16656 GLMessage glmsg; 16657 GLTraceContext *glContext = getGLTraceContext(); 16658 16659 glmsg.set_function(GLMessage::glBeginQueryEXT); 16660 16661 // copy argument target 16662 GLMessage_DataType *arg_target = glmsg.add_args(); 16663 arg_target->set_isarray(false); 16664 arg_target->set_type(GLMessage::DataType::ENUM); 16665 arg_target->add_intvalue((int)target); 16666 16667 // copy argument id 16668 GLMessage_DataType *arg_id = glmsg.add_args(); 16669 arg_id->set_isarray(false); 16670 arg_id->set_type(GLMessage::DataType::INT); 16671 arg_id->add_intvalue(id); 16672 16673 // call function 16674 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16675 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16676 glContext->hooks->gl.glBeginQueryEXT(target, id); 16677 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16678 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16679 16680 void *pointerArgs[] = { 16681 }; 16682 16683 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16684 threadStartTime, threadEndTime, 16685 &glmsg, pointerArgs); 16686 glContext->traceGLMessage(&glmsg); 16687 } 16688 16689 void GLTrace_glEndQueryEXT(GLenum target) { 16690 GLMessage glmsg; 16691 GLTraceContext *glContext = getGLTraceContext(); 16692 16693 glmsg.set_function(GLMessage::glEndQueryEXT); 16694 16695 // copy argument target 16696 GLMessage_DataType *arg_target = glmsg.add_args(); 16697 arg_target->set_isarray(false); 16698 arg_target->set_type(GLMessage::DataType::ENUM); 16699 arg_target->add_intvalue((int)target); 16700 16701 // call function 16702 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16703 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16704 glContext->hooks->gl.glEndQueryEXT(target); 16705 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16706 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16707 16708 void *pointerArgs[] = { 16709 }; 16710 16711 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16712 threadStartTime, threadEndTime, 16713 &glmsg, pointerArgs); 16714 glContext->traceGLMessage(&glmsg); 16715 } 16716 16717 void GLTrace_glQueryCounterEXT(GLuint id, GLenum target) { 16718 GLMessage glmsg; 16719 GLTraceContext *glContext = getGLTraceContext(); 16720 16721 glmsg.set_function(GLMessage::glQueryCounterEXT); 16722 16723 // copy argument id 16724 GLMessage_DataType *arg_id = glmsg.add_args(); 16725 arg_id->set_isarray(false); 16726 arg_id->set_type(GLMessage::DataType::INT); 16727 arg_id->add_intvalue(id); 16728 16729 // copy argument target 16730 GLMessage_DataType *arg_target = glmsg.add_args(); 16731 arg_target->set_isarray(false); 16732 arg_target->set_type(GLMessage::DataType::ENUM); 16733 arg_target->add_intvalue((int)target); 16734 16735 // call function 16736 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16737 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16738 glContext->hooks->gl.glQueryCounterEXT(id, target); 16739 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16740 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16741 16742 void *pointerArgs[] = { 16743 }; 16744 16745 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16746 threadStartTime, threadEndTime, 16747 &glmsg, pointerArgs); 16748 glContext->traceGLMessage(&glmsg); 16749 } 16750 16751 void GLTrace_glGetQueryivEXT(GLenum target, GLenum pname, GLint * params) { 16752 GLMessage glmsg; 16753 GLTraceContext *glContext = getGLTraceContext(); 16754 16755 glmsg.set_function(GLMessage::glGetQueryivEXT); 16756 16757 // copy argument target 16758 GLMessage_DataType *arg_target = glmsg.add_args(); 16759 arg_target->set_isarray(false); 16760 arg_target->set_type(GLMessage::DataType::ENUM); 16761 arg_target->add_intvalue((int)target); 16762 16763 // copy argument pname 16764 GLMessage_DataType *arg_pname = glmsg.add_args(); 16765 arg_pname->set_isarray(false); 16766 arg_pname->set_type(GLMessage::DataType::ENUM); 16767 arg_pname->add_intvalue((int)pname); 16768 16769 // copy argument params 16770 GLMessage_DataType *arg_params = glmsg.add_args(); 16771 arg_params->set_isarray(false); 16772 arg_params->set_type(GLMessage::DataType::INT64); 16773 arg_params->add_int64value((uintptr_t)params); 16774 16775 // call function 16776 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16777 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16778 glContext->hooks->gl.glGetQueryivEXT(target, pname, params); 16779 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16780 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16781 16782 void *pointerArgs[] = { 16783 (void *) params, 16784 }; 16785 16786 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16787 threadStartTime, threadEndTime, 16788 &glmsg, pointerArgs); 16789 glContext->traceGLMessage(&glmsg); 16790 } 16791 16792 void GLTrace_glGetQueryObjectivEXT(GLuint id, GLenum pname, GLint * params) { 16793 GLMessage glmsg; 16794 GLTraceContext *glContext = getGLTraceContext(); 16795 16796 glmsg.set_function(GLMessage::glGetQueryObjectivEXT); 16797 16798 // copy argument id 16799 GLMessage_DataType *arg_id = glmsg.add_args(); 16800 arg_id->set_isarray(false); 16801 arg_id->set_type(GLMessage::DataType::INT); 16802 arg_id->add_intvalue(id); 16803 16804 // copy argument pname 16805 GLMessage_DataType *arg_pname = glmsg.add_args(); 16806 arg_pname->set_isarray(false); 16807 arg_pname->set_type(GLMessage::DataType::ENUM); 16808 arg_pname->add_intvalue((int)pname); 16809 16810 // copy argument params 16811 GLMessage_DataType *arg_params = glmsg.add_args(); 16812 arg_params->set_isarray(false); 16813 arg_params->set_type(GLMessage::DataType::INT64); 16814 arg_params->add_int64value((uintptr_t)params); 16815 16816 // call function 16817 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16818 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16819 glContext->hooks->gl.glGetQueryObjectivEXT(id, pname, params); 16820 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16821 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16822 16823 void *pointerArgs[] = { 16824 (void *) params, 16825 }; 16826 16827 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16828 threadStartTime, threadEndTime, 16829 &glmsg, pointerArgs); 16830 glContext->traceGLMessage(&glmsg); 16831 } 16832 16833 void GLTrace_glGetQueryObjectuivEXT(GLuint id, GLenum pname, GLuint * params) { 16834 GLMessage glmsg; 16835 GLTraceContext *glContext = getGLTraceContext(); 16836 16837 glmsg.set_function(GLMessage::glGetQueryObjectuivEXT); 16838 16839 // copy argument id 16840 GLMessage_DataType *arg_id = glmsg.add_args(); 16841 arg_id->set_isarray(false); 16842 arg_id->set_type(GLMessage::DataType::INT); 16843 arg_id->add_intvalue(id); 16844 16845 // copy argument pname 16846 GLMessage_DataType *arg_pname = glmsg.add_args(); 16847 arg_pname->set_isarray(false); 16848 arg_pname->set_type(GLMessage::DataType::ENUM); 16849 arg_pname->add_intvalue((int)pname); 16850 16851 // copy argument params 16852 GLMessage_DataType *arg_params = glmsg.add_args(); 16853 arg_params->set_isarray(false); 16854 arg_params->set_type(GLMessage::DataType::INT64); 16855 arg_params->add_int64value((uintptr_t)params); 16856 16857 // call function 16858 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16859 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16860 glContext->hooks->gl.glGetQueryObjectuivEXT(id, pname, params); 16861 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16862 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16863 16864 void *pointerArgs[] = { 16865 (void *) params, 16866 }; 16867 16868 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16869 threadStartTime, threadEndTime, 16870 &glmsg, pointerArgs); 16871 glContext->traceGLMessage(&glmsg); 16872 } 16873 16874 void GLTrace_glGetQueryObjecti64vEXT(GLuint id, GLenum pname, GLint64 * params) { 16875 GLMessage glmsg; 16876 GLTraceContext *glContext = getGLTraceContext(); 16877 16878 glmsg.set_function(GLMessage::glGetQueryObjecti64vEXT); 16879 16880 // copy argument id 16881 GLMessage_DataType *arg_id = glmsg.add_args(); 16882 arg_id->set_isarray(false); 16883 arg_id->set_type(GLMessage::DataType::INT); 16884 arg_id->add_intvalue(id); 16885 16886 // copy argument pname 16887 GLMessage_DataType *arg_pname = glmsg.add_args(); 16888 arg_pname->set_isarray(false); 16889 arg_pname->set_type(GLMessage::DataType::ENUM); 16890 arg_pname->add_intvalue((int)pname); 16891 16892 // copy argument params 16893 GLMessage_DataType *arg_params = glmsg.add_args(); 16894 arg_params->set_isarray(false); 16895 arg_params->set_type(GLMessage::DataType::INT64); 16896 arg_params->add_int64value((uintptr_t)params); 16897 16898 // call function 16899 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16900 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16901 glContext->hooks->gl.glGetQueryObjecti64vEXT(id, pname, params); 16902 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16903 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16904 16905 void *pointerArgs[] = { 16906 (void *) params, 16907 }; 16908 16909 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16910 threadStartTime, threadEndTime, 16911 &glmsg, pointerArgs); 16912 glContext->traceGLMessage(&glmsg); 16913 } 16914 16915 void GLTrace_glGetQueryObjectui64vEXT(GLuint id, GLenum pname, GLuint64 * params) { 16916 GLMessage glmsg; 16917 GLTraceContext *glContext = getGLTraceContext(); 16918 16919 glmsg.set_function(GLMessage::glGetQueryObjectui64vEXT); 16920 16921 // copy argument id 16922 GLMessage_DataType *arg_id = glmsg.add_args(); 16923 arg_id->set_isarray(false); 16924 arg_id->set_type(GLMessage::DataType::INT); 16925 arg_id->add_intvalue(id); 16926 16927 // copy argument pname 16928 GLMessage_DataType *arg_pname = glmsg.add_args(); 16929 arg_pname->set_isarray(false); 16930 arg_pname->set_type(GLMessage::DataType::ENUM); 16931 arg_pname->add_intvalue((int)pname); 16932 16933 // copy argument params 16934 GLMessage_DataType *arg_params = glmsg.add_args(); 16935 arg_params->set_isarray(false); 16936 arg_params->set_type(GLMessage::DataType::INT64); 16937 arg_params->add_int64value((uintptr_t)params); 16938 16939 // call function 16940 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16941 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16942 glContext->hooks->gl.glGetQueryObjectui64vEXT(id, pname, params); 16943 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16944 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16945 16946 void *pointerArgs[] = { 16947 (void *) params, 16948 }; 16949 16950 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16951 threadStartTime, threadEndTime, 16952 &glmsg, pointerArgs); 16953 glContext->traceGLMessage(&glmsg); 16954 } 16955 16956 void GLTrace_glDrawBuffersEXT(GLsizei n, const GLenum * bufs) { 16957 GLMessage glmsg; 16958 GLTraceContext *glContext = getGLTraceContext(); 16959 16960 glmsg.set_function(GLMessage::glDrawBuffersEXT); 16961 16962 // copy argument n 16963 GLMessage_DataType *arg_n = glmsg.add_args(); 16964 arg_n->set_isarray(false); 16965 arg_n->set_type(GLMessage::DataType::INT); 16966 arg_n->add_intvalue(n); 16967 16968 // copy argument bufs 16969 GLMessage_DataType *arg_bufs = glmsg.add_args(); 16970 arg_bufs->set_isarray(false); 16971 arg_bufs->set_type(GLMessage::DataType::INT64); 16972 arg_bufs->add_int64value((uintptr_t)bufs); 16973 16974 // call function 16975 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 16976 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 16977 glContext->hooks->gl.glDrawBuffersEXT(n, bufs); 16978 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 16979 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 16980 16981 void *pointerArgs[] = { 16982 (void *) bufs, 16983 }; 16984 16985 fixupGLMessage(glContext, wallStartTime, wallEndTime, 16986 threadStartTime, threadEndTime, 16987 &glmsg, pointerArgs); 16988 glContext->traceGLMessage(&glmsg); 16989 } 16990 16991 void GLTrace_glEnableiEXT(GLenum target, GLuint index) { 16992 GLMessage glmsg; 16993 GLTraceContext *glContext = getGLTraceContext(); 16994 16995 glmsg.set_function(GLMessage::glEnableiEXT); 16996 16997 // copy argument target 16998 GLMessage_DataType *arg_target = glmsg.add_args(); 16999 arg_target->set_isarray(false); 17000 arg_target->set_type(GLMessage::DataType::ENUM); 17001 arg_target->add_intvalue((int)target); 17002 17003 // copy argument index 17004 GLMessage_DataType *arg_index = glmsg.add_args(); 17005 arg_index->set_isarray(false); 17006 arg_index->set_type(GLMessage::DataType::INT); 17007 arg_index->add_intvalue(index); 17008 17009 // call function 17010 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17011 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17012 glContext->hooks->gl.glEnableiEXT(target, index); 17013 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17014 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17015 17016 void *pointerArgs[] = { 17017 }; 17018 17019 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17020 threadStartTime, threadEndTime, 17021 &glmsg, pointerArgs); 17022 glContext->traceGLMessage(&glmsg); 17023 } 17024 17025 void GLTrace_glDisableiEXT(GLenum target, GLuint index) { 17026 GLMessage glmsg; 17027 GLTraceContext *glContext = getGLTraceContext(); 17028 17029 glmsg.set_function(GLMessage::glDisableiEXT); 17030 17031 // copy argument target 17032 GLMessage_DataType *arg_target = glmsg.add_args(); 17033 arg_target->set_isarray(false); 17034 arg_target->set_type(GLMessage::DataType::ENUM); 17035 arg_target->add_intvalue((int)target); 17036 17037 // copy argument index 17038 GLMessage_DataType *arg_index = glmsg.add_args(); 17039 arg_index->set_isarray(false); 17040 arg_index->set_type(GLMessage::DataType::INT); 17041 arg_index->add_intvalue(index); 17042 17043 // call function 17044 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17045 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17046 glContext->hooks->gl.glDisableiEXT(target, index); 17047 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17048 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17049 17050 void *pointerArgs[] = { 17051 }; 17052 17053 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17054 threadStartTime, threadEndTime, 17055 &glmsg, pointerArgs); 17056 glContext->traceGLMessage(&glmsg); 17057 } 17058 17059 void GLTrace_glBlendEquationiEXT(GLuint buf, GLenum mode) { 17060 GLMessage glmsg; 17061 GLTraceContext *glContext = getGLTraceContext(); 17062 17063 glmsg.set_function(GLMessage::glBlendEquationiEXT); 17064 17065 // copy argument buf 17066 GLMessage_DataType *arg_buf = glmsg.add_args(); 17067 arg_buf->set_isarray(false); 17068 arg_buf->set_type(GLMessage::DataType::INT); 17069 arg_buf->add_intvalue(buf); 17070 17071 // copy argument mode 17072 GLMessage_DataType *arg_mode = glmsg.add_args(); 17073 arg_mode->set_isarray(false); 17074 arg_mode->set_type(GLMessage::DataType::ENUM); 17075 arg_mode->add_intvalue((int)mode); 17076 17077 // call function 17078 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17079 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17080 glContext->hooks->gl.glBlendEquationiEXT(buf, mode); 17081 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17082 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17083 17084 void *pointerArgs[] = { 17085 }; 17086 17087 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17088 threadStartTime, threadEndTime, 17089 &glmsg, pointerArgs); 17090 glContext->traceGLMessage(&glmsg); 17091 } 17092 17093 void GLTrace_glBlendEquationSeparateiEXT(GLuint buf, GLenum modeRGB, GLenum modeAlpha) { 17094 GLMessage glmsg; 17095 GLTraceContext *glContext = getGLTraceContext(); 17096 17097 glmsg.set_function(GLMessage::glBlendEquationSeparateiEXT); 17098 17099 // copy argument buf 17100 GLMessage_DataType *arg_buf = glmsg.add_args(); 17101 arg_buf->set_isarray(false); 17102 arg_buf->set_type(GLMessage::DataType::INT); 17103 arg_buf->add_intvalue(buf); 17104 17105 // copy argument modeRGB 17106 GLMessage_DataType *arg_modeRGB = glmsg.add_args(); 17107 arg_modeRGB->set_isarray(false); 17108 arg_modeRGB->set_type(GLMessage::DataType::ENUM); 17109 arg_modeRGB->add_intvalue((int)modeRGB); 17110 17111 // copy argument modeAlpha 17112 GLMessage_DataType *arg_modeAlpha = glmsg.add_args(); 17113 arg_modeAlpha->set_isarray(false); 17114 arg_modeAlpha->set_type(GLMessage::DataType::ENUM); 17115 arg_modeAlpha->add_intvalue((int)modeAlpha); 17116 17117 // call function 17118 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17119 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17120 glContext->hooks->gl.glBlendEquationSeparateiEXT(buf, modeRGB, modeAlpha); 17121 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17122 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17123 17124 void *pointerArgs[] = { 17125 }; 17126 17127 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17128 threadStartTime, threadEndTime, 17129 &glmsg, pointerArgs); 17130 glContext->traceGLMessage(&glmsg); 17131 } 17132 17133 void GLTrace_glBlendFunciEXT(GLuint buf, GLenum src, GLenum dst) { 17134 GLMessage glmsg; 17135 GLTraceContext *glContext = getGLTraceContext(); 17136 17137 glmsg.set_function(GLMessage::glBlendFunciEXT); 17138 17139 // copy argument buf 17140 GLMessage_DataType *arg_buf = glmsg.add_args(); 17141 arg_buf->set_isarray(false); 17142 arg_buf->set_type(GLMessage::DataType::INT); 17143 arg_buf->add_intvalue(buf); 17144 17145 // copy argument src 17146 GLMessage_DataType *arg_src = glmsg.add_args(); 17147 arg_src->set_isarray(false); 17148 arg_src->set_type(GLMessage::DataType::ENUM); 17149 arg_src->add_intvalue((int)src); 17150 17151 // copy argument dst 17152 GLMessage_DataType *arg_dst = glmsg.add_args(); 17153 arg_dst->set_isarray(false); 17154 arg_dst->set_type(GLMessage::DataType::ENUM); 17155 arg_dst->add_intvalue((int)dst); 17156 17157 // call function 17158 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17159 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17160 glContext->hooks->gl.glBlendFunciEXT(buf, src, dst); 17161 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17162 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17163 17164 void *pointerArgs[] = { 17165 }; 17166 17167 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17168 threadStartTime, threadEndTime, 17169 &glmsg, pointerArgs); 17170 glContext->traceGLMessage(&glmsg); 17171 } 17172 17173 void GLTrace_glBlendFuncSeparateiEXT(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { 17174 GLMessage glmsg; 17175 GLTraceContext *glContext = getGLTraceContext(); 17176 17177 glmsg.set_function(GLMessage::glBlendFuncSeparateiEXT); 17178 17179 // copy argument buf 17180 GLMessage_DataType *arg_buf = glmsg.add_args(); 17181 arg_buf->set_isarray(false); 17182 arg_buf->set_type(GLMessage::DataType::INT); 17183 arg_buf->add_intvalue(buf); 17184 17185 // copy argument srcRGB 17186 GLMessage_DataType *arg_srcRGB = glmsg.add_args(); 17187 arg_srcRGB->set_isarray(false); 17188 arg_srcRGB->set_type(GLMessage::DataType::ENUM); 17189 arg_srcRGB->add_intvalue((int)srcRGB); 17190 17191 // copy argument dstRGB 17192 GLMessage_DataType *arg_dstRGB = glmsg.add_args(); 17193 arg_dstRGB->set_isarray(false); 17194 arg_dstRGB->set_type(GLMessage::DataType::ENUM); 17195 arg_dstRGB->add_intvalue((int)dstRGB); 17196 17197 // copy argument srcAlpha 17198 GLMessage_DataType *arg_srcAlpha = glmsg.add_args(); 17199 arg_srcAlpha->set_isarray(false); 17200 arg_srcAlpha->set_type(GLMessage::DataType::ENUM); 17201 arg_srcAlpha->add_intvalue((int)srcAlpha); 17202 17203 // copy argument dstAlpha 17204 GLMessage_DataType *arg_dstAlpha = glmsg.add_args(); 17205 arg_dstAlpha->set_isarray(false); 17206 arg_dstAlpha->set_type(GLMessage::DataType::ENUM); 17207 arg_dstAlpha->add_intvalue((int)dstAlpha); 17208 17209 // call function 17210 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17211 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17212 glContext->hooks->gl.glBlendFuncSeparateiEXT(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); 17213 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17214 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17215 17216 void *pointerArgs[] = { 17217 }; 17218 17219 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17220 threadStartTime, threadEndTime, 17221 &glmsg, pointerArgs); 17222 glContext->traceGLMessage(&glmsg); 17223 } 17224 17225 void GLTrace_glColorMaskiEXT(GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a) { 17226 GLMessage glmsg; 17227 GLTraceContext *glContext = getGLTraceContext(); 17228 17229 glmsg.set_function(GLMessage::glColorMaskiEXT); 17230 17231 // copy argument index 17232 GLMessage_DataType *arg_index = glmsg.add_args(); 17233 arg_index->set_isarray(false); 17234 arg_index->set_type(GLMessage::DataType::INT); 17235 arg_index->add_intvalue(index); 17236 17237 // copy argument r 17238 GLMessage_DataType *arg_r = glmsg.add_args(); 17239 arg_r->set_isarray(false); 17240 arg_r->set_type(GLMessage::DataType::BOOL); 17241 arg_r->add_boolvalue(r); 17242 17243 // copy argument g 17244 GLMessage_DataType *arg_g = glmsg.add_args(); 17245 arg_g->set_isarray(false); 17246 arg_g->set_type(GLMessage::DataType::BOOL); 17247 arg_g->add_boolvalue(g); 17248 17249 // copy argument b 17250 GLMessage_DataType *arg_b = glmsg.add_args(); 17251 arg_b->set_isarray(false); 17252 arg_b->set_type(GLMessage::DataType::BOOL); 17253 arg_b->add_boolvalue(b); 17254 17255 // copy argument a 17256 GLMessage_DataType *arg_a = glmsg.add_args(); 17257 arg_a->set_isarray(false); 17258 arg_a->set_type(GLMessage::DataType::BOOL); 17259 arg_a->add_boolvalue(a); 17260 17261 // call function 17262 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17263 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17264 glContext->hooks->gl.glColorMaskiEXT(index, r, g, b, a); 17265 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17266 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17267 17268 void *pointerArgs[] = { 17269 }; 17270 17271 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17272 threadStartTime, threadEndTime, 17273 &glmsg, pointerArgs); 17274 glContext->traceGLMessage(&glmsg); 17275 } 17276 17277 GLboolean GLTrace_glIsEnablediEXT(GLenum target, GLuint index) { 17278 GLMessage glmsg; 17279 GLTraceContext *glContext = getGLTraceContext(); 17280 17281 glmsg.set_function(GLMessage::glIsEnablediEXT); 17282 17283 // copy argument target 17284 GLMessage_DataType *arg_target = glmsg.add_args(); 17285 arg_target->set_isarray(false); 17286 arg_target->set_type(GLMessage::DataType::ENUM); 17287 arg_target->add_intvalue((int)target); 17288 17289 // copy argument index 17290 GLMessage_DataType *arg_index = glmsg.add_args(); 17291 arg_index->set_isarray(false); 17292 arg_index->set_type(GLMessage::DataType::INT); 17293 arg_index->add_intvalue(index); 17294 17295 // call function 17296 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17297 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17298 GLboolean retValue = glContext->hooks->gl.glIsEnablediEXT(target, index); 17299 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17300 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17301 17302 // set return value 17303 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 17304 rt->set_isarray(false); 17305 rt->set_type(GLMessage::DataType::BOOL); 17306 rt->add_boolvalue(retValue); 17307 17308 void *pointerArgs[] = { 17309 }; 17310 17311 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17312 threadStartTime, threadEndTime, 17313 &glmsg, pointerArgs); 17314 glContext->traceGLMessage(&glmsg); 17315 17316 return retValue; 17317 } 17318 17319 void GLTrace_glDrawArraysInstancedEXT(GLenum mode, GLint start, GLsizei count, GLsizei primcount) { 17320 GLMessage glmsg; 17321 GLTraceContext *glContext = getGLTraceContext(); 17322 17323 glmsg.set_function(GLMessage::glDrawArraysInstancedEXT); 17324 17325 // copy argument mode 17326 GLMessage_DataType *arg_mode = glmsg.add_args(); 17327 arg_mode->set_isarray(false); 17328 arg_mode->set_type(GLMessage::DataType::ENUM); 17329 arg_mode->add_intvalue((int)mode); 17330 17331 // copy argument start 17332 GLMessage_DataType *arg_start = glmsg.add_args(); 17333 arg_start->set_isarray(false); 17334 arg_start->set_type(GLMessage::DataType::INT); 17335 arg_start->add_intvalue(start); 17336 17337 // copy argument count 17338 GLMessage_DataType *arg_count = glmsg.add_args(); 17339 arg_count->set_isarray(false); 17340 arg_count->set_type(GLMessage::DataType::INT); 17341 arg_count->add_intvalue(count); 17342 17343 // copy argument primcount 17344 GLMessage_DataType *arg_primcount = glmsg.add_args(); 17345 arg_primcount->set_isarray(false); 17346 arg_primcount->set_type(GLMessage::DataType::INT); 17347 arg_primcount->add_intvalue(primcount); 17348 17349 // call function 17350 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17351 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17352 glContext->hooks->gl.glDrawArraysInstancedEXT(mode, start, count, primcount); 17353 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17354 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17355 17356 void *pointerArgs[] = { 17357 }; 17358 17359 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17360 threadStartTime, threadEndTime, 17361 &glmsg, pointerArgs); 17362 glContext->traceGLMessage(&glmsg); 17363 } 17364 17365 void GLTrace_glDrawElementsInstancedEXT(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) { 17366 GLMessage glmsg; 17367 GLTraceContext *glContext = getGLTraceContext(); 17368 17369 glmsg.set_function(GLMessage::glDrawElementsInstancedEXT); 17370 17371 // copy argument mode 17372 GLMessage_DataType *arg_mode = glmsg.add_args(); 17373 arg_mode->set_isarray(false); 17374 arg_mode->set_type(GLMessage::DataType::ENUM); 17375 arg_mode->add_intvalue((int)mode); 17376 17377 // copy argument count 17378 GLMessage_DataType *arg_count = glmsg.add_args(); 17379 arg_count->set_isarray(false); 17380 arg_count->set_type(GLMessage::DataType::INT); 17381 arg_count->add_intvalue(count); 17382 17383 // copy argument type 17384 GLMessage_DataType *arg_type = glmsg.add_args(); 17385 arg_type->set_isarray(false); 17386 arg_type->set_type(GLMessage::DataType::ENUM); 17387 arg_type->add_intvalue((int)type); 17388 17389 // copy argument indices 17390 GLMessage_DataType *arg_indices = glmsg.add_args(); 17391 arg_indices->set_isarray(false); 17392 arg_indices->set_type(GLMessage::DataType::INT64); 17393 arg_indices->add_int64value((uintptr_t)indices); 17394 17395 // copy argument primcount 17396 GLMessage_DataType *arg_primcount = glmsg.add_args(); 17397 arg_primcount->set_isarray(false); 17398 arg_primcount->set_type(GLMessage::DataType::INT); 17399 arg_primcount->add_intvalue(primcount); 17400 17401 // call function 17402 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17403 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17404 glContext->hooks->gl.glDrawElementsInstancedEXT(mode, count, type, indices, primcount); 17405 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17406 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17407 17408 void *pointerArgs[] = { 17409 (void *) indices, 17410 }; 17411 17412 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17413 threadStartTime, threadEndTime, 17414 &glmsg, pointerArgs); 17415 glContext->traceGLMessage(&glmsg); 17416 } 17417 17418 void GLTrace_glFramebufferTextureEXT(GLenum target, GLenum attachment, GLuint texture, GLint level) { 17419 GLMessage glmsg; 17420 GLTraceContext *glContext = getGLTraceContext(); 17421 17422 glmsg.set_function(GLMessage::glFramebufferTextureEXT); 17423 17424 // copy argument target 17425 GLMessage_DataType *arg_target = glmsg.add_args(); 17426 arg_target->set_isarray(false); 17427 arg_target->set_type(GLMessage::DataType::ENUM); 17428 arg_target->add_intvalue((int)target); 17429 17430 // copy argument attachment 17431 GLMessage_DataType *arg_attachment = glmsg.add_args(); 17432 arg_attachment->set_isarray(false); 17433 arg_attachment->set_type(GLMessage::DataType::ENUM); 17434 arg_attachment->add_intvalue((int)attachment); 17435 17436 // copy argument texture 17437 GLMessage_DataType *arg_texture = glmsg.add_args(); 17438 arg_texture->set_isarray(false); 17439 arg_texture->set_type(GLMessage::DataType::INT); 17440 arg_texture->add_intvalue(texture); 17441 17442 // copy argument level 17443 GLMessage_DataType *arg_level = glmsg.add_args(); 17444 arg_level->set_isarray(false); 17445 arg_level->set_type(GLMessage::DataType::INT); 17446 arg_level->add_intvalue(level); 17447 17448 // call function 17449 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17450 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17451 glContext->hooks->gl.glFramebufferTextureEXT(target, attachment, texture, level); 17452 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17453 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17454 17455 void *pointerArgs[] = { 17456 }; 17457 17458 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17459 threadStartTime, threadEndTime, 17460 &glmsg, pointerArgs); 17461 glContext->traceGLMessage(&glmsg); 17462 } 17463 17464 void GLTrace_glVertexAttribDivisorEXT(GLuint index, GLuint divisor) { 17465 GLMessage glmsg; 17466 GLTraceContext *glContext = getGLTraceContext(); 17467 17468 glmsg.set_function(GLMessage::glVertexAttribDivisorEXT); 17469 17470 // copy argument index 17471 GLMessage_DataType *arg_index = glmsg.add_args(); 17472 arg_index->set_isarray(false); 17473 arg_index->set_type(GLMessage::DataType::INT); 17474 arg_index->add_intvalue(index); 17475 17476 // copy argument divisor 17477 GLMessage_DataType *arg_divisor = glmsg.add_args(); 17478 arg_divisor->set_isarray(false); 17479 arg_divisor->set_type(GLMessage::DataType::INT); 17480 arg_divisor->add_intvalue(divisor); 17481 17482 // call function 17483 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17484 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17485 glContext->hooks->gl.glVertexAttribDivisorEXT(index, divisor); 17486 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17487 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17488 17489 void *pointerArgs[] = { 17490 }; 17491 17492 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17493 threadStartTime, threadEndTime, 17494 &glmsg, pointerArgs); 17495 glContext->traceGLMessage(&glmsg); 17496 } 17497 17498 void * GLTrace_glMapBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { 17499 GLMessage glmsg; 17500 GLTraceContext *glContext = getGLTraceContext(); 17501 17502 glmsg.set_function(GLMessage::glMapBufferRangeEXT); 17503 17504 // copy argument target 17505 GLMessage_DataType *arg_target = glmsg.add_args(); 17506 arg_target->set_isarray(false); 17507 arg_target->set_type(GLMessage::DataType::ENUM); 17508 arg_target->add_intvalue((int)target); 17509 17510 // copy argument offset 17511 GLMessage_DataType *arg_offset = glmsg.add_args(); 17512 arg_offset->set_isarray(false); 17513 arg_offset->set_type(GLMessage::DataType::INT); 17514 arg_offset->add_intvalue(offset); 17515 17516 // copy argument length 17517 GLMessage_DataType *arg_length = glmsg.add_args(); 17518 arg_length->set_isarray(false); 17519 arg_length->set_type(GLMessage::DataType::INT); 17520 arg_length->add_intvalue(length); 17521 17522 // copy argument access 17523 GLMessage_DataType *arg_access = glmsg.add_args(); 17524 arg_access->set_isarray(false); 17525 arg_access->set_type(GLMessage::DataType::INT); 17526 arg_access->add_intvalue(access); 17527 17528 // call function 17529 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17530 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17531 void * retValue = glContext->hooks->gl.glMapBufferRangeEXT(target, offset, length, access); 17532 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17533 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17534 17535 // set return value 17536 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 17537 rt->set_isarray(false); 17538 rt->set_type(GLMessage::DataType::INT64); 17539 rt->add_int64value((uintptr_t)retValue); 17540 17541 void *pointerArgs[] = { 17542 (void *) retValue, 17543 }; 17544 17545 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17546 threadStartTime, threadEndTime, 17547 &glmsg, pointerArgs); 17548 glContext->traceGLMessage(&glmsg); 17549 17550 return retValue; 17551 } 17552 17553 void GLTrace_glFlushMappedBufferRangeEXT(GLenum target, GLintptr offset, GLsizeiptr length) { 17554 GLMessage glmsg; 17555 GLTraceContext *glContext = getGLTraceContext(); 17556 17557 glmsg.set_function(GLMessage::glFlushMappedBufferRangeEXT); 17558 17559 // copy argument target 17560 GLMessage_DataType *arg_target = glmsg.add_args(); 17561 arg_target->set_isarray(false); 17562 arg_target->set_type(GLMessage::DataType::ENUM); 17563 arg_target->add_intvalue((int)target); 17564 17565 // copy argument offset 17566 GLMessage_DataType *arg_offset = glmsg.add_args(); 17567 arg_offset->set_isarray(false); 17568 arg_offset->set_type(GLMessage::DataType::INT); 17569 arg_offset->add_intvalue(offset); 17570 17571 // copy argument length 17572 GLMessage_DataType *arg_length = glmsg.add_args(); 17573 arg_length->set_isarray(false); 17574 arg_length->set_type(GLMessage::DataType::INT); 17575 arg_length->add_intvalue(length); 17576 17577 // call function 17578 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17579 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17580 glContext->hooks->gl.glFlushMappedBufferRangeEXT(target, offset, length); 17581 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17582 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17583 17584 void *pointerArgs[] = { 17585 }; 17586 17587 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17588 threadStartTime, threadEndTime, 17589 &glmsg, pointerArgs); 17590 glContext->traceGLMessage(&glmsg); 17591 } 17592 17593 void GLTrace_glMultiDrawArraysEXT(GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount) { 17594 GLMessage glmsg; 17595 GLTraceContext *glContext = getGLTraceContext(); 17596 17597 glmsg.set_function(GLMessage::glMultiDrawArraysEXT); 17598 17599 // copy argument mode 17600 GLMessage_DataType *arg_mode = glmsg.add_args(); 17601 arg_mode->set_isarray(false); 17602 arg_mode->set_type(GLMessage::DataType::ENUM); 17603 arg_mode->add_intvalue((int)mode); 17604 17605 // copy argument first 17606 GLMessage_DataType *arg_first = glmsg.add_args(); 17607 arg_first->set_isarray(false); 17608 arg_first->set_type(GLMessage::DataType::INT64); 17609 arg_first->add_int64value((uintptr_t)first); 17610 17611 // copy argument count 17612 GLMessage_DataType *arg_count = glmsg.add_args(); 17613 arg_count->set_isarray(false); 17614 arg_count->set_type(GLMessage::DataType::INT64); 17615 arg_count->add_int64value((uintptr_t)count); 17616 17617 // copy argument primcount 17618 GLMessage_DataType *arg_primcount = glmsg.add_args(); 17619 arg_primcount->set_isarray(false); 17620 arg_primcount->set_type(GLMessage::DataType::INT); 17621 arg_primcount->add_intvalue(primcount); 17622 17623 // call function 17624 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17625 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17626 glContext->hooks->gl.glMultiDrawArraysEXT(mode, first, count, primcount); 17627 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17628 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17629 17630 void *pointerArgs[] = { 17631 (void *) first, 17632 (void *) count, 17633 }; 17634 17635 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17636 threadStartTime, threadEndTime, 17637 &glmsg, pointerArgs); 17638 glContext->traceGLMessage(&glmsg); 17639 } 17640 17641 void GLTrace_glMultiDrawElementsEXT(GLenum mode, const GLsizei * count, GLenum type, const void *const* indices, GLsizei primcount) { 17642 GLMessage glmsg; 17643 GLTraceContext *glContext = getGLTraceContext(); 17644 17645 glmsg.set_function(GLMessage::glMultiDrawElementsEXT); 17646 17647 // copy argument mode 17648 GLMessage_DataType *arg_mode = glmsg.add_args(); 17649 arg_mode->set_isarray(false); 17650 arg_mode->set_type(GLMessage::DataType::ENUM); 17651 arg_mode->add_intvalue((int)mode); 17652 17653 // copy argument count 17654 GLMessage_DataType *arg_count = glmsg.add_args(); 17655 arg_count->set_isarray(false); 17656 arg_count->set_type(GLMessage::DataType::INT64); 17657 arg_count->add_int64value((uintptr_t)count); 17658 17659 // copy argument type 17660 GLMessage_DataType *arg_type = glmsg.add_args(); 17661 arg_type->set_isarray(false); 17662 arg_type->set_type(GLMessage::DataType::ENUM); 17663 arg_type->add_intvalue((int)type); 17664 17665 // copy argument indices 17666 GLMessage_DataType *arg_indices = glmsg.add_args(); 17667 arg_indices->set_isarray(false); 17668 arg_indices->set_type(GLMessage::DataType::INT64); 17669 arg_indices->add_int64value((uintptr_t)indices); 17670 17671 // copy argument primcount 17672 GLMessage_DataType *arg_primcount = glmsg.add_args(); 17673 arg_primcount->set_isarray(false); 17674 arg_primcount->set_type(GLMessage::DataType::INT); 17675 arg_primcount->add_intvalue(primcount); 17676 17677 // call function 17678 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17679 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17680 glContext->hooks->gl.glMultiDrawElementsEXT(mode, count, type, indices, primcount); 17681 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17682 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17683 17684 void *pointerArgs[] = { 17685 (void *) count, 17686 (void *) indices, 17687 }; 17688 17689 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17690 threadStartTime, threadEndTime, 17691 &glmsg, pointerArgs); 17692 glContext->traceGLMessage(&glmsg); 17693 } 17694 17695 void GLTrace_glRenderbufferStorageMultisampleEXT(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { 17696 GLMessage glmsg; 17697 GLTraceContext *glContext = getGLTraceContext(); 17698 17699 glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleEXT); 17700 17701 // copy argument target 17702 GLMessage_DataType *arg_target = glmsg.add_args(); 17703 arg_target->set_isarray(false); 17704 arg_target->set_type(GLMessage::DataType::ENUM); 17705 arg_target->add_intvalue((int)target); 17706 17707 // copy argument samples 17708 GLMessage_DataType *arg_samples = glmsg.add_args(); 17709 arg_samples->set_isarray(false); 17710 arg_samples->set_type(GLMessage::DataType::INT); 17711 arg_samples->add_intvalue(samples); 17712 17713 // copy argument internalformat 17714 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 17715 arg_internalformat->set_isarray(false); 17716 arg_internalformat->set_type(GLMessage::DataType::ENUM); 17717 arg_internalformat->add_intvalue((int)internalformat); 17718 17719 // copy argument width 17720 GLMessage_DataType *arg_width = glmsg.add_args(); 17721 arg_width->set_isarray(false); 17722 arg_width->set_type(GLMessage::DataType::INT); 17723 arg_width->add_intvalue(width); 17724 17725 // copy argument height 17726 GLMessage_DataType *arg_height = glmsg.add_args(); 17727 arg_height->set_isarray(false); 17728 arg_height->set_type(GLMessage::DataType::INT); 17729 arg_height->add_intvalue(height); 17730 17731 // call function 17732 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17733 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17734 glContext->hooks->gl.glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); 17735 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17736 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17737 17738 void *pointerArgs[] = { 17739 }; 17740 17741 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17742 threadStartTime, threadEndTime, 17743 &glmsg, pointerArgs); 17744 glContext->traceGLMessage(&glmsg); 17745 } 17746 17747 void GLTrace_glFramebufferTexture2DMultisampleEXT(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { 17748 GLMessage glmsg; 17749 GLTraceContext *glContext = getGLTraceContext(); 17750 17751 glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleEXT); 17752 17753 // copy argument target 17754 GLMessage_DataType *arg_target = glmsg.add_args(); 17755 arg_target->set_isarray(false); 17756 arg_target->set_type(GLMessage::DataType::ENUM); 17757 arg_target->add_intvalue((int)target); 17758 17759 // copy argument attachment 17760 GLMessage_DataType *arg_attachment = glmsg.add_args(); 17761 arg_attachment->set_isarray(false); 17762 arg_attachment->set_type(GLMessage::DataType::ENUM); 17763 arg_attachment->add_intvalue((int)attachment); 17764 17765 // copy argument textarget 17766 GLMessage_DataType *arg_textarget = glmsg.add_args(); 17767 arg_textarget->set_isarray(false); 17768 arg_textarget->set_type(GLMessage::DataType::ENUM); 17769 arg_textarget->add_intvalue((int)textarget); 17770 17771 // copy argument texture 17772 GLMessage_DataType *arg_texture = glmsg.add_args(); 17773 arg_texture->set_isarray(false); 17774 arg_texture->set_type(GLMessage::DataType::INT); 17775 arg_texture->add_intvalue(texture); 17776 17777 // copy argument level 17778 GLMessage_DataType *arg_level = glmsg.add_args(); 17779 arg_level->set_isarray(false); 17780 arg_level->set_type(GLMessage::DataType::INT); 17781 arg_level->add_intvalue(level); 17782 17783 // copy argument samples 17784 GLMessage_DataType *arg_samples = glmsg.add_args(); 17785 arg_samples->set_isarray(false); 17786 arg_samples->set_type(GLMessage::DataType::INT); 17787 arg_samples->add_intvalue(samples); 17788 17789 // call function 17790 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17791 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17792 glContext->hooks->gl.glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); 17793 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17794 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17795 17796 void *pointerArgs[] = { 17797 }; 17798 17799 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17800 threadStartTime, threadEndTime, 17801 &glmsg, pointerArgs); 17802 glContext->traceGLMessage(&glmsg); 17803 } 17804 17805 void GLTrace_glReadBufferIndexedEXT(GLenum src, GLint index) { 17806 GLMessage glmsg; 17807 GLTraceContext *glContext = getGLTraceContext(); 17808 17809 glmsg.set_function(GLMessage::glReadBufferIndexedEXT); 17810 17811 // copy argument src 17812 GLMessage_DataType *arg_src = glmsg.add_args(); 17813 arg_src->set_isarray(false); 17814 arg_src->set_type(GLMessage::DataType::ENUM); 17815 arg_src->add_intvalue((int)src); 17816 17817 // copy argument index 17818 GLMessage_DataType *arg_index = glmsg.add_args(); 17819 arg_index->set_isarray(false); 17820 arg_index->set_type(GLMessage::DataType::INT); 17821 arg_index->add_intvalue(index); 17822 17823 // call function 17824 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17825 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17826 glContext->hooks->gl.glReadBufferIndexedEXT(src, index); 17827 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17828 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17829 17830 void *pointerArgs[] = { 17831 }; 17832 17833 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17834 threadStartTime, threadEndTime, 17835 &glmsg, pointerArgs); 17836 glContext->traceGLMessage(&glmsg); 17837 } 17838 17839 void GLTrace_glDrawBuffersIndexedEXT(GLint n, const GLenum * location, const GLint * indices) { 17840 GLMessage glmsg; 17841 GLTraceContext *glContext = getGLTraceContext(); 17842 17843 glmsg.set_function(GLMessage::glDrawBuffersIndexedEXT); 17844 17845 // copy argument n 17846 GLMessage_DataType *arg_n = glmsg.add_args(); 17847 arg_n->set_isarray(false); 17848 arg_n->set_type(GLMessage::DataType::INT); 17849 arg_n->add_intvalue(n); 17850 17851 // copy argument location 17852 GLMessage_DataType *arg_location = glmsg.add_args(); 17853 arg_location->set_isarray(false); 17854 arg_location->set_type(GLMessage::DataType::INT64); 17855 arg_location->add_int64value((uintptr_t)location); 17856 17857 // copy argument indices 17858 GLMessage_DataType *arg_indices = glmsg.add_args(); 17859 arg_indices->set_isarray(false); 17860 arg_indices->set_type(GLMessage::DataType::INT64); 17861 arg_indices->add_int64value((uintptr_t)indices); 17862 17863 // call function 17864 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17865 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17866 glContext->hooks->gl.glDrawBuffersIndexedEXT(n, location, indices); 17867 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17868 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17869 17870 void *pointerArgs[] = { 17871 (void *) location, 17872 (void *) indices, 17873 }; 17874 17875 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17876 threadStartTime, threadEndTime, 17877 &glmsg, pointerArgs); 17878 glContext->traceGLMessage(&glmsg); 17879 } 17880 17881 void GLTrace_glGetIntegeri_vEXT(GLenum target, GLuint index, GLint * data) { 17882 GLMessage glmsg; 17883 GLTraceContext *glContext = getGLTraceContext(); 17884 17885 glmsg.set_function(GLMessage::glGetIntegeri_vEXT); 17886 17887 // copy argument target 17888 GLMessage_DataType *arg_target = glmsg.add_args(); 17889 arg_target->set_isarray(false); 17890 arg_target->set_type(GLMessage::DataType::ENUM); 17891 arg_target->add_intvalue((int)target); 17892 17893 // copy argument index 17894 GLMessage_DataType *arg_index = glmsg.add_args(); 17895 arg_index->set_isarray(false); 17896 arg_index->set_type(GLMessage::DataType::INT); 17897 arg_index->add_intvalue(index); 17898 17899 // copy argument data 17900 GLMessage_DataType *arg_data = glmsg.add_args(); 17901 arg_data->set_isarray(false); 17902 arg_data->set_type(GLMessage::DataType::INT64); 17903 arg_data->add_int64value((uintptr_t)data); 17904 17905 // call function 17906 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17907 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17908 glContext->hooks->gl.glGetIntegeri_vEXT(target, index, data); 17909 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17910 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17911 17912 void *pointerArgs[] = { 17913 (void *) data, 17914 }; 17915 17916 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17917 threadStartTime, threadEndTime, 17918 &glmsg, pointerArgs); 17919 glContext->traceGLMessage(&glmsg); 17920 } 17921 17922 void GLTrace_glPrimitiveBoundingBoxEXT(GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW) { 17923 GLMessage glmsg; 17924 GLTraceContext *glContext = getGLTraceContext(); 17925 17926 glmsg.set_function(GLMessage::glPrimitiveBoundingBoxEXT); 17927 17928 // copy argument minX 17929 GLMessage_DataType *arg_minX = glmsg.add_args(); 17930 arg_minX->set_isarray(false); 17931 arg_minX->set_type(GLMessage::DataType::FLOAT); 17932 arg_minX->add_floatvalue(minX); 17933 17934 // copy argument minY 17935 GLMessage_DataType *arg_minY = glmsg.add_args(); 17936 arg_minY->set_isarray(false); 17937 arg_minY->set_type(GLMessage::DataType::FLOAT); 17938 arg_minY->add_floatvalue(minY); 17939 17940 // copy argument minZ 17941 GLMessage_DataType *arg_minZ = glmsg.add_args(); 17942 arg_minZ->set_isarray(false); 17943 arg_minZ->set_type(GLMessage::DataType::FLOAT); 17944 arg_minZ->add_floatvalue(minZ); 17945 17946 // copy argument minW 17947 GLMessage_DataType *arg_minW = glmsg.add_args(); 17948 arg_minW->set_isarray(false); 17949 arg_minW->set_type(GLMessage::DataType::FLOAT); 17950 arg_minW->add_floatvalue(minW); 17951 17952 // copy argument maxX 17953 GLMessage_DataType *arg_maxX = glmsg.add_args(); 17954 arg_maxX->set_isarray(false); 17955 arg_maxX->set_type(GLMessage::DataType::FLOAT); 17956 arg_maxX->add_floatvalue(maxX); 17957 17958 // copy argument maxY 17959 GLMessage_DataType *arg_maxY = glmsg.add_args(); 17960 arg_maxY->set_isarray(false); 17961 arg_maxY->set_type(GLMessage::DataType::FLOAT); 17962 arg_maxY->add_floatvalue(maxY); 17963 17964 // copy argument maxZ 17965 GLMessage_DataType *arg_maxZ = glmsg.add_args(); 17966 arg_maxZ->set_isarray(false); 17967 arg_maxZ->set_type(GLMessage::DataType::FLOAT); 17968 arg_maxZ->add_floatvalue(maxZ); 17969 17970 // copy argument maxW 17971 GLMessage_DataType *arg_maxW = glmsg.add_args(); 17972 arg_maxW->set_isarray(false); 17973 arg_maxW->set_type(GLMessage::DataType::FLOAT); 17974 arg_maxW->add_floatvalue(maxW); 17975 17976 // call function 17977 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 17978 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 17979 glContext->hooks->gl.glPrimitiveBoundingBoxEXT(minX, minY, minZ, minW, maxX, maxY, maxZ, maxW); 17980 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 17981 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 17982 17983 void *pointerArgs[] = { 17984 }; 17985 17986 fixupGLMessage(glContext, wallStartTime, wallEndTime, 17987 threadStartTime, threadEndTime, 17988 &glmsg, pointerArgs); 17989 glContext->traceGLMessage(&glmsg); 17990 } 17991 17992 GLenum GLTrace_glGetGraphicsResetStatusEXT(void) { 17993 GLMessage glmsg; 17994 GLTraceContext *glContext = getGLTraceContext(); 17995 17996 glmsg.set_function(GLMessage::glGetGraphicsResetStatusEXT); 17997 17998 // call function 17999 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18000 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18001 GLenum retValue = glContext->hooks->gl.glGetGraphicsResetStatusEXT(); 18002 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18003 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18004 18005 // set return value 18006 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 18007 rt->set_isarray(false); 18008 rt->set_type(GLMessage::DataType::ENUM); 18009 rt->add_intvalue((int)retValue); 18010 18011 void *pointerArgs[] = { 18012 }; 18013 18014 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18015 threadStartTime, threadEndTime, 18016 &glmsg, pointerArgs); 18017 glContext->traceGLMessage(&glmsg); 18018 18019 return retValue; 18020 } 18021 18022 void GLTrace_glReadnPixelsEXT(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void * data) { 18023 GLMessage glmsg; 18024 GLTraceContext *glContext = getGLTraceContext(); 18025 18026 glmsg.set_function(GLMessage::glReadnPixelsEXT); 18027 18028 // copy argument x 18029 GLMessage_DataType *arg_x = glmsg.add_args(); 18030 arg_x->set_isarray(false); 18031 arg_x->set_type(GLMessage::DataType::INT); 18032 arg_x->add_intvalue(x); 18033 18034 // copy argument y 18035 GLMessage_DataType *arg_y = glmsg.add_args(); 18036 arg_y->set_isarray(false); 18037 arg_y->set_type(GLMessage::DataType::INT); 18038 arg_y->add_intvalue(y); 18039 18040 // copy argument width 18041 GLMessage_DataType *arg_width = glmsg.add_args(); 18042 arg_width->set_isarray(false); 18043 arg_width->set_type(GLMessage::DataType::INT); 18044 arg_width->add_intvalue(width); 18045 18046 // copy argument height 18047 GLMessage_DataType *arg_height = glmsg.add_args(); 18048 arg_height->set_isarray(false); 18049 arg_height->set_type(GLMessage::DataType::INT); 18050 arg_height->add_intvalue(height); 18051 18052 // copy argument format 18053 GLMessage_DataType *arg_format = glmsg.add_args(); 18054 arg_format->set_isarray(false); 18055 arg_format->set_type(GLMessage::DataType::ENUM); 18056 arg_format->add_intvalue((int)format); 18057 18058 // copy argument type 18059 GLMessage_DataType *arg_type = glmsg.add_args(); 18060 arg_type->set_isarray(false); 18061 arg_type->set_type(GLMessage::DataType::ENUM); 18062 arg_type->add_intvalue((int)type); 18063 18064 // copy argument bufSize 18065 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 18066 arg_bufSize->set_isarray(false); 18067 arg_bufSize->set_type(GLMessage::DataType::INT); 18068 arg_bufSize->add_intvalue(bufSize); 18069 18070 // copy argument data 18071 GLMessage_DataType *arg_data = glmsg.add_args(); 18072 arg_data->set_isarray(false); 18073 arg_data->set_type(GLMessage::DataType::INT64); 18074 arg_data->add_int64value((uintptr_t)data); 18075 18076 // call function 18077 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18078 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18079 glContext->hooks->gl.glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data); 18080 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18081 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18082 18083 void *pointerArgs[] = { 18084 (void *) data, 18085 }; 18086 18087 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18088 threadStartTime, threadEndTime, 18089 &glmsg, pointerArgs); 18090 glContext->traceGLMessage(&glmsg); 18091 } 18092 18093 void GLTrace_glGetnUniformfvEXT(GLuint program, GLint location, GLsizei bufSize, GLfloat * params) { 18094 GLMessage glmsg; 18095 GLTraceContext *glContext = getGLTraceContext(); 18096 18097 glmsg.set_function(GLMessage::glGetnUniformfvEXT); 18098 18099 // copy argument program 18100 GLMessage_DataType *arg_program = glmsg.add_args(); 18101 arg_program->set_isarray(false); 18102 arg_program->set_type(GLMessage::DataType::INT); 18103 arg_program->add_intvalue(program); 18104 18105 // copy argument location 18106 GLMessage_DataType *arg_location = glmsg.add_args(); 18107 arg_location->set_isarray(false); 18108 arg_location->set_type(GLMessage::DataType::INT); 18109 arg_location->add_intvalue(location); 18110 18111 // copy argument bufSize 18112 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 18113 arg_bufSize->set_isarray(false); 18114 arg_bufSize->set_type(GLMessage::DataType::INT); 18115 arg_bufSize->add_intvalue(bufSize); 18116 18117 // copy argument params 18118 GLMessage_DataType *arg_params = glmsg.add_args(); 18119 arg_params->set_isarray(false); 18120 arg_params->set_type(GLMessage::DataType::INT64); 18121 arg_params->add_int64value((uintptr_t)params); 18122 18123 // call function 18124 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18125 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18126 glContext->hooks->gl.glGetnUniformfvEXT(program, location, bufSize, params); 18127 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18128 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18129 18130 void *pointerArgs[] = { 18131 (void *) params, 18132 }; 18133 18134 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18135 threadStartTime, threadEndTime, 18136 &glmsg, pointerArgs); 18137 glContext->traceGLMessage(&glmsg); 18138 } 18139 18140 void GLTrace_glGetnUniformivEXT(GLuint program, GLint location, GLsizei bufSize, GLint * params) { 18141 GLMessage glmsg; 18142 GLTraceContext *glContext = getGLTraceContext(); 18143 18144 glmsg.set_function(GLMessage::glGetnUniformivEXT); 18145 18146 // copy argument program 18147 GLMessage_DataType *arg_program = glmsg.add_args(); 18148 arg_program->set_isarray(false); 18149 arg_program->set_type(GLMessage::DataType::INT); 18150 arg_program->add_intvalue(program); 18151 18152 // copy argument location 18153 GLMessage_DataType *arg_location = glmsg.add_args(); 18154 arg_location->set_isarray(false); 18155 arg_location->set_type(GLMessage::DataType::INT); 18156 arg_location->add_intvalue(location); 18157 18158 // copy argument bufSize 18159 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 18160 arg_bufSize->set_isarray(false); 18161 arg_bufSize->set_type(GLMessage::DataType::INT); 18162 arg_bufSize->add_intvalue(bufSize); 18163 18164 // copy argument params 18165 GLMessage_DataType *arg_params = glmsg.add_args(); 18166 arg_params->set_isarray(false); 18167 arg_params->set_type(GLMessage::DataType::INT64); 18168 arg_params->add_int64value((uintptr_t)params); 18169 18170 // call function 18171 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18172 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18173 glContext->hooks->gl.glGetnUniformivEXT(program, location, bufSize, params); 18174 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18175 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18176 18177 void *pointerArgs[] = { 18178 (void *) params, 18179 }; 18180 18181 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18182 threadStartTime, threadEndTime, 18183 &glmsg, pointerArgs); 18184 glContext->traceGLMessage(&glmsg); 18185 } 18186 18187 void GLTrace_glActiveShaderProgramEXT(GLuint pipeline, GLuint program) { 18188 GLMessage glmsg; 18189 GLTraceContext *glContext = getGLTraceContext(); 18190 18191 glmsg.set_function(GLMessage::glActiveShaderProgramEXT); 18192 18193 // copy argument pipeline 18194 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 18195 arg_pipeline->set_isarray(false); 18196 arg_pipeline->set_type(GLMessage::DataType::INT); 18197 arg_pipeline->add_intvalue(pipeline); 18198 18199 // copy argument program 18200 GLMessage_DataType *arg_program = glmsg.add_args(); 18201 arg_program->set_isarray(false); 18202 arg_program->set_type(GLMessage::DataType::INT); 18203 arg_program->add_intvalue(program); 18204 18205 // call function 18206 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18207 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18208 glContext->hooks->gl.glActiveShaderProgramEXT(pipeline, program); 18209 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18210 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18211 18212 void *pointerArgs[] = { 18213 }; 18214 18215 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18216 threadStartTime, threadEndTime, 18217 &glmsg, pointerArgs); 18218 glContext->traceGLMessage(&glmsg); 18219 } 18220 18221 void GLTrace_glBindProgramPipelineEXT(GLuint pipeline) { 18222 GLMessage glmsg; 18223 GLTraceContext *glContext = getGLTraceContext(); 18224 18225 glmsg.set_function(GLMessage::glBindProgramPipelineEXT); 18226 18227 // copy argument pipeline 18228 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 18229 arg_pipeline->set_isarray(false); 18230 arg_pipeline->set_type(GLMessage::DataType::INT); 18231 arg_pipeline->add_intvalue(pipeline); 18232 18233 // call function 18234 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18235 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18236 glContext->hooks->gl.glBindProgramPipelineEXT(pipeline); 18237 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18238 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18239 18240 void *pointerArgs[] = { 18241 }; 18242 18243 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18244 threadStartTime, threadEndTime, 18245 &glmsg, pointerArgs); 18246 glContext->traceGLMessage(&glmsg); 18247 } 18248 18249 GLuint GLTrace_glCreateShaderProgramvEXT(GLenum type, GLsizei count, const GLchar ** strings) { 18250 GLMessage glmsg; 18251 GLTraceContext *glContext = getGLTraceContext(); 18252 18253 glmsg.set_function(GLMessage::glCreateShaderProgramvEXT); 18254 18255 // copy argument type 18256 GLMessage_DataType *arg_type = glmsg.add_args(); 18257 arg_type->set_isarray(false); 18258 arg_type->set_type(GLMessage::DataType::ENUM); 18259 arg_type->add_intvalue((int)type); 18260 18261 // copy argument count 18262 GLMessage_DataType *arg_count = glmsg.add_args(); 18263 arg_count->set_isarray(false); 18264 arg_count->set_type(GLMessage::DataType::INT); 18265 arg_count->add_intvalue(count); 18266 18267 // copy argument strings 18268 GLMessage_DataType *arg_strings = glmsg.add_args(); 18269 arg_strings->set_isarray(false); 18270 arg_strings->set_type(GLMessage::DataType::INT64); 18271 arg_strings->add_int64value((uintptr_t)strings); 18272 18273 // call function 18274 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18275 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18276 GLuint retValue = glContext->hooks->gl.glCreateShaderProgramvEXT(type, count, strings); 18277 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18278 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18279 18280 // set return value 18281 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 18282 rt->set_isarray(false); 18283 rt->set_type(GLMessage::DataType::INT); 18284 rt->add_intvalue(retValue); 18285 18286 void *pointerArgs[] = { 18287 (void *) strings, 18288 }; 18289 18290 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18291 threadStartTime, threadEndTime, 18292 &glmsg, pointerArgs); 18293 glContext->traceGLMessage(&glmsg); 18294 18295 return retValue; 18296 } 18297 18298 void GLTrace_glDeleteProgramPipelinesEXT(GLsizei n, const GLuint * pipelines) { 18299 GLMessage glmsg; 18300 GLTraceContext *glContext = getGLTraceContext(); 18301 18302 glmsg.set_function(GLMessage::glDeleteProgramPipelinesEXT); 18303 18304 // copy argument n 18305 GLMessage_DataType *arg_n = glmsg.add_args(); 18306 arg_n->set_isarray(false); 18307 arg_n->set_type(GLMessage::DataType::INT); 18308 arg_n->add_intvalue(n); 18309 18310 // copy argument pipelines 18311 GLMessage_DataType *arg_pipelines = glmsg.add_args(); 18312 arg_pipelines->set_isarray(false); 18313 arg_pipelines->set_type(GLMessage::DataType::INT64); 18314 arg_pipelines->add_int64value((uintptr_t)pipelines); 18315 18316 // call function 18317 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18318 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18319 glContext->hooks->gl.glDeleteProgramPipelinesEXT(n, pipelines); 18320 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18321 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18322 18323 void *pointerArgs[] = { 18324 (void *) pipelines, 18325 }; 18326 18327 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18328 threadStartTime, threadEndTime, 18329 &glmsg, pointerArgs); 18330 glContext->traceGLMessage(&glmsg); 18331 } 18332 18333 void GLTrace_glGenProgramPipelinesEXT(GLsizei n, GLuint * pipelines) { 18334 GLMessage glmsg; 18335 GLTraceContext *glContext = getGLTraceContext(); 18336 18337 glmsg.set_function(GLMessage::glGenProgramPipelinesEXT); 18338 18339 // copy argument n 18340 GLMessage_DataType *arg_n = glmsg.add_args(); 18341 arg_n->set_isarray(false); 18342 arg_n->set_type(GLMessage::DataType::INT); 18343 arg_n->add_intvalue(n); 18344 18345 // copy argument pipelines 18346 GLMessage_DataType *arg_pipelines = glmsg.add_args(); 18347 arg_pipelines->set_isarray(false); 18348 arg_pipelines->set_type(GLMessage::DataType::INT64); 18349 arg_pipelines->add_int64value((uintptr_t)pipelines); 18350 18351 // call function 18352 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18353 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18354 glContext->hooks->gl.glGenProgramPipelinesEXT(n, pipelines); 18355 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18356 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18357 18358 void *pointerArgs[] = { 18359 (void *) pipelines, 18360 }; 18361 18362 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18363 threadStartTime, threadEndTime, 18364 &glmsg, pointerArgs); 18365 glContext->traceGLMessage(&glmsg); 18366 } 18367 18368 void GLTrace_glGetProgramPipelineInfoLogEXT(GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog) { 18369 GLMessage glmsg; 18370 GLTraceContext *glContext = getGLTraceContext(); 18371 18372 glmsg.set_function(GLMessage::glGetProgramPipelineInfoLogEXT); 18373 18374 // copy argument pipeline 18375 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 18376 arg_pipeline->set_isarray(false); 18377 arg_pipeline->set_type(GLMessage::DataType::INT); 18378 arg_pipeline->add_intvalue(pipeline); 18379 18380 // copy argument bufSize 18381 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 18382 arg_bufSize->set_isarray(false); 18383 arg_bufSize->set_type(GLMessage::DataType::INT); 18384 arg_bufSize->add_intvalue(bufSize); 18385 18386 // copy argument length 18387 GLMessage_DataType *arg_length = glmsg.add_args(); 18388 arg_length->set_isarray(false); 18389 arg_length->set_type(GLMessage::DataType::INT64); 18390 arg_length->add_int64value((uintptr_t)length); 18391 18392 // copy argument infoLog 18393 GLMessage_DataType *arg_infoLog = glmsg.add_args(); 18394 arg_infoLog->set_isarray(false); 18395 arg_infoLog->set_type(GLMessage::DataType::INT64); 18396 arg_infoLog->add_int64value((uintptr_t)infoLog); 18397 18398 // call function 18399 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18400 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18401 glContext->hooks->gl.glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length, infoLog); 18402 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18403 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18404 18405 void *pointerArgs[] = { 18406 (void *) length, 18407 (void *) infoLog, 18408 }; 18409 18410 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18411 threadStartTime, threadEndTime, 18412 &glmsg, pointerArgs); 18413 glContext->traceGLMessage(&glmsg); 18414 } 18415 18416 void GLTrace_glGetProgramPipelineivEXT(GLuint pipeline, GLenum pname, GLint * params) { 18417 GLMessage glmsg; 18418 GLTraceContext *glContext = getGLTraceContext(); 18419 18420 glmsg.set_function(GLMessage::glGetProgramPipelineivEXT); 18421 18422 // copy argument pipeline 18423 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 18424 arg_pipeline->set_isarray(false); 18425 arg_pipeline->set_type(GLMessage::DataType::INT); 18426 arg_pipeline->add_intvalue(pipeline); 18427 18428 // copy argument pname 18429 GLMessage_DataType *arg_pname = glmsg.add_args(); 18430 arg_pname->set_isarray(false); 18431 arg_pname->set_type(GLMessage::DataType::ENUM); 18432 arg_pname->add_intvalue((int)pname); 18433 18434 // copy argument params 18435 GLMessage_DataType *arg_params = glmsg.add_args(); 18436 arg_params->set_isarray(false); 18437 arg_params->set_type(GLMessage::DataType::INT64); 18438 arg_params->add_int64value((uintptr_t)params); 18439 18440 // call function 18441 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18442 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18443 glContext->hooks->gl.glGetProgramPipelineivEXT(pipeline, pname, params); 18444 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18445 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18446 18447 void *pointerArgs[] = { 18448 (void *) params, 18449 }; 18450 18451 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18452 threadStartTime, threadEndTime, 18453 &glmsg, pointerArgs); 18454 glContext->traceGLMessage(&glmsg); 18455 } 18456 18457 GLboolean GLTrace_glIsProgramPipelineEXT(GLuint pipeline) { 18458 GLMessage glmsg; 18459 GLTraceContext *glContext = getGLTraceContext(); 18460 18461 glmsg.set_function(GLMessage::glIsProgramPipelineEXT); 18462 18463 // copy argument pipeline 18464 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 18465 arg_pipeline->set_isarray(false); 18466 arg_pipeline->set_type(GLMessage::DataType::INT); 18467 arg_pipeline->add_intvalue(pipeline); 18468 18469 // call function 18470 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18471 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18472 GLboolean retValue = glContext->hooks->gl.glIsProgramPipelineEXT(pipeline); 18473 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18474 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18475 18476 // set return value 18477 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 18478 rt->set_isarray(false); 18479 rt->set_type(GLMessage::DataType::BOOL); 18480 rt->add_boolvalue(retValue); 18481 18482 void *pointerArgs[] = { 18483 }; 18484 18485 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18486 threadStartTime, threadEndTime, 18487 &glmsg, pointerArgs); 18488 glContext->traceGLMessage(&glmsg); 18489 18490 return retValue; 18491 } 18492 18493 void GLTrace_glProgramParameteriEXT(GLuint program, GLenum pname, GLint value) { 18494 GLMessage glmsg; 18495 GLTraceContext *glContext = getGLTraceContext(); 18496 18497 glmsg.set_function(GLMessage::glProgramParameteriEXT); 18498 18499 // copy argument program 18500 GLMessage_DataType *arg_program = glmsg.add_args(); 18501 arg_program->set_isarray(false); 18502 arg_program->set_type(GLMessage::DataType::INT); 18503 arg_program->add_intvalue(program); 18504 18505 // copy argument pname 18506 GLMessage_DataType *arg_pname = glmsg.add_args(); 18507 arg_pname->set_isarray(false); 18508 arg_pname->set_type(GLMessage::DataType::ENUM); 18509 arg_pname->add_intvalue((int)pname); 18510 18511 // copy argument value 18512 GLMessage_DataType *arg_value = glmsg.add_args(); 18513 arg_value->set_isarray(false); 18514 arg_value->set_type(GLMessage::DataType::INT); 18515 arg_value->add_intvalue(value); 18516 18517 // call function 18518 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18519 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18520 glContext->hooks->gl.glProgramParameteriEXT(program, pname, value); 18521 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18522 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18523 18524 void *pointerArgs[] = { 18525 }; 18526 18527 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18528 threadStartTime, threadEndTime, 18529 &glmsg, pointerArgs); 18530 glContext->traceGLMessage(&glmsg); 18531 } 18532 18533 void GLTrace_glProgramUniform1fEXT(GLuint program, GLint location, GLfloat v0) { 18534 GLMessage glmsg; 18535 GLTraceContext *glContext = getGLTraceContext(); 18536 18537 glmsg.set_function(GLMessage::glProgramUniform1fEXT); 18538 18539 // copy argument program 18540 GLMessage_DataType *arg_program = glmsg.add_args(); 18541 arg_program->set_isarray(false); 18542 arg_program->set_type(GLMessage::DataType::INT); 18543 arg_program->add_intvalue(program); 18544 18545 // copy argument location 18546 GLMessage_DataType *arg_location = glmsg.add_args(); 18547 arg_location->set_isarray(false); 18548 arg_location->set_type(GLMessage::DataType::INT); 18549 arg_location->add_intvalue(location); 18550 18551 // copy argument v0 18552 GLMessage_DataType *arg_v0 = glmsg.add_args(); 18553 arg_v0->set_isarray(false); 18554 arg_v0->set_type(GLMessage::DataType::FLOAT); 18555 arg_v0->add_floatvalue(v0); 18556 18557 // call function 18558 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18559 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18560 glContext->hooks->gl.glProgramUniform1fEXT(program, location, v0); 18561 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18562 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18563 18564 void *pointerArgs[] = { 18565 }; 18566 18567 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18568 threadStartTime, threadEndTime, 18569 &glmsg, pointerArgs); 18570 glContext->traceGLMessage(&glmsg); 18571 } 18572 18573 void GLTrace_glProgramUniform1fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 18574 GLMessage glmsg; 18575 GLTraceContext *glContext = getGLTraceContext(); 18576 18577 glmsg.set_function(GLMessage::glProgramUniform1fvEXT); 18578 18579 // copy argument program 18580 GLMessage_DataType *arg_program = glmsg.add_args(); 18581 arg_program->set_isarray(false); 18582 arg_program->set_type(GLMessage::DataType::INT); 18583 arg_program->add_intvalue(program); 18584 18585 // copy argument location 18586 GLMessage_DataType *arg_location = glmsg.add_args(); 18587 arg_location->set_isarray(false); 18588 arg_location->set_type(GLMessage::DataType::INT); 18589 arg_location->add_intvalue(location); 18590 18591 // copy argument count 18592 GLMessage_DataType *arg_count = glmsg.add_args(); 18593 arg_count->set_isarray(false); 18594 arg_count->set_type(GLMessage::DataType::INT); 18595 arg_count->add_intvalue(count); 18596 18597 // copy argument value 18598 GLMessage_DataType *arg_value = glmsg.add_args(); 18599 arg_value->set_isarray(false); 18600 arg_value->set_type(GLMessage::DataType::INT64); 18601 arg_value->add_int64value((uintptr_t)value); 18602 18603 // call function 18604 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18605 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18606 glContext->hooks->gl.glProgramUniform1fvEXT(program, location, count, value); 18607 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18608 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18609 18610 void *pointerArgs[] = { 18611 (void *) value, 18612 }; 18613 18614 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18615 threadStartTime, threadEndTime, 18616 &glmsg, pointerArgs); 18617 glContext->traceGLMessage(&glmsg); 18618 } 18619 18620 void GLTrace_glProgramUniform1iEXT(GLuint program, GLint location, GLint v0) { 18621 GLMessage glmsg; 18622 GLTraceContext *glContext = getGLTraceContext(); 18623 18624 glmsg.set_function(GLMessage::glProgramUniform1iEXT); 18625 18626 // copy argument program 18627 GLMessage_DataType *arg_program = glmsg.add_args(); 18628 arg_program->set_isarray(false); 18629 arg_program->set_type(GLMessage::DataType::INT); 18630 arg_program->add_intvalue(program); 18631 18632 // copy argument location 18633 GLMessage_DataType *arg_location = glmsg.add_args(); 18634 arg_location->set_isarray(false); 18635 arg_location->set_type(GLMessage::DataType::INT); 18636 arg_location->add_intvalue(location); 18637 18638 // copy argument v0 18639 GLMessage_DataType *arg_v0 = glmsg.add_args(); 18640 arg_v0->set_isarray(false); 18641 arg_v0->set_type(GLMessage::DataType::INT); 18642 arg_v0->add_intvalue(v0); 18643 18644 // call function 18645 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18646 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18647 glContext->hooks->gl.glProgramUniform1iEXT(program, location, v0); 18648 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18649 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18650 18651 void *pointerArgs[] = { 18652 }; 18653 18654 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18655 threadStartTime, threadEndTime, 18656 &glmsg, pointerArgs); 18657 glContext->traceGLMessage(&glmsg); 18658 } 18659 18660 void GLTrace_glProgramUniform1ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) { 18661 GLMessage glmsg; 18662 GLTraceContext *glContext = getGLTraceContext(); 18663 18664 glmsg.set_function(GLMessage::glProgramUniform1ivEXT); 18665 18666 // copy argument program 18667 GLMessage_DataType *arg_program = glmsg.add_args(); 18668 arg_program->set_isarray(false); 18669 arg_program->set_type(GLMessage::DataType::INT); 18670 arg_program->add_intvalue(program); 18671 18672 // copy argument location 18673 GLMessage_DataType *arg_location = glmsg.add_args(); 18674 arg_location->set_isarray(false); 18675 arg_location->set_type(GLMessage::DataType::INT); 18676 arg_location->add_intvalue(location); 18677 18678 // copy argument count 18679 GLMessage_DataType *arg_count = glmsg.add_args(); 18680 arg_count->set_isarray(false); 18681 arg_count->set_type(GLMessage::DataType::INT); 18682 arg_count->add_intvalue(count); 18683 18684 // copy argument value 18685 GLMessage_DataType *arg_value = glmsg.add_args(); 18686 arg_value->set_isarray(false); 18687 arg_value->set_type(GLMessage::DataType::INT64); 18688 arg_value->add_int64value((uintptr_t)value); 18689 18690 // call function 18691 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18692 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18693 glContext->hooks->gl.glProgramUniform1ivEXT(program, location, count, value); 18694 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18695 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18696 18697 void *pointerArgs[] = { 18698 (void *) value, 18699 }; 18700 18701 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18702 threadStartTime, threadEndTime, 18703 &glmsg, pointerArgs); 18704 glContext->traceGLMessage(&glmsg); 18705 } 18706 18707 void GLTrace_glProgramUniform2fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1) { 18708 GLMessage glmsg; 18709 GLTraceContext *glContext = getGLTraceContext(); 18710 18711 glmsg.set_function(GLMessage::glProgramUniform2fEXT); 18712 18713 // copy argument program 18714 GLMessage_DataType *arg_program = glmsg.add_args(); 18715 arg_program->set_isarray(false); 18716 arg_program->set_type(GLMessage::DataType::INT); 18717 arg_program->add_intvalue(program); 18718 18719 // copy argument location 18720 GLMessage_DataType *arg_location = glmsg.add_args(); 18721 arg_location->set_isarray(false); 18722 arg_location->set_type(GLMessage::DataType::INT); 18723 arg_location->add_intvalue(location); 18724 18725 // copy argument v0 18726 GLMessage_DataType *arg_v0 = glmsg.add_args(); 18727 arg_v0->set_isarray(false); 18728 arg_v0->set_type(GLMessage::DataType::FLOAT); 18729 arg_v0->add_floatvalue(v0); 18730 18731 // copy argument v1 18732 GLMessage_DataType *arg_v1 = glmsg.add_args(); 18733 arg_v1->set_isarray(false); 18734 arg_v1->set_type(GLMessage::DataType::FLOAT); 18735 arg_v1->add_floatvalue(v1); 18736 18737 // call function 18738 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18739 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18740 glContext->hooks->gl.glProgramUniform2fEXT(program, location, v0, v1); 18741 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18742 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18743 18744 void *pointerArgs[] = { 18745 }; 18746 18747 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18748 threadStartTime, threadEndTime, 18749 &glmsg, pointerArgs); 18750 glContext->traceGLMessage(&glmsg); 18751 } 18752 18753 void GLTrace_glProgramUniform2fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 18754 GLMessage glmsg; 18755 GLTraceContext *glContext = getGLTraceContext(); 18756 18757 glmsg.set_function(GLMessage::glProgramUniform2fvEXT); 18758 18759 // copy argument program 18760 GLMessage_DataType *arg_program = glmsg.add_args(); 18761 arg_program->set_isarray(false); 18762 arg_program->set_type(GLMessage::DataType::INT); 18763 arg_program->add_intvalue(program); 18764 18765 // copy argument location 18766 GLMessage_DataType *arg_location = glmsg.add_args(); 18767 arg_location->set_isarray(false); 18768 arg_location->set_type(GLMessage::DataType::INT); 18769 arg_location->add_intvalue(location); 18770 18771 // copy argument count 18772 GLMessage_DataType *arg_count = glmsg.add_args(); 18773 arg_count->set_isarray(false); 18774 arg_count->set_type(GLMessage::DataType::INT); 18775 arg_count->add_intvalue(count); 18776 18777 // copy argument value 18778 GLMessage_DataType *arg_value = glmsg.add_args(); 18779 arg_value->set_isarray(false); 18780 arg_value->set_type(GLMessage::DataType::INT64); 18781 arg_value->add_int64value((uintptr_t)value); 18782 18783 // call function 18784 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18785 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18786 glContext->hooks->gl.glProgramUniform2fvEXT(program, location, count, value); 18787 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18788 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18789 18790 void *pointerArgs[] = { 18791 (void *) value, 18792 }; 18793 18794 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18795 threadStartTime, threadEndTime, 18796 &glmsg, pointerArgs); 18797 glContext->traceGLMessage(&glmsg); 18798 } 18799 18800 void GLTrace_glProgramUniform2iEXT(GLuint program, GLint location, GLint v0, GLint v1) { 18801 GLMessage glmsg; 18802 GLTraceContext *glContext = getGLTraceContext(); 18803 18804 glmsg.set_function(GLMessage::glProgramUniform2iEXT); 18805 18806 // copy argument program 18807 GLMessage_DataType *arg_program = glmsg.add_args(); 18808 arg_program->set_isarray(false); 18809 arg_program->set_type(GLMessage::DataType::INT); 18810 arg_program->add_intvalue(program); 18811 18812 // copy argument location 18813 GLMessage_DataType *arg_location = glmsg.add_args(); 18814 arg_location->set_isarray(false); 18815 arg_location->set_type(GLMessage::DataType::INT); 18816 arg_location->add_intvalue(location); 18817 18818 // copy argument v0 18819 GLMessage_DataType *arg_v0 = glmsg.add_args(); 18820 arg_v0->set_isarray(false); 18821 arg_v0->set_type(GLMessage::DataType::INT); 18822 arg_v0->add_intvalue(v0); 18823 18824 // copy argument v1 18825 GLMessage_DataType *arg_v1 = glmsg.add_args(); 18826 arg_v1->set_isarray(false); 18827 arg_v1->set_type(GLMessage::DataType::INT); 18828 arg_v1->add_intvalue(v1); 18829 18830 // call function 18831 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18832 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18833 glContext->hooks->gl.glProgramUniform2iEXT(program, location, v0, v1); 18834 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18835 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18836 18837 void *pointerArgs[] = { 18838 }; 18839 18840 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18841 threadStartTime, threadEndTime, 18842 &glmsg, pointerArgs); 18843 glContext->traceGLMessage(&glmsg); 18844 } 18845 18846 void GLTrace_glProgramUniform2ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) { 18847 GLMessage glmsg; 18848 GLTraceContext *glContext = getGLTraceContext(); 18849 18850 glmsg.set_function(GLMessage::glProgramUniform2ivEXT); 18851 18852 // copy argument program 18853 GLMessage_DataType *arg_program = glmsg.add_args(); 18854 arg_program->set_isarray(false); 18855 arg_program->set_type(GLMessage::DataType::INT); 18856 arg_program->add_intvalue(program); 18857 18858 // copy argument location 18859 GLMessage_DataType *arg_location = glmsg.add_args(); 18860 arg_location->set_isarray(false); 18861 arg_location->set_type(GLMessage::DataType::INT); 18862 arg_location->add_intvalue(location); 18863 18864 // copy argument count 18865 GLMessage_DataType *arg_count = glmsg.add_args(); 18866 arg_count->set_isarray(false); 18867 arg_count->set_type(GLMessage::DataType::INT); 18868 arg_count->add_intvalue(count); 18869 18870 // copy argument value 18871 GLMessage_DataType *arg_value = glmsg.add_args(); 18872 arg_value->set_isarray(false); 18873 arg_value->set_type(GLMessage::DataType::INT64); 18874 arg_value->add_int64value((uintptr_t)value); 18875 18876 // call function 18877 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18878 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18879 glContext->hooks->gl.glProgramUniform2ivEXT(program, location, count, value); 18880 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18881 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18882 18883 void *pointerArgs[] = { 18884 (void *) value, 18885 }; 18886 18887 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18888 threadStartTime, threadEndTime, 18889 &glmsg, pointerArgs); 18890 glContext->traceGLMessage(&glmsg); 18891 } 18892 18893 void GLTrace_glProgramUniform3fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2) { 18894 GLMessage glmsg; 18895 GLTraceContext *glContext = getGLTraceContext(); 18896 18897 glmsg.set_function(GLMessage::glProgramUniform3fEXT); 18898 18899 // copy argument program 18900 GLMessage_DataType *arg_program = glmsg.add_args(); 18901 arg_program->set_isarray(false); 18902 arg_program->set_type(GLMessage::DataType::INT); 18903 arg_program->add_intvalue(program); 18904 18905 // copy argument location 18906 GLMessage_DataType *arg_location = glmsg.add_args(); 18907 arg_location->set_isarray(false); 18908 arg_location->set_type(GLMessage::DataType::INT); 18909 arg_location->add_intvalue(location); 18910 18911 // copy argument v0 18912 GLMessage_DataType *arg_v0 = glmsg.add_args(); 18913 arg_v0->set_isarray(false); 18914 arg_v0->set_type(GLMessage::DataType::FLOAT); 18915 arg_v0->add_floatvalue(v0); 18916 18917 // copy argument v1 18918 GLMessage_DataType *arg_v1 = glmsg.add_args(); 18919 arg_v1->set_isarray(false); 18920 arg_v1->set_type(GLMessage::DataType::FLOAT); 18921 arg_v1->add_floatvalue(v1); 18922 18923 // copy argument v2 18924 GLMessage_DataType *arg_v2 = glmsg.add_args(); 18925 arg_v2->set_isarray(false); 18926 arg_v2->set_type(GLMessage::DataType::FLOAT); 18927 arg_v2->add_floatvalue(v2); 18928 18929 // call function 18930 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18931 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18932 glContext->hooks->gl.glProgramUniform3fEXT(program, location, v0, v1, v2); 18933 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18934 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18935 18936 void *pointerArgs[] = { 18937 }; 18938 18939 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18940 threadStartTime, threadEndTime, 18941 &glmsg, pointerArgs); 18942 glContext->traceGLMessage(&glmsg); 18943 } 18944 18945 void GLTrace_glProgramUniform3fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 18946 GLMessage glmsg; 18947 GLTraceContext *glContext = getGLTraceContext(); 18948 18949 glmsg.set_function(GLMessage::glProgramUniform3fvEXT); 18950 18951 // copy argument program 18952 GLMessage_DataType *arg_program = glmsg.add_args(); 18953 arg_program->set_isarray(false); 18954 arg_program->set_type(GLMessage::DataType::INT); 18955 arg_program->add_intvalue(program); 18956 18957 // copy argument location 18958 GLMessage_DataType *arg_location = glmsg.add_args(); 18959 arg_location->set_isarray(false); 18960 arg_location->set_type(GLMessage::DataType::INT); 18961 arg_location->add_intvalue(location); 18962 18963 // copy argument count 18964 GLMessage_DataType *arg_count = glmsg.add_args(); 18965 arg_count->set_isarray(false); 18966 arg_count->set_type(GLMessage::DataType::INT); 18967 arg_count->add_intvalue(count); 18968 18969 // copy argument value 18970 GLMessage_DataType *arg_value = glmsg.add_args(); 18971 arg_value->set_isarray(false); 18972 arg_value->set_type(GLMessage::DataType::INT64); 18973 arg_value->add_int64value((uintptr_t)value); 18974 18975 // call function 18976 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 18977 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 18978 glContext->hooks->gl.glProgramUniform3fvEXT(program, location, count, value); 18979 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 18980 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 18981 18982 void *pointerArgs[] = { 18983 (void *) value, 18984 }; 18985 18986 fixupGLMessage(glContext, wallStartTime, wallEndTime, 18987 threadStartTime, threadEndTime, 18988 &glmsg, pointerArgs); 18989 glContext->traceGLMessage(&glmsg); 18990 } 18991 18992 void GLTrace_glProgramUniform3iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2) { 18993 GLMessage glmsg; 18994 GLTraceContext *glContext = getGLTraceContext(); 18995 18996 glmsg.set_function(GLMessage::glProgramUniform3iEXT); 18997 18998 // copy argument program 18999 GLMessage_DataType *arg_program = glmsg.add_args(); 19000 arg_program->set_isarray(false); 19001 arg_program->set_type(GLMessage::DataType::INT); 19002 arg_program->add_intvalue(program); 19003 19004 // copy argument location 19005 GLMessage_DataType *arg_location = glmsg.add_args(); 19006 arg_location->set_isarray(false); 19007 arg_location->set_type(GLMessage::DataType::INT); 19008 arg_location->add_intvalue(location); 19009 19010 // copy argument v0 19011 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19012 arg_v0->set_isarray(false); 19013 arg_v0->set_type(GLMessage::DataType::INT); 19014 arg_v0->add_intvalue(v0); 19015 19016 // copy argument v1 19017 GLMessage_DataType *arg_v1 = glmsg.add_args(); 19018 arg_v1->set_isarray(false); 19019 arg_v1->set_type(GLMessage::DataType::INT); 19020 arg_v1->add_intvalue(v1); 19021 19022 // copy argument v2 19023 GLMessage_DataType *arg_v2 = glmsg.add_args(); 19024 arg_v2->set_isarray(false); 19025 arg_v2->set_type(GLMessage::DataType::INT); 19026 arg_v2->add_intvalue(v2); 19027 19028 // call function 19029 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19030 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19031 glContext->hooks->gl.glProgramUniform3iEXT(program, location, v0, v1, v2); 19032 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19033 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19034 19035 void *pointerArgs[] = { 19036 }; 19037 19038 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19039 threadStartTime, threadEndTime, 19040 &glmsg, pointerArgs); 19041 glContext->traceGLMessage(&glmsg); 19042 } 19043 19044 void GLTrace_glProgramUniform3ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) { 19045 GLMessage glmsg; 19046 GLTraceContext *glContext = getGLTraceContext(); 19047 19048 glmsg.set_function(GLMessage::glProgramUniform3ivEXT); 19049 19050 // copy argument program 19051 GLMessage_DataType *arg_program = glmsg.add_args(); 19052 arg_program->set_isarray(false); 19053 arg_program->set_type(GLMessage::DataType::INT); 19054 arg_program->add_intvalue(program); 19055 19056 // copy argument location 19057 GLMessage_DataType *arg_location = glmsg.add_args(); 19058 arg_location->set_isarray(false); 19059 arg_location->set_type(GLMessage::DataType::INT); 19060 arg_location->add_intvalue(location); 19061 19062 // copy argument count 19063 GLMessage_DataType *arg_count = glmsg.add_args(); 19064 arg_count->set_isarray(false); 19065 arg_count->set_type(GLMessage::DataType::INT); 19066 arg_count->add_intvalue(count); 19067 19068 // copy argument value 19069 GLMessage_DataType *arg_value = glmsg.add_args(); 19070 arg_value->set_isarray(false); 19071 arg_value->set_type(GLMessage::DataType::INT64); 19072 arg_value->add_int64value((uintptr_t)value); 19073 19074 // call function 19075 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19076 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19077 glContext->hooks->gl.glProgramUniform3ivEXT(program, location, count, value); 19078 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19079 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19080 19081 void *pointerArgs[] = { 19082 (void *) value, 19083 }; 19084 19085 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19086 threadStartTime, threadEndTime, 19087 &glmsg, pointerArgs); 19088 glContext->traceGLMessage(&glmsg); 19089 } 19090 19091 void GLTrace_glProgramUniform4fEXT(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { 19092 GLMessage glmsg; 19093 GLTraceContext *glContext = getGLTraceContext(); 19094 19095 glmsg.set_function(GLMessage::glProgramUniform4fEXT); 19096 19097 // copy argument program 19098 GLMessage_DataType *arg_program = glmsg.add_args(); 19099 arg_program->set_isarray(false); 19100 arg_program->set_type(GLMessage::DataType::INT); 19101 arg_program->add_intvalue(program); 19102 19103 // copy argument location 19104 GLMessage_DataType *arg_location = glmsg.add_args(); 19105 arg_location->set_isarray(false); 19106 arg_location->set_type(GLMessage::DataType::INT); 19107 arg_location->add_intvalue(location); 19108 19109 // copy argument v0 19110 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19111 arg_v0->set_isarray(false); 19112 arg_v0->set_type(GLMessage::DataType::FLOAT); 19113 arg_v0->add_floatvalue(v0); 19114 19115 // copy argument v1 19116 GLMessage_DataType *arg_v1 = glmsg.add_args(); 19117 arg_v1->set_isarray(false); 19118 arg_v1->set_type(GLMessage::DataType::FLOAT); 19119 arg_v1->add_floatvalue(v1); 19120 19121 // copy argument v2 19122 GLMessage_DataType *arg_v2 = glmsg.add_args(); 19123 arg_v2->set_isarray(false); 19124 arg_v2->set_type(GLMessage::DataType::FLOAT); 19125 arg_v2->add_floatvalue(v2); 19126 19127 // copy argument v3 19128 GLMessage_DataType *arg_v3 = glmsg.add_args(); 19129 arg_v3->set_isarray(false); 19130 arg_v3->set_type(GLMessage::DataType::FLOAT); 19131 arg_v3->add_floatvalue(v3); 19132 19133 // call function 19134 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19135 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19136 glContext->hooks->gl.glProgramUniform4fEXT(program, location, v0, v1, v2, v3); 19137 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19138 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19139 19140 void *pointerArgs[] = { 19141 }; 19142 19143 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19144 threadStartTime, threadEndTime, 19145 &glmsg, pointerArgs); 19146 glContext->traceGLMessage(&glmsg); 19147 } 19148 19149 void GLTrace_glProgramUniform4fvEXT(GLuint program, GLint location, GLsizei count, const GLfloat * value) { 19150 GLMessage glmsg; 19151 GLTraceContext *glContext = getGLTraceContext(); 19152 19153 glmsg.set_function(GLMessage::glProgramUniform4fvEXT); 19154 19155 // copy argument program 19156 GLMessage_DataType *arg_program = glmsg.add_args(); 19157 arg_program->set_isarray(false); 19158 arg_program->set_type(GLMessage::DataType::INT); 19159 arg_program->add_intvalue(program); 19160 19161 // copy argument location 19162 GLMessage_DataType *arg_location = glmsg.add_args(); 19163 arg_location->set_isarray(false); 19164 arg_location->set_type(GLMessage::DataType::INT); 19165 arg_location->add_intvalue(location); 19166 19167 // copy argument count 19168 GLMessage_DataType *arg_count = glmsg.add_args(); 19169 arg_count->set_isarray(false); 19170 arg_count->set_type(GLMessage::DataType::INT); 19171 arg_count->add_intvalue(count); 19172 19173 // copy argument value 19174 GLMessage_DataType *arg_value = glmsg.add_args(); 19175 arg_value->set_isarray(false); 19176 arg_value->set_type(GLMessage::DataType::INT64); 19177 arg_value->add_int64value((uintptr_t)value); 19178 19179 // call function 19180 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19181 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19182 glContext->hooks->gl.glProgramUniform4fvEXT(program, location, count, value); 19183 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19184 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19185 19186 void *pointerArgs[] = { 19187 (void *) value, 19188 }; 19189 19190 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19191 threadStartTime, threadEndTime, 19192 &glmsg, pointerArgs); 19193 glContext->traceGLMessage(&glmsg); 19194 } 19195 19196 void GLTrace_glProgramUniform4iEXT(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3) { 19197 GLMessage glmsg; 19198 GLTraceContext *glContext = getGLTraceContext(); 19199 19200 glmsg.set_function(GLMessage::glProgramUniform4iEXT); 19201 19202 // copy argument program 19203 GLMessage_DataType *arg_program = glmsg.add_args(); 19204 arg_program->set_isarray(false); 19205 arg_program->set_type(GLMessage::DataType::INT); 19206 arg_program->add_intvalue(program); 19207 19208 // copy argument location 19209 GLMessage_DataType *arg_location = glmsg.add_args(); 19210 arg_location->set_isarray(false); 19211 arg_location->set_type(GLMessage::DataType::INT); 19212 arg_location->add_intvalue(location); 19213 19214 // copy argument v0 19215 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19216 arg_v0->set_isarray(false); 19217 arg_v0->set_type(GLMessage::DataType::INT); 19218 arg_v0->add_intvalue(v0); 19219 19220 // copy argument v1 19221 GLMessage_DataType *arg_v1 = glmsg.add_args(); 19222 arg_v1->set_isarray(false); 19223 arg_v1->set_type(GLMessage::DataType::INT); 19224 arg_v1->add_intvalue(v1); 19225 19226 // copy argument v2 19227 GLMessage_DataType *arg_v2 = glmsg.add_args(); 19228 arg_v2->set_isarray(false); 19229 arg_v2->set_type(GLMessage::DataType::INT); 19230 arg_v2->add_intvalue(v2); 19231 19232 // copy argument v3 19233 GLMessage_DataType *arg_v3 = glmsg.add_args(); 19234 arg_v3->set_isarray(false); 19235 arg_v3->set_type(GLMessage::DataType::INT); 19236 arg_v3->add_intvalue(v3); 19237 19238 // call function 19239 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19240 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19241 glContext->hooks->gl.glProgramUniform4iEXT(program, location, v0, v1, v2, v3); 19242 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19243 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19244 19245 void *pointerArgs[] = { 19246 }; 19247 19248 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19249 threadStartTime, threadEndTime, 19250 &glmsg, pointerArgs); 19251 glContext->traceGLMessage(&glmsg); 19252 } 19253 19254 void GLTrace_glProgramUniform4ivEXT(GLuint program, GLint location, GLsizei count, const GLint * value) { 19255 GLMessage glmsg; 19256 GLTraceContext *glContext = getGLTraceContext(); 19257 19258 glmsg.set_function(GLMessage::glProgramUniform4ivEXT); 19259 19260 // copy argument program 19261 GLMessage_DataType *arg_program = glmsg.add_args(); 19262 arg_program->set_isarray(false); 19263 arg_program->set_type(GLMessage::DataType::INT); 19264 arg_program->add_intvalue(program); 19265 19266 // copy argument location 19267 GLMessage_DataType *arg_location = glmsg.add_args(); 19268 arg_location->set_isarray(false); 19269 arg_location->set_type(GLMessage::DataType::INT); 19270 arg_location->add_intvalue(location); 19271 19272 // copy argument count 19273 GLMessage_DataType *arg_count = glmsg.add_args(); 19274 arg_count->set_isarray(false); 19275 arg_count->set_type(GLMessage::DataType::INT); 19276 arg_count->add_intvalue(count); 19277 19278 // copy argument value 19279 GLMessage_DataType *arg_value = glmsg.add_args(); 19280 arg_value->set_isarray(false); 19281 arg_value->set_type(GLMessage::DataType::INT64); 19282 arg_value->add_int64value((uintptr_t)value); 19283 19284 // call function 19285 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19286 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19287 glContext->hooks->gl.glProgramUniform4ivEXT(program, location, count, value); 19288 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19289 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19290 19291 void *pointerArgs[] = { 19292 (void *) value, 19293 }; 19294 19295 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19296 threadStartTime, threadEndTime, 19297 &glmsg, pointerArgs); 19298 glContext->traceGLMessage(&glmsg); 19299 } 19300 19301 void GLTrace_glProgramUniformMatrix2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 19302 GLMessage glmsg; 19303 GLTraceContext *glContext = getGLTraceContext(); 19304 19305 glmsg.set_function(GLMessage::glProgramUniformMatrix2fvEXT); 19306 19307 // copy argument program 19308 GLMessage_DataType *arg_program = glmsg.add_args(); 19309 arg_program->set_isarray(false); 19310 arg_program->set_type(GLMessage::DataType::INT); 19311 arg_program->add_intvalue(program); 19312 19313 // copy argument location 19314 GLMessage_DataType *arg_location = glmsg.add_args(); 19315 arg_location->set_isarray(false); 19316 arg_location->set_type(GLMessage::DataType::INT); 19317 arg_location->add_intvalue(location); 19318 19319 // copy argument count 19320 GLMessage_DataType *arg_count = glmsg.add_args(); 19321 arg_count->set_isarray(false); 19322 arg_count->set_type(GLMessage::DataType::INT); 19323 arg_count->add_intvalue(count); 19324 19325 // copy argument transpose 19326 GLMessage_DataType *arg_transpose = glmsg.add_args(); 19327 arg_transpose->set_isarray(false); 19328 arg_transpose->set_type(GLMessage::DataType::BOOL); 19329 arg_transpose->add_boolvalue(transpose); 19330 19331 // copy argument value 19332 GLMessage_DataType *arg_value = glmsg.add_args(); 19333 arg_value->set_isarray(false); 19334 arg_value->set_type(GLMessage::DataType::INT64); 19335 arg_value->add_int64value((uintptr_t)value); 19336 19337 // call function 19338 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19339 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19340 glContext->hooks->gl.glProgramUniformMatrix2fvEXT(program, location, count, transpose, value); 19341 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19342 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19343 19344 void *pointerArgs[] = { 19345 (void *) value, 19346 }; 19347 19348 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19349 threadStartTime, threadEndTime, 19350 &glmsg, pointerArgs); 19351 glContext->traceGLMessage(&glmsg); 19352 } 19353 19354 void GLTrace_glProgramUniformMatrix3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 19355 GLMessage glmsg; 19356 GLTraceContext *glContext = getGLTraceContext(); 19357 19358 glmsg.set_function(GLMessage::glProgramUniformMatrix3fvEXT); 19359 19360 // copy argument program 19361 GLMessage_DataType *arg_program = glmsg.add_args(); 19362 arg_program->set_isarray(false); 19363 arg_program->set_type(GLMessage::DataType::INT); 19364 arg_program->add_intvalue(program); 19365 19366 // copy argument location 19367 GLMessage_DataType *arg_location = glmsg.add_args(); 19368 arg_location->set_isarray(false); 19369 arg_location->set_type(GLMessage::DataType::INT); 19370 arg_location->add_intvalue(location); 19371 19372 // copy argument count 19373 GLMessage_DataType *arg_count = glmsg.add_args(); 19374 arg_count->set_isarray(false); 19375 arg_count->set_type(GLMessage::DataType::INT); 19376 arg_count->add_intvalue(count); 19377 19378 // copy argument transpose 19379 GLMessage_DataType *arg_transpose = glmsg.add_args(); 19380 arg_transpose->set_isarray(false); 19381 arg_transpose->set_type(GLMessage::DataType::BOOL); 19382 arg_transpose->add_boolvalue(transpose); 19383 19384 // copy argument value 19385 GLMessage_DataType *arg_value = glmsg.add_args(); 19386 arg_value->set_isarray(false); 19387 arg_value->set_type(GLMessage::DataType::INT64); 19388 arg_value->add_int64value((uintptr_t)value); 19389 19390 // call function 19391 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19392 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19393 glContext->hooks->gl.glProgramUniformMatrix3fvEXT(program, location, count, transpose, value); 19394 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19395 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19396 19397 void *pointerArgs[] = { 19398 (void *) value, 19399 }; 19400 19401 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19402 threadStartTime, threadEndTime, 19403 &glmsg, pointerArgs); 19404 glContext->traceGLMessage(&glmsg); 19405 } 19406 19407 void GLTrace_glProgramUniformMatrix4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 19408 GLMessage glmsg; 19409 GLTraceContext *glContext = getGLTraceContext(); 19410 19411 glmsg.set_function(GLMessage::glProgramUniformMatrix4fvEXT); 19412 19413 // copy argument program 19414 GLMessage_DataType *arg_program = glmsg.add_args(); 19415 arg_program->set_isarray(false); 19416 arg_program->set_type(GLMessage::DataType::INT); 19417 arg_program->add_intvalue(program); 19418 19419 // copy argument location 19420 GLMessage_DataType *arg_location = glmsg.add_args(); 19421 arg_location->set_isarray(false); 19422 arg_location->set_type(GLMessage::DataType::INT); 19423 arg_location->add_intvalue(location); 19424 19425 // copy argument count 19426 GLMessage_DataType *arg_count = glmsg.add_args(); 19427 arg_count->set_isarray(false); 19428 arg_count->set_type(GLMessage::DataType::INT); 19429 arg_count->add_intvalue(count); 19430 19431 // copy argument transpose 19432 GLMessage_DataType *arg_transpose = glmsg.add_args(); 19433 arg_transpose->set_isarray(false); 19434 arg_transpose->set_type(GLMessage::DataType::BOOL); 19435 arg_transpose->add_boolvalue(transpose); 19436 19437 // copy argument value 19438 GLMessage_DataType *arg_value = glmsg.add_args(); 19439 arg_value->set_isarray(false); 19440 arg_value->set_type(GLMessage::DataType::INT64); 19441 arg_value->add_int64value((uintptr_t)value); 19442 19443 // call function 19444 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19445 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19446 glContext->hooks->gl.glProgramUniformMatrix4fvEXT(program, location, count, transpose, value); 19447 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19448 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19449 19450 void *pointerArgs[] = { 19451 (void *) value, 19452 }; 19453 19454 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19455 threadStartTime, threadEndTime, 19456 &glmsg, pointerArgs); 19457 glContext->traceGLMessage(&glmsg); 19458 } 19459 19460 void GLTrace_glUseProgramStagesEXT(GLuint pipeline, GLbitfield stages, GLuint program) { 19461 GLMessage glmsg; 19462 GLTraceContext *glContext = getGLTraceContext(); 19463 19464 glmsg.set_function(GLMessage::glUseProgramStagesEXT); 19465 19466 // copy argument pipeline 19467 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 19468 arg_pipeline->set_isarray(false); 19469 arg_pipeline->set_type(GLMessage::DataType::INT); 19470 arg_pipeline->add_intvalue(pipeline); 19471 19472 // copy argument stages 19473 GLMessage_DataType *arg_stages = glmsg.add_args(); 19474 arg_stages->set_isarray(false); 19475 arg_stages->set_type(GLMessage::DataType::INT); 19476 arg_stages->add_intvalue(stages); 19477 19478 // copy argument program 19479 GLMessage_DataType *arg_program = glmsg.add_args(); 19480 arg_program->set_isarray(false); 19481 arg_program->set_type(GLMessage::DataType::INT); 19482 arg_program->add_intvalue(program); 19483 19484 // call function 19485 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19486 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19487 glContext->hooks->gl.glUseProgramStagesEXT(pipeline, stages, program); 19488 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19489 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19490 19491 void *pointerArgs[] = { 19492 }; 19493 19494 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19495 threadStartTime, threadEndTime, 19496 &glmsg, pointerArgs); 19497 glContext->traceGLMessage(&glmsg); 19498 } 19499 19500 void GLTrace_glValidateProgramPipelineEXT(GLuint pipeline) { 19501 GLMessage glmsg; 19502 GLTraceContext *glContext = getGLTraceContext(); 19503 19504 glmsg.set_function(GLMessage::glValidateProgramPipelineEXT); 19505 19506 // copy argument pipeline 19507 GLMessage_DataType *arg_pipeline = glmsg.add_args(); 19508 arg_pipeline->set_isarray(false); 19509 arg_pipeline->set_type(GLMessage::DataType::INT); 19510 arg_pipeline->add_intvalue(pipeline); 19511 19512 // call function 19513 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19514 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19515 glContext->hooks->gl.glValidateProgramPipelineEXT(pipeline); 19516 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19517 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19518 19519 void *pointerArgs[] = { 19520 }; 19521 19522 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19523 threadStartTime, threadEndTime, 19524 &glmsg, pointerArgs); 19525 glContext->traceGLMessage(&glmsg); 19526 } 19527 19528 void GLTrace_glProgramUniform1uiEXT(GLuint program, GLint location, GLuint v0) { 19529 GLMessage glmsg; 19530 GLTraceContext *glContext = getGLTraceContext(); 19531 19532 glmsg.set_function(GLMessage::glProgramUniform1uiEXT); 19533 19534 // copy argument program 19535 GLMessage_DataType *arg_program = glmsg.add_args(); 19536 arg_program->set_isarray(false); 19537 arg_program->set_type(GLMessage::DataType::INT); 19538 arg_program->add_intvalue(program); 19539 19540 // copy argument location 19541 GLMessage_DataType *arg_location = glmsg.add_args(); 19542 arg_location->set_isarray(false); 19543 arg_location->set_type(GLMessage::DataType::INT); 19544 arg_location->add_intvalue(location); 19545 19546 // copy argument v0 19547 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19548 arg_v0->set_isarray(false); 19549 arg_v0->set_type(GLMessage::DataType::INT); 19550 arg_v0->add_intvalue(v0); 19551 19552 // call function 19553 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19554 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19555 glContext->hooks->gl.glProgramUniform1uiEXT(program, location, v0); 19556 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19557 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19558 19559 void *pointerArgs[] = { 19560 }; 19561 19562 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19563 threadStartTime, threadEndTime, 19564 &glmsg, pointerArgs); 19565 glContext->traceGLMessage(&glmsg); 19566 } 19567 19568 void GLTrace_glProgramUniform2uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1) { 19569 GLMessage glmsg; 19570 GLTraceContext *glContext = getGLTraceContext(); 19571 19572 glmsg.set_function(GLMessage::glProgramUniform2uiEXT); 19573 19574 // copy argument program 19575 GLMessage_DataType *arg_program = glmsg.add_args(); 19576 arg_program->set_isarray(false); 19577 arg_program->set_type(GLMessage::DataType::INT); 19578 arg_program->add_intvalue(program); 19579 19580 // copy argument location 19581 GLMessage_DataType *arg_location = glmsg.add_args(); 19582 arg_location->set_isarray(false); 19583 arg_location->set_type(GLMessage::DataType::INT); 19584 arg_location->add_intvalue(location); 19585 19586 // copy argument v0 19587 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19588 arg_v0->set_isarray(false); 19589 arg_v0->set_type(GLMessage::DataType::INT); 19590 arg_v0->add_intvalue(v0); 19591 19592 // copy argument v1 19593 GLMessage_DataType *arg_v1 = glmsg.add_args(); 19594 arg_v1->set_isarray(false); 19595 arg_v1->set_type(GLMessage::DataType::INT); 19596 arg_v1->add_intvalue(v1); 19597 19598 // call function 19599 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19600 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19601 glContext->hooks->gl.glProgramUniform2uiEXT(program, location, v0, v1); 19602 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19603 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19604 19605 void *pointerArgs[] = { 19606 }; 19607 19608 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19609 threadStartTime, threadEndTime, 19610 &glmsg, pointerArgs); 19611 glContext->traceGLMessage(&glmsg); 19612 } 19613 19614 void GLTrace_glProgramUniform3uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2) { 19615 GLMessage glmsg; 19616 GLTraceContext *glContext = getGLTraceContext(); 19617 19618 glmsg.set_function(GLMessage::glProgramUniform3uiEXT); 19619 19620 // copy argument program 19621 GLMessage_DataType *arg_program = glmsg.add_args(); 19622 arg_program->set_isarray(false); 19623 arg_program->set_type(GLMessage::DataType::INT); 19624 arg_program->add_intvalue(program); 19625 19626 // copy argument location 19627 GLMessage_DataType *arg_location = glmsg.add_args(); 19628 arg_location->set_isarray(false); 19629 arg_location->set_type(GLMessage::DataType::INT); 19630 arg_location->add_intvalue(location); 19631 19632 // copy argument v0 19633 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19634 arg_v0->set_isarray(false); 19635 arg_v0->set_type(GLMessage::DataType::INT); 19636 arg_v0->add_intvalue(v0); 19637 19638 // copy argument v1 19639 GLMessage_DataType *arg_v1 = glmsg.add_args(); 19640 arg_v1->set_isarray(false); 19641 arg_v1->set_type(GLMessage::DataType::INT); 19642 arg_v1->add_intvalue(v1); 19643 19644 // copy argument v2 19645 GLMessage_DataType *arg_v2 = glmsg.add_args(); 19646 arg_v2->set_isarray(false); 19647 arg_v2->set_type(GLMessage::DataType::INT); 19648 arg_v2->add_intvalue(v2); 19649 19650 // call function 19651 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19652 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19653 glContext->hooks->gl.glProgramUniform3uiEXT(program, location, v0, v1, v2); 19654 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19655 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19656 19657 void *pointerArgs[] = { 19658 }; 19659 19660 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19661 threadStartTime, threadEndTime, 19662 &glmsg, pointerArgs); 19663 glContext->traceGLMessage(&glmsg); 19664 } 19665 19666 void GLTrace_glProgramUniform4uiEXT(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { 19667 GLMessage glmsg; 19668 GLTraceContext *glContext = getGLTraceContext(); 19669 19670 glmsg.set_function(GLMessage::glProgramUniform4uiEXT); 19671 19672 // copy argument program 19673 GLMessage_DataType *arg_program = glmsg.add_args(); 19674 arg_program->set_isarray(false); 19675 arg_program->set_type(GLMessage::DataType::INT); 19676 arg_program->add_intvalue(program); 19677 19678 // copy argument location 19679 GLMessage_DataType *arg_location = glmsg.add_args(); 19680 arg_location->set_isarray(false); 19681 arg_location->set_type(GLMessage::DataType::INT); 19682 arg_location->add_intvalue(location); 19683 19684 // copy argument v0 19685 GLMessage_DataType *arg_v0 = glmsg.add_args(); 19686 arg_v0->set_isarray(false); 19687 arg_v0->set_type(GLMessage::DataType::INT); 19688 arg_v0->add_intvalue(v0); 19689 19690 // copy argument v1 19691 GLMessage_DataType *arg_v1 = glmsg.add_args(); 19692 arg_v1->set_isarray(false); 19693 arg_v1->set_type(GLMessage::DataType::INT); 19694 arg_v1->add_intvalue(v1); 19695 19696 // copy argument v2 19697 GLMessage_DataType *arg_v2 = glmsg.add_args(); 19698 arg_v2->set_isarray(false); 19699 arg_v2->set_type(GLMessage::DataType::INT); 19700 arg_v2->add_intvalue(v2); 19701 19702 // copy argument v3 19703 GLMessage_DataType *arg_v3 = glmsg.add_args(); 19704 arg_v3->set_isarray(false); 19705 arg_v3->set_type(GLMessage::DataType::INT); 19706 arg_v3->add_intvalue(v3); 19707 19708 // call function 19709 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19710 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19711 glContext->hooks->gl.glProgramUniform4uiEXT(program, location, v0, v1, v2, v3); 19712 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19713 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19714 19715 void *pointerArgs[] = { 19716 }; 19717 19718 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19719 threadStartTime, threadEndTime, 19720 &glmsg, pointerArgs); 19721 glContext->traceGLMessage(&glmsg); 19722 } 19723 19724 void GLTrace_glProgramUniform1uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) { 19725 GLMessage glmsg; 19726 GLTraceContext *glContext = getGLTraceContext(); 19727 19728 glmsg.set_function(GLMessage::glProgramUniform1uivEXT); 19729 19730 // copy argument program 19731 GLMessage_DataType *arg_program = glmsg.add_args(); 19732 arg_program->set_isarray(false); 19733 arg_program->set_type(GLMessage::DataType::INT); 19734 arg_program->add_intvalue(program); 19735 19736 // copy argument location 19737 GLMessage_DataType *arg_location = glmsg.add_args(); 19738 arg_location->set_isarray(false); 19739 arg_location->set_type(GLMessage::DataType::INT); 19740 arg_location->add_intvalue(location); 19741 19742 // copy argument count 19743 GLMessage_DataType *arg_count = glmsg.add_args(); 19744 arg_count->set_isarray(false); 19745 arg_count->set_type(GLMessage::DataType::INT); 19746 arg_count->add_intvalue(count); 19747 19748 // copy argument value 19749 GLMessage_DataType *arg_value = glmsg.add_args(); 19750 arg_value->set_isarray(false); 19751 arg_value->set_type(GLMessage::DataType::INT64); 19752 arg_value->add_int64value((uintptr_t)value); 19753 19754 // call function 19755 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19756 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19757 glContext->hooks->gl.glProgramUniform1uivEXT(program, location, count, value); 19758 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19759 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19760 19761 void *pointerArgs[] = { 19762 (void *) value, 19763 }; 19764 19765 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19766 threadStartTime, threadEndTime, 19767 &glmsg, pointerArgs); 19768 glContext->traceGLMessage(&glmsg); 19769 } 19770 19771 void GLTrace_glProgramUniform2uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) { 19772 GLMessage glmsg; 19773 GLTraceContext *glContext = getGLTraceContext(); 19774 19775 glmsg.set_function(GLMessage::glProgramUniform2uivEXT); 19776 19777 // copy argument program 19778 GLMessage_DataType *arg_program = glmsg.add_args(); 19779 arg_program->set_isarray(false); 19780 arg_program->set_type(GLMessage::DataType::INT); 19781 arg_program->add_intvalue(program); 19782 19783 // copy argument location 19784 GLMessage_DataType *arg_location = glmsg.add_args(); 19785 arg_location->set_isarray(false); 19786 arg_location->set_type(GLMessage::DataType::INT); 19787 arg_location->add_intvalue(location); 19788 19789 // copy argument count 19790 GLMessage_DataType *arg_count = glmsg.add_args(); 19791 arg_count->set_isarray(false); 19792 arg_count->set_type(GLMessage::DataType::INT); 19793 arg_count->add_intvalue(count); 19794 19795 // copy argument value 19796 GLMessage_DataType *arg_value = glmsg.add_args(); 19797 arg_value->set_isarray(false); 19798 arg_value->set_type(GLMessage::DataType::INT64); 19799 arg_value->add_int64value((uintptr_t)value); 19800 19801 // call function 19802 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19803 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19804 glContext->hooks->gl.glProgramUniform2uivEXT(program, location, count, value); 19805 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19806 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19807 19808 void *pointerArgs[] = { 19809 (void *) value, 19810 }; 19811 19812 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19813 threadStartTime, threadEndTime, 19814 &glmsg, pointerArgs); 19815 glContext->traceGLMessage(&glmsg); 19816 } 19817 19818 void GLTrace_glProgramUniform3uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) { 19819 GLMessage glmsg; 19820 GLTraceContext *glContext = getGLTraceContext(); 19821 19822 glmsg.set_function(GLMessage::glProgramUniform3uivEXT); 19823 19824 // copy argument program 19825 GLMessage_DataType *arg_program = glmsg.add_args(); 19826 arg_program->set_isarray(false); 19827 arg_program->set_type(GLMessage::DataType::INT); 19828 arg_program->add_intvalue(program); 19829 19830 // copy argument location 19831 GLMessage_DataType *arg_location = glmsg.add_args(); 19832 arg_location->set_isarray(false); 19833 arg_location->set_type(GLMessage::DataType::INT); 19834 arg_location->add_intvalue(location); 19835 19836 // copy argument count 19837 GLMessage_DataType *arg_count = glmsg.add_args(); 19838 arg_count->set_isarray(false); 19839 arg_count->set_type(GLMessage::DataType::INT); 19840 arg_count->add_intvalue(count); 19841 19842 // copy argument value 19843 GLMessage_DataType *arg_value = glmsg.add_args(); 19844 arg_value->set_isarray(false); 19845 arg_value->set_type(GLMessage::DataType::INT64); 19846 arg_value->add_int64value((uintptr_t)value); 19847 19848 // call function 19849 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19850 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19851 glContext->hooks->gl.glProgramUniform3uivEXT(program, location, count, value); 19852 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19853 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19854 19855 void *pointerArgs[] = { 19856 (void *) value, 19857 }; 19858 19859 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19860 threadStartTime, threadEndTime, 19861 &glmsg, pointerArgs); 19862 glContext->traceGLMessage(&glmsg); 19863 } 19864 19865 void GLTrace_glProgramUniform4uivEXT(GLuint program, GLint location, GLsizei count, const GLuint * value) { 19866 GLMessage glmsg; 19867 GLTraceContext *glContext = getGLTraceContext(); 19868 19869 glmsg.set_function(GLMessage::glProgramUniform4uivEXT); 19870 19871 // copy argument program 19872 GLMessage_DataType *arg_program = glmsg.add_args(); 19873 arg_program->set_isarray(false); 19874 arg_program->set_type(GLMessage::DataType::INT); 19875 arg_program->add_intvalue(program); 19876 19877 // copy argument location 19878 GLMessage_DataType *arg_location = glmsg.add_args(); 19879 arg_location->set_isarray(false); 19880 arg_location->set_type(GLMessage::DataType::INT); 19881 arg_location->add_intvalue(location); 19882 19883 // copy argument count 19884 GLMessage_DataType *arg_count = glmsg.add_args(); 19885 arg_count->set_isarray(false); 19886 arg_count->set_type(GLMessage::DataType::INT); 19887 arg_count->add_intvalue(count); 19888 19889 // copy argument value 19890 GLMessage_DataType *arg_value = glmsg.add_args(); 19891 arg_value->set_isarray(false); 19892 arg_value->set_type(GLMessage::DataType::INT64); 19893 arg_value->add_int64value((uintptr_t)value); 19894 19895 // call function 19896 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19897 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19898 glContext->hooks->gl.glProgramUniform4uivEXT(program, location, count, value); 19899 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19900 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19901 19902 void *pointerArgs[] = { 19903 (void *) value, 19904 }; 19905 19906 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19907 threadStartTime, threadEndTime, 19908 &glmsg, pointerArgs); 19909 glContext->traceGLMessage(&glmsg); 19910 } 19911 19912 void GLTrace_glProgramUniformMatrix2x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 19913 GLMessage glmsg; 19914 GLTraceContext *glContext = getGLTraceContext(); 19915 19916 glmsg.set_function(GLMessage::glProgramUniformMatrix2x3fvEXT); 19917 19918 // copy argument program 19919 GLMessage_DataType *arg_program = glmsg.add_args(); 19920 arg_program->set_isarray(false); 19921 arg_program->set_type(GLMessage::DataType::INT); 19922 arg_program->add_intvalue(program); 19923 19924 // copy argument location 19925 GLMessage_DataType *arg_location = glmsg.add_args(); 19926 arg_location->set_isarray(false); 19927 arg_location->set_type(GLMessage::DataType::INT); 19928 arg_location->add_intvalue(location); 19929 19930 // copy argument count 19931 GLMessage_DataType *arg_count = glmsg.add_args(); 19932 arg_count->set_isarray(false); 19933 arg_count->set_type(GLMessage::DataType::INT); 19934 arg_count->add_intvalue(count); 19935 19936 // copy argument transpose 19937 GLMessage_DataType *arg_transpose = glmsg.add_args(); 19938 arg_transpose->set_isarray(false); 19939 arg_transpose->set_type(GLMessage::DataType::BOOL); 19940 arg_transpose->add_boolvalue(transpose); 19941 19942 // copy argument value 19943 GLMessage_DataType *arg_value = glmsg.add_args(); 19944 arg_value->set_isarray(false); 19945 arg_value->set_type(GLMessage::DataType::INT64); 19946 arg_value->add_int64value((uintptr_t)value); 19947 19948 // call function 19949 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 19950 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 19951 glContext->hooks->gl.glProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value); 19952 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 19953 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 19954 19955 void *pointerArgs[] = { 19956 (void *) value, 19957 }; 19958 19959 fixupGLMessage(glContext, wallStartTime, wallEndTime, 19960 threadStartTime, threadEndTime, 19961 &glmsg, pointerArgs); 19962 glContext->traceGLMessage(&glmsg); 19963 } 19964 19965 void GLTrace_glProgramUniformMatrix3x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 19966 GLMessage glmsg; 19967 GLTraceContext *glContext = getGLTraceContext(); 19968 19969 glmsg.set_function(GLMessage::glProgramUniformMatrix3x2fvEXT); 19970 19971 // copy argument program 19972 GLMessage_DataType *arg_program = glmsg.add_args(); 19973 arg_program->set_isarray(false); 19974 arg_program->set_type(GLMessage::DataType::INT); 19975 arg_program->add_intvalue(program); 19976 19977 // copy argument location 19978 GLMessage_DataType *arg_location = glmsg.add_args(); 19979 arg_location->set_isarray(false); 19980 arg_location->set_type(GLMessage::DataType::INT); 19981 arg_location->add_intvalue(location); 19982 19983 // copy argument count 19984 GLMessage_DataType *arg_count = glmsg.add_args(); 19985 arg_count->set_isarray(false); 19986 arg_count->set_type(GLMessage::DataType::INT); 19987 arg_count->add_intvalue(count); 19988 19989 // copy argument transpose 19990 GLMessage_DataType *arg_transpose = glmsg.add_args(); 19991 arg_transpose->set_isarray(false); 19992 arg_transpose->set_type(GLMessage::DataType::BOOL); 19993 arg_transpose->add_boolvalue(transpose); 19994 19995 // copy argument value 19996 GLMessage_DataType *arg_value = glmsg.add_args(); 19997 arg_value->set_isarray(false); 19998 arg_value->set_type(GLMessage::DataType::INT64); 19999 arg_value->add_int64value((uintptr_t)value); 20000 20001 // call function 20002 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20003 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20004 glContext->hooks->gl.glProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value); 20005 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20006 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20007 20008 void *pointerArgs[] = { 20009 (void *) value, 20010 }; 20011 20012 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20013 threadStartTime, threadEndTime, 20014 &glmsg, pointerArgs); 20015 glContext->traceGLMessage(&glmsg); 20016 } 20017 20018 void GLTrace_glProgramUniformMatrix2x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 20019 GLMessage glmsg; 20020 GLTraceContext *glContext = getGLTraceContext(); 20021 20022 glmsg.set_function(GLMessage::glProgramUniformMatrix2x4fvEXT); 20023 20024 // copy argument program 20025 GLMessage_DataType *arg_program = glmsg.add_args(); 20026 arg_program->set_isarray(false); 20027 arg_program->set_type(GLMessage::DataType::INT); 20028 arg_program->add_intvalue(program); 20029 20030 // copy argument location 20031 GLMessage_DataType *arg_location = glmsg.add_args(); 20032 arg_location->set_isarray(false); 20033 arg_location->set_type(GLMessage::DataType::INT); 20034 arg_location->add_intvalue(location); 20035 20036 // copy argument count 20037 GLMessage_DataType *arg_count = glmsg.add_args(); 20038 arg_count->set_isarray(false); 20039 arg_count->set_type(GLMessage::DataType::INT); 20040 arg_count->add_intvalue(count); 20041 20042 // copy argument transpose 20043 GLMessage_DataType *arg_transpose = glmsg.add_args(); 20044 arg_transpose->set_isarray(false); 20045 arg_transpose->set_type(GLMessage::DataType::BOOL); 20046 arg_transpose->add_boolvalue(transpose); 20047 20048 // copy argument value 20049 GLMessage_DataType *arg_value = glmsg.add_args(); 20050 arg_value->set_isarray(false); 20051 arg_value->set_type(GLMessage::DataType::INT64); 20052 arg_value->add_int64value((uintptr_t)value); 20053 20054 // call function 20055 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20056 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20057 glContext->hooks->gl.glProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value); 20058 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20059 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20060 20061 void *pointerArgs[] = { 20062 (void *) value, 20063 }; 20064 20065 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20066 threadStartTime, threadEndTime, 20067 &glmsg, pointerArgs); 20068 glContext->traceGLMessage(&glmsg); 20069 } 20070 20071 void GLTrace_glProgramUniformMatrix4x2fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 20072 GLMessage glmsg; 20073 GLTraceContext *glContext = getGLTraceContext(); 20074 20075 glmsg.set_function(GLMessage::glProgramUniformMatrix4x2fvEXT); 20076 20077 // copy argument program 20078 GLMessage_DataType *arg_program = glmsg.add_args(); 20079 arg_program->set_isarray(false); 20080 arg_program->set_type(GLMessage::DataType::INT); 20081 arg_program->add_intvalue(program); 20082 20083 // copy argument location 20084 GLMessage_DataType *arg_location = glmsg.add_args(); 20085 arg_location->set_isarray(false); 20086 arg_location->set_type(GLMessage::DataType::INT); 20087 arg_location->add_intvalue(location); 20088 20089 // copy argument count 20090 GLMessage_DataType *arg_count = glmsg.add_args(); 20091 arg_count->set_isarray(false); 20092 arg_count->set_type(GLMessage::DataType::INT); 20093 arg_count->add_intvalue(count); 20094 20095 // copy argument transpose 20096 GLMessage_DataType *arg_transpose = glmsg.add_args(); 20097 arg_transpose->set_isarray(false); 20098 arg_transpose->set_type(GLMessage::DataType::BOOL); 20099 arg_transpose->add_boolvalue(transpose); 20100 20101 // copy argument value 20102 GLMessage_DataType *arg_value = glmsg.add_args(); 20103 arg_value->set_isarray(false); 20104 arg_value->set_type(GLMessage::DataType::INT64); 20105 arg_value->add_int64value((uintptr_t)value); 20106 20107 // call function 20108 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20109 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20110 glContext->hooks->gl.glProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value); 20111 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20112 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20113 20114 void *pointerArgs[] = { 20115 (void *) value, 20116 }; 20117 20118 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20119 threadStartTime, threadEndTime, 20120 &glmsg, pointerArgs); 20121 glContext->traceGLMessage(&glmsg); 20122 } 20123 20124 void GLTrace_glProgramUniformMatrix3x4fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 20125 GLMessage glmsg; 20126 GLTraceContext *glContext = getGLTraceContext(); 20127 20128 glmsg.set_function(GLMessage::glProgramUniformMatrix3x4fvEXT); 20129 20130 // copy argument program 20131 GLMessage_DataType *arg_program = glmsg.add_args(); 20132 arg_program->set_isarray(false); 20133 arg_program->set_type(GLMessage::DataType::INT); 20134 arg_program->add_intvalue(program); 20135 20136 // copy argument location 20137 GLMessage_DataType *arg_location = glmsg.add_args(); 20138 arg_location->set_isarray(false); 20139 arg_location->set_type(GLMessage::DataType::INT); 20140 arg_location->add_intvalue(location); 20141 20142 // copy argument count 20143 GLMessage_DataType *arg_count = glmsg.add_args(); 20144 arg_count->set_isarray(false); 20145 arg_count->set_type(GLMessage::DataType::INT); 20146 arg_count->add_intvalue(count); 20147 20148 // copy argument transpose 20149 GLMessage_DataType *arg_transpose = glmsg.add_args(); 20150 arg_transpose->set_isarray(false); 20151 arg_transpose->set_type(GLMessage::DataType::BOOL); 20152 arg_transpose->add_boolvalue(transpose); 20153 20154 // copy argument value 20155 GLMessage_DataType *arg_value = glmsg.add_args(); 20156 arg_value->set_isarray(false); 20157 arg_value->set_type(GLMessage::DataType::INT64); 20158 arg_value->add_int64value((uintptr_t)value); 20159 20160 // call function 20161 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20162 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20163 glContext->hooks->gl.glProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value); 20164 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20165 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20166 20167 void *pointerArgs[] = { 20168 (void *) value, 20169 }; 20170 20171 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20172 threadStartTime, threadEndTime, 20173 &glmsg, pointerArgs); 20174 glContext->traceGLMessage(&glmsg); 20175 } 20176 20177 void GLTrace_glProgramUniformMatrix4x3fvEXT(GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 20178 GLMessage glmsg; 20179 GLTraceContext *glContext = getGLTraceContext(); 20180 20181 glmsg.set_function(GLMessage::glProgramUniformMatrix4x3fvEXT); 20182 20183 // copy argument program 20184 GLMessage_DataType *arg_program = glmsg.add_args(); 20185 arg_program->set_isarray(false); 20186 arg_program->set_type(GLMessage::DataType::INT); 20187 arg_program->add_intvalue(program); 20188 20189 // copy argument location 20190 GLMessage_DataType *arg_location = glmsg.add_args(); 20191 arg_location->set_isarray(false); 20192 arg_location->set_type(GLMessage::DataType::INT); 20193 arg_location->add_intvalue(location); 20194 20195 // copy argument count 20196 GLMessage_DataType *arg_count = glmsg.add_args(); 20197 arg_count->set_isarray(false); 20198 arg_count->set_type(GLMessage::DataType::INT); 20199 arg_count->add_intvalue(count); 20200 20201 // copy argument transpose 20202 GLMessage_DataType *arg_transpose = glmsg.add_args(); 20203 arg_transpose->set_isarray(false); 20204 arg_transpose->set_type(GLMessage::DataType::BOOL); 20205 arg_transpose->add_boolvalue(transpose); 20206 20207 // copy argument value 20208 GLMessage_DataType *arg_value = glmsg.add_args(); 20209 arg_value->set_isarray(false); 20210 arg_value->set_type(GLMessage::DataType::INT64); 20211 arg_value->add_int64value((uintptr_t)value); 20212 20213 // call function 20214 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20215 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20216 glContext->hooks->gl.glProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value); 20217 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20218 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20219 20220 void *pointerArgs[] = { 20221 (void *) value, 20222 }; 20223 20224 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20225 threadStartTime, threadEndTime, 20226 &glmsg, pointerArgs); 20227 glContext->traceGLMessage(&glmsg); 20228 } 20229 20230 void GLTrace_glPatchParameteriEXT(GLenum pname, GLint value) { 20231 GLMessage glmsg; 20232 GLTraceContext *glContext = getGLTraceContext(); 20233 20234 glmsg.set_function(GLMessage::glPatchParameteriEXT); 20235 20236 // copy argument pname 20237 GLMessage_DataType *arg_pname = glmsg.add_args(); 20238 arg_pname->set_isarray(false); 20239 arg_pname->set_type(GLMessage::DataType::ENUM); 20240 arg_pname->add_intvalue((int)pname); 20241 20242 // copy argument value 20243 GLMessage_DataType *arg_value = glmsg.add_args(); 20244 arg_value->set_isarray(false); 20245 arg_value->set_type(GLMessage::DataType::INT); 20246 arg_value->add_intvalue(value); 20247 20248 // call function 20249 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20250 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20251 glContext->hooks->gl.glPatchParameteriEXT(pname, value); 20252 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20253 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20254 20255 void *pointerArgs[] = { 20256 }; 20257 20258 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20259 threadStartTime, threadEndTime, 20260 &glmsg, pointerArgs); 20261 glContext->traceGLMessage(&glmsg); 20262 } 20263 20264 void GLTrace_glTexParameterIivEXT(GLenum target, GLenum pname, const GLint * params) { 20265 GLMessage glmsg; 20266 GLTraceContext *glContext = getGLTraceContext(); 20267 20268 glmsg.set_function(GLMessage::glTexParameterIivEXT); 20269 20270 // copy argument target 20271 GLMessage_DataType *arg_target = glmsg.add_args(); 20272 arg_target->set_isarray(false); 20273 arg_target->set_type(GLMessage::DataType::ENUM); 20274 arg_target->add_intvalue((int)target); 20275 20276 // copy argument pname 20277 GLMessage_DataType *arg_pname = glmsg.add_args(); 20278 arg_pname->set_isarray(false); 20279 arg_pname->set_type(GLMessage::DataType::ENUM); 20280 arg_pname->add_intvalue((int)pname); 20281 20282 // copy argument params 20283 GLMessage_DataType *arg_params = glmsg.add_args(); 20284 arg_params->set_isarray(false); 20285 arg_params->set_type(GLMessage::DataType::INT64); 20286 arg_params->add_int64value((uintptr_t)params); 20287 20288 // call function 20289 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20290 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20291 glContext->hooks->gl.glTexParameterIivEXT(target, pname, params); 20292 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20293 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20294 20295 void *pointerArgs[] = { 20296 (void *) params, 20297 }; 20298 20299 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20300 threadStartTime, threadEndTime, 20301 &glmsg, pointerArgs); 20302 glContext->traceGLMessage(&glmsg); 20303 } 20304 20305 void GLTrace_glTexParameterIuivEXT(GLenum target, GLenum pname, const GLuint * params) { 20306 GLMessage glmsg; 20307 GLTraceContext *glContext = getGLTraceContext(); 20308 20309 glmsg.set_function(GLMessage::glTexParameterIuivEXT); 20310 20311 // copy argument target 20312 GLMessage_DataType *arg_target = glmsg.add_args(); 20313 arg_target->set_isarray(false); 20314 arg_target->set_type(GLMessage::DataType::ENUM); 20315 arg_target->add_intvalue((int)target); 20316 20317 // copy argument pname 20318 GLMessage_DataType *arg_pname = glmsg.add_args(); 20319 arg_pname->set_isarray(false); 20320 arg_pname->set_type(GLMessage::DataType::ENUM); 20321 arg_pname->add_intvalue((int)pname); 20322 20323 // copy argument params 20324 GLMessage_DataType *arg_params = glmsg.add_args(); 20325 arg_params->set_isarray(false); 20326 arg_params->set_type(GLMessage::DataType::INT64); 20327 arg_params->add_int64value((uintptr_t)params); 20328 20329 // call function 20330 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20331 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20332 glContext->hooks->gl.glTexParameterIuivEXT(target, pname, params); 20333 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20334 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20335 20336 void *pointerArgs[] = { 20337 (void *) params, 20338 }; 20339 20340 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20341 threadStartTime, threadEndTime, 20342 &glmsg, pointerArgs); 20343 glContext->traceGLMessage(&glmsg); 20344 } 20345 20346 void GLTrace_glGetTexParameterIivEXT(GLenum target, GLenum pname, GLint * params) { 20347 GLMessage glmsg; 20348 GLTraceContext *glContext = getGLTraceContext(); 20349 20350 glmsg.set_function(GLMessage::glGetTexParameterIivEXT); 20351 20352 // copy argument target 20353 GLMessage_DataType *arg_target = glmsg.add_args(); 20354 arg_target->set_isarray(false); 20355 arg_target->set_type(GLMessage::DataType::ENUM); 20356 arg_target->add_intvalue((int)target); 20357 20358 // copy argument pname 20359 GLMessage_DataType *arg_pname = glmsg.add_args(); 20360 arg_pname->set_isarray(false); 20361 arg_pname->set_type(GLMessage::DataType::ENUM); 20362 arg_pname->add_intvalue((int)pname); 20363 20364 // copy argument params 20365 GLMessage_DataType *arg_params = glmsg.add_args(); 20366 arg_params->set_isarray(false); 20367 arg_params->set_type(GLMessage::DataType::INT64); 20368 arg_params->add_int64value((uintptr_t)params); 20369 20370 // call function 20371 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20372 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20373 glContext->hooks->gl.glGetTexParameterIivEXT(target, pname, params); 20374 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20375 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20376 20377 void *pointerArgs[] = { 20378 (void *) params, 20379 }; 20380 20381 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20382 threadStartTime, threadEndTime, 20383 &glmsg, pointerArgs); 20384 glContext->traceGLMessage(&glmsg); 20385 } 20386 20387 void GLTrace_glGetTexParameterIuivEXT(GLenum target, GLenum pname, GLuint * params) { 20388 GLMessage glmsg; 20389 GLTraceContext *glContext = getGLTraceContext(); 20390 20391 glmsg.set_function(GLMessage::glGetTexParameterIuivEXT); 20392 20393 // copy argument target 20394 GLMessage_DataType *arg_target = glmsg.add_args(); 20395 arg_target->set_isarray(false); 20396 arg_target->set_type(GLMessage::DataType::ENUM); 20397 arg_target->add_intvalue((int)target); 20398 20399 // copy argument pname 20400 GLMessage_DataType *arg_pname = glmsg.add_args(); 20401 arg_pname->set_isarray(false); 20402 arg_pname->set_type(GLMessage::DataType::ENUM); 20403 arg_pname->add_intvalue((int)pname); 20404 20405 // copy argument params 20406 GLMessage_DataType *arg_params = glmsg.add_args(); 20407 arg_params->set_isarray(false); 20408 arg_params->set_type(GLMessage::DataType::INT64); 20409 arg_params->add_int64value((uintptr_t)params); 20410 20411 // call function 20412 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20413 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20414 glContext->hooks->gl.glGetTexParameterIuivEXT(target, pname, params); 20415 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20416 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20417 20418 void *pointerArgs[] = { 20419 (void *) params, 20420 }; 20421 20422 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20423 threadStartTime, threadEndTime, 20424 &glmsg, pointerArgs); 20425 glContext->traceGLMessage(&glmsg); 20426 } 20427 20428 void GLTrace_glSamplerParameterIivEXT(GLuint sampler, GLenum pname, const GLint * param) { 20429 GLMessage glmsg; 20430 GLTraceContext *glContext = getGLTraceContext(); 20431 20432 glmsg.set_function(GLMessage::glSamplerParameterIivEXT); 20433 20434 // copy argument sampler 20435 GLMessage_DataType *arg_sampler = glmsg.add_args(); 20436 arg_sampler->set_isarray(false); 20437 arg_sampler->set_type(GLMessage::DataType::INT); 20438 arg_sampler->add_intvalue(sampler); 20439 20440 // copy argument pname 20441 GLMessage_DataType *arg_pname = glmsg.add_args(); 20442 arg_pname->set_isarray(false); 20443 arg_pname->set_type(GLMessage::DataType::ENUM); 20444 arg_pname->add_intvalue((int)pname); 20445 20446 // copy argument param 20447 GLMessage_DataType *arg_param = glmsg.add_args(); 20448 arg_param->set_isarray(false); 20449 arg_param->set_type(GLMessage::DataType::INT64); 20450 arg_param->add_int64value((uintptr_t)param); 20451 20452 // call function 20453 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20454 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20455 glContext->hooks->gl.glSamplerParameterIivEXT(sampler, pname, param); 20456 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20457 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20458 20459 void *pointerArgs[] = { 20460 (void *) param, 20461 }; 20462 20463 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20464 threadStartTime, threadEndTime, 20465 &glmsg, pointerArgs); 20466 glContext->traceGLMessage(&glmsg); 20467 } 20468 20469 void GLTrace_glSamplerParameterIuivEXT(GLuint sampler, GLenum pname, const GLuint * param) { 20470 GLMessage glmsg; 20471 GLTraceContext *glContext = getGLTraceContext(); 20472 20473 glmsg.set_function(GLMessage::glSamplerParameterIuivEXT); 20474 20475 // copy argument sampler 20476 GLMessage_DataType *arg_sampler = glmsg.add_args(); 20477 arg_sampler->set_isarray(false); 20478 arg_sampler->set_type(GLMessage::DataType::INT); 20479 arg_sampler->add_intvalue(sampler); 20480 20481 // copy argument pname 20482 GLMessage_DataType *arg_pname = glmsg.add_args(); 20483 arg_pname->set_isarray(false); 20484 arg_pname->set_type(GLMessage::DataType::ENUM); 20485 arg_pname->add_intvalue((int)pname); 20486 20487 // copy argument param 20488 GLMessage_DataType *arg_param = glmsg.add_args(); 20489 arg_param->set_isarray(false); 20490 arg_param->set_type(GLMessage::DataType::INT64); 20491 arg_param->add_int64value((uintptr_t)param); 20492 20493 // call function 20494 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20495 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20496 glContext->hooks->gl.glSamplerParameterIuivEXT(sampler, pname, param); 20497 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20498 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20499 20500 void *pointerArgs[] = { 20501 (void *) param, 20502 }; 20503 20504 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20505 threadStartTime, threadEndTime, 20506 &glmsg, pointerArgs); 20507 glContext->traceGLMessage(&glmsg); 20508 } 20509 20510 void GLTrace_glGetSamplerParameterIivEXT(GLuint sampler, GLenum pname, GLint * params) { 20511 GLMessage glmsg; 20512 GLTraceContext *glContext = getGLTraceContext(); 20513 20514 glmsg.set_function(GLMessage::glGetSamplerParameterIivEXT); 20515 20516 // copy argument sampler 20517 GLMessage_DataType *arg_sampler = glmsg.add_args(); 20518 arg_sampler->set_isarray(false); 20519 arg_sampler->set_type(GLMessage::DataType::INT); 20520 arg_sampler->add_intvalue(sampler); 20521 20522 // copy argument pname 20523 GLMessage_DataType *arg_pname = glmsg.add_args(); 20524 arg_pname->set_isarray(false); 20525 arg_pname->set_type(GLMessage::DataType::ENUM); 20526 arg_pname->add_intvalue((int)pname); 20527 20528 // copy argument params 20529 GLMessage_DataType *arg_params = glmsg.add_args(); 20530 arg_params->set_isarray(false); 20531 arg_params->set_type(GLMessage::DataType::INT64); 20532 arg_params->add_int64value((uintptr_t)params); 20533 20534 // call function 20535 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20536 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20537 glContext->hooks->gl.glGetSamplerParameterIivEXT(sampler, pname, params); 20538 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20539 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20540 20541 void *pointerArgs[] = { 20542 (void *) params, 20543 }; 20544 20545 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20546 threadStartTime, threadEndTime, 20547 &glmsg, pointerArgs); 20548 glContext->traceGLMessage(&glmsg); 20549 } 20550 20551 void GLTrace_glGetSamplerParameterIuivEXT(GLuint sampler, GLenum pname, GLuint * params) { 20552 GLMessage glmsg; 20553 GLTraceContext *glContext = getGLTraceContext(); 20554 20555 glmsg.set_function(GLMessage::glGetSamplerParameterIuivEXT); 20556 20557 // copy argument sampler 20558 GLMessage_DataType *arg_sampler = glmsg.add_args(); 20559 arg_sampler->set_isarray(false); 20560 arg_sampler->set_type(GLMessage::DataType::INT); 20561 arg_sampler->add_intvalue(sampler); 20562 20563 // copy argument pname 20564 GLMessage_DataType *arg_pname = glmsg.add_args(); 20565 arg_pname->set_isarray(false); 20566 arg_pname->set_type(GLMessage::DataType::ENUM); 20567 arg_pname->add_intvalue((int)pname); 20568 20569 // copy argument params 20570 GLMessage_DataType *arg_params = glmsg.add_args(); 20571 arg_params->set_isarray(false); 20572 arg_params->set_type(GLMessage::DataType::INT64); 20573 arg_params->add_int64value((uintptr_t)params); 20574 20575 // call function 20576 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20577 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20578 glContext->hooks->gl.glGetSamplerParameterIuivEXT(sampler, pname, params); 20579 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20580 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20581 20582 void *pointerArgs[] = { 20583 (void *) params, 20584 }; 20585 20586 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20587 threadStartTime, threadEndTime, 20588 &glmsg, pointerArgs); 20589 glContext->traceGLMessage(&glmsg); 20590 } 20591 20592 void GLTrace_glTexBufferEXT(GLenum target, GLenum internalformat, GLuint buffer) { 20593 GLMessage glmsg; 20594 GLTraceContext *glContext = getGLTraceContext(); 20595 20596 glmsg.set_function(GLMessage::glTexBufferEXT); 20597 20598 // copy argument target 20599 GLMessage_DataType *arg_target = glmsg.add_args(); 20600 arg_target->set_isarray(false); 20601 arg_target->set_type(GLMessage::DataType::ENUM); 20602 arg_target->add_intvalue((int)target); 20603 20604 // copy argument internalformat 20605 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20606 arg_internalformat->set_isarray(false); 20607 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20608 arg_internalformat->add_intvalue((int)internalformat); 20609 20610 // copy argument buffer 20611 GLMessage_DataType *arg_buffer = glmsg.add_args(); 20612 arg_buffer->set_isarray(false); 20613 arg_buffer->set_type(GLMessage::DataType::INT); 20614 arg_buffer->add_intvalue(buffer); 20615 20616 // call function 20617 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20618 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20619 glContext->hooks->gl.glTexBufferEXT(target, internalformat, buffer); 20620 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20621 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20622 20623 void *pointerArgs[] = { 20624 }; 20625 20626 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20627 threadStartTime, threadEndTime, 20628 &glmsg, pointerArgs); 20629 glContext->traceGLMessage(&glmsg); 20630 } 20631 20632 void GLTrace_glTexBufferRangeEXT(GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size) { 20633 GLMessage glmsg; 20634 GLTraceContext *glContext = getGLTraceContext(); 20635 20636 glmsg.set_function(GLMessage::glTexBufferRangeEXT); 20637 20638 // copy argument target 20639 GLMessage_DataType *arg_target = glmsg.add_args(); 20640 arg_target->set_isarray(false); 20641 arg_target->set_type(GLMessage::DataType::ENUM); 20642 arg_target->add_intvalue((int)target); 20643 20644 // copy argument internalformat 20645 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20646 arg_internalformat->set_isarray(false); 20647 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20648 arg_internalformat->add_intvalue((int)internalformat); 20649 20650 // copy argument buffer 20651 GLMessage_DataType *arg_buffer = glmsg.add_args(); 20652 arg_buffer->set_isarray(false); 20653 arg_buffer->set_type(GLMessage::DataType::INT); 20654 arg_buffer->add_intvalue(buffer); 20655 20656 // copy argument offset 20657 GLMessage_DataType *arg_offset = glmsg.add_args(); 20658 arg_offset->set_isarray(false); 20659 arg_offset->set_type(GLMessage::DataType::INT); 20660 arg_offset->add_intvalue(offset); 20661 20662 // copy argument size 20663 GLMessage_DataType *arg_size = glmsg.add_args(); 20664 arg_size->set_isarray(false); 20665 arg_size->set_type(GLMessage::DataType::INT); 20666 arg_size->add_intvalue(size); 20667 20668 // call function 20669 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20670 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20671 glContext->hooks->gl.glTexBufferRangeEXT(target, internalformat, buffer, offset, size); 20672 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20673 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20674 20675 void *pointerArgs[] = { 20676 }; 20677 20678 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20679 threadStartTime, threadEndTime, 20680 &glmsg, pointerArgs); 20681 glContext->traceGLMessage(&glmsg); 20682 } 20683 20684 void GLTrace_glTexStorage1DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { 20685 GLMessage glmsg; 20686 GLTraceContext *glContext = getGLTraceContext(); 20687 20688 glmsg.set_function(GLMessage::glTexStorage1DEXT); 20689 20690 // copy argument target 20691 GLMessage_DataType *arg_target = glmsg.add_args(); 20692 arg_target->set_isarray(false); 20693 arg_target->set_type(GLMessage::DataType::ENUM); 20694 arg_target->add_intvalue((int)target); 20695 20696 // copy argument levels 20697 GLMessage_DataType *arg_levels = glmsg.add_args(); 20698 arg_levels->set_isarray(false); 20699 arg_levels->set_type(GLMessage::DataType::INT); 20700 arg_levels->add_intvalue(levels); 20701 20702 // copy argument internalformat 20703 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20704 arg_internalformat->set_isarray(false); 20705 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20706 arg_internalformat->add_intvalue((int)internalformat); 20707 20708 // copy argument width 20709 GLMessage_DataType *arg_width = glmsg.add_args(); 20710 arg_width->set_isarray(false); 20711 arg_width->set_type(GLMessage::DataType::INT); 20712 arg_width->add_intvalue(width); 20713 20714 // call function 20715 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20716 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20717 glContext->hooks->gl.glTexStorage1DEXT(target, levels, internalformat, width); 20718 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20719 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20720 20721 void *pointerArgs[] = { 20722 }; 20723 20724 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20725 threadStartTime, threadEndTime, 20726 &glmsg, pointerArgs); 20727 glContext->traceGLMessage(&glmsg); 20728 } 20729 20730 void GLTrace_glTexStorage2DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { 20731 GLMessage glmsg; 20732 GLTraceContext *glContext = getGLTraceContext(); 20733 20734 glmsg.set_function(GLMessage::glTexStorage2DEXT); 20735 20736 // copy argument target 20737 GLMessage_DataType *arg_target = glmsg.add_args(); 20738 arg_target->set_isarray(false); 20739 arg_target->set_type(GLMessage::DataType::ENUM); 20740 arg_target->add_intvalue((int)target); 20741 20742 // copy argument levels 20743 GLMessage_DataType *arg_levels = glmsg.add_args(); 20744 arg_levels->set_isarray(false); 20745 arg_levels->set_type(GLMessage::DataType::INT); 20746 arg_levels->add_intvalue(levels); 20747 20748 // copy argument internalformat 20749 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20750 arg_internalformat->set_isarray(false); 20751 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20752 arg_internalformat->add_intvalue((int)internalformat); 20753 20754 // copy argument width 20755 GLMessage_DataType *arg_width = glmsg.add_args(); 20756 arg_width->set_isarray(false); 20757 arg_width->set_type(GLMessage::DataType::INT); 20758 arg_width->add_intvalue(width); 20759 20760 // copy argument height 20761 GLMessage_DataType *arg_height = glmsg.add_args(); 20762 arg_height->set_isarray(false); 20763 arg_height->set_type(GLMessage::DataType::INT); 20764 arg_height->add_intvalue(height); 20765 20766 // call function 20767 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20768 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20769 glContext->hooks->gl.glTexStorage2DEXT(target, levels, internalformat, width, height); 20770 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20771 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20772 20773 void *pointerArgs[] = { 20774 }; 20775 20776 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20777 threadStartTime, threadEndTime, 20778 &glmsg, pointerArgs); 20779 glContext->traceGLMessage(&glmsg); 20780 } 20781 20782 void GLTrace_glTexStorage3DEXT(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { 20783 GLMessage glmsg; 20784 GLTraceContext *glContext = getGLTraceContext(); 20785 20786 glmsg.set_function(GLMessage::glTexStorage3DEXT); 20787 20788 // copy argument target 20789 GLMessage_DataType *arg_target = glmsg.add_args(); 20790 arg_target->set_isarray(false); 20791 arg_target->set_type(GLMessage::DataType::ENUM); 20792 arg_target->add_intvalue((int)target); 20793 20794 // copy argument levels 20795 GLMessage_DataType *arg_levels = glmsg.add_args(); 20796 arg_levels->set_isarray(false); 20797 arg_levels->set_type(GLMessage::DataType::INT); 20798 arg_levels->add_intvalue(levels); 20799 20800 // copy argument internalformat 20801 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20802 arg_internalformat->set_isarray(false); 20803 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20804 arg_internalformat->add_intvalue((int)internalformat); 20805 20806 // copy argument width 20807 GLMessage_DataType *arg_width = glmsg.add_args(); 20808 arg_width->set_isarray(false); 20809 arg_width->set_type(GLMessage::DataType::INT); 20810 arg_width->add_intvalue(width); 20811 20812 // copy argument height 20813 GLMessage_DataType *arg_height = glmsg.add_args(); 20814 arg_height->set_isarray(false); 20815 arg_height->set_type(GLMessage::DataType::INT); 20816 arg_height->add_intvalue(height); 20817 20818 // copy argument depth 20819 GLMessage_DataType *arg_depth = glmsg.add_args(); 20820 arg_depth->set_isarray(false); 20821 arg_depth->set_type(GLMessage::DataType::INT); 20822 arg_depth->add_intvalue(depth); 20823 20824 // call function 20825 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20826 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20827 glContext->hooks->gl.glTexStorage3DEXT(target, levels, internalformat, width, height, depth); 20828 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20829 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20830 20831 void *pointerArgs[] = { 20832 }; 20833 20834 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20835 threadStartTime, threadEndTime, 20836 &glmsg, pointerArgs); 20837 glContext->traceGLMessage(&glmsg); 20838 } 20839 20840 void GLTrace_glTextureStorage1DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) { 20841 GLMessage glmsg; 20842 GLTraceContext *glContext = getGLTraceContext(); 20843 20844 glmsg.set_function(GLMessage::glTextureStorage1DEXT); 20845 20846 // copy argument texture 20847 GLMessage_DataType *arg_texture = glmsg.add_args(); 20848 arg_texture->set_isarray(false); 20849 arg_texture->set_type(GLMessage::DataType::INT); 20850 arg_texture->add_intvalue(texture); 20851 20852 // copy argument target 20853 GLMessage_DataType *arg_target = glmsg.add_args(); 20854 arg_target->set_isarray(false); 20855 arg_target->set_type(GLMessage::DataType::ENUM); 20856 arg_target->add_intvalue((int)target); 20857 20858 // copy argument levels 20859 GLMessage_DataType *arg_levels = glmsg.add_args(); 20860 arg_levels->set_isarray(false); 20861 arg_levels->set_type(GLMessage::DataType::INT); 20862 arg_levels->add_intvalue(levels); 20863 20864 // copy argument internalformat 20865 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20866 arg_internalformat->set_isarray(false); 20867 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20868 arg_internalformat->add_intvalue((int)internalformat); 20869 20870 // copy argument width 20871 GLMessage_DataType *arg_width = glmsg.add_args(); 20872 arg_width->set_isarray(false); 20873 arg_width->set_type(GLMessage::DataType::INT); 20874 arg_width->add_intvalue(width); 20875 20876 // call function 20877 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20878 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20879 glContext->hooks->gl.glTextureStorage1DEXT(texture, target, levels, internalformat, width); 20880 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20881 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20882 20883 void *pointerArgs[] = { 20884 }; 20885 20886 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20887 threadStartTime, threadEndTime, 20888 &glmsg, pointerArgs); 20889 glContext->traceGLMessage(&glmsg); 20890 } 20891 20892 void GLTrace_glTextureStorage2DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { 20893 GLMessage glmsg; 20894 GLTraceContext *glContext = getGLTraceContext(); 20895 20896 glmsg.set_function(GLMessage::glTextureStorage2DEXT); 20897 20898 // copy argument texture 20899 GLMessage_DataType *arg_texture = glmsg.add_args(); 20900 arg_texture->set_isarray(false); 20901 arg_texture->set_type(GLMessage::DataType::INT); 20902 arg_texture->add_intvalue(texture); 20903 20904 // copy argument target 20905 GLMessage_DataType *arg_target = glmsg.add_args(); 20906 arg_target->set_isarray(false); 20907 arg_target->set_type(GLMessage::DataType::ENUM); 20908 arg_target->add_intvalue((int)target); 20909 20910 // copy argument levels 20911 GLMessage_DataType *arg_levels = glmsg.add_args(); 20912 arg_levels->set_isarray(false); 20913 arg_levels->set_type(GLMessage::DataType::INT); 20914 arg_levels->add_intvalue(levels); 20915 20916 // copy argument internalformat 20917 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20918 arg_internalformat->set_isarray(false); 20919 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20920 arg_internalformat->add_intvalue((int)internalformat); 20921 20922 // copy argument width 20923 GLMessage_DataType *arg_width = glmsg.add_args(); 20924 arg_width->set_isarray(false); 20925 arg_width->set_type(GLMessage::DataType::INT); 20926 arg_width->add_intvalue(width); 20927 20928 // copy argument height 20929 GLMessage_DataType *arg_height = glmsg.add_args(); 20930 arg_height->set_isarray(false); 20931 arg_height->set_type(GLMessage::DataType::INT); 20932 arg_height->add_intvalue(height); 20933 20934 // call function 20935 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 20936 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 20937 glContext->hooks->gl.glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); 20938 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 20939 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 20940 20941 void *pointerArgs[] = { 20942 }; 20943 20944 fixupGLMessage(glContext, wallStartTime, wallEndTime, 20945 threadStartTime, threadEndTime, 20946 &glmsg, pointerArgs); 20947 glContext->traceGLMessage(&glmsg); 20948 } 20949 20950 void GLTrace_glTextureStorage3DEXT(GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { 20951 GLMessage glmsg; 20952 GLTraceContext *glContext = getGLTraceContext(); 20953 20954 glmsg.set_function(GLMessage::glTextureStorage3DEXT); 20955 20956 // copy argument texture 20957 GLMessage_DataType *arg_texture = glmsg.add_args(); 20958 arg_texture->set_isarray(false); 20959 arg_texture->set_type(GLMessage::DataType::INT); 20960 arg_texture->add_intvalue(texture); 20961 20962 // copy argument target 20963 GLMessage_DataType *arg_target = glmsg.add_args(); 20964 arg_target->set_isarray(false); 20965 arg_target->set_type(GLMessage::DataType::ENUM); 20966 arg_target->add_intvalue((int)target); 20967 20968 // copy argument levels 20969 GLMessage_DataType *arg_levels = glmsg.add_args(); 20970 arg_levels->set_isarray(false); 20971 arg_levels->set_type(GLMessage::DataType::INT); 20972 arg_levels->add_intvalue(levels); 20973 20974 // copy argument internalformat 20975 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 20976 arg_internalformat->set_isarray(false); 20977 arg_internalformat->set_type(GLMessage::DataType::ENUM); 20978 arg_internalformat->add_intvalue((int)internalformat); 20979 20980 // copy argument width 20981 GLMessage_DataType *arg_width = glmsg.add_args(); 20982 arg_width->set_isarray(false); 20983 arg_width->set_type(GLMessage::DataType::INT); 20984 arg_width->add_intvalue(width); 20985 20986 // copy argument height 20987 GLMessage_DataType *arg_height = glmsg.add_args(); 20988 arg_height->set_isarray(false); 20989 arg_height->set_type(GLMessage::DataType::INT); 20990 arg_height->add_intvalue(height); 20991 20992 // copy argument depth 20993 GLMessage_DataType *arg_depth = glmsg.add_args(); 20994 arg_depth->set_isarray(false); 20995 arg_depth->set_type(GLMessage::DataType::INT); 20996 arg_depth->add_intvalue(depth); 20997 20998 // call function 20999 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21000 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21001 glContext->hooks->gl.glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); 21002 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21003 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21004 21005 void *pointerArgs[] = { 21006 }; 21007 21008 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21009 threadStartTime, threadEndTime, 21010 &glmsg, pointerArgs); 21011 glContext->traceGLMessage(&glmsg); 21012 } 21013 21014 void GLTrace_glTextureViewEXT(GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers) { 21015 GLMessage glmsg; 21016 GLTraceContext *glContext = getGLTraceContext(); 21017 21018 glmsg.set_function(GLMessage::glTextureViewEXT); 21019 21020 // copy argument texture 21021 GLMessage_DataType *arg_texture = glmsg.add_args(); 21022 arg_texture->set_isarray(false); 21023 arg_texture->set_type(GLMessage::DataType::INT); 21024 arg_texture->add_intvalue(texture); 21025 21026 // copy argument target 21027 GLMessage_DataType *arg_target = glmsg.add_args(); 21028 arg_target->set_isarray(false); 21029 arg_target->set_type(GLMessage::DataType::ENUM); 21030 arg_target->add_intvalue((int)target); 21031 21032 // copy argument origtexture 21033 GLMessage_DataType *arg_origtexture = glmsg.add_args(); 21034 arg_origtexture->set_isarray(false); 21035 arg_origtexture->set_type(GLMessage::DataType::INT); 21036 arg_origtexture->add_intvalue(origtexture); 21037 21038 // copy argument internalformat 21039 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 21040 arg_internalformat->set_isarray(false); 21041 arg_internalformat->set_type(GLMessage::DataType::ENUM); 21042 arg_internalformat->add_intvalue((int)internalformat); 21043 21044 // copy argument minlevel 21045 GLMessage_DataType *arg_minlevel = glmsg.add_args(); 21046 arg_minlevel->set_isarray(false); 21047 arg_minlevel->set_type(GLMessage::DataType::INT); 21048 arg_minlevel->add_intvalue(minlevel); 21049 21050 // copy argument numlevels 21051 GLMessage_DataType *arg_numlevels = glmsg.add_args(); 21052 arg_numlevels->set_isarray(false); 21053 arg_numlevels->set_type(GLMessage::DataType::INT); 21054 arg_numlevels->add_intvalue(numlevels); 21055 21056 // copy argument minlayer 21057 GLMessage_DataType *arg_minlayer = glmsg.add_args(); 21058 arg_minlayer->set_isarray(false); 21059 arg_minlayer->set_type(GLMessage::DataType::INT); 21060 arg_minlayer->add_intvalue(minlayer); 21061 21062 // copy argument numlayers 21063 GLMessage_DataType *arg_numlayers = glmsg.add_args(); 21064 arg_numlayers->set_isarray(false); 21065 arg_numlayers->set_type(GLMessage::DataType::INT); 21066 arg_numlayers->add_intvalue(numlayers); 21067 21068 // call function 21069 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21070 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21071 glContext->hooks->gl.glTextureViewEXT(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); 21072 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21073 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21074 21075 void *pointerArgs[] = { 21076 }; 21077 21078 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21079 threadStartTime, threadEndTime, 21080 &glmsg, pointerArgs); 21081 glContext->traceGLMessage(&glmsg); 21082 } 21083 21084 void GLTrace_glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { 21085 GLMessage glmsg; 21086 GLTraceContext *glContext = getGLTraceContext(); 21087 21088 glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleIMG); 21089 21090 // copy argument target 21091 GLMessage_DataType *arg_target = glmsg.add_args(); 21092 arg_target->set_isarray(false); 21093 arg_target->set_type(GLMessage::DataType::ENUM); 21094 arg_target->add_intvalue((int)target); 21095 21096 // copy argument samples 21097 GLMessage_DataType *arg_samples = glmsg.add_args(); 21098 arg_samples->set_isarray(false); 21099 arg_samples->set_type(GLMessage::DataType::INT); 21100 arg_samples->add_intvalue(samples); 21101 21102 // copy argument internalformat 21103 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 21104 arg_internalformat->set_isarray(false); 21105 arg_internalformat->set_type(GLMessage::DataType::ENUM); 21106 arg_internalformat->add_intvalue((int)internalformat); 21107 21108 // copy argument width 21109 GLMessage_DataType *arg_width = glmsg.add_args(); 21110 arg_width->set_isarray(false); 21111 arg_width->set_type(GLMessage::DataType::INT); 21112 arg_width->add_intvalue(width); 21113 21114 // copy argument height 21115 GLMessage_DataType *arg_height = glmsg.add_args(); 21116 arg_height->set_isarray(false); 21117 arg_height->set_type(GLMessage::DataType::INT); 21118 arg_height->add_intvalue(height); 21119 21120 // call function 21121 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21122 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21123 glContext->hooks->gl.glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height); 21124 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21125 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21126 21127 void *pointerArgs[] = { 21128 }; 21129 21130 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21131 threadStartTime, threadEndTime, 21132 &glmsg, pointerArgs); 21133 glContext->traceGLMessage(&glmsg); 21134 } 21135 21136 void GLTrace_glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { 21137 GLMessage glmsg; 21138 GLTraceContext *glContext = getGLTraceContext(); 21139 21140 glmsg.set_function(GLMessage::glFramebufferTexture2DMultisampleIMG); 21141 21142 // copy argument target 21143 GLMessage_DataType *arg_target = glmsg.add_args(); 21144 arg_target->set_isarray(false); 21145 arg_target->set_type(GLMessage::DataType::ENUM); 21146 arg_target->add_intvalue((int)target); 21147 21148 // copy argument attachment 21149 GLMessage_DataType *arg_attachment = glmsg.add_args(); 21150 arg_attachment->set_isarray(false); 21151 arg_attachment->set_type(GLMessage::DataType::ENUM); 21152 arg_attachment->add_intvalue((int)attachment); 21153 21154 // copy argument textarget 21155 GLMessage_DataType *arg_textarget = glmsg.add_args(); 21156 arg_textarget->set_isarray(false); 21157 arg_textarget->set_type(GLMessage::DataType::ENUM); 21158 arg_textarget->add_intvalue((int)textarget); 21159 21160 // copy argument texture 21161 GLMessage_DataType *arg_texture = glmsg.add_args(); 21162 arg_texture->set_isarray(false); 21163 arg_texture->set_type(GLMessage::DataType::INT); 21164 arg_texture->add_intvalue(texture); 21165 21166 // copy argument level 21167 GLMessage_DataType *arg_level = glmsg.add_args(); 21168 arg_level->set_isarray(false); 21169 arg_level->set_type(GLMessage::DataType::INT); 21170 arg_level->add_intvalue(level); 21171 21172 // copy argument samples 21173 GLMessage_DataType *arg_samples = glmsg.add_args(); 21174 arg_samples->set_isarray(false); 21175 arg_samples->set_type(GLMessage::DataType::INT); 21176 arg_samples->add_intvalue(samples); 21177 21178 // call function 21179 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21180 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21181 glContext->hooks->gl.glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples); 21182 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21183 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21184 21185 void *pointerArgs[] = { 21186 }; 21187 21188 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21189 threadStartTime, threadEndTime, 21190 &glmsg, pointerArgs); 21191 glContext->traceGLMessage(&glmsg); 21192 } 21193 21194 void GLTrace_glBeginPerfQueryINTEL(GLuint queryHandle) { 21195 GLMessage glmsg; 21196 GLTraceContext *glContext = getGLTraceContext(); 21197 21198 glmsg.set_function(GLMessage::glBeginPerfQueryINTEL); 21199 21200 // copy argument queryHandle 21201 GLMessage_DataType *arg_queryHandle = glmsg.add_args(); 21202 arg_queryHandle->set_isarray(false); 21203 arg_queryHandle->set_type(GLMessage::DataType::INT); 21204 arg_queryHandle->add_intvalue(queryHandle); 21205 21206 // call function 21207 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21208 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21209 glContext->hooks->gl.glBeginPerfQueryINTEL(queryHandle); 21210 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21211 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21212 21213 void *pointerArgs[] = { 21214 }; 21215 21216 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21217 threadStartTime, threadEndTime, 21218 &glmsg, pointerArgs); 21219 glContext->traceGLMessage(&glmsg); 21220 } 21221 21222 void GLTrace_glCreatePerfQueryINTEL(GLuint queryId, GLuint * queryHandle) { 21223 GLMessage glmsg; 21224 GLTraceContext *glContext = getGLTraceContext(); 21225 21226 glmsg.set_function(GLMessage::glCreatePerfQueryINTEL); 21227 21228 // copy argument queryId 21229 GLMessage_DataType *arg_queryId = glmsg.add_args(); 21230 arg_queryId->set_isarray(false); 21231 arg_queryId->set_type(GLMessage::DataType::INT); 21232 arg_queryId->add_intvalue(queryId); 21233 21234 // copy argument queryHandle 21235 GLMessage_DataType *arg_queryHandle = glmsg.add_args(); 21236 arg_queryHandle->set_isarray(false); 21237 arg_queryHandle->set_type(GLMessage::DataType::INT64); 21238 arg_queryHandle->add_int64value((uintptr_t)queryHandle); 21239 21240 // call function 21241 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21242 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21243 glContext->hooks->gl.glCreatePerfQueryINTEL(queryId, queryHandle); 21244 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21245 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21246 21247 void *pointerArgs[] = { 21248 (void *) queryHandle, 21249 }; 21250 21251 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21252 threadStartTime, threadEndTime, 21253 &glmsg, pointerArgs); 21254 glContext->traceGLMessage(&glmsg); 21255 } 21256 21257 void GLTrace_glDeletePerfQueryINTEL(GLuint queryHandle) { 21258 GLMessage glmsg; 21259 GLTraceContext *glContext = getGLTraceContext(); 21260 21261 glmsg.set_function(GLMessage::glDeletePerfQueryINTEL); 21262 21263 // copy argument queryHandle 21264 GLMessage_DataType *arg_queryHandle = glmsg.add_args(); 21265 arg_queryHandle->set_isarray(false); 21266 arg_queryHandle->set_type(GLMessage::DataType::INT); 21267 arg_queryHandle->add_intvalue(queryHandle); 21268 21269 // call function 21270 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21271 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21272 glContext->hooks->gl.glDeletePerfQueryINTEL(queryHandle); 21273 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21274 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21275 21276 void *pointerArgs[] = { 21277 }; 21278 21279 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21280 threadStartTime, threadEndTime, 21281 &glmsg, pointerArgs); 21282 glContext->traceGLMessage(&glmsg); 21283 } 21284 21285 void GLTrace_glEndPerfQueryINTEL(GLuint queryHandle) { 21286 GLMessage glmsg; 21287 GLTraceContext *glContext = getGLTraceContext(); 21288 21289 glmsg.set_function(GLMessage::glEndPerfQueryINTEL); 21290 21291 // copy argument queryHandle 21292 GLMessage_DataType *arg_queryHandle = glmsg.add_args(); 21293 arg_queryHandle->set_isarray(false); 21294 arg_queryHandle->set_type(GLMessage::DataType::INT); 21295 arg_queryHandle->add_intvalue(queryHandle); 21296 21297 // call function 21298 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21299 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21300 glContext->hooks->gl.glEndPerfQueryINTEL(queryHandle); 21301 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21302 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21303 21304 void *pointerArgs[] = { 21305 }; 21306 21307 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21308 threadStartTime, threadEndTime, 21309 &glmsg, pointerArgs); 21310 glContext->traceGLMessage(&glmsg); 21311 } 21312 21313 void GLTrace_glGetFirstPerfQueryIdINTEL(GLuint * queryId) { 21314 GLMessage glmsg; 21315 GLTraceContext *glContext = getGLTraceContext(); 21316 21317 glmsg.set_function(GLMessage::glGetFirstPerfQueryIdINTEL); 21318 21319 // copy argument queryId 21320 GLMessage_DataType *arg_queryId = glmsg.add_args(); 21321 arg_queryId->set_isarray(false); 21322 arg_queryId->set_type(GLMessage::DataType::INT64); 21323 arg_queryId->add_int64value((uintptr_t)queryId); 21324 21325 // call function 21326 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21327 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21328 glContext->hooks->gl.glGetFirstPerfQueryIdINTEL(queryId); 21329 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21330 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21331 21332 void *pointerArgs[] = { 21333 (void *) queryId, 21334 }; 21335 21336 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21337 threadStartTime, threadEndTime, 21338 &glmsg, pointerArgs); 21339 glContext->traceGLMessage(&glmsg); 21340 } 21341 21342 void GLTrace_glGetNextPerfQueryIdINTEL(GLuint queryId, GLuint * nextQueryId) { 21343 GLMessage glmsg; 21344 GLTraceContext *glContext = getGLTraceContext(); 21345 21346 glmsg.set_function(GLMessage::glGetNextPerfQueryIdINTEL); 21347 21348 // copy argument queryId 21349 GLMessage_DataType *arg_queryId = glmsg.add_args(); 21350 arg_queryId->set_isarray(false); 21351 arg_queryId->set_type(GLMessage::DataType::INT); 21352 arg_queryId->add_intvalue(queryId); 21353 21354 // copy argument nextQueryId 21355 GLMessage_DataType *arg_nextQueryId = glmsg.add_args(); 21356 arg_nextQueryId->set_isarray(false); 21357 arg_nextQueryId->set_type(GLMessage::DataType::INT64); 21358 arg_nextQueryId->add_int64value((uintptr_t)nextQueryId); 21359 21360 // call function 21361 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21362 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21363 glContext->hooks->gl.glGetNextPerfQueryIdINTEL(queryId, nextQueryId); 21364 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21365 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21366 21367 void *pointerArgs[] = { 21368 (void *) nextQueryId, 21369 }; 21370 21371 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21372 threadStartTime, threadEndTime, 21373 &glmsg, pointerArgs); 21374 glContext->traceGLMessage(&glmsg); 21375 } 21376 21377 void GLTrace_glGetPerfCounterInfoINTEL(GLuint queryId, GLuint counterId, GLuint counterNameLength, GLchar * counterName, GLuint counterDescLength, GLchar * counterDesc, GLuint * counterOffset, GLuint * counterDataSize, GLuint * counterTypeEnum, GLuint * counterDataTypeEnum, GLuint64 * rawCounterMaxValue) { 21378 GLMessage glmsg; 21379 GLTraceContext *glContext = getGLTraceContext(); 21380 21381 glmsg.set_function(GLMessage::glGetPerfCounterInfoINTEL); 21382 21383 // copy argument queryId 21384 GLMessage_DataType *arg_queryId = glmsg.add_args(); 21385 arg_queryId->set_isarray(false); 21386 arg_queryId->set_type(GLMessage::DataType::INT); 21387 arg_queryId->add_intvalue(queryId); 21388 21389 // copy argument counterId 21390 GLMessage_DataType *arg_counterId = glmsg.add_args(); 21391 arg_counterId->set_isarray(false); 21392 arg_counterId->set_type(GLMessage::DataType::INT); 21393 arg_counterId->add_intvalue(counterId); 21394 21395 // copy argument counterNameLength 21396 GLMessage_DataType *arg_counterNameLength = glmsg.add_args(); 21397 arg_counterNameLength->set_isarray(false); 21398 arg_counterNameLength->set_type(GLMessage::DataType::INT); 21399 arg_counterNameLength->add_intvalue(counterNameLength); 21400 21401 // copy argument counterName 21402 GLMessage_DataType *arg_counterName = glmsg.add_args(); 21403 arg_counterName->set_isarray(false); 21404 arg_counterName->set_type(GLMessage::DataType::INT64); 21405 arg_counterName->add_int64value((uintptr_t)counterName); 21406 21407 // copy argument counterDescLength 21408 GLMessage_DataType *arg_counterDescLength = glmsg.add_args(); 21409 arg_counterDescLength->set_isarray(false); 21410 arg_counterDescLength->set_type(GLMessage::DataType::INT); 21411 arg_counterDescLength->add_intvalue(counterDescLength); 21412 21413 // copy argument counterDesc 21414 GLMessage_DataType *arg_counterDesc = glmsg.add_args(); 21415 arg_counterDesc->set_isarray(false); 21416 arg_counterDesc->set_type(GLMessage::DataType::INT64); 21417 arg_counterDesc->add_int64value((uintptr_t)counterDesc); 21418 21419 // copy argument counterOffset 21420 GLMessage_DataType *arg_counterOffset = glmsg.add_args(); 21421 arg_counterOffset->set_isarray(false); 21422 arg_counterOffset->set_type(GLMessage::DataType::INT64); 21423 arg_counterOffset->add_int64value((uintptr_t)counterOffset); 21424 21425 // copy argument counterDataSize 21426 GLMessage_DataType *arg_counterDataSize = glmsg.add_args(); 21427 arg_counterDataSize->set_isarray(false); 21428 arg_counterDataSize->set_type(GLMessage::DataType::INT64); 21429 arg_counterDataSize->add_int64value((uintptr_t)counterDataSize); 21430 21431 // copy argument counterTypeEnum 21432 GLMessage_DataType *arg_counterTypeEnum = glmsg.add_args(); 21433 arg_counterTypeEnum->set_isarray(false); 21434 arg_counterTypeEnum->set_type(GLMessage::DataType::INT64); 21435 arg_counterTypeEnum->add_int64value((uintptr_t)counterTypeEnum); 21436 21437 // copy argument counterDataTypeEnum 21438 GLMessage_DataType *arg_counterDataTypeEnum = glmsg.add_args(); 21439 arg_counterDataTypeEnum->set_isarray(false); 21440 arg_counterDataTypeEnum->set_type(GLMessage::DataType::INT64); 21441 arg_counterDataTypeEnum->add_int64value((uintptr_t)counterDataTypeEnum); 21442 21443 // copy argument rawCounterMaxValue 21444 GLMessage_DataType *arg_rawCounterMaxValue = glmsg.add_args(); 21445 arg_rawCounterMaxValue->set_isarray(false); 21446 arg_rawCounterMaxValue->set_type(GLMessage::DataType::INT64); 21447 arg_rawCounterMaxValue->add_int64value((uintptr_t)rawCounterMaxValue); 21448 21449 // call function 21450 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21451 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21452 glContext->hooks->gl.glGetPerfCounterInfoINTEL(queryId, counterId, counterNameLength, counterName, counterDescLength, counterDesc, counterOffset, counterDataSize, counterTypeEnum, counterDataTypeEnum, rawCounterMaxValue); 21453 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21454 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21455 21456 void *pointerArgs[] = { 21457 (void *) counterName, 21458 (void *) counterDesc, 21459 (void *) counterOffset, 21460 (void *) counterDataSize, 21461 (void *) counterTypeEnum, 21462 (void *) counterDataTypeEnum, 21463 (void *) rawCounterMaxValue, 21464 }; 21465 21466 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21467 threadStartTime, threadEndTime, 21468 &glmsg, pointerArgs); 21469 glContext->traceGLMessage(&glmsg); 21470 } 21471 21472 void GLTrace_glGetPerfQueryDataINTEL(GLuint queryHandle, GLuint flags, GLsizei dataSize, GLvoid * data, GLuint * bytesWritten) { 21473 GLMessage glmsg; 21474 GLTraceContext *glContext = getGLTraceContext(); 21475 21476 glmsg.set_function(GLMessage::glGetPerfQueryDataINTEL); 21477 21478 // copy argument queryHandle 21479 GLMessage_DataType *arg_queryHandle = glmsg.add_args(); 21480 arg_queryHandle->set_isarray(false); 21481 arg_queryHandle->set_type(GLMessage::DataType::INT); 21482 arg_queryHandle->add_intvalue(queryHandle); 21483 21484 // copy argument flags 21485 GLMessage_DataType *arg_flags = glmsg.add_args(); 21486 arg_flags->set_isarray(false); 21487 arg_flags->set_type(GLMessage::DataType::INT); 21488 arg_flags->add_intvalue(flags); 21489 21490 // copy argument dataSize 21491 GLMessage_DataType *arg_dataSize = glmsg.add_args(); 21492 arg_dataSize->set_isarray(false); 21493 arg_dataSize->set_type(GLMessage::DataType::INT); 21494 arg_dataSize->add_intvalue(dataSize); 21495 21496 // copy argument data 21497 GLMessage_DataType *arg_data = glmsg.add_args(); 21498 arg_data->set_isarray(false); 21499 arg_data->set_type(GLMessage::DataType::INT64); 21500 arg_data->add_int64value((uintptr_t)data); 21501 21502 // copy argument bytesWritten 21503 GLMessage_DataType *arg_bytesWritten = glmsg.add_args(); 21504 arg_bytesWritten->set_isarray(false); 21505 arg_bytesWritten->set_type(GLMessage::DataType::INT64); 21506 arg_bytesWritten->add_int64value((uintptr_t)bytesWritten); 21507 21508 // call function 21509 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21510 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21511 glContext->hooks->gl.glGetPerfQueryDataINTEL(queryHandle, flags, dataSize, data, bytesWritten); 21512 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21513 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21514 21515 void *pointerArgs[] = { 21516 (void *) data, 21517 (void *) bytesWritten, 21518 }; 21519 21520 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21521 threadStartTime, threadEndTime, 21522 &glmsg, pointerArgs); 21523 glContext->traceGLMessage(&glmsg); 21524 } 21525 21526 void GLTrace_glGetPerfQueryIdByNameINTEL(GLchar * queryName, GLuint * queryId) { 21527 GLMessage glmsg; 21528 GLTraceContext *glContext = getGLTraceContext(); 21529 21530 glmsg.set_function(GLMessage::glGetPerfQueryIdByNameINTEL); 21531 21532 // copy argument queryName 21533 GLMessage_DataType *arg_queryName = glmsg.add_args(); 21534 arg_queryName->set_isarray(false); 21535 arg_queryName->set_type(GLMessage::DataType::INT64); 21536 arg_queryName->add_int64value((uintptr_t)queryName); 21537 21538 // copy argument queryId 21539 GLMessage_DataType *arg_queryId = glmsg.add_args(); 21540 arg_queryId->set_isarray(false); 21541 arg_queryId->set_type(GLMessage::DataType::INT64); 21542 arg_queryId->add_int64value((uintptr_t)queryId); 21543 21544 // call function 21545 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21546 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21547 glContext->hooks->gl.glGetPerfQueryIdByNameINTEL(queryName, queryId); 21548 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21549 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21550 21551 void *pointerArgs[] = { 21552 (void *) queryName, 21553 (void *) queryId, 21554 }; 21555 21556 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21557 threadStartTime, threadEndTime, 21558 &glmsg, pointerArgs); 21559 glContext->traceGLMessage(&glmsg); 21560 } 21561 21562 void GLTrace_glGetPerfQueryInfoINTEL(GLuint queryId, GLuint queryNameLength, GLchar * queryName, GLuint * dataSize, GLuint * noCounters, GLuint * noInstances, GLuint * capsMask) { 21563 GLMessage glmsg; 21564 GLTraceContext *glContext = getGLTraceContext(); 21565 21566 glmsg.set_function(GLMessage::glGetPerfQueryInfoINTEL); 21567 21568 // copy argument queryId 21569 GLMessage_DataType *arg_queryId = glmsg.add_args(); 21570 arg_queryId->set_isarray(false); 21571 arg_queryId->set_type(GLMessage::DataType::INT); 21572 arg_queryId->add_intvalue(queryId); 21573 21574 // copy argument queryNameLength 21575 GLMessage_DataType *arg_queryNameLength = glmsg.add_args(); 21576 arg_queryNameLength->set_isarray(false); 21577 arg_queryNameLength->set_type(GLMessage::DataType::INT); 21578 arg_queryNameLength->add_intvalue(queryNameLength); 21579 21580 // copy argument queryName 21581 GLMessage_DataType *arg_queryName = glmsg.add_args(); 21582 arg_queryName->set_isarray(false); 21583 arg_queryName->set_type(GLMessage::DataType::INT64); 21584 arg_queryName->add_int64value((uintptr_t)queryName); 21585 21586 // copy argument dataSize 21587 GLMessage_DataType *arg_dataSize = glmsg.add_args(); 21588 arg_dataSize->set_isarray(false); 21589 arg_dataSize->set_type(GLMessage::DataType::INT64); 21590 arg_dataSize->add_int64value((uintptr_t)dataSize); 21591 21592 // copy argument noCounters 21593 GLMessage_DataType *arg_noCounters = glmsg.add_args(); 21594 arg_noCounters->set_isarray(false); 21595 arg_noCounters->set_type(GLMessage::DataType::INT64); 21596 arg_noCounters->add_int64value((uintptr_t)noCounters); 21597 21598 // copy argument noInstances 21599 GLMessage_DataType *arg_noInstances = glmsg.add_args(); 21600 arg_noInstances->set_isarray(false); 21601 arg_noInstances->set_type(GLMessage::DataType::INT64); 21602 arg_noInstances->add_int64value((uintptr_t)noInstances); 21603 21604 // copy argument capsMask 21605 GLMessage_DataType *arg_capsMask = glmsg.add_args(); 21606 arg_capsMask->set_isarray(false); 21607 arg_capsMask->set_type(GLMessage::DataType::INT64); 21608 arg_capsMask->add_int64value((uintptr_t)capsMask); 21609 21610 // call function 21611 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21612 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21613 glContext->hooks->gl.glGetPerfQueryInfoINTEL(queryId, queryNameLength, queryName, dataSize, noCounters, noInstances, capsMask); 21614 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21615 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21616 21617 void *pointerArgs[] = { 21618 (void *) queryName, 21619 (void *) dataSize, 21620 (void *) noCounters, 21621 (void *) noInstances, 21622 (void *) capsMask, 21623 }; 21624 21625 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21626 threadStartTime, threadEndTime, 21627 &glmsg, pointerArgs); 21628 glContext->traceGLMessage(&glmsg); 21629 } 21630 21631 void GLTrace_glBlendParameteriNV(GLenum pname, GLint value) { 21632 GLMessage glmsg; 21633 GLTraceContext *glContext = getGLTraceContext(); 21634 21635 glmsg.set_function(GLMessage::glBlendParameteriNV); 21636 21637 // copy argument pname 21638 GLMessage_DataType *arg_pname = glmsg.add_args(); 21639 arg_pname->set_isarray(false); 21640 arg_pname->set_type(GLMessage::DataType::ENUM); 21641 arg_pname->add_intvalue((int)pname); 21642 21643 // copy argument value 21644 GLMessage_DataType *arg_value = glmsg.add_args(); 21645 arg_value->set_isarray(false); 21646 arg_value->set_type(GLMessage::DataType::INT); 21647 arg_value->add_intvalue(value); 21648 21649 // call function 21650 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21651 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21652 glContext->hooks->gl.glBlendParameteriNV(pname, value); 21653 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21654 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21655 21656 void *pointerArgs[] = { 21657 }; 21658 21659 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21660 threadStartTime, threadEndTime, 21661 &glmsg, pointerArgs); 21662 glContext->traceGLMessage(&glmsg); 21663 } 21664 21665 void GLTrace_glBlendBarrierNV(void) { 21666 GLMessage glmsg; 21667 GLTraceContext *glContext = getGLTraceContext(); 21668 21669 glmsg.set_function(GLMessage::glBlendBarrierNV); 21670 21671 // call function 21672 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21673 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21674 glContext->hooks->gl.glBlendBarrierNV(); 21675 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21676 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21677 21678 void *pointerArgs[] = { 21679 }; 21680 21681 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21682 threadStartTime, threadEndTime, 21683 &glmsg, pointerArgs); 21684 glContext->traceGLMessage(&glmsg); 21685 } 21686 21687 void GLTrace_glCopyBufferSubDataNV(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { 21688 GLMessage glmsg; 21689 GLTraceContext *glContext = getGLTraceContext(); 21690 21691 glmsg.set_function(GLMessage::glCopyBufferSubDataNV); 21692 21693 // copy argument readTarget 21694 GLMessage_DataType *arg_readTarget = glmsg.add_args(); 21695 arg_readTarget->set_isarray(false); 21696 arg_readTarget->set_type(GLMessage::DataType::ENUM); 21697 arg_readTarget->add_intvalue((int)readTarget); 21698 21699 // copy argument writeTarget 21700 GLMessage_DataType *arg_writeTarget = glmsg.add_args(); 21701 arg_writeTarget->set_isarray(false); 21702 arg_writeTarget->set_type(GLMessage::DataType::ENUM); 21703 arg_writeTarget->add_intvalue((int)writeTarget); 21704 21705 // copy argument readOffset 21706 GLMessage_DataType *arg_readOffset = glmsg.add_args(); 21707 arg_readOffset->set_isarray(false); 21708 arg_readOffset->set_type(GLMessage::DataType::INT); 21709 arg_readOffset->add_intvalue(readOffset); 21710 21711 // copy argument writeOffset 21712 GLMessage_DataType *arg_writeOffset = glmsg.add_args(); 21713 arg_writeOffset->set_isarray(false); 21714 arg_writeOffset->set_type(GLMessage::DataType::INT); 21715 arg_writeOffset->add_intvalue(writeOffset); 21716 21717 // copy argument size 21718 GLMessage_DataType *arg_size = glmsg.add_args(); 21719 arg_size->set_isarray(false); 21720 arg_size->set_type(GLMessage::DataType::INT); 21721 arg_size->add_intvalue(size); 21722 21723 // call function 21724 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21725 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21726 glContext->hooks->gl.glCopyBufferSubDataNV(readTarget, writeTarget, readOffset, writeOffset, size); 21727 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21728 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21729 21730 void *pointerArgs[] = { 21731 }; 21732 21733 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21734 threadStartTime, threadEndTime, 21735 &glmsg, pointerArgs); 21736 glContext->traceGLMessage(&glmsg); 21737 } 21738 21739 void GLTrace_glCoverageMaskNV(GLboolean mask) { 21740 GLMessage glmsg; 21741 GLTraceContext *glContext = getGLTraceContext(); 21742 21743 glmsg.set_function(GLMessage::glCoverageMaskNV); 21744 21745 // copy argument mask 21746 GLMessage_DataType *arg_mask = glmsg.add_args(); 21747 arg_mask->set_isarray(false); 21748 arg_mask->set_type(GLMessage::DataType::BOOL); 21749 arg_mask->add_boolvalue(mask); 21750 21751 // call function 21752 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21753 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21754 glContext->hooks->gl.glCoverageMaskNV(mask); 21755 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21756 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21757 21758 void *pointerArgs[] = { 21759 }; 21760 21761 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21762 threadStartTime, threadEndTime, 21763 &glmsg, pointerArgs); 21764 glContext->traceGLMessage(&glmsg); 21765 } 21766 21767 void GLTrace_glCoverageOperationNV(GLenum operation) { 21768 GLMessage glmsg; 21769 GLTraceContext *glContext = getGLTraceContext(); 21770 21771 glmsg.set_function(GLMessage::glCoverageOperationNV); 21772 21773 // copy argument operation 21774 GLMessage_DataType *arg_operation = glmsg.add_args(); 21775 arg_operation->set_isarray(false); 21776 arg_operation->set_type(GLMessage::DataType::ENUM); 21777 arg_operation->add_intvalue((int)operation); 21778 21779 // call function 21780 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21781 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21782 glContext->hooks->gl.glCoverageOperationNV(operation); 21783 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21784 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21785 21786 void *pointerArgs[] = { 21787 }; 21788 21789 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21790 threadStartTime, threadEndTime, 21791 &glmsg, pointerArgs); 21792 glContext->traceGLMessage(&glmsg); 21793 } 21794 21795 void GLTrace_glDrawBuffersNV(GLsizei n, const GLenum * bufs) { 21796 GLMessage glmsg; 21797 GLTraceContext *glContext = getGLTraceContext(); 21798 21799 glmsg.set_function(GLMessage::glDrawBuffersNV); 21800 21801 // copy argument n 21802 GLMessage_DataType *arg_n = glmsg.add_args(); 21803 arg_n->set_isarray(false); 21804 arg_n->set_type(GLMessage::DataType::INT); 21805 arg_n->add_intvalue(n); 21806 21807 // copy argument bufs 21808 GLMessage_DataType *arg_bufs = glmsg.add_args(); 21809 arg_bufs->set_isarray(false); 21810 arg_bufs->set_type(GLMessage::DataType::INT64); 21811 arg_bufs->add_int64value((uintptr_t)bufs); 21812 21813 // call function 21814 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21815 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21816 glContext->hooks->gl.glDrawBuffersNV(n, bufs); 21817 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21818 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21819 21820 void *pointerArgs[] = { 21821 (void *) bufs, 21822 }; 21823 21824 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21825 threadStartTime, threadEndTime, 21826 &glmsg, pointerArgs); 21827 glContext->traceGLMessage(&glmsg); 21828 } 21829 21830 void GLTrace_glDrawArraysInstancedNV(GLenum mode, GLint first, GLsizei count, GLsizei primcount) { 21831 GLMessage glmsg; 21832 GLTraceContext *glContext = getGLTraceContext(); 21833 21834 glmsg.set_function(GLMessage::glDrawArraysInstancedNV); 21835 21836 // copy argument mode 21837 GLMessage_DataType *arg_mode = glmsg.add_args(); 21838 arg_mode->set_isarray(false); 21839 arg_mode->set_type(GLMessage::DataType::ENUM); 21840 arg_mode->add_intvalue((int)mode); 21841 21842 // copy argument first 21843 GLMessage_DataType *arg_first = glmsg.add_args(); 21844 arg_first->set_isarray(false); 21845 arg_first->set_type(GLMessage::DataType::INT); 21846 arg_first->add_intvalue(first); 21847 21848 // copy argument count 21849 GLMessage_DataType *arg_count = glmsg.add_args(); 21850 arg_count->set_isarray(false); 21851 arg_count->set_type(GLMessage::DataType::INT); 21852 arg_count->add_intvalue(count); 21853 21854 // copy argument primcount 21855 GLMessage_DataType *arg_primcount = glmsg.add_args(); 21856 arg_primcount->set_isarray(false); 21857 arg_primcount->set_type(GLMessage::DataType::INT); 21858 arg_primcount->add_intvalue(primcount); 21859 21860 // call function 21861 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21862 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21863 glContext->hooks->gl.glDrawArraysInstancedNV(mode, first, count, primcount); 21864 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21865 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21866 21867 void *pointerArgs[] = { 21868 }; 21869 21870 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21871 threadStartTime, threadEndTime, 21872 &glmsg, pointerArgs); 21873 glContext->traceGLMessage(&glmsg); 21874 } 21875 21876 void GLTrace_glDrawElementsInstancedNV(GLenum mode, GLsizei count, GLenum type, const void * indices, GLsizei primcount) { 21877 GLMessage glmsg; 21878 GLTraceContext *glContext = getGLTraceContext(); 21879 21880 glmsg.set_function(GLMessage::glDrawElementsInstancedNV); 21881 21882 // copy argument mode 21883 GLMessage_DataType *arg_mode = glmsg.add_args(); 21884 arg_mode->set_isarray(false); 21885 arg_mode->set_type(GLMessage::DataType::ENUM); 21886 arg_mode->add_intvalue((int)mode); 21887 21888 // copy argument count 21889 GLMessage_DataType *arg_count = glmsg.add_args(); 21890 arg_count->set_isarray(false); 21891 arg_count->set_type(GLMessage::DataType::INT); 21892 arg_count->add_intvalue(count); 21893 21894 // copy argument type 21895 GLMessage_DataType *arg_type = glmsg.add_args(); 21896 arg_type->set_isarray(false); 21897 arg_type->set_type(GLMessage::DataType::ENUM); 21898 arg_type->add_intvalue((int)type); 21899 21900 // copy argument indices 21901 GLMessage_DataType *arg_indices = glmsg.add_args(); 21902 arg_indices->set_isarray(false); 21903 arg_indices->set_type(GLMessage::DataType::INT64); 21904 arg_indices->add_int64value((uintptr_t)indices); 21905 21906 // copy argument primcount 21907 GLMessage_DataType *arg_primcount = glmsg.add_args(); 21908 arg_primcount->set_isarray(false); 21909 arg_primcount->set_type(GLMessage::DataType::INT); 21910 arg_primcount->add_intvalue(primcount); 21911 21912 // call function 21913 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21914 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21915 glContext->hooks->gl.glDrawElementsInstancedNV(mode, count, type, indices, primcount); 21916 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21917 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21918 21919 void *pointerArgs[] = { 21920 (void *) indices, 21921 }; 21922 21923 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21924 threadStartTime, threadEndTime, 21925 &glmsg, pointerArgs); 21926 glContext->traceGLMessage(&glmsg); 21927 } 21928 21929 void GLTrace_glDeleteFencesNV(GLsizei n, const GLuint * fences) { 21930 GLMessage glmsg; 21931 GLTraceContext *glContext = getGLTraceContext(); 21932 21933 glmsg.set_function(GLMessage::glDeleteFencesNV); 21934 21935 // copy argument n 21936 GLMessage_DataType *arg_n = glmsg.add_args(); 21937 arg_n->set_isarray(false); 21938 arg_n->set_type(GLMessage::DataType::INT); 21939 arg_n->add_intvalue(n); 21940 21941 // copy argument fences 21942 GLMessage_DataType *arg_fences = glmsg.add_args(); 21943 arg_fences->set_isarray(false); 21944 arg_fences->set_type(GLMessage::DataType::INT64); 21945 arg_fences->add_int64value((uintptr_t)fences); 21946 21947 // call function 21948 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21949 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21950 glContext->hooks->gl.glDeleteFencesNV(n, fences); 21951 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21952 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21953 21954 void *pointerArgs[] = { 21955 (void *) fences, 21956 }; 21957 21958 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21959 threadStartTime, threadEndTime, 21960 &glmsg, pointerArgs); 21961 glContext->traceGLMessage(&glmsg); 21962 } 21963 21964 void GLTrace_glGenFencesNV(GLsizei n, GLuint * fences) { 21965 GLMessage glmsg; 21966 GLTraceContext *glContext = getGLTraceContext(); 21967 21968 glmsg.set_function(GLMessage::glGenFencesNV); 21969 21970 // copy argument n 21971 GLMessage_DataType *arg_n = glmsg.add_args(); 21972 arg_n->set_isarray(false); 21973 arg_n->set_type(GLMessage::DataType::INT); 21974 arg_n->add_intvalue(n); 21975 21976 // copy argument fences 21977 GLMessage_DataType *arg_fences = glmsg.add_args(); 21978 arg_fences->set_isarray(false); 21979 arg_fences->set_type(GLMessage::DataType::INT64); 21980 arg_fences->add_int64value((uintptr_t)fences); 21981 21982 // call function 21983 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 21984 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 21985 glContext->hooks->gl.glGenFencesNV(n, fences); 21986 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 21987 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 21988 21989 void *pointerArgs[] = { 21990 (void *) fences, 21991 }; 21992 21993 fixupGLMessage(glContext, wallStartTime, wallEndTime, 21994 threadStartTime, threadEndTime, 21995 &glmsg, pointerArgs); 21996 glContext->traceGLMessage(&glmsg); 21997 } 21998 21999 GLboolean GLTrace_glIsFenceNV(GLuint fence) { 22000 GLMessage glmsg; 22001 GLTraceContext *glContext = getGLTraceContext(); 22002 22003 glmsg.set_function(GLMessage::glIsFenceNV); 22004 22005 // copy argument fence 22006 GLMessage_DataType *arg_fence = glmsg.add_args(); 22007 arg_fence->set_isarray(false); 22008 arg_fence->set_type(GLMessage::DataType::INT); 22009 arg_fence->add_intvalue(fence); 22010 22011 // call function 22012 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22013 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22014 GLboolean retValue = glContext->hooks->gl.glIsFenceNV(fence); 22015 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22016 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22017 22018 // set return value 22019 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 22020 rt->set_isarray(false); 22021 rt->set_type(GLMessage::DataType::BOOL); 22022 rt->add_boolvalue(retValue); 22023 22024 void *pointerArgs[] = { 22025 }; 22026 22027 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22028 threadStartTime, threadEndTime, 22029 &glmsg, pointerArgs); 22030 glContext->traceGLMessage(&glmsg); 22031 22032 return retValue; 22033 } 22034 22035 GLboolean GLTrace_glTestFenceNV(GLuint fence) { 22036 GLMessage glmsg; 22037 GLTraceContext *glContext = getGLTraceContext(); 22038 22039 glmsg.set_function(GLMessage::glTestFenceNV); 22040 22041 // copy argument fence 22042 GLMessage_DataType *arg_fence = glmsg.add_args(); 22043 arg_fence->set_isarray(false); 22044 arg_fence->set_type(GLMessage::DataType::INT); 22045 arg_fence->add_intvalue(fence); 22046 22047 // call function 22048 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22049 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22050 GLboolean retValue = glContext->hooks->gl.glTestFenceNV(fence); 22051 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22052 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22053 22054 // set return value 22055 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 22056 rt->set_isarray(false); 22057 rt->set_type(GLMessage::DataType::BOOL); 22058 rt->add_boolvalue(retValue); 22059 22060 void *pointerArgs[] = { 22061 }; 22062 22063 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22064 threadStartTime, threadEndTime, 22065 &glmsg, pointerArgs); 22066 glContext->traceGLMessage(&glmsg); 22067 22068 return retValue; 22069 } 22070 22071 void GLTrace_glGetFenceivNV(GLuint fence, GLenum pname, GLint * params) { 22072 GLMessage glmsg; 22073 GLTraceContext *glContext = getGLTraceContext(); 22074 22075 glmsg.set_function(GLMessage::glGetFenceivNV); 22076 22077 // copy argument fence 22078 GLMessage_DataType *arg_fence = glmsg.add_args(); 22079 arg_fence->set_isarray(false); 22080 arg_fence->set_type(GLMessage::DataType::INT); 22081 arg_fence->add_intvalue(fence); 22082 22083 // copy argument pname 22084 GLMessage_DataType *arg_pname = glmsg.add_args(); 22085 arg_pname->set_isarray(false); 22086 arg_pname->set_type(GLMessage::DataType::ENUM); 22087 arg_pname->add_intvalue((int)pname); 22088 22089 // copy argument params 22090 GLMessage_DataType *arg_params = glmsg.add_args(); 22091 arg_params->set_isarray(false); 22092 arg_params->set_type(GLMessage::DataType::INT64); 22093 arg_params->add_int64value((uintptr_t)params); 22094 22095 // call function 22096 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22097 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22098 glContext->hooks->gl.glGetFenceivNV(fence, pname, params); 22099 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22100 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22101 22102 void *pointerArgs[] = { 22103 (void *) params, 22104 }; 22105 22106 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22107 threadStartTime, threadEndTime, 22108 &glmsg, pointerArgs); 22109 glContext->traceGLMessage(&glmsg); 22110 } 22111 22112 void GLTrace_glFinishFenceNV(GLuint fence) { 22113 GLMessage glmsg; 22114 GLTraceContext *glContext = getGLTraceContext(); 22115 22116 glmsg.set_function(GLMessage::glFinishFenceNV); 22117 22118 // copy argument fence 22119 GLMessage_DataType *arg_fence = glmsg.add_args(); 22120 arg_fence->set_isarray(false); 22121 arg_fence->set_type(GLMessage::DataType::INT); 22122 arg_fence->add_intvalue(fence); 22123 22124 // call function 22125 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22126 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22127 glContext->hooks->gl.glFinishFenceNV(fence); 22128 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22129 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22130 22131 void *pointerArgs[] = { 22132 }; 22133 22134 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22135 threadStartTime, threadEndTime, 22136 &glmsg, pointerArgs); 22137 glContext->traceGLMessage(&glmsg); 22138 } 22139 22140 void GLTrace_glSetFenceNV(GLuint fence, GLenum condition) { 22141 GLMessage glmsg; 22142 GLTraceContext *glContext = getGLTraceContext(); 22143 22144 glmsg.set_function(GLMessage::glSetFenceNV); 22145 22146 // copy argument fence 22147 GLMessage_DataType *arg_fence = glmsg.add_args(); 22148 arg_fence->set_isarray(false); 22149 arg_fence->set_type(GLMessage::DataType::INT); 22150 arg_fence->add_intvalue(fence); 22151 22152 // copy argument condition 22153 GLMessage_DataType *arg_condition = glmsg.add_args(); 22154 arg_condition->set_isarray(false); 22155 arg_condition->set_type(GLMessage::DataType::ENUM); 22156 arg_condition->add_intvalue((int)condition); 22157 22158 // call function 22159 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22160 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22161 glContext->hooks->gl.glSetFenceNV(fence, condition); 22162 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22163 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22164 22165 void *pointerArgs[] = { 22166 }; 22167 22168 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22169 threadStartTime, threadEndTime, 22170 &glmsg, pointerArgs); 22171 glContext->traceGLMessage(&glmsg); 22172 } 22173 22174 void GLTrace_glBlitFramebufferNV(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { 22175 GLMessage glmsg; 22176 GLTraceContext *glContext = getGLTraceContext(); 22177 22178 glmsg.set_function(GLMessage::glBlitFramebufferNV); 22179 22180 // copy argument srcX0 22181 GLMessage_DataType *arg_srcX0 = glmsg.add_args(); 22182 arg_srcX0->set_isarray(false); 22183 arg_srcX0->set_type(GLMessage::DataType::INT); 22184 arg_srcX0->add_intvalue(srcX0); 22185 22186 // copy argument srcY0 22187 GLMessage_DataType *arg_srcY0 = glmsg.add_args(); 22188 arg_srcY0->set_isarray(false); 22189 arg_srcY0->set_type(GLMessage::DataType::INT); 22190 arg_srcY0->add_intvalue(srcY0); 22191 22192 // copy argument srcX1 22193 GLMessage_DataType *arg_srcX1 = glmsg.add_args(); 22194 arg_srcX1->set_isarray(false); 22195 arg_srcX1->set_type(GLMessage::DataType::INT); 22196 arg_srcX1->add_intvalue(srcX1); 22197 22198 // copy argument srcY1 22199 GLMessage_DataType *arg_srcY1 = glmsg.add_args(); 22200 arg_srcY1->set_isarray(false); 22201 arg_srcY1->set_type(GLMessage::DataType::INT); 22202 arg_srcY1->add_intvalue(srcY1); 22203 22204 // copy argument dstX0 22205 GLMessage_DataType *arg_dstX0 = glmsg.add_args(); 22206 arg_dstX0->set_isarray(false); 22207 arg_dstX0->set_type(GLMessage::DataType::INT); 22208 arg_dstX0->add_intvalue(dstX0); 22209 22210 // copy argument dstY0 22211 GLMessage_DataType *arg_dstY0 = glmsg.add_args(); 22212 arg_dstY0->set_isarray(false); 22213 arg_dstY0->set_type(GLMessage::DataType::INT); 22214 arg_dstY0->add_intvalue(dstY0); 22215 22216 // copy argument dstX1 22217 GLMessage_DataType *arg_dstX1 = glmsg.add_args(); 22218 arg_dstX1->set_isarray(false); 22219 arg_dstX1->set_type(GLMessage::DataType::INT); 22220 arg_dstX1->add_intvalue(dstX1); 22221 22222 // copy argument dstY1 22223 GLMessage_DataType *arg_dstY1 = glmsg.add_args(); 22224 arg_dstY1->set_isarray(false); 22225 arg_dstY1->set_type(GLMessage::DataType::INT); 22226 arg_dstY1->add_intvalue(dstY1); 22227 22228 // copy argument mask 22229 GLMessage_DataType *arg_mask = glmsg.add_args(); 22230 arg_mask->set_isarray(false); 22231 arg_mask->set_type(GLMessage::DataType::INT); 22232 arg_mask->add_intvalue(mask); 22233 22234 // copy argument filter 22235 GLMessage_DataType *arg_filter = glmsg.add_args(); 22236 arg_filter->set_isarray(false); 22237 arg_filter->set_type(GLMessage::DataType::ENUM); 22238 arg_filter->add_intvalue((int)filter); 22239 22240 // call function 22241 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22242 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22243 glContext->hooks->gl.glBlitFramebufferNV(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); 22244 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22245 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22246 22247 void *pointerArgs[] = { 22248 }; 22249 22250 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22251 threadStartTime, threadEndTime, 22252 &glmsg, pointerArgs); 22253 glContext->traceGLMessage(&glmsg); 22254 } 22255 22256 void GLTrace_glRenderbufferStorageMultisampleNV(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { 22257 GLMessage glmsg; 22258 GLTraceContext *glContext = getGLTraceContext(); 22259 22260 glmsg.set_function(GLMessage::glRenderbufferStorageMultisampleNV); 22261 22262 // copy argument target 22263 GLMessage_DataType *arg_target = glmsg.add_args(); 22264 arg_target->set_isarray(false); 22265 arg_target->set_type(GLMessage::DataType::ENUM); 22266 arg_target->add_intvalue((int)target); 22267 22268 // copy argument samples 22269 GLMessage_DataType *arg_samples = glmsg.add_args(); 22270 arg_samples->set_isarray(false); 22271 arg_samples->set_type(GLMessage::DataType::INT); 22272 arg_samples->add_intvalue(samples); 22273 22274 // copy argument internalformat 22275 GLMessage_DataType *arg_internalformat = glmsg.add_args(); 22276 arg_internalformat->set_isarray(false); 22277 arg_internalformat->set_type(GLMessage::DataType::ENUM); 22278 arg_internalformat->add_intvalue((int)internalformat); 22279 22280 // copy argument width 22281 GLMessage_DataType *arg_width = glmsg.add_args(); 22282 arg_width->set_isarray(false); 22283 arg_width->set_type(GLMessage::DataType::INT); 22284 arg_width->add_intvalue(width); 22285 22286 // copy argument height 22287 GLMessage_DataType *arg_height = glmsg.add_args(); 22288 arg_height->set_isarray(false); 22289 arg_height->set_type(GLMessage::DataType::INT); 22290 arg_height->add_intvalue(height); 22291 22292 // call function 22293 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22294 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22295 glContext->hooks->gl.glRenderbufferStorageMultisampleNV(target, samples, internalformat, width, height); 22296 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22297 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22298 22299 void *pointerArgs[] = { 22300 }; 22301 22302 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22303 threadStartTime, threadEndTime, 22304 &glmsg, pointerArgs); 22305 glContext->traceGLMessage(&glmsg); 22306 } 22307 22308 void GLTrace_glVertexAttribDivisorNV(GLuint index, GLuint divisor) { 22309 GLMessage glmsg; 22310 GLTraceContext *glContext = getGLTraceContext(); 22311 22312 glmsg.set_function(GLMessage::glVertexAttribDivisorNV); 22313 22314 // copy argument index 22315 GLMessage_DataType *arg_index = glmsg.add_args(); 22316 arg_index->set_isarray(false); 22317 arg_index->set_type(GLMessage::DataType::INT); 22318 arg_index->add_intvalue(index); 22319 22320 // copy argument divisor 22321 GLMessage_DataType *arg_divisor = glmsg.add_args(); 22322 arg_divisor->set_isarray(false); 22323 arg_divisor->set_type(GLMessage::DataType::INT); 22324 arg_divisor->add_intvalue(divisor); 22325 22326 // call function 22327 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22328 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22329 glContext->hooks->gl.glVertexAttribDivisorNV(index, divisor); 22330 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22331 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22332 22333 void *pointerArgs[] = { 22334 }; 22335 22336 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22337 threadStartTime, threadEndTime, 22338 &glmsg, pointerArgs); 22339 glContext->traceGLMessage(&glmsg); 22340 } 22341 22342 void GLTrace_glUniformMatrix2x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 22343 GLMessage glmsg; 22344 GLTraceContext *glContext = getGLTraceContext(); 22345 22346 glmsg.set_function(GLMessage::glUniformMatrix2x3fvNV); 22347 22348 // copy argument location 22349 GLMessage_DataType *arg_location = glmsg.add_args(); 22350 arg_location->set_isarray(false); 22351 arg_location->set_type(GLMessage::DataType::INT); 22352 arg_location->add_intvalue(location); 22353 22354 // copy argument count 22355 GLMessage_DataType *arg_count = glmsg.add_args(); 22356 arg_count->set_isarray(false); 22357 arg_count->set_type(GLMessage::DataType::INT); 22358 arg_count->add_intvalue(count); 22359 22360 // copy argument transpose 22361 GLMessage_DataType *arg_transpose = glmsg.add_args(); 22362 arg_transpose->set_isarray(false); 22363 arg_transpose->set_type(GLMessage::DataType::BOOL); 22364 arg_transpose->add_boolvalue(transpose); 22365 22366 // copy argument value 22367 GLMessage_DataType *arg_value = glmsg.add_args(); 22368 arg_value->set_isarray(false); 22369 arg_value->set_type(GLMessage::DataType::INT64); 22370 arg_value->add_int64value((uintptr_t)value); 22371 22372 // call function 22373 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22374 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22375 glContext->hooks->gl.glUniformMatrix2x3fvNV(location, count, transpose, value); 22376 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22377 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22378 22379 void *pointerArgs[] = { 22380 (void *) value, 22381 }; 22382 22383 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22384 threadStartTime, threadEndTime, 22385 &glmsg, pointerArgs); 22386 glContext->traceGLMessage(&glmsg); 22387 } 22388 22389 void GLTrace_glUniformMatrix3x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 22390 GLMessage glmsg; 22391 GLTraceContext *glContext = getGLTraceContext(); 22392 22393 glmsg.set_function(GLMessage::glUniformMatrix3x2fvNV); 22394 22395 // copy argument location 22396 GLMessage_DataType *arg_location = glmsg.add_args(); 22397 arg_location->set_isarray(false); 22398 arg_location->set_type(GLMessage::DataType::INT); 22399 arg_location->add_intvalue(location); 22400 22401 // copy argument count 22402 GLMessage_DataType *arg_count = glmsg.add_args(); 22403 arg_count->set_isarray(false); 22404 arg_count->set_type(GLMessage::DataType::INT); 22405 arg_count->add_intvalue(count); 22406 22407 // copy argument transpose 22408 GLMessage_DataType *arg_transpose = glmsg.add_args(); 22409 arg_transpose->set_isarray(false); 22410 arg_transpose->set_type(GLMessage::DataType::BOOL); 22411 arg_transpose->add_boolvalue(transpose); 22412 22413 // copy argument value 22414 GLMessage_DataType *arg_value = glmsg.add_args(); 22415 arg_value->set_isarray(false); 22416 arg_value->set_type(GLMessage::DataType::INT64); 22417 arg_value->add_int64value((uintptr_t)value); 22418 22419 // call function 22420 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22421 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22422 glContext->hooks->gl.glUniformMatrix3x2fvNV(location, count, transpose, value); 22423 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22424 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22425 22426 void *pointerArgs[] = { 22427 (void *) value, 22428 }; 22429 22430 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22431 threadStartTime, threadEndTime, 22432 &glmsg, pointerArgs); 22433 glContext->traceGLMessage(&glmsg); 22434 } 22435 22436 void GLTrace_glUniformMatrix2x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 22437 GLMessage glmsg; 22438 GLTraceContext *glContext = getGLTraceContext(); 22439 22440 glmsg.set_function(GLMessage::glUniformMatrix2x4fvNV); 22441 22442 // copy argument location 22443 GLMessage_DataType *arg_location = glmsg.add_args(); 22444 arg_location->set_isarray(false); 22445 arg_location->set_type(GLMessage::DataType::INT); 22446 arg_location->add_intvalue(location); 22447 22448 // copy argument count 22449 GLMessage_DataType *arg_count = glmsg.add_args(); 22450 arg_count->set_isarray(false); 22451 arg_count->set_type(GLMessage::DataType::INT); 22452 arg_count->add_intvalue(count); 22453 22454 // copy argument transpose 22455 GLMessage_DataType *arg_transpose = glmsg.add_args(); 22456 arg_transpose->set_isarray(false); 22457 arg_transpose->set_type(GLMessage::DataType::BOOL); 22458 arg_transpose->add_boolvalue(transpose); 22459 22460 // copy argument value 22461 GLMessage_DataType *arg_value = glmsg.add_args(); 22462 arg_value->set_isarray(false); 22463 arg_value->set_type(GLMessage::DataType::INT64); 22464 arg_value->add_int64value((uintptr_t)value); 22465 22466 // call function 22467 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22468 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22469 glContext->hooks->gl.glUniformMatrix2x4fvNV(location, count, transpose, value); 22470 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22471 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22472 22473 void *pointerArgs[] = { 22474 (void *) value, 22475 }; 22476 22477 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22478 threadStartTime, threadEndTime, 22479 &glmsg, pointerArgs); 22480 glContext->traceGLMessage(&glmsg); 22481 } 22482 22483 void GLTrace_glUniformMatrix4x2fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 22484 GLMessage glmsg; 22485 GLTraceContext *glContext = getGLTraceContext(); 22486 22487 glmsg.set_function(GLMessage::glUniformMatrix4x2fvNV); 22488 22489 // copy argument location 22490 GLMessage_DataType *arg_location = glmsg.add_args(); 22491 arg_location->set_isarray(false); 22492 arg_location->set_type(GLMessage::DataType::INT); 22493 arg_location->add_intvalue(location); 22494 22495 // copy argument count 22496 GLMessage_DataType *arg_count = glmsg.add_args(); 22497 arg_count->set_isarray(false); 22498 arg_count->set_type(GLMessage::DataType::INT); 22499 arg_count->add_intvalue(count); 22500 22501 // copy argument transpose 22502 GLMessage_DataType *arg_transpose = glmsg.add_args(); 22503 arg_transpose->set_isarray(false); 22504 arg_transpose->set_type(GLMessage::DataType::BOOL); 22505 arg_transpose->add_boolvalue(transpose); 22506 22507 // copy argument value 22508 GLMessage_DataType *arg_value = glmsg.add_args(); 22509 arg_value->set_isarray(false); 22510 arg_value->set_type(GLMessage::DataType::INT64); 22511 arg_value->add_int64value((uintptr_t)value); 22512 22513 // call function 22514 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22515 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22516 glContext->hooks->gl.glUniformMatrix4x2fvNV(location, count, transpose, value); 22517 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22518 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22519 22520 void *pointerArgs[] = { 22521 (void *) value, 22522 }; 22523 22524 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22525 threadStartTime, threadEndTime, 22526 &glmsg, pointerArgs); 22527 glContext->traceGLMessage(&glmsg); 22528 } 22529 22530 void GLTrace_glUniformMatrix3x4fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 22531 GLMessage glmsg; 22532 GLTraceContext *glContext = getGLTraceContext(); 22533 22534 glmsg.set_function(GLMessage::glUniformMatrix3x4fvNV); 22535 22536 // copy argument location 22537 GLMessage_DataType *arg_location = glmsg.add_args(); 22538 arg_location->set_isarray(false); 22539 arg_location->set_type(GLMessage::DataType::INT); 22540 arg_location->add_intvalue(location); 22541 22542 // copy argument count 22543 GLMessage_DataType *arg_count = glmsg.add_args(); 22544 arg_count->set_isarray(false); 22545 arg_count->set_type(GLMessage::DataType::INT); 22546 arg_count->add_intvalue(count); 22547 22548 // copy argument transpose 22549 GLMessage_DataType *arg_transpose = glmsg.add_args(); 22550 arg_transpose->set_isarray(false); 22551 arg_transpose->set_type(GLMessage::DataType::BOOL); 22552 arg_transpose->add_boolvalue(transpose); 22553 22554 // copy argument value 22555 GLMessage_DataType *arg_value = glmsg.add_args(); 22556 arg_value->set_isarray(false); 22557 arg_value->set_type(GLMessage::DataType::INT64); 22558 arg_value->add_int64value((uintptr_t)value); 22559 22560 // call function 22561 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22562 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22563 glContext->hooks->gl.glUniformMatrix3x4fvNV(location, count, transpose, value); 22564 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22565 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22566 22567 void *pointerArgs[] = { 22568 (void *) value, 22569 }; 22570 22571 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22572 threadStartTime, threadEndTime, 22573 &glmsg, pointerArgs); 22574 glContext->traceGLMessage(&glmsg); 22575 } 22576 22577 void GLTrace_glUniformMatrix4x3fvNV(GLint location, GLsizei count, GLboolean transpose, const GLfloat * value) { 22578 GLMessage glmsg; 22579 GLTraceContext *glContext = getGLTraceContext(); 22580 22581 glmsg.set_function(GLMessage::glUniformMatrix4x3fvNV); 22582 22583 // copy argument location 22584 GLMessage_DataType *arg_location = glmsg.add_args(); 22585 arg_location->set_isarray(false); 22586 arg_location->set_type(GLMessage::DataType::INT); 22587 arg_location->add_intvalue(location); 22588 22589 // copy argument count 22590 GLMessage_DataType *arg_count = glmsg.add_args(); 22591 arg_count->set_isarray(false); 22592 arg_count->set_type(GLMessage::DataType::INT); 22593 arg_count->add_intvalue(count); 22594 22595 // copy argument transpose 22596 GLMessage_DataType *arg_transpose = glmsg.add_args(); 22597 arg_transpose->set_isarray(false); 22598 arg_transpose->set_type(GLMessage::DataType::BOOL); 22599 arg_transpose->add_boolvalue(transpose); 22600 22601 // copy argument value 22602 GLMessage_DataType *arg_value = glmsg.add_args(); 22603 arg_value->set_isarray(false); 22604 arg_value->set_type(GLMessage::DataType::INT64); 22605 arg_value->add_int64value((uintptr_t)value); 22606 22607 // call function 22608 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22609 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22610 glContext->hooks->gl.glUniformMatrix4x3fvNV(location, count, transpose, value); 22611 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22612 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22613 22614 void *pointerArgs[] = { 22615 (void *) value, 22616 }; 22617 22618 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22619 threadStartTime, threadEndTime, 22620 &glmsg, pointerArgs); 22621 glContext->traceGLMessage(&glmsg); 22622 } 22623 22624 void GLTrace_glReadBufferNV(GLenum mode) { 22625 GLMessage glmsg; 22626 GLTraceContext *glContext = getGLTraceContext(); 22627 22628 glmsg.set_function(GLMessage::glReadBufferNV); 22629 22630 // copy argument mode 22631 GLMessage_DataType *arg_mode = glmsg.add_args(); 22632 arg_mode->set_isarray(false); 22633 arg_mode->set_type(GLMessage::DataType::ENUM); 22634 arg_mode->add_intvalue((int)mode); 22635 22636 // call function 22637 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22638 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22639 glContext->hooks->gl.glReadBufferNV(mode); 22640 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22641 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22642 22643 void *pointerArgs[] = { 22644 }; 22645 22646 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22647 threadStartTime, threadEndTime, 22648 &glmsg, pointerArgs); 22649 glContext->traceGLMessage(&glmsg); 22650 } 22651 22652 void GLTrace_glAlphaFuncQCOM(GLenum func, GLclampf ref) { 22653 GLMessage glmsg; 22654 GLTraceContext *glContext = getGLTraceContext(); 22655 22656 glmsg.set_function(GLMessage::glAlphaFuncQCOM); 22657 22658 // copy argument func 22659 GLMessage_DataType *arg_func = glmsg.add_args(); 22660 arg_func->set_isarray(false); 22661 arg_func->set_type(GLMessage::DataType::ENUM); 22662 arg_func->add_intvalue((int)func); 22663 22664 // copy argument ref 22665 GLMessage_DataType *arg_ref = glmsg.add_args(); 22666 arg_ref->set_isarray(false); 22667 arg_ref->set_type(GLMessage::DataType::FLOAT); 22668 arg_ref->add_floatvalue(ref); 22669 22670 // call function 22671 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22672 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22673 glContext->hooks->gl.glAlphaFuncQCOM(func, ref); 22674 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22675 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22676 22677 void *pointerArgs[] = { 22678 }; 22679 22680 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22681 threadStartTime, threadEndTime, 22682 &glmsg, pointerArgs); 22683 glContext->traceGLMessage(&glmsg); 22684 } 22685 22686 void GLTrace_glGetDriverControlsQCOM(GLint * num, GLsizei size, GLuint * driverControls) { 22687 GLMessage glmsg; 22688 GLTraceContext *glContext = getGLTraceContext(); 22689 22690 glmsg.set_function(GLMessage::glGetDriverControlsQCOM); 22691 22692 // copy argument num 22693 GLMessage_DataType *arg_num = glmsg.add_args(); 22694 arg_num->set_isarray(false); 22695 arg_num->set_type(GLMessage::DataType::INT64); 22696 arg_num->add_int64value((uintptr_t)num); 22697 22698 // copy argument size 22699 GLMessage_DataType *arg_size = glmsg.add_args(); 22700 arg_size->set_isarray(false); 22701 arg_size->set_type(GLMessage::DataType::INT); 22702 arg_size->add_intvalue(size); 22703 22704 // copy argument driverControls 22705 GLMessage_DataType *arg_driverControls = glmsg.add_args(); 22706 arg_driverControls->set_isarray(false); 22707 arg_driverControls->set_type(GLMessage::DataType::INT64); 22708 arg_driverControls->add_int64value((uintptr_t)driverControls); 22709 22710 // call function 22711 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22712 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22713 glContext->hooks->gl.glGetDriverControlsQCOM(num, size, driverControls); 22714 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22715 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22716 22717 void *pointerArgs[] = { 22718 (void *) num, 22719 (void *) driverControls, 22720 }; 22721 22722 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22723 threadStartTime, threadEndTime, 22724 &glmsg, pointerArgs); 22725 glContext->traceGLMessage(&glmsg); 22726 } 22727 22728 void GLTrace_glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString) { 22729 GLMessage glmsg; 22730 GLTraceContext *glContext = getGLTraceContext(); 22731 22732 glmsg.set_function(GLMessage::glGetDriverControlStringQCOM); 22733 22734 // copy argument driverControl 22735 GLMessage_DataType *arg_driverControl = glmsg.add_args(); 22736 arg_driverControl->set_isarray(false); 22737 arg_driverControl->set_type(GLMessage::DataType::INT); 22738 arg_driverControl->add_intvalue(driverControl); 22739 22740 // copy argument bufSize 22741 GLMessage_DataType *arg_bufSize = glmsg.add_args(); 22742 arg_bufSize->set_isarray(false); 22743 arg_bufSize->set_type(GLMessage::DataType::INT); 22744 arg_bufSize->add_intvalue(bufSize); 22745 22746 // copy argument length 22747 GLMessage_DataType *arg_length = glmsg.add_args(); 22748 arg_length->set_isarray(false); 22749 arg_length->set_type(GLMessage::DataType::INT64); 22750 arg_length->add_int64value((uintptr_t)length); 22751 22752 // copy argument driverControlString 22753 GLMessage_DataType *arg_driverControlString = glmsg.add_args(); 22754 arg_driverControlString->set_isarray(false); 22755 arg_driverControlString->set_type(GLMessage::DataType::INT64); 22756 arg_driverControlString->add_int64value((uintptr_t)driverControlString); 22757 22758 // call function 22759 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22760 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22761 glContext->hooks->gl.glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString); 22762 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22763 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22764 22765 void *pointerArgs[] = { 22766 (void *) length, 22767 (void *) driverControlString, 22768 }; 22769 22770 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22771 threadStartTime, threadEndTime, 22772 &glmsg, pointerArgs); 22773 glContext->traceGLMessage(&glmsg); 22774 } 22775 22776 void GLTrace_glEnableDriverControlQCOM(GLuint driverControl) { 22777 GLMessage glmsg; 22778 GLTraceContext *glContext = getGLTraceContext(); 22779 22780 glmsg.set_function(GLMessage::glEnableDriverControlQCOM); 22781 22782 // copy argument driverControl 22783 GLMessage_DataType *arg_driverControl = glmsg.add_args(); 22784 arg_driverControl->set_isarray(false); 22785 arg_driverControl->set_type(GLMessage::DataType::INT); 22786 arg_driverControl->add_intvalue(driverControl); 22787 22788 // call function 22789 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22790 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22791 glContext->hooks->gl.glEnableDriverControlQCOM(driverControl); 22792 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22793 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22794 22795 void *pointerArgs[] = { 22796 }; 22797 22798 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22799 threadStartTime, threadEndTime, 22800 &glmsg, pointerArgs); 22801 glContext->traceGLMessage(&glmsg); 22802 } 22803 22804 void GLTrace_glDisableDriverControlQCOM(GLuint driverControl) { 22805 GLMessage glmsg; 22806 GLTraceContext *glContext = getGLTraceContext(); 22807 22808 glmsg.set_function(GLMessage::glDisableDriverControlQCOM); 22809 22810 // copy argument driverControl 22811 GLMessage_DataType *arg_driverControl = glmsg.add_args(); 22812 arg_driverControl->set_isarray(false); 22813 arg_driverControl->set_type(GLMessage::DataType::INT); 22814 arg_driverControl->add_intvalue(driverControl); 22815 22816 // call function 22817 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22818 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22819 glContext->hooks->gl.glDisableDriverControlQCOM(driverControl); 22820 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22821 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22822 22823 void *pointerArgs[] = { 22824 }; 22825 22826 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22827 threadStartTime, threadEndTime, 22828 &glmsg, pointerArgs); 22829 glContext->traceGLMessage(&glmsg); 22830 } 22831 22832 void GLTrace_glExtGetTexturesQCOM(GLuint * textures, GLint maxTextures, GLint * numTextures) { 22833 GLMessage glmsg; 22834 GLTraceContext *glContext = getGLTraceContext(); 22835 22836 glmsg.set_function(GLMessage::glExtGetTexturesQCOM); 22837 22838 // copy argument textures 22839 GLMessage_DataType *arg_textures = glmsg.add_args(); 22840 arg_textures->set_isarray(false); 22841 arg_textures->set_type(GLMessage::DataType::INT64); 22842 arg_textures->add_int64value((uintptr_t)textures); 22843 22844 // copy argument maxTextures 22845 GLMessage_DataType *arg_maxTextures = glmsg.add_args(); 22846 arg_maxTextures->set_isarray(false); 22847 arg_maxTextures->set_type(GLMessage::DataType::INT); 22848 arg_maxTextures->add_intvalue(maxTextures); 22849 22850 // copy argument numTextures 22851 GLMessage_DataType *arg_numTextures = glmsg.add_args(); 22852 arg_numTextures->set_isarray(false); 22853 arg_numTextures->set_type(GLMessage::DataType::INT64); 22854 arg_numTextures->add_int64value((uintptr_t)numTextures); 22855 22856 // call function 22857 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22858 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22859 glContext->hooks->gl.glExtGetTexturesQCOM(textures, maxTextures, numTextures); 22860 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22861 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22862 22863 void *pointerArgs[] = { 22864 (void *) textures, 22865 (void *) numTextures, 22866 }; 22867 22868 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22869 threadStartTime, threadEndTime, 22870 &glmsg, pointerArgs); 22871 glContext->traceGLMessage(&glmsg); 22872 } 22873 22874 void GLTrace_glExtGetBuffersQCOM(GLuint * buffers, GLint maxBuffers, GLint * numBuffers) { 22875 GLMessage glmsg; 22876 GLTraceContext *glContext = getGLTraceContext(); 22877 22878 glmsg.set_function(GLMessage::glExtGetBuffersQCOM); 22879 22880 // copy argument buffers 22881 GLMessage_DataType *arg_buffers = glmsg.add_args(); 22882 arg_buffers->set_isarray(false); 22883 arg_buffers->set_type(GLMessage::DataType::INT64); 22884 arg_buffers->add_int64value((uintptr_t)buffers); 22885 22886 // copy argument maxBuffers 22887 GLMessage_DataType *arg_maxBuffers = glmsg.add_args(); 22888 arg_maxBuffers->set_isarray(false); 22889 arg_maxBuffers->set_type(GLMessage::DataType::INT); 22890 arg_maxBuffers->add_intvalue(maxBuffers); 22891 22892 // copy argument numBuffers 22893 GLMessage_DataType *arg_numBuffers = glmsg.add_args(); 22894 arg_numBuffers->set_isarray(false); 22895 arg_numBuffers->set_type(GLMessage::DataType::INT64); 22896 arg_numBuffers->add_int64value((uintptr_t)numBuffers); 22897 22898 // call function 22899 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22900 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22901 glContext->hooks->gl.glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers); 22902 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22903 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22904 22905 void *pointerArgs[] = { 22906 (void *) buffers, 22907 (void *) numBuffers, 22908 }; 22909 22910 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22911 threadStartTime, threadEndTime, 22912 &glmsg, pointerArgs); 22913 glContext->traceGLMessage(&glmsg); 22914 } 22915 22916 void GLTrace_glExtGetRenderbuffersQCOM(GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers) { 22917 GLMessage glmsg; 22918 GLTraceContext *glContext = getGLTraceContext(); 22919 22920 glmsg.set_function(GLMessage::glExtGetRenderbuffersQCOM); 22921 22922 // copy argument renderbuffers 22923 GLMessage_DataType *arg_renderbuffers = glmsg.add_args(); 22924 arg_renderbuffers->set_isarray(false); 22925 arg_renderbuffers->set_type(GLMessage::DataType::INT64); 22926 arg_renderbuffers->add_int64value((uintptr_t)renderbuffers); 22927 22928 // copy argument maxRenderbuffers 22929 GLMessage_DataType *arg_maxRenderbuffers = glmsg.add_args(); 22930 arg_maxRenderbuffers->set_isarray(false); 22931 arg_maxRenderbuffers->set_type(GLMessage::DataType::INT); 22932 arg_maxRenderbuffers->add_intvalue(maxRenderbuffers); 22933 22934 // copy argument numRenderbuffers 22935 GLMessage_DataType *arg_numRenderbuffers = glmsg.add_args(); 22936 arg_numRenderbuffers->set_isarray(false); 22937 arg_numRenderbuffers->set_type(GLMessage::DataType::INT64); 22938 arg_numRenderbuffers->add_int64value((uintptr_t)numRenderbuffers); 22939 22940 // call function 22941 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22942 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22943 glContext->hooks->gl.glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers); 22944 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22945 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22946 22947 void *pointerArgs[] = { 22948 (void *) renderbuffers, 22949 (void *) numRenderbuffers, 22950 }; 22951 22952 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22953 threadStartTime, threadEndTime, 22954 &glmsg, pointerArgs); 22955 glContext->traceGLMessage(&glmsg); 22956 } 22957 22958 void GLTrace_glExtGetFramebuffersQCOM(GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers) { 22959 GLMessage glmsg; 22960 GLTraceContext *glContext = getGLTraceContext(); 22961 22962 glmsg.set_function(GLMessage::glExtGetFramebuffersQCOM); 22963 22964 // copy argument framebuffers 22965 GLMessage_DataType *arg_framebuffers = glmsg.add_args(); 22966 arg_framebuffers->set_isarray(false); 22967 arg_framebuffers->set_type(GLMessage::DataType::INT64); 22968 arg_framebuffers->add_int64value((uintptr_t)framebuffers); 22969 22970 // copy argument maxFramebuffers 22971 GLMessage_DataType *arg_maxFramebuffers = glmsg.add_args(); 22972 arg_maxFramebuffers->set_isarray(false); 22973 arg_maxFramebuffers->set_type(GLMessage::DataType::INT); 22974 arg_maxFramebuffers->add_intvalue(maxFramebuffers); 22975 22976 // copy argument numFramebuffers 22977 GLMessage_DataType *arg_numFramebuffers = glmsg.add_args(); 22978 arg_numFramebuffers->set_isarray(false); 22979 arg_numFramebuffers->set_type(GLMessage::DataType::INT64); 22980 arg_numFramebuffers->add_int64value((uintptr_t)numFramebuffers); 22981 22982 // call function 22983 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 22984 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 22985 glContext->hooks->gl.glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers); 22986 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 22987 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 22988 22989 void *pointerArgs[] = { 22990 (void *) framebuffers, 22991 (void *) numFramebuffers, 22992 }; 22993 22994 fixupGLMessage(glContext, wallStartTime, wallEndTime, 22995 threadStartTime, threadEndTime, 22996 &glmsg, pointerArgs); 22997 glContext->traceGLMessage(&glmsg); 22998 } 22999 23000 void GLTrace_glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params) { 23001 GLMessage glmsg; 23002 GLTraceContext *glContext = getGLTraceContext(); 23003 23004 glmsg.set_function(GLMessage::glExtGetTexLevelParameterivQCOM); 23005 23006 // copy argument texture 23007 GLMessage_DataType *arg_texture = glmsg.add_args(); 23008 arg_texture->set_isarray(false); 23009 arg_texture->set_type(GLMessage::DataType::INT); 23010 arg_texture->add_intvalue(texture); 23011 23012 // copy argument face 23013 GLMessage_DataType *arg_face = glmsg.add_args(); 23014 arg_face->set_isarray(false); 23015 arg_face->set_type(GLMessage::DataType::ENUM); 23016 arg_face->add_intvalue((int)face); 23017 23018 // copy argument level 23019 GLMessage_DataType *arg_level = glmsg.add_args(); 23020 arg_level->set_isarray(false); 23021 arg_level->set_type(GLMessage::DataType::INT); 23022 arg_level->add_intvalue(level); 23023 23024 // copy argument pname 23025 GLMessage_DataType *arg_pname = glmsg.add_args(); 23026 arg_pname->set_isarray(false); 23027 arg_pname->set_type(GLMessage::DataType::ENUM); 23028 arg_pname->add_intvalue((int)pname); 23029 23030 // copy argument params 23031 GLMessage_DataType *arg_params = glmsg.add_args(); 23032 arg_params->set_isarray(false); 23033 arg_params->set_type(GLMessage::DataType::INT64); 23034 arg_params->add_int64value((uintptr_t)params); 23035 23036 // call function 23037 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23038 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23039 glContext->hooks->gl.glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params); 23040 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23041 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23042 23043 void *pointerArgs[] = { 23044 (void *) params, 23045 }; 23046 23047 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23048 threadStartTime, threadEndTime, 23049 &glmsg, pointerArgs); 23050 glContext->traceGLMessage(&glmsg); 23051 } 23052 23053 void GLTrace_glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) { 23054 GLMessage glmsg; 23055 GLTraceContext *glContext = getGLTraceContext(); 23056 23057 glmsg.set_function(GLMessage::glExtTexObjectStateOverrideiQCOM); 23058 23059 // copy argument target 23060 GLMessage_DataType *arg_target = glmsg.add_args(); 23061 arg_target->set_isarray(false); 23062 arg_target->set_type(GLMessage::DataType::ENUM); 23063 arg_target->add_intvalue((int)target); 23064 23065 // copy argument pname 23066 GLMessage_DataType *arg_pname = glmsg.add_args(); 23067 arg_pname->set_isarray(false); 23068 arg_pname->set_type(GLMessage::DataType::ENUM); 23069 arg_pname->add_intvalue((int)pname); 23070 23071 // copy argument param 23072 GLMessage_DataType *arg_param = glmsg.add_args(); 23073 arg_param->set_isarray(false); 23074 arg_param->set_type(GLMessage::DataType::INT); 23075 arg_param->add_intvalue(param); 23076 23077 // call function 23078 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23079 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23080 glContext->hooks->gl.glExtTexObjectStateOverrideiQCOM(target, pname, param); 23081 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23082 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23083 23084 void *pointerArgs[] = { 23085 }; 23086 23087 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23088 threadStartTime, threadEndTime, 23089 &glmsg, pointerArgs); 23090 glContext->traceGLMessage(&glmsg); 23091 } 23092 23093 void GLTrace_glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, void * texels) { 23094 GLMessage glmsg; 23095 GLTraceContext *glContext = getGLTraceContext(); 23096 23097 glmsg.set_function(GLMessage::glExtGetTexSubImageQCOM); 23098 23099 // copy argument target 23100 GLMessage_DataType *arg_target = glmsg.add_args(); 23101 arg_target->set_isarray(false); 23102 arg_target->set_type(GLMessage::DataType::ENUM); 23103 arg_target->add_intvalue((int)target); 23104 23105 // copy argument level 23106 GLMessage_DataType *arg_level = glmsg.add_args(); 23107 arg_level->set_isarray(false); 23108 arg_level->set_type(GLMessage::DataType::INT); 23109 arg_level->add_intvalue(level); 23110 23111 // copy argument xoffset 23112 GLMessage_DataType *arg_xoffset = glmsg.add_args(); 23113 arg_xoffset->set_isarray(false); 23114 arg_xoffset->set_type(GLMessage::DataType::INT); 23115 arg_xoffset->add_intvalue(xoffset); 23116 23117 // copy argument yoffset 23118 GLMessage_DataType *arg_yoffset = glmsg.add_args(); 23119 arg_yoffset->set_isarray(false); 23120 arg_yoffset->set_type(GLMessage::DataType::INT); 23121 arg_yoffset->add_intvalue(yoffset); 23122 23123 // copy argument zoffset 23124 GLMessage_DataType *arg_zoffset = glmsg.add_args(); 23125 arg_zoffset->set_isarray(false); 23126 arg_zoffset->set_type(GLMessage::DataType::INT); 23127 arg_zoffset->add_intvalue(zoffset); 23128 23129 // copy argument width 23130 GLMessage_DataType *arg_width = glmsg.add_args(); 23131 arg_width->set_isarray(false); 23132 arg_width->set_type(GLMessage::DataType::INT); 23133 arg_width->add_intvalue(width); 23134 23135 // copy argument height 23136 GLMessage_DataType *arg_height = glmsg.add_args(); 23137 arg_height->set_isarray(false); 23138 arg_height->set_type(GLMessage::DataType::INT); 23139 arg_height->add_intvalue(height); 23140 23141 // copy argument depth 23142 GLMessage_DataType *arg_depth = glmsg.add_args(); 23143 arg_depth->set_isarray(false); 23144 arg_depth->set_type(GLMessage::DataType::INT); 23145 arg_depth->add_intvalue(depth); 23146 23147 // copy argument format 23148 GLMessage_DataType *arg_format = glmsg.add_args(); 23149 arg_format->set_isarray(false); 23150 arg_format->set_type(GLMessage::DataType::ENUM); 23151 arg_format->add_intvalue((int)format); 23152 23153 // copy argument type 23154 GLMessage_DataType *arg_type = glmsg.add_args(); 23155 arg_type->set_isarray(false); 23156 arg_type->set_type(GLMessage::DataType::ENUM); 23157 arg_type->add_intvalue((int)type); 23158 23159 // copy argument texels 23160 GLMessage_DataType *arg_texels = glmsg.add_args(); 23161 arg_texels->set_isarray(false); 23162 arg_texels->set_type(GLMessage::DataType::INT64); 23163 arg_texels->add_int64value((uintptr_t)texels); 23164 23165 // call function 23166 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23167 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23168 glContext->hooks->gl.glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels); 23169 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23170 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23171 23172 void *pointerArgs[] = { 23173 (void *) texels, 23174 }; 23175 23176 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23177 threadStartTime, threadEndTime, 23178 &glmsg, pointerArgs); 23179 glContext->traceGLMessage(&glmsg); 23180 } 23181 23182 void GLTrace_glExtGetBufferPointervQCOM(GLenum target, void ** params) { 23183 GLMessage glmsg; 23184 GLTraceContext *glContext = getGLTraceContext(); 23185 23186 glmsg.set_function(GLMessage::glExtGetBufferPointervQCOM); 23187 23188 // copy argument target 23189 GLMessage_DataType *arg_target = glmsg.add_args(); 23190 arg_target->set_isarray(false); 23191 arg_target->set_type(GLMessage::DataType::ENUM); 23192 arg_target->add_intvalue((int)target); 23193 23194 // copy argument params 23195 GLMessage_DataType *arg_params = glmsg.add_args(); 23196 arg_params->set_isarray(false); 23197 arg_params->set_type(GLMessage::DataType::INT64); 23198 arg_params->add_int64value((uintptr_t)params); 23199 23200 // call function 23201 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23202 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23203 glContext->hooks->gl.glExtGetBufferPointervQCOM(target, params); 23204 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23205 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23206 23207 void *pointerArgs[] = { 23208 (void *) params, 23209 }; 23210 23211 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23212 threadStartTime, threadEndTime, 23213 &glmsg, pointerArgs); 23214 glContext->traceGLMessage(&glmsg); 23215 } 23216 23217 void GLTrace_glExtGetShadersQCOM(GLuint * shaders, GLint maxShaders, GLint * numShaders) { 23218 GLMessage glmsg; 23219 GLTraceContext *glContext = getGLTraceContext(); 23220 23221 glmsg.set_function(GLMessage::glExtGetShadersQCOM); 23222 23223 // copy argument shaders 23224 GLMessage_DataType *arg_shaders = glmsg.add_args(); 23225 arg_shaders->set_isarray(false); 23226 arg_shaders->set_type(GLMessage::DataType::INT64); 23227 arg_shaders->add_int64value((uintptr_t)shaders); 23228 23229 // copy argument maxShaders 23230 GLMessage_DataType *arg_maxShaders = glmsg.add_args(); 23231 arg_maxShaders->set_isarray(false); 23232 arg_maxShaders->set_type(GLMessage::DataType::INT); 23233 arg_maxShaders->add_intvalue(maxShaders); 23234 23235 // copy argument numShaders 23236 GLMessage_DataType *arg_numShaders = glmsg.add_args(); 23237 arg_numShaders->set_isarray(false); 23238 arg_numShaders->set_type(GLMessage::DataType::INT64); 23239 arg_numShaders->add_int64value((uintptr_t)numShaders); 23240 23241 // call function 23242 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23243 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23244 glContext->hooks->gl.glExtGetShadersQCOM(shaders, maxShaders, numShaders); 23245 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23246 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23247 23248 void *pointerArgs[] = { 23249 (void *) shaders, 23250 (void *) numShaders, 23251 }; 23252 23253 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23254 threadStartTime, threadEndTime, 23255 &glmsg, pointerArgs); 23256 glContext->traceGLMessage(&glmsg); 23257 } 23258 23259 void GLTrace_glExtGetProgramsQCOM(GLuint * programs, GLint maxPrograms, GLint * numPrograms) { 23260 GLMessage glmsg; 23261 GLTraceContext *glContext = getGLTraceContext(); 23262 23263 glmsg.set_function(GLMessage::glExtGetProgramsQCOM); 23264 23265 // copy argument programs 23266 GLMessage_DataType *arg_programs = glmsg.add_args(); 23267 arg_programs->set_isarray(false); 23268 arg_programs->set_type(GLMessage::DataType::INT64); 23269 arg_programs->add_int64value((uintptr_t)programs); 23270 23271 // copy argument maxPrograms 23272 GLMessage_DataType *arg_maxPrograms = glmsg.add_args(); 23273 arg_maxPrograms->set_isarray(false); 23274 arg_maxPrograms->set_type(GLMessage::DataType::INT); 23275 arg_maxPrograms->add_intvalue(maxPrograms); 23276 23277 // copy argument numPrograms 23278 GLMessage_DataType *arg_numPrograms = glmsg.add_args(); 23279 arg_numPrograms->set_isarray(false); 23280 arg_numPrograms->set_type(GLMessage::DataType::INT64); 23281 arg_numPrograms->add_int64value((uintptr_t)numPrograms); 23282 23283 // call function 23284 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23285 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23286 glContext->hooks->gl.glExtGetProgramsQCOM(programs, maxPrograms, numPrograms); 23287 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23288 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23289 23290 void *pointerArgs[] = { 23291 (void *) programs, 23292 (void *) numPrograms, 23293 }; 23294 23295 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23296 threadStartTime, threadEndTime, 23297 &glmsg, pointerArgs); 23298 glContext->traceGLMessage(&glmsg); 23299 } 23300 23301 GLboolean GLTrace_glExtIsProgramBinaryQCOM(GLuint program) { 23302 GLMessage glmsg; 23303 GLTraceContext *glContext = getGLTraceContext(); 23304 23305 glmsg.set_function(GLMessage::glExtIsProgramBinaryQCOM); 23306 23307 // copy argument program 23308 GLMessage_DataType *arg_program = glmsg.add_args(); 23309 arg_program->set_isarray(false); 23310 arg_program->set_type(GLMessage::DataType::INT); 23311 arg_program->add_intvalue(program); 23312 23313 // call function 23314 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23315 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23316 GLboolean retValue = glContext->hooks->gl.glExtIsProgramBinaryQCOM(program); 23317 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23318 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23319 23320 // set return value 23321 GLMessage_DataType *rt = glmsg.mutable_returnvalue(); 23322 rt->set_isarray(false); 23323 rt->set_type(GLMessage::DataType::BOOL); 23324 rt->add_boolvalue(retValue); 23325 23326 void *pointerArgs[] = { 23327 }; 23328 23329 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23330 threadStartTime, threadEndTime, 23331 &glmsg, pointerArgs); 23332 glContext->traceGLMessage(&glmsg); 23333 23334 return retValue; 23335 } 23336 23337 void GLTrace_glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar * source, GLint * length) { 23338 GLMessage glmsg; 23339 GLTraceContext *glContext = getGLTraceContext(); 23340 23341 glmsg.set_function(GLMessage::glExtGetProgramBinarySourceQCOM); 23342 23343 // copy argument program 23344 GLMessage_DataType *arg_program = glmsg.add_args(); 23345 arg_program->set_isarray(false); 23346 arg_program->set_type(GLMessage::DataType::INT); 23347 arg_program->add_intvalue(program); 23348 23349 // copy argument shadertype 23350 GLMessage_DataType *arg_shadertype = glmsg.add_args(); 23351 arg_shadertype->set_isarray(false); 23352 arg_shadertype->set_type(GLMessage::DataType::ENUM); 23353 arg_shadertype->add_intvalue((int)shadertype); 23354 23355 // copy argument source 23356 GLMessage_DataType *arg_source = glmsg.add_args(); 23357 arg_source->set_isarray(false); 23358 arg_source->set_type(GLMessage::DataType::INT64); 23359 arg_source->add_int64value((uintptr_t)source); 23360 23361 // copy argument length 23362 GLMessage_DataType *arg_length = glmsg.add_args(); 23363 arg_length->set_isarray(false); 23364 arg_length->set_type(GLMessage::DataType::INT64); 23365 arg_length->add_int64value((uintptr_t)length); 23366 23367 // call function 23368 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23369 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23370 glContext->hooks->gl.glExtGetProgramBinarySourceQCOM(program, shadertype, source, length); 23371 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23372 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23373 23374 void *pointerArgs[] = { 23375 (void *) source, 23376 (void *) length, 23377 }; 23378 23379 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23380 threadStartTime, threadEndTime, 23381 &glmsg, pointerArgs); 23382 glContext->traceGLMessage(&glmsg); 23383 } 23384 23385 void GLTrace_glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) { 23386 GLMessage glmsg; 23387 GLTraceContext *glContext = getGLTraceContext(); 23388 23389 glmsg.set_function(GLMessage::glStartTilingQCOM); 23390 23391 // copy argument x 23392 GLMessage_DataType *arg_x = glmsg.add_args(); 23393 arg_x->set_isarray(false); 23394 arg_x->set_type(GLMessage::DataType::INT); 23395 arg_x->add_intvalue(x); 23396 23397 // copy argument y 23398 GLMessage_DataType *arg_y = glmsg.add_args(); 23399 arg_y->set_isarray(false); 23400 arg_y->set_type(GLMessage::DataType::INT); 23401 arg_y->add_intvalue(y); 23402 23403 // copy argument width 23404 GLMessage_DataType *arg_width = glmsg.add_args(); 23405 arg_width->set_isarray(false); 23406 arg_width->set_type(GLMessage::DataType::INT); 23407 arg_width->add_intvalue(width); 23408 23409 // copy argument height 23410 GLMessage_DataType *arg_height = glmsg.add_args(); 23411 arg_height->set_isarray(false); 23412 arg_height->set_type(GLMessage::DataType::INT); 23413 arg_height->add_intvalue(height); 23414 23415 // copy argument preserveMask 23416 GLMessage_DataType *arg_preserveMask = glmsg.add_args(); 23417 arg_preserveMask->set_isarray(false); 23418 arg_preserveMask->set_type(GLMessage::DataType::INT); 23419 arg_preserveMask->add_intvalue(preserveMask); 23420 23421 // call function 23422 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23423 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23424 glContext->hooks->gl.glStartTilingQCOM(x, y, width, height, preserveMask); 23425 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23426 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23427 23428 void *pointerArgs[] = { 23429 }; 23430 23431 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23432 threadStartTime, threadEndTime, 23433 &glmsg, pointerArgs); 23434 glContext->traceGLMessage(&glmsg); 23435 } 23436 23437 void GLTrace_glEndTilingQCOM(GLbitfield preserveMask) { 23438 GLMessage glmsg; 23439 GLTraceContext *glContext = getGLTraceContext(); 23440 23441 glmsg.set_function(GLMessage::glEndTilingQCOM); 23442 23443 // copy argument preserveMask 23444 GLMessage_DataType *arg_preserveMask = glmsg.add_args(); 23445 arg_preserveMask->set_isarray(false); 23446 arg_preserveMask->set_type(GLMessage::DataType::INT); 23447 arg_preserveMask->add_intvalue(preserveMask); 23448 23449 // call function 23450 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23451 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23452 glContext->hooks->gl.glEndTilingQCOM(preserveMask); 23453 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23454 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23455 23456 void *pointerArgs[] = { 23457 }; 23458 23459 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23460 threadStartTime, threadEndTime, 23461 &glmsg, pointerArgs); 23462 glContext->traceGLMessage(&glmsg); 23463 } 23464 23465 23466 // Definitions for GL1 APIs 23467 23468 void GLTrace_glAlphaFunc(GLenum func, GLfloat ref) { 23469 GLMessage glmsg; 23470 GLTraceContext *glContext = getGLTraceContext(); 23471 23472 glmsg.set_function(GLMessage::glAlphaFunc); 23473 23474 // copy argument func 23475 GLMessage_DataType *arg_func = glmsg.add_args(); 23476 arg_func->set_isarray(false); 23477 arg_func->set_type(GLMessage::DataType::ENUM); 23478 arg_func->add_intvalue((int)func); 23479 23480 // copy argument ref 23481 GLMessage_DataType *arg_ref = glmsg.add_args(); 23482 arg_ref->set_isarray(false); 23483 arg_ref->set_type(GLMessage::DataType::FLOAT); 23484 arg_ref->add_floatvalue(ref); 23485 23486 // call function 23487 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23488 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23489 glContext->hooks->gl.glAlphaFunc(func, ref); 23490 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23491 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23492 23493 void *pointerArgs[] = { 23494 }; 23495 23496 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23497 threadStartTime, threadEndTime, 23498 &glmsg, pointerArgs); 23499 glContext->traceGLMessage(&glmsg); 23500 } 23501 23502 void GLTrace_glClipPlanef(GLenum p, const GLfloat * eqn) { 23503 GLMessage glmsg; 23504 GLTraceContext *glContext = getGLTraceContext(); 23505 23506 glmsg.set_function(GLMessage::glClipPlanef); 23507 23508 // copy argument p 23509 GLMessage_DataType *arg_p = glmsg.add_args(); 23510 arg_p->set_isarray(false); 23511 arg_p->set_type(GLMessage::DataType::ENUM); 23512 arg_p->add_intvalue((int)p); 23513 23514 // copy argument eqn 23515 GLMessage_DataType *arg_eqn = glmsg.add_args(); 23516 arg_eqn->set_isarray(false); 23517 arg_eqn->set_type(GLMessage::DataType::INT64); 23518 arg_eqn->add_int64value((uintptr_t)eqn); 23519 23520 // call function 23521 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23522 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23523 glContext->hooks->gl.glClipPlanef(p, eqn); 23524 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23525 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23526 23527 void *pointerArgs[] = { 23528 (void *) eqn, 23529 }; 23530 23531 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23532 threadStartTime, threadEndTime, 23533 &glmsg, pointerArgs); 23534 glContext->traceGLMessage(&glmsg); 23535 } 23536 23537 void GLTrace_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { 23538 GLMessage glmsg; 23539 GLTraceContext *glContext = getGLTraceContext(); 23540 23541 glmsg.set_function(GLMessage::glColor4f); 23542 23543 // copy argument red 23544 GLMessage_DataType *arg_red = glmsg.add_args(); 23545 arg_red->set_isarray(false); 23546 arg_red->set_type(GLMessage::DataType::FLOAT); 23547 arg_red->add_floatvalue(red); 23548 23549 // copy argument green 23550 GLMessage_DataType *arg_green = glmsg.add_args(); 23551 arg_green->set_isarray(false); 23552 arg_green->set_type(GLMessage::DataType::FLOAT); 23553 arg_green->add_floatvalue(green); 23554 23555 // copy argument blue 23556 GLMessage_DataType *arg_blue = glmsg.add_args(); 23557 arg_blue->set_isarray(false); 23558 arg_blue->set_type(GLMessage::DataType::FLOAT); 23559 arg_blue->add_floatvalue(blue); 23560 23561 // copy argument alpha 23562 GLMessage_DataType *arg_alpha = glmsg.add_args(); 23563 arg_alpha->set_isarray(false); 23564 arg_alpha->set_type(GLMessage::DataType::FLOAT); 23565 arg_alpha->add_floatvalue(alpha); 23566 23567 // call function 23568 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23569 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23570 glContext->hooks->gl.glColor4f(red, green, blue, alpha); 23571 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); 23572 nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); 23573 23574 void *pointerArgs[] = { 23575 }; 23576 23577 fixupGLMessage(glContext, wallStartTime, wallEndTime, 23578 threadStartTime, threadEndTime, 23579 &glmsg, pointerArgs); 23580 glContext->traceGLMessage(&glmsg); 23581 } 23582 23583 void GLTrace_glFogf(GLenum pname, GLfloat param) { 23584 GLMessage glmsg; 23585 GLTraceContext *glContext = getGLTraceContext(); 23586 23587 glmsg.set_function(GLMessage::glFogf); 23588 23589 // copy argument pname 23590 GLMessage_DataType *arg_pname = glmsg.add_args(); 23591 arg_pname->set_isarray(false); 23592 arg_pname->set_type(GLMessage::DataType::ENUM); 23593 arg_pname->add_intvalue((int)pname); 23594 23595 // copy argument param 23596 GLMessage_DataType *arg_param = glmsg.add_args(); 23597 arg_param->set_isarray(false); 23598 arg_param->set_type(GLMessage::DataType::FLOAT); 23599 arg_param->add_floatvalue(param); 23600 23601 // call function 23602 nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); 23603 nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); 23604 glContext->hooks->gl.glFogf(pname, param); 23605 nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD);