Hash :
0a6e118d
Author :
Date :
2020-01-27T13:37:29
Change g_Mutex from std::mutex to std::recursive_mutex When running flatland on android-10.0.0_r21 (Pixel 3), libgui's ~EglImage calls eglTerminate which grabs angle's EGL entry point mutex. The path continues to libvulkan where eventually another egl call happens (eglDestroyImageKHR) and it will attempt to take the mutex at the entry point again. So we try to get the mutex multiple times from the same thread. Change this mutex to a recursive_mutex to allow for this re-entry of EGL calls Tests: android-10.0.0_r21/frameworks/native/cmds/flatland Bug: angleproject:4354 Change-Id: If8a817df45e9f58d5f06884510350e17d7127fa9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2029218 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936
// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// entry_points_gl_1_4_autogen.cpp:
// Defines the GL 1.4 entry points.
#include "libGL/entry_points_gl_1_4_autogen.h"
#include "libANGLE/Context.h"
#include "libANGLE/Context.inl.h"
#include "libANGLE/entry_points_utils.h"
#include "libANGLE/gl_enum_utils.h"
#include "libANGLE/validationEGL.h"
#include "libANGLE/validationES.h"
#include "libANGLE/validationES1.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES3.h"
#include "libANGLE/validationES31.h"
#include "libANGLE/validationES32.h"
#include "libANGLE/validationESEXT.h"
#include "libANGLE/validationGL14_autogen.h"
#include "libGLESv2/global_state.h"
namespace gl
{
void GL_APIENTRY BlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
{
Context *context = GetValidGlobalContext();
EVENT(
"glBlendColor",
"context = %d, GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f, GLfloat alpha = %f",
CID(context), red, green, blue, alpha);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBlendColor(context, red, green, blue, alpha));
if (isCallValid)
{
context->blendColor(red, green, blue, alpha);
}
ANGLE_CAPTURE(BlendColor, isCallValid, context, red, green, blue, alpha);
}
}
void GL_APIENTRY BlendEquation(GLenum mode)
{
Context *context = GetValidGlobalContext();
EVENT("glBlendEquation", "context = %d, GLenum mode = %s", CID(context),
GLenumToString(GLenumGroup::BlendEquationModeEXT, mode));
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateBlendEquation(context, mode));
if (isCallValid)
{
context->blendEquation(mode);
}
ANGLE_CAPTURE(BlendEquation, isCallValid, context, mode);
}
}
void GL_APIENTRY BlendFuncSeparate(GLenum sfactorRGB,
GLenum dfactorRGB,
GLenum sfactorAlpha,
GLenum dfactorAlpha)
{
Context *context = GetValidGlobalContext();
EVENT("glBlendFuncSeparate",
"context = %d, GLenum sfactorRGB = %s, GLenum dfactorRGB = %s, GLenum sfactorAlpha = %s, "
"GLenum dfactorAlpha = %s",
CID(context), GLenumToString(GLenumGroup::BlendingFactor, sfactorRGB),
GLenumToString(GLenumGroup::BlendingFactor, dfactorRGB),
GLenumToString(GLenumGroup::BlendingFactor, sfactorAlpha),
GLenumToString(GLenumGroup::BlendingFactor, dfactorAlpha));
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateBlendFuncSeparate(context, sfactorRGB, dfactorRGB,
sfactorAlpha, dfactorAlpha));
if (isCallValid)
{
context->blendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha);
}
ANGLE_CAPTURE(BlendFuncSeparate, isCallValid, context, sfactorRGB, dfactorRGB, sfactorAlpha,
dfactorAlpha);
}
}
void GL_APIENTRY FogCoordPointer(GLenum type, GLsizei stride, const void *pointer)
{
Context *context = GetValidGlobalContext();
EVENT(
"glFogCoordPointer",
"context = %d, GLenum type = %s, GLsizei stride = %d, const void *pointer = 0x%016" PRIxPTR
"",
CID(context), GLenumToString(GLenumGroup::FogPointerTypeEXT, type), stride,
(uintptr_t)pointer);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateFogCoordPointer(context, type, stride, pointer));
if (isCallValid)
{
context->fogCoordPointer(type, stride, pointer);
}
ANGLE_CAPTURE(FogCoordPointer, isCallValid, context, type, stride, pointer);
}
}
void GL_APIENTRY FogCoordd(GLdouble coord)
{
Context *context = GetValidGlobalContext();
EVENT("glFogCoordd", "context = %d, GLdouble coord = %f", CID(context), coord);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateFogCoordd(context, coord));
if (isCallValid)
{
context->fogCoordd(coord);
}
ANGLE_CAPTURE(FogCoordd, isCallValid, context, coord);
}
}
void GL_APIENTRY FogCoorddv(const GLdouble *coord)
{
Context *context = GetValidGlobalContext();
EVENT("glFogCoorddv", "context = %d, const GLdouble *coord = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)coord);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateFogCoorddv(context, coord));
if (isCallValid)
{
context->fogCoorddv(coord);
}
ANGLE_CAPTURE(FogCoorddv, isCallValid, context, coord);
}
}
void GL_APIENTRY FogCoordf(GLfloat coord)
{
Context *context = GetValidGlobalContext();
EVENT("glFogCoordf", "context = %d, GLfloat coord = %f", CID(context), coord);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateFogCoordf(context, coord));
if (isCallValid)
{
context->fogCoordf(coord);
}
ANGLE_CAPTURE(FogCoordf, isCallValid, context, coord);
}
}
void GL_APIENTRY FogCoordfv(const GLfloat *coord)
{
Context *context = GetValidGlobalContext();
EVENT("glFogCoordfv", "context = %d, const GLfloat *coord = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)coord);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateFogCoordfv(context, coord));
if (isCallValid)
{
context->fogCoordfv(coord);
}
ANGLE_CAPTURE(FogCoordfv, isCallValid, context, coord);
}
}
void GL_APIENTRY MultiDrawArrays(GLenum mode,
const GLint *first,
const GLsizei *count,
GLsizei drawcount)
{
Context *context = GetValidGlobalContext();
EVENT("glMultiDrawArrays",
"context = %d, GLenum mode = %s, const GLint *first = 0x%016" PRIxPTR
", const GLsizei *count = 0x%016" PRIxPTR ", GLsizei drawcount = %d",
CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)first,
(uintptr_t)count, drawcount);
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateMultiDrawArrays(context, modePacked, first, count, drawcount));
if (isCallValid)
{
context->multiDrawArrays(modePacked, first, count, drawcount);
}
ANGLE_CAPTURE(MultiDrawArrays, isCallValid, context, modePacked, first, count, drawcount);
}
}
void GL_APIENTRY MultiDrawElements(GLenum mode,
const GLsizei *count,
GLenum type,
const void *const *indices,
GLsizei drawcount)
{
Context *context = GetValidGlobalContext();
EVENT("glMultiDrawElements",
"context = %d, GLenum mode = %s, const GLsizei *count = 0x%016" PRIxPTR
", GLenum type = %s, const void *const*indices = 0x%016" PRIxPTR
", GLsizei drawcount = %d",
CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)count,
GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, drawcount);
if (context)
{
PrimitiveMode modePacked = FromGL<PrimitiveMode>(mode);
DrawElementsType typePacked = FromGL<DrawElementsType>(type);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() ||
ValidateMultiDrawElements(context, modePacked, count, typePacked, indices, drawcount));
if (isCallValid)
{
context->multiDrawElements(modePacked, count, typePacked, indices, drawcount);
}
ANGLE_CAPTURE(MultiDrawElements, isCallValid, context, modePacked, count, typePacked,
indices, drawcount);
}
}
void GL_APIENTRY PointParameterf(GLenum pname, GLfloat param)
{
Context *context = GetValidGlobalContext();
EVENT("glPointParameterf", "context = %d, GLenum pname = %s, GLfloat param = %f", CID(context),
GLenumToString(GLenumGroup::DefaultGroup, pname), param);
if (context)
{
PointParameter pnamePacked = FromGL<PointParameter>(pname);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidatePointParameterf(context, pnamePacked, param));
if (isCallValid)
{
context->pointParameterf(pnamePacked, param);
}
ANGLE_CAPTURE(PointParameterf, isCallValid, context, pnamePacked, param);
}
}
void GL_APIENTRY PointParameterfv(GLenum pname, const GLfloat *params)
{
Context *context = GetValidGlobalContext();
EVENT("glPointParameterfv",
"context = %d, GLenum pname = %s, const GLfloat *params = 0x%016" PRIxPTR "",
CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
if (context)
{
PointParameter pnamePacked = FromGL<PointParameter>(pname);
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidatePointParameterfv(context, pnamePacked, params));
if (isCallValid)
{
context->pointParameterfv(pnamePacked, params);
}
ANGLE_CAPTURE(PointParameterfv, isCallValid, context, pnamePacked, params);
}
}
void GL_APIENTRY PointParameteri(GLenum pname, GLint param)
{
Context *context = GetValidGlobalContext();
EVENT("glPointParameteri", "context = %d, GLenum pname = %s, GLint param = %d", CID(context),
GLenumToString(GLenumGroup::DefaultGroup, pname), param);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidatePointParameteri(context, pname, param));
if (isCallValid)
{
context->pointParameteri(pname, param);
}
ANGLE_CAPTURE(PointParameteri, isCallValid, context, pname, param);
}
}
void GL_APIENTRY PointParameteriv(GLenum pname, const GLint *params)
{
Context *context = GetValidGlobalContext();
EVENT("glPointParameteriv",
"context = %d, GLenum pname = %s, const GLint *params = 0x%016" PRIxPTR "", CID(context),
GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidatePointParameteriv(context, pname, params));
if (isCallValid)
{
context->pointParameteriv(pname, params);
}
ANGLE_CAPTURE(PointParameteriv, isCallValid, context, pname, params);
}
}
void GL_APIENTRY SecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3b",
"context = %d, GLbyte red = %d, GLbyte green = %d, GLbyte blue = %d", CID(context), red,
green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3b(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3b(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3b, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3bv(const GLbyte *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3bv", "context = %d, const GLbyte *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3bv(context, v));
if (isCallValid)
{
context->secondaryColor3bv(v);
}
ANGLE_CAPTURE(SecondaryColor3bv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3d",
"context = %d, GLdouble red = %f, GLdouble green = %f, GLdouble blue = %f", CID(context),
red, green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3d(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3d(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3d, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3dv(const GLdouble *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3dv", "context = %d, const GLdouble *v = 0x%016" PRIxPTR "",
CID(context), (uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3dv(context, v));
if (isCallValid)
{
context->secondaryColor3dv(v);
}
ANGLE_CAPTURE(SecondaryColor3dv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3f",
"context = %d, GLfloat red = %f, GLfloat green = %f, GLfloat blue = %f", CID(context),
red, green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3f(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3f(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3f, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3fv(const GLfloat *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3fv", "context = %d, const GLfloat *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3fv(context, v));
if (isCallValid)
{
context->secondaryColor3fv(v);
}
ANGLE_CAPTURE(SecondaryColor3fv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3i(GLint red, GLint green, GLint blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3i", "context = %d, GLint red = %d, GLint green = %d, GLint blue = %d",
CID(context), red, green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3i(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3i(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3i, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3iv(const GLint *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3iv", "context = %d, const GLint *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3iv(context, v));
if (isCallValid)
{
context->secondaryColor3iv(v);
}
ANGLE_CAPTURE(SecondaryColor3iv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3s(GLshort red, GLshort green, GLshort blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3s",
"context = %d, GLshort red = %d, GLshort green = %d, GLshort blue = %d", CID(context),
red, green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3s(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3s(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3s, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3sv(const GLshort *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3sv", "context = %d, const GLshort *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3sv(context, v));
if (isCallValid)
{
context->secondaryColor3sv(v);
}
ANGLE_CAPTURE(SecondaryColor3sv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3ub",
"context = %d, GLubyte red = %d, GLubyte green = %d, GLubyte blue = %d", CID(context),
red, green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3ub(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3ub(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3ub, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3ubv(const GLubyte *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3ubv", "context = %d, const GLubyte *v = 0x%016" PRIxPTR "",
CID(context), (uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3ubv(context, v));
if (isCallValid)
{
context->secondaryColor3ubv(v);
}
ANGLE_CAPTURE(SecondaryColor3ubv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3ui",
"context = %d, GLuint red = %u, GLuint green = %u, GLuint blue = %u", CID(context), red,
green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3ui(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3ui(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3ui, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3uiv(const GLuint *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3uiv", "context = %d, const GLuint *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3uiv(context, v));
if (isCallValid)
{
context->secondaryColor3uiv(v);
}
ANGLE_CAPTURE(SecondaryColor3uiv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColor3us(GLushort red, GLushort green, GLushort blue)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3us",
"context = %d, GLushort red = %u, GLushort green = %u, GLushort blue = %u", CID(context),
red, green, blue);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid =
(context->skipValidation() || ValidateSecondaryColor3us(context, red, green, blue));
if (isCallValid)
{
context->secondaryColor3us(red, green, blue);
}
ANGLE_CAPTURE(SecondaryColor3us, isCallValid, context, red, green, blue);
}
}
void GL_APIENTRY SecondaryColor3usv(const GLushort *v)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColor3usv", "context = %d, const GLushort *v = 0x%016" PRIxPTR "",
CID(context), (uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateSecondaryColor3usv(context, v));
if (isCallValid)
{
context->secondaryColor3usv(v);
}
ANGLE_CAPTURE(SecondaryColor3usv, isCallValid, context, v);
}
}
void GL_APIENTRY SecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
{
Context *context = GetValidGlobalContext();
EVENT("glSecondaryColorPointer",
"context = %d, GLint size = %d, GLenum type = %s, GLsizei stride = %d, const void "
"*pointer = 0x%016" PRIxPTR "",
CID(context), size, GLenumToString(GLenumGroup::ColorPointerType, type), stride,
(uintptr_t)pointer);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() ||
ValidateSecondaryColorPointer(context, size, type, stride, pointer));
if (isCallValid)
{
context->secondaryColorPointer(size, type, stride, pointer);
}
ANGLE_CAPTURE(SecondaryColorPointer, isCallValid, context, size, type, stride, pointer);
}
}
void GL_APIENTRY WindowPos2d(GLdouble x, GLdouble y)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2d", "context = %d, GLdouble x = %f, GLdouble y = %f", CID(context), x, y);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2d(context, x, y));
if (isCallValid)
{
context->windowPos2d(x, y);
}
ANGLE_CAPTURE(WindowPos2d, isCallValid, context, x, y);
}
}
void GL_APIENTRY WindowPos2dv(const GLdouble *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2dv", "context = %d, const GLdouble *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2dv(context, v));
if (isCallValid)
{
context->windowPos2dv(v);
}
ANGLE_CAPTURE(WindowPos2dv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos2f(GLfloat x, GLfloat y)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2f", "context = %d, GLfloat x = %f, GLfloat y = %f", CID(context), x, y);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2f(context, x, y));
if (isCallValid)
{
context->windowPos2f(x, y);
}
ANGLE_CAPTURE(WindowPos2f, isCallValid, context, x, y);
}
}
void GL_APIENTRY WindowPos2fv(const GLfloat *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2fv", "context = %d, const GLfloat *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2fv(context, v));
if (isCallValid)
{
context->windowPos2fv(v);
}
ANGLE_CAPTURE(WindowPos2fv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos2i(GLint x, GLint y)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2i", "context = %d, GLint x = %d, GLint y = %d", CID(context), x, y);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2i(context, x, y));
if (isCallValid)
{
context->windowPos2i(x, y);
}
ANGLE_CAPTURE(WindowPos2i, isCallValid, context, x, y);
}
}
void GL_APIENTRY WindowPos2iv(const GLint *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2iv", "context = %d, const GLint *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2iv(context, v));
if (isCallValid)
{
context->windowPos2iv(v);
}
ANGLE_CAPTURE(WindowPos2iv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos2s(GLshort x, GLshort y)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2s", "context = %d, GLshort x = %d, GLshort y = %d", CID(context), x, y);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2s(context, x, y));
if (isCallValid)
{
context->windowPos2s(x, y);
}
ANGLE_CAPTURE(WindowPos2s, isCallValid, context, x, y);
}
}
void GL_APIENTRY WindowPos2sv(const GLshort *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos2sv", "context = %d, const GLshort *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos2sv(context, v));
if (isCallValid)
{
context->windowPos2sv(v);
}
ANGLE_CAPTURE(WindowPos2sv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos3d(GLdouble x, GLdouble y, GLdouble z)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3d", "context = %d, GLdouble x = %f, GLdouble y = %f, GLdouble z = %f",
CID(context), x, y, z);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3d(context, x, y, z));
if (isCallValid)
{
context->windowPos3d(x, y, z);
}
ANGLE_CAPTURE(WindowPos3d, isCallValid, context, x, y, z);
}
}
void GL_APIENTRY WindowPos3dv(const GLdouble *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3dv", "context = %d, const GLdouble *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3dv(context, v));
if (isCallValid)
{
context->windowPos3dv(v);
}
ANGLE_CAPTURE(WindowPos3dv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos3f(GLfloat x, GLfloat y, GLfloat z)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3f", "context = %d, GLfloat x = %f, GLfloat y = %f, GLfloat z = %f",
CID(context), x, y, z);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3f(context, x, y, z));
if (isCallValid)
{
context->windowPos3f(x, y, z);
}
ANGLE_CAPTURE(WindowPos3f, isCallValid, context, x, y, z);
}
}
void GL_APIENTRY WindowPos3fv(const GLfloat *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3fv", "context = %d, const GLfloat *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3fv(context, v));
if (isCallValid)
{
context->windowPos3fv(v);
}
ANGLE_CAPTURE(WindowPos3fv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos3i(GLint x, GLint y, GLint z)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3i", "context = %d, GLint x = %d, GLint y = %d, GLint z = %d", CID(context),
x, y, z);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3i(context, x, y, z));
if (isCallValid)
{
context->windowPos3i(x, y, z);
}
ANGLE_CAPTURE(WindowPos3i, isCallValid, context, x, y, z);
}
}
void GL_APIENTRY WindowPos3iv(const GLint *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3iv", "context = %d, const GLint *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3iv(context, v));
if (isCallValid)
{
context->windowPos3iv(v);
}
ANGLE_CAPTURE(WindowPos3iv, isCallValid, context, v);
}
}
void GL_APIENTRY WindowPos3s(GLshort x, GLshort y, GLshort z)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3s", "context = %d, GLshort x = %d, GLshort y = %d, GLshort z = %d",
CID(context), x, y, z);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3s(context, x, y, z));
if (isCallValid)
{
context->windowPos3s(x, y, z);
}
ANGLE_CAPTURE(WindowPos3s, isCallValid, context, x, y, z);
}
}
void GL_APIENTRY WindowPos3sv(const GLshort *v)
{
Context *context = GetValidGlobalContext();
EVENT("glWindowPos3sv", "context = %d, const GLshort *v = 0x%016" PRIxPTR "", CID(context),
(uintptr_t)v);
if (context)
{
std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
bool isCallValid = (context->skipValidation() || ValidateWindowPos3sv(context, v));
if (isCallValid)
{
context->windowPos3sv(v);
}
ANGLE_CAPTURE(WindowPos3sv, isCallValid, context, v);
}
}
} // namespace gl