1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_gl_1_autogen.cpp:
9 // Defines the Desktop GL 1.x entry points.
10
11 #include "libGLESv2/entry_points_gl_1_autogen.h"
12
13 #include "common/gl_enum_utils.h"
14 #include "libANGLE/Context.h"
15 #include "libANGLE/Context.inl.h"
16 #include "libANGLE/capture/capture_gl_1_autogen.h"
17 #include "libANGLE/context_private_call_gl_autogen.h"
18 #include "libANGLE/context_private_call_gles_autogen.h"
19 #include "libANGLE/entry_points_utils.h"
20 #include "libANGLE/validationEGL.h"
21 #include "libANGLE/validationES.h"
22 #include "libANGLE/validationES1.h"
23 #include "libANGLE/validationES2.h"
24 #include "libANGLE/validationES3.h"
25 #include "libANGLE/validationES31.h"
26 #include "libANGLE/validationES32.h"
27 #include "libANGLE/validationESEXT.h"
28 #include "libANGLE/validationGL1_autogen.h"
29 #include "libGLESv2/global_state.h"
30
31 using namespace gl;
32
33 extern "C" {
34
35 // GL 1.0
GL_Accum(GLenum op,GLfloat value)36 void GL_APIENTRY GL_Accum(GLenum op, GLfloat value)
37 {
38 Context *context = GetValidGlobalContext();
39 EVENT(context, GLAccum, "context = %d, op = %s, value = %f", CID(context),
40 GLenumToString(BigGLEnum::AccumOp, op), value);
41
42 if (context)
43 {
44 SCOPED_SHARE_CONTEXT_LOCK(context);
45 bool isCallValid =
46 (context->skipValidation() ||
47 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
48 context->getMutableErrorSetForValidation(),
49 angle::EntryPoint::GLAccum) &&
50 ValidateAccum(context, angle::EntryPoint::GLAccum, op, value)));
51 if (isCallValid)
52 {
53 context->accum(op, value);
54 }
55 ANGLE_CAPTURE_GL(Accum, isCallValid, context, op, value);
56 }
57 else
58 {
59 GenerateContextLostErrorOnCurrentGlobalContext();
60 }
61 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
62 }
63
GL_Begin(GLenum mode)64 void GL_APIENTRY GL_Begin(GLenum mode)
65 {
66 Context *context = GetValidGlobalContext();
67 EVENT(context, GLBegin, "context = %d, mode = %s", CID(context),
68 GLenumToString(BigGLEnum::PrimitiveType, mode));
69
70 if (context)
71 {
72 SCOPED_SHARE_CONTEXT_LOCK(context);
73 bool isCallValid =
74 (context->skipValidation() ||
75 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
76 context->getMutableErrorSetForValidation(),
77 angle::EntryPoint::GLBegin) &&
78 ValidateBegin(context, angle::EntryPoint::GLBegin, mode)));
79 if (isCallValid)
80 {
81 context->begin(mode);
82 }
83 ANGLE_CAPTURE_GL(Begin, isCallValid, context, mode);
84 }
85 else
86 {
87 GenerateContextLostErrorOnCurrentGlobalContext();
88 }
89 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
90 }
91
GL_Bitmap(GLsizei width,GLsizei height,GLfloat xorig,GLfloat yorig,GLfloat xmove,GLfloat ymove,const GLubyte * bitmap)92 void GL_APIENTRY GL_Bitmap(GLsizei width,
93 GLsizei height,
94 GLfloat xorig,
95 GLfloat yorig,
96 GLfloat xmove,
97 GLfloat ymove,
98 const GLubyte *bitmap)
99 {
100 Context *context = GetValidGlobalContext();
101 EVENT(context, GLBitmap,
102 "context = %d, width = %d, height = %d, xorig = %f, yorig = %f, xmove = %f, ymove = %f, "
103 "bitmap = 0x%016" PRIxPTR "",
104 CID(context), width, height, xorig, yorig, xmove, ymove, (uintptr_t)bitmap);
105
106 if (context)
107 {
108 SCOPED_SHARE_CONTEXT_LOCK(context);
109 bool isCallValid =
110 (context->skipValidation() ||
111 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
112 context->getMutableErrorSetForValidation(),
113 angle::EntryPoint::GLBitmap) &&
114 ValidateBitmap(context, angle::EntryPoint::GLBitmap, width, height, xorig, yorig,
115 xmove, ymove, bitmap)));
116 if (isCallValid)
117 {
118 context->bitmap(width, height, xorig, yorig, xmove, ymove, bitmap);
119 }
120 ANGLE_CAPTURE_GL(Bitmap, isCallValid, context, width, height, xorig, yorig, xmove, ymove,
121 bitmap);
122 }
123 else
124 {
125 GenerateContextLostErrorOnCurrentGlobalContext();
126 }
127 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
128 }
129
GL_CallList(GLuint list)130 void GL_APIENTRY GL_CallList(GLuint list)
131 {
132 Context *context = GetValidGlobalContext();
133 EVENT(context, GLCallList, "context = %d, list = %u", CID(context), list);
134
135 if (context)
136 {
137 SCOPED_SHARE_CONTEXT_LOCK(context);
138 bool isCallValid =
139 (context->skipValidation() ||
140 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
141 context->getMutableErrorSetForValidation(),
142 angle::EntryPoint::GLCallList) &&
143 ValidateCallList(context, angle::EntryPoint::GLCallList, list)));
144 if (isCallValid)
145 {
146 context->callList(list);
147 }
148 ANGLE_CAPTURE_GL(CallList, isCallValid, context, list);
149 }
150 else
151 {
152 GenerateContextLostErrorOnCurrentGlobalContext();
153 }
154 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
155 }
156
GL_CallLists(GLsizei n,GLenum type,const void * lists)157 void GL_APIENTRY GL_CallLists(GLsizei n, GLenum type, const void *lists)
158 {
159 Context *context = GetValidGlobalContext();
160 EVENT(context, GLCallLists, "context = %d, n = %d, type = %s, lists = 0x%016" PRIxPTR "",
161 CID(context), n, GLenumToString(BigGLEnum::ListNameType, type), (uintptr_t)lists);
162
163 if (context)
164 {
165 SCOPED_SHARE_CONTEXT_LOCK(context);
166 bool isCallValid =
167 (context->skipValidation() ||
168 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
169 context->getMutableErrorSetForValidation(),
170 angle::EntryPoint::GLCallLists) &&
171 ValidateCallLists(context, angle::EntryPoint::GLCallLists, n, type, lists)));
172 if (isCallValid)
173 {
174 context->callLists(n, type, lists);
175 }
176 ANGLE_CAPTURE_GL(CallLists, isCallValid, context, n, type, lists);
177 }
178 else
179 {
180 GenerateContextLostErrorOnCurrentGlobalContext();
181 }
182 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
183 }
184
GL_ClearAccum(GLfloat red,GLfloat green,GLfloat blue,GLfloat alpha)185 void GL_APIENTRY GL_ClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
186 {
187 Context *context = GetValidGlobalContext();
188 EVENT(context, GLClearAccum, "context = %d, red = %f, green = %f, blue = %f, alpha = %f",
189 CID(context), red, green, blue, alpha);
190
191 if (context)
192 {
193 SCOPED_SHARE_CONTEXT_LOCK(context);
194 bool isCallValid =
195 (context->skipValidation() ||
196 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
197 context->getMutableErrorSetForValidation(),
198 angle::EntryPoint::GLClearAccum) &&
199 ValidateClearAccum(context, angle::EntryPoint::GLClearAccum, red, green, blue,
200 alpha)));
201 if (isCallValid)
202 {
203 context->clearAccum(red, green, blue, alpha);
204 }
205 ANGLE_CAPTURE_GL(ClearAccum, isCallValid, context, red, green, blue, alpha);
206 }
207 else
208 {
209 GenerateContextLostErrorOnCurrentGlobalContext();
210 }
211 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
212 }
213
GL_ClearDepth(GLdouble depth)214 void GL_APIENTRY GL_ClearDepth(GLdouble depth)
215 {
216 Context *context = GetValidGlobalContext();
217 EVENT(context, GLClearDepth, "context = %d, depth = %f", CID(context), depth);
218
219 if (context)
220 {
221 SCOPED_SHARE_CONTEXT_LOCK(context);
222 bool isCallValid =
223 (context->skipValidation() ||
224 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
225 context->getMutableErrorSetForValidation(),
226 angle::EntryPoint::GLClearDepth) &&
227 ValidateClearDepth(context, angle::EntryPoint::GLClearDepth, depth)));
228 if (isCallValid)
229 {
230 context->clearDepth(depth);
231 }
232 ANGLE_CAPTURE_GL(ClearDepth, isCallValid, context, depth);
233 }
234 else
235 {
236 GenerateContextLostErrorOnCurrentGlobalContext();
237 }
238 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
239 }
240
GL_ClearIndex(GLfloat c)241 void GL_APIENTRY GL_ClearIndex(GLfloat c)
242 {
243 Context *context = GetValidGlobalContext();
244 EVENT(context, GLClearIndex, "context = %d, c = %f", CID(context), c);
245
246 if (context)
247 {
248 SCOPED_SHARE_CONTEXT_LOCK(context);
249 bool isCallValid =
250 (context->skipValidation() ||
251 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
252 context->getMutableErrorSetForValidation(),
253 angle::EntryPoint::GLClearIndex) &&
254 ValidateClearIndex(context, angle::EntryPoint::GLClearIndex, c)));
255 if (isCallValid)
256 {
257 context->clearIndex(c);
258 }
259 ANGLE_CAPTURE_GL(ClearIndex, isCallValid, context, c);
260 }
261 else
262 {
263 GenerateContextLostErrorOnCurrentGlobalContext();
264 }
265 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
266 }
267
GL_ClipPlane(GLenum plane,const GLdouble * equation)268 void GL_APIENTRY GL_ClipPlane(GLenum plane, const GLdouble *equation)
269 {
270 Context *context = GetValidGlobalContext();
271 EVENT(context, GLClipPlane, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
272 CID(context), GLenumToString(BigGLEnum::ClipPlaneName, plane), (uintptr_t)equation);
273
274 if (context)
275 {
276 SCOPED_SHARE_CONTEXT_LOCK(context);
277 bool isCallValid =
278 (context->skipValidation() ||
279 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
280 context->getMutableErrorSetForValidation(),
281 angle::EntryPoint::GLClipPlane) &&
282 ValidateClipPlane(context, angle::EntryPoint::GLClipPlane, plane, equation)));
283 if (isCallValid)
284 {
285 context->clipPlane(plane, equation);
286 }
287 ANGLE_CAPTURE_GL(ClipPlane, isCallValid, context, plane, equation);
288 }
289 else
290 {
291 GenerateContextLostErrorOnCurrentGlobalContext();
292 }
293 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
294 }
295
GL_Color3b(GLbyte red,GLbyte green,GLbyte blue)296 void GL_APIENTRY GL_Color3b(GLbyte red, GLbyte green, GLbyte blue)
297 {
298 Context *context = GetValidGlobalContext();
299 EVENT(context, GLColor3b, "context = %d, red = %d, green = %d, blue = %d", CID(context), red,
300 green, blue);
301
302 if (context)
303 {
304 SCOPED_SHARE_CONTEXT_LOCK(context);
305 bool isCallValid =
306 (context->skipValidation() ||
307 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
308 context->getMutableErrorSetForValidation(),
309 angle::EntryPoint::GLColor3b) &&
310 ValidateColor3b(context, angle::EntryPoint::GLColor3b, red, green, blue)));
311 if (isCallValid)
312 {
313 context->color3b(red, green, blue);
314 }
315 ANGLE_CAPTURE_GL(Color3b, isCallValid, context, red, green, blue);
316 }
317 else
318 {
319 GenerateContextLostErrorOnCurrentGlobalContext();
320 }
321 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
322 }
323
GL_Color3bv(const GLbyte * v)324 void GL_APIENTRY GL_Color3bv(const GLbyte *v)
325 {
326 Context *context = GetValidGlobalContext();
327 EVENT(context, GLColor3bv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
328
329 if (context)
330 {
331 SCOPED_SHARE_CONTEXT_LOCK(context);
332 bool isCallValid =
333 (context->skipValidation() ||
334 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
335 context->getMutableErrorSetForValidation(),
336 angle::EntryPoint::GLColor3bv) &&
337 ValidateColor3bv(context, angle::EntryPoint::GLColor3bv, v)));
338 if (isCallValid)
339 {
340 context->color3bv(v);
341 }
342 ANGLE_CAPTURE_GL(Color3bv, isCallValid, context, v);
343 }
344 else
345 {
346 GenerateContextLostErrorOnCurrentGlobalContext();
347 }
348 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
349 }
350
GL_Color3d(GLdouble red,GLdouble green,GLdouble blue)351 void GL_APIENTRY GL_Color3d(GLdouble red, GLdouble green, GLdouble blue)
352 {
353 Context *context = GetValidGlobalContext();
354 EVENT(context, GLColor3d, "context = %d, red = %f, green = %f, blue = %f", CID(context), red,
355 green, blue);
356
357 if (context)
358 {
359 SCOPED_SHARE_CONTEXT_LOCK(context);
360 bool isCallValid =
361 (context->skipValidation() ||
362 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
363 context->getMutableErrorSetForValidation(),
364 angle::EntryPoint::GLColor3d) &&
365 ValidateColor3d(context, angle::EntryPoint::GLColor3d, red, green, blue)));
366 if (isCallValid)
367 {
368 context->color3d(red, green, blue);
369 }
370 ANGLE_CAPTURE_GL(Color3d, isCallValid, context, red, green, blue);
371 }
372 else
373 {
374 GenerateContextLostErrorOnCurrentGlobalContext();
375 }
376 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
377 }
378
GL_Color3dv(const GLdouble * v)379 void GL_APIENTRY GL_Color3dv(const GLdouble *v)
380 {
381 Context *context = GetValidGlobalContext();
382 EVENT(context, GLColor3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
383
384 if (context)
385 {
386 SCOPED_SHARE_CONTEXT_LOCK(context);
387 bool isCallValid =
388 (context->skipValidation() ||
389 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
390 context->getMutableErrorSetForValidation(),
391 angle::EntryPoint::GLColor3dv) &&
392 ValidateColor3dv(context, angle::EntryPoint::GLColor3dv, v)));
393 if (isCallValid)
394 {
395 context->color3dv(v);
396 }
397 ANGLE_CAPTURE_GL(Color3dv, isCallValid, context, v);
398 }
399 else
400 {
401 GenerateContextLostErrorOnCurrentGlobalContext();
402 }
403 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
404 }
405
GL_Color3f(GLfloat red,GLfloat green,GLfloat blue)406 void GL_APIENTRY GL_Color3f(GLfloat red, GLfloat green, GLfloat blue)
407 {
408 Context *context = GetValidGlobalContext();
409 EVENT(context, GLColor3f, "context = %d, red = %f, green = %f, blue = %f", CID(context), red,
410 green, blue);
411
412 if (context)
413 {
414 SCOPED_SHARE_CONTEXT_LOCK(context);
415 bool isCallValid =
416 (context->skipValidation() ||
417 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
418 context->getMutableErrorSetForValidation(),
419 angle::EntryPoint::GLColor3f) &&
420 ValidateColor3f(context, angle::EntryPoint::GLColor3f, red, green, blue)));
421 if (isCallValid)
422 {
423 context->color3f(red, green, blue);
424 }
425 ANGLE_CAPTURE_GL(Color3f, isCallValid, context, red, green, blue);
426 }
427 else
428 {
429 GenerateContextLostErrorOnCurrentGlobalContext();
430 }
431 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
432 }
433
GL_Color3fv(const GLfloat * v)434 void GL_APIENTRY GL_Color3fv(const GLfloat *v)
435 {
436 Context *context = GetValidGlobalContext();
437 EVENT(context, GLColor3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
438
439 if (context)
440 {
441 SCOPED_SHARE_CONTEXT_LOCK(context);
442 bool isCallValid =
443 (context->skipValidation() ||
444 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
445 context->getMutableErrorSetForValidation(),
446 angle::EntryPoint::GLColor3fv) &&
447 ValidateColor3fv(context, angle::EntryPoint::GLColor3fv, v)));
448 if (isCallValid)
449 {
450 context->color3fv(v);
451 }
452 ANGLE_CAPTURE_GL(Color3fv, isCallValid, context, v);
453 }
454 else
455 {
456 GenerateContextLostErrorOnCurrentGlobalContext();
457 }
458 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
459 }
460
GL_Color3i(GLint red,GLint green,GLint blue)461 void GL_APIENTRY GL_Color3i(GLint red, GLint green, GLint blue)
462 {
463 Context *context = GetValidGlobalContext();
464 EVENT(context, GLColor3i, "context = %d, red = %d, green = %d, blue = %d", CID(context), red,
465 green, blue);
466
467 if (context)
468 {
469 SCOPED_SHARE_CONTEXT_LOCK(context);
470 bool isCallValid =
471 (context->skipValidation() ||
472 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
473 context->getMutableErrorSetForValidation(),
474 angle::EntryPoint::GLColor3i) &&
475 ValidateColor3i(context, angle::EntryPoint::GLColor3i, red, green, blue)));
476 if (isCallValid)
477 {
478 context->color3i(red, green, blue);
479 }
480 ANGLE_CAPTURE_GL(Color3i, isCallValid, context, red, green, blue);
481 }
482 else
483 {
484 GenerateContextLostErrorOnCurrentGlobalContext();
485 }
486 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
487 }
488
GL_Color3iv(const GLint * v)489 void GL_APIENTRY GL_Color3iv(const GLint *v)
490 {
491 Context *context = GetValidGlobalContext();
492 EVENT(context, GLColor3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
493
494 if (context)
495 {
496 SCOPED_SHARE_CONTEXT_LOCK(context);
497 bool isCallValid =
498 (context->skipValidation() ||
499 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
500 context->getMutableErrorSetForValidation(),
501 angle::EntryPoint::GLColor3iv) &&
502 ValidateColor3iv(context, angle::EntryPoint::GLColor3iv, v)));
503 if (isCallValid)
504 {
505 context->color3iv(v);
506 }
507 ANGLE_CAPTURE_GL(Color3iv, isCallValid, context, v);
508 }
509 else
510 {
511 GenerateContextLostErrorOnCurrentGlobalContext();
512 }
513 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
514 }
515
GL_Color3s(GLshort red,GLshort green,GLshort blue)516 void GL_APIENTRY GL_Color3s(GLshort red, GLshort green, GLshort blue)
517 {
518 Context *context = GetValidGlobalContext();
519 EVENT(context, GLColor3s, "context = %d, red = %d, green = %d, blue = %d", CID(context), red,
520 green, blue);
521
522 if (context)
523 {
524 SCOPED_SHARE_CONTEXT_LOCK(context);
525 bool isCallValid =
526 (context->skipValidation() ||
527 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
528 context->getMutableErrorSetForValidation(),
529 angle::EntryPoint::GLColor3s) &&
530 ValidateColor3s(context, angle::EntryPoint::GLColor3s, red, green, blue)));
531 if (isCallValid)
532 {
533 context->color3s(red, green, blue);
534 }
535 ANGLE_CAPTURE_GL(Color3s, isCallValid, context, red, green, blue);
536 }
537 else
538 {
539 GenerateContextLostErrorOnCurrentGlobalContext();
540 }
541 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
542 }
543
GL_Color3sv(const GLshort * v)544 void GL_APIENTRY GL_Color3sv(const GLshort *v)
545 {
546 Context *context = GetValidGlobalContext();
547 EVENT(context, GLColor3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
548
549 if (context)
550 {
551 SCOPED_SHARE_CONTEXT_LOCK(context);
552 bool isCallValid =
553 (context->skipValidation() ||
554 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
555 context->getMutableErrorSetForValidation(),
556 angle::EntryPoint::GLColor3sv) &&
557 ValidateColor3sv(context, angle::EntryPoint::GLColor3sv, v)));
558 if (isCallValid)
559 {
560 context->color3sv(v);
561 }
562 ANGLE_CAPTURE_GL(Color3sv, isCallValid, context, v);
563 }
564 else
565 {
566 GenerateContextLostErrorOnCurrentGlobalContext();
567 }
568 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
569 }
570
GL_Color3ub(GLubyte red,GLubyte green,GLubyte blue)571 void GL_APIENTRY GL_Color3ub(GLubyte red, GLubyte green, GLubyte blue)
572 {
573 Context *context = GetValidGlobalContext();
574 EVENT(context, GLColor3ub, "context = %d, red = %d, green = %d, blue = %d", CID(context), red,
575 green, blue);
576
577 if (context)
578 {
579 SCOPED_SHARE_CONTEXT_LOCK(context);
580 bool isCallValid =
581 (context->skipValidation() ||
582 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
583 context->getMutableErrorSetForValidation(),
584 angle::EntryPoint::GLColor3ub) &&
585 ValidateColor3ub(context, angle::EntryPoint::GLColor3ub, red, green, blue)));
586 if (isCallValid)
587 {
588 context->color3ub(red, green, blue);
589 }
590 ANGLE_CAPTURE_GL(Color3ub, isCallValid, context, red, green, blue);
591 }
592 else
593 {
594 GenerateContextLostErrorOnCurrentGlobalContext();
595 }
596 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
597 }
598
GL_Color3ubv(const GLubyte * v)599 void GL_APIENTRY GL_Color3ubv(const GLubyte *v)
600 {
601 Context *context = GetValidGlobalContext();
602 EVENT(context, GLColor3ubv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
603
604 if (context)
605 {
606 SCOPED_SHARE_CONTEXT_LOCK(context);
607 bool isCallValid =
608 (context->skipValidation() ||
609 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
610 context->getMutableErrorSetForValidation(),
611 angle::EntryPoint::GLColor3ubv) &&
612 ValidateColor3ubv(context, angle::EntryPoint::GLColor3ubv, v)));
613 if (isCallValid)
614 {
615 context->color3ubv(v);
616 }
617 ANGLE_CAPTURE_GL(Color3ubv, isCallValid, context, v);
618 }
619 else
620 {
621 GenerateContextLostErrorOnCurrentGlobalContext();
622 }
623 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
624 }
625
GL_Color3ui(GLuint red,GLuint green,GLuint blue)626 void GL_APIENTRY GL_Color3ui(GLuint red, GLuint green, GLuint blue)
627 {
628 Context *context = GetValidGlobalContext();
629 EVENT(context, GLColor3ui, "context = %d, red = %u, green = %u, blue = %u", CID(context), red,
630 green, blue);
631
632 if (context)
633 {
634 SCOPED_SHARE_CONTEXT_LOCK(context);
635 bool isCallValid =
636 (context->skipValidation() ||
637 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
638 context->getMutableErrorSetForValidation(),
639 angle::EntryPoint::GLColor3ui) &&
640 ValidateColor3ui(context, angle::EntryPoint::GLColor3ui, red, green, blue)));
641 if (isCallValid)
642 {
643 context->color3ui(red, green, blue);
644 }
645 ANGLE_CAPTURE_GL(Color3ui, isCallValid, context, red, green, blue);
646 }
647 else
648 {
649 GenerateContextLostErrorOnCurrentGlobalContext();
650 }
651 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
652 }
653
GL_Color3uiv(const GLuint * v)654 void GL_APIENTRY GL_Color3uiv(const GLuint *v)
655 {
656 Context *context = GetValidGlobalContext();
657 EVENT(context, GLColor3uiv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
658
659 if (context)
660 {
661 SCOPED_SHARE_CONTEXT_LOCK(context);
662 bool isCallValid =
663 (context->skipValidation() ||
664 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
665 context->getMutableErrorSetForValidation(),
666 angle::EntryPoint::GLColor3uiv) &&
667 ValidateColor3uiv(context, angle::EntryPoint::GLColor3uiv, v)));
668 if (isCallValid)
669 {
670 context->color3uiv(v);
671 }
672 ANGLE_CAPTURE_GL(Color3uiv, isCallValid, context, v);
673 }
674 else
675 {
676 GenerateContextLostErrorOnCurrentGlobalContext();
677 }
678 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
679 }
680
GL_Color3us(GLushort red,GLushort green,GLushort blue)681 void GL_APIENTRY GL_Color3us(GLushort red, GLushort green, GLushort blue)
682 {
683 Context *context = GetValidGlobalContext();
684 EVENT(context, GLColor3us, "context = %d, red = %u, green = %u, blue = %u", CID(context), red,
685 green, blue);
686
687 if (context)
688 {
689 SCOPED_SHARE_CONTEXT_LOCK(context);
690 bool isCallValid =
691 (context->skipValidation() ||
692 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
693 context->getMutableErrorSetForValidation(),
694 angle::EntryPoint::GLColor3us) &&
695 ValidateColor3us(context, angle::EntryPoint::GLColor3us, red, green, blue)));
696 if (isCallValid)
697 {
698 context->color3us(red, green, blue);
699 }
700 ANGLE_CAPTURE_GL(Color3us, isCallValid, context, red, green, blue);
701 }
702 else
703 {
704 GenerateContextLostErrorOnCurrentGlobalContext();
705 }
706 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
707 }
708
GL_Color3usv(const GLushort * v)709 void GL_APIENTRY GL_Color3usv(const GLushort *v)
710 {
711 Context *context = GetValidGlobalContext();
712 EVENT(context, GLColor3usv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
713
714 if (context)
715 {
716 SCOPED_SHARE_CONTEXT_LOCK(context);
717 bool isCallValid =
718 (context->skipValidation() ||
719 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
720 context->getMutableErrorSetForValidation(),
721 angle::EntryPoint::GLColor3usv) &&
722 ValidateColor3usv(context, angle::EntryPoint::GLColor3usv, v)));
723 if (isCallValid)
724 {
725 context->color3usv(v);
726 }
727 ANGLE_CAPTURE_GL(Color3usv, isCallValid, context, v);
728 }
729 else
730 {
731 GenerateContextLostErrorOnCurrentGlobalContext();
732 }
733 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
734 }
735
GL_Color4b(GLbyte red,GLbyte green,GLbyte blue,GLbyte alpha)736 void GL_APIENTRY GL_Color4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
737 {
738 Context *context = GetValidGlobalContext();
739 EVENT(context, GLColor4b, "context = %d, red = %d, green = %d, blue = %d, alpha = %d",
740 CID(context), red, green, blue, alpha);
741
742 if (context)
743 {
744 SCOPED_SHARE_CONTEXT_LOCK(context);
745 bool isCallValid =
746 (context->skipValidation() ||
747 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
748 context->getMutableErrorSetForValidation(),
749 angle::EntryPoint::GLColor4b) &&
750 ValidateColor4b(context, angle::EntryPoint::GLColor4b, red, green, blue, alpha)));
751 if (isCallValid)
752 {
753 context->color4b(red, green, blue, alpha);
754 }
755 ANGLE_CAPTURE_GL(Color4b, isCallValid, context, red, green, blue, alpha);
756 }
757 else
758 {
759 GenerateContextLostErrorOnCurrentGlobalContext();
760 }
761 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
762 }
763
GL_Color4bv(const GLbyte * v)764 void GL_APIENTRY GL_Color4bv(const GLbyte *v)
765 {
766 Context *context = GetValidGlobalContext();
767 EVENT(context, GLColor4bv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
768
769 if (context)
770 {
771 SCOPED_SHARE_CONTEXT_LOCK(context);
772 bool isCallValid =
773 (context->skipValidation() ||
774 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
775 context->getMutableErrorSetForValidation(),
776 angle::EntryPoint::GLColor4bv) &&
777 ValidateColor4bv(context, angle::EntryPoint::GLColor4bv, v)));
778 if (isCallValid)
779 {
780 context->color4bv(v);
781 }
782 ANGLE_CAPTURE_GL(Color4bv, isCallValid, context, v);
783 }
784 else
785 {
786 GenerateContextLostErrorOnCurrentGlobalContext();
787 }
788 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
789 }
790
GL_Color4d(GLdouble red,GLdouble green,GLdouble blue,GLdouble alpha)791 void GL_APIENTRY GL_Color4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
792 {
793 Context *context = GetValidGlobalContext();
794 EVENT(context, GLColor4d, "context = %d, red = %f, green = %f, blue = %f, alpha = %f",
795 CID(context), red, green, blue, alpha);
796
797 if (context)
798 {
799 SCOPED_SHARE_CONTEXT_LOCK(context);
800 bool isCallValid =
801 (context->skipValidation() ||
802 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
803 context->getMutableErrorSetForValidation(),
804 angle::EntryPoint::GLColor4d) &&
805 ValidateColor4d(context, angle::EntryPoint::GLColor4d, red, green, blue, alpha)));
806 if (isCallValid)
807 {
808 context->color4d(red, green, blue, alpha);
809 }
810 ANGLE_CAPTURE_GL(Color4d, isCallValid, context, red, green, blue, alpha);
811 }
812 else
813 {
814 GenerateContextLostErrorOnCurrentGlobalContext();
815 }
816 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
817 }
818
GL_Color4dv(const GLdouble * v)819 void GL_APIENTRY GL_Color4dv(const GLdouble *v)
820 {
821 Context *context = GetValidGlobalContext();
822 EVENT(context, GLColor4dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
823
824 if (context)
825 {
826 SCOPED_SHARE_CONTEXT_LOCK(context);
827 bool isCallValid =
828 (context->skipValidation() ||
829 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
830 context->getMutableErrorSetForValidation(),
831 angle::EntryPoint::GLColor4dv) &&
832 ValidateColor4dv(context, angle::EntryPoint::GLColor4dv, v)));
833 if (isCallValid)
834 {
835 context->color4dv(v);
836 }
837 ANGLE_CAPTURE_GL(Color4dv, isCallValid, context, v);
838 }
839 else
840 {
841 GenerateContextLostErrorOnCurrentGlobalContext();
842 }
843 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
844 }
845
GL_Color4fv(const GLfloat * v)846 void GL_APIENTRY GL_Color4fv(const GLfloat *v)
847 {
848 Context *context = GetValidGlobalContext();
849 EVENT(context, GLColor4fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
850
851 if (context)
852 {
853 SCOPED_SHARE_CONTEXT_LOCK(context);
854 bool isCallValid =
855 (context->skipValidation() ||
856 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
857 context->getMutableErrorSetForValidation(),
858 angle::EntryPoint::GLColor4fv) &&
859 ValidateColor4fv(context, angle::EntryPoint::GLColor4fv, v)));
860 if (isCallValid)
861 {
862 context->color4fv(v);
863 }
864 ANGLE_CAPTURE_GL(Color4fv, isCallValid, context, v);
865 }
866 else
867 {
868 GenerateContextLostErrorOnCurrentGlobalContext();
869 }
870 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
871 }
872
GL_Color4i(GLint red,GLint green,GLint blue,GLint alpha)873 void GL_APIENTRY GL_Color4i(GLint red, GLint green, GLint blue, GLint alpha)
874 {
875 Context *context = GetValidGlobalContext();
876 EVENT(context, GLColor4i, "context = %d, red = %d, green = %d, blue = %d, alpha = %d",
877 CID(context), red, green, blue, alpha);
878
879 if (context)
880 {
881 SCOPED_SHARE_CONTEXT_LOCK(context);
882 bool isCallValid =
883 (context->skipValidation() ||
884 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
885 context->getMutableErrorSetForValidation(),
886 angle::EntryPoint::GLColor4i) &&
887 ValidateColor4i(context, angle::EntryPoint::GLColor4i, red, green, blue, alpha)));
888 if (isCallValid)
889 {
890 context->color4i(red, green, blue, alpha);
891 }
892 ANGLE_CAPTURE_GL(Color4i, isCallValid, context, red, green, blue, alpha);
893 }
894 else
895 {
896 GenerateContextLostErrorOnCurrentGlobalContext();
897 }
898 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
899 }
900
GL_Color4iv(const GLint * v)901 void GL_APIENTRY GL_Color4iv(const GLint *v)
902 {
903 Context *context = GetValidGlobalContext();
904 EVENT(context, GLColor4iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
905
906 if (context)
907 {
908 SCOPED_SHARE_CONTEXT_LOCK(context);
909 bool isCallValid =
910 (context->skipValidation() ||
911 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
912 context->getMutableErrorSetForValidation(),
913 angle::EntryPoint::GLColor4iv) &&
914 ValidateColor4iv(context, angle::EntryPoint::GLColor4iv, v)));
915 if (isCallValid)
916 {
917 context->color4iv(v);
918 }
919 ANGLE_CAPTURE_GL(Color4iv, isCallValid, context, v);
920 }
921 else
922 {
923 GenerateContextLostErrorOnCurrentGlobalContext();
924 }
925 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
926 }
927
GL_Color4s(GLshort red,GLshort green,GLshort blue,GLshort alpha)928 void GL_APIENTRY GL_Color4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
929 {
930 Context *context = GetValidGlobalContext();
931 EVENT(context, GLColor4s, "context = %d, red = %d, green = %d, blue = %d, alpha = %d",
932 CID(context), red, green, blue, alpha);
933
934 if (context)
935 {
936 SCOPED_SHARE_CONTEXT_LOCK(context);
937 bool isCallValid =
938 (context->skipValidation() ||
939 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
940 context->getMutableErrorSetForValidation(),
941 angle::EntryPoint::GLColor4s) &&
942 ValidateColor4s(context, angle::EntryPoint::GLColor4s, red, green, blue, alpha)));
943 if (isCallValid)
944 {
945 context->color4s(red, green, blue, alpha);
946 }
947 ANGLE_CAPTURE_GL(Color4s, isCallValid, context, red, green, blue, alpha);
948 }
949 else
950 {
951 GenerateContextLostErrorOnCurrentGlobalContext();
952 }
953 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
954 }
955
GL_Color4sv(const GLshort * v)956 void GL_APIENTRY GL_Color4sv(const GLshort *v)
957 {
958 Context *context = GetValidGlobalContext();
959 EVENT(context, GLColor4sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
960
961 if (context)
962 {
963 SCOPED_SHARE_CONTEXT_LOCK(context);
964 bool isCallValid =
965 (context->skipValidation() ||
966 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
967 context->getMutableErrorSetForValidation(),
968 angle::EntryPoint::GLColor4sv) &&
969 ValidateColor4sv(context, angle::EntryPoint::GLColor4sv, v)));
970 if (isCallValid)
971 {
972 context->color4sv(v);
973 }
974 ANGLE_CAPTURE_GL(Color4sv, isCallValid, context, v);
975 }
976 else
977 {
978 GenerateContextLostErrorOnCurrentGlobalContext();
979 }
980 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
981 }
982
GL_Color4ubv(const GLubyte * v)983 void GL_APIENTRY GL_Color4ubv(const GLubyte *v)
984 {
985 Context *context = GetValidGlobalContext();
986 EVENT(context, GLColor4ubv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
987
988 if (context)
989 {
990 SCOPED_SHARE_CONTEXT_LOCK(context);
991 bool isCallValid =
992 (context->skipValidation() ||
993 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
994 context->getMutableErrorSetForValidation(),
995 angle::EntryPoint::GLColor4ubv) &&
996 ValidateColor4ubv(context, angle::EntryPoint::GLColor4ubv, v)));
997 if (isCallValid)
998 {
999 context->color4ubv(v);
1000 }
1001 ANGLE_CAPTURE_GL(Color4ubv, isCallValid, context, v);
1002 }
1003 else
1004 {
1005 GenerateContextLostErrorOnCurrentGlobalContext();
1006 }
1007 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1008 }
1009
GL_Color4ui(GLuint red,GLuint green,GLuint blue,GLuint alpha)1010 void GL_APIENTRY GL_Color4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
1011 {
1012 Context *context = GetValidGlobalContext();
1013 EVENT(context, GLColor4ui, "context = %d, red = %u, green = %u, blue = %u, alpha = %u",
1014 CID(context), red, green, blue, alpha);
1015
1016 if (context)
1017 {
1018 SCOPED_SHARE_CONTEXT_LOCK(context);
1019 bool isCallValid =
1020 (context->skipValidation() ||
1021 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1022 context->getMutableErrorSetForValidation(),
1023 angle::EntryPoint::GLColor4ui) &&
1024 ValidateColor4ui(context, angle::EntryPoint::GLColor4ui, red, green, blue, alpha)));
1025 if (isCallValid)
1026 {
1027 context->color4ui(red, green, blue, alpha);
1028 }
1029 ANGLE_CAPTURE_GL(Color4ui, isCallValid, context, red, green, blue, alpha);
1030 }
1031 else
1032 {
1033 GenerateContextLostErrorOnCurrentGlobalContext();
1034 }
1035 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1036 }
1037
GL_Color4uiv(const GLuint * v)1038 void GL_APIENTRY GL_Color4uiv(const GLuint *v)
1039 {
1040 Context *context = GetValidGlobalContext();
1041 EVENT(context, GLColor4uiv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
1042
1043 if (context)
1044 {
1045 SCOPED_SHARE_CONTEXT_LOCK(context);
1046 bool isCallValid =
1047 (context->skipValidation() ||
1048 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1049 context->getMutableErrorSetForValidation(),
1050 angle::EntryPoint::GLColor4uiv) &&
1051 ValidateColor4uiv(context, angle::EntryPoint::GLColor4uiv, v)));
1052 if (isCallValid)
1053 {
1054 context->color4uiv(v);
1055 }
1056 ANGLE_CAPTURE_GL(Color4uiv, isCallValid, context, v);
1057 }
1058 else
1059 {
1060 GenerateContextLostErrorOnCurrentGlobalContext();
1061 }
1062 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1063 }
1064
GL_Color4us(GLushort red,GLushort green,GLushort blue,GLushort alpha)1065 void GL_APIENTRY GL_Color4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
1066 {
1067 Context *context = GetValidGlobalContext();
1068 EVENT(context, GLColor4us, "context = %d, red = %u, green = %u, blue = %u, alpha = %u",
1069 CID(context), red, green, blue, alpha);
1070
1071 if (context)
1072 {
1073 SCOPED_SHARE_CONTEXT_LOCK(context);
1074 bool isCallValid =
1075 (context->skipValidation() ||
1076 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1077 context->getMutableErrorSetForValidation(),
1078 angle::EntryPoint::GLColor4us) &&
1079 ValidateColor4us(context, angle::EntryPoint::GLColor4us, red, green, blue, alpha)));
1080 if (isCallValid)
1081 {
1082 context->color4us(red, green, blue, alpha);
1083 }
1084 ANGLE_CAPTURE_GL(Color4us, isCallValid, context, red, green, blue, alpha);
1085 }
1086 else
1087 {
1088 GenerateContextLostErrorOnCurrentGlobalContext();
1089 }
1090 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1091 }
1092
GL_Color4usv(const GLushort * v)1093 void GL_APIENTRY GL_Color4usv(const GLushort *v)
1094 {
1095 Context *context = GetValidGlobalContext();
1096 EVENT(context, GLColor4usv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
1097
1098 if (context)
1099 {
1100 SCOPED_SHARE_CONTEXT_LOCK(context);
1101 bool isCallValid =
1102 (context->skipValidation() ||
1103 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1104 context->getMutableErrorSetForValidation(),
1105 angle::EntryPoint::GLColor4usv) &&
1106 ValidateColor4usv(context, angle::EntryPoint::GLColor4usv, v)));
1107 if (isCallValid)
1108 {
1109 context->color4usv(v);
1110 }
1111 ANGLE_CAPTURE_GL(Color4usv, isCallValid, context, v);
1112 }
1113 else
1114 {
1115 GenerateContextLostErrorOnCurrentGlobalContext();
1116 }
1117 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1118 }
1119
GL_ColorMaterial(GLenum face,GLenum mode)1120 void GL_APIENTRY GL_ColorMaterial(GLenum face, GLenum mode)
1121 {
1122 Context *context = GetValidGlobalContext();
1123 EVENT(context, GLColorMaterial, "context = %d, face = %s, mode = %s", CID(context),
1124 GLenumToString(BigGLEnum::TriangleFace, face),
1125 GLenumToString(BigGLEnum::ColorMaterialParameter, mode));
1126
1127 if (context)
1128 {
1129 SCOPED_SHARE_CONTEXT_LOCK(context);
1130 bool isCallValid =
1131 (context->skipValidation() ||
1132 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1133 context->getMutableErrorSetForValidation(),
1134 angle::EntryPoint::GLColorMaterial) &&
1135 ValidateColorMaterial(context, angle::EntryPoint::GLColorMaterial, face, mode)));
1136 if (isCallValid)
1137 {
1138 context->colorMaterial(face, mode);
1139 }
1140 ANGLE_CAPTURE_GL(ColorMaterial, isCallValid, context, face, mode);
1141 }
1142 else
1143 {
1144 GenerateContextLostErrorOnCurrentGlobalContext();
1145 }
1146 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1147 }
1148
GL_CopyPixels(GLint x,GLint y,GLsizei width,GLsizei height,GLenum type)1149 void GL_APIENTRY GL_CopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
1150 {
1151 Context *context = GetValidGlobalContext();
1152 EVENT(context, GLCopyPixels, "context = %d, x = %d, y = %d, width = %d, height = %d, type = %s",
1153 CID(context), x, y, width, height, GLenumToString(BigGLEnum::PixelCopyType, type));
1154
1155 if (context)
1156 {
1157 SCOPED_SHARE_CONTEXT_LOCK(context);
1158 bool isCallValid =
1159 (context->skipValidation() ||
1160 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1161 context->getMutableErrorSetForValidation(),
1162 angle::EntryPoint::GLCopyPixels) &&
1163 ValidateCopyPixels(context, angle::EntryPoint::GLCopyPixels, x, y, width, height,
1164 type)));
1165 if (isCallValid)
1166 {
1167 context->copyPixels(x, y, width, height, type);
1168 }
1169 ANGLE_CAPTURE_GL(CopyPixels, isCallValid, context, x, y, width, height, type);
1170 }
1171 else
1172 {
1173 GenerateContextLostErrorOnCurrentGlobalContext();
1174 }
1175 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1176 }
1177
GL_DeleteLists(GLuint list,GLsizei range)1178 void GL_APIENTRY GL_DeleteLists(GLuint list, GLsizei range)
1179 {
1180 Context *context = GetValidGlobalContext();
1181 EVENT(context, GLDeleteLists, "context = %d, list = %u, range = %d", CID(context), list, range);
1182
1183 if (context)
1184 {
1185 SCOPED_SHARE_CONTEXT_LOCK(context);
1186 bool isCallValid =
1187 (context->skipValidation() ||
1188 ValidateDeleteLists(context, angle::EntryPoint::GLDeleteLists, list, range));
1189 if (isCallValid)
1190 {
1191 context->deleteLists(list, range);
1192 }
1193 ANGLE_CAPTURE_GL(DeleteLists, isCallValid, context, list, range);
1194 }
1195 else
1196 {
1197 GenerateContextLostErrorOnCurrentGlobalContext();
1198 }
1199 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1200 }
1201
GL_DepthRange(GLdouble n,GLdouble f)1202 void GL_APIENTRY GL_DepthRange(GLdouble n, GLdouble f)
1203 {
1204 Context *context = GetValidGlobalContext();
1205 EVENT(context, GLDepthRange, "context = %d, n = %f, f = %f", CID(context), n, f);
1206
1207 if (context)
1208 {
1209 SCOPED_SHARE_CONTEXT_LOCK(context);
1210 bool isCallValid =
1211 (context->skipValidation() ||
1212 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1213 context->getMutableErrorSetForValidation(),
1214 angle::EntryPoint::GLDepthRange) &&
1215 ValidateDepthRange(context, angle::EntryPoint::GLDepthRange, n, f)));
1216 if (isCallValid)
1217 {
1218 context->depthRange(n, f);
1219 }
1220 ANGLE_CAPTURE_GL(DepthRange, isCallValid, context, n, f);
1221 }
1222 else
1223 {
1224 GenerateContextLostErrorOnCurrentGlobalContext();
1225 }
1226 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1227 }
1228
GL_DrawBuffer(GLenum buf)1229 void GL_APIENTRY GL_DrawBuffer(GLenum buf)
1230 {
1231 Context *context = GetValidGlobalContext();
1232 EVENT(context, GLDrawBuffer, "context = %d, buf = %s", CID(context),
1233 GLenumToString(BigGLEnum::DrawBufferMode, buf));
1234
1235 if (context)
1236 {
1237 SCOPED_SHARE_CONTEXT_LOCK(context);
1238 bool isCallValid =
1239 (context->skipValidation() ||
1240 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1241 context->getMutableErrorSetForValidation(),
1242 angle::EntryPoint::GLDrawBuffer) &&
1243 ValidateDrawBuffer(context, angle::EntryPoint::GLDrawBuffer, buf)));
1244 if (isCallValid)
1245 {
1246 context->drawBuffer(buf);
1247 }
1248 ANGLE_CAPTURE_GL(DrawBuffer, isCallValid, context, buf);
1249 }
1250 else
1251 {
1252 GenerateContextLostErrorOnCurrentGlobalContext();
1253 }
1254 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1255 }
1256
1257 void GL_APIENTRY
GL_DrawPixels(GLsizei width,GLsizei height,GLenum format,GLenum type,const void * pixels)1258 GL_DrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
1259 {
1260 Context *context = GetValidGlobalContext();
1261 EVENT(context, GLDrawPixels,
1262 "context = %d, width = %d, height = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR
1263 "",
1264 CID(context), width, height, GLenumToString(BigGLEnum::PixelFormat, format),
1265 GLenumToString(BigGLEnum::PixelType, type), (uintptr_t)pixels);
1266
1267 if (context)
1268 {
1269 SCOPED_SHARE_CONTEXT_LOCK(context);
1270 bool isCallValid =
1271 (context->skipValidation() ||
1272 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1273 context->getMutableErrorSetForValidation(),
1274 angle::EntryPoint::GLDrawPixels) &&
1275 ValidateDrawPixels(context, angle::EntryPoint::GLDrawPixels, width, height, format,
1276 type, pixels)));
1277 if (isCallValid)
1278 {
1279 context->drawPixels(width, height, format, type, pixels);
1280 }
1281 ANGLE_CAPTURE_GL(DrawPixels, isCallValid, context, width, height, format, type, pixels);
1282 }
1283 else
1284 {
1285 GenerateContextLostErrorOnCurrentGlobalContext();
1286 }
1287 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1288 }
1289
GL_EdgeFlag(GLboolean flag)1290 void GL_APIENTRY GL_EdgeFlag(GLboolean flag)
1291 {
1292 Context *context = GetValidGlobalContext();
1293 EVENT(context, GLEdgeFlag, "context = %d, flag = %s", CID(context), GLbooleanToString(flag));
1294
1295 if (context)
1296 {
1297 SCOPED_SHARE_CONTEXT_LOCK(context);
1298 bool isCallValid =
1299 (context->skipValidation() ||
1300 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1301 context->getMutableErrorSetForValidation(),
1302 angle::EntryPoint::GLEdgeFlag) &&
1303 ValidateEdgeFlag(context, angle::EntryPoint::GLEdgeFlag, flag)));
1304 if (isCallValid)
1305 {
1306 context->edgeFlag(flag);
1307 }
1308 ANGLE_CAPTURE_GL(EdgeFlag, isCallValid, context, flag);
1309 }
1310 else
1311 {
1312 GenerateContextLostErrorOnCurrentGlobalContext();
1313 }
1314 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1315 }
1316
GL_EdgeFlagv(const GLboolean * flag)1317 void GL_APIENTRY GL_EdgeFlagv(const GLboolean *flag)
1318 {
1319 Context *context = GetValidGlobalContext();
1320 EVENT(context, GLEdgeFlagv, "context = %d, flag = 0x%016" PRIxPTR "", CID(context),
1321 (uintptr_t)flag);
1322
1323 if (context)
1324 {
1325 SCOPED_SHARE_CONTEXT_LOCK(context);
1326 bool isCallValid =
1327 (context->skipValidation() ||
1328 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1329 context->getMutableErrorSetForValidation(),
1330 angle::EntryPoint::GLEdgeFlagv) &&
1331 ValidateEdgeFlagv(context, angle::EntryPoint::GLEdgeFlagv, flag)));
1332 if (isCallValid)
1333 {
1334 context->edgeFlagv(flag);
1335 }
1336 ANGLE_CAPTURE_GL(EdgeFlagv, isCallValid, context, flag);
1337 }
1338 else
1339 {
1340 GenerateContextLostErrorOnCurrentGlobalContext();
1341 }
1342 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1343 }
1344
GL_End()1345 void GL_APIENTRY GL_End()
1346 {
1347 Context *context = GetValidGlobalContext();
1348 EVENT(context, GLEnd, "context = %d", CID(context));
1349
1350 if (context)
1351 {
1352 SCOPED_SHARE_CONTEXT_LOCK(context);
1353 bool isCallValid =
1354 (context->skipValidation() ||
1355 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1356 context->getMutableErrorSetForValidation(),
1357 angle::EntryPoint::GLEnd) &&
1358 ValidateEnd(context, angle::EntryPoint::GLEnd)));
1359 if (isCallValid)
1360 {
1361 context->end();
1362 }
1363 ANGLE_CAPTURE_GL(End, isCallValid, context);
1364 }
1365 else
1366 {
1367 GenerateContextLostErrorOnCurrentGlobalContext();
1368 }
1369 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1370 }
1371
GL_EndList()1372 void GL_APIENTRY GL_EndList()
1373 {
1374 Context *context = GetValidGlobalContext();
1375 EVENT(context, GLEndList, "context = %d", CID(context));
1376
1377 if (context)
1378 {
1379 SCOPED_SHARE_CONTEXT_LOCK(context);
1380 bool isCallValid =
1381 (context->skipValidation() ||
1382 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1383 context->getMutableErrorSetForValidation(),
1384 angle::EntryPoint::GLEndList) &&
1385 ValidateEndList(context, angle::EntryPoint::GLEndList)));
1386 if (isCallValid)
1387 {
1388 context->endList();
1389 }
1390 ANGLE_CAPTURE_GL(EndList, isCallValid, context);
1391 }
1392 else
1393 {
1394 GenerateContextLostErrorOnCurrentGlobalContext();
1395 }
1396 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1397 }
1398
GL_EvalCoord1d(GLdouble u)1399 void GL_APIENTRY GL_EvalCoord1d(GLdouble u)
1400 {
1401 Context *context = GetValidGlobalContext();
1402 EVENT(context, GLEvalCoord1d, "context = %d, u = %f", CID(context), u);
1403
1404 if (context)
1405 {
1406 SCOPED_SHARE_CONTEXT_LOCK(context);
1407 bool isCallValid =
1408 (context->skipValidation() ||
1409 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1410 context->getMutableErrorSetForValidation(),
1411 angle::EntryPoint::GLEvalCoord1d) &&
1412 ValidateEvalCoord1d(context, angle::EntryPoint::GLEvalCoord1d, u)));
1413 if (isCallValid)
1414 {
1415 context->evalCoord1d(u);
1416 }
1417 ANGLE_CAPTURE_GL(EvalCoord1d, isCallValid, context, u);
1418 }
1419 else
1420 {
1421 GenerateContextLostErrorOnCurrentGlobalContext();
1422 }
1423 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1424 }
1425
GL_EvalCoord1dv(const GLdouble * u)1426 void GL_APIENTRY GL_EvalCoord1dv(const GLdouble *u)
1427 {
1428 Context *context = GetValidGlobalContext();
1429 EVENT(context, GLEvalCoord1dv, "context = %d, u = 0x%016" PRIxPTR "", CID(context),
1430 (uintptr_t)u);
1431
1432 if (context)
1433 {
1434 SCOPED_SHARE_CONTEXT_LOCK(context);
1435 bool isCallValid =
1436 (context->skipValidation() ||
1437 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1438 context->getMutableErrorSetForValidation(),
1439 angle::EntryPoint::GLEvalCoord1dv) &&
1440 ValidateEvalCoord1dv(context, angle::EntryPoint::GLEvalCoord1dv, u)));
1441 if (isCallValid)
1442 {
1443 context->evalCoord1dv(u);
1444 }
1445 ANGLE_CAPTURE_GL(EvalCoord1dv, isCallValid, context, u);
1446 }
1447 else
1448 {
1449 GenerateContextLostErrorOnCurrentGlobalContext();
1450 }
1451 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1452 }
1453
GL_EvalCoord1f(GLfloat u)1454 void GL_APIENTRY GL_EvalCoord1f(GLfloat u)
1455 {
1456 Context *context = GetValidGlobalContext();
1457 EVENT(context, GLEvalCoord1f, "context = %d, u = %f", CID(context), u);
1458
1459 if (context)
1460 {
1461 SCOPED_SHARE_CONTEXT_LOCK(context);
1462 bool isCallValid =
1463 (context->skipValidation() ||
1464 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1465 context->getMutableErrorSetForValidation(),
1466 angle::EntryPoint::GLEvalCoord1f) &&
1467 ValidateEvalCoord1f(context, angle::EntryPoint::GLEvalCoord1f, u)));
1468 if (isCallValid)
1469 {
1470 context->evalCoord1f(u);
1471 }
1472 ANGLE_CAPTURE_GL(EvalCoord1f, isCallValid, context, u);
1473 }
1474 else
1475 {
1476 GenerateContextLostErrorOnCurrentGlobalContext();
1477 }
1478 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1479 }
1480
GL_EvalCoord1fv(const GLfloat * u)1481 void GL_APIENTRY GL_EvalCoord1fv(const GLfloat *u)
1482 {
1483 Context *context = GetValidGlobalContext();
1484 EVENT(context, GLEvalCoord1fv, "context = %d, u = 0x%016" PRIxPTR "", CID(context),
1485 (uintptr_t)u);
1486
1487 if (context)
1488 {
1489 SCOPED_SHARE_CONTEXT_LOCK(context);
1490 bool isCallValid =
1491 (context->skipValidation() ||
1492 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1493 context->getMutableErrorSetForValidation(),
1494 angle::EntryPoint::GLEvalCoord1fv) &&
1495 ValidateEvalCoord1fv(context, angle::EntryPoint::GLEvalCoord1fv, u)));
1496 if (isCallValid)
1497 {
1498 context->evalCoord1fv(u);
1499 }
1500 ANGLE_CAPTURE_GL(EvalCoord1fv, isCallValid, context, u);
1501 }
1502 else
1503 {
1504 GenerateContextLostErrorOnCurrentGlobalContext();
1505 }
1506 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1507 }
1508
GL_EvalCoord2d(GLdouble u,GLdouble v)1509 void GL_APIENTRY GL_EvalCoord2d(GLdouble u, GLdouble v)
1510 {
1511 Context *context = GetValidGlobalContext();
1512 EVENT(context, GLEvalCoord2d, "context = %d, u = %f, v = %f", CID(context), u, v);
1513
1514 if (context)
1515 {
1516 SCOPED_SHARE_CONTEXT_LOCK(context);
1517 bool isCallValid =
1518 (context->skipValidation() ||
1519 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1520 context->getMutableErrorSetForValidation(),
1521 angle::EntryPoint::GLEvalCoord2d) &&
1522 ValidateEvalCoord2d(context, angle::EntryPoint::GLEvalCoord2d, u, v)));
1523 if (isCallValid)
1524 {
1525 context->evalCoord2d(u, v);
1526 }
1527 ANGLE_CAPTURE_GL(EvalCoord2d, isCallValid, context, u, v);
1528 }
1529 else
1530 {
1531 GenerateContextLostErrorOnCurrentGlobalContext();
1532 }
1533 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1534 }
1535
GL_EvalCoord2dv(const GLdouble * u)1536 void GL_APIENTRY GL_EvalCoord2dv(const GLdouble *u)
1537 {
1538 Context *context = GetValidGlobalContext();
1539 EVENT(context, GLEvalCoord2dv, "context = %d, u = 0x%016" PRIxPTR "", CID(context),
1540 (uintptr_t)u);
1541
1542 if (context)
1543 {
1544 SCOPED_SHARE_CONTEXT_LOCK(context);
1545 bool isCallValid =
1546 (context->skipValidation() ||
1547 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1548 context->getMutableErrorSetForValidation(),
1549 angle::EntryPoint::GLEvalCoord2dv) &&
1550 ValidateEvalCoord2dv(context, angle::EntryPoint::GLEvalCoord2dv, u)));
1551 if (isCallValid)
1552 {
1553 context->evalCoord2dv(u);
1554 }
1555 ANGLE_CAPTURE_GL(EvalCoord2dv, isCallValid, context, u);
1556 }
1557 else
1558 {
1559 GenerateContextLostErrorOnCurrentGlobalContext();
1560 }
1561 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1562 }
1563
GL_EvalCoord2f(GLfloat u,GLfloat v)1564 void GL_APIENTRY GL_EvalCoord2f(GLfloat u, GLfloat v)
1565 {
1566 Context *context = GetValidGlobalContext();
1567 EVENT(context, GLEvalCoord2f, "context = %d, u = %f, v = %f", CID(context), u, v);
1568
1569 if (context)
1570 {
1571 SCOPED_SHARE_CONTEXT_LOCK(context);
1572 bool isCallValid =
1573 (context->skipValidation() ||
1574 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1575 context->getMutableErrorSetForValidation(),
1576 angle::EntryPoint::GLEvalCoord2f) &&
1577 ValidateEvalCoord2f(context, angle::EntryPoint::GLEvalCoord2f, u, v)));
1578 if (isCallValid)
1579 {
1580 context->evalCoord2f(u, v);
1581 }
1582 ANGLE_CAPTURE_GL(EvalCoord2f, isCallValid, context, u, v);
1583 }
1584 else
1585 {
1586 GenerateContextLostErrorOnCurrentGlobalContext();
1587 }
1588 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1589 }
1590
GL_EvalCoord2fv(const GLfloat * u)1591 void GL_APIENTRY GL_EvalCoord2fv(const GLfloat *u)
1592 {
1593 Context *context = GetValidGlobalContext();
1594 EVENT(context, GLEvalCoord2fv, "context = %d, u = 0x%016" PRIxPTR "", CID(context),
1595 (uintptr_t)u);
1596
1597 if (context)
1598 {
1599 SCOPED_SHARE_CONTEXT_LOCK(context);
1600 bool isCallValid =
1601 (context->skipValidation() ||
1602 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1603 context->getMutableErrorSetForValidation(),
1604 angle::EntryPoint::GLEvalCoord2fv) &&
1605 ValidateEvalCoord2fv(context, angle::EntryPoint::GLEvalCoord2fv, u)));
1606 if (isCallValid)
1607 {
1608 context->evalCoord2fv(u);
1609 }
1610 ANGLE_CAPTURE_GL(EvalCoord2fv, isCallValid, context, u);
1611 }
1612 else
1613 {
1614 GenerateContextLostErrorOnCurrentGlobalContext();
1615 }
1616 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1617 }
1618
GL_EvalMesh1(GLenum mode,GLint i1,GLint i2)1619 void GL_APIENTRY GL_EvalMesh1(GLenum mode, GLint i1, GLint i2)
1620 {
1621 Context *context = GetValidGlobalContext();
1622 EVENT(context, GLEvalMesh1, "context = %d, mode = %s, i1 = %d, i2 = %d", CID(context),
1623 GLenumToString(BigGLEnum::MeshMode1, mode), i1, i2);
1624
1625 if (context)
1626 {
1627 SCOPED_SHARE_CONTEXT_LOCK(context);
1628 bool isCallValid =
1629 (context->skipValidation() ||
1630 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1631 context->getMutableErrorSetForValidation(),
1632 angle::EntryPoint::GLEvalMesh1) &&
1633 ValidateEvalMesh1(context, angle::EntryPoint::GLEvalMesh1, mode, i1, i2)));
1634 if (isCallValid)
1635 {
1636 context->evalMesh1(mode, i1, i2);
1637 }
1638 ANGLE_CAPTURE_GL(EvalMesh1, isCallValid, context, mode, i1, i2);
1639 }
1640 else
1641 {
1642 GenerateContextLostErrorOnCurrentGlobalContext();
1643 }
1644 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1645 }
1646
GL_EvalMesh2(GLenum mode,GLint i1,GLint i2,GLint j1,GLint j2)1647 void GL_APIENTRY GL_EvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
1648 {
1649 Context *context = GetValidGlobalContext();
1650 EVENT(context, GLEvalMesh2, "context = %d, mode = %s, i1 = %d, i2 = %d, j1 = %d, j2 = %d",
1651 CID(context), GLenumToString(BigGLEnum::MeshMode2, mode), i1, i2, j1, j2);
1652
1653 if (context)
1654 {
1655 SCOPED_SHARE_CONTEXT_LOCK(context);
1656 bool isCallValid =
1657 (context->skipValidation() ||
1658 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1659 context->getMutableErrorSetForValidation(),
1660 angle::EntryPoint::GLEvalMesh2) &&
1661 ValidateEvalMesh2(context, angle::EntryPoint::GLEvalMesh2, mode, i1, i2, j1, j2)));
1662 if (isCallValid)
1663 {
1664 context->evalMesh2(mode, i1, i2, j1, j2);
1665 }
1666 ANGLE_CAPTURE_GL(EvalMesh2, isCallValid, context, mode, i1, i2, j1, j2);
1667 }
1668 else
1669 {
1670 GenerateContextLostErrorOnCurrentGlobalContext();
1671 }
1672 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1673 }
1674
GL_EvalPoint1(GLint i)1675 void GL_APIENTRY GL_EvalPoint1(GLint i)
1676 {
1677 Context *context = GetValidGlobalContext();
1678 EVENT(context, GLEvalPoint1, "context = %d, i = %d", CID(context), i);
1679
1680 if (context)
1681 {
1682 SCOPED_SHARE_CONTEXT_LOCK(context);
1683 bool isCallValid =
1684 (context->skipValidation() ||
1685 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1686 context->getMutableErrorSetForValidation(),
1687 angle::EntryPoint::GLEvalPoint1) &&
1688 ValidateEvalPoint1(context, angle::EntryPoint::GLEvalPoint1, i)));
1689 if (isCallValid)
1690 {
1691 context->evalPoint1(i);
1692 }
1693 ANGLE_CAPTURE_GL(EvalPoint1, isCallValid, context, i);
1694 }
1695 else
1696 {
1697 GenerateContextLostErrorOnCurrentGlobalContext();
1698 }
1699 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1700 }
1701
GL_EvalPoint2(GLint i,GLint j)1702 void GL_APIENTRY GL_EvalPoint2(GLint i, GLint j)
1703 {
1704 Context *context = GetValidGlobalContext();
1705 EVENT(context, GLEvalPoint2, "context = %d, i = %d, j = %d", CID(context), i, j);
1706
1707 if (context)
1708 {
1709 SCOPED_SHARE_CONTEXT_LOCK(context);
1710 bool isCallValid =
1711 (context->skipValidation() ||
1712 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1713 context->getMutableErrorSetForValidation(),
1714 angle::EntryPoint::GLEvalPoint2) &&
1715 ValidateEvalPoint2(context, angle::EntryPoint::GLEvalPoint2, i, j)));
1716 if (isCallValid)
1717 {
1718 context->evalPoint2(i, j);
1719 }
1720 ANGLE_CAPTURE_GL(EvalPoint2, isCallValid, context, i, j);
1721 }
1722 else
1723 {
1724 GenerateContextLostErrorOnCurrentGlobalContext();
1725 }
1726 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1727 }
1728
GL_FeedbackBuffer(GLsizei size,GLenum type,GLfloat * buffer)1729 void GL_APIENTRY GL_FeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
1730 {
1731 Context *context = GetValidGlobalContext();
1732 EVENT(context, GLFeedbackBuffer,
1733 "context = %d, size = %d, type = %s, buffer = 0x%016" PRIxPTR "", CID(context), size,
1734 GLenumToString(BigGLEnum::FeedbackType, type), (uintptr_t)buffer);
1735
1736 if (context)
1737 {
1738 SCOPED_SHARE_CONTEXT_LOCK(context);
1739 bool isCallValid =
1740 (context->skipValidation() ||
1741 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1742 context->getMutableErrorSetForValidation(),
1743 angle::EntryPoint::GLFeedbackBuffer) &&
1744 ValidateFeedbackBuffer(context, angle::EntryPoint::GLFeedbackBuffer, size, type,
1745 buffer)));
1746 if (isCallValid)
1747 {
1748 context->feedbackBuffer(size, type, buffer);
1749 }
1750 ANGLE_CAPTURE_GL(FeedbackBuffer, isCallValid, context, size, type, buffer);
1751 }
1752 else
1753 {
1754 GenerateContextLostErrorOnCurrentGlobalContext();
1755 }
1756 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1757 }
1758
GL_Fogi(GLenum pname,GLint param)1759 void GL_APIENTRY GL_Fogi(GLenum pname, GLint param)
1760 {
1761 Context *context = GetValidGlobalContext();
1762 EVENT(context, GLFogi, "context = %d, pname = %s, param = %d", CID(context),
1763 GLenumToString(BigGLEnum::FogParameter, pname), param);
1764
1765 if (context)
1766 {
1767 SCOPED_SHARE_CONTEXT_LOCK(context);
1768 bool isCallValid =
1769 (context->skipValidation() ||
1770 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1771 context->getMutableErrorSetForValidation(),
1772 angle::EntryPoint::GLFogi) &&
1773 ValidateFogi(context, angle::EntryPoint::GLFogi, pname, param)));
1774 if (isCallValid)
1775 {
1776 context->fogi(pname, param);
1777 }
1778 ANGLE_CAPTURE_GL(Fogi, isCallValid, context, pname, param);
1779 }
1780 else
1781 {
1782 GenerateContextLostErrorOnCurrentGlobalContext();
1783 }
1784 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1785 }
1786
GL_Fogiv(GLenum pname,const GLint * params)1787 void GL_APIENTRY GL_Fogiv(GLenum pname, const GLint *params)
1788 {
1789 Context *context = GetValidGlobalContext();
1790 EVENT(context, GLFogiv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
1791 GLenumToString(BigGLEnum::FogParameter, pname), (uintptr_t)params);
1792
1793 if (context)
1794 {
1795 SCOPED_SHARE_CONTEXT_LOCK(context);
1796 bool isCallValid =
1797 (context->skipValidation() ||
1798 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1799 context->getMutableErrorSetForValidation(),
1800 angle::EntryPoint::GLFogiv) &&
1801 ValidateFogiv(context, angle::EntryPoint::GLFogiv, pname, params)));
1802 if (isCallValid)
1803 {
1804 context->fogiv(pname, params);
1805 }
1806 ANGLE_CAPTURE_GL(Fogiv, isCallValid, context, pname, params);
1807 }
1808 else
1809 {
1810 GenerateContextLostErrorOnCurrentGlobalContext();
1811 }
1812 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1813 }
1814
GL_Frustum(GLdouble left,GLdouble right,GLdouble bottom,GLdouble top,GLdouble zNear,GLdouble zFar)1815 void GL_APIENTRY GL_Frustum(GLdouble left,
1816 GLdouble right,
1817 GLdouble bottom,
1818 GLdouble top,
1819 GLdouble zNear,
1820 GLdouble zFar)
1821 {
1822 Context *context = GetValidGlobalContext();
1823 EVENT(context, GLFrustum,
1824 "context = %d, left = %f, right = %f, bottom = %f, top = %f, zNear = %f, zFar = %f",
1825 CID(context), left, right, bottom, top, zNear, zFar);
1826
1827 if (context)
1828 {
1829 SCOPED_SHARE_CONTEXT_LOCK(context);
1830 bool isCallValid =
1831 (context->skipValidation() ||
1832 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1833 context->getMutableErrorSetForValidation(),
1834 angle::EntryPoint::GLFrustum) &&
1835 ValidateFrustum(context, angle::EntryPoint::GLFrustum, left, right, bottom, top,
1836 zNear, zFar)));
1837 if (isCallValid)
1838 {
1839 context->frustum(left, right, bottom, top, zNear, zFar);
1840 }
1841 ANGLE_CAPTURE_GL(Frustum, isCallValid, context, left, right, bottom, top, zNear, zFar);
1842 }
1843 else
1844 {
1845 GenerateContextLostErrorOnCurrentGlobalContext();
1846 }
1847 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1848 }
1849
GL_GenLists(GLsizei range)1850 GLuint GL_APIENTRY GL_GenLists(GLsizei range)
1851 {
1852 Context *context = GetValidGlobalContext();
1853 EVENT(context, GLGenLists, "context = %d, range = %d", CID(context), range);
1854
1855 GLuint returnValue;
1856 if (context)
1857 {
1858 SCOPED_SHARE_CONTEXT_LOCK(context);
1859 bool isCallValid = (context->skipValidation() ||
1860 ValidateGenLists(context, angle::EntryPoint::GLGenLists, range));
1861 if (isCallValid)
1862 {
1863 returnValue = context->genLists(range);
1864 }
1865 else
1866 {
1867 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGenLists, GLuint>();
1868 }
1869 ANGLE_CAPTURE_GL(GenLists, isCallValid, context, range, returnValue);
1870 }
1871 else
1872 {
1873 GenerateContextLostErrorOnCurrentGlobalContext();
1874 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLGenLists, GLuint>();
1875 }
1876 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1877 return returnValue;
1878 }
1879
GL_GetClipPlane(GLenum plane,GLdouble * equation)1880 void GL_APIENTRY GL_GetClipPlane(GLenum plane, GLdouble *equation)
1881 {
1882 Context *context = GetValidGlobalContext();
1883 EVENT(context, GLGetClipPlane, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
1884 CID(context), GLenumToString(BigGLEnum::ClipPlaneName, plane), (uintptr_t)equation);
1885
1886 if (context)
1887 {
1888 SCOPED_SHARE_CONTEXT_LOCK(context);
1889 bool isCallValid =
1890 (context->skipValidation() ||
1891 ValidateGetClipPlane(context, angle::EntryPoint::GLGetClipPlane, plane, equation));
1892 if (isCallValid)
1893 {
1894 context->getClipPlane(plane, equation);
1895 }
1896 ANGLE_CAPTURE_GL(GetClipPlane, isCallValid, context, plane, equation);
1897 }
1898 else
1899 {
1900 GenerateContextLostErrorOnCurrentGlobalContext();
1901 }
1902 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1903 }
1904
GL_GetDoublev(GLenum pname,GLdouble * data)1905 void GL_APIENTRY GL_GetDoublev(GLenum pname, GLdouble *data)
1906 {
1907 Context *context = GetValidGlobalContext();
1908 EVENT(context, GLGetDoublev, "context = %d, pname = %s, data = 0x%016" PRIxPTR "", CID(context),
1909 GLenumToString(BigGLEnum::GetPName, pname), (uintptr_t)data);
1910
1911 if (context)
1912 {
1913 SCOPED_SHARE_CONTEXT_LOCK(context);
1914 bool isCallValid =
1915 (context->skipValidation() ||
1916 ValidateGetDoublev(context, angle::EntryPoint::GLGetDoublev, pname, data));
1917 if (isCallValid)
1918 {
1919 context->getDoublev(pname, data);
1920 }
1921 ANGLE_CAPTURE_GL(GetDoublev, isCallValid, context, pname, data);
1922 }
1923 else
1924 {
1925 GenerateContextLostErrorOnCurrentGlobalContext();
1926 }
1927 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1928 }
1929
GL_GetLightiv(GLenum light,GLenum pname,GLint * params)1930 void GL_APIENTRY GL_GetLightiv(GLenum light, GLenum pname, GLint *params)
1931 {
1932 Context *context = GetValidGlobalContext();
1933 EVENT(context, GLGetLightiv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
1934 CID(context), GLenumToString(BigGLEnum::LightName, light),
1935 GLenumToString(BigGLEnum::LightParameter, pname), (uintptr_t)params);
1936
1937 if (context)
1938 {
1939 SCOPED_SHARE_CONTEXT_LOCK(context);
1940 bool isCallValid =
1941 (context->skipValidation() ||
1942 ValidateGetLightiv(context, angle::EntryPoint::GLGetLightiv, light, pname, params));
1943 if (isCallValid)
1944 {
1945 context->getLightiv(light, pname, params);
1946 }
1947 ANGLE_CAPTURE_GL(GetLightiv, isCallValid, context, light, pname, params);
1948 }
1949 else
1950 {
1951 GenerateContextLostErrorOnCurrentGlobalContext();
1952 }
1953 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1954 }
1955
GL_GetMapdv(GLenum target,GLenum query,GLdouble * v)1956 void GL_APIENTRY GL_GetMapdv(GLenum target, GLenum query, GLdouble *v)
1957 {
1958 Context *context = GetValidGlobalContext();
1959 EVENT(context, GLGetMapdv, "context = %d, target = %s, query = %s, v = 0x%016" PRIxPTR "",
1960 CID(context), GLenumToString(BigGLEnum::MapTarget, target),
1961 GLenumToString(BigGLEnum::GetMapQuery, query), (uintptr_t)v);
1962
1963 if (context)
1964 {
1965 SCOPED_SHARE_CONTEXT_LOCK(context);
1966 bool isCallValid =
1967 (context->skipValidation() ||
1968 ValidateGetMapdv(context, angle::EntryPoint::GLGetMapdv, target, query, v));
1969 if (isCallValid)
1970 {
1971 context->getMapdv(target, query, v);
1972 }
1973 ANGLE_CAPTURE_GL(GetMapdv, isCallValid, context, target, query, v);
1974 }
1975 else
1976 {
1977 GenerateContextLostErrorOnCurrentGlobalContext();
1978 }
1979 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1980 }
1981
GL_GetMapfv(GLenum target,GLenum query,GLfloat * v)1982 void GL_APIENTRY GL_GetMapfv(GLenum target, GLenum query, GLfloat *v)
1983 {
1984 Context *context = GetValidGlobalContext();
1985 EVENT(context, GLGetMapfv, "context = %d, target = %s, query = %s, v = 0x%016" PRIxPTR "",
1986 CID(context), GLenumToString(BigGLEnum::MapTarget, target),
1987 GLenumToString(BigGLEnum::GetMapQuery, query), (uintptr_t)v);
1988
1989 if (context)
1990 {
1991 SCOPED_SHARE_CONTEXT_LOCK(context);
1992 bool isCallValid =
1993 (context->skipValidation() ||
1994 ValidateGetMapfv(context, angle::EntryPoint::GLGetMapfv, target, query, v));
1995 if (isCallValid)
1996 {
1997 context->getMapfv(target, query, v);
1998 }
1999 ANGLE_CAPTURE_GL(GetMapfv, isCallValid, context, target, query, v);
2000 }
2001 else
2002 {
2003 GenerateContextLostErrorOnCurrentGlobalContext();
2004 }
2005 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2006 }
2007
GL_GetMapiv(GLenum target,GLenum query,GLint * v)2008 void GL_APIENTRY GL_GetMapiv(GLenum target, GLenum query, GLint *v)
2009 {
2010 Context *context = GetValidGlobalContext();
2011 EVENT(context, GLGetMapiv, "context = %d, target = %s, query = %s, v = 0x%016" PRIxPTR "",
2012 CID(context), GLenumToString(BigGLEnum::MapTarget, target),
2013 GLenumToString(BigGLEnum::GetMapQuery, query), (uintptr_t)v);
2014
2015 if (context)
2016 {
2017 SCOPED_SHARE_CONTEXT_LOCK(context);
2018 bool isCallValid =
2019 (context->skipValidation() ||
2020 ValidateGetMapiv(context, angle::EntryPoint::GLGetMapiv, target, query, v));
2021 if (isCallValid)
2022 {
2023 context->getMapiv(target, query, v);
2024 }
2025 ANGLE_CAPTURE_GL(GetMapiv, isCallValid, context, target, query, v);
2026 }
2027 else
2028 {
2029 GenerateContextLostErrorOnCurrentGlobalContext();
2030 }
2031 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2032 }
2033
GL_GetMaterialiv(GLenum face,GLenum pname,GLint * params)2034 void GL_APIENTRY GL_GetMaterialiv(GLenum face, GLenum pname, GLint *params)
2035 {
2036 Context *context = GetValidGlobalContext();
2037 EVENT(context, GLGetMaterialiv,
2038 "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
2039 GLenumToString(BigGLEnum::TriangleFace, face),
2040 GLenumToString(BigGLEnum::MaterialParameter, pname), (uintptr_t)params);
2041
2042 if (context)
2043 {
2044 SCOPED_SHARE_CONTEXT_LOCK(context);
2045 bool isCallValid = (context->skipValidation() ||
2046 ValidateGetMaterialiv(context, angle::EntryPoint::GLGetMaterialiv, face,
2047 pname, params));
2048 if (isCallValid)
2049 {
2050 context->getMaterialiv(face, pname, params);
2051 }
2052 ANGLE_CAPTURE_GL(GetMaterialiv, isCallValid, context, face, pname, params);
2053 }
2054 else
2055 {
2056 GenerateContextLostErrorOnCurrentGlobalContext();
2057 }
2058 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2059 }
2060
GL_GetPixelMapfv(GLenum map,GLfloat * values)2061 void GL_APIENTRY GL_GetPixelMapfv(GLenum map, GLfloat *values)
2062 {
2063 Context *context = GetValidGlobalContext();
2064 EVENT(context, GLGetPixelMapfv, "context = %d, map = %s, values = 0x%016" PRIxPTR "",
2065 CID(context), GLenumToString(BigGLEnum::PixelMap, map), (uintptr_t)values);
2066
2067 if (context)
2068 {
2069 SCOPED_SHARE_CONTEXT_LOCK(context);
2070 bool isCallValid =
2071 (context->skipValidation() ||
2072 ValidateGetPixelMapfv(context, angle::EntryPoint::GLGetPixelMapfv, map, values));
2073 if (isCallValid)
2074 {
2075 context->getPixelMapfv(map, values);
2076 }
2077 ANGLE_CAPTURE_GL(GetPixelMapfv, isCallValid, context, map, values);
2078 }
2079 else
2080 {
2081 GenerateContextLostErrorOnCurrentGlobalContext();
2082 }
2083 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2084 }
2085
GL_GetPixelMapuiv(GLenum map,GLuint * values)2086 void GL_APIENTRY GL_GetPixelMapuiv(GLenum map, GLuint *values)
2087 {
2088 Context *context = GetValidGlobalContext();
2089 EVENT(context, GLGetPixelMapuiv, "context = %d, map = %s, values = 0x%016" PRIxPTR "",
2090 CID(context), GLenumToString(BigGLEnum::PixelMap, map), (uintptr_t)values);
2091
2092 if (context)
2093 {
2094 SCOPED_SHARE_CONTEXT_LOCK(context);
2095 bool isCallValid =
2096 (context->skipValidation() ||
2097 ValidateGetPixelMapuiv(context, angle::EntryPoint::GLGetPixelMapuiv, map, values));
2098 if (isCallValid)
2099 {
2100 context->getPixelMapuiv(map, values);
2101 }
2102 ANGLE_CAPTURE_GL(GetPixelMapuiv, isCallValid, context, map, values);
2103 }
2104 else
2105 {
2106 GenerateContextLostErrorOnCurrentGlobalContext();
2107 }
2108 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2109 }
2110
GL_GetPixelMapusv(GLenum map,GLushort * values)2111 void GL_APIENTRY GL_GetPixelMapusv(GLenum map, GLushort *values)
2112 {
2113 Context *context = GetValidGlobalContext();
2114 EVENT(context, GLGetPixelMapusv, "context = %d, map = %s, values = 0x%016" PRIxPTR "",
2115 CID(context), GLenumToString(BigGLEnum::PixelMap, map), (uintptr_t)values);
2116
2117 if (context)
2118 {
2119 SCOPED_SHARE_CONTEXT_LOCK(context);
2120 bool isCallValid =
2121 (context->skipValidation() ||
2122 ValidateGetPixelMapusv(context, angle::EntryPoint::GLGetPixelMapusv, map, values));
2123 if (isCallValid)
2124 {
2125 context->getPixelMapusv(map, values);
2126 }
2127 ANGLE_CAPTURE_GL(GetPixelMapusv, isCallValid, context, map, values);
2128 }
2129 else
2130 {
2131 GenerateContextLostErrorOnCurrentGlobalContext();
2132 }
2133 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2134 }
2135
GL_GetPolygonStipple(GLubyte * mask)2136 void GL_APIENTRY GL_GetPolygonStipple(GLubyte *mask)
2137 {
2138 Context *context = GetValidGlobalContext();
2139 EVENT(context, GLGetPolygonStipple, "context = %d, mask = 0x%016" PRIxPTR "", CID(context),
2140 (uintptr_t)mask);
2141
2142 if (context)
2143 {
2144 SCOPED_SHARE_CONTEXT_LOCK(context);
2145 bool isCallValid =
2146 (context->skipValidation() ||
2147 ValidateGetPolygonStipple(context, angle::EntryPoint::GLGetPolygonStipple, mask));
2148 if (isCallValid)
2149 {
2150 context->getPolygonStipple(mask);
2151 }
2152 ANGLE_CAPTURE_GL(GetPolygonStipple, isCallValid, context, mask);
2153 }
2154 else
2155 {
2156 GenerateContextLostErrorOnCurrentGlobalContext();
2157 }
2158 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2159 }
2160
GL_GetTexGendv(GLenum coord,GLenum pname,GLdouble * params)2161 void GL_APIENTRY GL_GetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
2162 {
2163 Context *context = GetValidGlobalContext();
2164 EVENT(context, GLGetTexGendv,
2165 "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
2166 GLenumToString(BigGLEnum::TextureCoordName, coord),
2167 GLenumToString(BigGLEnum::TextureGenParameter, pname), (uintptr_t)params);
2168
2169 if (context)
2170 {
2171 SCOPED_SHARE_CONTEXT_LOCK(context);
2172 bool isCallValid =
2173 (context->skipValidation() ||
2174 ValidateGetTexGendv(context, angle::EntryPoint::GLGetTexGendv, coord, pname, params));
2175 if (isCallValid)
2176 {
2177 context->getTexGendv(coord, pname, params);
2178 }
2179 ANGLE_CAPTURE_GL(GetTexGendv, isCallValid, context, coord, pname, params);
2180 }
2181 else
2182 {
2183 GenerateContextLostErrorOnCurrentGlobalContext();
2184 }
2185 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2186 }
2187
GL_GetTexGenfv(GLenum coord,GLenum pname,GLfloat * params)2188 void GL_APIENTRY GL_GetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
2189 {
2190 Context *context = GetValidGlobalContext();
2191 EVENT(context, GLGetTexGenfv,
2192 "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
2193 GLenumToString(BigGLEnum::TextureCoordName, coord),
2194 GLenumToString(BigGLEnum::TextureGenParameter, pname), (uintptr_t)params);
2195
2196 if (context)
2197 {
2198 SCOPED_SHARE_CONTEXT_LOCK(context);
2199 bool isCallValid =
2200 (context->skipValidation() ||
2201 ValidateGetTexGenfv(context, angle::EntryPoint::GLGetTexGenfv, coord, pname, params));
2202 if (isCallValid)
2203 {
2204 context->getTexGenfv(coord, pname, params);
2205 }
2206 ANGLE_CAPTURE_GL(GetTexGenfv, isCallValid, context, coord, pname, params);
2207 }
2208 else
2209 {
2210 GenerateContextLostErrorOnCurrentGlobalContext();
2211 }
2212 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2213 }
2214
GL_GetTexGeniv(GLenum coord,GLenum pname,GLint * params)2215 void GL_APIENTRY GL_GetTexGeniv(GLenum coord, GLenum pname, GLint *params)
2216 {
2217 Context *context = GetValidGlobalContext();
2218 EVENT(context, GLGetTexGeniv,
2219 "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
2220 GLenumToString(BigGLEnum::TextureCoordName, coord),
2221 GLenumToString(BigGLEnum::TextureGenParameter, pname), (uintptr_t)params);
2222
2223 if (context)
2224 {
2225 SCOPED_SHARE_CONTEXT_LOCK(context);
2226 bool isCallValid =
2227 (context->skipValidation() ||
2228 ValidateGetTexGeniv(context, angle::EntryPoint::GLGetTexGeniv, coord, pname, params));
2229 if (isCallValid)
2230 {
2231 context->getTexGeniv(coord, pname, params);
2232 }
2233 ANGLE_CAPTURE_GL(GetTexGeniv, isCallValid, context, coord, pname, params);
2234 }
2235 else
2236 {
2237 GenerateContextLostErrorOnCurrentGlobalContext();
2238 }
2239 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2240 }
2241
2242 void GL_APIENTRY
GL_GetTexImage(GLenum target,GLint level,GLenum format,GLenum type,void * pixels)2243 GL_GetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
2244 {
2245 Context *context = GetValidGlobalContext();
2246 EVENT(context, GLGetTexImage,
2247 "context = %d, target = %s, level = %d, format = %s, type = %s, pixels = 0x%016" PRIxPTR
2248 "",
2249 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level,
2250 GLenumToString(BigGLEnum::PixelFormat, format),
2251 GLenumToString(BigGLEnum::PixelType, type), (uintptr_t)pixels);
2252
2253 if (context)
2254 {
2255 TextureTarget targetPacked = PackParam<TextureTarget>(target);
2256 SCOPED_SHARE_CONTEXT_LOCK(context);
2257 bool isCallValid = (context->skipValidation() ||
2258 ValidateGetTexImage(context, angle::EntryPoint::GLGetTexImage,
2259 targetPacked, level, format, type, pixels));
2260 if (isCallValid)
2261 {
2262 context->getTexImage(targetPacked, level, format, type, pixels);
2263 }
2264 ANGLE_CAPTURE_GL(GetTexImage, isCallValid, context, targetPacked, level, format, type,
2265 pixels);
2266 }
2267 else
2268 {
2269 GenerateContextLostErrorOnCurrentGlobalContext();
2270 }
2271 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2272 }
2273
GL_IndexMask(GLuint mask)2274 void GL_APIENTRY GL_IndexMask(GLuint mask)
2275 {
2276 Context *context = GetValidGlobalContext();
2277 EVENT(context, GLIndexMask, "context = %d, mask = %u", CID(context), mask);
2278
2279 if (context)
2280 {
2281 SCOPED_SHARE_CONTEXT_LOCK(context);
2282 bool isCallValid =
2283 (context->skipValidation() ||
2284 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2285 context->getMutableErrorSetForValidation(),
2286 angle::EntryPoint::GLIndexMask) &&
2287 ValidateIndexMask(context, angle::EntryPoint::GLIndexMask, mask)));
2288 if (isCallValid)
2289 {
2290 context->indexMask(mask);
2291 }
2292 ANGLE_CAPTURE_GL(IndexMask, isCallValid, context, mask);
2293 }
2294 else
2295 {
2296 GenerateContextLostErrorOnCurrentGlobalContext();
2297 }
2298 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2299 }
2300
GL_Indexd(GLdouble c)2301 void GL_APIENTRY GL_Indexd(GLdouble c)
2302 {
2303 Context *context = GetValidGlobalContext();
2304 EVENT(context, GLIndexd, "context = %d, c = %f", CID(context), c);
2305
2306 if (context)
2307 {
2308 SCOPED_SHARE_CONTEXT_LOCK(context);
2309 bool isCallValid =
2310 (context->skipValidation() ||
2311 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2312 context->getMutableErrorSetForValidation(),
2313 angle::EntryPoint::GLIndexd) &&
2314 ValidateIndexd(context, angle::EntryPoint::GLIndexd, c)));
2315 if (isCallValid)
2316 {
2317 context->indexd(c);
2318 }
2319 ANGLE_CAPTURE_GL(Indexd, isCallValid, context, c);
2320 }
2321 else
2322 {
2323 GenerateContextLostErrorOnCurrentGlobalContext();
2324 }
2325 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2326 }
2327
GL_Indexdv(const GLdouble * c)2328 void GL_APIENTRY GL_Indexdv(const GLdouble *c)
2329 {
2330 Context *context = GetValidGlobalContext();
2331 EVENT(context, GLIndexdv, "context = %d, c = 0x%016" PRIxPTR "", CID(context), (uintptr_t)c);
2332
2333 if (context)
2334 {
2335 SCOPED_SHARE_CONTEXT_LOCK(context);
2336 bool isCallValid =
2337 (context->skipValidation() ||
2338 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2339 context->getMutableErrorSetForValidation(),
2340 angle::EntryPoint::GLIndexdv) &&
2341 ValidateIndexdv(context, angle::EntryPoint::GLIndexdv, c)));
2342 if (isCallValid)
2343 {
2344 context->indexdv(c);
2345 }
2346 ANGLE_CAPTURE_GL(Indexdv, isCallValid, context, c);
2347 }
2348 else
2349 {
2350 GenerateContextLostErrorOnCurrentGlobalContext();
2351 }
2352 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2353 }
2354
GL_Indexf(GLfloat c)2355 void GL_APIENTRY GL_Indexf(GLfloat c)
2356 {
2357 Context *context = GetValidGlobalContext();
2358 EVENT(context, GLIndexf, "context = %d, c = %f", CID(context), c);
2359
2360 if (context)
2361 {
2362 SCOPED_SHARE_CONTEXT_LOCK(context);
2363 bool isCallValid =
2364 (context->skipValidation() ||
2365 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2366 context->getMutableErrorSetForValidation(),
2367 angle::EntryPoint::GLIndexf) &&
2368 ValidateIndexf(context, angle::EntryPoint::GLIndexf, c)));
2369 if (isCallValid)
2370 {
2371 context->indexf(c);
2372 }
2373 ANGLE_CAPTURE_GL(Indexf, isCallValid, context, c);
2374 }
2375 else
2376 {
2377 GenerateContextLostErrorOnCurrentGlobalContext();
2378 }
2379 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2380 }
2381
GL_Indexfv(const GLfloat * c)2382 void GL_APIENTRY GL_Indexfv(const GLfloat *c)
2383 {
2384 Context *context = GetValidGlobalContext();
2385 EVENT(context, GLIndexfv, "context = %d, c = 0x%016" PRIxPTR "", CID(context), (uintptr_t)c);
2386
2387 if (context)
2388 {
2389 SCOPED_SHARE_CONTEXT_LOCK(context);
2390 bool isCallValid =
2391 (context->skipValidation() ||
2392 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2393 context->getMutableErrorSetForValidation(),
2394 angle::EntryPoint::GLIndexfv) &&
2395 ValidateIndexfv(context, angle::EntryPoint::GLIndexfv, c)));
2396 if (isCallValid)
2397 {
2398 context->indexfv(c);
2399 }
2400 ANGLE_CAPTURE_GL(Indexfv, isCallValid, context, c);
2401 }
2402 else
2403 {
2404 GenerateContextLostErrorOnCurrentGlobalContext();
2405 }
2406 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2407 }
2408
GL_Indexi(GLint c)2409 void GL_APIENTRY GL_Indexi(GLint c)
2410 {
2411 Context *context = GetValidGlobalContext();
2412 EVENT(context, GLIndexi, "context = %d, c = %d", CID(context), c);
2413
2414 if (context)
2415 {
2416 SCOPED_SHARE_CONTEXT_LOCK(context);
2417 bool isCallValid =
2418 (context->skipValidation() ||
2419 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2420 context->getMutableErrorSetForValidation(),
2421 angle::EntryPoint::GLIndexi) &&
2422 ValidateIndexi(context, angle::EntryPoint::GLIndexi, c)));
2423 if (isCallValid)
2424 {
2425 context->indexi(c);
2426 }
2427 ANGLE_CAPTURE_GL(Indexi, isCallValid, context, c);
2428 }
2429 else
2430 {
2431 GenerateContextLostErrorOnCurrentGlobalContext();
2432 }
2433 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2434 }
2435
GL_Indexiv(const GLint * c)2436 void GL_APIENTRY GL_Indexiv(const GLint *c)
2437 {
2438 Context *context = GetValidGlobalContext();
2439 EVENT(context, GLIndexiv, "context = %d, c = 0x%016" PRIxPTR "", CID(context), (uintptr_t)c);
2440
2441 if (context)
2442 {
2443 SCOPED_SHARE_CONTEXT_LOCK(context);
2444 bool isCallValid =
2445 (context->skipValidation() ||
2446 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2447 context->getMutableErrorSetForValidation(),
2448 angle::EntryPoint::GLIndexiv) &&
2449 ValidateIndexiv(context, angle::EntryPoint::GLIndexiv, c)));
2450 if (isCallValid)
2451 {
2452 context->indexiv(c);
2453 }
2454 ANGLE_CAPTURE_GL(Indexiv, isCallValid, context, c);
2455 }
2456 else
2457 {
2458 GenerateContextLostErrorOnCurrentGlobalContext();
2459 }
2460 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2461 }
2462
GL_Indexs(GLshort c)2463 void GL_APIENTRY GL_Indexs(GLshort c)
2464 {
2465 Context *context = GetValidGlobalContext();
2466 EVENT(context, GLIndexs, "context = %d, c = %d", CID(context), c);
2467
2468 if (context)
2469 {
2470 SCOPED_SHARE_CONTEXT_LOCK(context);
2471 bool isCallValid =
2472 (context->skipValidation() ||
2473 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2474 context->getMutableErrorSetForValidation(),
2475 angle::EntryPoint::GLIndexs) &&
2476 ValidateIndexs(context, angle::EntryPoint::GLIndexs, c)));
2477 if (isCallValid)
2478 {
2479 context->indexs(c);
2480 }
2481 ANGLE_CAPTURE_GL(Indexs, isCallValid, context, c);
2482 }
2483 else
2484 {
2485 GenerateContextLostErrorOnCurrentGlobalContext();
2486 }
2487 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2488 }
2489
GL_Indexsv(const GLshort * c)2490 void GL_APIENTRY GL_Indexsv(const GLshort *c)
2491 {
2492 Context *context = GetValidGlobalContext();
2493 EVENT(context, GLIndexsv, "context = %d, c = 0x%016" PRIxPTR "", CID(context), (uintptr_t)c);
2494
2495 if (context)
2496 {
2497 SCOPED_SHARE_CONTEXT_LOCK(context);
2498 bool isCallValid =
2499 (context->skipValidation() ||
2500 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2501 context->getMutableErrorSetForValidation(),
2502 angle::EntryPoint::GLIndexsv) &&
2503 ValidateIndexsv(context, angle::EntryPoint::GLIndexsv, c)));
2504 if (isCallValid)
2505 {
2506 context->indexsv(c);
2507 }
2508 ANGLE_CAPTURE_GL(Indexsv, isCallValid, context, c);
2509 }
2510 else
2511 {
2512 GenerateContextLostErrorOnCurrentGlobalContext();
2513 }
2514 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2515 }
2516
GL_InitNames()2517 void GL_APIENTRY GL_InitNames()
2518 {
2519 Context *context = GetValidGlobalContext();
2520 EVENT(context, GLInitNames, "context = %d", CID(context));
2521
2522 if (context)
2523 {
2524 SCOPED_SHARE_CONTEXT_LOCK(context);
2525 bool isCallValid =
2526 (context->skipValidation() ||
2527 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2528 context->getMutableErrorSetForValidation(),
2529 angle::EntryPoint::GLInitNames) &&
2530 ValidateInitNames(context, angle::EntryPoint::GLInitNames)));
2531 if (isCallValid)
2532 {
2533 context->initNames();
2534 }
2535 ANGLE_CAPTURE_GL(InitNames, isCallValid, context);
2536 }
2537 else
2538 {
2539 GenerateContextLostErrorOnCurrentGlobalContext();
2540 }
2541 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2542 }
2543
GL_IsList(GLuint list)2544 GLboolean GL_APIENTRY GL_IsList(GLuint list)
2545 {
2546 Context *context = GetValidGlobalContext();
2547 EVENT(context, GLIsList, "context = %d, list = %u", CID(context), list);
2548
2549 GLboolean returnValue;
2550 if (context)
2551 {
2552 SCOPED_SHARE_CONTEXT_LOCK(context);
2553 bool isCallValid = (context->skipValidation() ||
2554 ValidateIsList(context, angle::EntryPoint::GLIsList, list));
2555 if (isCallValid)
2556 {
2557 returnValue = context->isList(list);
2558 }
2559 else
2560 {
2561 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsList, GLboolean>();
2562 }
2563 ANGLE_CAPTURE_GL(IsList, isCallValid, context, list, returnValue);
2564 }
2565 else
2566 {
2567 GenerateContextLostErrorOnCurrentGlobalContext();
2568 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLIsList, GLboolean>();
2569 }
2570 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2571 return returnValue;
2572 }
2573
GL_LightModeli(GLenum pname,GLint param)2574 void GL_APIENTRY GL_LightModeli(GLenum pname, GLint param)
2575 {
2576 Context *context = GetValidGlobalContext();
2577 EVENT(context, GLLightModeli, "context = %d, pname = %s, param = %d", CID(context),
2578 GLenumToString(BigGLEnum::LightModelParameter, pname), param);
2579
2580 if (context)
2581 {
2582 SCOPED_SHARE_CONTEXT_LOCK(context);
2583 bool isCallValid =
2584 (context->skipValidation() ||
2585 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2586 context->getMutableErrorSetForValidation(),
2587 angle::EntryPoint::GLLightModeli) &&
2588 ValidateLightModeli(context, angle::EntryPoint::GLLightModeli, pname, param)));
2589 if (isCallValid)
2590 {
2591 context->lightModeli(pname, param);
2592 }
2593 ANGLE_CAPTURE_GL(LightModeli, isCallValid, context, pname, param);
2594 }
2595 else
2596 {
2597 GenerateContextLostErrorOnCurrentGlobalContext();
2598 }
2599 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2600 }
2601
GL_LightModeliv(GLenum pname,const GLint * params)2602 void GL_APIENTRY GL_LightModeliv(GLenum pname, const GLint *params)
2603 {
2604 Context *context = GetValidGlobalContext();
2605 EVENT(context, GLLightModeliv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
2606 CID(context), GLenumToString(BigGLEnum::LightModelParameter, pname), (uintptr_t)params);
2607
2608 if (context)
2609 {
2610 SCOPED_SHARE_CONTEXT_LOCK(context);
2611 bool isCallValid =
2612 (context->skipValidation() ||
2613 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2614 context->getMutableErrorSetForValidation(),
2615 angle::EntryPoint::GLLightModeliv) &&
2616 ValidateLightModeliv(context, angle::EntryPoint::GLLightModeliv, pname, params)));
2617 if (isCallValid)
2618 {
2619 context->lightModeliv(pname, params);
2620 }
2621 ANGLE_CAPTURE_GL(LightModeliv, isCallValid, context, pname, params);
2622 }
2623 else
2624 {
2625 GenerateContextLostErrorOnCurrentGlobalContext();
2626 }
2627 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2628 }
2629
GL_Lighti(GLenum light,GLenum pname,GLint param)2630 void GL_APIENTRY GL_Lighti(GLenum light, GLenum pname, GLint param)
2631 {
2632 Context *context = GetValidGlobalContext();
2633 EVENT(context, GLLighti, "context = %d, light = %s, pname = %s, param = %d", CID(context),
2634 GLenumToString(BigGLEnum::LightName, light),
2635 GLenumToString(BigGLEnum::LightParameter, pname), param);
2636
2637 if (context)
2638 {
2639 SCOPED_SHARE_CONTEXT_LOCK(context);
2640 bool isCallValid =
2641 (context->skipValidation() ||
2642 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2643 context->getMutableErrorSetForValidation(),
2644 angle::EntryPoint::GLLighti) &&
2645 ValidateLighti(context, angle::EntryPoint::GLLighti, light, pname, param)));
2646 if (isCallValid)
2647 {
2648 context->lighti(light, pname, param);
2649 }
2650 ANGLE_CAPTURE_GL(Lighti, isCallValid, context, light, pname, param);
2651 }
2652 else
2653 {
2654 GenerateContextLostErrorOnCurrentGlobalContext();
2655 }
2656 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2657 }
2658
GL_Lightiv(GLenum light,GLenum pname,const GLint * params)2659 void GL_APIENTRY GL_Lightiv(GLenum light, GLenum pname, const GLint *params)
2660 {
2661 Context *context = GetValidGlobalContext();
2662 EVENT(context, GLLightiv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
2663 CID(context), GLenumToString(BigGLEnum::LightName, light),
2664 GLenumToString(BigGLEnum::LightParameter, pname), (uintptr_t)params);
2665
2666 if (context)
2667 {
2668 SCOPED_SHARE_CONTEXT_LOCK(context);
2669 bool isCallValid =
2670 (context->skipValidation() ||
2671 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2672 context->getMutableErrorSetForValidation(),
2673 angle::EntryPoint::GLLightiv) &&
2674 ValidateLightiv(context, angle::EntryPoint::GLLightiv, light, pname, params)));
2675 if (isCallValid)
2676 {
2677 context->lightiv(light, pname, params);
2678 }
2679 ANGLE_CAPTURE_GL(Lightiv, isCallValid, context, light, pname, params);
2680 }
2681 else
2682 {
2683 GenerateContextLostErrorOnCurrentGlobalContext();
2684 }
2685 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2686 }
2687
GL_LineStipple(GLint factor,GLushort pattern)2688 void GL_APIENTRY GL_LineStipple(GLint factor, GLushort pattern)
2689 {
2690 Context *context = GetValidGlobalContext();
2691 EVENT(context, GLLineStipple, "context = %d, factor = %d, pattern = %u", CID(context), factor,
2692 pattern);
2693
2694 if (context)
2695 {
2696 SCOPED_SHARE_CONTEXT_LOCK(context);
2697 bool isCallValid =
2698 (context->skipValidation() ||
2699 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2700 context->getMutableErrorSetForValidation(),
2701 angle::EntryPoint::GLLineStipple) &&
2702 ValidateLineStipple(context, angle::EntryPoint::GLLineStipple, factor, pattern)));
2703 if (isCallValid)
2704 {
2705 context->lineStipple(factor, pattern);
2706 }
2707 ANGLE_CAPTURE_GL(LineStipple, isCallValid, context, factor, pattern);
2708 }
2709 else
2710 {
2711 GenerateContextLostErrorOnCurrentGlobalContext();
2712 }
2713 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2714 }
2715
GL_ListBase(GLuint base)2716 void GL_APIENTRY GL_ListBase(GLuint base)
2717 {
2718 Context *context = GetValidGlobalContext();
2719 EVENT(context, GLListBase, "context = %d, base = %u", CID(context), base);
2720
2721 if (context)
2722 {
2723 SCOPED_SHARE_CONTEXT_LOCK(context);
2724 bool isCallValid =
2725 (context->skipValidation() ||
2726 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2727 context->getMutableErrorSetForValidation(),
2728 angle::EntryPoint::GLListBase) &&
2729 ValidateListBase(context, angle::EntryPoint::GLListBase, base)));
2730 if (isCallValid)
2731 {
2732 context->listBase(base);
2733 }
2734 ANGLE_CAPTURE_GL(ListBase, isCallValid, context, base);
2735 }
2736 else
2737 {
2738 GenerateContextLostErrorOnCurrentGlobalContext();
2739 }
2740 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2741 }
2742
GL_LoadMatrixd(const GLdouble * m)2743 void GL_APIENTRY GL_LoadMatrixd(const GLdouble *m)
2744 {
2745 Context *context = GetValidGlobalContext();
2746 EVENT(context, GLLoadMatrixd, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
2747 (uintptr_t)m);
2748
2749 if (context)
2750 {
2751 SCOPED_SHARE_CONTEXT_LOCK(context);
2752 bool isCallValid =
2753 (context->skipValidation() ||
2754 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2755 context->getMutableErrorSetForValidation(),
2756 angle::EntryPoint::GLLoadMatrixd) &&
2757 ValidateLoadMatrixd(context, angle::EntryPoint::GLLoadMatrixd, m)));
2758 if (isCallValid)
2759 {
2760 context->loadMatrixd(m);
2761 }
2762 ANGLE_CAPTURE_GL(LoadMatrixd, isCallValid, context, m);
2763 }
2764 else
2765 {
2766 GenerateContextLostErrorOnCurrentGlobalContext();
2767 }
2768 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2769 }
2770
GL_LoadName(GLuint name)2771 void GL_APIENTRY GL_LoadName(GLuint name)
2772 {
2773 Context *context = GetValidGlobalContext();
2774 EVENT(context, GLLoadName, "context = %d, name = %u", CID(context), name);
2775
2776 if (context)
2777 {
2778 SCOPED_SHARE_CONTEXT_LOCK(context);
2779 bool isCallValid =
2780 (context->skipValidation() ||
2781 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2782 context->getMutableErrorSetForValidation(),
2783 angle::EntryPoint::GLLoadName) &&
2784 ValidateLoadName(context, angle::EntryPoint::GLLoadName, name)));
2785 if (isCallValid)
2786 {
2787 context->loadName(name);
2788 }
2789 ANGLE_CAPTURE_GL(LoadName, isCallValid, context, name);
2790 }
2791 else
2792 {
2793 GenerateContextLostErrorOnCurrentGlobalContext();
2794 }
2795 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2796 }
2797
2798 void GL_APIENTRY
GL_Map1d(GLenum target,GLdouble u1,GLdouble u2,GLint stride,GLint order,const GLdouble * points)2799 GL_Map1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
2800 {
2801 Context *context = GetValidGlobalContext();
2802 EVENT(context, GLMap1d,
2803 "context = %d, target = %s, u1 = %f, u2 = %f, stride = %d, order = %d, points = "
2804 "0x%016" PRIxPTR "",
2805 CID(context), GLenumToString(BigGLEnum::MapTarget, target), u1, u2, stride, order,
2806 (uintptr_t)points);
2807
2808 if (context)
2809 {
2810 SCOPED_SHARE_CONTEXT_LOCK(context);
2811 bool isCallValid =
2812 (context->skipValidation() ||
2813 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2814 context->getMutableErrorSetForValidation(),
2815 angle::EntryPoint::GLMap1d) &&
2816 ValidateMap1d(context, angle::EntryPoint::GLMap1d, target, u1, u2, stride, order,
2817 points)));
2818 if (isCallValid)
2819 {
2820 context->map1d(target, u1, u2, stride, order, points);
2821 }
2822 ANGLE_CAPTURE_GL(Map1d, isCallValid, context, target, u1, u2, stride, order, points);
2823 }
2824 else
2825 {
2826 GenerateContextLostErrorOnCurrentGlobalContext();
2827 }
2828 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2829 }
2830
2831 void GL_APIENTRY
GL_Map1f(GLenum target,GLfloat u1,GLfloat u2,GLint stride,GLint order,const GLfloat * points)2832 GL_Map1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
2833 {
2834 Context *context = GetValidGlobalContext();
2835 EVENT(context, GLMap1f,
2836 "context = %d, target = %s, u1 = %f, u2 = %f, stride = %d, order = %d, points = "
2837 "0x%016" PRIxPTR "",
2838 CID(context), GLenumToString(BigGLEnum::MapTarget, target), u1, u2, stride, order,
2839 (uintptr_t)points);
2840
2841 if (context)
2842 {
2843 SCOPED_SHARE_CONTEXT_LOCK(context);
2844 bool isCallValid =
2845 (context->skipValidation() ||
2846 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2847 context->getMutableErrorSetForValidation(),
2848 angle::EntryPoint::GLMap1f) &&
2849 ValidateMap1f(context, angle::EntryPoint::GLMap1f, target, u1, u2, stride, order,
2850 points)));
2851 if (isCallValid)
2852 {
2853 context->map1f(target, u1, u2, stride, order, points);
2854 }
2855 ANGLE_CAPTURE_GL(Map1f, isCallValid, context, target, u1, u2, stride, order, points);
2856 }
2857 else
2858 {
2859 GenerateContextLostErrorOnCurrentGlobalContext();
2860 }
2861 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2862 }
2863
GL_Map2d(GLenum target,GLdouble u1,GLdouble u2,GLint ustride,GLint uorder,GLdouble v1,GLdouble v2,GLint vstride,GLint vorder,const GLdouble * points)2864 void GL_APIENTRY GL_Map2d(GLenum target,
2865 GLdouble u1,
2866 GLdouble u2,
2867 GLint ustride,
2868 GLint uorder,
2869 GLdouble v1,
2870 GLdouble v2,
2871 GLint vstride,
2872 GLint vorder,
2873 const GLdouble *points)
2874 {
2875 Context *context = GetValidGlobalContext();
2876 EVENT(context, GLMap2d,
2877 "context = %d, target = %s, u1 = %f, u2 = %f, ustride = %d, uorder = %d, v1 = %f, v2 = "
2878 "%f, vstride = %d, vorder = %d, points = 0x%016" PRIxPTR "",
2879 CID(context), GLenumToString(BigGLEnum::MapTarget, target), u1, u2, ustride, uorder, v1,
2880 v2, vstride, vorder, (uintptr_t)points);
2881
2882 if (context)
2883 {
2884 SCOPED_SHARE_CONTEXT_LOCK(context);
2885 bool isCallValid =
2886 (context->skipValidation() ||
2887 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2888 context->getMutableErrorSetForValidation(),
2889 angle::EntryPoint::GLMap2d) &&
2890 ValidateMap2d(context, angle::EntryPoint::GLMap2d, target, u1, u2, ustride, uorder,
2891 v1, v2, vstride, vorder, points)));
2892 if (isCallValid)
2893 {
2894 context->map2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
2895 }
2896 ANGLE_CAPTURE_GL(Map2d, isCallValid, context, target, u1, u2, ustride, uorder, v1, v2,
2897 vstride, vorder, points);
2898 }
2899 else
2900 {
2901 GenerateContextLostErrorOnCurrentGlobalContext();
2902 }
2903 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2904 }
2905
GL_Map2f(GLenum target,GLfloat u1,GLfloat u2,GLint ustride,GLint uorder,GLfloat v1,GLfloat v2,GLint vstride,GLint vorder,const GLfloat * points)2906 void GL_APIENTRY GL_Map2f(GLenum target,
2907 GLfloat u1,
2908 GLfloat u2,
2909 GLint ustride,
2910 GLint uorder,
2911 GLfloat v1,
2912 GLfloat v2,
2913 GLint vstride,
2914 GLint vorder,
2915 const GLfloat *points)
2916 {
2917 Context *context = GetValidGlobalContext();
2918 EVENT(context, GLMap2f,
2919 "context = %d, target = %s, u1 = %f, u2 = %f, ustride = %d, uorder = %d, v1 = %f, v2 = "
2920 "%f, vstride = %d, vorder = %d, points = 0x%016" PRIxPTR "",
2921 CID(context), GLenumToString(BigGLEnum::MapTarget, target), u1, u2, ustride, uorder, v1,
2922 v2, vstride, vorder, (uintptr_t)points);
2923
2924 if (context)
2925 {
2926 SCOPED_SHARE_CONTEXT_LOCK(context);
2927 bool isCallValid =
2928 (context->skipValidation() ||
2929 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2930 context->getMutableErrorSetForValidation(),
2931 angle::EntryPoint::GLMap2f) &&
2932 ValidateMap2f(context, angle::EntryPoint::GLMap2f, target, u1, u2, ustride, uorder,
2933 v1, v2, vstride, vorder, points)));
2934 if (isCallValid)
2935 {
2936 context->map2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points);
2937 }
2938 ANGLE_CAPTURE_GL(Map2f, isCallValid, context, target, u1, u2, ustride, uorder, v1, v2,
2939 vstride, vorder, points);
2940 }
2941 else
2942 {
2943 GenerateContextLostErrorOnCurrentGlobalContext();
2944 }
2945 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2946 }
2947
GL_MapGrid1d(GLint un,GLdouble u1,GLdouble u2)2948 void GL_APIENTRY GL_MapGrid1d(GLint un, GLdouble u1, GLdouble u2)
2949 {
2950 Context *context = GetValidGlobalContext();
2951 EVENT(context, GLMapGrid1d, "context = %d, un = %d, u1 = %f, u2 = %f", CID(context), un, u1,
2952 u2);
2953
2954 if (context)
2955 {
2956 SCOPED_SHARE_CONTEXT_LOCK(context);
2957 bool isCallValid =
2958 (context->skipValidation() ||
2959 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2960 context->getMutableErrorSetForValidation(),
2961 angle::EntryPoint::GLMapGrid1d) &&
2962 ValidateMapGrid1d(context, angle::EntryPoint::GLMapGrid1d, un, u1, u2)));
2963 if (isCallValid)
2964 {
2965 context->mapGrid1d(un, u1, u2);
2966 }
2967 ANGLE_CAPTURE_GL(MapGrid1d, isCallValid, context, un, u1, u2);
2968 }
2969 else
2970 {
2971 GenerateContextLostErrorOnCurrentGlobalContext();
2972 }
2973 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2974 }
2975
GL_MapGrid1f(GLint un,GLfloat u1,GLfloat u2)2976 void GL_APIENTRY GL_MapGrid1f(GLint un, GLfloat u1, GLfloat u2)
2977 {
2978 Context *context = GetValidGlobalContext();
2979 EVENT(context, GLMapGrid1f, "context = %d, un = %d, u1 = %f, u2 = %f", CID(context), un, u1,
2980 u2);
2981
2982 if (context)
2983 {
2984 SCOPED_SHARE_CONTEXT_LOCK(context);
2985 bool isCallValid =
2986 (context->skipValidation() ||
2987 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2988 context->getMutableErrorSetForValidation(),
2989 angle::EntryPoint::GLMapGrid1f) &&
2990 ValidateMapGrid1f(context, angle::EntryPoint::GLMapGrid1f, un, u1, u2)));
2991 if (isCallValid)
2992 {
2993 context->mapGrid1f(un, u1, u2);
2994 }
2995 ANGLE_CAPTURE_GL(MapGrid1f, isCallValid, context, un, u1, u2);
2996 }
2997 else
2998 {
2999 GenerateContextLostErrorOnCurrentGlobalContext();
3000 }
3001 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3002 }
3003
3004 void GL_APIENTRY
GL_MapGrid2d(GLint un,GLdouble u1,GLdouble u2,GLint vn,GLdouble v1,GLdouble v2)3005 GL_MapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
3006 {
3007 Context *context = GetValidGlobalContext();
3008 EVENT(context, GLMapGrid2d,
3009 "context = %d, un = %d, u1 = %f, u2 = %f, vn = %d, v1 = %f, v2 = %f", CID(context), un,
3010 u1, u2, vn, v1, v2);
3011
3012 if (context)
3013 {
3014 SCOPED_SHARE_CONTEXT_LOCK(context);
3015 bool isCallValid =
3016 (context->skipValidation() ||
3017 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3018 context->getMutableErrorSetForValidation(),
3019 angle::EntryPoint::GLMapGrid2d) &&
3020 ValidateMapGrid2d(context, angle::EntryPoint::GLMapGrid2d, un, u1, u2, vn, v1, v2)));
3021 if (isCallValid)
3022 {
3023 context->mapGrid2d(un, u1, u2, vn, v1, v2);
3024 }
3025 ANGLE_CAPTURE_GL(MapGrid2d, isCallValid, context, un, u1, u2, vn, v1, v2);
3026 }
3027 else
3028 {
3029 GenerateContextLostErrorOnCurrentGlobalContext();
3030 }
3031 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3032 }
3033
GL_MapGrid2f(GLint un,GLfloat u1,GLfloat u2,GLint vn,GLfloat v1,GLfloat v2)3034 void GL_APIENTRY GL_MapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
3035 {
3036 Context *context = GetValidGlobalContext();
3037 EVENT(context, GLMapGrid2f,
3038 "context = %d, un = %d, u1 = %f, u2 = %f, vn = %d, v1 = %f, v2 = %f", CID(context), un,
3039 u1, u2, vn, v1, v2);
3040
3041 if (context)
3042 {
3043 SCOPED_SHARE_CONTEXT_LOCK(context);
3044 bool isCallValid =
3045 (context->skipValidation() ||
3046 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3047 context->getMutableErrorSetForValidation(),
3048 angle::EntryPoint::GLMapGrid2f) &&
3049 ValidateMapGrid2f(context, angle::EntryPoint::GLMapGrid2f, un, u1, u2, vn, v1, v2)));
3050 if (isCallValid)
3051 {
3052 context->mapGrid2f(un, u1, u2, vn, v1, v2);
3053 }
3054 ANGLE_CAPTURE_GL(MapGrid2f, isCallValid, context, un, u1, u2, vn, v1, v2);
3055 }
3056 else
3057 {
3058 GenerateContextLostErrorOnCurrentGlobalContext();
3059 }
3060 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3061 }
3062
GL_Materiali(GLenum face,GLenum pname,GLint param)3063 void GL_APIENTRY GL_Materiali(GLenum face, GLenum pname, GLint param)
3064 {
3065 Context *context = GetValidGlobalContext();
3066 EVENT(context, GLMateriali, "context = %d, face = %s, pname = %s, param = %d", CID(context),
3067 GLenumToString(BigGLEnum::TriangleFace, face),
3068 GLenumToString(BigGLEnum::MaterialParameter, pname), param);
3069
3070 if (context)
3071 {
3072 SCOPED_SHARE_CONTEXT_LOCK(context);
3073 bool isCallValid =
3074 (context->skipValidation() ||
3075 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3076 context->getMutableErrorSetForValidation(),
3077 angle::EntryPoint::GLMateriali) &&
3078 ValidateMateriali(context, angle::EntryPoint::GLMateriali, face, pname, param)));
3079 if (isCallValid)
3080 {
3081 context->materiali(face, pname, param);
3082 }
3083 ANGLE_CAPTURE_GL(Materiali, isCallValid, context, face, pname, param);
3084 }
3085 else
3086 {
3087 GenerateContextLostErrorOnCurrentGlobalContext();
3088 }
3089 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3090 }
3091
GL_Materialiv(GLenum face,GLenum pname,const GLint * params)3092 void GL_APIENTRY GL_Materialiv(GLenum face, GLenum pname, const GLint *params)
3093 {
3094 Context *context = GetValidGlobalContext();
3095 EVENT(context, GLMaterialiv, "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "",
3096 CID(context), GLenumToString(BigGLEnum::TriangleFace, face),
3097 GLenumToString(BigGLEnum::MaterialParameter, pname), (uintptr_t)params);
3098
3099 if (context)
3100 {
3101 SCOPED_SHARE_CONTEXT_LOCK(context);
3102 bool isCallValid =
3103 (context->skipValidation() ||
3104 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3105 context->getMutableErrorSetForValidation(),
3106 angle::EntryPoint::GLMaterialiv) &&
3107 ValidateMaterialiv(context, angle::EntryPoint::GLMaterialiv, face, pname, params)));
3108 if (isCallValid)
3109 {
3110 context->materialiv(face, pname, params);
3111 }
3112 ANGLE_CAPTURE_GL(Materialiv, isCallValid, context, face, pname, params);
3113 }
3114 else
3115 {
3116 GenerateContextLostErrorOnCurrentGlobalContext();
3117 }
3118 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3119 }
3120
GL_MultMatrixd(const GLdouble * m)3121 void GL_APIENTRY GL_MultMatrixd(const GLdouble *m)
3122 {
3123 Context *context = GetValidGlobalContext();
3124 EVENT(context, GLMultMatrixd, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
3125 (uintptr_t)m);
3126
3127 if (context)
3128 {
3129 SCOPED_SHARE_CONTEXT_LOCK(context);
3130 bool isCallValid =
3131 (context->skipValidation() ||
3132 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3133 context->getMutableErrorSetForValidation(),
3134 angle::EntryPoint::GLMultMatrixd) &&
3135 ValidateMultMatrixd(context, angle::EntryPoint::GLMultMatrixd, m)));
3136 if (isCallValid)
3137 {
3138 context->multMatrixd(m);
3139 }
3140 ANGLE_CAPTURE_GL(MultMatrixd, isCallValid, context, m);
3141 }
3142 else
3143 {
3144 GenerateContextLostErrorOnCurrentGlobalContext();
3145 }
3146 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3147 }
3148
GL_NewList(GLuint list,GLenum mode)3149 void GL_APIENTRY GL_NewList(GLuint list, GLenum mode)
3150 {
3151 Context *context = GetValidGlobalContext();
3152 EVENT(context, GLNewList, "context = %d, list = %u, mode = %s", CID(context), list,
3153 GLenumToString(BigGLEnum::ListMode, mode));
3154
3155 if (context)
3156 {
3157 SCOPED_SHARE_CONTEXT_LOCK(context);
3158 bool isCallValid =
3159 (context->skipValidation() ||
3160 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3161 context->getMutableErrorSetForValidation(),
3162 angle::EntryPoint::GLNewList) &&
3163 ValidateNewList(context, angle::EntryPoint::GLNewList, list, mode)));
3164 if (isCallValid)
3165 {
3166 context->newList(list, mode);
3167 }
3168 ANGLE_CAPTURE_GL(NewList, isCallValid, context, list, mode);
3169 }
3170 else
3171 {
3172 GenerateContextLostErrorOnCurrentGlobalContext();
3173 }
3174 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3175 }
3176
GL_Normal3b(GLbyte nx,GLbyte ny,GLbyte nz)3177 void GL_APIENTRY GL_Normal3b(GLbyte nx, GLbyte ny, GLbyte nz)
3178 {
3179 Context *context = GetValidGlobalContext();
3180 EVENT(context, GLNormal3b, "context = %d, nx = %d, ny = %d, nz = %d", CID(context), nx, ny, nz);
3181
3182 if (context)
3183 {
3184 SCOPED_SHARE_CONTEXT_LOCK(context);
3185 bool isCallValid =
3186 (context->skipValidation() ||
3187 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3188 context->getMutableErrorSetForValidation(),
3189 angle::EntryPoint::GLNormal3b) &&
3190 ValidateNormal3b(context, angle::EntryPoint::GLNormal3b, nx, ny, nz)));
3191 if (isCallValid)
3192 {
3193 context->normal3b(nx, ny, nz);
3194 }
3195 ANGLE_CAPTURE_GL(Normal3b, isCallValid, context, nx, ny, nz);
3196 }
3197 else
3198 {
3199 GenerateContextLostErrorOnCurrentGlobalContext();
3200 }
3201 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3202 }
3203
GL_Normal3bv(const GLbyte * v)3204 void GL_APIENTRY GL_Normal3bv(const GLbyte *v)
3205 {
3206 Context *context = GetValidGlobalContext();
3207 EVENT(context, GLNormal3bv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
3208
3209 if (context)
3210 {
3211 SCOPED_SHARE_CONTEXT_LOCK(context);
3212 bool isCallValid =
3213 (context->skipValidation() ||
3214 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3215 context->getMutableErrorSetForValidation(),
3216 angle::EntryPoint::GLNormal3bv) &&
3217 ValidateNormal3bv(context, angle::EntryPoint::GLNormal3bv, v)));
3218 if (isCallValid)
3219 {
3220 context->normal3bv(v);
3221 }
3222 ANGLE_CAPTURE_GL(Normal3bv, isCallValid, context, v);
3223 }
3224 else
3225 {
3226 GenerateContextLostErrorOnCurrentGlobalContext();
3227 }
3228 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3229 }
3230
GL_Normal3d(GLdouble nx,GLdouble ny,GLdouble nz)3231 void GL_APIENTRY GL_Normal3d(GLdouble nx, GLdouble ny, GLdouble nz)
3232 {
3233 Context *context = GetValidGlobalContext();
3234 EVENT(context, GLNormal3d, "context = %d, nx = %f, ny = %f, nz = %f", CID(context), nx, ny, nz);
3235
3236 if (context)
3237 {
3238 SCOPED_SHARE_CONTEXT_LOCK(context);
3239 bool isCallValid =
3240 (context->skipValidation() ||
3241 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3242 context->getMutableErrorSetForValidation(),
3243 angle::EntryPoint::GLNormal3d) &&
3244 ValidateNormal3d(context, angle::EntryPoint::GLNormal3d, nx, ny, nz)));
3245 if (isCallValid)
3246 {
3247 context->normal3d(nx, ny, nz);
3248 }
3249 ANGLE_CAPTURE_GL(Normal3d, isCallValid, context, nx, ny, nz);
3250 }
3251 else
3252 {
3253 GenerateContextLostErrorOnCurrentGlobalContext();
3254 }
3255 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3256 }
3257
GL_Normal3dv(const GLdouble * v)3258 void GL_APIENTRY GL_Normal3dv(const GLdouble *v)
3259 {
3260 Context *context = GetValidGlobalContext();
3261 EVENT(context, GLNormal3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
3262
3263 if (context)
3264 {
3265 SCOPED_SHARE_CONTEXT_LOCK(context);
3266 bool isCallValid =
3267 (context->skipValidation() ||
3268 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3269 context->getMutableErrorSetForValidation(),
3270 angle::EntryPoint::GLNormal3dv) &&
3271 ValidateNormal3dv(context, angle::EntryPoint::GLNormal3dv, v)));
3272 if (isCallValid)
3273 {
3274 context->normal3dv(v);
3275 }
3276 ANGLE_CAPTURE_GL(Normal3dv, isCallValid, context, v);
3277 }
3278 else
3279 {
3280 GenerateContextLostErrorOnCurrentGlobalContext();
3281 }
3282 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3283 }
3284
GL_Normal3fv(const GLfloat * v)3285 void GL_APIENTRY GL_Normal3fv(const GLfloat *v)
3286 {
3287 Context *context = GetValidGlobalContext();
3288 EVENT(context, GLNormal3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
3289
3290 if (context)
3291 {
3292 SCOPED_SHARE_CONTEXT_LOCK(context);
3293 bool isCallValid =
3294 (context->skipValidation() ||
3295 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3296 context->getMutableErrorSetForValidation(),
3297 angle::EntryPoint::GLNormal3fv) &&
3298 ValidateNormal3fv(context, angle::EntryPoint::GLNormal3fv, v)));
3299 if (isCallValid)
3300 {
3301 context->normal3fv(v);
3302 }
3303 ANGLE_CAPTURE_GL(Normal3fv, isCallValid, context, v);
3304 }
3305 else
3306 {
3307 GenerateContextLostErrorOnCurrentGlobalContext();
3308 }
3309 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3310 }
3311
GL_Normal3i(GLint nx,GLint ny,GLint nz)3312 void GL_APIENTRY GL_Normal3i(GLint nx, GLint ny, GLint nz)
3313 {
3314 Context *context = GetValidGlobalContext();
3315 EVENT(context, GLNormal3i, "context = %d, nx = %d, ny = %d, nz = %d", CID(context), nx, ny, nz);
3316
3317 if (context)
3318 {
3319 SCOPED_SHARE_CONTEXT_LOCK(context);
3320 bool isCallValid =
3321 (context->skipValidation() ||
3322 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3323 context->getMutableErrorSetForValidation(),
3324 angle::EntryPoint::GLNormal3i) &&
3325 ValidateNormal3i(context, angle::EntryPoint::GLNormal3i, nx, ny, nz)));
3326 if (isCallValid)
3327 {
3328 context->normal3i(nx, ny, nz);
3329 }
3330 ANGLE_CAPTURE_GL(Normal3i, isCallValid, context, nx, ny, nz);
3331 }
3332 else
3333 {
3334 GenerateContextLostErrorOnCurrentGlobalContext();
3335 }
3336 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3337 }
3338
GL_Normal3iv(const GLint * v)3339 void GL_APIENTRY GL_Normal3iv(const GLint *v)
3340 {
3341 Context *context = GetValidGlobalContext();
3342 EVENT(context, GLNormal3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
3343
3344 if (context)
3345 {
3346 SCOPED_SHARE_CONTEXT_LOCK(context);
3347 bool isCallValid =
3348 (context->skipValidation() ||
3349 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3350 context->getMutableErrorSetForValidation(),
3351 angle::EntryPoint::GLNormal3iv) &&
3352 ValidateNormal3iv(context, angle::EntryPoint::GLNormal3iv, v)));
3353 if (isCallValid)
3354 {
3355 context->normal3iv(v);
3356 }
3357 ANGLE_CAPTURE_GL(Normal3iv, isCallValid, context, v);
3358 }
3359 else
3360 {
3361 GenerateContextLostErrorOnCurrentGlobalContext();
3362 }
3363 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3364 }
3365
GL_Normal3s(GLshort nx,GLshort ny,GLshort nz)3366 void GL_APIENTRY GL_Normal3s(GLshort nx, GLshort ny, GLshort nz)
3367 {
3368 Context *context = GetValidGlobalContext();
3369 EVENT(context, GLNormal3s, "context = %d, nx = %d, ny = %d, nz = %d", CID(context), nx, ny, nz);
3370
3371 if (context)
3372 {
3373 SCOPED_SHARE_CONTEXT_LOCK(context);
3374 bool isCallValid =
3375 (context->skipValidation() ||
3376 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3377 context->getMutableErrorSetForValidation(),
3378 angle::EntryPoint::GLNormal3s) &&
3379 ValidateNormal3s(context, angle::EntryPoint::GLNormal3s, nx, ny, nz)));
3380 if (isCallValid)
3381 {
3382 context->normal3s(nx, ny, nz);
3383 }
3384 ANGLE_CAPTURE_GL(Normal3s, isCallValid, context, nx, ny, nz);
3385 }
3386 else
3387 {
3388 GenerateContextLostErrorOnCurrentGlobalContext();
3389 }
3390 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3391 }
3392
GL_Normal3sv(const GLshort * v)3393 void GL_APIENTRY GL_Normal3sv(const GLshort *v)
3394 {
3395 Context *context = GetValidGlobalContext();
3396 EVENT(context, GLNormal3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
3397
3398 if (context)
3399 {
3400 SCOPED_SHARE_CONTEXT_LOCK(context);
3401 bool isCallValid =
3402 (context->skipValidation() ||
3403 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3404 context->getMutableErrorSetForValidation(),
3405 angle::EntryPoint::GLNormal3sv) &&
3406 ValidateNormal3sv(context, angle::EntryPoint::GLNormal3sv, v)));
3407 if (isCallValid)
3408 {
3409 context->normal3sv(v);
3410 }
3411 ANGLE_CAPTURE_GL(Normal3sv, isCallValid, context, v);
3412 }
3413 else
3414 {
3415 GenerateContextLostErrorOnCurrentGlobalContext();
3416 }
3417 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3418 }
3419
GL_Ortho(GLdouble left,GLdouble right,GLdouble bottom,GLdouble top,GLdouble zNear,GLdouble zFar)3420 void GL_APIENTRY GL_Ortho(GLdouble left,
3421 GLdouble right,
3422 GLdouble bottom,
3423 GLdouble top,
3424 GLdouble zNear,
3425 GLdouble zFar)
3426 {
3427 Context *context = GetValidGlobalContext();
3428 EVENT(context, GLOrtho,
3429 "context = %d, left = %f, right = %f, bottom = %f, top = %f, zNear = %f, zFar = %f",
3430 CID(context), left, right, bottom, top, zNear, zFar);
3431
3432 if (context)
3433 {
3434 SCOPED_SHARE_CONTEXT_LOCK(context);
3435 bool isCallValid =
3436 (context->skipValidation() ||
3437 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3438 context->getMutableErrorSetForValidation(),
3439 angle::EntryPoint::GLOrtho) &&
3440 ValidateOrtho(context, angle::EntryPoint::GLOrtho, left, right, bottom, top, zNear,
3441 zFar)));
3442 if (isCallValid)
3443 {
3444 context->ortho(left, right, bottom, top, zNear, zFar);
3445 }
3446 ANGLE_CAPTURE_GL(Ortho, isCallValid, context, left, right, bottom, top, zNear, zFar);
3447 }
3448 else
3449 {
3450 GenerateContextLostErrorOnCurrentGlobalContext();
3451 }
3452 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3453 }
3454
GL_PassThrough(GLfloat token)3455 void GL_APIENTRY GL_PassThrough(GLfloat token)
3456 {
3457 Context *context = GetValidGlobalContext();
3458 EVENT(context, GLPassThrough, "context = %d, token = %f", CID(context), token);
3459
3460 if (context)
3461 {
3462 SCOPED_SHARE_CONTEXT_LOCK(context);
3463 bool isCallValid =
3464 (context->skipValidation() ||
3465 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3466 context->getMutableErrorSetForValidation(),
3467 angle::EntryPoint::GLPassThrough) &&
3468 ValidatePassThrough(context, angle::EntryPoint::GLPassThrough, token)));
3469 if (isCallValid)
3470 {
3471 context->passThrough(token);
3472 }
3473 ANGLE_CAPTURE_GL(PassThrough, isCallValid, context, token);
3474 }
3475 else
3476 {
3477 GenerateContextLostErrorOnCurrentGlobalContext();
3478 }
3479 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3480 }
3481
GL_PixelMapfv(GLenum map,GLsizei mapsize,const GLfloat * values)3482 void GL_APIENTRY GL_PixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
3483 {
3484 Context *context = GetValidGlobalContext();
3485 EVENT(context, GLPixelMapfv, "context = %d, map = %s, mapsize = %d, values = 0x%016" PRIxPTR "",
3486 CID(context), GLenumToString(BigGLEnum::PixelMap, map), mapsize, (uintptr_t)values);
3487
3488 if (context)
3489 {
3490 SCOPED_SHARE_CONTEXT_LOCK(context);
3491 bool isCallValid =
3492 (context->skipValidation() ||
3493 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3494 context->getMutableErrorSetForValidation(),
3495 angle::EntryPoint::GLPixelMapfv) &&
3496 ValidatePixelMapfv(context, angle::EntryPoint::GLPixelMapfv, map, mapsize, values)));
3497 if (isCallValid)
3498 {
3499 context->pixelMapfv(map, mapsize, values);
3500 }
3501 ANGLE_CAPTURE_GL(PixelMapfv, isCallValid, context, map, mapsize, values);
3502 }
3503 else
3504 {
3505 GenerateContextLostErrorOnCurrentGlobalContext();
3506 }
3507 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3508 }
3509
GL_PixelMapuiv(GLenum map,GLsizei mapsize,const GLuint * values)3510 void GL_APIENTRY GL_PixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
3511 {
3512 Context *context = GetValidGlobalContext();
3513 EVENT(context, GLPixelMapuiv,
3514 "context = %d, map = %s, mapsize = %d, values = 0x%016" PRIxPTR "", CID(context),
3515 GLenumToString(BigGLEnum::PixelMap, map), mapsize, (uintptr_t)values);
3516
3517 if (context)
3518 {
3519 SCOPED_SHARE_CONTEXT_LOCK(context);
3520 bool isCallValid =
3521 (context->skipValidation() ||
3522 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3523 context->getMutableErrorSetForValidation(),
3524 angle::EntryPoint::GLPixelMapuiv) &&
3525 ValidatePixelMapuiv(context, angle::EntryPoint::GLPixelMapuiv, map, mapsize,
3526 values)));
3527 if (isCallValid)
3528 {
3529 context->pixelMapuiv(map, mapsize, values);
3530 }
3531 ANGLE_CAPTURE_GL(PixelMapuiv, isCallValid, context, map, mapsize, values);
3532 }
3533 else
3534 {
3535 GenerateContextLostErrorOnCurrentGlobalContext();
3536 }
3537 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3538 }
3539
GL_PixelMapusv(GLenum map,GLsizei mapsize,const GLushort * values)3540 void GL_APIENTRY GL_PixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
3541 {
3542 Context *context = GetValidGlobalContext();
3543 EVENT(context, GLPixelMapusv,
3544 "context = %d, map = %s, mapsize = %d, values = 0x%016" PRIxPTR "", CID(context),
3545 GLenumToString(BigGLEnum::PixelMap, map), mapsize, (uintptr_t)values);
3546
3547 if (context)
3548 {
3549 SCOPED_SHARE_CONTEXT_LOCK(context);
3550 bool isCallValid =
3551 (context->skipValidation() ||
3552 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3553 context->getMutableErrorSetForValidation(),
3554 angle::EntryPoint::GLPixelMapusv) &&
3555 ValidatePixelMapusv(context, angle::EntryPoint::GLPixelMapusv, map, mapsize,
3556 values)));
3557 if (isCallValid)
3558 {
3559 context->pixelMapusv(map, mapsize, values);
3560 }
3561 ANGLE_CAPTURE_GL(PixelMapusv, isCallValid, context, map, mapsize, values);
3562 }
3563 else
3564 {
3565 GenerateContextLostErrorOnCurrentGlobalContext();
3566 }
3567 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3568 }
3569
GL_PixelStoref(GLenum pname,GLfloat param)3570 void GL_APIENTRY GL_PixelStoref(GLenum pname, GLfloat param)
3571 {
3572 Context *context = GetValidGlobalContext();
3573 EVENT(context, GLPixelStoref, "context = %d, pname = %s, param = %f", CID(context),
3574 GLenumToString(BigGLEnum::PixelStoreParameter, pname), param);
3575
3576 if (context)
3577 {
3578 SCOPED_SHARE_CONTEXT_LOCK(context);
3579 bool isCallValid =
3580 (context->skipValidation() ||
3581 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3582 context->getMutableErrorSetForValidation(),
3583 angle::EntryPoint::GLPixelStoref) &&
3584 ValidatePixelStoref(context, angle::EntryPoint::GLPixelStoref, pname, param)));
3585 if (isCallValid)
3586 {
3587 context->pixelStoref(pname, param);
3588 }
3589 ANGLE_CAPTURE_GL(PixelStoref, isCallValid, context, pname, param);
3590 }
3591 else
3592 {
3593 GenerateContextLostErrorOnCurrentGlobalContext();
3594 }
3595 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3596 }
3597
GL_PixelTransferf(GLenum pname,GLfloat param)3598 void GL_APIENTRY GL_PixelTransferf(GLenum pname, GLfloat param)
3599 {
3600 Context *context = GetValidGlobalContext();
3601 EVENT(context, GLPixelTransferf, "context = %d, pname = %s, param = %f", CID(context),
3602 GLenumToString(BigGLEnum::PixelTransferParameter, pname), param);
3603
3604 if (context)
3605 {
3606 SCOPED_SHARE_CONTEXT_LOCK(context);
3607 bool isCallValid =
3608 (context->skipValidation() ||
3609 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3610 context->getMutableErrorSetForValidation(),
3611 angle::EntryPoint::GLPixelTransferf) &&
3612 ValidatePixelTransferf(context, angle::EntryPoint::GLPixelTransferf, pname, param)));
3613 if (isCallValid)
3614 {
3615 context->pixelTransferf(pname, param);
3616 }
3617 ANGLE_CAPTURE_GL(PixelTransferf, isCallValid, context, pname, param);
3618 }
3619 else
3620 {
3621 GenerateContextLostErrorOnCurrentGlobalContext();
3622 }
3623 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3624 }
3625
GL_PixelTransferi(GLenum pname,GLint param)3626 void GL_APIENTRY GL_PixelTransferi(GLenum pname, GLint param)
3627 {
3628 Context *context = GetValidGlobalContext();
3629 EVENT(context, GLPixelTransferi, "context = %d, pname = %s, param = %d", CID(context),
3630 GLenumToString(BigGLEnum::PixelTransferParameter, pname), param);
3631
3632 if (context)
3633 {
3634 SCOPED_SHARE_CONTEXT_LOCK(context);
3635 bool isCallValid =
3636 (context->skipValidation() ||
3637 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3638 context->getMutableErrorSetForValidation(),
3639 angle::EntryPoint::GLPixelTransferi) &&
3640 ValidatePixelTransferi(context, angle::EntryPoint::GLPixelTransferi, pname, param)));
3641 if (isCallValid)
3642 {
3643 context->pixelTransferi(pname, param);
3644 }
3645 ANGLE_CAPTURE_GL(PixelTransferi, isCallValid, context, pname, param);
3646 }
3647 else
3648 {
3649 GenerateContextLostErrorOnCurrentGlobalContext();
3650 }
3651 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3652 }
3653
GL_PixelZoom(GLfloat xfactor,GLfloat yfactor)3654 void GL_APIENTRY GL_PixelZoom(GLfloat xfactor, GLfloat yfactor)
3655 {
3656 Context *context = GetValidGlobalContext();
3657 EVENT(context, GLPixelZoom, "context = %d, xfactor = %f, yfactor = %f", CID(context), xfactor,
3658 yfactor);
3659
3660 if (context)
3661 {
3662 SCOPED_SHARE_CONTEXT_LOCK(context);
3663 bool isCallValid =
3664 (context->skipValidation() ||
3665 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3666 context->getMutableErrorSetForValidation(),
3667 angle::EntryPoint::GLPixelZoom) &&
3668 ValidatePixelZoom(context, angle::EntryPoint::GLPixelZoom, xfactor, yfactor)));
3669 if (isCallValid)
3670 {
3671 context->pixelZoom(xfactor, yfactor);
3672 }
3673 ANGLE_CAPTURE_GL(PixelZoom, isCallValid, context, xfactor, yfactor);
3674 }
3675 else
3676 {
3677 GenerateContextLostErrorOnCurrentGlobalContext();
3678 }
3679 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3680 }
3681
GL_PolygonMode(GLenum face,GLenum mode)3682 void GL_APIENTRY GL_PolygonMode(GLenum face, GLenum mode)
3683 {
3684 Context *context = GetValidGlobalContext();
3685 EVENT(context, GLPolygonMode, "context = %d, face = %s, mode = %s", CID(context),
3686 GLenumToString(BigGLEnum::TriangleFace, face),
3687 GLenumToString(BigGLEnum::PolygonMode, mode));
3688
3689 if (context)
3690 {
3691 PolygonMode modePacked = PackParam<PolygonMode>(mode);
3692 bool isCallValid =
3693 (context->skipValidation() ||
3694 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3695 context->getMutableErrorSetForValidation(),
3696 angle::EntryPoint::GLPolygonMode) &&
3697 ValidatePolygonMode(context->getPrivateState(),
3698 context->getMutableErrorSetForValidation(),
3699 angle::EntryPoint::GLPolygonMode, face, modePacked)));
3700 if (isCallValid)
3701 {
3702 ContextPrivatePolygonMode(context->getMutablePrivateState(),
3703 context->getMutablePrivateStateCache(), face, modePacked);
3704 }
3705 ANGLE_CAPTURE_GL(PolygonMode, isCallValid, context, face, modePacked);
3706 }
3707 else
3708 {
3709 GenerateContextLostErrorOnCurrentGlobalContext();
3710 }
3711 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3712 }
3713
GL_PolygonStipple(const GLubyte * mask)3714 void GL_APIENTRY GL_PolygonStipple(const GLubyte *mask)
3715 {
3716 Context *context = GetValidGlobalContext();
3717 EVENT(context, GLPolygonStipple, "context = %d, mask = 0x%016" PRIxPTR "", CID(context),
3718 (uintptr_t)mask);
3719
3720 if (context)
3721 {
3722 SCOPED_SHARE_CONTEXT_LOCK(context);
3723 bool isCallValid =
3724 (context->skipValidation() ||
3725 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3726 context->getMutableErrorSetForValidation(),
3727 angle::EntryPoint::GLPolygonStipple) &&
3728 ValidatePolygonStipple(context, angle::EntryPoint::GLPolygonStipple, mask)));
3729 if (isCallValid)
3730 {
3731 context->polygonStipple(mask);
3732 }
3733 ANGLE_CAPTURE_GL(PolygonStipple, isCallValid, context, mask);
3734 }
3735 else
3736 {
3737 GenerateContextLostErrorOnCurrentGlobalContext();
3738 }
3739 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3740 }
3741
GL_PopAttrib()3742 void GL_APIENTRY GL_PopAttrib()
3743 {
3744 Context *context = GetValidGlobalContext();
3745 EVENT(context, GLPopAttrib, "context = %d", CID(context));
3746
3747 if (context)
3748 {
3749 SCOPED_SHARE_CONTEXT_LOCK(context);
3750 bool isCallValid =
3751 (context->skipValidation() ||
3752 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3753 context->getMutableErrorSetForValidation(),
3754 angle::EntryPoint::GLPopAttrib) &&
3755 ValidatePopAttrib(context, angle::EntryPoint::GLPopAttrib)));
3756 if (isCallValid)
3757 {
3758 context->popAttrib();
3759 }
3760 ANGLE_CAPTURE_GL(PopAttrib, isCallValid, context);
3761 }
3762 else
3763 {
3764 GenerateContextLostErrorOnCurrentGlobalContext();
3765 }
3766 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3767 }
3768
GL_PopName()3769 void GL_APIENTRY GL_PopName()
3770 {
3771 Context *context = GetValidGlobalContext();
3772 EVENT(context, GLPopName, "context = %d", CID(context));
3773
3774 if (context)
3775 {
3776 SCOPED_SHARE_CONTEXT_LOCK(context);
3777 bool isCallValid =
3778 (context->skipValidation() ||
3779 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3780 context->getMutableErrorSetForValidation(),
3781 angle::EntryPoint::GLPopName) &&
3782 ValidatePopName(context, angle::EntryPoint::GLPopName)));
3783 if (isCallValid)
3784 {
3785 context->popName();
3786 }
3787 ANGLE_CAPTURE_GL(PopName, isCallValid, context);
3788 }
3789 else
3790 {
3791 GenerateContextLostErrorOnCurrentGlobalContext();
3792 }
3793 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3794 }
3795
GL_PushAttrib(GLbitfield mask)3796 void GL_APIENTRY GL_PushAttrib(GLbitfield mask)
3797 {
3798 Context *context = GetValidGlobalContext();
3799 EVENT(context, GLPushAttrib, "context = %d, mask = %s", CID(context),
3800 GLbitfieldToString(BigGLEnum::AttribMask, mask).c_str());
3801
3802 if (context)
3803 {
3804 SCOPED_SHARE_CONTEXT_LOCK(context);
3805 bool isCallValid =
3806 (context->skipValidation() ||
3807 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3808 context->getMutableErrorSetForValidation(),
3809 angle::EntryPoint::GLPushAttrib) &&
3810 ValidatePushAttrib(context, angle::EntryPoint::GLPushAttrib, mask)));
3811 if (isCallValid)
3812 {
3813 context->pushAttrib(mask);
3814 }
3815 ANGLE_CAPTURE_GL(PushAttrib, isCallValid, context, mask);
3816 }
3817 else
3818 {
3819 GenerateContextLostErrorOnCurrentGlobalContext();
3820 }
3821 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3822 }
3823
GL_PushName(GLuint name)3824 void GL_APIENTRY GL_PushName(GLuint name)
3825 {
3826 Context *context = GetValidGlobalContext();
3827 EVENT(context, GLPushName, "context = %d, name = %u", CID(context), name);
3828
3829 if (context)
3830 {
3831 SCOPED_SHARE_CONTEXT_LOCK(context);
3832 bool isCallValid =
3833 (context->skipValidation() ||
3834 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3835 context->getMutableErrorSetForValidation(),
3836 angle::EntryPoint::GLPushName) &&
3837 ValidatePushName(context, angle::EntryPoint::GLPushName, name)));
3838 if (isCallValid)
3839 {
3840 context->pushName(name);
3841 }
3842 ANGLE_CAPTURE_GL(PushName, isCallValid, context, name);
3843 }
3844 else
3845 {
3846 GenerateContextLostErrorOnCurrentGlobalContext();
3847 }
3848 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3849 }
3850
GL_RasterPos2d(GLdouble x,GLdouble y)3851 void GL_APIENTRY GL_RasterPos2d(GLdouble x, GLdouble y)
3852 {
3853 Context *context = GetValidGlobalContext();
3854 EVENT(context, GLRasterPos2d, "context = %d, x = %f, y = %f", CID(context), x, y);
3855
3856 if (context)
3857 {
3858 SCOPED_SHARE_CONTEXT_LOCK(context);
3859 bool isCallValid =
3860 (context->skipValidation() ||
3861 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3862 context->getMutableErrorSetForValidation(),
3863 angle::EntryPoint::GLRasterPos2d) &&
3864 ValidateRasterPos2d(context, angle::EntryPoint::GLRasterPos2d, x, y)));
3865 if (isCallValid)
3866 {
3867 context->rasterPos2d(x, y);
3868 }
3869 ANGLE_CAPTURE_GL(RasterPos2d, isCallValid, context, x, y);
3870 }
3871 else
3872 {
3873 GenerateContextLostErrorOnCurrentGlobalContext();
3874 }
3875 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3876 }
3877
GL_RasterPos2dv(const GLdouble * v)3878 void GL_APIENTRY GL_RasterPos2dv(const GLdouble *v)
3879 {
3880 Context *context = GetValidGlobalContext();
3881 EVENT(context, GLRasterPos2dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
3882 (uintptr_t)v);
3883
3884 if (context)
3885 {
3886 SCOPED_SHARE_CONTEXT_LOCK(context);
3887 bool isCallValid =
3888 (context->skipValidation() ||
3889 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3890 context->getMutableErrorSetForValidation(),
3891 angle::EntryPoint::GLRasterPos2dv) &&
3892 ValidateRasterPos2dv(context, angle::EntryPoint::GLRasterPos2dv, v)));
3893 if (isCallValid)
3894 {
3895 context->rasterPos2dv(v);
3896 }
3897 ANGLE_CAPTURE_GL(RasterPos2dv, isCallValid, context, v);
3898 }
3899 else
3900 {
3901 GenerateContextLostErrorOnCurrentGlobalContext();
3902 }
3903 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3904 }
3905
GL_RasterPos2f(GLfloat x,GLfloat y)3906 void GL_APIENTRY GL_RasterPos2f(GLfloat x, GLfloat y)
3907 {
3908 Context *context = GetValidGlobalContext();
3909 EVENT(context, GLRasterPos2f, "context = %d, x = %f, y = %f", CID(context), x, y);
3910
3911 if (context)
3912 {
3913 SCOPED_SHARE_CONTEXT_LOCK(context);
3914 bool isCallValid =
3915 (context->skipValidation() ||
3916 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3917 context->getMutableErrorSetForValidation(),
3918 angle::EntryPoint::GLRasterPos2f) &&
3919 ValidateRasterPos2f(context, angle::EntryPoint::GLRasterPos2f, x, y)));
3920 if (isCallValid)
3921 {
3922 context->rasterPos2f(x, y);
3923 }
3924 ANGLE_CAPTURE_GL(RasterPos2f, isCallValid, context, x, y);
3925 }
3926 else
3927 {
3928 GenerateContextLostErrorOnCurrentGlobalContext();
3929 }
3930 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3931 }
3932
GL_RasterPos2fv(const GLfloat * v)3933 void GL_APIENTRY GL_RasterPos2fv(const GLfloat *v)
3934 {
3935 Context *context = GetValidGlobalContext();
3936 EVENT(context, GLRasterPos2fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
3937 (uintptr_t)v);
3938
3939 if (context)
3940 {
3941 SCOPED_SHARE_CONTEXT_LOCK(context);
3942 bool isCallValid =
3943 (context->skipValidation() ||
3944 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3945 context->getMutableErrorSetForValidation(),
3946 angle::EntryPoint::GLRasterPos2fv) &&
3947 ValidateRasterPos2fv(context, angle::EntryPoint::GLRasterPos2fv, v)));
3948 if (isCallValid)
3949 {
3950 context->rasterPos2fv(v);
3951 }
3952 ANGLE_CAPTURE_GL(RasterPos2fv, isCallValid, context, v);
3953 }
3954 else
3955 {
3956 GenerateContextLostErrorOnCurrentGlobalContext();
3957 }
3958 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3959 }
3960
GL_RasterPos2i(GLint x,GLint y)3961 void GL_APIENTRY GL_RasterPos2i(GLint x, GLint y)
3962 {
3963 Context *context = GetValidGlobalContext();
3964 EVENT(context, GLRasterPos2i, "context = %d, x = %d, y = %d", CID(context), x, y);
3965
3966 if (context)
3967 {
3968 SCOPED_SHARE_CONTEXT_LOCK(context);
3969 bool isCallValid =
3970 (context->skipValidation() ||
3971 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
3972 context->getMutableErrorSetForValidation(),
3973 angle::EntryPoint::GLRasterPos2i) &&
3974 ValidateRasterPos2i(context, angle::EntryPoint::GLRasterPos2i, x, y)));
3975 if (isCallValid)
3976 {
3977 context->rasterPos2i(x, y);
3978 }
3979 ANGLE_CAPTURE_GL(RasterPos2i, isCallValid, context, x, y);
3980 }
3981 else
3982 {
3983 GenerateContextLostErrorOnCurrentGlobalContext();
3984 }
3985 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
3986 }
3987
GL_RasterPos2iv(const GLint * v)3988 void GL_APIENTRY GL_RasterPos2iv(const GLint *v)
3989 {
3990 Context *context = GetValidGlobalContext();
3991 EVENT(context, GLRasterPos2iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
3992 (uintptr_t)v);
3993
3994 if (context)
3995 {
3996 SCOPED_SHARE_CONTEXT_LOCK(context);
3997 bool isCallValid =
3998 (context->skipValidation() ||
3999 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4000 context->getMutableErrorSetForValidation(),
4001 angle::EntryPoint::GLRasterPos2iv) &&
4002 ValidateRasterPos2iv(context, angle::EntryPoint::GLRasterPos2iv, v)));
4003 if (isCallValid)
4004 {
4005 context->rasterPos2iv(v);
4006 }
4007 ANGLE_CAPTURE_GL(RasterPos2iv, isCallValid, context, v);
4008 }
4009 else
4010 {
4011 GenerateContextLostErrorOnCurrentGlobalContext();
4012 }
4013 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4014 }
4015
GL_RasterPos2s(GLshort x,GLshort y)4016 void GL_APIENTRY GL_RasterPos2s(GLshort x, GLshort y)
4017 {
4018 Context *context = GetValidGlobalContext();
4019 EVENT(context, GLRasterPos2s, "context = %d, x = %d, y = %d", CID(context), x, y);
4020
4021 if (context)
4022 {
4023 SCOPED_SHARE_CONTEXT_LOCK(context);
4024 bool isCallValid =
4025 (context->skipValidation() ||
4026 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4027 context->getMutableErrorSetForValidation(),
4028 angle::EntryPoint::GLRasterPos2s) &&
4029 ValidateRasterPos2s(context, angle::EntryPoint::GLRasterPos2s, x, y)));
4030 if (isCallValid)
4031 {
4032 context->rasterPos2s(x, y);
4033 }
4034 ANGLE_CAPTURE_GL(RasterPos2s, isCallValid, context, x, y);
4035 }
4036 else
4037 {
4038 GenerateContextLostErrorOnCurrentGlobalContext();
4039 }
4040 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4041 }
4042
GL_RasterPos2sv(const GLshort * v)4043 void GL_APIENTRY GL_RasterPos2sv(const GLshort *v)
4044 {
4045 Context *context = GetValidGlobalContext();
4046 EVENT(context, GLRasterPos2sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4047 (uintptr_t)v);
4048
4049 if (context)
4050 {
4051 SCOPED_SHARE_CONTEXT_LOCK(context);
4052 bool isCallValid =
4053 (context->skipValidation() ||
4054 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4055 context->getMutableErrorSetForValidation(),
4056 angle::EntryPoint::GLRasterPos2sv) &&
4057 ValidateRasterPos2sv(context, angle::EntryPoint::GLRasterPos2sv, v)));
4058 if (isCallValid)
4059 {
4060 context->rasterPos2sv(v);
4061 }
4062 ANGLE_CAPTURE_GL(RasterPos2sv, isCallValid, context, v);
4063 }
4064 else
4065 {
4066 GenerateContextLostErrorOnCurrentGlobalContext();
4067 }
4068 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4069 }
4070
GL_RasterPos3d(GLdouble x,GLdouble y,GLdouble z)4071 void GL_APIENTRY GL_RasterPos3d(GLdouble x, GLdouble y, GLdouble z)
4072 {
4073 Context *context = GetValidGlobalContext();
4074 EVENT(context, GLRasterPos3d, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
4075
4076 if (context)
4077 {
4078 SCOPED_SHARE_CONTEXT_LOCK(context);
4079 bool isCallValid =
4080 (context->skipValidation() ||
4081 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4082 context->getMutableErrorSetForValidation(),
4083 angle::EntryPoint::GLRasterPos3d) &&
4084 ValidateRasterPos3d(context, angle::EntryPoint::GLRasterPos3d, x, y, z)));
4085 if (isCallValid)
4086 {
4087 context->rasterPos3d(x, y, z);
4088 }
4089 ANGLE_CAPTURE_GL(RasterPos3d, isCallValid, context, x, y, z);
4090 }
4091 else
4092 {
4093 GenerateContextLostErrorOnCurrentGlobalContext();
4094 }
4095 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4096 }
4097
GL_RasterPos3dv(const GLdouble * v)4098 void GL_APIENTRY GL_RasterPos3dv(const GLdouble *v)
4099 {
4100 Context *context = GetValidGlobalContext();
4101 EVENT(context, GLRasterPos3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4102 (uintptr_t)v);
4103
4104 if (context)
4105 {
4106 SCOPED_SHARE_CONTEXT_LOCK(context);
4107 bool isCallValid =
4108 (context->skipValidation() ||
4109 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4110 context->getMutableErrorSetForValidation(),
4111 angle::EntryPoint::GLRasterPos3dv) &&
4112 ValidateRasterPos3dv(context, angle::EntryPoint::GLRasterPos3dv, v)));
4113 if (isCallValid)
4114 {
4115 context->rasterPos3dv(v);
4116 }
4117 ANGLE_CAPTURE_GL(RasterPos3dv, isCallValid, context, v);
4118 }
4119 else
4120 {
4121 GenerateContextLostErrorOnCurrentGlobalContext();
4122 }
4123 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4124 }
4125
GL_RasterPos3f(GLfloat x,GLfloat y,GLfloat z)4126 void GL_APIENTRY GL_RasterPos3f(GLfloat x, GLfloat y, GLfloat z)
4127 {
4128 Context *context = GetValidGlobalContext();
4129 EVENT(context, GLRasterPos3f, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
4130
4131 if (context)
4132 {
4133 SCOPED_SHARE_CONTEXT_LOCK(context);
4134 bool isCallValid =
4135 (context->skipValidation() ||
4136 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4137 context->getMutableErrorSetForValidation(),
4138 angle::EntryPoint::GLRasterPos3f) &&
4139 ValidateRasterPos3f(context, angle::EntryPoint::GLRasterPos3f, x, y, z)));
4140 if (isCallValid)
4141 {
4142 context->rasterPos3f(x, y, z);
4143 }
4144 ANGLE_CAPTURE_GL(RasterPos3f, isCallValid, context, x, y, z);
4145 }
4146 else
4147 {
4148 GenerateContextLostErrorOnCurrentGlobalContext();
4149 }
4150 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4151 }
4152
GL_RasterPos3fv(const GLfloat * v)4153 void GL_APIENTRY GL_RasterPos3fv(const GLfloat *v)
4154 {
4155 Context *context = GetValidGlobalContext();
4156 EVENT(context, GLRasterPos3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4157 (uintptr_t)v);
4158
4159 if (context)
4160 {
4161 SCOPED_SHARE_CONTEXT_LOCK(context);
4162 bool isCallValid =
4163 (context->skipValidation() ||
4164 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4165 context->getMutableErrorSetForValidation(),
4166 angle::EntryPoint::GLRasterPos3fv) &&
4167 ValidateRasterPos3fv(context, angle::EntryPoint::GLRasterPos3fv, v)));
4168 if (isCallValid)
4169 {
4170 context->rasterPos3fv(v);
4171 }
4172 ANGLE_CAPTURE_GL(RasterPos3fv, isCallValid, context, v);
4173 }
4174 else
4175 {
4176 GenerateContextLostErrorOnCurrentGlobalContext();
4177 }
4178 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4179 }
4180
GL_RasterPos3i(GLint x,GLint y,GLint z)4181 void GL_APIENTRY GL_RasterPos3i(GLint x, GLint y, GLint z)
4182 {
4183 Context *context = GetValidGlobalContext();
4184 EVENT(context, GLRasterPos3i, "context = %d, x = %d, y = %d, z = %d", CID(context), x, y, z);
4185
4186 if (context)
4187 {
4188 SCOPED_SHARE_CONTEXT_LOCK(context);
4189 bool isCallValid =
4190 (context->skipValidation() ||
4191 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4192 context->getMutableErrorSetForValidation(),
4193 angle::EntryPoint::GLRasterPos3i) &&
4194 ValidateRasterPos3i(context, angle::EntryPoint::GLRasterPos3i, x, y, z)));
4195 if (isCallValid)
4196 {
4197 context->rasterPos3i(x, y, z);
4198 }
4199 ANGLE_CAPTURE_GL(RasterPos3i, isCallValid, context, x, y, z);
4200 }
4201 else
4202 {
4203 GenerateContextLostErrorOnCurrentGlobalContext();
4204 }
4205 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4206 }
4207
GL_RasterPos3iv(const GLint * v)4208 void GL_APIENTRY GL_RasterPos3iv(const GLint *v)
4209 {
4210 Context *context = GetValidGlobalContext();
4211 EVENT(context, GLRasterPos3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4212 (uintptr_t)v);
4213
4214 if (context)
4215 {
4216 SCOPED_SHARE_CONTEXT_LOCK(context);
4217 bool isCallValid =
4218 (context->skipValidation() ||
4219 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4220 context->getMutableErrorSetForValidation(),
4221 angle::EntryPoint::GLRasterPos3iv) &&
4222 ValidateRasterPos3iv(context, angle::EntryPoint::GLRasterPos3iv, v)));
4223 if (isCallValid)
4224 {
4225 context->rasterPos3iv(v);
4226 }
4227 ANGLE_CAPTURE_GL(RasterPos3iv, isCallValid, context, v);
4228 }
4229 else
4230 {
4231 GenerateContextLostErrorOnCurrentGlobalContext();
4232 }
4233 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4234 }
4235
GL_RasterPos3s(GLshort x,GLshort y,GLshort z)4236 void GL_APIENTRY GL_RasterPos3s(GLshort x, GLshort y, GLshort z)
4237 {
4238 Context *context = GetValidGlobalContext();
4239 EVENT(context, GLRasterPos3s, "context = %d, x = %d, y = %d, z = %d", CID(context), x, y, z);
4240
4241 if (context)
4242 {
4243 SCOPED_SHARE_CONTEXT_LOCK(context);
4244 bool isCallValid =
4245 (context->skipValidation() ||
4246 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4247 context->getMutableErrorSetForValidation(),
4248 angle::EntryPoint::GLRasterPos3s) &&
4249 ValidateRasterPos3s(context, angle::EntryPoint::GLRasterPos3s, x, y, z)));
4250 if (isCallValid)
4251 {
4252 context->rasterPos3s(x, y, z);
4253 }
4254 ANGLE_CAPTURE_GL(RasterPos3s, isCallValid, context, x, y, z);
4255 }
4256 else
4257 {
4258 GenerateContextLostErrorOnCurrentGlobalContext();
4259 }
4260 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4261 }
4262
GL_RasterPos3sv(const GLshort * v)4263 void GL_APIENTRY GL_RasterPos3sv(const GLshort *v)
4264 {
4265 Context *context = GetValidGlobalContext();
4266 EVENT(context, GLRasterPos3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4267 (uintptr_t)v);
4268
4269 if (context)
4270 {
4271 SCOPED_SHARE_CONTEXT_LOCK(context);
4272 bool isCallValid =
4273 (context->skipValidation() ||
4274 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4275 context->getMutableErrorSetForValidation(),
4276 angle::EntryPoint::GLRasterPos3sv) &&
4277 ValidateRasterPos3sv(context, angle::EntryPoint::GLRasterPos3sv, v)));
4278 if (isCallValid)
4279 {
4280 context->rasterPos3sv(v);
4281 }
4282 ANGLE_CAPTURE_GL(RasterPos3sv, isCallValid, context, v);
4283 }
4284 else
4285 {
4286 GenerateContextLostErrorOnCurrentGlobalContext();
4287 }
4288 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4289 }
4290
GL_RasterPos4d(GLdouble x,GLdouble y,GLdouble z,GLdouble w)4291 void GL_APIENTRY GL_RasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
4292 {
4293 Context *context = GetValidGlobalContext();
4294 EVENT(context, GLRasterPos4d, "context = %d, x = %f, y = %f, z = %f, w = %f", CID(context), x,
4295 y, z, w);
4296
4297 if (context)
4298 {
4299 SCOPED_SHARE_CONTEXT_LOCK(context);
4300 bool isCallValid =
4301 (context->skipValidation() ||
4302 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4303 context->getMutableErrorSetForValidation(),
4304 angle::EntryPoint::GLRasterPos4d) &&
4305 ValidateRasterPos4d(context, angle::EntryPoint::GLRasterPos4d, x, y, z, w)));
4306 if (isCallValid)
4307 {
4308 context->rasterPos4d(x, y, z, w);
4309 }
4310 ANGLE_CAPTURE_GL(RasterPos4d, isCallValid, context, x, y, z, w);
4311 }
4312 else
4313 {
4314 GenerateContextLostErrorOnCurrentGlobalContext();
4315 }
4316 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4317 }
4318
GL_RasterPos4dv(const GLdouble * v)4319 void GL_APIENTRY GL_RasterPos4dv(const GLdouble *v)
4320 {
4321 Context *context = GetValidGlobalContext();
4322 EVENT(context, GLRasterPos4dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4323 (uintptr_t)v);
4324
4325 if (context)
4326 {
4327 SCOPED_SHARE_CONTEXT_LOCK(context);
4328 bool isCallValid =
4329 (context->skipValidation() ||
4330 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4331 context->getMutableErrorSetForValidation(),
4332 angle::EntryPoint::GLRasterPos4dv) &&
4333 ValidateRasterPos4dv(context, angle::EntryPoint::GLRasterPos4dv, v)));
4334 if (isCallValid)
4335 {
4336 context->rasterPos4dv(v);
4337 }
4338 ANGLE_CAPTURE_GL(RasterPos4dv, isCallValid, context, v);
4339 }
4340 else
4341 {
4342 GenerateContextLostErrorOnCurrentGlobalContext();
4343 }
4344 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4345 }
4346
GL_RasterPos4f(GLfloat x,GLfloat y,GLfloat z,GLfloat w)4347 void GL_APIENTRY GL_RasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
4348 {
4349 Context *context = GetValidGlobalContext();
4350 EVENT(context, GLRasterPos4f, "context = %d, x = %f, y = %f, z = %f, w = %f", CID(context), x,
4351 y, z, w);
4352
4353 if (context)
4354 {
4355 SCOPED_SHARE_CONTEXT_LOCK(context);
4356 bool isCallValid =
4357 (context->skipValidation() ||
4358 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4359 context->getMutableErrorSetForValidation(),
4360 angle::EntryPoint::GLRasterPos4f) &&
4361 ValidateRasterPos4f(context, angle::EntryPoint::GLRasterPos4f, x, y, z, w)));
4362 if (isCallValid)
4363 {
4364 context->rasterPos4f(x, y, z, w);
4365 }
4366 ANGLE_CAPTURE_GL(RasterPos4f, isCallValid, context, x, y, z, w);
4367 }
4368 else
4369 {
4370 GenerateContextLostErrorOnCurrentGlobalContext();
4371 }
4372 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4373 }
4374
GL_RasterPos4fv(const GLfloat * v)4375 void GL_APIENTRY GL_RasterPos4fv(const GLfloat *v)
4376 {
4377 Context *context = GetValidGlobalContext();
4378 EVENT(context, GLRasterPos4fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4379 (uintptr_t)v);
4380
4381 if (context)
4382 {
4383 SCOPED_SHARE_CONTEXT_LOCK(context);
4384 bool isCallValid =
4385 (context->skipValidation() ||
4386 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4387 context->getMutableErrorSetForValidation(),
4388 angle::EntryPoint::GLRasterPos4fv) &&
4389 ValidateRasterPos4fv(context, angle::EntryPoint::GLRasterPos4fv, v)));
4390 if (isCallValid)
4391 {
4392 context->rasterPos4fv(v);
4393 }
4394 ANGLE_CAPTURE_GL(RasterPos4fv, isCallValid, context, v);
4395 }
4396 else
4397 {
4398 GenerateContextLostErrorOnCurrentGlobalContext();
4399 }
4400 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4401 }
4402
GL_RasterPos4i(GLint x,GLint y,GLint z,GLint w)4403 void GL_APIENTRY GL_RasterPos4i(GLint x, GLint y, GLint z, GLint w)
4404 {
4405 Context *context = GetValidGlobalContext();
4406 EVENT(context, GLRasterPos4i, "context = %d, x = %d, y = %d, z = %d, w = %d", CID(context), x,
4407 y, z, w);
4408
4409 if (context)
4410 {
4411 SCOPED_SHARE_CONTEXT_LOCK(context);
4412 bool isCallValid =
4413 (context->skipValidation() ||
4414 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4415 context->getMutableErrorSetForValidation(),
4416 angle::EntryPoint::GLRasterPos4i) &&
4417 ValidateRasterPos4i(context, angle::EntryPoint::GLRasterPos4i, x, y, z, w)));
4418 if (isCallValid)
4419 {
4420 context->rasterPos4i(x, y, z, w);
4421 }
4422 ANGLE_CAPTURE_GL(RasterPos4i, isCallValid, context, x, y, z, w);
4423 }
4424 else
4425 {
4426 GenerateContextLostErrorOnCurrentGlobalContext();
4427 }
4428 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4429 }
4430
GL_RasterPos4iv(const GLint * v)4431 void GL_APIENTRY GL_RasterPos4iv(const GLint *v)
4432 {
4433 Context *context = GetValidGlobalContext();
4434 EVENT(context, GLRasterPos4iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4435 (uintptr_t)v);
4436
4437 if (context)
4438 {
4439 SCOPED_SHARE_CONTEXT_LOCK(context);
4440 bool isCallValid =
4441 (context->skipValidation() ||
4442 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4443 context->getMutableErrorSetForValidation(),
4444 angle::EntryPoint::GLRasterPos4iv) &&
4445 ValidateRasterPos4iv(context, angle::EntryPoint::GLRasterPos4iv, v)));
4446 if (isCallValid)
4447 {
4448 context->rasterPos4iv(v);
4449 }
4450 ANGLE_CAPTURE_GL(RasterPos4iv, isCallValid, context, v);
4451 }
4452 else
4453 {
4454 GenerateContextLostErrorOnCurrentGlobalContext();
4455 }
4456 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4457 }
4458
GL_RasterPos4s(GLshort x,GLshort y,GLshort z,GLshort w)4459 void GL_APIENTRY GL_RasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
4460 {
4461 Context *context = GetValidGlobalContext();
4462 EVENT(context, GLRasterPos4s, "context = %d, x = %d, y = %d, z = %d, w = %d", CID(context), x,
4463 y, z, w);
4464
4465 if (context)
4466 {
4467 SCOPED_SHARE_CONTEXT_LOCK(context);
4468 bool isCallValid =
4469 (context->skipValidation() ||
4470 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4471 context->getMutableErrorSetForValidation(),
4472 angle::EntryPoint::GLRasterPos4s) &&
4473 ValidateRasterPos4s(context, angle::EntryPoint::GLRasterPos4s, x, y, z, w)));
4474 if (isCallValid)
4475 {
4476 context->rasterPos4s(x, y, z, w);
4477 }
4478 ANGLE_CAPTURE_GL(RasterPos4s, isCallValid, context, x, y, z, w);
4479 }
4480 else
4481 {
4482 GenerateContextLostErrorOnCurrentGlobalContext();
4483 }
4484 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4485 }
4486
GL_RasterPos4sv(const GLshort * v)4487 void GL_APIENTRY GL_RasterPos4sv(const GLshort *v)
4488 {
4489 Context *context = GetValidGlobalContext();
4490 EVENT(context, GLRasterPos4sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4491 (uintptr_t)v);
4492
4493 if (context)
4494 {
4495 SCOPED_SHARE_CONTEXT_LOCK(context);
4496 bool isCallValid =
4497 (context->skipValidation() ||
4498 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4499 context->getMutableErrorSetForValidation(),
4500 angle::EntryPoint::GLRasterPos4sv) &&
4501 ValidateRasterPos4sv(context, angle::EntryPoint::GLRasterPos4sv, v)));
4502 if (isCallValid)
4503 {
4504 context->rasterPos4sv(v);
4505 }
4506 ANGLE_CAPTURE_GL(RasterPos4sv, isCallValid, context, v);
4507 }
4508 else
4509 {
4510 GenerateContextLostErrorOnCurrentGlobalContext();
4511 }
4512 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4513 }
4514
GL_Rectd(GLdouble x1,GLdouble y1,GLdouble x2,GLdouble y2)4515 void GL_APIENTRY GL_Rectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
4516 {
4517 Context *context = GetValidGlobalContext();
4518 EVENT(context, GLRectd, "context = %d, x1 = %f, y1 = %f, x2 = %f, y2 = %f", CID(context), x1,
4519 y1, x2, y2);
4520
4521 if (context)
4522 {
4523 SCOPED_SHARE_CONTEXT_LOCK(context);
4524 bool isCallValid =
4525 (context->skipValidation() ||
4526 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4527 context->getMutableErrorSetForValidation(),
4528 angle::EntryPoint::GLRectd) &&
4529 ValidateRectd(context, angle::EntryPoint::GLRectd, x1, y1, x2, y2)));
4530 if (isCallValid)
4531 {
4532 context->rectd(x1, y1, x2, y2);
4533 }
4534 ANGLE_CAPTURE_GL(Rectd, isCallValid, context, x1, y1, x2, y2);
4535 }
4536 else
4537 {
4538 GenerateContextLostErrorOnCurrentGlobalContext();
4539 }
4540 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4541 }
4542
GL_Rectdv(const GLdouble * v1,const GLdouble * v2)4543 void GL_APIENTRY GL_Rectdv(const GLdouble *v1, const GLdouble *v2)
4544 {
4545 Context *context = GetValidGlobalContext();
4546 EVENT(context, GLRectdv, "context = %d, v1 = 0x%016" PRIxPTR ", v2 = 0x%016" PRIxPTR "",
4547 CID(context), (uintptr_t)v1, (uintptr_t)v2);
4548
4549 if (context)
4550 {
4551 SCOPED_SHARE_CONTEXT_LOCK(context);
4552 bool isCallValid =
4553 (context->skipValidation() ||
4554 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4555 context->getMutableErrorSetForValidation(),
4556 angle::EntryPoint::GLRectdv) &&
4557 ValidateRectdv(context, angle::EntryPoint::GLRectdv, v1, v2)));
4558 if (isCallValid)
4559 {
4560 context->rectdv(v1, v2);
4561 }
4562 ANGLE_CAPTURE_GL(Rectdv, isCallValid, context, v1, v2);
4563 }
4564 else
4565 {
4566 GenerateContextLostErrorOnCurrentGlobalContext();
4567 }
4568 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4569 }
4570
GL_Rectf(GLfloat x1,GLfloat y1,GLfloat x2,GLfloat y2)4571 void GL_APIENTRY GL_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
4572 {
4573 Context *context = GetValidGlobalContext();
4574 EVENT(context, GLRectf, "context = %d, x1 = %f, y1 = %f, x2 = %f, y2 = %f", CID(context), x1,
4575 y1, x2, y2);
4576
4577 if (context)
4578 {
4579 SCOPED_SHARE_CONTEXT_LOCK(context);
4580 bool isCallValid =
4581 (context->skipValidation() ||
4582 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4583 context->getMutableErrorSetForValidation(),
4584 angle::EntryPoint::GLRectf) &&
4585 ValidateRectf(context, angle::EntryPoint::GLRectf, x1, y1, x2, y2)));
4586 if (isCallValid)
4587 {
4588 context->rectf(x1, y1, x2, y2);
4589 }
4590 ANGLE_CAPTURE_GL(Rectf, isCallValid, context, x1, y1, x2, y2);
4591 }
4592 else
4593 {
4594 GenerateContextLostErrorOnCurrentGlobalContext();
4595 }
4596 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4597 }
4598
GL_Rectfv(const GLfloat * v1,const GLfloat * v2)4599 void GL_APIENTRY GL_Rectfv(const GLfloat *v1, const GLfloat *v2)
4600 {
4601 Context *context = GetValidGlobalContext();
4602 EVENT(context, GLRectfv, "context = %d, v1 = 0x%016" PRIxPTR ", v2 = 0x%016" PRIxPTR "",
4603 CID(context), (uintptr_t)v1, (uintptr_t)v2);
4604
4605 if (context)
4606 {
4607 SCOPED_SHARE_CONTEXT_LOCK(context);
4608 bool isCallValid =
4609 (context->skipValidation() ||
4610 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4611 context->getMutableErrorSetForValidation(),
4612 angle::EntryPoint::GLRectfv) &&
4613 ValidateRectfv(context, angle::EntryPoint::GLRectfv, v1, v2)));
4614 if (isCallValid)
4615 {
4616 context->rectfv(v1, v2);
4617 }
4618 ANGLE_CAPTURE_GL(Rectfv, isCallValid, context, v1, v2);
4619 }
4620 else
4621 {
4622 GenerateContextLostErrorOnCurrentGlobalContext();
4623 }
4624 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4625 }
4626
GL_Recti(GLint x1,GLint y1,GLint x2,GLint y2)4627 void GL_APIENTRY GL_Recti(GLint x1, GLint y1, GLint x2, GLint y2)
4628 {
4629 Context *context = GetValidGlobalContext();
4630 EVENT(context, GLRecti, "context = %d, x1 = %d, y1 = %d, x2 = %d, y2 = %d", CID(context), x1,
4631 y1, x2, y2);
4632
4633 if (context)
4634 {
4635 SCOPED_SHARE_CONTEXT_LOCK(context);
4636 bool isCallValid =
4637 (context->skipValidation() ||
4638 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4639 context->getMutableErrorSetForValidation(),
4640 angle::EntryPoint::GLRecti) &&
4641 ValidateRecti(context, angle::EntryPoint::GLRecti, x1, y1, x2, y2)));
4642 if (isCallValid)
4643 {
4644 context->recti(x1, y1, x2, y2);
4645 }
4646 ANGLE_CAPTURE_GL(Recti, isCallValid, context, x1, y1, x2, y2);
4647 }
4648 else
4649 {
4650 GenerateContextLostErrorOnCurrentGlobalContext();
4651 }
4652 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4653 }
4654
GL_Rectiv(const GLint * v1,const GLint * v2)4655 void GL_APIENTRY GL_Rectiv(const GLint *v1, const GLint *v2)
4656 {
4657 Context *context = GetValidGlobalContext();
4658 EVENT(context, GLRectiv, "context = %d, v1 = 0x%016" PRIxPTR ", v2 = 0x%016" PRIxPTR "",
4659 CID(context), (uintptr_t)v1, (uintptr_t)v2);
4660
4661 if (context)
4662 {
4663 SCOPED_SHARE_CONTEXT_LOCK(context);
4664 bool isCallValid =
4665 (context->skipValidation() ||
4666 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4667 context->getMutableErrorSetForValidation(),
4668 angle::EntryPoint::GLRectiv) &&
4669 ValidateRectiv(context, angle::EntryPoint::GLRectiv, v1, v2)));
4670 if (isCallValid)
4671 {
4672 context->rectiv(v1, v2);
4673 }
4674 ANGLE_CAPTURE_GL(Rectiv, isCallValid, context, v1, v2);
4675 }
4676 else
4677 {
4678 GenerateContextLostErrorOnCurrentGlobalContext();
4679 }
4680 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4681 }
4682
GL_Rects(GLshort x1,GLshort y1,GLshort x2,GLshort y2)4683 void GL_APIENTRY GL_Rects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
4684 {
4685 Context *context = GetValidGlobalContext();
4686 EVENT(context, GLRects, "context = %d, x1 = %d, y1 = %d, x2 = %d, y2 = %d", CID(context), x1,
4687 y1, x2, y2);
4688
4689 if (context)
4690 {
4691 SCOPED_SHARE_CONTEXT_LOCK(context);
4692 bool isCallValid =
4693 (context->skipValidation() ||
4694 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4695 context->getMutableErrorSetForValidation(),
4696 angle::EntryPoint::GLRects) &&
4697 ValidateRects(context, angle::EntryPoint::GLRects, x1, y1, x2, y2)));
4698 if (isCallValid)
4699 {
4700 context->rects(x1, y1, x2, y2);
4701 }
4702 ANGLE_CAPTURE_GL(Rects, isCallValid, context, x1, y1, x2, y2);
4703 }
4704 else
4705 {
4706 GenerateContextLostErrorOnCurrentGlobalContext();
4707 }
4708 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4709 }
4710
GL_Rectsv(const GLshort * v1,const GLshort * v2)4711 void GL_APIENTRY GL_Rectsv(const GLshort *v1, const GLshort *v2)
4712 {
4713 Context *context = GetValidGlobalContext();
4714 EVENT(context, GLRectsv, "context = %d, v1 = 0x%016" PRIxPTR ", v2 = 0x%016" PRIxPTR "",
4715 CID(context), (uintptr_t)v1, (uintptr_t)v2);
4716
4717 if (context)
4718 {
4719 SCOPED_SHARE_CONTEXT_LOCK(context);
4720 bool isCallValid =
4721 (context->skipValidation() ||
4722 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4723 context->getMutableErrorSetForValidation(),
4724 angle::EntryPoint::GLRectsv) &&
4725 ValidateRectsv(context, angle::EntryPoint::GLRectsv, v1, v2)));
4726 if (isCallValid)
4727 {
4728 context->rectsv(v1, v2);
4729 }
4730 ANGLE_CAPTURE_GL(Rectsv, isCallValid, context, v1, v2);
4731 }
4732 else
4733 {
4734 GenerateContextLostErrorOnCurrentGlobalContext();
4735 }
4736 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4737 }
4738
GL_RenderMode(GLenum mode)4739 GLint GL_APIENTRY GL_RenderMode(GLenum mode)
4740 {
4741 Context *context = GetValidGlobalContext();
4742 EVENT(context, GLRenderMode, "context = %d, mode = %s", CID(context),
4743 GLenumToString(BigGLEnum::RenderingMode, mode));
4744
4745 GLint returnValue;
4746 if (context)
4747 {
4748 SCOPED_SHARE_CONTEXT_LOCK(context);
4749 bool isCallValid =
4750 (context->skipValidation() ||
4751 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4752 context->getMutableErrorSetForValidation(),
4753 angle::EntryPoint::GLRenderMode) &&
4754 ValidateRenderMode(context, angle::EntryPoint::GLRenderMode, mode)));
4755 if (isCallValid)
4756 {
4757 returnValue = context->renderMode(mode);
4758 }
4759 else
4760 {
4761 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLRenderMode, GLint>();
4762 }
4763 ANGLE_CAPTURE_GL(RenderMode, isCallValid, context, mode, returnValue);
4764 }
4765 else
4766 {
4767 GenerateContextLostErrorOnCurrentGlobalContext();
4768 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLRenderMode, GLint>();
4769 }
4770 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4771 return returnValue;
4772 }
4773
GL_Rotated(GLdouble angle,GLdouble x,GLdouble y,GLdouble z)4774 void GL_APIENTRY GL_Rotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
4775 {
4776 Context *context = GetValidGlobalContext();
4777 EVENT(context, GLRotated, "context = %d, angle = %f, x = %f, y = %f, z = %f", CID(context),
4778 angle, x, y, z);
4779
4780 if (context)
4781 {
4782 SCOPED_SHARE_CONTEXT_LOCK(context);
4783 bool isCallValid =
4784 (context->skipValidation() ||
4785 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4786 context->getMutableErrorSetForValidation(),
4787 angle::EntryPoint::GLRotated) &&
4788 ValidateRotated(context, angle::EntryPoint::GLRotated, angle, x, y, z)));
4789 if (isCallValid)
4790 {
4791 context->rotated(angle, x, y, z);
4792 }
4793 ANGLE_CAPTURE_GL(Rotated, isCallValid, context, angle, x, y, z);
4794 }
4795 else
4796 {
4797 GenerateContextLostErrorOnCurrentGlobalContext();
4798 }
4799 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4800 }
4801
GL_Scaled(GLdouble x,GLdouble y,GLdouble z)4802 void GL_APIENTRY GL_Scaled(GLdouble x, GLdouble y, GLdouble z)
4803 {
4804 Context *context = GetValidGlobalContext();
4805 EVENT(context, GLScaled, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
4806
4807 if (context)
4808 {
4809 SCOPED_SHARE_CONTEXT_LOCK(context);
4810 bool isCallValid =
4811 (context->skipValidation() ||
4812 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4813 context->getMutableErrorSetForValidation(),
4814 angle::EntryPoint::GLScaled) &&
4815 ValidateScaled(context, angle::EntryPoint::GLScaled, x, y, z)));
4816 if (isCallValid)
4817 {
4818 context->scaled(x, y, z);
4819 }
4820 ANGLE_CAPTURE_GL(Scaled, isCallValid, context, x, y, z);
4821 }
4822 else
4823 {
4824 GenerateContextLostErrorOnCurrentGlobalContext();
4825 }
4826 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4827 }
4828
GL_SelectBuffer(GLsizei size,GLuint * buffer)4829 void GL_APIENTRY GL_SelectBuffer(GLsizei size, GLuint *buffer)
4830 {
4831 Context *context = GetValidGlobalContext();
4832 EVENT(context, GLSelectBuffer, "context = %d, size = %d, buffer = 0x%016" PRIxPTR "",
4833 CID(context), size, (uintptr_t)buffer);
4834
4835 if (context)
4836 {
4837 SCOPED_SHARE_CONTEXT_LOCK(context);
4838 bool isCallValid =
4839 (context->skipValidation() ||
4840 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4841 context->getMutableErrorSetForValidation(),
4842 angle::EntryPoint::GLSelectBuffer) &&
4843 ValidateSelectBuffer(context, angle::EntryPoint::GLSelectBuffer, size, buffer)));
4844 if (isCallValid)
4845 {
4846 context->selectBuffer(size, buffer);
4847 }
4848 ANGLE_CAPTURE_GL(SelectBuffer, isCallValid, context, size, buffer);
4849 }
4850 else
4851 {
4852 GenerateContextLostErrorOnCurrentGlobalContext();
4853 }
4854 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4855 }
4856
GL_TexCoord1d(GLdouble s)4857 void GL_APIENTRY GL_TexCoord1d(GLdouble s)
4858 {
4859 Context *context = GetValidGlobalContext();
4860 EVENT(context, GLTexCoord1d, "context = %d, s = %f", CID(context), s);
4861
4862 if (context)
4863 {
4864 SCOPED_SHARE_CONTEXT_LOCK(context);
4865 bool isCallValid =
4866 (context->skipValidation() ||
4867 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4868 context->getMutableErrorSetForValidation(),
4869 angle::EntryPoint::GLTexCoord1d) &&
4870 ValidateTexCoord1d(context, angle::EntryPoint::GLTexCoord1d, s)));
4871 if (isCallValid)
4872 {
4873 context->texCoord1d(s);
4874 }
4875 ANGLE_CAPTURE_GL(TexCoord1d, isCallValid, context, s);
4876 }
4877 else
4878 {
4879 GenerateContextLostErrorOnCurrentGlobalContext();
4880 }
4881 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4882 }
4883
GL_TexCoord1dv(const GLdouble * v)4884 void GL_APIENTRY GL_TexCoord1dv(const GLdouble *v)
4885 {
4886 Context *context = GetValidGlobalContext();
4887 EVENT(context, GLTexCoord1dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4888 (uintptr_t)v);
4889
4890 if (context)
4891 {
4892 SCOPED_SHARE_CONTEXT_LOCK(context);
4893 bool isCallValid =
4894 (context->skipValidation() ||
4895 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4896 context->getMutableErrorSetForValidation(),
4897 angle::EntryPoint::GLTexCoord1dv) &&
4898 ValidateTexCoord1dv(context, angle::EntryPoint::GLTexCoord1dv, v)));
4899 if (isCallValid)
4900 {
4901 context->texCoord1dv(v);
4902 }
4903 ANGLE_CAPTURE_GL(TexCoord1dv, isCallValid, context, v);
4904 }
4905 else
4906 {
4907 GenerateContextLostErrorOnCurrentGlobalContext();
4908 }
4909 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4910 }
4911
GL_TexCoord1f(GLfloat s)4912 void GL_APIENTRY GL_TexCoord1f(GLfloat s)
4913 {
4914 Context *context = GetValidGlobalContext();
4915 EVENT(context, GLTexCoord1f, "context = %d, s = %f", CID(context), s);
4916
4917 if (context)
4918 {
4919 SCOPED_SHARE_CONTEXT_LOCK(context);
4920 bool isCallValid =
4921 (context->skipValidation() ||
4922 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4923 context->getMutableErrorSetForValidation(),
4924 angle::EntryPoint::GLTexCoord1f) &&
4925 ValidateTexCoord1f(context, angle::EntryPoint::GLTexCoord1f, s)));
4926 if (isCallValid)
4927 {
4928 context->texCoord1f(s);
4929 }
4930 ANGLE_CAPTURE_GL(TexCoord1f, isCallValid, context, s);
4931 }
4932 else
4933 {
4934 GenerateContextLostErrorOnCurrentGlobalContext();
4935 }
4936 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4937 }
4938
GL_TexCoord1fv(const GLfloat * v)4939 void GL_APIENTRY GL_TexCoord1fv(const GLfloat *v)
4940 {
4941 Context *context = GetValidGlobalContext();
4942 EVENT(context, GLTexCoord1fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4943 (uintptr_t)v);
4944
4945 if (context)
4946 {
4947 SCOPED_SHARE_CONTEXT_LOCK(context);
4948 bool isCallValid =
4949 (context->skipValidation() ||
4950 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4951 context->getMutableErrorSetForValidation(),
4952 angle::EntryPoint::GLTexCoord1fv) &&
4953 ValidateTexCoord1fv(context, angle::EntryPoint::GLTexCoord1fv, v)));
4954 if (isCallValid)
4955 {
4956 context->texCoord1fv(v);
4957 }
4958 ANGLE_CAPTURE_GL(TexCoord1fv, isCallValid, context, v);
4959 }
4960 else
4961 {
4962 GenerateContextLostErrorOnCurrentGlobalContext();
4963 }
4964 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4965 }
4966
GL_TexCoord1i(GLint s)4967 void GL_APIENTRY GL_TexCoord1i(GLint s)
4968 {
4969 Context *context = GetValidGlobalContext();
4970 EVENT(context, GLTexCoord1i, "context = %d, s = %d", CID(context), s);
4971
4972 if (context)
4973 {
4974 SCOPED_SHARE_CONTEXT_LOCK(context);
4975 bool isCallValid =
4976 (context->skipValidation() ||
4977 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
4978 context->getMutableErrorSetForValidation(),
4979 angle::EntryPoint::GLTexCoord1i) &&
4980 ValidateTexCoord1i(context, angle::EntryPoint::GLTexCoord1i, s)));
4981 if (isCallValid)
4982 {
4983 context->texCoord1i(s);
4984 }
4985 ANGLE_CAPTURE_GL(TexCoord1i, isCallValid, context, s);
4986 }
4987 else
4988 {
4989 GenerateContextLostErrorOnCurrentGlobalContext();
4990 }
4991 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
4992 }
4993
GL_TexCoord1iv(const GLint * v)4994 void GL_APIENTRY GL_TexCoord1iv(const GLint *v)
4995 {
4996 Context *context = GetValidGlobalContext();
4997 EVENT(context, GLTexCoord1iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
4998 (uintptr_t)v);
4999
5000 if (context)
5001 {
5002 SCOPED_SHARE_CONTEXT_LOCK(context);
5003 bool isCallValid =
5004 (context->skipValidation() ||
5005 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5006 context->getMutableErrorSetForValidation(),
5007 angle::EntryPoint::GLTexCoord1iv) &&
5008 ValidateTexCoord1iv(context, angle::EntryPoint::GLTexCoord1iv, v)));
5009 if (isCallValid)
5010 {
5011 context->texCoord1iv(v);
5012 }
5013 ANGLE_CAPTURE_GL(TexCoord1iv, isCallValid, context, v);
5014 }
5015 else
5016 {
5017 GenerateContextLostErrorOnCurrentGlobalContext();
5018 }
5019 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5020 }
5021
GL_TexCoord1s(GLshort s)5022 void GL_APIENTRY GL_TexCoord1s(GLshort s)
5023 {
5024 Context *context = GetValidGlobalContext();
5025 EVENT(context, GLTexCoord1s, "context = %d, s = %d", CID(context), s);
5026
5027 if (context)
5028 {
5029 SCOPED_SHARE_CONTEXT_LOCK(context);
5030 bool isCallValid =
5031 (context->skipValidation() ||
5032 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5033 context->getMutableErrorSetForValidation(),
5034 angle::EntryPoint::GLTexCoord1s) &&
5035 ValidateTexCoord1s(context, angle::EntryPoint::GLTexCoord1s, s)));
5036 if (isCallValid)
5037 {
5038 context->texCoord1s(s);
5039 }
5040 ANGLE_CAPTURE_GL(TexCoord1s, isCallValid, context, s);
5041 }
5042 else
5043 {
5044 GenerateContextLostErrorOnCurrentGlobalContext();
5045 }
5046 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5047 }
5048
GL_TexCoord1sv(const GLshort * v)5049 void GL_APIENTRY GL_TexCoord1sv(const GLshort *v)
5050 {
5051 Context *context = GetValidGlobalContext();
5052 EVENT(context, GLTexCoord1sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5053 (uintptr_t)v);
5054
5055 if (context)
5056 {
5057 SCOPED_SHARE_CONTEXT_LOCK(context);
5058 bool isCallValid =
5059 (context->skipValidation() ||
5060 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5061 context->getMutableErrorSetForValidation(),
5062 angle::EntryPoint::GLTexCoord1sv) &&
5063 ValidateTexCoord1sv(context, angle::EntryPoint::GLTexCoord1sv, v)));
5064 if (isCallValid)
5065 {
5066 context->texCoord1sv(v);
5067 }
5068 ANGLE_CAPTURE_GL(TexCoord1sv, isCallValid, context, v);
5069 }
5070 else
5071 {
5072 GenerateContextLostErrorOnCurrentGlobalContext();
5073 }
5074 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5075 }
5076
GL_TexCoord2d(GLdouble s,GLdouble t)5077 void GL_APIENTRY GL_TexCoord2d(GLdouble s, GLdouble t)
5078 {
5079 Context *context = GetValidGlobalContext();
5080 EVENT(context, GLTexCoord2d, "context = %d, s = %f, t = %f", CID(context), s, t);
5081
5082 if (context)
5083 {
5084 SCOPED_SHARE_CONTEXT_LOCK(context);
5085 bool isCallValid =
5086 (context->skipValidation() ||
5087 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5088 context->getMutableErrorSetForValidation(),
5089 angle::EntryPoint::GLTexCoord2d) &&
5090 ValidateTexCoord2d(context, angle::EntryPoint::GLTexCoord2d, s, t)));
5091 if (isCallValid)
5092 {
5093 context->texCoord2d(s, t);
5094 }
5095 ANGLE_CAPTURE_GL(TexCoord2d, isCallValid, context, s, t);
5096 }
5097 else
5098 {
5099 GenerateContextLostErrorOnCurrentGlobalContext();
5100 }
5101 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5102 }
5103
GL_TexCoord2dv(const GLdouble * v)5104 void GL_APIENTRY GL_TexCoord2dv(const GLdouble *v)
5105 {
5106 Context *context = GetValidGlobalContext();
5107 EVENT(context, GLTexCoord2dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5108 (uintptr_t)v);
5109
5110 if (context)
5111 {
5112 SCOPED_SHARE_CONTEXT_LOCK(context);
5113 bool isCallValid =
5114 (context->skipValidation() ||
5115 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5116 context->getMutableErrorSetForValidation(),
5117 angle::EntryPoint::GLTexCoord2dv) &&
5118 ValidateTexCoord2dv(context, angle::EntryPoint::GLTexCoord2dv, v)));
5119 if (isCallValid)
5120 {
5121 context->texCoord2dv(v);
5122 }
5123 ANGLE_CAPTURE_GL(TexCoord2dv, isCallValid, context, v);
5124 }
5125 else
5126 {
5127 GenerateContextLostErrorOnCurrentGlobalContext();
5128 }
5129 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5130 }
5131
GL_TexCoord2f(GLfloat s,GLfloat t)5132 void GL_APIENTRY GL_TexCoord2f(GLfloat s, GLfloat t)
5133 {
5134 Context *context = GetValidGlobalContext();
5135 EVENT(context, GLTexCoord2f, "context = %d, s = %f, t = %f", CID(context), s, t);
5136
5137 if (context)
5138 {
5139 SCOPED_SHARE_CONTEXT_LOCK(context);
5140 bool isCallValid =
5141 (context->skipValidation() ||
5142 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5143 context->getMutableErrorSetForValidation(),
5144 angle::EntryPoint::GLTexCoord2f) &&
5145 ValidateTexCoord2f(context, angle::EntryPoint::GLTexCoord2f, s, t)));
5146 if (isCallValid)
5147 {
5148 context->texCoord2f(s, t);
5149 }
5150 ANGLE_CAPTURE_GL(TexCoord2f, isCallValid, context, s, t);
5151 }
5152 else
5153 {
5154 GenerateContextLostErrorOnCurrentGlobalContext();
5155 }
5156 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5157 }
5158
GL_TexCoord2fv(const GLfloat * v)5159 void GL_APIENTRY GL_TexCoord2fv(const GLfloat *v)
5160 {
5161 Context *context = GetValidGlobalContext();
5162 EVENT(context, GLTexCoord2fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5163 (uintptr_t)v);
5164
5165 if (context)
5166 {
5167 SCOPED_SHARE_CONTEXT_LOCK(context);
5168 bool isCallValid =
5169 (context->skipValidation() ||
5170 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5171 context->getMutableErrorSetForValidation(),
5172 angle::EntryPoint::GLTexCoord2fv) &&
5173 ValidateTexCoord2fv(context, angle::EntryPoint::GLTexCoord2fv, v)));
5174 if (isCallValid)
5175 {
5176 context->texCoord2fv(v);
5177 }
5178 ANGLE_CAPTURE_GL(TexCoord2fv, isCallValid, context, v);
5179 }
5180 else
5181 {
5182 GenerateContextLostErrorOnCurrentGlobalContext();
5183 }
5184 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5185 }
5186
GL_TexCoord2i(GLint s,GLint t)5187 void GL_APIENTRY GL_TexCoord2i(GLint s, GLint t)
5188 {
5189 Context *context = GetValidGlobalContext();
5190 EVENT(context, GLTexCoord2i, "context = %d, s = %d, t = %d", CID(context), s, t);
5191
5192 if (context)
5193 {
5194 SCOPED_SHARE_CONTEXT_LOCK(context);
5195 bool isCallValid =
5196 (context->skipValidation() ||
5197 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5198 context->getMutableErrorSetForValidation(),
5199 angle::EntryPoint::GLTexCoord2i) &&
5200 ValidateTexCoord2i(context, angle::EntryPoint::GLTexCoord2i, s, t)));
5201 if (isCallValid)
5202 {
5203 context->texCoord2i(s, t);
5204 }
5205 ANGLE_CAPTURE_GL(TexCoord2i, isCallValid, context, s, t);
5206 }
5207 else
5208 {
5209 GenerateContextLostErrorOnCurrentGlobalContext();
5210 }
5211 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5212 }
5213
GL_TexCoord2iv(const GLint * v)5214 void GL_APIENTRY GL_TexCoord2iv(const GLint *v)
5215 {
5216 Context *context = GetValidGlobalContext();
5217 EVENT(context, GLTexCoord2iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5218 (uintptr_t)v);
5219
5220 if (context)
5221 {
5222 SCOPED_SHARE_CONTEXT_LOCK(context);
5223 bool isCallValid =
5224 (context->skipValidation() ||
5225 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5226 context->getMutableErrorSetForValidation(),
5227 angle::EntryPoint::GLTexCoord2iv) &&
5228 ValidateTexCoord2iv(context, angle::EntryPoint::GLTexCoord2iv, v)));
5229 if (isCallValid)
5230 {
5231 context->texCoord2iv(v);
5232 }
5233 ANGLE_CAPTURE_GL(TexCoord2iv, isCallValid, context, v);
5234 }
5235 else
5236 {
5237 GenerateContextLostErrorOnCurrentGlobalContext();
5238 }
5239 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5240 }
5241
GL_TexCoord2s(GLshort s,GLshort t)5242 void GL_APIENTRY GL_TexCoord2s(GLshort s, GLshort t)
5243 {
5244 Context *context = GetValidGlobalContext();
5245 EVENT(context, GLTexCoord2s, "context = %d, s = %d, t = %d", CID(context), s, t);
5246
5247 if (context)
5248 {
5249 SCOPED_SHARE_CONTEXT_LOCK(context);
5250 bool isCallValid =
5251 (context->skipValidation() ||
5252 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5253 context->getMutableErrorSetForValidation(),
5254 angle::EntryPoint::GLTexCoord2s) &&
5255 ValidateTexCoord2s(context, angle::EntryPoint::GLTexCoord2s, s, t)));
5256 if (isCallValid)
5257 {
5258 context->texCoord2s(s, t);
5259 }
5260 ANGLE_CAPTURE_GL(TexCoord2s, isCallValid, context, s, t);
5261 }
5262 else
5263 {
5264 GenerateContextLostErrorOnCurrentGlobalContext();
5265 }
5266 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5267 }
5268
GL_TexCoord2sv(const GLshort * v)5269 void GL_APIENTRY GL_TexCoord2sv(const GLshort *v)
5270 {
5271 Context *context = GetValidGlobalContext();
5272 EVENT(context, GLTexCoord2sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5273 (uintptr_t)v);
5274
5275 if (context)
5276 {
5277 SCOPED_SHARE_CONTEXT_LOCK(context);
5278 bool isCallValid =
5279 (context->skipValidation() ||
5280 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5281 context->getMutableErrorSetForValidation(),
5282 angle::EntryPoint::GLTexCoord2sv) &&
5283 ValidateTexCoord2sv(context, angle::EntryPoint::GLTexCoord2sv, v)));
5284 if (isCallValid)
5285 {
5286 context->texCoord2sv(v);
5287 }
5288 ANGLE_CAPTURE_GL(TexCoord2sv, isCallValid, context, v);
5289 }
5290 else
5291 {
5292 GenerateContextLostErrorOnCurrentGlobalContext();
5293 }
5294 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5295 }
5296
GL_TexCoord3d(GLdouble s,GLdouble t,GLdouble r)5297 void GL_APIENTRY GL_TexCoord3d(GLdouble s, GLdouble t, GLdouble r)
5298 {
5299 Context *context = GetValidGlobalContext();
5300 EVENT(context, GLTexCoord3d, "context = %d, s = %f, t = %f, r = %f", CID(context), s, t, r);
5301
5302 if (context)
5303 {
5304 SCOPED_SHARE_CONTEXT_LOCK(context);
5305 bool isCallValid =
5306 (context->skipValidation() ||
5307 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5308 context->getMutableErrorSetForValidation(),
5309 angle::EntryPoint::GLTexCoord3d) &&
5310 ValidateTexCoord3d(context, angle::EntryPoint::GLTexCoord3d, s, t, r)));
5311 if (isCallValid)
5312 {
5313 context->texCoord3d(s, t, r);
5314 }
5315 ANGLE_CAPTURE_GL(TexCoord3d, isCallValid, context, s, t, r);
5316 }
5317 else
5318 {
5319 GenerateContextLostErrorOnCurrentGlobalContext();
5320 }
5321 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5322 }
5323
GL_TexCoord3dv(const GLdouble * v)5324 void GL_APIENTRY GL_TexCoord3dv(const GLdouble *v)
5325 {
5326 Context *context = GetValidGlobalContext();
5327 EVENT(context, GLTexCoord3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5328 (uintptr_t)v);
5329
5330 if (context)
5331 {
5332 SCOPED_SHARE_CONTEXT_LOCK(context);
5333 bool isCallValid =
5334 (context->skipValidation() ||
5335 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5336 context->getMutableErrorSetForValidation(),
5337 angle::EntryPoint::GLTexCoord3dv) &&
5338 ValidateTexCoord3dv(context, angle::EntryPoint::GLTexCoord3dv, v)));
5339 if (isCallValid)
5340 {
5341 context->texCoord3dv(v);
5342 }
5343 ANGLE_CAPTURE_GL(TexCoord3dv, isCallValid, context, v);
5344 }
5345 else
5346 {
5347 GenerateContextLostErrorOnCurrentGlobalContext();
5348 }
5349 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5350 }
5351
GL_TexCoord3f(GLfloat s,GLfloat t,GLfloat r)5352 void GL_APIENTRY GL_TexCoord3f(GLfloat s, GLfloat t, GLfloat r)
5353 {
5354 Context *context = GetValidGlobalContext();
5355 EVENT(context, GLTexCoord3f, "context = %d, s = %f, t = %f, r = %f", CID(context), s, t, r);
5356
5357 if (context)
5358 {
5359 SCOPED_SHARE_CONTEXT_LOCK(context);
5360 bool isCallValid =
5361 (context->skipValidation() ||
5362 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5363 context->getMutableErrorSetForValidation(),
5364 angle::EntryPoint::GLTexCoord3f) &&
5365 ValidateTexCoord3f(context, angle::EntryPoint::GLTexCoord3f, s, t, r)));
5366 if (isCallValid)
5367 {
5368 context->texCoord3f(s, t, r);
5369 }
5370 ANGLE_CAPTURE_GL(TexCoord3f, isCallValid, context, s, t, r);
5371 }
5372 else
5373 {
5374 GenerateContextLostErrorOnCurrentGlobalContext();
5375 }
5376 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5377 }
5378
GL_TexCoord3fv(const GLfloat * v)5379 void GL_APIENTRY GL_TexCoord3fv(const GLfloat *v)
5380 {
5381 Context *context = GetValidGlobalContext();
5382 EVENT(context, GLTexCoord3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5383 (uintptr_t)v);
5384
5385 if (context)
5386 {
5387 SCOPED_SHARE_CONTEXT_LOCK(context);
5388 bool isCallValid =
5389 (context->skipValidation() ||
5390 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5391 context->getMutableErrorSetForValidation(),
5392 angle::EntryPoint::GLTexCoord3fv) &&
5393 ValidateTexCoord3fv(context, angle::EntryPoint::GLTexCoord3fv, v)));
5394 if (isCallValid)
5395 {
5396 context->texCoord3fv(v);
5397 }
5398 ANGLE_CAPTURE_GL(TexCoord3fv, isCallValid, context, v);
5399 }
5400 else
5401 {
5402 GenerateContextLostErrorOnCurrentGlobalContext();
5403 }
5404 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5405 }
5406
GL_TexCoord3i(GLint s,GLint t,GLint r)5407 void GL_APIENTRY GL_TexCoord3i(GLint s, GLint t, GLint r)
5408 {
5409 Context *context = GetValidGlobalContext();
5410 EVENT(context, GLTexCoord3i, "context = %d, s = %d, t = %d, r = %d", CID(context), s, t, r);
5411
5412 if (context)
5413 {
5414 SCOPED_SHARE_CONTEXT_LOCK(context);
5415 bool isCallValid =
5416 (context->skipValidation() ||
5417 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5418 context->getMutableErrorSetForValidation(),
5419 angle::EntryPoint::GLTexCoord3i) &&
5420 ValidateTexCoord3i(context, angle::EntryPoint::GLTexCoord3i, s, t, r)));
5421 if (isCallValid)
5422 {
5423 context->texCoord3i(s, t, r);
5424 }
5425 ANGLE_CAPTURE_GL(TexCoord3i, isCallValid, context, s, t, r);
5426 }
5427 else
5428 {
5429 GenerateContextLostErrorOnCurrentGlobalContext();
5430 }
5431 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5432 }
5433
GL_TexCoord3iv(const GLint * v)5434 void GL_APIENTRY GL_TexCoord3iv(const GLint *v)
5435 {
5436 Context *context = GetValidGlobalContext();
5437 EVENT(context, GLTexCoord3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5438 (uintptr_t)v);
5439
5440 if (context)
5441 {
5442 SCOPED_SHARE_CONTEXT_LOCK(context);
5443 bool isCallValid =
5444 (context->skipValidation() ||
5445 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5446 context->getMutableErrorSetForValidation(),
5447 angle::EntryPoint::GLTexCoord3iv) &&
5448 ValidateTexCoord3iv(context, angle::EntryPoint::GLTexCoord3iv, v)));
5449 if (isCallValid)
5450 {
5451 context->texCoord3iv(v);
5452 }
5453 ANGLE_CAPTURE_GL(TexCoord3iv, isCallValid, context, v);
5454 }
5455 else
5456 {
5457 GenerateContextLostErrorOnCurrentGlobalContext();
5458 }
5459 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5460 }
5461
GL_TexCoord3s(GLshort s,GLshort t,GLshort r)5462 void GL_APIENTRY GL_TexCoord3s(GLshort s, GLshort t, GLshort r)
5463 {
5464 Context *context = GetValidGlobalContext();
5465 EVENT(context, GLTexCoord3s, "context = %d, s = %d, t = %d, r = %d", CID(context), s, t, r);
5466
5467 if (context)
5468 {
5469 SCOPED_SHARE_CONTEXT_LOCK(context);
5470 bool isCallValid =
5471 (context->skipValidation() ||
5472 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5473 context->getMutableErrorSetForValidation(),
5474 angle::EntryPoint::GLTexCoord3s) &&
5475 ValidateTexCoord3s(context, angle::EntryPoint::GLTexCoord3s, s, t, r)));
5476 if (isCallValid)
5477 {
5478 context->texCoord3s(s, t, r);
5479 }
5480 ANGLE_CAPTURE_GL(TexCoord3s, isCallValid, context, s, t, r);
5481 }
5482 else
5483 {
5484 GenerateContextLostErrorOnCurrentGlobalContext();
5485 }
5486 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5487 }
5488
GL_TexCoord3sv(const GLshort * v)5489 void GL_APIENTRY GL_TexCoord3sv(const GLshort *v)
5490 {
5491 Context *context = GetValidGlobalContext();
5492 EVENT(context, GLTexCoord3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5493 (uintptr_t)v);
5494
5495 if (context)
5496 {
5497 SCOPED_SHARE_CONTEXT_LOCK(context);
5498 bool isCallValid =
5499 (context->skipValidation() ||
5500 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5501 context->getMutableErrorSetForValidation(),
5502 angle::EntryPoint::GLTexCoord3sv) &&
5503 ValidateTexCoord3sv(context, angle::EntryPoint::GLTexCoord3sv, v)));
5504 if (isCallValid)
5505 {
5506 context->texCoord3sv(v);
5507 }
5508 ANGLE_CAPTURE_GL(TexCoord3sv, isCallValid, context, v);
5509 }
5510 else
5511 {
5512 GenerateContextLostErrorOnCurrentGlobalContext();
5513 }
5514 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5515 }
5516
GL_TexCoord4d(GLdouble s,GLdouble t,GLdouble r,GLdouble q)5517 void GL_APIENTRY GL_TexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
5518 {
5519 Context *context = GetValidGlobalContext();
5520 EVENT(context, GLTexCoord4d, "context = %d, s = %f, t = %f, r = %f, q = %f", CID(context), s, t,
5521 r, q);
5522
5523 if (context)
5524 {
5525 SCOPED_SHARE_CONTEXT_LOCK(context);
5526 bool isCallValid =
5527 (context->skipValidation() ||
5528 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5529 context->getMutableErrorSetForValidation(),
5530 angle::EntryPoint::GLTexCoord4d) &&
5531 ValidateTexCoord4d(context, angle::EntryPoint::GLTexCoord4d, s, t, r, q)));
5532 if (isCallValid)
5533 {
5534 context->texCoord4d(s, t, r, q);
5535 }
5536 ANGLE_CAPTURE_GL(TexCoord4d, isCallValid, context, s, t, r, q);
5537 }
5538 else
5539 {
5540 GenerateContextLostErrorOnCurrentGlobalContext();
5541 }
5542 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5543 }
5544
GL_TexCoord4dv(const GLdouble * v)5545 void GL_APIENTRY GL_TexCoord4dv(const GLdouble *v)
5546 {
5547 Context *context = GetValidGlobalContext();
5548 EVENT(context, GLTexCoord4dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5549 (uintptr_t)v);
5550
5551 if (context)
5552 {
5553 SCOPED_SHARE_CONTEXT_LOCK(context);
5554 bool isCallValid =
5555 (context->skipValidation() ||
5556 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5557 context->getMutableErrorSetForValidation(),
5558 angle::EntryPoint::GLTexCoord4dv) &&
5559 ValidateTexCoord4dv(context, angle::EntryPoint::GLTexCoord4dv, v)));
5560 if (isCallValid)
5561 {
5562 context->texCoord4dv(v);
5563 }
5564 ANGLE_CAPTURE_GL(TexCoord4dv, isCallValid, context, v);
5565 }
5566 else
5567 {
5568 GenerateContextLostErrorOnCurrentGlobalContext();
5569 }
5570 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5571 }
5572
GL_TexCoord4f(GLfloat s,GLfloat t,GLfloat r,GLfloat q)5573 void GL_APIENTRY GL_TexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
5574 {
5575 Context *context = GetValidGlobalContext();
5576 EVENT(context, GLTexCoord4f, "context = %d, s = %f, t = %f, r = %f, q = %f", CID(context), s, t,
5577 r, q);
5578
5579 if (context)
5580 {
5581 SCOPED_SHARE_CONTEXT_LOCK(context);
5582 bool isCallValid =
5583 (context->skipValidation() ||
5584 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5585 context->getMutableErrorSetForValidation(),
5586 angle::EntryPoint::GLTexCoord4f) &&
5587 ValidateTexCoord4f(context, angle::EntryPoint::GLTexCoord4f, s, t, r, q)));
5588 if (isCallValid)
5589 {
5590 context->texCoord4f(s, t, r, q);
5591 }
5592 ANGLE_CAPTURE_GL(TexCoord4f, isCallValid, context, s, t, r, q);
5593 }
5594 else
5595 {
5596 GenerateContextLostErrorOnCurrentGlobalContext();
5597 }
5598 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5599 }
5600
GL_TexCoord4fv(const GLfloat * v)5601 void GL_APIENTRY GL_TexCoord4fv(const GLfloat *v)
5602 {
5603 Context *context = GetValidGlobalContext();
5604 EVENT(context, GLTexCoord4fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5605 (uintptr_t)v);
5606
5607 if (context)
5608 {
5609 SCOPED_SHARE_CONTEXT_LOCK(context);
5610 bool isCallValid =
5611 (context->skipValidation() ||
5612 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5613 context->getMutableErrorSetForValidation(),
5614 angle::EntryPoint::GLTexCoord4fv) &&
5615 ValidateTexCoord4fv(context, angle::EntryPoint::GLTexCoord4fv, v)));
5616 if (isCallValid)
5617 {
5618 context->texCoord4fv(v);
5619 }
5620 ANGLE_CAPTURE_GL(TexCoord4fv, isCallValid, context, v);
5621 }
5622 else
5623 {
5624 GenerateContextLostErrorOnCurrentGlobalContext();
5625 }
5626 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5627 }
5628
GL_TexCoord4i(GLint s,GLint t,GLint r,GLint q)5629 void GL_APIENTRY GL_TexCoord4i(GLint s, GLint t, GLint r, GLint q)
5630 {
5631 Context *context = GetValidGlobalContext();
5632 EVENT(context, GLTexCoord4i, "context = %d, s = %d, t = %d, r = %d, q = %d", CID(context), s, t,
5633 r, q);
5634
5635 if (context)
5636 {
5637 SCOPED_SHARE_CONTEXT_LOCK(context);
5638 bool isCallValid =
5639 (context->skipValidation() ||
5640 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5641 context->getMutableErrorSetForValidation(),
5642 angle::EntryPoint::GLTexCoord4i) &&
5643 ValidateTexCoord4i(context, angle::EntryPoint::GLTexCoord4i, s, t, r, q)));
5644 if (isCallValid)
5645 {
5646 context->texCoord4i(s, t, r, q);
5647 }
5648 ANGLE_CAPTURE_GL(TexCoord4i, isCallValid, context, s, t, r, q);
5649 }
5650 else
5651 {
5652 GenerateContextLostErrorOnCurrentGlobalContext();
5653 }
5654 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5655 }
5656
GL_TexCoord4iv(const GLint * v)5657 void GL_APIENTRY GL_TexCoord4iv(const GLint *v)
5658 {
5659 Context *context = GetValidGlobalContext();
5660 EVENT(context, GLTexCoord4iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5661 (uintptr_t)v);
5662
5663 if (context)
5664 {
5665 SCOPED_SHARE_CONTEXT_LOCK(context);
5666 bool isCallValid =
5667 (context->skipValidation() ||
5668 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5669 context->getMutableErrorSetForValidation(),
5670 angle::EntryPoint::GLTexCoord4iv) &&
5671 ValidateTexCoord4iv(context, angle::EntryPoint::GLTexCoord4iv, v)));
5672 if (isCallValid)
5673 {
5674 context->texCoord4iv(v);
5675 }
5676 ANGLE_CAPTURE_GL(TexCoord4iv, isCallValid, context, v);
5677 }
5678 else
5679 {
5680 GenerateContextLostErrorOnCurrentGlobalContext();
5681 }
5682 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5683 }
5684
GL_TexCoord4s(GLshort s,GLshort t,GLshort r,GLshort q)5685 void GL_APIENTRY GL_TexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
5686 {
5687 Context *context = GetValidGlobalContext();
5688 EVENT(context, GLTexCoord4s, "context = %d, s = %d, t = %d, r = %d, q = %d", CID(context), s, t,
5689 r, q);
5690
5691 if (context)
5692 {
5693 SCOPED_SHARE_CONTEXT_LOCK(context);
5694 bool isCallValid =
5695 (context->skipValidation() ||
5696 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5697 context->getMutableErrorSetForValidation(),
5698 angle::EntryPoint::GLTexCoord4s) &&
5699 ValidateTexCoord4s(context, angle::EntryPoint::GLTexCoord4s, s, t, r, q)));
5700 if (isCallValid)
5701 {
5702 context->texCoord4s(s, t, r, q);
5703 }
5704 ANGLE_CAPTURE_GL(TexCoord4s, isCallValid, context, s, t, r, q);
5705 }
5706 else
5707 {
5708 GenerateContextLostErrorOnCurrentGlobalContext();
5709 }
5710 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5711 }
5712
GL_TexCoord4sv(const GLshort * v)5713 void GL_APIENTRY GL_TexCoord4sv(const GLshort *v)
5714 {
5715 Context *context = GetValidGlobalContext();
5716 EVENT(context, GLTexCoord4sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
5717 (uintptr_t)v);
5718
5719 if (context)
5720 {
5721 SCOPED_SHARE_CONTEXT_LOCK(context);
5722 bool isCallValid =
5723 (context->skipValidation() ||
5724 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5725 context->getMutableErrorSetForValidation(),
5726 angle::EntryPoint::GLTexCoord4sv) &&
5727 ValidateTexCoord4sv(context, angle::EntryPoint::GLTexCoord4sv, v)));
5728 if (isCallValid)
5729 {
5730 context->texCoord4sv(v);
5731 }
5732 ANGLE_CAPTURE_GL(TexCoord4sv, isCallValid, context, v);
5733 }
5734 else
5735 {
5736 GenerateContextLostErrorOnCurrentGlobalContext();
5737 }
5738 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5739 }
5740
GL_TexGend(GLenum coord,GLenum pname,GLdouble param)5741 void GL_APIENTRY GL_TexGend(GLenum coord, GLenum pname, GLdouble param)
5742 {
5743 Context *context = GetValidGlobalContext();
5744 EVENT(context, GLTexGend, "context = %d, coord = %s, pname = %s, param = %f", CID(context),
5745 GLenumToString(BigGLEnum::TextureCoordName, coord),
5746 GLenumToString(BigGLEnum::TextureGenParameter, pname), param);
5747
5748 if (context)
5749 {
5750 SCOPED_SHARE_CONTEXT_LOCK(context);
5751 bool isCallValid =
5752 (context->skipValidation() ||
5753 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5754 context->getMutableErrorSetForValidation(),
5755 angle::EntryPoint::GLTexGend) &&
5756 ValidateTexGend(context, angle::EntryPoint::GLTexGend, coord, pname, param)));
5757 if (isCallValid)
5758 {
5759 context->texGend(coord, pname, param);
5760 }
5761 ANGLE_CAPTURE_GL(TexGend, isCallValid, context, coord, pname, param);
5762 }
5763 else
5764 {
5765 GenerateContextLostErrorOnCurrentGlobalContext();
5766 }
5767 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5768 }
5769
GL_TexGendv(GLenum coord,GLenum pname,const GLdouble * params)5770 void GL_APIENTRY GL_TexGendv(GLenum coord, GLenum pname, const GLdouble *params)
5771 {
5772 Context *context = GetValidGlobalContext();
5773 EVENT(context, GLTexGendv, "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "",
5774 CID(context), GLenumToString(BigGLEnum::TextureCoordName, coord),
5775 GLenumToString(BigGLEnum::TextureGenParameter, pname), (uintptr_t)params);
5776
5777 if (context)
5778 {
5779 SCOPED_SHARE_CONTEXT_LOCK(context);
5780 bool isCallValid =
5781 (context->skipValidation() ||
5782 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5783 context->getMutableErrorSetForValidation(),
5784 angle::EntryPoint::GLTexGendv) &&
5785 ValidateTexGendv(context, angle::EntryPoint::GLTexGendv, coord, pname, params)));
5786 if (isCallValid)
5787 {
5788 context->texGendv(coord, pname, params);
5789 }
5790 ANGLE_CAPTURE_GL(TexGendv, isCallValid, context, coord, pname, params);
5791 }
5792 else
5793 {
5794 GenerateContextLostErrorOnCurrentGlobalContext();
5795 }
5796 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5797 }
5798
GL_TexGenf(GLenum coord,GLenum pname,GLfloat param)5799 void GL_APIENTRY GL_TexGenf(GLenum coord, GLenum pname, GLfloat param)
5800 {
5801 Context *context = GetValidGlobalContext();
5802 EVENT(context, GLTexGenf, "context = %d, coord = %s, pname = %s, param = %f", CID(context),
5803 GLenumToString(BigGLEnum::TextureCoordName, coord),
5804 GLenumToString(BigGLEnum::TextureGenParameter, pname), param);
5805
5806 if (context)
5807 {
5808 SCOPED_SHARE_CONTEXT_LOCK(context);
5809 bool isCallValid =
5810 (context->skipValidation() ||
5811 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5812 context->getMutableErrorSetForValidation(),
5813 angle::EntryPoint::GLTexGenf) &&
5814 ValidateTexGenf(context, angle::EntryPoint::GLTexGenf, coord, pname, param)));
5815 if (isCallValid)
5816 {
5817 context->texGenf(coord, pname, param);
5818 }
5819 ANGLE_CAPTURE_GL(TexGenf, isCallValid, context, coord, pname, param);
5820 }
5821 else
5822 {
5823 GenerateContextLostErrorOnCurrentGlobalContext();
5824 }
5825 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5826 }
5827
GL_TexGenfv(GLenum coord,GLenum pname,const GLfloat * params)5828 void GL_APIENTRY GL_TexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
5829 {
5830 Context *context = GetValidGlobalContext();
5831 EVENT(context, GLTexGenfv, "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "",
5832 CID(context), GLenumToString(BigGLEnum::TextureCoordName, coord),
5833 GLenumToString(BigGLEnum::TextureGenParameter, pname), (uintptr_t)params);
5834
5835 if (context)
5836 {
5837 SCOPED_SHARE_CONTEXT_LOCK(context);
5838 bool isCallValid =
5839 (context->skipValidation() ||
5840 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5841 context->getMutableErrorSetForValidation(),
5842 angle::EntryPoint::GLTexGenfv) &&
5843 ValidateTexGenfv(context, angle::EntryPoint::GLTexGenfv, coord, pname, params)));
5844 if (isCallValid)
5845 {
5846 context->texGenfv(coord, pname, params);
5847 }
5848 ANGLE_CAPTURE_GL(TexGenfv, isCallValid, context, coord, pname, params);
5849 }
5850 else
5851 {
5852 GenerateContextLostErrorOnCurrentGlobalContext();
5853 }
5854 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5855 }
5856
GL_TexGeni(GLenum coord,GLenum pname,GLint param)5857 void GL_APIENTRY GL_TexGeni(GLenum coord, GLenum pname, GLint param)
5858 {
5859 Context *context = GetValidGlobalContext();
5860 EVENT(context, GLTexGeni, "context = %d, coord = %s, pname = %s, param = %d", CID(context),
5861 GLenumToString(BigGLEnum::TextureCoordName, coord),
5862 GLenumToString(BigGLEnum::TextureGenParameter, pname), param);
5863
5864 if (context)
5865 {
5866 SCOPED_SHARE_CONTEXT_LOCK(context);
5867 bool isCallValid =
5868 (context->skipValidation() ||
5869 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5870 context->getMutableErrorSetForValidation(),
5871 angle::EntryPoint::GLTexGeni) &&
5872 ValidateTexGeni(context, angle::EntryPoint::GLTexGeni, coord, pname, param)));
5873 if (isCallValid)
5874 {
5875 context->texGeni(coord, pname, param);
5876 }
5877 ANGLE_CAPTURE_GL(TexGeni, isCallValid, context, coord, pname, param);
5878 }
5879 else
5880 {
5881 GenerateContextLostErrorOnCurrentGlobalContext();
5882 }
5883 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5884 }
5885
GL_TexGeniv(GLenum coord,GLenum pname,const GLint * params)5886 void GL_APIENTRY GL_TexGeniv(GLenum coord, GLenum pname, const GLint *params)
5887 {
5888 Context *context = GetValidGlobalContext();
5889 EVENT(context, GLTexGeniv, "context = %d, coord = %s, pname = %s, params = 0x%016" PRIxPTR "",
5890 CID(context), GLenumToString(BigGLEnum::TextureCoordName, coord),
5891 GLenumToString(BigGLEnum::TextureGenParameter, pname), (uintptr_t)params);
5892
5893 if (context)
5894 {
5895 SCOPED_SHARE_CONTEXT_LOCK(context);
5896 bool isCallValid =
5897 (context->skipValidation() ||
5898 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5899 context->getMutableErrorSetForValidation(),
5900 angle::EntryPoint::GLTexGeniv) &&
5901 ValidateTexGeniv(context, angle::EntryPoint::GLTexGeniv, coord, pname, params)));
5902 if (isCallValid)
5903 {
5904 context->texGeniv(coord, pname, params);
5905 }
5906 ANGLE_CAPTURE_GL(TexGeniv, isCallValid, context, coord, pname, params);
5907 }
5908 else
5909 {
5910 GenerateContextLostErrorOnCurrentGlobalContext();
5911 }
5912 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5913 }
5914
GL_TexImage1D(GLenum target,GLint level,GLint internalformat,GLsizei width,GLint border,GLenum format,GLenum type,const void * pixels)5915 void GL_APIENTRY GL_TexImage1D(GLenum target,
5916 GLint level,
5917 GLint internalformat,
5918 GLsizei width,
5919 GLint border,
5920 GLenum format,
5921 GLenum type,
5922 const void *pixels)
5923 {
5924 Context *context = GetValidGlobalContext();
5925 EVENT(context, GLTexImage1D,
5926 "context = %d, target = %s, level = %d, internalformat = %d, width = %d, border = %d, "
5927 "format = %s, type = %s, pixels = 0x%016" PRIxPTR "",
5928 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level, internalformat,
5929 width, border, GLenumToString(BigGLEnum::PixelFormat, format),
5930 GLenumToString(BigGLEnum::PixelType, type), (uintptr_t)pixels);
5931
5932 if (context)
5933 {
5934 SCOPED_SHARE_CONTEXT_LOCK(context);
5935 bool isCallValid =
5936 (context->skipValidation() ||
5937 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5938 context->getMutableErrorSetForValidation(),
5939 angle::EntryPoint::GLTexImage1D) &&
5940 ValidateTexImage1D(context, angle::EntryPoint::GLTexImage1D, target, level,
5941 internalformat, width, border, format, type, pixels)));
5942 if (isCallValid)
5943 {
5944 context->texImage1D(target, level, internalformat, width, border, format, type, pixels);
5945 }
5946 ANGLE_CAPTURE_GL(TexImage1D, isCallValid, context, target, level, internalformat, width,
5947 border, format, type, pixels);
5948 }
5949 else
5950 {
5951 GenerateContextLostErrorOnCurrentGlobalContext();
5952 }
5953 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5954 }
5955
GL_Translated(GLdouble x,GLdouble y,GLdouble z)5956 void GL_APIENTRY GL_Translated(GLdouble x, GLdouble y, GLdouble z)
5957 {
5958 Context *context = GetValidGlobalContext();
5959 EVENT(context, GLTranslated, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
5960
5961 if (context)
5962 {
5963 SCOPED_SHARE_CONTEXT_LOCK(context);
5964 bool isCallValid =
5965 (context->skipValidation() ||
5966 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5967 context->getMutableErrorSetForValidation(),
5968 angle::EntryPoint::GLTranslated) &&
5969 ValidateTranslated(context, angle::EntryPoint::GLTranslated, x, y, z)));
5970 if (isCallValid)
5971 {
5972 context->translated(x, y, z);
5973 }
5974 ANGLE_CAPTURE_GL(Translated, isCallValid, context, x, y, z);
5975 }
5976 else
5977 {
5978 GenerateContextLostErrorOnCurrentGlobalContext();
5979 }
5980 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
5981 }
5982
GL_Vertex2d(GLdouble x,GLdouble y)5983 void GL_APIENTRY GL_Vertex2d(GLdouble x, GLdouble y)
5984 {
5985 Context *context = GetValidGlobalContext();
5986 EVENT(context, GLVertex2d, "context = %d, x = %f, y = %f", CID(context), x, y);
5987
5988 if (context)
5989 {
5990 SCOPED_SHARE_CONTEXT_LOCK(context);
5991 bool isCallValid =
5992 (context->skipValidation() ||
5993 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
5994 context->getMutableErrorSetForValidation(),
5995 angle::EntryPoint::GLVertex2d) &&
5996 ValidateVertex2d(context, angle::EntryPoint::GLVertex2d, x, y)));
5997 if (isCallValid)
5998 {
5999 context->vertex2d(x, y);
6000 }
6001 ANGLE_CAPTURE_GL(Vertex2d, isCallValid, context, x, y);
6002 }
6003 else
6004 {
6005 GenerateContextLostErrorOnCurrentGlobalContext();
6006 }
6007 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6008 }
6009
GL_Vertex2dv(const GLdouble * v)6010 void GL_APIENTRY GL_Vertex2dv(const GLdouble *v)
6011 {
6012 Context *context = GetValidGlobalContext();
6013 EVENT(context, GLVertex2dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6014
6015 if (context)
6016 {
6017 SCOPED_SHARE_CONTEXT_LOCK(context);
6018 bool isCallValid =
6019 (context->skipValidation() ||
6020 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6021 context->getMutableErrorSetForValidation(),
6022 angle::EntryPoint::GLVertex2dv) &&
6023 ValidateVertex2dv(context, angle::EntryPoint::GLVertex2dv, v)));
6024 if (isCallValid)
6025 {
6026 context->vertex2dv(v);
6027 }
6028 ANGLE_CAPTURE_GL(Vertex2dv, isCallValid, context, v);
6029 }
6030 else
6031 {
6032 GenerateContextLostErrorOnCurrentGlobalContext();
6033 }
6034 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6035 }
6036
GL_Vertex2f(GLfloat x,GLfloat y)6037 void GL_APIENTRY GL_Vertex2f(GLfloat x, GLfloat y)
6038 {
6039 Context *context = GetValidGlobalContext();
6040 EVENT(context, GLVertex2f, "context = %d, x = %f, y = %f", CID(context), x, y);
6041
6042 if (context)
6043 {
6044 SCOPED_SHARE_CONTEXT_LOCK(context);
6045 bool isCallValid =
6046 (context->skipValidation() ||
6047 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6048 context->getMutableErrorSetForValidation(),
6049 angle::EntryPoint::GLVertex2f) &&
6050 ValidateVertex2f(context, angle::EntryPoint::GLVertex2f, x, y)));
6051 if (isCallValid)
6052 {
6053 context->vertex2f(x, y);
6054 }
6055 ANGLE_CAPTURE_GL(Vertex2f, isCallValid, context, x, y);
6056 }
6057 else
6058 {
6059 GenerateContextLostErrorOnCurrentGlobalContext();
6060 }
6061 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6062 }
6063
GL_Vertex2fv(const GLfloat * v)6064 void GL_APIENTRY GL_Vertex2fv(const GLfloat *v)
6065 {
6066 Context *context = GetValidGlobalContext();
6067 EVENT(context, GLVertex2fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6068
6069 if (context)
6070 {
6071 SCOPED_SHARE_CONTEXT_LOCK(context);
6072 bool isCallValid =
6073 (context->skipValidation() ||
6074 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6075 context->getMutableErrorSetForValidation(),
6076 angle::EntryPoint::GLVertex2fv) &&
6077 ValidateVertex2fv(context, angle::EntryPoint::GLVertex2fv, v)));
6078 if (isCallValid)
6079 {
6080 context->vertex2fv(v);
6081 }
6082 ANGLE_CAPTURE_GL(Vertex2fv, isCallValid, context, v);
6083 }
6084 else
6085 {
6086 GenerateContextLostErrorOnCurrentGlobalContext();
6087 }
6088 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6089 }
6090
GL_Vertex2i(GLint x,GLint y)6091 void GL_APIENTRY GL_Vertex2i(GLint x, GLint y)
6092 {
6093 Context *context = GetValidGlobalContext();
6094 EVENT(context, GLVertex2i, "context = %d, x = %d, y = %d", CID(context), x, y);
6095
6096 if (context)
6097 {
6098 SCOPED_SHARE_CONTEXT_LOCK(context);
6099 bool isCallValid =
6100 (context->skipValidation() ||
6101 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6102 context->getMutableErrorSetForValidation(),
6103 angle::EntryPoint::GLVertex2i) &&
6104 ValidateVertex2i(context, angle::EntryPoint::GLVertex2i, x, y)));
6105 if (isCallValid)
6106 {
6107 context->vertex2i(x, y);
6108 }
6109 ANGLE_CAPTURE_GL(Vertex2i, isCallValid, context, x, y);
6110 }
6111 else
6112 {
6113 GenerateContextLostErrorOnCurrentGlobalContext();
6114 }
6115 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6116 }
6117
GL_Vertex2iv(const GLint * v)6118 void GL_APIENTRY GL_Vertex2iv(const GLint *v)
6119 {
6120 Context *context = GetValidGlobalContext();
6121 EVENT(context, GLVertex2iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6122
6123 if (context)
6124 {
6125 SCOPED_SHARE_CONTEXT_LOCK(context);
6126 bool isCallValid =
6127 (context->skipValidation() ||
6128 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6129 context->getMutableErrorSetForValidation(),
6130 angle::EntryPoint::GLVertex2iv) &&
6131 ValidateVertex2iv(context, angle::EntryPoint::GLVertex2iv, v)));
6132 if (isCallValid)
6133 {
6134 context->vertex2iv(v);
6135 }
6136 ANGLE_CAPTURE_GL(Vertex2iv, isCallValid, context, v);
6137 }
6138 else
6139 {
6140 GenerateContextLostErrorOnCurrentGlobalContext();
6141 }
6142 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6143 }
6144
GL_Vertex2s(GLshort x,GLshort y)6145 void GL_APIENTRY GL_Vertex2s(GLshort x, GLshort y)
6146 {
6147 Context *context = GetValidGlobalContext();
6148 EVENT(context, GLVertex2s, "context = %d, x = %d, y = %d", CID(context), x, y);
6149
6150 if (context)
6151 {
6152 SCOPED_SHARE_CONTEXT_LOCK(context);
6153 bool isCallValid =
6154 (context->skipValidation() ||
6155 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6156 context->getMutableErrorSetForValidation(),
6157 angle::EntryPoint::GLVertex2s) &&
6158 ValidateVertex2s(context, angle::EntryPoint::GLVertex2s, x, y)));
6159 if (isCallValid)
6160 {
6161 context->vertex2s(x, y);
6162 }
6163 ANGLE_CAPTURE_GL(Vertex2s, isCallValid, context, x, y);
6164 }
6165 else
6166 {
6167 GenerateContextLostErrorOnCurrentGlobalContext();
6168 }
6169 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6170 }
6171
GL_Vertex2sv(const GLshort * v)6172 void GL_APIENTRY GL_Vertex2sv(const GLshort *v)
6173 {
6174 Context *context = GetValidGlobalContext();
6175 EVENT(context, GLVertex2sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6176
6177 if (context)
6178 {
6179 SCOPED_SHARE_CONTEXT_LOCK(context);
6180 bool isCallValid =
6181 (context->skipValidation() ||
6182 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6183 context->getMutableErrorSetForValidation(),
6184 angle::EntryPoint::GLVertex2sv) &&
6185 ValidateVertex2sv(context, angle::EntryPoint::GLVertex2sv, v)));
6186 if (isCallValid)
6187 {
6188 context->vertex2sv(v);
6189 }
6190 ANGLE_CAPTURE_GL(Vertex2sv, isCallValid, context, v);
6191 }
6192 else
6193 {
6194 GenerateContextLostErrorOnCurrentGlobalContext();
6195 }
6196 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6197 }
6198
GL_Vertex3d(GLdouble x,GLdouble y,GLdouble z)6199 void GL_APIENTRY GL_Vertex3d(GLdouble x, GLdouble y, GLdouble z)
6200 {
6201 Context *context = GetValidGlobalContext();
6202 EVENT(context, GLVertex3d, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
6203
6204 if (context)
6205 {
6206 SCOPED_SHARE_CONTEXT_LOCK(context);
6207 bool isCallValid =
6208 (context->skipValidation() ||
6209 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6210 context->getMutableErrorSetForValidation(),
6211 angle::EntryPoint::GLVertex3d) &&
6212 ValidateVertex3d(context, angle::EntryPoint::GLVertex3d, x, y, z)));
6213 if (isCallValid)
6214 {
6215 context->vertex3d(x, y, z);
6216 }
6217 ANGLE_CAPTURE_GL(Vertex3d, isCallValid, context, x, y, z);
6218 }
6219 else
6220 {
6221 GenerateContextLostErrorOnCurrentGlobalContext();
6222 }
6223 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6224 }
6225
GL_Vertex3dv(const GLdouble * v)6226 void GL_APIENTRY GL_Vertex3dv(const GLdouble *v)
6227 {
6228 Context *context = GetValidGlobalContext();
6229 EVENT(context, GLVertex3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6230
6231 if (context)
6232 {
6233 SCOPED_SHARE_CONTEXT_LOCK(context);
6234 bool isCallValid =
6235 (context->skipValidation() ||
6236 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6237 context->getMutableErrorSetForValidation(),
6238 angle::EntryPoint::GLVertex3dv) &&
6239 ValidateVertex3dv(context, angle::EntryPoint::GLVertex3dv, v)));
6240 if (isCallValid)
6241 {
6242 context->vertex3dv(v);
6243 }
6244 ANGLE_CAPTURE_GL(Vertex3dv, isCallValid, context, v);
6245 }
6246 else
6247 {
6248 GenerateContextLostErrorOnCurrentGlobalContext();
6249 }
6250 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6251 }
6252
GL_Vertex3f(GLfloat x,GLfloat y,GLfloat z)6253 void GL_APIENTRY GL_Vertex3f(GLfloat x, GLfloat y, GLfloat z)
6254 {
6255 Context *context = GetValidGlobalContext();
6256 EVENT(context, GLVertex3f, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
6257
6258 if (context)
6259 {
6260 SCOPED_SHARE_CONTEXT_LOCK(context);
6261 bool isCallValid =
6262 (context->skipValidation() ||
6263 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6264 context->getMutableErrorSetForValidation(),
6265 angle::EntryPoint::GLVertex3f) &&
6266 ValidateVertex3f(context, angle::EntryPoint::GLVertex3f, x, y, z)));
6267 if (isCallValid)
6268 {
6269 context->vertex3f(x, y, z);
6270 }
6271 ANGLE_CAPTURE_GL(Vertex3f, isCallValid, context, x, y, z);
6272 }
6273 else
6274 {
6275 GenerateContextLostErrorOnCurrentGlobalContext();
6276 }
6277 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6278 }
6279
GL_Vertex3fv(const GLfloat * v)6280 void GL_APIENTRY GL_Vertex3fv(const GLfloat *v)
6281 {
6282 Context *context = GetValidGlobalContext();
6283 EVENT(context, GLVertex3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6284
6285 if (context)
6286 {
6287 SCOPED_SHARE_CONTEXT_LOCK(context);
6288 bool isCallValid =
6289 (context->skipValidation() ||
6290 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6291 context->getMutableErrorSetForValidation(),
6292 angle::EntryPoint::GLVertex3fv) &&
6293 ValidateVertex3fv(context, angle::EntryPoint::GLVertex3fv, v)));
6294 if (isCallValid)
6295 {
6296 context->vertex3fv(v);
6297 }
6298 ANGLE_CAPTURE_GL(Vertex3fv, isCallValid, context, v);
6299 }
6300 else
6301 {
6302 GenerateContextLostErrorOnCurrentGlobalContext();
6303 }
6304 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6305 }
6306
GL_Vertex3i(GLint x,GLint y,GLint z)6307 void GL_APIENTRY GL_Vertex3i(GLint x, GLint y, GLint z)
6308 {
6309 Context *context = GetValidGlobalContext();
6310 EVENT(context, GLVertex3i, "context = %d, x = %d, y = %d, z = %d", CID(context), x, y, z);
6311
6312 if (context)
6313 {
6314 SCOPED_SHARE_CONTEXT_LOCK(context);
6315 bool isCallValid =
6316 (context->skipValidation() ||
6317 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6318 context->getMutableErrorSetForValidation(),
6319 angle::EntryPoint::GLVertex3i) &&
6320 ValidateVertex3i(context, angle::EntryPoint::GLVertex3i, x, y, z)));
6321 if (isCallValid)
6322 {
6323 context->vertex3i(x, y, z);
6324 }
6325 ANGLE_CAPTURE_GL(Vertex3i, isCallValid, context, x, y, z);
6326 }
6327 else
6328 {
6329 GenerateContextLostErrorOnCurrentGlobalContext();
6330 }
6331 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6332 }
6333
GL_Vertex3iv(const GLint * v)6334 void GL_APIENTRY GL_Vertex3iv(const GLint *v)
6335 {
6336 Context *context = GetValidGlobalContext();
6337 EVENT(context, GLVertex3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6338
6339 if (context)
6340 {
6341 SCOPED_SHARE_CONTEXT_LOCK(context);
6342 bool isCallValid =
6343 (context->skipValidation() ||
6344 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6345 context->getMutableErrorSetForValidation(),
6346 angle::EntryPoint::GLVertex3iv) &&
6347 ValidateVertex3iv(context, angle::EntryPoint::GLVertex3iv, v)));
6348 if (isCallValid)
6349 {
6350 context->vertex3iv(v);
6351 }
6352 ANGLE_CAPTURE_GL(Vertex3iv, isCallValid, context, v);
6353 }
6354 else
6355 {
6356 GenerateContextLostErrorOnCurrentGlobalContext();
6357 }
6358 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6359 }
6360
GL_Vertex3s(GLshort x,GLshort y,GLshort z)6361 void GL_APIENTRY GL_Vertex3s(GLshort x, GLshort y, GLshort z)
6362 {
6363 Context *context = GetValidGlobalContext();
6364 EVENT(context, GLVertex3s, "context = %d, x = %d, y = %d, z = %d", CID(context), x, y, z);
6365
6366 if (context)
6367 {
6368 SCOPED_SHARE_CONTEXT_LOCK(context);
6369 bool isCallValid =
6370 (context->skipValidation() ||
6371 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6372 context->getMutableErrorSetForValidation(),
6373 angle::EntryPoint::GLVertex3s) &&
6374 ValidateVertex3s(context, angle::EntryPoint::GLVertex3s, x, y, z)));
6375 if (isCallValid)
6376 {
6377 context->vertex3s(x, y, z);
6378 }
6379 ANGLE_CAPTURE_GL(Vertex3s, isCallValid, context, x, y, z);
6380 }
6381 else
6382 {
6383 GenerateContextLostErrorOnCurrentGlobalContext();
6384 }
6385 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6386 }
6387
GL_Vertex3sv(const GLshort * v)6388 void GL_APIENTRY GL_Vertex3sv(const GLshort *v)
6389 {
6390 Context *context = GetValidGlobalContext();
6391 EVENT(context, GLVertex3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6392
6393 if (context)
6394 {
6395 SCOPED_SHARE_CONTEXT_LOCK(context);
6396 bool isCallValid =
6397 (context->skipValidation() ||
6398 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6399 context->getMutableErrorSetForValidation(),
6400 angle::EntryPoint::GLVertex3sv) &&
6401 ValidateVertex3sv(context, angle::EntryPoint::GLVertex3sv, v)));
6402 if (isCallValid)
6403 {
6404 context->vertex3sv(v);
6405 }
6406 ANGLE_CAPTURE_GL(Vertex3sv, isCallValid, context, v);
6407 }
6408 else
6409 {
6410 GenerateContextLostErrorOnCurrentGlobalContext();
6411 }
6412 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6413 }
6414
GL_Vertex4d(GLdouble x,GLdouble y,GLdouble z,GLdouble w)6415 void GL_APIENTRY GL_Vertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
6416 {
6417 Context *context = GetValidGlobalContext();
6418 EVENT(context, GLVertex4d, "context = %d, x = %f, y = %f, z = %f, w = %f", CID(context), x, y,
6419 z, w);
6420
6421 if (context)
6422 {
6423 SCOPED_SHARE_CONTEXT_LOCK(context);
6424 bool isCallValid =
6425 (context->skipValidation() ||
6426 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6427 context->getMutableErrorSetForValidation(),
6428 angle::EntryPoint::GLVertex4d) &&
6429 ValidateVertex4d(context, angle::EntryPoint::GLVertex4d, x, y, z, w)));
6430 if (isCallValid)
6431 {
6432 context->vertex4d(x, y, z, w);
6433 }
6434 ANGLE_CAPTURE_GL(Vertex4d, isCallValid, context, x, y, z, w);
6435 }
6436 else
6437 {
6438 GenerateContextLostErrorOnCurrentGlobalContext();
6439 }
6440 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6441 }
6442
GL_Vertex4dv(const GLdouble * v)6443 void GL_APIENTRY GL_Vertex4dv(const GLdouble *v)
6444 {
6445 Context *context = GetValidGlobalContext();
6446 EVENT(context, GLVertex4dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6447
6448 if (context)
6449 {
6450 SCOPED_SHARE_CONTEXT_LOCK(context);
6451 bool isCallValid =
6452 (context->skipValidation() ||
6453 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6454 context->getMutableErrorSetForValidation(),
6455 angle::EntryPoint::GLVertex4dv) &&
6456 ValidateVertex4dv(context, angle::EntryPoint::GLVertex4dv, v)));
6457 if (isCallValid)
6458 {
6459 context->vertex4dv(v);
6460 }
6461 ANGLE_CAPTURE_GL(Vertex4dv, isCallValid, context, v);
6462 }
6463 else
6464 {
6465 GenerateContextLostErrorOnCurrentGlobalContext();
6466 }
6467 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6468 }
6469
GL_Vertex4f(GLfloat x,GLfloat y,GLfloat z,GLfloat w)6470 void GL_APIENTRY GL_Vertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
6471 {
6472 Context *context = GetValidGlobalContext();
6473 EVENT(context, GLVertex4f, "context = %d, x = %f, y = %f, z = %f, w = %f", CID(context), x, y,
6474 z, w);
6475
6476 if (context)
6477 {
6478 SCOPED_SHARE_CONTEXT_LOCK(context);
6479 bool isCallValid =
6480 (context->skipValidation() ||
6481 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6482 context->getMutableErrorSetForValidation(),
6483 angle::EntryPoint::GLVertex4f) &&
6484 ValidateVertex4f(context, angle::EntryPoint::GLVertex4f, x, y, z, w)));
6485 if (isCallValid)
6486 {
6487 context->vertex4f(x, y, z, w);
6488 }
6489 ANGLE_CAPTURE_GL(Vertex4f, isCallValid, context, x, y, z, w);
6490 }
6491 else
6492 {
6493 GenerateContextLostErrorOnCurrentGlobalContext();
6494 }
6495 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6496 }
6497
GL_Vertex4fv(const GLfloat * v)6498 void GL_APIENTRY GL_Vertex4fv(const GLfloat *v)
6499 {
6500 Context *context = GetValidGlobalContext();
6501 EVENT(context, GLVertex4fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6502
6503 if (context)
6504 {
6505 SCOPED_SHARE_CONTEXT_LOCK(context);
6506 bool isCallValid =
6507 (context->skipValidation() ||
6508 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6509 context->getMutableErrorSetForValidation(),
6510 angle::EntryPoint::GLVertex4fv) &&
6511 ValidateVertex4fv(context, angle::EntryPoint::GLVertex4fv, v)));
6512 if (isCallValid)
6513 {
6514 context->vertex4fv(v);
6515 }
6516 ANGLE_CAPTURE_GL(Vertex4fv, isCallValid, context, v);
6517 }
6518 else
6519 {
6520 GenerateContextLostErrorOnCurrentGlobalContext();
6521 }
6522 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6523 }
6524
GL_Vertex4i(GLint x,GLint y,GLint z,GLint w)6525 void GL_APIENTRY GL_Vertex4i(GLint x, GLint y, GLint z, GLint w)
6526 {
6527 Context *context = GetValidGlobalContext();
6528 EVENT(context, GLVertex4i, "context = %d, x = %d, y = %d, z = %d, w = %d", CID(context), x, y,
6529 z, w);
6530
6531 if (context)
6532 {
6533 SCOPED_SHARE_CONTEXT_LOCK(context);
6534 bool isCallValid =
6535 (context->skipValidation() ||
6536 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6537 context->getMutableErrorSetForValidation(),
6538 angle::EntryPoint::GLVertex4i) &&
6539 ValidateVertex4i(context, angle::EntryPoint::GLVertex4i, x, y, z, w)));
6540 if (isCallValid)
6541 {
6542 context->vertex4i(x, y, z, w);
6543 }
6544 ANGLE_CAPTURE_GL(Vertex4i, isCallValid, context, x, y, z, w);
6545 }
6546 else
6547 {
6548 GenerateContextLostErrorOnCurrentGlobalContext();
6549 }
6550 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6551 }
6552
GL_Vertex4iv(const GLint * v)6553 void GL_APIENTRY GL_Vertex4iv(const GLint *v)
6554 {
6555 Context *context = GetValidGlobalContext();
6556 EVENT(context, GLVertex4iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6557
6558 if (context)
6559 {
6560 SCOPED_SHARE_CONTEXT_LOCK(context);
6561 bool isCallValid =
6562 (context->skipValidation() ||
6563 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6564 context->getMutableErrorSetForValidation(),
6565 angle::EntryPoint::GLVertex4iv) &&
6566 ValidateVertex4iv(context, angle::EntryPoint::GLVertex4iv, v)));
6567 if (isCallValid)
6568 {
6569 context->vertex4iv(v);
6570 }
6571 ANGLE_CAPTURE_GL(Vertex4iv, isCallValid, context, v);
6572 }
6573 else
6574 {
6575 GenerateContextLostErrorOnCurrentGlobalContext();
6576 }
6577 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6578 }
6579
GL_Vertex4s(GLshort x,GLshort y,GLshort z,GLshort w)6580 void GL_APIENTRY GL_Vertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
6581 {
6582 Context *context = GetValidGlobalContext();
6583 EVENT(context, GLVertex4s, "context = %d, x = %d, y = %d, z = %d, w = %d", CID(context), x, y,
6584 z, w);
6585
6586 if (context)
6587 {
6588 SCOPED_SHARE_CONTEXT_LOCK(context);
6589 bool isCallValid =
6590 (context->skipValidation() ||
6591 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6592 context->getMutableErrorSetForValidation(),
6593 angle::EntryPoint::GLVertex4s) &&
6594 ValidateVertex4s(context, angle::EntryPoint::GLVertex4s, x, y, z, w)));
6595 if (isCallValid)
6596 {
6597 context->vertex4s(x, y, z, w);
6598 }
6599 ANGLE_CAPTURE_GL(Vertex4s, isCallValid, context, x, y, z, w);
6600 }
6601 else
6602 {
6603 GenerateContextLostErrorOnCurrentGlobalContext();
6604 }
6605 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6606 }
6607
GL_Vertex4sv(const GLshort * v)6608 void GL_APIENTRY GL_Vertex4sv(const GLshort *v)
6609 {
6610 Context *context = GetValidGlobalContext();
6611 EVENT(context, GLVertex4sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context), (uintptr_t)v);
6612
6613 if (context)
6614 {
6615 SCOPED_SHARE_CONTEXT_LOCK(context);
6616 bool isCallValid =
6617 (context->skipValidation() ||
6618 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6619 context->getMutableErrorSetForValidation(),
6620 angle::EntryPoint::GLVertex4sv) &&
6621 ValidateVertex4sv(context, angle::EntryPoint::GLVertex4sv, v)));
6622 if (isCallValid)
6623 {
6624 context->vertex4sv(v);
6625 }
6626 ANGLE_CAPTURE_GL(Vertex4sv, isCallValid, context, v);
6627 }
6628 else
6629 {
6630 GenerateContextLostErrorOnCurrentGlobalContext();
6631 }
6632 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6633 }
6634
6635 // GL 1.1
GL_AreTexturesResident(GLsizei n,const GLuint * textures,GLboolean * residences)6636 GLboolean GL_APIENTRY GL_AreTexturesResident(GLsizei n,
6637 const GLuint *textures,
6638 GLboolean *residences)
6639 {
6640 Context *context = GetValidGlobalContext();
6641 EVENT(context, GLAreTexturesResident,
6642 "context = %d, n = %d, textures = 0x%016" PRIxPTR ", residences = 0x%016" PRIxPTR "",
6643 CID(context), n, (uintptr_t)textures, (uintptr_t)residences);
6644
6645 GLboolean returnValue;
6646 if (context)
6647 {
6648 SCOPED_SHARE_CONTEXT_LOCK(context);
6649 bool isCallValid =
6650 (context->skipValidation() ||
6651 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6652 context->getMutableErrorSetForValidation(),
6653 angle::EntryPoint::GLAreTexturesResident) &&
6654 ValidateAreTexturesResident(context, angle::EntryPoint::GLAreTexturesResident, n,
6655 textures, residences)));
6656 if (isCallValid)
6657 {
6658 returnValue = context->areTexturesResident(n, textures, residences);
6659 }
6660 else
6661 {
6662 returnValue =
6663 GetDefaultReturnValue<angle::EntryPoint::GLAreTexturesResident, GLboolean>();
6664 }
6665 ANGLE_CAPTURE_GL(AreTexturesResident, isCallValid, context, n, textures, residences,
6666 returnValue);
6667 }
6668 else
6669 {
6670 GenerateContextLostErrorOnCurrentGlobalContext();
6671 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLAreTexturesResident, GLboolean>();
6672 }
6673 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6674 return returnValue;
6675 }
6676
GL_ArrayElement(GLint i)6677 void GL_APIENTRY GL_ArrayElement(GLint i)
6678 {
6679 Context *context = GetValidGlobalContext();
6680 EVENT(context, GLArrayElement, "context = %d, i = %d", CID(context), i);
6681
6682 if (context)
6683 {
6684 SCOPED_SHARE_CONTEXT_LOCK(context);
6685 bool isCallValid =
6686 (context->skipValidation() ||
6687 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6688 context->getMutableErrorSetForValidation(),
6689 angle::EntryPoint::GLArrayElement) &&
6690 ValidateArrayElement(context, angle::EntryPoint::GLArrayElement, i)));
6691 if (isCallValid)
6692 {
6693 context->arrayElement(i);
6694 }
6695 ANGLE_CAPTURE_GL(ArrayElement, isCallValid, context, i);
6696 }
6697 else
6698 {
6699 GenerateContextLostErrorOnCurrentGlobalContext();
6700 }
6701 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6702 }
6703
GL_CopyTexImage1D(GLenum target,GLint level,GLenum internalformat,GLint x,GLint y,GLsizei width,GLint border)6704 void GL_APIENTRY GL_CopyTexImage1D(GLenum target,
6705 GLint level,
6706 GLenum internalformat,
6707 GLint x,
6708 GLint y,
6709 GLsizei width,
6710 GLint border)
6711 {
6712 Context *context = GetValidGlobalContext();
6713 EVENT(context, GLCopyTexImage1D,
6714 "context = %d, target = %s, level = %d, internalformat = %s, x = %d, y = %d, width = %d, "
6715 "border = %d",
6716 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level,
6717 GLenumToString(BigGLEnum::InternalFormat, internalformat), x, y, width, border);
6718
6719 if (context)
6720 {
6721 SCOPED_SHARE_CONTEXT_LOCK(context);
6722 bool isCallValid =
6723 (context->skipValidation() ||
6724 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6725 context->getMutableErrorSetForValidation(),
6726 angle::EntryPoint::GLCopyTexImage1D) &&
6727 ValidateCopyTexImage1D(context, angle::EntryPoint::GLCopyTexImage1D, target, level,
6728 internalformat, x, y, width, border)));
6729 if (isCallValid)
6730 {
6731 context->copyTexImage1D(target, level, internalformat, x, y, width, border);
6732 }
6733 ANGLE_CAPTURE_GL(CopyTexImage1D, isCallValid, context, target, level, internalformat, x, y,
6734 width, border);
6735 }
6736 else
6737 {
6738 GenerateContextLostErrorOnCurrentGlobalContext();
6739 }
6740 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6741 }
6742
6743 void GL_APIENTRY
GL_CopyTexSubImage1D(GLenum target,GLint level,GLint xoffset,GLint x,GLint y,GLsizei width)6744 GL_CopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
6745 {
6746 Context *context = GetValidGlobalContext();
6747 EVENT(context, GLCopyTexSubImage1D,
6748 "context = %d, target = %s, level = %d, xoffset = %d, x = %d, y = %d, width = %d",
6749 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level, xoffset, x, y,
6750 width);
6751
6752 if (context)
6753 {
6754 SCOPED_SHARE_CONTEXT_LOCK(context);
6755 bool isCallValid =
6756 (context->skipValidation() ||
6757 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6758 context->getMutableErrorSetForValidation(),
6759 angle::EntryPoint::GLCopyTexSubImage1D) &&
6760 ValidateCopyTexSubImage1D(context, angle::EntryPoint::GLCopyTexSubImage1D, target,
6761 level, xoffset, x, y, width)));
6762 if (isCallValid)
6763 {
6764 context->copyTexSubImage1D(target, level, xoffset, x, y, width);
6765 }
6766 ANGLE_CAPTURE_GL(CopyTexSubImage1D, isCallValid, context, target, level, xoffset, x, y,
6767 width);
6768 }
6769 else
6770 {
6771 GenerateContextLostErrorOnCurrentGlobalContext();
6772 }
6773 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6774 }
6775
GL_EdgeFlagPointer(GLsizei stride,const void * pointer)6776 void GL_APIENTRY GL_EdgeFlagPointer(GLsizei stride, const void *pointer)
6777 {
6778 Context *context = GetValidGlobalContext();
6779 EVENT(context, GLEdgeFlagPointer, "context = %d, stride = %d, pointer = 0x%016" PRIxPTR "",
6780 CID(context), stride, (uintptr_t)pointer);
6781
6782 if (context)
6783 {
6784 SCOPED_SHARE_CONTEXT_LOCK(context);
6785 bool isCallValid =
6786 (context->skipValidation() ||
6787 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6788 context->getMutableErrorSetForValidation(),
6789 angle::EntryPoint::GLEdgeFlagPointer) &&
6790 ValidateEdgeFlagPointer(context, angle::EntryPoint::GLEdgeFlagPointer, stride,
6791 pointer)));
6792 if (isCallValid)
6793 {
6794 context->edgeFlagPointer(stride, pointer);
6795 }
6796 ANGLE_CAPTURE_GL(EdgeFlagPointer, isCallValid, context, stride, pointer);
6797 }
6798 else
6799 {
6800 GenerateContextLostErrorOnCurrentGlobalContext();
6801 }
6802 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6803 }
6804
GL_IndexPointer(GLenum type,GLsizei stride,const void * pointer)6805 void GL_APIENTRY GL_IndexPointer(GLenum type, GLsizei stride, const void *pointer)
6806 {
6807 Context *context = GetValidGlobalContext();
6808 EVENT(context, GLIndexPointer,
6809 "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context),
6810 GLenumToString(BigGLEnum::IndexPointerType, type), stride, (uintptr_t)pointer);
6811
6812 if (context)
6813 {
6814 SCOPED_SHARE_CONTEXT_LOCK(context);
6815 bool isCallValid =
6816 (context->skipValidation() ||
6817 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6818 context->getMutableErrorSetForValidation(),
6819 angle::EntryPoint::GLIndexPointer) &&
6820 ValidateIndexPointer(context, angle::EntryPoint::GLIndexPointer, type, stride,
6821 pointer)));
6822 if (isCallValid)
6823 {
6824 context->indexPointer(type, stride, pointer);
6825 }
6826 ANGLE_CAPTURE_GL(IndexPointer, isCallValid, context, type, stride, pointer);
6827 }
6828 else
6829 {
6830 GenerateContextLostErrorOnCurrentGlobalContext();
6831 }
6832 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6833 }
6834
GL_Indexub(GLubyte c)6835 void GL_APIENTRY GL_Indexub(GLubyte c)
6836 {
6837 Context *context = GetValidGlobalContext();
6838 EVENT(context, GLIndexub, "context = %d, c = %d", CID(context), c);
6839
6840 if (context)
6841 {
6842 SCOPED_SHARE_CONTEXT_LOCK(context);
6843 bool isCallValid =
6844 (context->skipValidation() ||
6845 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6846 context->getMutableErrorSetForValidation(),
6847 angle::EntryPoint::GLIndexub) &&
6848 ValidateIndexub(context, angle::EntryPoint::GLIndexub, c)));
6849 if (isCallValid)
6850 {
6851 context->indexub(c);
6852 }
6853 ANGLE_CAPTURE_GL(Indexub, isCallValid, context, c);
6854 }
6855 else
6856 {
6857 GenerateContextLostErrorOnCurrentGlobalContext();
6858 }
6859 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6860 }
6861
GL_Indexubv(const GLubyte * c)6862 void GL_APIENTRY GL_Indexubv(const GLubyte *c)
6863 {
6864 Context *context = GetValidGlobalContext();
6865 EVENT(context, GLIndexubv, "context = %d, c = 0x%016" PRIxPTR "", CID(context), (uintptr_t)c);
6866
6867 if (context)
6868 {
6869 SCOPED_SHARE_CONTEXT_LOCK(context);
6870 bool isCallValid =
6871 (context->skipValidation() ||
6872 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6873 context->getMutableErrorSetForValidation(),
6874 angle::EntryPoint::GLIndexubv) &&
6875 ValidateIndexubv(context, angle::EntryPoint::GLIndexubv, c)));
6876 if (isCallValid)
6877 {
6878 context->indexubv(c);
6879 }
6880 ANGLE_CAPTURE_GL(Indexubv, isCallValid, context, c);
6881 }
6882 else
6883 {
6884 GenerateContextLostErrorOnCurrentGlobalContext();
6885 }
6886 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6887 }
6888
GL_InterleavedArrays(GLenum format,GLsizei stride,const void * pointer)6889 void GL_APIENTRY GL_InterleavedArrays(GLenum format, GLsizei stride, const void *pointer)
6890 {
6891 Context *context = GetValidGlobalContext();
6892 EVENT(context, GLInterleavedArrays,
6893 "context = %d, format = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context),
6894 GLenumToString(BigGLEnum::InterleavedArrayFormat, format), stride, (uintptr_t)pointer);
6895
6896 if (context)
6897 {
6898 SCOPED_SHARE_CONTEXT_LOCK(context);
6899 bool isCallValid =
6900 (context->skipValidation() ||
6901 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6902 context->getMutableErrorSetForValidation(),
6903 angle::EntryPoint::GLInterleavedArrays) &&
6904 ValidateInterleavedArrays(context, angle::EntryPoint::GLInterleavedArrays, format,
6905 stride, pointer)));
6906 if (isCallValid)
6907 {
6908 context->interleavedArrays(format, stride, pointer);
6909 }
6910 ANGLE_CAPTURE_GL(InterleavedArrays, isCallValid, context, format, stride, pointer);
6911 }
6912 else
6913 {
6914 GenerateContextLostErrorOnCurrentGlobalContext();
6915 }
6916 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6917 }
6918
GL_PopClientAttrib()6919 void GL_APIENTRY GL_PopClientAttrib()
6920 {
6921 Context *context = GetValidGlobalContext();
6922 EVENT(context, GLPopClientAttrib, "context = %d", CID(context));
6923
6924 if (context)
6925 {
6926 SCOPED_SHARE_CONTEXT_LOCK(context);
6927 bool isCallValid =
6928 (context->skipValidation() ||
6929 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6930 context->getMutableErrorSetForValidation(),
6931 angle::EntryPoint::GLPopClientAttrib) &&
6932 ValidatePopClientAttrib(context, angle::EntryPoint::GLPopClientAttrib)));
6933 if (isCallValid)
6934 {
6935 context->popClientAttrib();
6936 }
6937 ANGLE_CAPTURE_GL(PopClientAttrib, isCallValid, context);
6938 }
6939 else
6940 {
6941 GenerateContextLostErrorOnCurrentGlobalContext();
6942 }
6943 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6944 }
6945
GL_PrioritizeTextures(GLsizei n,const GLuint * textures,const GLfloat * priorities)6946 void GL_APIENTRY GL_PrioritizeTextures(GLsizei n, const GLuint *textures, const GLfloat *priorities)
6947 {
6948 Context *context = GetValidGlobalContext();
6949 EVENT(context, GLPrioritizeTextures,
6950 "context = %d, n = %d, textures = 0x%016" PRIxPTR ", priorities = 0x%016" PRIxPTR "",
6951 CID(context), n, (uintptr_t)textures, (uintptr_t)priorities);
6952
6953 if (context)
6954 {
6955 SCOPED_SHARE_CONTEXT_LOCK(context);
6956 bool isCallValid =
6957 (context->skipValidation() ||
6958 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6959 context->getMutableErrorSetForValidation(),
6960 angle::EntryPoint::GLPrioritizeTextures) &&
6961 ValidatePrioritizeTextures(context, angle::EntryPoint::GLPrioritizeTextures, n,
6962 textures, priorities)));
6963 if (isCallValid)
6964 {
6965 context->prioritizeTextures(n, textures, priorities);
6966 }
6967 ANGLE_CAPTURE_GL(PrioritizeTextures, isCallValid, context, n, textures, priorities);
6968 }
6969 else
6970 {
6971 GenerateContextLostErrorOnCurrentGlobalContext();
6972 }
6973 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
6974 }
6975
GL_PushClientAttrib(GLbitfield mask)6976 void GL_APIENTRY GL_PushClientAttrib(GLbitfield mask)
6977 {
6978 Context *context = GetValidGlobalContext();
6979 EVENT(context, GLPushClientAttrib, "context = %d, mask = %s", CID(context),
6980 GLbitfieldToString(BigGLEnum::ClientAttribMask, mask).c_str());
6981
6982 if (context)
6983 {
6984 SCOPED_SHARE_CONTEXT_LOCK(context);
6985 bool isCallValid =
6986 (context->skipValidation() ||
6987 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
6988 context->getMutableErrorSetForValidation(),
6989 angle::EntryPoint::GLPushClientAttrib) &&
6990 ValidatePushClientAttrib(context, angle::EntryPoint::GLPushClientAttrib, mask)));
6991 if (isCallValid)
6992 {
6993 context->pushClientAttrib(mask);
6994 }
6995 ANGLE_CAPTURE_GL(PushClientAttrib, isCallValid, context, mask);
6996 }
6997 else
6998 {
6999 GenerateContextLostErrorOnCurrentGlobalContext();
7000 }
7001 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7002 }
7003
GL_TexSubImage1D(GLenum target,GLint level,GLint xoffset,GLsizei width,GLenum format,GLenum type,const void * pixels)7004 void GL_APIENTRY GL_TexSubImage1D(GLenum target,
7005 GLint level,
7006 GLint xoffset,
7007 GLsizei width,
7008 GLenum format,
7009 GLenum type,
7010 const void *pixels)
7011 {
7012 Context *context = GetValidGlobalContext();
7013 EVENT(context, GLTexSubImage1D,
7014 "context = %d, target = %s, level = %d, xoffset = %d, width = %d, format = %s, type = "
7015 "%s, pixels = 0x%016" PRIxPTR "",
7016 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level, xoffset, width,
7017 GLenumToString(BigGLEnum::PixelFormat, format),
7018 GLenumToString(BigGLEnum::PixelType, type), (uintptr_t)pixels);
7019
7020 if (context)
7021 {
7022 SCOPED_SHARE_CONTEXT_LOCK(context);
7023 bool isCallValid =
7024 (context->skipValidation() ||
7025 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7026 context->getMutableErrorSetForValidation(),
7027 angle::EntryPoint::GLTexSubImage1D) &&
7028 ValidateTexSubImage1D(context, angle::EntryPoint::GLTexSubImage1D, target, level,
7029 xoffset, width, format, type, pixels)));
7030 if (isCallValid)
7031 {
7032 context->texSubImage1D(target, level, xoffset, width, format, type, pixels);
7033 }
7034 ANGLE_CAPTURE_GL(TexSubImage1D, isCallValid, context, target, level, xoffset, width, format,
7035 type, pixels);
7036 }
7037 else
7038 {
7039 GenerateContextLostErrorOnCurrentGlobalContext();
7040 }
7041 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7042 }
7043
7044 // GL 1.2
7045
7046 // GL 1.3
GL_CompressedTexImage1D(GLenum target,GLint level,GLenum internalformat,GLsizei width,GLint border,GLsizei imageSize,const void * data)7047 void GL_APIENTRY GL_CompressedTexImage1D(GLenum target,
7048 GLint level,
7049 GLenum internalformat,
7050 GLsizei width,
7051 GLint border,
7052 GLsizei imageSize,
7053 const void *data)
7054 {
7055 Context *context = GetValidGlobalContext();
7056 EVENT(context, GLCompressedTexImage1D,
7057 "context = %d, target = %s, level = %d, internalformat = %s, width = %d, border = %d, "
7058 "imageSize = %d, data = 0x%016" PRIxPTR "",
7059 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level,
7060 GLenumToString(BigGLEnum::InternalFormat, internalformat), width, border, imageSize,
7061 (uintptr_t)data);
7062
7063 if (context)
7064 {
7065 SCOPED_SHARE_CONTEXT_LOCK(context);
7066 bool isCallValid =
7067 (context->skipValidation() ||
7068 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7069 context->getMutableErrorSetForValidation(),
7070 angle::EntryPoint::GLCompressedTexImage1D) &&
7071 ValidateCompressedTexImage1D(context, angle::EntryPoint::GLCompressedTexImage1D,
7072 target, level, internalformat, width, border, imageSize,
7073 data)));
7074 if (isCallValid)
7075 {
7076 context->compressedTexImage1D(target, level, internalformat, width, border, imageSize,
7077 data);
7078 }
7079 ANGLE_CAPTURE_GL(CompressedTexImage1D, isCallValid, context, target, level, internalformat,
7080 width, border, imageSize, data);
7081 }
7082 else
7083 {
7084 GenerateContextLostErrorOnCurrentGlobalContext();
7085 }
7086 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7087 }
7088
GL_CompressedTexSubImage1D(GLenum target,GLint level,GLint xoffset,GLsizei width,GLenum format,GLsizei imageSize,const void * data)7089 void GL_APIENTRY GL_CompressedTexSubImage1D(GLenum target,
7090 GLint level,
7091 GLint xoffset,
7092 GLsizei width,
7093 GLenum format,
7094 GLsizei imageSize,
7095 const void *data)
7096 {
7097 Context *context = GetValidGlobalContext();
7098 EVENT(context, GLCompressedTexSubImage1D,
7099 "context = %d, target = %s, level = %d, xoffset = %d, width = %d, format = %s, imageSize "
7100 "= %d, data = 0x%016" PRIxPTR "",
7101 CID(context), GLenumToString(BigGLEnum::TextureTarget, target), level, xoffset, width,
7102 GLenumToString(BigGLEnum::InternalFormat, format), imageSize, (uintptr_t)data);
7103
7104 if (context)
7105 {
7106 SCOPED_SHARE_CONTEXT_LOCK(context);
7107 bool isCallValid =
7108 (context->skipValidation() ||
7109 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7110 context->getMutableErrorSetForValidation(),
7111 angle::EntryPoint::GLCompressedTexSubImage1D) &&
7112 ValidateCompressedTexSubImage1D(context, angle::EntryPoint::GLCompressedTexSubImage1D,
7113 target, level, xoffset, width, format, imageSize,
7114 data)));
7115 if (isCallValid)
7116 {
7117 context->compressedTexSubImage1D(target, level, xoffset, width, format, imageSize,
7118 data);
7119 }
7120 ANGLE_CAPTURE_GL(CompressedTexSubImage1D, isCallValid, context, target, level, xoffset,
7121 width, format, imageSize, data);
7122 }
7123 else
7124 {
7125 GenerateContextLostErrorOnCurrentGlobalContext();
7126 }
7127 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7128 }
7129
GL_GetCompressedTexImage(GLenum target,GLint level,void * img)7130 void GL_APIENTRY GL_GetCompressedTexImage(GLenum target, GLint level, void *img)
7131 {
7132 Context *context = GetValidGlobalContext();
7133 EVENT(context, GLGetCompressedTexImage,
7134 "context = %d, target = %s, level = %d, img = 0x%016" PRIxPTR "", CID(context),
7135 GLenumToString(BigGLEnum::TextureTarget, target), level, (uintptr_t)img);
7136
7137 if (context)
7138 {
7139 TextureTarget targetPacked = PackParam<TextureTarget>(target);
7140 SCOPED_SHARE_CONTEXT_LOCK(context);
7141 bool isCallValid =
7142 (context->skipValidation() ||
7143 ValidateGetCompressedTexImage(context, angle::EntryPoint::GLGetCompressedTexImage,
7144 targetPacked, level, img));
7145 if (isCallValid)
7146 {
7147 context->getCompressedTexImage(targetPacked, level, img);
7148 }
7149 ANGLE_CAPTURE_GL(GetCompressedTexImage, isCallValid, context, targetPacked, level, img);
7150 }
7151 else
7152 {
7153 GenerateContextLostErrorOnCurrentGlobalContext();
7154 }
7155 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7156 }
7157
GL_LoadTransposeMatrixd(const GLdouble * m)7158 void GL_APIENTRY GL_LoadTransposeMatrixd(const GLdouble *m)
7159 {
7160 Context *context = GetValidGlobalContext();
7161 EVENT(context, GLLoadTransposeMatrixd, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
7162 (uintptr_t)m);
7163
7164 if (context)
7165 {
7166 SCOPED_SHARE_CONTEXT_LOCK(context);
7167 bool isCallValid =
7168 (context->skipValidation() ||
7169 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7170 context->getMutableErrorSetForValidation(),
7171 angle::EntryPoint::GLLoadTransposeMatrixd) &&
7172 ValidateLoadTransposeMatrixd(context, angle::EntryPoint::GLLoadTransposeMatrixd, m)));
7173 if (isCallValid)
7174 {
7175 context->loadTransposeMatrixd(m);
7176 }
7177 ANGLE_CAPTURE_GL(LoadTransposeMatrixd, isCallValid, context, m);
7178 }
7179 else
7180 {
7181 GenerateContextLostErrorOnCurrentGlobalContext();
7182 }
7183 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7184 }
7185
GL_LoadTransposeMatrixf(const GLfloat * m)7186 void GL_APIENTRY GL_LoadTransposeMatrixf(const GLfloat *m)
7187 {
7188 Context *context = GetValidGlobalContext();
7189 EVENT(context, GLLoadTransposeMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
7190 (uintptr_t)m);
7191
7192 if (context)
7193 {
7194 SCOPED_SHARE_CONTEXT_LOCK(context);
7195 bool isCallValid =
7196 (context->skipValidation() ||
7197 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7198 context->getMutableErrorSetForValidation(),
7199 angle::EntryPoint::GLLoadTransposeMatrixf) &&
7200 ValidateLoadTransposeMatrixf(context, angle::EntryPoint::GLLoadTransposeMatrixf, m)));
7201 if (isCallValid)
7202 {
7203 context->loadTransposeMatrixf(m);
7204 }
7205 ANGLE_CAPTURE_GL(LoadTransposeMatrixf, isCallValid, context, m);
7206 }
7207 else
7208 {
7209 GenerateContextLostErrorOnCurrentGlobalContext();
7210 }
7211 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7212 }
7213
GL_MultTransposeMatrixd(const GLdouble * m)7214 void GL_APIENTRY GL_MultTransposeMatrixd(const GLdouble *m)
7215 {
7216 Context *context = GetValidGlobalContext();
7217 EVENT(context, GLMultTransposeMatrixd, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
7218 (uintptr_t)m);
7219
7220 if (context)
7221 {
7222 SCOPED_SHARE_CONTEXT_LOCK(context);
7223 bool isCallValid =
7224 (context->skipValidation() ||
7225 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7226 context->getMutableErrorSetForValidation(),
7227 angle::EntryPoint::GLMultTransposeMatrixd) &&
7228 ValidateMultTransposeMatrixd(context, angle::EntryPoint::GLMultTransposeMatrixd, m)));
7229 if (isCallValid)
7230 {
7231 context->multTransposeMatrixd(m);
7232 }
7233 ANGLE_CAPTURE_GL(MultTransposeMatrixd, isCallValid, context, m);
7234 }
7235 else
7236 {
7237 GenerateContextLostErrorOnCurrentGlobalContext();
7238 }
7239 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7240 }
7241
GL_MultTransposeMatrixf(const GLfloat * m)7242 void GL_APIENTRY GL_MultTransposeMatrixf(const GLfloat *m)
7243 {
7244 Context *context = GetValidGlobalContext();
7245 EVENT(context, GLMultTransposeMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
7246 (uintptr_t)m);
7247
7248 if (context)
7249 {
7250 SCOPED_SHARE_CONTEXT_LOCK(context);
7251 bool isCallValid =
7252 (context->skipValidation() ||
7253 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7254 context->getMutableErrorSetForValidation(),
7255 angle::EntryPoint::GLMultTransposeMatrixf) &&
7256 ValidateMultTransposeMatrixf(context, angle::EntryPoint::GLMultTransposeMatrixf, m)));
7257 if (isCallValid)
7258 {
7259 context->multTransposeMatrixf(m);
7260 }
7261 ANGLE_CAPTURE_GL(MultTransposeMatrixf, isCallValid, context, m);
7262 }
7263 else
7264 {
7265 GenerateContextLostErrorOnCurrentGlobalContext();
7266 }
7267 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7268 }
7269
GL_MultiTexCoord1d(GLenum target,GLdouble s)7270 void GL_APIENTRY GL_MultiTexCoord1d(GLenum target, GLdouble s)
7271 {
7272 Context *context = GetValidGlobalContext();
7273 EVENT(context, GLMultiTexCoord1d, "context = %d, target = %s, s = %f", CID(context),
7274 GLenumToString(BigGLEnum::TextureUnit, target), s);
7275
7276 if (context)
7277 {
7278 SCOPED_SHARE_CONTEXT_LOCK(context);
7279 bool isCallValid =
7280 (context->skipValidation() ||
7281 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7282 context->getMutableErrorSetForValidation(),
7283 angle::EntryPoint::GLMultiTexCoord1d) &&
7284 ValidateMultiTexCoord1d(context, angle::EntryPoint::GLMultiTexCoord1d, target, s)));
7285 if (isCallValid)
7286 {
7287 context->multiTexCoord1d(target, s);
7288 }
7289 ANGLE_CAPTURE_GL(MultiTexCoord1d, isCallValid, context, target, s);
7290 }
7291 else
7292 {
7293 GenerateContextLostErrorOnCurrentGlobalContext();
7294 }
7295 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7296 }
7297
GL_MultiTexCoord1dv(GLenum target,const GLdouble * v)7298 void GL_APIENTRY GL_MultiTexCoord1dv(GLenum target, const GLdouble *v)
7299 {
7300 Context *context = GetValidGlobalContext();
7301 EVENT(context, GLMultiTexCoord1dv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7302 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7303
7304 if (context)
7305 {
7306 SCOPED_SHARE_CONTEXT_LOCK(context);
7307 bool isCallValid =
7308 (context->skipValidation() ||
7309 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7310 context->getMutableErrorSetForValidation(),
7311 angle::EntryPoint::GLMultiTexCoord1dv) &&
7312 ValidateMultiTexCoord1dv(context, angle::EntryPoint::GLMultiTexCoord1dv, target, v)));
7313 if (isCallValid)
7314 {
7315 context->multiTexCoord1dv(target, v);
7316 }
7317 ANGLE_CAPTURE_GL(MultiTexCoord1dv, isCallValid, context, target, v);
7318 }
7319 else
7320 {
7321 GenerateContextLostErrorOnCurrentGlobalContext();
7322 }
7323 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7324 }
7325
GL_MultiTexCoord1f(GLenum target,GLfloat s)7326 void GL_APIENTRY GL_MultiTexCoord1f(GLenum target, GLfloat s)
7327 {
7328 Context *context = GetValidGlobalContext();
7329 EVENT(context, GLMultiTexCoord1f, "context = %d, target = %s, s = %f", CID(context),
7330 GLenumToString(BigGLEnum::TextureUnit, target), s);
7331
7332 if (context)
7333 {
7334 SCOPED_SHARE_CONTEXT_LOCK(context);
7335 bool isCallValid =
7336 (context->skipValidation() ||
7337 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7338 context->getMutableErrorSetForValidation(),
7339 angle::EntryPoint::GLMultiTexCoord1f) &&
7340 ValidateMultiTexCoord1f(context, angle::EntryPoint::GLMultiTexCoord1f, target, s)));
7341 if (isCallValid)
7342 {
7343 context->multiTexCoord1f(target, s);
7344 }
7345 ANGLE_CAPTURE_GL(MultiTexCoord1f, isCallValid, context, target, s);
7346 }
7347 else
7348 {
7349 GenerateContextLostErrorOnCurrentGlobalContext();
7350 }
7351 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7352 }
7353
GL_MultiTexCoord1fv(GLenum target,const GLfloat * v)7354 void GL_APIENTRY GL_MultiTexCoord1fv(GLenum target, const GLfloat *v)
7355 {
7356 Context *context = GetValidGlobalContext();
7357 EVENT(context, GLMultiTexCoord1fv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7358 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7359
7360 if (context)
7361 {
7362 SCOPED_SHARE_CONTEXT_LOCK(context);
7363 bool isCallValid =
7364 (context->skipValidation() ||
7365 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7366 context->getMutableErrorSetForValidation(),
7367 angle::EntryPoint::GLMultiTexCoord1fv) &&
7368 ValidateMultiTexCoord1fv(context, angle::EntryPoint::GLMultiTexCoord1fv, target, v)));
7369 if (isCallValid)
7370 {
7371 context->multiTexCoord1fv(target, v);
7372 }
7373 ANGLE_CAPTURE_GL(MultiTexCoord1fv, isCallValid, context, target, v);
7374 }
7375 else
7376 {
7377 GenerateContextLostErrorOnCurrentGlobalContext();
7378 }
7379 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7380 }
7381
GL_MultiTexCoord1i(GLenum target,GLint s)7382 void GL_APIENTRY GL_MultiTexCoord1i(GLenum target, GLint s)
7383 {
7384 Context *context = GetValidGlobalContext();
7385 EVENT(context, GLMultiTexCoord1i, "context = %d, target = %s, s = %d", CID(context),
7386 GLenumToString(BigGLEnum::TextureUnit, target), s);
7387
7388 if (context)
7389 {
7390 SCOPED_SHARE_CONTEXT_LOCK(context);
7391 bool isCallValid =
7392 (context->skipValidation() ||
7393 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7394 context->getMutableErrorSetForValidation(),
7395 angle::EntryPoint::GLMultiTexCoord1i) &&
7396 ValidateMultiTexCoord1i(context, angle::EntryPoint::GLMultiTexCoord1i, target, s)));
7397 if (isCallValid)
7398 {
7399 context->multiTexCoord1i(target, s);
7400 }
7401 ANGLE_CAPTURE_GL(MultiTexCoord1i, isCallValid, context, target, s);
7402 }
7403 else
7404 {
7405 GenerateContextLostErrorOnCurrentGlobalContext();
7406 }
7407 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7408 }
7409
GL_MultiTexCoord1iv(GLenum target,const GLint * v)7410 void GL_APIENTRY GL_MultiTexCoord1iv(GLenum target, const GLint *v)
7411 {
7412 Context *context = GetValidGlobalContext();
7413 EVENT(context, GLMultiTexCoord1iv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7414 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7415
7416 if (context)
7417 {
7418 SCOPED_SHARE_CONTEXT_LOCK(context);
7419 bool isCallValid =
7420 (context->skipValidation() ||
7421 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7422 context->getMutableErrorSetForValidation(),
7423 angle::EntryPoint::GLMultiTexCoord1iv) &&
7424 ValidateMultiTexCoord1iv(context, angle::EntryPoint::GLMultiTexCoord1iv, target, v)));
7425 if (isCallValid)
7426 {
7427 context->multiTexCoord1iv(target, v);
7428 }
7429 ANGLE_CAPTURE_GL(MultiTexCoord1iv, isCallValid, context, target, v);
7430 }
7431 else
7432 {
7433 GenerateContextLostErrorOnCurrentGlobalContext();
7434 }
7435 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7436 }
7437
GL_MultiTexCoord1s(GLenum target,GLshort s)7438 void GL_APIENTRY GL_MultiTexCoord1s(GLenum target, GLshort s)
7439 {
7440 Context *context = GetValidGlobalContext();
7441 EVENT(context, GLMultiTexCoord1s, "context = %d, target = %s, s = %d", CID(context),
7442 GLenumToString(BigGLEnum::TextureUnit, target), s);
7443
7444 if (context)
7445 {
7446 SCOPED_SHARE_CONTEXT_LOCK(context);
7447 bool isCallValid =
7448 (context->skipValidation() ||
7449 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7450 context->getMutableErrorSetForValidation(),
7451 angle::EntryPoint::GLMultiTexCoord1s) &&
7452 ValidateMultiTexCoord1s(context, angle::EntryPoint::GLMultiTexCoord1s, target, s)));
7453 if (isCallValid)
7454 {
7455 context->multiTexCoord1s(target, s);
7456 }
7457 ANGLE_CAPTURE_GL(MultiTexCoord1s, isCallValid, context, target, s);
7458 }
7459 else
7460 {
7461 GenerateContextLostErrorOnCurrentGlobalContext();
7462 }
7463 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7464 }
7465
GL_MultiTexCoord1sv(GLenum target,const GLshort * v)7466 void GL_APIENTRY GL_MultiTexCoord1sv(GLenum target, const GLshort *v)
7467 {
7468 Context *context = GetValidGlobalContext();
7469 EVENT(context, GLMultiTexCoord1sv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7470 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7471
7472 if (context)
7473 {
7474 SCOPED_SHARE_CONTEXT_LOCK(context);
7475 bool isCallValid =
7476 (context->skipValidation() ||
7477 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7478 context->getMutableErrorSetForValidation(),
7479 angle::EntryPoint::GLMultiTexCoord1sv) &&
7480 ValidateMultiTexCoord1sv(context, angle::EntryPoint::GLMultiTexCoord1sv, target, v)));
7481 if (isCallValid)
7482 {
7483 context->multiTexCoord1sv(target, v);
7484 }
7485 ANGLE_CAPTURE_GL(MultiTexCoord1sv, isCallValid, context, target, v);
7486 }
7487 else
7488 {
7489 GenerateContextLostErrorOnCurrentGlobalContext();
7490 }
7491 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7492 }
7493
GL_MultiTexCoord2d(GLenum target,GLdouble s,GLdouble t)7494 void GL_APIENTRY GL_MultiTexCoord2d(GLenum target, GLdouble s, GLdouble t)
7495 {
7496 Context *context = GetValidGlobalContext();
7497 EVENT(context, GLMultiTexCoord2d, "context = %d, target = %s, s = %f, t = %f", CID(context),
7498 GLenumToString(BigGLEnum::TextureUnit, target), s, t);
7499
7500 if (context)
7501 {
7502 SCOPED_SHARE_CONTEXT_LOCK(context);
7503 bool isCallValid =
7504 (context->skipValidation() ||
7505 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7506 context->getMutableErrorSetForValidation(),
7507 angle::EntryPoint::GLMultiTexCoord2d) &&
7508 ValidateMultiTexCoord2d(context, angle::EntryPoint::GLMultiTexCoord2d, target, s,
7509 t)));
7510 if (isCallValid)
7511 {
7512 context->multiTexCoord2d(target, s, t);
7513 }
7514 ANGLE_CAPTURE_GL(MultiTexCoord2d, isCallValid, context, target, s, t);
7515 }
7516 else
7517 {
7518 GenerateContextLostErrorOnCurrentGlobalContext();
7519 }
7520 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7521 }
7522
GL_MultiTexCoord2dv(GLenum target,const GLdouble * v)7523 void GL_APIENTRY GL_MultiTexCoord2dv(GLenum target, const GLdouble *v)
7524 {
7525 Context *context = GetValidGlobalContext();
7526 EVENT(context, GLMultiTexCoord2dv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7527 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7528
7529 if (context)
7530 {
7531 SCOPED_SHARE_CONTEXT_LOCK(context);
7532 bool isCallValid =
7533 (context->skipValidation() ||
7534 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7535 context->getMutableErrorSetForValidation(),
7536 angle::EntryPoint::GLMultiTexCoord2dv) &&
7537 ValidateMultiTexCoord2dv(context, angle::EntryPoint::GLMultiTexCoord2dv, target, v)));
7538 if (isCallValid)
7539 {
7540 context->multiTexCoord2dv(target, v);
7541 }
7542 ANGLE_CAPTURE_GL(MultiTexCoord2dv, isCallValid, context, target, v);
7543 }
7544 else
7545 {
7546 GenerateContextLostErrorOnCurrentGlobalContext();
7547 }
7548 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7549 }
7550
GL_MultiTexCoord2f(GLenum target,GLfloat s,GLfloat t)7551 void GL_APIENTRY GL_MultiTexCoord2f(GLenum target, GLfloat s, GLfloat t)
7552 {
7553 Context *context = GetValidGlobalContext();
7554 EVENT(context, GLMultiTexCoord2f, "context = %d, target = %s, s = %f, t = %f", CID(context),
7555 GLenumToString(BigGLEnum::TextureUnit, target), s, t);
7556
7557 if (context)
7558 {
7559 SCOPED_SHARE_CONTEXT_LOCK(context);
7560 bool isCallValid =
7561 (context->skipValidation() ||
7562 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7563 context->getMutableErrorSetForValidation(),
7564 angle::EntryPoint::GLMultiTexCoord2f) &&
7565 ValidateMultiTexCoord2f(context, angle::EntryPoint::GLMultiTexCoord2f, target, s,
7566 t)));
7567 if (isCallValid)
7568 {
7569 context->multiTexCoord2f(target, s, t);
7570 }
7571 ANGLE_CAPTURE_GL(MultiTexCoord2f, isCallValid, context, target, s, t);
7572 }
7573 else
7574 {
7575 GenerateContextLostErrorOnCurrentGlobalContext();
7576 }
7577 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7578 }
7579
GL_MultiTexCoord2fv(GLenum target,const GLfloat * v)7580 void GL_APIENTRY GL_MultiTexCoord2fv(GLenum target, const GLfloat *v)
7581 {
7582 Context *context = GetValidGlobalContext();
7583 EVENT(context, GLMultiTexCoord2fv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7584 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7585
7586 if (context)
7587 {
7588 SCOPED_SHARE_CONTEXT_LOCK(context);
7589 bool isCallValid =
7590 (context->skipValidation() ||
7591 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7592 context->getMutableErrorSetForValidation(),
7593 angle::EntryPoint::GLMultiTexCoord2fv) &&
7594 ValidateMultiTexCoord2fv(context, angle::EntryPoint::GLMultiTexCoord2fv, target, v)));
7595 if (isCallValid)
7596 {
7597 context->multiTexCoord2fv(target, v);
7598 }
7599 ANGLE_CAPTURE_GL(MultiTexCoord2fv, isCallValid, context, target, v);
7600 }
7601 else
7602 {
7603 GenerateContextLostErrorOnCurrentGlobalContext();
7604 }
7605 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7606 }
7607
GL_MultiTexCoord2i(GLenum target,GLint s,GLint t)7608 void GL_APIENTRY GL_MultiTexCoord2i(GLenum target, GLint s, GLint t)
7609 {
7610 Context *context = GetValidGlobalContext();
7611 EVENT(context, GLMultiTexCoord2i, "context = %d, target = %s, s = %d, t = %d", CID(context),
7612 GLenumToString(BigGLEnum::TextureUnit, target), s, t);
7613
7614 if (context)
7615 {
7616 SCOPED_SHARE_CONTEXT_LOCK(context);
7617 bool isCallValid =
7618 (context->skipValidation() ||
7619 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7620 context->getMutableErrorSetForValidation(),
7621 angle::EntryPoint::GLMultiTexCoord2i) &&
7622 ValidateMultiTexCoord2i(context, angle::EntryPoint::GLMultiTexCoord2i, target, s,
7623 t)));
7624 if (isCallValid)
7625 {
7626 context->multiTexCoord2i(target, s, t);
7627 }
7628 ANGLE_CAPTURE_GL(MultiTexCoord2i, isCallValid, context, target, s, t);
7629 }
7630 else
7631 {
7632 GenerateContextLostErrorOnCurrentGlobalContext();
7633 }
7634 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7635 }
7636
GL_MultiTexCoord2iv(GLenum target,const GLint * v)7637 void GL_APIENTRY GL_MultiTexCoord2iv(GLenum target, const GLint *v)
7638 {
7639 Context *context = GetValidGlobalContext();
7640 EVENT(context, GLMultiTexCoord2iv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7641 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7642
7643 if (context)
7644 {
7645 SCOPED_SHARE_CONTEXT_LOCK(context);
7646 bool isCallValid =
7647 (context->skipValidation() ||
7648 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7649 context->getMutableErrorSetForValidation(),
7650 angle::EntryPoint::GLMultiTexCoord2iv) &&
7651 ValidateMultiTexCoord2iv(context, angle::EntryPoint::GLMultiTexCoord2iv, target, v)));
7652 if (isCallValid)
7653 {
7654 context->multiTexCoord2iv(target, v);
7655 }
7656 ANGLE_CAPTURE_GL(MultiTexCoord2iv, isCallValid, context, target, v);
7657 }
7658 else
7659 {
7660 GenerateContextLostErrorOnCurrentGlobalContext();
7661 }
7662 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7663 }
7664
GL_MultiTexCoord2s(GLenum target,GLshort s,GLshort t)7665 void GL_APIENTRY GL_MultiTexCoord2s(GLenum target, GLshort s, GLshort t)
7666 {
7667 Context *context = GetValidGlobalContext();
7668 EVENT(context, GLMultiTexCoord2s, "context = %d, target = %s, s = %d, t = %d", CID(context),
7669 GLenumToString(BigGLEnum::TextureUnit, target), s, t);
7670
7671 if (context)
7672 {
7673 SCOPED_SHARE_CONTEXT_LOCK(context);
7674 bool isCallValid =
7675 (context->skipValidation() ||
7676 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7677 context->getMutableErrorSetForValidation(),
7678 angle::EntryPoint::GLMultiTexCoord2s) &&
7679 ValidateMultiTexCoord2s(context, angle::EntryPoint::GLMultiTexCoord2s, target, s,
7680 t)));
7681 if (isCallValid)
7682 {
7683 context->multiTexCoord2s(target, s, t);
7684 }
7685 ANGLE_CAPTURE_GL(MultiTexCoord2s, isCallValid, context, target, s, t);
7686 }
7687 else
7688 {
7689 GenerateContextLostErrorOnCurrentGlobalContext();
7690 }
7691 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7692 }
7693
GL_MultiTexCoord2sv(GLenum target,const GLshort * v)7694 void GL_APIENTRY GL_MultiTexCoord2sv(GLenum target, const GLshort *v)
7695 {
7696 Context *context = GetValidGlobalContext();
7697 EVENT(context, GLMultiTexCoord2sv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7698 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7699
7700 if (context)
7701 {
7702 SCOPED_SHARE_CONTEXT_LOCK(context);
7703 bool isCallValid =
7704 (context->skipValidation() ||
7705 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7706 context->getMutableErrorSetForValidation(),
7707 angle::EntryPoint::GLMultiTexCoord2sv) &&
7708 ValidateMultiTexCoord2sv(context, angle::EntryPoint::GLMultiTexCoord2sv, target, v)));
7709 if (isCallValid)
7710 {
7711 context->multiTexCoord2sv(target, v);
7712 }
7713 ANGLE_CAPTURE_GL(MultiTexCoord2sv, isCallValid, context, target, v);
7714 }
7715 else
7716 {
7717 GenerateContextLostErrorOnCurrentGlobalContext();
7718 }
7719 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7720 }
7721
GL_MultiTexCoord3d(GLenum target,GLdouble s,GLdouble t,GLdouble r)7722 void GL_APIENTRY GL_MultiTexCoord3d(GLenum target, GLdouble s, GLdouble t, GLdouble r)
7723 {
7724 Context *context = GetValidGlobalContext();
7725 EVENT(context, GLMultiTexCoord3d, "context = %d, target = %s, s = %f, t = %f, r = %f",
7726 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r);
7727
7728 if (context)
7729 {
7730 SCOPED_SHARE_CONTEXT_LOCK(context);
7731 bool isCallValid =
7732 (context->skipValidation() ||
7733 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7734 context->getMutableErrorSetForValidation(),
7735 angle::EntryPoint::GLMultiTexCoord3d) &&
7736 ValidateMultiTexCoord3d(context, angle::EntryPoint::GLMultiTexCoord3d, target, s, t,
7737 r)));
7738 if (isCallValid)
7739 {
7740 context->multiTexCoord3d(target, s, t, r);
7741 }
7742 ANGLE_CAPTURE_GL(MultiTexCoord3d, isCallValid, context, target, s, t, r);
7743 }
7744 else
7745 {
7746 GenerateContextLostErrorOnCurrentGlobalContext();
7747 }
7748 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7749 }
7750
GL_MultiTexCoord3dv(GLenum target,const GLdouble * v)7751 void GL_APIENTRY GL_MultiTexCoord3dv(GLenum target, const GLdouble *v)
7752 {
7753 Context *context = GetValidGlobalContext();
7754 EVENT(context, GLMultiTexCoord3dv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7755 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7756
7757 if (context)
7758 {
7759 SCOPED_SHARE_CONTEXT_LOCK(context);
7760 bool isCallValid =
7761 (context->skipValidation() ||
7762 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7763 context->getMutableErrorSetForValidation(),
7764 angle::EntryPoint::GLMultiTexCoord3dv) &&
7765 ValidateMultiTexCoord3dv(context, angle::EntryPoint::GLMultiTexCoord3dv, target, v)));
7766 if (isCallValid)
7767 {
7768 context->multiTexCoord3dv(target, v);
7769 }
7770 ANGLE_CAPTURE_GL(MultiTexCoord3dv, isCallValid, context, target, v);
7771 }
7772 else
7773 {
7774 GenerateContextLostErrorOnCurrentGlobalContext();
7775 }
7776 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7777 }
7778
GL_MultiTexCoord3f(GLenum target,GLfloat s,GLfloat t,GLfloat r)7779 void GL_APIENTRY GL_MultiTexCoord3f(GLenum target, GLfloat s, GLfloat t, GLfloat r)
7780 {
7781 Context *context = GetValidGlobalContext();
7782 EVENT(context, GLMultiTexCoord3f, "context = %d, target = %s, s = %f, t = %f, r = %f",
7783 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r);
7784
7785 if (context)
7786 {
7787 SCOPED_SHARE_CONTEXT_LOCK(context);
7788 bool isCallValid =
7789 (context->skipValidation() ||
7790 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7791 context->getMutableErrorSetForValidation(),
7792 angle::EntryPoint::GLMultiTexCoord3f) &&
7793 ValidateMultiTexCoord3f(context, angle::EntryPoint::GLMultiTexCoord3f, target, s, t,
7794 r)));
7795 if (isCallValid)
7796 {
7797 context->multiTexCoord3f(target, s, t, r);
7798 }
7799 ANGLE_CAPTURE_GL(MultiTexCoord3f, isCallValid, context, target, s, t, r);
7800 }
7801 else
7802 {
7803 GenerateContextLostErrorOnCurrentGlobalContext();
7804 }
7805 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7806 }
7807
GL_MultiTexCoord3fv(GLenum target,const GLfloat * v)7808 void GL_APIENTRY GL_MultiTexCoord3fv(GLenum target, const GLfloat *v)
7809 {
7810 Context *context = GetValidGlobalContext();
7811 EVENT(context, GLMultiTexCoord3fv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7812 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7813
7814 if (context)
7815 {
7816 SCOPED_SHARE_CONTEXT_LOCK(context);
7817 bool isCallValid =
7818 (context->skipValidation() ||
7819 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7820 context->getMutableErrorSetForValidation(),
7821 angle::EntryPoint::GLMultiTexCoord3fv) &&
7822 ValidateMultiTexCoord3fv(context, angle::EntryPoint::GLMultiTexCoord3fv, target, v)));
7823 if (isCallValid)
7824 {
7825 context->multiTexCoord3fv(target, v);
7826 }
7827 ANGLE_CAPTURE_GL(MultiTexCoord3fv, isCallValid, context, target, v);
7828 }
7829 else
7830 {
7831 GenerateContextLostErrorOnCurrentGlobalContext();
7832 }
7833 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7834 }
7835
GL_MultiTexCoord3i(GLenum target,GLint s,GLint t,GLint r)7836 void GL_APIENTRY GL_MultiTexCoord3i(GLenum target, GLint s, GLint t, GLint r)
7837 {
7838 Context *context = GetValidGlobalContext();
7839 EVENT(context, GLMultiTexCoord3i, "context = %d, target = %s, s = %d, t = %d, r = %d",
7840 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r);
7841
7842 if (context)
7843 {
7844 SCOPED_SHARE_CONTEXT_LOCK(context);
7845 bool isCallValid =
7846 (context->skipValidation() ||
7847 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7848 context->getMutableErrorSetForValidation(),
7849 angle::EntryPoint::GLMultiTexCoord3i) &&
7850 ValidateMultiTexCoord3i(context, angle::EntryPoint::GLMultiTexCoord3i, target, s, t,
7851 r)));
7852 if (isCallValid)
7853 {
7854 context->multiTexCoord3i(target, s, t, r);
7855 }
7856 ANGLE_CAPTURE_GL(MultiTexCoord3i, isCallValid, context, target, s, t, r);
7857 }
7858 else
7859 {
7860 GenerateContextLostErrorOnCurrentGlobalContext();
7861 }
7862 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7863 }
7864
GL_MultiTexCoord3iv(GLenum target,const GLint * v)7865 void GL_APIENTRY GL_MultiTexCoord3iv(GLenum target, const GLint *v)
7866 {
7867 Context *context = GetValidGlobalContext();
7868 EVENT(context, GLMultiTexCoord3iv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7869 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7870
7871 if (context)
7872 {
7873 SCOPED_SHARE_CONTEXT_LOCK(context);
7874 bool isCallValid =
7875 (context->skipValidation() ||
7876 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7877 context->getMutableErrorSetForValidation(),
7878 angle::EntryPoint::GLMultiTexCoord3iv) &&
7879 ValidateMultiTexCoord3iv(context, angle::EntryPoint::GLMultiTexCoord3iv, target, v)));
7880 if (isCallValid)
7881 {
7882 context->multiTexCoord3iv(target, v);
7883 }
7884 ANGLE_CAPTURE_GL(MultiTexCoord3iv, isCallValid, context, target, v);
7885 }
7886 else
7887 {
7888 GenerateContextLostErrorOnCurrentGlobalContext();
7889 }
7890 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7891 }
7892
GL_MultiTexCoord3s(GLenum target,GLshort s,GLshort t,GLshort r)7893 void GL_APIENTRY GL_MultiTexCoord3s(GLenum target, GLshort s, GLshort t, GLshort r)
7894 {
7895 Context *context = GetValidGlobalContext();
7896 EVENT(context, GLMultiTexCoord3s, "context = %d, target = %s, s = %d, t = %d, r = %d",
7897 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r);
7898
7899 if (context)
7900 {
7901 SCOPED_SHARE_CONTEXT_LOCK(context);
7902 bool isCallValid =
7903 (context->skipValidation() ||
7904 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7905 context->getMutableErrorSetForValidation(),
7906 angle::EntryPoint::GLMultiTexCoord3s) &&
7907 ValidateMultiTexCoord3s(context, angle::EntryPoint::GLMultiTexCoord3s, target, s, t,
7908 r)));
7909 if (isCallValid)
7910 {
7911 context->multiTexCoord3s(target, s, t, r);
7912 }
7913 ANGLE_CAPTURE_GL(MultiTexCoord3s, isCallValid, context, target, s, t, r);
7914 }
7915 else
7916 {
7917 GenerateContextLostErrorOnCurrentGlobalContext();
7918 }
7919 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7920 }
7921
GL_MultiTexCoord3sv(GLenum target,const GLshort * v)7922 void GL_APIENTRY GL_MultiTexCoord3sv(GLenum target, const GLshort *v)
7923 {
7924 Context *context = GetValidGlobalContext();
7925 EVENT(context, GLMultiTexCoord3sv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7926 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7927
7928 if (context)
7929 {
7930 SCOPED_SHARE_CONTEXT_LOCK(context);
7931 bool isCallValid =
7932 (context->skipValidation() ||
7933 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7934 context->getMutableErrorSetForValidation(),
7935 angle::EntryPoint::GLMultiTexCoord3sv) &&
7936 ValidateMultiTexCoord3sv(context, angle::EntryPoint::GLMultiTexCoord3sv, target, v)));
7937 if (isCallValid)
7938 {
7939 context->multiTexCoord3sv(target, v);
7940 }
7941 ANGLE_CAPTURE_GL(MultiTexCoord3sv, isCallValid, context, target, v);
7942 }
7943 else
7944 {
7945 GenerateContextLostErrorOnCurrentGlobalContext();
7946 }
7947 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7948 }
7949
GL_MultiTexCoord4d(GLenum target,GLdouble s,GLdouble t,GLdouble r,GLdouble q)7950 void GL_APIENTRY GL_MultiTexCoord4d(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
7951 {
7952 Context *context = GetValidGlobalContext();
7953 EVENT(context, GLMultiTexCoord4d, "context = %d, target = %s, s = %f, t = %f, r = %f, q = %f",
7954 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r, q);
7955
7956 if (context)
7957 {
7958 SCOPED_SHARE_CONTEXT_LOCK(context);
7959 bool isCallValid =
7960 (context->skipValidation() ||
7961 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7962 context->getMutableErrorSetForValidation(),
7963 angle::EntryPoint::GLMultiTexCoord4d) &&
7964 ValidateMultiTexCoord4d(context, angle::EntryPoint::GLMultiTexCoord4d, target, s, t,
7965 r, q)));
7966 if (isCallValid)
7967 {
7968 context->multiTexCoord4d(target, s, t, r, q);
7969 }
7970 ANGLE_CAPTURE_GL(MultiTexCoord4d, isCallValid, context, target, s, t, r, q);
7971 }
7972 else
7973 {
7974 GenerateContextLostErrorOnCurrentGlobalContext();
7975 }
7976 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
7977 }
7978
GL_MultiTexCoord4dv(GLenum target,const GLdouble * v)7979 void GL_APIENTRY GL_MultiTexCoord4dv(GLenum target, const GLdouble *v)
7980 {
7981 Context *context = GetValidGlobalContext();
7982 EVENT(context, GLMultiTexCoord4dv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
7983 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
7984
7985 if (context)
7986 {
7987 SCOPED_SHARE_CONTEXT_LOCK(context);
7988 bool isCallValid =
7989 (context->skipValidation() ||
7990 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
7991 context->getMutableErrorSetForValidation(),
7992 angle::EntryPoint::GLMultiTexCoord4dv) &&
7993 ValidateMultiTexCoord4dv(context, angle::EntryPoint::GLMultiTexCoord4dv, target, v)));
7994 if (isCallValid)
7995 {
7996 context->multiTexCoord4dv(target, v);
7997 }
7998 ANGLE_CAPTURE_GL(MultiTexCoord4dv, isCallValid, context, target, v);
7999 }
8000 else
8001 {
8002 GenerateContextLostErrorOnCurrentGlobalContext();
8003 }
8004 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8005 }
8006
GL_MultiTexCoord4fv(GLenum target,const GLfloat * v)8007 void GL_APIENTRY GL_MultiTexCoord4fv(GLenum target, const GLfloat *v)
8008 {
8009 Context *context = GetValidGlobalContext();
8010 EVENT(context, GLMultiTexCoord4fv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
8011 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
8012
8013 if (context)
8014 {
8015 SCOPED_SHARE_CONTEXT_LOCK(context);
8016 bool isCallValid =
8017 (context->skipValidation() ||
8018 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8019 context->getMutableErrorSetForValidation(),
8020 angle::EntryPoint::GLMultiTexCoord4fv) &&
8021 ValidateMultiTexCoord4fv(context, angle::EntryPoint::GLMultiTexCoord4fv, target, v)));
8022 if (isCallValid)
8023 {
8024 context->multiTexCoord4fv(target, v);
8025 }
8026 ANGLE_CAPTURE_GL(MultiTexCoord4fv, isCallValid, context, target, v);
8027 }
8028 else
8029 {
8030 GenerateContextLostErrorOnCurrentGlobalContext();
8031 }
8032 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8033 }
8034
GL_MultiTexCoord4i(GLenum target,GLint s,GLint t,GLint r,GLint q)8035 void GL_APIENTRY GL_MultiTexCoord4i(GLenum target, GLint s, GLint t, GLint r, GLint q)
8036 {
8037 Context *context = GetValidGlobalContext();
8038 EVENT(context, GLMultiTexCoord4i, "context = %d, target = %s, s = %d, t = %d, r = %d, q = %d",
8039 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r, q);
8040
8041 if (context)
8042 {
8043 SCOPED_SHARE_CONTEXT_LOCK(context);
8044 bool isCallValid =
8045 (context->skipValidation() ||
8046 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8047 context->getMutableErrorSetForValidation(),
8048 angle::EntryPoint::GLMultiTexCoord4i) &&
8049 ValidateMultiTexCoord4i(context, angle::EntryPoint::GLMultiTexCoord4i, target, s, t,
8050 r, q)));
8051 if (isCallValid)
8052 {
8053 context->multiTexCoord4i(target, s, t, r, q);
8054 }
8055 ANGLE_CAPTURE_GL(MultiTexCoord4i, isCallValid, context, target, s, t, r, q);
8056 }
8057 else
8058 {
8059 GenerateContextLostErrorOnCurrentGlobalContext();
8060 }
8061 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8062 }
8063
GL_MultiTexCoord4iv(GLenum target,const GLint * v)8064 void GL_APIENTRY GL_MultiTexCoord4iv(GLenum target, const GLint *v)
8065 {
8066 Context *context = GetValidGlobalContext();
8067 EVENT(context, GLMultiTexCoord4iv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
8068 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
8069
8070 if (context)
8071 {
8072 SCOPED_SHARE_CONTEXT_LOCK(context);
8073 bool isCallValid =
8074 (context->skipValidation() ||
8075 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8076 context->getMutableErrorSetForValidation(),
8077 angle::EntryPoint::GLMultiTexCoord4iv) &&
8078 ValidateMultiTexCoord4iv(context, angle::EntryPoint::GLMultiTexCoord4iv, target, v)));
8079 if (isCallValid)
8080 {
8081 context->multiTexCoord4iv(target, v);
8082 }
8083 ANGLE_CAPTURE_GL(MultiTexCoord4iv, isCallValid, context, target, v);
8084 }
8085 else
8086 {
8087 GenerateContextLostErrorOnCurrentGlobalContext();
8088 }
8089 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8090 }
8091
GL_MultiTexCoord4s(GLenum target,GLshort s,GLshort t,GLshort r,GLshort q)8092 void GL_APIENTRY GL_MultiTexCoord4s(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
8093 {
8094 Context *context = GetValidGlobalContext();
8095 EVENT(context, GLMultiTexCoord4s, "context = %d, target = %s, s = %d, t = %d, r = %d, q = %d",
8096 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), s, t, r, q);
8097
8098 if (context)
8099 {
8100 SCOPED_SHARE_CONTEXT_LOCK(context);
8101 bool isCallValid =
8102 (context->skipValidation() ||
8103 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8104 context->getMutableErrorSetForValidation(),
8105 angle::EntryPoint::GLMultiTexCoord4s) &&
8106 ValidateMultiTexCoord4s(context, angle::EntryPoint::GLMultiTexCoord4s, target, s, t,
8107 r, q)));
8108 if (isCallValid)
8109 {
8110 context->multiTexCoord4s(target, s, t, r, q);
8111 }
8112 ANGLE_CAPTURE_GL(MultiTexCoord4s, isCallValid, context, target, s, t, r, q);
8113 }
8114 else
8115 {
8116 GenerateContextLostErrorOnCurrentGlobalContext();
8117 }
8118 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8119 }
8120
GL_MultiTexCoord4sv(GLenum target,const GLshort * v)8121 void GL_APIENTRY GL_MultiTexCoord4sv(GLenum target, const GLshort *v)
8122 {
8123 Context *context = GetValidGlobalContext();
8124 EVENT(context, GLMultiTexCoord4sv, "context = %d, target = %s, v = 0x%016" PRIxPTR "",
8125 CID(context), GLenumToString(BigGLEnum::TextureUnit, target), (uintptr_t)v);
8126
8127 if (context)
8128 {
8129 SCOPED_SHARE_CONTEXT_LOCK(context);
8130 bool isCallValid =
8131 (context->skipValidation() ||
8132 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8133 context->getMutableErrorSetForValidation(),
8134 angle::EntryPoint::GLMultiTexCoord4sv) &&
8135 ValidateMultiTexCoord4sv(context, angle::EntryPoint::GLMultiTexCoord4sv, target, v)));
8136 if (isCallValid)
8137 {
8138 context->multiTexCoord4sv(target, v);
8139 }
8140 ANGLE_CAPTURE_GL(MultiTexCoord4sv, isCallValid, context, target, v);
8141 }
8142 else
8143 {
8144 GenerateContextLostErrorOnCurrentGlobalContext();
8145 }
8146 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8147 }
8148
8149 // GL 1.4
GL_FogCoordPointer(GLenum type,GLsizei stride,const void * pointer)8150 void GL_APIENTRY GL_FogCoordPointer(GLenum type, GLsizei stride, const void *pointer)
8151 {
8152 Context *context = GetValidGlobalContext();
8153 EVENT(context, GLFogCoordPointer,
8154 "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context),
8155 GLenumToString(BigGLEnum::FogPointerTypeEXT, type), stride, (uintptr_t)pointer);
8156
8157 if (context)
8158 {
8159 SCOPED_SHARE_CONTEXT_LOCK(context);
8160 bool isCallValid =
8161 (context->skipValidation() ||
8162 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8163 context->getMutableErrorSetForValidation(),
8164 angle::EntryPoint::GLFogCoordPointer) &&
8165 ValidateFogCoordPointer(context, angle::EntryPoint::GLFogCoordPointer, type, stride,
8166 pointer)));
8167 if (isCallValid)
8168 {
8169 context->fogCoordPointer(type, stride, pointer);
8170 }
8171 ANGLE_CAPTURE_GL(FogCoordPointer, isCallValid, context, type, stride, pointer);
8172 }
8173 else
8174 {
8175 GenerateContextLostErrorOnCurrentGlobalContext();
8176 }
8177 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8178 }
8179
GL_FogCoordd(GLdouble coord)8180 void GL_APIENTRY GL_FogCoordd(GLdouble coord)
8181 {
8182 Context *context = GetValidGlobalContext();
8183 EVENT(context, GLFogCoordd, "context = %d, coord = %f", CID(context), coord);
8184
8185 if (context)
8186 {
8187 SCOPED_SHARE_CONTEXT_LOCK(context);
8188 bool isCallValid =
8189 (context->skipValidation() ||
8190 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8191 context->getMutableErrorSetForValidation(),
8192 angle::EntryPoint::GLFogCoordd) &&
8193 ValidateFogCoordd(context, angle::EntryPoint::GLFogCoordd, coord)));
8194 if (isCallValid)
8195 {
8196 context->fogCoordd(coord);
8197 }
8198 ANGLE_CAPTURE_GL(FogCoordd, isCallValid, context, coord);
8199 }
8200 else
8201 {
8202 GenerateContextLostErrorOnCurrentGlobalContext();
8203 }
8204 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8205 }
8206
GL_FogCoorddv(const GLdouble * coord)8207 void GL_APIENTRY GL_FogCoorddv(const GLdouble *coord)
8208 {
8209 Context *context = GetValidGlobalContext();
8210 EVENT(context, GLFogCoorddv, "context = %d, coord = 0x%016" PRIxPTR "", CID(context),
8211 (uintptr_t)coord);
8212
8213 if (context)
8214 {
8215 SCOPED_SHARE_CONTEXT_LOCK(context);
8216 bool isCallValid =
8217 (context->skipValidation() ||
8218 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8219 context->getMutableErrorSetForValidation(),
8220 angle::EntryPoint::GLFogCoorddv) &&
8221 ValidateFogCoorddv(context, angle::EntryPoint::GLFogCoorddv, coord)));
8222 if (isCallValid)
8223 {
8224 context->fogCoorddv(coord);
8225 }
8226 ANGLE_CAPTURE_GL(FogCoorddv, isCallValid, context, coord);
8227 }
8228 else
8229 {
8230 GenerateContextLostErrorOnCurrentGlobalContext();
8231 }
8232 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8233 }
8234
GL_FogCoordf(GLfloat coord)8235 void GL_APIENTRY GL_FogCoordf(GLfloat coord)
8236 {
8237 Context *context = GetValidGlobalContext();
8238 EVENT(context, GLFogCoordf, "context = %d, coord = %f", CID(context), coord);
8239
8240 if (context)
8241 {
8242 SCOPED_SHARE_CONTEXT_LOCK(context);
8243 bool isCallValid =
8244 (context->skipValidation() ||
8245 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8246 context->getMutableErrorSetForValidation(),
8247 angle::EntryPoint::GLFogCoordf) &&
8248 ValidateFogCoordf(context, angle::EntryPoint::GLFogCoordf, coord)));
8249 if (isCallValid)
8250 {
8251 context->fogCoordf(coord);
8252 }
8253 ANGLE_CAPTURE_GL(FogCoordf, isCallValid, context, coord);
8254 }
8255 else
8256 {
8257 GenerateContextLostErrorOnCurrentGlobalContext();
8258 }
8259 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8260 }
8261
GL_FogCoordfv(const GLfloat * coord)8262 void GL_APIENTRY GL_FogCoordfv(const GLfloat *coord)
8263 {
8264 Context *context = GetValidGlobalContext();
8265 EVENT(context, GLFogCoordfv, "context = %d, coord = 0x%016" PRIxPTR "", CID(context),
8266 (uintptr_t)coord);
8267
8268 if (context)
8269 {
8270 SCOPED_SHARE_CONTEXT_LOCK(context);
8271 bool isCallValid =
8272 (context->skipValidation() ||
8273 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8274 context->getMutableErrorSetForValidation(),
8275 angle::EntryPoint::GLFogCoordfv) &&
8276 ValidateFogCoordfv(context, angle::EntryPoint::GLFogCoordfv, coord)));
8277 if (isCallValid)
8278 {
8279 context->fogCoordfv(coord);
8280 }
8281 ANGLE_CAPTURE_GL(FogCoordfv, isCallValid, context, coord);
8282 }
8283 else
8284 {
8285 GenerateContextLostErrorOnCurrentGlobalContext();
8286 }
8287 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8288 }
8289
GL_MultiDrawArrays(GLenum mode,const GLint * first,const GLsizei * count,GLsizei drawcount)8290 void GL_APIENTRY GL_MultiDrawArrays(GLenum mode,
8291 const GLint *first,
8292 const GLsizei *count,
8293 GLsizei drawcount)
8294 {
8295 Context *context = GetValidGlobalContext();
8296 EVENT(context, GLMultiDrawArrays,
8297 "context = %d, mode = %s, first = 0x%016" PRIxPTR ", count = 0x%016" PRIxPTR
8298 ", drawcount = %d",
8299 CID(context), GLenumToString(BigGLEnum::PrimitiveType, mode), (uintptr_t)first,
8300 (uintptr_t)count, drawcount);
8301
8302 if (context)
8303 {
8304 PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
8305 SCOPED_SHARE_CONTEXT_LOCK(context);
8306 bool isCallValid =
8307 (context->skipValidation() ||
8308 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8309 context->getMutableErrorSetForValidation(),
8310 angle::EntryPoint::GLMultiDrawArrays) &&
8311 ValidateMultiDrawArrays(context, angle::EntryPoint::GLMultiDrawArrays, modePacked,
8312 first, count, drawcount)));
8313 if (isCallValid)
8314 {
8315 context->multiDrawArrays(modePacked, first, count, drawcount);
8316 }
8317 ANGLE_CAPTURE_GL(MultiDrawArrays, isCallValid, context, modePacked, first, count,
8318 drawcount);
8319 }
8320 else
8321 {
8322 GenerateContextLostErrorOnCurrentGlobalContext();
8323 }
8324 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8325 }
8326
GL_MultiDrawElements(GLenum mode,const GLsizei * count,GLenum type,const void * const * indices,GLsizei drawcount)8327 void GL_APIENTRY GL_MultiDrawElements(GLenum mode,
8328 const GLsizei *count,
8329 GLenum type,
8330 const void *const *indices,
8331 GLsizei drawcount)
8332 {
8333 Context *context = GetValidGlobalContext();
8334 EVENT(context, GLMultiDrawElements,
8335 "context = %d, mode = %s, count = 0x%016" PRIxPTR ", type = %s, indices = 0x%016" PRIxPTR
8336 ", drawcount = %d",
8337 CID(context), GLenumToString(BigGLEnum::PrimitiveType, mode), (uintptr_t)count,
8338 GLenumToString(BigGLEnum::DrawElementsType, type), (uintptr_t)indices, drawcount);
8339
8340 if (context)
8341 {
8342 PrimitiveMode modePacked = PackParam<PrimitiveMode>(mode);
8343 DrawElementsType typePacked = PackParam<DrawElementsType>(type);
8344 SCOPED_SHARE_CONTEXT_LOCK(context);
8345 bool isCallValid =
8346 (context->skipValidation() ||
8347 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8348 context->getMutableErrorSetForValidation(),
8349 angle::EntryPoint::GLMultiDrawElements) &&
8350 ValidateMultiDrawElements(context, angle::EntryPoint::GLMultiDrawElements, modePacked,
8351 count, typePacked, indices, drawcount)));
8352 if (isCallValid)
8353 {
8354 context->multiDrawElements(modePacked, count, typePacked, indices, drawcount);
8355 }
8356 ANGLE_CAPTURE_GL(MultiDrawElements, isCallValid, context, modePacked, count, typePacked,
8357 indices, drawcount);
8358 }
8359 else
8360 {
8361 GenerateContextLostErrorOnCurrentGlobalContext();
8362 }
8363 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8364 }
8365
GL_PointParameteri(GLenum pname,GLint param)8366 void GL_APIENTRY GL_PointParameteri(GLenum pname, GLint param)
8367 {
8368 Context *context = GetValidGlobalContext();
8369 EVENT(context, GLPointParameteri, "context = %d, pname = %s, param = %d", CID(context),
8370 GLenumToString(BigGLEnum::AllEnums, pname), param);
8371
8372 if (context)
8373 {
8374 SCOPED_SHARE_CONTEXT_LOCK(context);
8375 bool isCallValid =
8376 (context->skipValidation() ||
8377 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8378 context->getMutableErrorSetForValidation(),
8379 angle::EntryPoint::GLPointParameteri) &&
8380 ValidatePointParameteri(context, angle::EntryPoint::GLPointParameteri, pname,
8381 param)));
8382 if (isCallValid)
8383 {
8384 context->pointParameteri(pname, param);
8385 }
8386 ANGLE_CAPTURE_GL(PointParameteri, isCallValid, context, pname, param);
8387 }
8388 else
8389 {
8390 GenerateContextLostErrorOnCurrentGlobalContext();
8391 }
8392 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8393 }
8394
GL_PointParameteriv(GLenum pname,const GLint * params)8395 void GL_APIENTRY GL_PointParameteriv(GLenum pname, const GLint *params)
8396 {
8397 Context *context = GetValidGlobalContext();
8398 EVENT(context, GLPointParameteriv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
8399 CID(context), GLenumToString(BigGLEnum::AllEnums, pname), (uintptr_t)params);
8400
8401 if (context)
8402 {
8403 SCOPED_SHARE_CONTEXT_LOCK(context);
8404 bool isCallValid =
8405 (context->skipValidation() ||
8406 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8407 context->getMutableErrorSetForValidation(),
8408 angle::EntryPoint::GLPointParameteriv) &&
8409 ValidatePointParameteriv(context, angle::EntryPoint::GLPointParameteriv, pname,
8410 params)));
8411 if (isCallValid)
8412 {
8413 context->pointParameteriv(pname, params);
8414 }
8415 ANGLE_CAPTURE_GL(PointParameteriv, isCallValid, context, pname, params);
8416 }
8417 else
8418 {
8419 GenerateContextLostErrorOnCurrentGlobalContext();
8420 }
8421 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8422 }
8423
GL_SecondaryColor3b(GLbyte red,GLbyte green,GLbyte blue)8424 void GL_APIENTRY GL_SecondaryColor3b(GLbyte red, GLbyte green, GLbyte blue)
8425 {
8426 Context *context = GetValidGlobalContext();
8427 EVENT(context, GLSecondaryColor3b, "context = %d, red = %d, green = %d, blue = %d",
8428 CID(context), red, green, blue);
8429
8430 if (context)
8431 {
8432 SCOPED_SHARE_CONTEXT_LOCK(context);
8433 bool isCallValid =
8434 (context->skipValidation() ||
8435 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8436 context->getMutableErrorSetForValidation(),
8437 angle::EntryPoint::GLSecondaryColor3b) &&
8438 ValidateSecondaryColor3b(context, angle::EntryPoint::GLSecondaryColor3b, red, green,
8439 blue)));
8440 if (isCallValid)
8441 {
8442 context->secondaryColor3b(red, green, blue);
8443 }
8444 ANGLE_CAPTURE_GL(SecondaryColor3b, isCallValid, context, red, green, blue);
8445 }
8446 else
8447 {
8448 GenerateContextLostErrorOnCurrentGlobalContext();
8449 }
8450 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8451 }
8452
GL_SecondaryColor3bv(const GLbyte * v)8453 void GL_APIENTRY GL_SecondaryColor3bv(const GLbyte *v)
8454 {
8455 Context *context = GetValidGlobalContext();
8456 EVENT(context, GLSecondaryColor3bv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8457 (uintptr_t)v);
8458
8459 if (context)
8460 {
8461 SCOPED_SHARE_CONTEXT_LOCK(context);
8462 bool isCallValid =
8463 (context->skipValidation() ||
8464 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8465 context->getMutableErrorSetForValidation(),
8466 angle::EntryPoint::GLSecondaryColor3bv) &&
8467 ValidateSecondaryColor3bv(context, angle::EntryPoint::GLSecondaryColor3bv, v)));
8468 if (isCallValid)
8469 {
8470 context->secondaryColor3bv(v);
8471 }
8472 ANGLE_CAPTURE_GL(SecondaryColor3bv, isCallValid, context, v);
8473 }
8474 else
8475 {
8476 GenerateContextLostErrorOnCurrentGlobalContext();
8477 }
8478 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8479 }
8480
GL_SecondaryColor3d(GLdouble red,GLdouble green,GLdouble blue)8481 void GL_APIENTRY GL_SecondaryColor3d(GLdouble red, GLdouble green, GLdouble blue)
8482 {
8483 Context *context = GetValidGlobalContext();
8484 EVENT(context, GLSecondaryColor3d, "context = %d, red = %f, green = %f, blue = %f",
8485 CID(context), red, green, blue);
8486
8487 if (context)
8488 {
8489 SCOPED_SHARE_CONTEXT_LOCK(context);
8490 bool isCallValid =
8491 (context->skipValidation() ||
8492 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8493 context->getMutableErrorSetForValidation(),
8494 angle::EntryPoint::GLSecondaryColor3d) &&
8495 ValidateSecondaryColor3d(context, angle::EntryPoint::GLSecondaryColor3d, red, green,
8496 blue)));
8497 if (isCallValid)
8498 {
8499 context->secondaryColor3d(red, green, blue);
8500 }
8501 ANGLE_CAPTURE_GL(SecondaryColor3d, isCallValid, context, red, green, blue);
8502 }
8503 else
8504 {
8505 GenerateContextLostErrorOnCurrentGlobalContext();
8506 }
8507 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8508 }
8509
GL_SecondaryColor3dv(const GLdouble * v)8510 void GL_APIENTRY GL_SecondaryColor3dv(const GLdouble *v)
8511 {
8512 Context *context = GetValidGlobalContext();
8513 EVENT(context, GLSecondaryColor3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8514 (uintptr_t)v);
8515
8516 if (context)
8517 {
8518 SCOPED_SHARE_CONTEXT_LOCK(context);
8519 bool isCallValid =
8520 (context->skipValidation() ||
8521 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8522 context->getMutableErrorSetForValidation(),
8523 angle::EntryPoint::GLSecondaryColor3dv) &&
8524 ValidateSecondaryColor3dv(context, angle::EntryPoint::GLSecondaryColor3dv, v)));
8525 if (isCallValid)
8526 {
8527 context->secondaryColor3dv(v);
8528 }
8529 ANGLE_CAPTURE_GL(SecondaryColor3dv, isCallValid, context, v);
8530 }
8531 else
8532 {
8533 GenerateContextLostErrorOnCurrentGlobalContext();
8534 }
8535 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8536 }
8537
GL_SecondaryColor3f(GLfloat red,GLfloat green,GLfloat blue)8538 void GL_APIENTRY GL_SecondaryColor3f(GLfloat red, GLfloat green, GLfloat blue)
8539 {
8540 Context *context = GetValidGlobalContext();
8541 EVENT(context, GLSecondaryColor3f, "context = %d, red = %f, green = %f, blue = %f",
8542 CID(context), red, green, blue);
8543
8544 if (context)
8545 {
8546 SCOPED_SHARE_CONTEXT_LOCK(context);
8547 bool isCallValid =
8548 (context->skipValidation() ||
8549 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8550 context->getMutableErrorSetForValidation(),
8551 angle::EntryPoint::GLSecondaryColor3f) &&
8552 ValidateSecondaryColor3f(context, angle::EntryPoint::GLSecondaryColor3f, red, green,
8553 blue)));
8554 if (isCallValid)
8555 {
8556 context->secondaryColor3f(red, green, blue);
8557 }
8558 ANGLE_CAPTURE_GL(SecondaryColor3f, isCallValid, context, red, green, blue);
8559 }
8560 else
8561 {
8562 GenerateContextLostErrorOnCurrentGlobalContext();
8563 }
8564 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8565 }
8566
GL_SecondaryColor3fv(const GLfloat * v)8567 void GL_APIENTRY GL_SecondaryColor3fv(const GLfloat *v)
8568 {
8569 Context *context = GetValidGlobalContext();
8570 EVENT(context, GLSecondaryColor3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8571 (uintptr_t)v);
8572
8573 if (context)
8574 {
8575 SCOPED_SHARE_CONTEXT_LOCK(context);
8576 bool isCallValid =
8577 (context->skipValidation() ||
8578 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8579 context->getMutableErrorSetForValidation(),
8580 angle::EntryPoint::GLSecondaryColor3fv) &&
8581 ValidateSecondaryColor3fv(context, angle::EntryPoint::GLSecondaryColor3fv, v)));
8582 if (isCallValid)
8583 {
8584 context->secondaryColor3fv(v);
8585 }
8586 ANGLE_CAPTURE_GL(SecondaryColor3fv, isCallValid, context, v);
8587 }
8588 else
8589 {
8590 GenerateContextLostErrorOnCurrentGlobalContext();
8591 }
8592 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8593 }
8594
GL_SecondaryColor3i(GLint red,GLint green,GLint blue)8595 void GL_APIENTRY GL_SecondaryColor3i(GLint red, GLint green, GLint blue)
8596 {
8597 Context *context = GetValidGlobalContext();
8598 EVENT(context, GLSecondaryColor3i, "context = %d, red = %d, green = %d, blue = %d",
8599 CID(context), red, green, blue);
8600
8601 if (context)
8602 {
8603 SCOPED_SHARE_CONTEXT_LOCK(context);
8604 bool isCallValid =
8605 (context->skipValidation() ||
8606 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8607 context->getMutableErrorSetForValidation(),
8608 angle::EntryPoint::GLSecondaryColor3i) &&
8609 ValidateSecondaryColor3i(context, angle::EntryPoint::GLSecondaryColor3i, red, green,
8610 blue)));
8611 if (isCallValid)
8612 {
8613 context->secondaryColor3i(red, green, blue);
8614 }
8615 ANGLE_CAPTURE_GL(SecondaryColor3i, isCallValid, context, red, green, blue);
8616 }
8617 else
8618 {
8619 GenerateContextLostErrorOnCurrentGlobalContext();
8620 }
8621 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8622 }
8623
GL_SecondaryColor3iv(const GLint * v)8624 void GL_APIENTRY GL_SecondaryColor3iv(const GLint *v)
8625 {
8626 Context *context = GetValidGlobalContext();
8627 EVENT(context, GLSecondaryColor3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8628 (uintptr_t)v);
8629
8630 if (context)
8631 {
8632 SCOPED_SHARE_CONTEXT_LOCK(context);
8633 bool isCallValid =
8634 (context->skipValidation() ||
8635 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8636 context->getMutableErrorSetForValidation(),
8637 angle::EntryPoint::GLSecondaryColor3iv) &&
8638 ValidateSecondaryColor3iv(context, angle::EntryPoint::GLSecondaryColor3iv, v)));
8639 if (isCallValid)
8640 {
8641 context->secondaryColor3iv(v);
8642 }
8643 ANGLE_CAPTURE_GL(SecondaryColor3iv, isCallValid, context, v);
8644 }
8645 else
8646 {
8647 GenerateContextLostErrorOnCurrentGlobalContext();
8648 }
8649 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8650 }
8651
GL_SecondaryColor3s(GLshort red,GLshort green,GLshort blue)8652 void GL_APIENTRY GL_SecondaryColor3s(GLshort red, GLshort green, GLshort blue)
8653 {
8654 Context *context = GetValidGlobalContext();
8655 EVENT(context, GLSecondaryColor3s, "context = %d, red = %d, green = %d, blue = %d",
8656 CID(context), red, green, blue);
8657
8658 if (context)
8659 {
8660 SCOPED_SHARE_CONTEXT_LOCK(context);
8661 bool isCallValid =
8662 (context->skipValidation() ||
8663 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8664 context->getMutableErrorSetForValidation(),
8665 angle::EntryPoint::GLSecondaryColor3s) &&
8666 ValidateSecondaryColor3s(context, angle::EntryPoint::GLSecondaryColor3s, red, green,
8667 blue)));
8668 if (isCallValid)
8669 {
8670 context->secondaryColor3s(red, green, blue);
8671 }
8672 ANGLE_CAPTURE_GL(SecondaryColor3s, isCallValid, context, red, green, blue);
8673 }
8674 else
8675 {
8676 GenerateContextLostErrorOnCurrentGlobalContext();
8677 }
8678 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8679 }
8680
GL_SecondaryColor3sv(const GLshort * v)8681 void GL_APIENTRY GL_SecondaryColor3sv(const GLshort *v)
8682 {
8683 Context *context = GetValidGlobalContext();
8684 EVENT(context, GLSecondaryColor3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8685 (uintptr_t)v);
8686
8687 if (context)
8688 {
8689 SCOPED_SHARE_CONTEXT_LOCK(context);
8690 bool isCallValid =
8691 (context->skipValidation() ||
8692 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8693 context->getMutableErrorSetForValidation(),
8694 angle::EntryPoint::GLSecondaryColor3sv) &&
8695 ValidateSecondaryColor3sv(context, angle::EntryPoint::GLSecondaryColor3sv, v)));
8696 if (isCallValid)
8697 {
8698 context->secondaryColor3sv(v);
8699 }
8700 ANGLE_CAPTURE_GL(SecondaryColor3sv, isCallValid, context, v);
8701 }
8702 else
8703 {
8704 GenerateContextLostErrorOnCurrentGlobalContext();
8705 }
8706 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8707 }
8708
GL_SecondaryColor3ub(GLubyte red,GLubyte green,GLubyte blue)8709 void GL_APIENTRY GL_SecondaryColor3ub(GLubyte red, GLubyte green, GLubyte blue)
8710 {
8711 Context *context = GetValidGlobalContext();
8712 EVENT(context, GLSecondaryColor3ub, "context = %d, red = %d, green = %d, blue = %d",
8713 CID(context), red, green, blue);
8714
8715 if (context)
8716 {
8717 SCOPED_SHARE_CONTEXT_LOCK(context);
8718 bool isCallValid =
8719 (context->skipValidation() ||
8720 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8721 context->getMutableErrorSetForValidation(),
8722 angle::EntryPoint::GLSecondaryColor3ub) &&
8723 ValidateSecondaryColor3ub(context, angle::EntryPoint::GLSecondaryColor3ub, red, green,
8724 blue)));
8725 if (isCallValid)
8726 {
8727 context->secondaryColor3ub(red, green, blue);
8728 }
8729 ANGLE_CAPTURE_GL(SecondaryColor3ub, isCallValid, context, red, green, blue);
8730 }
8731 else
8732 {
8733 GenerateContextLostErrorOnCurrentGlobalContext();
8734 }
8735 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8736 }
8737
GL_SecondaryColor3ubv(const GLubyte * v)8738 void GL_APIENTRY GL_SecondaryColor3ubv(const GLubyte *v)
8739 {
8740 Context *context = GetValidGlobalContext();
8741 EVENT(context, GLSecondaryColor3ubv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8742 (uintptr_t)v);
8743
8744 if (context)
8745 {
8746 SCOPED_SHARE_CONTEXT_LOCK(context);
8747 bool isCallValid =
8748 (context->skipValidation() ||
8749 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8750 context->getMutableErrorSetForValidation(),
8751 angle::EntryPoint::GLSecondaryColor3ubv) &&
8752 ValidateSecondaryColor3ubv(context, angle::EntryPoint::GLSecondaryColor3ubv, v)));
8753 if (isCallValid)
8754 {
8755 context->secondaryColor3ubv(v);
8756 }
8757 ANGLE_CAPTURE_GL(SecondaryColor3ubv, isCallValid, context, v);
8758 }
8759 else
8760 {
8761 GenerateContextLostErrorOnCurrentGlobalContext();
8762 }
8763 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8764 }
8765
GL_SecondaryColor3ui(GLuint red,GLuint green,GLuint blue)8766 void GL_APIENTRY GL_SecondaryColor3ui(GLuint red, GLuint green, GLuint blue)
8767 {
8768 Context *context = GetValidGlobalContext();
8769 EVENT(context, GLSecondaryColor3ui, "context = %d, red = %u, green = %u, blue = %u",
8770 CID(context), red, green, blue);
8771
8772 if (context)
8773 {
8774 SCOPED_SHARE_CONTEXT_LOCK(context);
8775 bool isCallValid =
8776 (context->skipValidation() ||
8777 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8778 context->getMutableErrorSetForValidation(),
8779 angle::EntryPoint::GLSecondaryColor3ui) &&
8780 ValidateSecondaryColor3ui(context, angle::EntryPoint::GLSecondaryColor3ui, red, green,
8781 blue)));
8782 if (isCallValid)
8783 {
8784 context->secondaryColor3ui(red, green, blue);
8785 }
8786 ANGLE_CAPTURE_GL(SecondaryColor3ui, isCallValid, context, red, green, blue);
8787 }
8788 else
8789 {
8790 GenerateContextLostErrorOnCurrentGlobalContext();
8791 }
8792 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8793 }
8794
GL_SecondaryColor3uiv(const GLuint * v)8795 void GL_APIENTRY GL_SecondaryColor3uiv(const GLuint *v)
8796 {
8797 Context *context = GetValidGlobalContext();
8798 EVENT(context, GLSecondaryColor3uiv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8799 (uintptr_t)v);
8800
8801 if (context)
8802 {
8803 SCOPED_SHARE_CONTEXT_LOCK(context);
8804 bool isCallValid =
8805 (context->skipValidation() ||
8806 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8807 context->getMutableErrorSetForValidation(),
8808 angle::EntryPoint::GLSecondaryColor3uiv) &&
8809 ValidateSecondaryColor3uiv(context, angle::EntryPoint::GLSecondaryColor3uiv, v)));
8810 if (isCallValid)
8811 {
8812 context->secondaryColor3uiv(v);
8813 }
8814 ANGLE_CAPTURE_GL(SecondaryColor3uiv, isCallValid, context, v);
8815 }
8816 else
8817 {
8818 GenerateContextLostErrorOnCurrentGlobalContext();
8819 }
8820 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8821 }
8822
GL_SecondaryColor3us(GLushort red,GLushort green,GLushort blue)8823 void GL_APIENTRY GL_SecondaryColor3us(GLushort red, GLushort green, GLushort blue)
8824 {
8825 Context *context = GetValidGlobalContext();
8826 EVENT(context, GLSecondaryColor3us, "context = %d, red = %u, green = %u, blue = %u",
8827 CID(context), red, green, blue);
8828
8829 if (context)
8830 {
8831 SCOPED_SHARE_CONTEXT_LOCK(context);
8832 bool isCallValid =
8833 (context->skipValidation() ||
8834 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8835 context->getMutableErrorSetForValidation(),
8836 angle::EntryPoint::GLSecondaryColor3us) &&
8837 ValidateSecondaryColor3us(context, angle::EntryPoint::GLSecondaryColor3us, red, green,
8838 blue)));
8839 if (isCallValid)
8840 {
8841 context->secondaryColor3us(red, green, blue);
8842 }
8843 ANGLE_CAPTURE_GL(SecondaryColor3us, isCallValid, context, red, green, blue);
8844 }
8845 else
8846 {
8847 GenerateContextLostErrorOnCurrentGlobalContext();
8848 }
8849 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8850 }
8851
GL_SecondaryColor3usv(const GLushort * v)8852 void GL_APIENTRY GL_SecondaryColor3usv(const GLushort *v)
8853 {
8854 Context *context = GetValidGlobalContext();
8855 EVENT(context, GLSecondaryColor3usv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8856 (uintptr_t)v);
8857
8858 if (context)
8859 {
8860 SCOPED_SHARE_CONTEXT_LOCK(context);
8861 bool isCallValid =
8862 (context->skipValidation() ||
8863 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8864 context->getMutableErrorSetForValidation(),
8865 angle::EntryPoint::GLSecondaryColor3usv) &&
8866 ValidateSecondaryColor3usv(context, angle::EntryPoint::GLSecondaryColor3usv, v)));
8867 if (isCallValid)
8868 {
8869 context->secondaryColor3usv(v);
8870 }
8871 ANGLE_CAPTURE_GL(SecondaryColor3usv, isCallValid, context, v);
8872 }
8873 else
8874 {
8875 GenerateContextLostErrorOnCurrentGlobalContext();
8876 }
8877 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8878 }
8879
GL_SecondaryColorPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)8880 void GL_APIENTRY GL_SecondaryColorPointer(GLint size,
8881 GLenum type,
8882 GLsizei stride,
8883 const void *pointer)
8884 {
8885 Context *context = GetValidGlobalContext();
8886 EVENT(context, GLSecondaryColorPointer,
8887 "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
8888 CID(context), size, GLenumToString(BigGLEnum::ColorPointerType, type), stride,
8889 (uintptr_t)pointer);
8890
8891 if (context)
8892 {
8893 SCOPED_SHARE_CONTEXT_LOCK(context);
8894 bool isCallValid =
8895 (context->skipValidation() ||
8896 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8897 context->getMutableErrorSetForValidation(),
8898 angle::EntryPoint::GLSecondaryColorPointer) &&
8899 ValidateSecondaryColorPointer(context, angle::EntryPoint::GLSecondaryColorPointer,
8900 size, type, stride, pointer)));
8901 if (isCallValid)
8902 {
8903 context->secondaryColorPointer(size, type, stride, pointer);
8904 }
8905 ANGLE_CAPTURE_GL(SecondaryColorPointer, isCallValid, context, size, type, stride, pointer);
8906 }
8907 else
8908 {
8909 GenerateContextLostErrorOnCurrentGlobalContext();
8910 }
8911 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8912 }
8913
GL_WindowPos2d(GLdouble x,GLdouble y)8914 void GL_APIENTRY GL_WindowPos2d(GLdouble x, GLdouble y)
8915 {
8916 Context *context = GetValidGlobalContext();
8917 EVENT(context, GLWindowPos2d, "context = %d, x = %f, y = %f", CID(context), x, y);
8918
8919 if (context)
8920 {
8921 SCOPED_SHARE_CONTEXT_LOCK(context);
8922 bool isCallValid =
8923 (context->skipValidation() ||
8924 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8925 context->getMutableErrorSetForValidation(),
8926 angle::EntryPoint::GLWindowPos2d) &&
8927 ValidateWindowPos2d(context, angle::EntryPoint::GLWindowPos2d, x, y)));
8928 if (isCallValid)
8929 {
8930 context->windowPos2d(x, y);
8931 }
8932 ANGLE_CAPTURE_GL(WindowPos2d, isCallValid, context, x, y);
8933 }
8934 else
8935 {
8936 GenerateContextLostErrorOnCurrentGlobalContext();
8937 }
8938 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8939 }
8940
GL_WindowPos2dv(const GLdouble * v)8941 void GL_APIENTRY GL_WindowPos2dv(const GLdouble *v)
8942 {
8943 Context *context = GetValidGlobalContext();
8944 EVENT(context, GLWindowPos2dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
8945 (uintptr_t)v);
8946
8947 if (context)
8948 {
8949 SCOPED_SHARE_CONTEXT_LOCK(context);
8950 bool isCallValid =
8951 (context->skipValidation() ||
8952 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8953 context->getMutableErrorSetForValidation(),
8954 angle::EntryPoint::GLWindowPos2dv) &&
8955 ValidateWindowPos2dv(context, angle::EntryPoint::GLWindowPos2dv, v)));
8956 if (isCallValid)
8957 {
8958 context->windowPos2dv(v);
8959 }
8960 ANGLE_CAPTURE_GL(WindowPos2dv, isCallValid, context, v);
8961 }
8962 else
8963 {
8964 GenerateContextLostErrorOnCurrentGlobalContext();
8965 }
8966 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8967 }
8968
GL_WindowPos2f(GLfloat x,GLfloat y)8969 void GL_APIENTRY GL_WindowPos2f(GLfloat x, GLfloat y)
8970 {
8971 Context *context = GetValidGlobalContext();
8972 EVENT(context, GLWindowPos2f, "context = %d, x = %f, y = %f", CID(context), x, y);
8973
8974 if (context)
8975 {
8976 SCOPED_SHARE_CONTEXT_LOCK(context);
8977 bool isCallValid =
8978 (context->skipValidation() ||
8979 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
8980 context->getMutableErrorSetForValidation(),
8981 angle::EntryPoint::GLWindowPos2f) &&
8982 ValidateWindowPos2f(context, angle::EntryPoint::GLWindowPos2f, x, y)));
8983 if (isCallValid)
8984 {
8985 context->windowPos2f(x, y);
8986 }
8987 ANGLE_CAPTURE_GL(WindowPos2f, isCallValid, context, x, y);
8988 }
8989 else
8990 {
8991 GenerateContextLostErrorOnCurrentGlobalContext();
8992 }
8993 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
8994 }
8995
GL_WindowPos2fv(const GLfloat * v)8996 void GL_APIENTRY GL_WindowPos2fv(const GLfloat *v)
8997 {
8998 Context *context = GetValidGlobalContext();
8999 EVENT(context, GLWindowPos2fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9000 (uintptr_t)v);
9001
9002 if (context)
9003 {
9004 SCOPED_SHARE_CONTEXT_LOCK(context);
9005 bool isCallValid =
9006 (context->skipValidation() ||
9007 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9008 context->getMutableErrorSetForValidation(),
9009 angle::EntryPoint::GLWindowPos2fv) &&
9010 ValidateWindowPos2fv(context, angle::EntryPoint::GLWindowPos2fv, v)));
9011 if (isCallValid)
9012 {
9013 context->windowPos2fv(v);
9014 }
9015 ANGLE_CAPTURE_GL(WindowPos2fv, isCallValid, context, v);
9016 }
9017 else
9018 {
9019 GenerateContextLostErrorOnCurrentGlobalContext();
9020 }
9021 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9022 }
9023
GL_WindowPos2i(GLint x,GLint y)9024 void GL_APIENTRY GL_WindowPos2i(GLint x, GLint y)
9025 {
9026 Context *context = GetValidGlobalContext();
9027 EVENT(context, GLWindowPos2i, "context = %d, x = %d, y = %d", CID(context), x, y);
9028
9029 if (context)
9030 {
9031 SCOPED_SHARE_CONTEXT_LOCK(context);
9032 bool isCallValid =
9033 (context->skipValidation() ||
9034 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9035 context->getMutableErrorSetForValidation(),
9036 angle::EntryPoint::GLWindowPos2i) &&
9037 ValidateWindowPos2i(context, angle::EntryPoint::GLWindowPos2i, x, y)));
9038 if (isCallValid)
9039 {
9040 context->windowPos2i(x, y);
9041 }
9042 ANGLE_CAPTURE_GL(WindowPos2i, isCallValid, context, x, y);
9043 }
9044 else
9045 {
9046 GenerateContextLostErrorOnCurrentGlobalContext();
9047 }
9048 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9049 }
9050
GL_WindowPos2iv(const GLint * v)9051 void GL_APIENTRY GL_WindowPos2iv(const GLint *v)
9052 {
9053 Context *context = GetValidGlobalContext();
9054 EVENT(context, GLWindowPos2iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9055 (uintptr_t)v);
9056
9057 if (context)
9058 {
9059 SCOPED_SHARE_CONTEXT_LOCK(context);
9060 bool isCallValid =
9061 (context->skipValidation() ||
9062 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9063 context->getMutableErrorSetForValidation(),
9064 angle::EntryPoint::GLWindowPos2iv) &&
9065 ValidateWindowPos2iv(context, angle::EntryPoint::GLWindowPos2iv, v)));
9066 if (isCallValid)
9067 {
9068 context->windowPos2iv(v);
9069 }
9070 ANGLE_CAPTURE_GL(WindowPos2iv, isCallValid, context, v);
9071 }
9072 else
9073 {
9074 GenerateContextLostErrorOnCurrentGlobalContext();
9075 }
9076 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9077 }
9078
GL_WindowPos2s(GLshort x,GLshort y)9079 void GL_APIENTRY GL_WindowPos2s(GLshort x, GLshort y)
9080 {
9081 Context *context = GetValidGlobalContext();
9082 EVENT(context, GLWindowPos2s, "context = %d, x = %d, y = %d", CID(context), x, y);
9083
9084 if (context)
9085 {
9086 SCOPED_SHARE_CONTEXT_LOCK(context);
9087 bool isCallValid =
9088 (context->skipValidation() ||
9089 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9090 context->getMutableErrorSetForValidation(),
9091 angle::EntryPoint::GLWindowPos2s) &&
9092 ValidateWindowPos2s(context, angle::EntryPoint::GLWindowPos2s, x, y)));
9093 if (isCallValid)
9094 {
9095 context->windowPos2s(x, y);
9096 }
9097 ANGLE_CAPTURE_GL(WindowPos2s, isCallValid, context, x, y);
9098 }
9099 else
9100 {
9101 GenerateContextLostErrorOnCurrentGlobalContext();
9102 }
9103 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9104 }
9105
GL_WindowPos2sv(const GLshort * v)9106 void GL_APIENTRY GL_WindowPos2sv(const GLshort *v)
9107 {
9108 Context *context = GetValidGlobalContext();
9109 EVENT(context, GLWindowPos2sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9110 (uintptr_t)v);
9111
9112 if (context)
9113 {
9114 SCOPED_SHARE_CONTEXT_LOCK(context);
9115 bool isCallValid =
9116 (context->skipValidation() ||
9117 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9118 context->getMutableErrorSetForValidation(),
9119 angle::EntryPoint::GLWindowPos2sv) &&
9120 ValidateWindowPos2sv(context, angle::EntryPoint::GLWindowPos2sv, v)));
9121 if (isCallValid)
9122 {
9123 context->windowPos2sv(v);
9124 }
9125 ANGLE_CAPTURE_GL(WindowPos2sv, isCallValid, context, v);
9126 }
9127 else
9128 {
9129 GenerateContextLostErrorOnCurrentGlobalContext();
9130 }
9131 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9132 }
9133
GL_WindowPos3d(GLdouble x,GLdouble y,GLdouble z)9134 void GL_APIENTRY GL_WindowPos3d(GLdouble x, GLdouble y, GLdouble z)
9135 {
9136 Context *context = GetValidGlobalContext();
9137 EVENT(context, GLWindowPos3d, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
9138
9139 if (context)
9140 {
9141 SCOPED_SHARE_CONTEXT_LOCK(context);
9142 bool isCallValid =
9143 (context->skipValidation() ||
9144 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9145 context->getMutableErrorSetForValidation(),
9146 angle::EntryPoint::GLWindowPos3d) &&
9147 ValidateWindowPos3d(context, angle::EntryPoint::GLWindowPos3d, x, y, z)));
9148 if (isCallValid)
9149 {
9150 context->windowPos3d(x, y, z);
9151 }
9152 ANGLE_CAPTURE_GL(WindowPos3d, isCallValid, context, x, y, z);
9153 }
9154 else
9155 {
9156 GenerateContextLostErrorOnCurrentGlobalContext();
9157 }
9158 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9159 }
9160
GL_WindowPos3dv(const GLdouble * v)9161 void GL_APIENTRY GL_WindowPos3dv(const GLdouble *v)
9162 {
9163 Context *context = GetValidGlobalContext();
9164 EVENT(context, GLWindowPos3dv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9165 (uintptr_t)v);
9166
9167 if (context)
9168 {
9169 SCOPED_SHARE_CONTEXT_LOCK(context);
9170 bool isCallValid =
9171 (context->skipValidation() ||
9172 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9173 context->getMutableErrorSetForValidation(),
9174 angle::EntryPoint::GLWindowPos3dv) &&
9175 ValidateWindowPos3dv(context, angle::EntryPoint::GLWindowPos3dv, v)));
9176 if (isCallValid)
9177 {
9178 context->windowPos3dv(v);
9179 }
9180 ANGLE_CAPTURE_GL(WindowPos3dv, isCallValid, context, v);
9181 }
9182 else
9183 {
9184 GenerateContextLostErrorOnCurrentGlobalContext();
9185 }
9186 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9187 }
9188
GL_WindowPos3f(GLfloat x,GLfloat y,GLfloat z)9189 void GL_APIENTRY GL_WindowPos3f(GLfloat x, GLfloat y, GLfloat z)
9190 {
9191 Context *context = GetValidGlobalContext();
9192 EVENT(context, GLWindowPos3f, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
9193
9194 if (context)
9195 {
9196 SCOPED_SHARE_CONTEXT_LOCK(context);
9197 bool isCallValid =
9198 (context->skipValidation() ||
9199 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9200 context->getMutableErrorSetForValidation(),
9201 angle::EntryPoint::GLWindowPos3f) &&
9202 ValidateWindowPos3f(context, angle::EntryPoint::GLWindowPos3f, x, y, z)));
9203 if (isCallValid)
9204 {
9205 context->windowPos3f(x, y, z);
9206 }
9207 ANGLE_CAPTURE_GL(WindowPos3f, isCallValid, context, x, y, z);
9208 }
9209 else
9210 {
9211 GenerateContextLostErrorOnCurrentGlobalContext();
9212 }
9213 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9214 }
9215
GL_WindowPos3fv(const GLfloat * v)9216 void GL_APIENTRY GL_WindowPos3fv(const GLfloat *v)
9217 {
9218 Context *context = GetValidGlobalContext();
9219 EVENT(context, GLWindowPos3fv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9220 (uintptr_t)v);
9221
9222 if (context)
9223 {
9224 SCOPED_SHARE_CONTEXT_LOCK(context);
9225 bool isCallValid =
9226 (context->skipValidation() ||
9227 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9228 context->getMutableErrorSetForValidation(),
9229 angle::EntryPoint::GLWindowPos3fv) &&
9230 ValidateWindowPos3fv(context, angle::EntryPoint::GLWindowPos3fv, v)));
9231 if (isCallValid)
9232 {
9233 context->windowPos3fv(v);
9234 }
9235 ANGLE_CAPTURE_GL(WindowPos3fv, isCallValid, context, v);
9236 }
9237 else
9238 {
9239 GenerateContextLostErrorOnCurrentGlobalContext();
9240 }
9241 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9242 }
9243
GL_WindowPos3i(GLint x,GLint y,GLint z)9244 void GL_APIENTRY GL_WindowPos3i(GLint x, GLint y, GLint z)
9245 {
9246 Context *context = GetValidGlobalContext();
9247 EVENT(context, GLWindowPos3i, "context = %d, x = %d, y = %d, z = %d", CID(context), x, y, z);
9248
9249 if (context)
9250 {
9251 SCOPED_SHARE_CONTEXT_LOCK(context);
9252 bool isCallValid =
9253 (context->skipValidation() ||
9254 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9255 context->getMutableErrorSetForValidation(),
9256 angle::EntryPoint::GLWindowPos3i) &&
9257 ValidateWindowPos3i(context, angle::EntryPoint::GLWindowPos3i, x, y, z)));
9258 if (isCallValid)
9259 {
9260 context->windowPos3i(x, y, z);
9261 }
9262 ANGLE_CAPTURE_GL(WindowPos3i, isCallValid, context, x, y, z);
9263 }
9264 else
9265 {
9266 GenerateContextLostErrorOnCurrentGlobalContext();
9267 }
9268 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9269 }
9270
GL_WindowPos3iv(const GLint * v)9271 void GL_APIENTRY GL_WindowPos3iv(const GLint *v)
9272 {
9273 Context *context = GetValidGlobalContext();
9274 EVENT(context, GLWindowPos3iv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9275 (uintptr_t)v);
9276
9277 if (context)
9278 {
9279 SCOPED_SHARE_CONTEXT_LOCK(context);
9280 bool isCallValid =
9281 (context->skipValidation() ||
9282 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9283 context->getMutableErrorSetForValidation(),
9284 angle::EntryPoint::GLWindowPos3iv) &&
9285 ValidateWindowPos3iv(context, angle::EntryPoint::GLWindowPos3iv, v)));
9286 if (isCallValid)
9287 {
9288 context->windowPos3iv(v);
9289 }
9290 ANGLE_CAPTURE_GL(WindowPos3iv, isCallValid, context, v);
9291 }
9292 else
9293 {
9294 GenerateContextLostErrorOnCurrentGlobalContext();
9295 }
9296 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9297 }
9298
GL_WindowPos3s(GLshort x,GLshort y,GLshort z)9299 void GL_APIENTRY GL_WindowPos3s(GLshort x, GLshort y, GLshort z)
9300 {
9301 Context *context = GetValidGlobalContext();
9302 EVENT(context, GLWindowPos3s, "context = %d, x = %d, y = %d, z = %d", CID(context), x, y, z);
9303
9304 if (context)
9305 {
9306 SCOPED_SHARE_CONTEXT_LOCK(context);
9307 bool isCallValid =
9308 (context->skipValidation() ||
9309 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9310 context->getMutableErrorSetForValidation(),
9311 angle::EntryPoint::GLWindowPos3s) &&
9312 ValidateWindowPos3s(context, angle::EntryPoint::GLWindowPos3s, x, y, z)));
9313 if (isCallValid)
9314 {
9315 context->windowPos3s(x, y, z);
9316 }
9317 ANGLE_CAPTURE_GL(WindowPos3s, isCallValid, context, x, y, z);
9318 }
9319 else
9320 {
9321 GenerateContextLostErrorOnCurrentGlobalContext();
9322 }
9323 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9324 }
9325
GL_WindowPos3sv(const GLshort * v)9326 void GL_APIENTRY GL_WindowPos3sv(const GLshort *v)
9327 {
9328 Context *context = GetValidGlobalContext();
9329 EVENT(context, GLWindowPos3sv, "context = %d, v = 0x%016" PRIxPTR "", CID(context),
9330 (uintptr_t)v);
9331
9332 if (context)
9333 {
9334 SCOPED_SHARE_CONTEXT_LOCK(context);
9335 bool isCallValid =
9336 (context->skipValidation() ||
9337 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9338 context->getMutableErrorSetForValidation(),
9339 angle::EntryPoint::GLWindowPos3sv) &&
9340 ValidateWindowPos3sv(context, angle::EntryPoint::GLWindowPos3sv, v)));
9341 if (isCallValid)
9342 {
9343 context->windowPos3sv(v);
9344 }
9345 ANGLE_CAPTURE_GL(WindowPos3sv, isCallValid, context, v);
9346 }
9347 else
9348 {
9349 GenerateContextLostErrorOnCurrentGlobalContext();
9350 }
9351 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9352 }
9353
9354 // GL 1.5
GL_GetBufferSubData(GLenum target,GLintptr offset,GLsizeiptr size,void * data)9355 void GL_APIENTRY GL_GetBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, void *data)
9356 {
9357 Context *context = GetValidGlobalContext();
9358 EVENT(context, GLGetBufferSubData,
9359 "context = %d, target = %s, offset = %llu, size = %llu, data = 0x%016" PRIxPTR "",
9360 CID(context), GLenumToString(BigGLEnum::BufferTargetARB, target),
9361 static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
9362 (uintptr_t)data);
9363
9364 if (context)
9365 {
9366 SCOPED_SHARE_CONTEXT_LOCK(context);
9367 bool isCallValid = (context->skipValidation() ||
9368 ValidateGetBufferSubData(context, angle::EntryPoint::GLGetBufferSubData,
9369 target, offset, size, data));
9370 if (isCallValid)
9371 {
9372 context->getBufferSubData(target, offset, size, data);
9373 }
9374 ANGLE_CAPTURE_GL(GetBufferSubData, isCallValid, context, target, offset, size, data);
9375 }
9376 else
9377 {
9378 GenerateContextLostErrorOnCurrentGlobalContext();
9379 }
9380 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9381 }
9382
GL_GetQueryObjectiv(GLuint id,GLenum pname,GLint * params)9383 void GL_APIENTRY GL_GetQueryObjectiv(GLuint id, GLenum pname, GLint *params)
9384 {
9385 Context *context = GetGlobalContext();
9386 EVENT(context, GLGetQueryObjectiv,
9387 "context = %d, id = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), id,
9388 GLenumToString(BigGLEnum::QueryObjectParameterName, pname), (uintptr_t)params);
9389
9390 if (context)
9391 {
9392 QueryID idPacked = PackParam<QueryID>(id);
9393 SCOPED_SHARE_CONTEXT_LOCK(context);
9394 bool isCallValid = (context->skipValidation() ||
9395 ValidateGetQueryObjectiv(context, angle::EntryPoint::GLGetQueryObjectiv,
9396 idPacked, pname, params));
9397 if (isCallValid)
9398 {
9399 context->getQueryObjectiv(idPacked, pname, params);
9400 }
9401 ANGLE_CAPTURE_GL(GetQueryObjectiv, isCallValid, context, idPacked, pname, params);
9402 }
9403 else
9404 {
9405 }
9406 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9407 }
9408
GL_MapBuffer(GLenum target,GLenum access)9409 void *GL_APIENTRY GL_MapBuffer(GLenum target, GLenum access)
9410 {
9411 Context *context = GetValidGlobalContext();
9412 EVENT(context, GLMapBuffer, "context = %d, target = %s, access = %s", CID(context),
9413 GLenumToString(BigGLEnum::BufferTargetARB, target),
9414 GLenumToString(BigGLEnum::BufferAccessARB, access));
9415
9416 void *returnValue;
9417 if (context)
9418 {
9419 BufferBinding targetPacked = PackParam<BufferBinding>(target);
9420 SCOPED_SHARE_CONTEXT_LOCK(context);
9421 bool isCallValid =
9422 (context->skipValidation() ||
9423 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
9424 context->getMutableErrorSetForValidation(),
9425 angle::EntryPoint::GLMapBuffer) &&
9426 ValidateMapBuffer(context, angle::EntryPoint::GLMapBuffer, targetPacked, access)));
9427 if (isCallValid)
9428 {
9429 returnValue = context->mapBuffer(targetPacked, access);
9430 }
9431 else
9432 {
9433 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBuffer, void *>();
9434 }
9435 ANGLE_CAPTURE_GL(MapBuffer, isCallValid, context, targetPacked, access, returnValue);
9436 }
9437 else
9438 {
9439 GenerateContextLostErrorOnCurrentGlobalContext();
9440 returnValue = GetDefaultReturnValue<angle::EntryPoint::GLMapBuffer, void *>();
9441 }
9442 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
9443 return returnValue;
9444 }
9445
9446 } // extern "C"
9447