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_gles_1_0_autogen.cpp:
9 // Defines the GLES 1.0 entry points.
10
11 #include "libGLESv2/entry_points_gles_1_0_autogen.h"
12
13 #include "common/entry_points_enum_autogen.h"
14 #include "common/gl_enum_utils.h"
15 #include "libANGLE/Context.h"
16 #include "libANGLE/Context.inl.h"
17 #include "libANGLE/capture/capture_gles_1_0_autogen.h"
18 #include "libANGLE/context_private_call_gles_autogen.h"
19 #include "libANGLE/entry_points_utils.h"
20 #include "libANGLE/validationES1.h"
21 #include "libGLESv2/global_state.h"
22
23 using namespace gl;
24
25 extern "C" {
GL_AlphaFunc(GLenum func,GLfloat ref)26 void GL_APIENTRY GL_AlphaFunc(GLenum func, GLfloat ref)
27 {
28 Context *context = GetValidGlobalContext();
29 EVENT(context, GLAlphaFunc, "context = %d, func = %s, ref = %f", CID(context),
30 GLenumToString(GLESEnum::AlphaFunction, func), ref);
31
32 if (context)
33 {
34 AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func);
35 bool isCallValid =
36 (context->skipValidation() ||
37 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
38 context->getMutableErrorSetForValidation(),
39 angle::EntryPoint::GLAlphaFunc) &&
40 ValidateAlphaFunc(context->getPrivateState(),
41 context->getMutableErrorSetForValidation(),
42 angle::EntryPoint::GLAlphaFunc, funcPacked, ref)));
43 if (isCallValid)
44 {
45 ContextPrivateAlphaFunc(context->getMutablePrivateState(),
46 context->getMutablePrivateStateCache(), funcPacked, ref);
47 }
48 ANGLE_CAPTURE_GL(AlphaFunc, isCallValid, context, funcPacked, ref);
49 }
50 else
51 {
52 GenerateContextLostErrorOnCurrentGlobalContext();
53 }
54 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
55 }
56
GL_AlphaFuncx(GLenum func,GLfixed ref)57 void GL_APIENTRY GL_AlphaFuncx(GLenum func, GLfixed ref)
58 {
59 Context *context = GetValidGlobalContext();
60 EVENT(context, GLAlphaFuncx, "context = %d, func = %s, ref = 0x%X", CID(context),
61 GLenumToString(GLESEnum::AlphaFunction, func), ref);
62
63 if (context)
64 {
65 AlphaTestFunc funcPacked = PackParam<AlphaTestFunc>(func);
66 bool isCallValid =
67 (context->skipValidation() ||
68 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
69 context->getMutableErrorSetForValidation(),
70 angle::EntryPoint::GLAlphaFuncx) &&
71 ValidateAlphaFuncx(context->getPrivateState(),
72 context->getMutableErrorSetForValidation(),
73 angle::EntryPoint::GLAlphaFuncx, funcPacked, ref)));
74 if (isCallValid)
75 {
76 ContextPrivateAlphaFuncx(context->getMutablePrivateState(),
77 context->getMutablePrivateStateCache(), funcPacked, ref);
78 }
79 ANGLE_CAPTURE_GL(AlphaFuncx, isCallValid, context, funcPacked, ref);
80 }
81 else
82 {
83 GenerateContextLostErrorOnCurrentGlobalContext();
84 }
85 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
86 }
87
GL_ClearColorx(GLfixed red,GLfixed green,GLfixed blue,GLfixed alpha)88 void GL_APIENTRY GL_ClearColorx(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
89 {
90 Context *context = GetValidGlobalContext();
91 EVENT(context, GLClearColorx,
92 "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X", CID(context), red,
93 green, blue, alpha);
94
95 if (context)
96 {
97 bool isCallValid =
98 (context->skipValidation() ||
99 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
100 context->getMutableErrorSetForValidation(),
101 angle::EntryPoint::GLClearColorx) &&
102 ValidateClearColorx(context->getPrivateState(),
103 context->getMutableErrorSetForValidation(),
104 angle::EntryPoint::GLClearColorx, red, green, blue, alpha)));
105 if (isCallValid)
106 {
107 ContextPrivateClearColorx(context->getMutablePrivateState(),
108 context->getMutablePrivateStateCache(), red, green, blue,
109 alpha);
110 }
111 ANGLE_CAPTURE_GL(ClearColorx, isCallValid, context, red, green, blue, alpha);
112 }
113 else
114 {
115 GenerateContextLostErrorOnCurrentGlobalContext();
116 }
117 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
118 }
119
GL_ClearDepthx(GLfixed depth)120 void GL_APIENTRY GL_ClearDepthx(GLfixed depth)
121 {
122 Context *context = GetValidGlobalContext();
123 EVENT(context, GLClearDepthx, "context = %d, depth = 0x%X", CID(context), depth);
124
125 if (context)
126 {
127 bool isCallValid =
128 (context->skipValidation() ||
129 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
130 context->getMutableErrorSetForValidation(),
131 angle::EntryPoint::GLClearDepthx) &&
132 ValidateClearDepthx(context->getPrivateState(),
133 context->getMutableErrorSetForValidation(),
134 angle::EntryPoint::GLClearDepthx, depth)));
135 if (isCallValid)
136 {
137 ContextPrivateClearDepthx(context->getMutablePrivateState(),
138 context->getMutablePrivateStateCache(), depth);
139 }
140 ANGLE_CAPTURE_GL(ClearDepthx, isCallValid, context, depth);
141 }
142 else
143 {
144 GenerateContextLostErrorOnCurrentGlobalContext();
145 }
146 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
147 }
148
GL_ClientActiveTexture(GLenum texture)149 void GL_APIENTRY GL_ClientActiveTexture(GLenum texture)
150 {
151 Context *context = GetValidGlobalContext();
152 EVENT(context, GLClientActiveTexture, "context = %d, texture = %s", CID(context),
153 GLenumToString(GLESEnum::TextureUnit, texture));
154
155 if (context)
156 {
157 SCOPED_SHARE_CONTEXT_LOCK(context);
158 bool isCallValid =
159 (context->skipValidation() ||
160 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
161 context->getMutableErrorSetForValidation(),
162 angle::EntryPoint::GLClientActiveTexture) &&
163 ValidateClientActiveTexture(context, angle::EntryPoint::GLClientActiveTexture,
164 texture)));
165 if (isCallValid)
166 {
167 context->clientActiveTexture(texture);
168 }
169 ANGLE_CAPTURE_GL(ClientActiveTexture, isCallValid, context, texture);
170 }
171 else
172 {
173 GenerateContextLostErrorOnCurrentGlobalContext();
174 }
175 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
176 }
177
GL_ClipPlanef(GLenum p,const GLfloat * eqn)178 void GL_APIENTRY GL_ClipPlanef(GLenum p, const GLfloat *eqn)
179 {
180 Context *context = GetValidGlobalContext();
181 EVENT(context, GLClipPlanef, "context = %d, p = %s, eqn = 0x%016" PRIxPTR "", CID(context),
182 GLenumToString(GLESEnum::ClipPlaneName, p), (uintptr_t)eqn);
183
184 if (context)
185 {
186 bool isCallValid =
187 (context->skipValidation() ||
188 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
189 context->getMutableErrorSetForValidation(),
190 angle::EntryPoint::GLClipPlanef) &&
191 ValidateClipPlanef(context->getPrivateState(),
192 context->getMutableErrorSetForValidation(),
193 angle::EntryPoint::GLClipPlanef, p, eqn)));
194 if (isCallValid)
195 {
196 ContextPrivateClipPlanef(context->getMutablePrivateState(),
197 context->getMutablePrivateStateCache(), p, eqn);
198 }
199 ANGLE_CAPTURE_GL(ClipPlanef, isCallValid, context, p, eqn);
200 }
201 else
202 {
203 GenerateContextLostErrorOnCurrentGlobalContext();
204 }
205 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
206 }
207
GL_ClipPlanex(GLenum plane,const GLfixed * equation)208 void GL_APIENTRY GL_ClipPlanex(GLenum plane, const GLfixed *equation)
209 {
210 Context *context = GetValidGlobalContext();
211 EVENT(context, GLClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
212 CID(context), GLenumToString(GLESEnum::ClipPlaneName, plane), (uintptr_t)equation);
213
214 if (context)
215 {
216 bool isCallValid =
217 (context->skipValidation() ||
218 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
219 context->getMutableErrorSetForValidation(),
220 angle::EntryPoint::GLClipPlanex) &&
221 ValidateClipPlanex(context->getPrivateState(),
222 context->getMutableErrorSetForValidation(),
223 angle::EntryPoint::GLClipPlanex, plane, equation)));
224 if (isCallValid)
225 {
226 ContextPrivateClipPlanex(context->getMutablePrivateState(),
227 context->getMutablePrivateStateCache(), plane, equation);
228 }
229 ANGLE_CAPTURE_GL(ClipPlanex, isCallValid, context, plane, equation);
230 }
231 else
232 {
233 GenerateContextLostErrorOnCurrentGlobalContext();
234 }
235 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
236 }
237
GL_Color4f(GLfloat red,GLfloat green,GLfloat blue,GLfloat alpha)238 void GL_APIENTRY GL_Color4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
239 {
240 Context *context = GetValidGlobalContext();
241 EVENT(context, GLColor4f, "context = %d, red = %f, green = %f, blue = %f, alpha = %f",
242 CID(context), red, green, blue, alpha);
243
244 if (context)
245 {
246 bool isCallValid =
247 (context->skipValidation() ||
248 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
249 context->getMutableErrorSetForValidation(),
250 angle::EntryPoint::GLColor4f) &&
251 ValidateColor4f(context->getPrivateState(),
252 context->getMutableErrorSetForValidation(),
253 angle::EntryPoint::GLColor4f, red, green, blue, alpha)));
254 if (isCallValid)
255 {
256 ContextPrivateColor4f(context->getMutablePrivateState(),
257 context->getMutablePrivateStateCache(), red, green, blue, alpha);
258 }
259 ANGLE_CAPTURE_GL(Color4f, isCallValid, context, red, green, blue, alpha);
260 }
261 else
262 {
263 GenerateContextLostErrorOnCurrentGlobalContext();
264 }
265 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
266 }
267
GL_Color4ub(GLubyte red,GLubyte green,GLubyte blue,GLubyte alpha)268 void GL_APIENTRY GL_Color4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
269 {
270 Context *context = GetValidGlobalContext();
271 EVENT(context, GLColor4ub, "context = %d, red = %d, green = %d, blue = %d, alpha = %d",
272 CID(context), red, green, blue, alpha);
273
274 if (context)
275 {
276 bool isCallValid =
277 (context->skipValidation() ||
278 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
279 context->getMutableErrorSetForValidation(),
280 angle::EntryPoint::GLColor4ub) &&
281 ValidateColor4ub(context->getPrivateState(),
282 context->getMutableErrorSetForValidation(),
283 angle::EntryPoint::GLColor4ub, red, green, blue, alpha)));
284 if (isCallValid)
285 {
286 ContextPrivateColor4ub(context->getMutablePrivateState(),
287 context->getMutablePrivateStateCache(), red, green, blue, alpha);
288 }
289 ANGLE_CAPTURE_GL(Color4ub, isCallValid, context, red, green, blue, alpha);
290 }
291 else
292 {
293 GenerateContextLostErrorOnCurrentGlobalContext();
294 }
295 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
296 }
297
GL_Color4x(GLfixed red,GLfixed green,GLfixed blue,GLfixed alpha)298 void GL_APIENTRY GL_Color4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha)
299 {
300 Context *context = GetValidGlobalContext();
301 EVENT(context, GLColor4x, "context = %d, red = 0x%X, green = 0x%X, blue = 0x%X, alpha = 0x%X",
302 CID(context), red, green, blue, alpha);
303
304 if (context)
305 {
306 bool isCallValid =
307 (context->skipValidation() ||
308 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
309 context->getMutableErrorSetForValidation(),
310 angle::EntryPoint::GLColor4x) &&
311 ValidateColor4x(context->getPrivateState(),
312 context->getMutableErrorSetForValidation(),
313 angle::EntryPoint::GLColor4x, red, green, blue, alpha)));
314 if (isCallValid)
315 {
316 ContextPrivateColor4x(context->getMutablePrivateState(),
317 context->getMutablePrivateStateCache(), red, green, blue, alpha);
318 }
319 ANGLE_CAPTURE_GL(Color4x, isCallValid, context, red, green, blue, alpha);
320 }
321 else
322 {
323 GenerateContextLostErrorOnCurrentGlobalContext();
324 }
325 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
326 }
327
GL_ColorPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)328 void GL_APIENTRY GL_ColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
329 {
330 Context *context = GetValidGlobalContext();
331 EVENT(context, GLColorPointer,
332 "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
333 CID(context), size, GLenumToString(GLESEnum::ColorPointerType, type), stride,
334 (uintptr_t)pointer);
335
336 if (context)
337 {
338 VertexAttribType typePacked = PackParam<VertexAttribType>(type);
339 SCOPED_SHARE_CONTEXT_LOCK(context);
340 bool isCallValid =
341 (context->skipValidation() ||
342 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
343 context->getMutableErrorSetForValidation(),
344 angle::EntryPoint::GLColorPointer) &&
345 ValidateColorPointer(context, angle::EntryPoint::GLColorPointer, size, typePacked,
346 stride, pointer)));
347 if (isCallValid)
348 {
349 context->colorPointer(size, typePacked, stride, pointer);
350 }
351 ANGLE_CAPTURE_GL(ColorPointer, isCallValid, context, size, typePacked, stride, pointer);
352 }
353 else
354 {
355 GenerateContextLostErrorOnCurrentGlobalContext();
356 }
357 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
358 }
359
GL_DepthRangex(GLfixed n,GLfixed f)360 void GL_APIENTRY GL_DepthRangex(GLfixed n, GLfixed f)
361 {
362 Context *context = GetValidGlobalContext();
363 EVENT(context, GLDepthRangex, "context = %d, n = 0x%X, f = 0x%X", CID(context), n, f);
364
365 if (context)
366 {
367 bool isCallValid =
368 (context->skipValidation() ||
369 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
370 context->getMutableErrorSetForValidation(),
371 angle::EntryPoint::GLDepthRangex) &&
372 ValidateDepthRangex(context->getPrivateState(),
373 context->getMutableErrorSetForValidation(),
374 angle::EntryPoint::GLDepthRangex, n, f)));
375 if (isCallValid)
376 {
377 ContextPrivateDepthRangex(context->getMutablePrivateState(),
378 context->getMutablePrivateStateCache(), n, f);
379 }
380 ANGLE_CAPTURE_GL(DepthRangex, isCallValid, context, n, f);
381 }
382 else
383 {
384 GenerateContextLostErrorOnCurrentGlobalContext();
385 }
386 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
387 }
388
GL_DisableClientState(GLenum array)389 void GL_APIENTRY GL_DisableClientState(GLenum array)
390 {
391 Context *context = GetValidGlobalContext();
392 EVENT(context, GLDisableClientState, "context = %d, array = %s", CID(context),
393 GLenumToString(GLESEnum::EnableCap, array));
394
395 if (context)
396 {
397 ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array);
398 SCOPED_SHARE_CONTEXT_LOCK(context);
399 bool isCallValid =
400 (context->skipValidation() ||
401 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
402 context->getMutableErrorSetForValidation(),
403 angle::EntryPoint::GLDisableClientState) &&
404 ValidateDisableClientState(context, angle::EntryPoint::GLDisableClientState,
405 arrayPacked)));
406 if (isCallValid)
407 {
408 context->disableClientState(arrayPacked);
409 }
410 ANGLE_CAPTURE_GL(DisableClientState, isCallValid, context, arrayPacked);
411 }
412 else
413 {
414 GenerateContextLostErrorOnCurrentGlobalContext();
415 }
416 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
417 }
418
GL_EnableClientState(GLenum array)419 void GL_APIENTRY GL_EnableClientState(GLenum array)
420 {
421 Context *context = GetValidGlobalContext();
422 EVENT(context, GLEnableClientState, "context = %d, array = %s", CID(context),
423 GLenumToString(GLESEnum::EnableCap, array));
424
425 if (context)
426 {
427 ClientVertexArrayType arrayPacked = PackParam<ClientVertexArrayType>(array);
428 SCOPED_SHARE_CONTEXT_LOCK(context);
429 bool isCallValid = (context->skipValidation() ||
430 ValidateEnableClientState(
431 context, angle::EntryPoint::GLEnableClientState, arrayPacked));
432 if (isCallValid)
433 {
434 context->enableClientState(arrayPacked);
435 }
436 ANGLE_CAPTURE_GL(EnableClientState, isCallValid, context, arrayPacked);
437 }
438 else
439 {
440 GenerateContextLostErrorOnCurrentGlobalContext();
441 }
442 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
443 }
444
GL_Fogf(GLenum pname,GLfloat param)445 void GL_APIENTRY GL_Fogf(GLenum pname, GLfloat param)
446 {
447 Context *context = GetValidGlobalContext();
448 EVENT(context, GLFogf, "context = %d, pname = %s, param = %f", CID(context),
449 GLenumToString(GLESEnum::FogParameter, pname), param);
450
451 if (context)
452 {
453 bool isCallValid =
454 (context->skipValidation() ||
455 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
456 context->getMutableErrorSetForValidation(),
457 angle::EntryPoint::GLFogf) &&
458 ValidateFogf(context->getPrivateState(), context->getMutableErrorSetForValidation(),
459 angle::EntryPoint::GLFogf, pname, param)));
460 if (isCallValid)
461 {
462 ContextPrivateFogf(context->getMutablePrivateState(),
463 context->getMutablePrivateStateCache(), pname, param);
464 }
465 ANGLE_CAPTURE_GL(Fogf, isCallValid, context, pname, param);
466 }
467 else
468 {
469 GenerateContextLostErrorOnCurrentGlobalContext();
470 }
471 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
472 }
473
GL_Fogfv(GLenum pname,const GLfloat * params)474 void GL_APIENTRY GL_Fogfv(GLenum pname, const GLfloat *params)
475 {
476 Context *context = GetValidGlobalContext();
477 EVENT(context, GLFogfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
478 GLenumToString(GLESEnum::FogParameter, pname), (uintptr_t)params);
479
480 if (context)
481 {
482 bool isCallValid =
483 (context->skipValidation() ||
484 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
485 context->getMutableErrorSetForValidation(),
486 angle::EntryPoint::GLFogfv) &&
487 ValidateFogfv(context->getPrivateState(), context->getMutableErrorSetForValidation(),
488 angle::EntryPoint::GLFogfv, pname, params)));
489 if (isCallValid)
490 {
491 ContextPrivateFogfv(context->getMutablePrivateState(),
492 context->getMutablePrivateStateCache(), pname, params);
493 }
494 ANGLE_CAPTURE_GL(Fogfv, isCallValid, context, pname, params);
495 }
496 else
497 {
498 GenerateContextLostErrorOnCurrentGlobalContext();
499 }
500 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
501 }
502
GL_Fogx(GLenum pname,GLfixed param)503 void GL_APIENTRY GL_Fogx(GLenum pname, GLfixed param)
504 {
505 Context *context = GetValidGlobalContext();
506 EVENT(context, GLFogx, "context = %d, pname = %s, param = 0x%X", CID(context),
507 GLenumToString(GLESEnum::FogPName, pname), param);
508
509 if (context)
510 {
511 bool isCallValid =
512 (context->skipValidation() ||
513 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
514 context->getMutableErrorSetForValidation(),
515 angle::EntryPoint::GLFogx) &&
516 ValidateFogx(context->getPrivateState(), context->getMutableErrorSetForValidation(),
517 angle::EntryPoint::GLFogx, pname, param)));
518 if (isCallValid)
519 {
520 ContextPrivateFogx(context->getMutablePrivateState(),
521 context->getMutablePrivateStateCache(), pname, param);
522 }
523 ANGLE_CAPTURE_GL(Fogx, isCallValid, context, pname, param);
524 }
525 else
526 {
527 GenerateContextLostErrorOnCurrentGlobalContext();
528 }
529 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
530 }
531
GL_Fogxv(GLenum pname,const GLfixed * param)532 void GL_APIENTRY GL_Fogxv(GLenum pname, const GLfixed *param)
533 {
534 Context *context = GetValidGlobalContext();
535 EVENT(context, GLFogxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "", CID(context),
536 GLenumToString(GLESEnum::FogPName, pname), (uintptr_t)param);
537
538 if (context)
539 {
540 bool isCallValid =
541 (context->skipValidation() ||
542 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
543 context->getMutableErrorSetForValidation(),
544 angle::EntryPoint::GLFogxv) &&
545 ValidateFogxv(context->getPrivateState(), context->getMutableErrorSetForValidation(),
546 angle::EntryPoint::GLFogxv, pname, param)));
547 if (isCallValid)
548 {
549 ContextPrivateFogxv(context->getMutablePrivateState(),
550 context->getMutablePrivateStateCache(), pname, param);
551 }
552 ANGLE_CAPTURE_GL(Fogxv, isCallValid, context, pname, param);
553 }
554 else
555 {
556 GenerateContextLostErrorOnCurrentGlobalContext();
557 }
558 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
559 }
560
GL_Frustumf(GLfloat l,GLfloat r,GLfloat b,GLfloat t,GLfloat n,GLfloat f)561 void GL_APIENTRY GL_Frustumf(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
562 {
563 Context *context = GetValidGlobalContext();
564 EVENT(context, GLFrustumf, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f",
565 CID(context), l, r, b, t, n, f);
566
567 if (context)
568 {
569 bool isCallValid =
570 (context->skipValidation() ||
571 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
572 context->getMutableErrorSetForValidation(),
573 angle::EntryPoint::GLFrustumf) &&
574 ValidateFrustumf(context->getPrivateState(),
575 context->getMutableErrorSetForValidation(),
576 angle::EntryPoint::GLFrustumf, l, r, b, t, n, f)));
577 if (isCallValid)
578 {
579 ContextPrivateFrustumf(context->getMutablePrivateState(),
580 context->getMutablePrivateStateCache(), l, r, b, t, n, f);
581 }
582 ANGLE_CAPTURE_GL(Frustumf, isCallValid, context, l, r, b, t, n, f);
583 }
584 else
585 {
586 GenerateContextLostErrorOnCurrentGlobalContext();
587 }
588 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
589 }
590
GL_Frustumx(GLfixed l,GLfixed r,GLfixed b,GLfixed t,GLfixed n,GLfixed f)591 void GL_APIENTRY GL_Frustumx(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
592 {
593 Context *context = GetValidGlobalContext();
594 EVENT(context, GLFrustumx,
595 "context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context),
596 l, r, b, t, n, f);
597
598 if (context)
599 {
600 bool isCallValid =
601 (context->skipValidation() ||
602 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
603 context->getMutableErrorSetForValidation(),
604 angle::EntryPoint::GLFrustumx) &&
605 ValidateFrustumx(context->getPrivateState(),
606 context->getMutableErrorSetForValidation(),
607 angle::EntryPoint::GLFrustumx, l, r, b, t, n, f)));
608 if (isCallValid)
609 {
610 ContextPrivateFrustumx(context->getMutablePrivateState(),
611 context->getMutablePrivateStateCache(), l, r, b, t, n, f);
612 }
613 ANGLE_CAPTURE_GL(Frustumx, isCallValid, context, l, r, b, t, n, f);
614 }
615 else
616 {
617 GenerateContextLostErrorOnCurrentGlobalContext();
618 }
619 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
620 }
621
GL_GetClipPlanef(GLenum plane,GLfloat * equation)622 void GL_APIENTRY GL_GetClipPlanef(GLenum plane, GLfloat *equation)
623 {
624 Context *context = GetValidGlobalContext();
625 EVENT(context, GLGetClipPlanef, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
626 CID(context), GLenumToString(GLESEnum::ClipPlaneName, plane), (uintptr_t)equation);
627
628 if (context)
629 {
630 bool isCallValid =
631 (context->skipValidation() ||
632 ValidateGetClipPlanef(context->getPrivateState(),
633 context->getMutableErrorSetForValidation(),
634 angle::EntryPoint::GLGetClipPlanef, plane, equation));
635 if (isCallValid)
636 {
637 ContextPrivateGetClipPlanef(context->getMutablePrivateState(),
638 context->getMutablePrivateStateCache(), plane, equation);
639 }
640 ANGLE_CAPTURE_GL(GetClipPlanef, isCallValid, context, plane, equation);
641 }
642 else
643 {
644 GenerateContextLostErrorOnCurrentGlobalContext();
645 }
646 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
647 }
648
GL_GetClipPlanex(GLenum plane,GLfixed * equation)649 void GL_APIENTRY GL_GetClipPlanex(GLenum plane, GLfixed *equation)
650 {
651 Context *context = GetValidGlobalContext();
652 EVENT(context, GLGetClipPlanex, "context = %d, plane = %s, equation = 0x%016" PRIxPTR "",
653 CID(context), GLenumToString(GLESEnum::ClipPlaneName, plane), (uintptr_t)equation);
654
655 if (context)
656 {
657 bool isCallValid =
658 (context->skipValidation() ||
659 ValidateGetClipPlanex(context->getPrivateState(),
660 context->getMutableErrorSetForValidation(),
661 angle::EntryPoint::GLGetClipPlanex, plane, equation));
662 if (isCallValid)
663 {
664 ContextPrivateGetClipPlanex(context->getMutablePrivateState(),
665 context->getMutablePrivateStateCache(), plane, equation);
666 }
667 ANGLE_CAPTURE_GL(GetClipPlanex, isCallValid, context, plane, equation);
668 }
669 else
670 {
671 GenerateContextLostErrorOnCurrentGlobalContext();
672 }
673 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
674 }
675
GL_GetFixedv(GLenum pname,GLfixed * params)676 void GL_APIENTRY GL_GetFixedv(GLenum pname, GLfixed *params)
677 {
678 Context *context = GetValidGlobalContext();
679 EVENT(context, GLGetFixedv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
680 CID(context), GLenumToString(GLESEnum::GetPName, pname), (uintptr_t)params);
681
682 if (context)
683 {
684 SCOPED_SHARE_CONTEXT_LOCK(context);
685 bool isCallValid =
686 (context->skipValidation() ||
687 ValidateGetFixedv(context, angle::EntryPoint::GLGetFixedv, pname, params));
688 if (isCallValid)
689 {
690 context->getFixedv(pname, params);
691 }
692 ANGLE_CAPTURE_GL(GetFixedv, isCallValid, context, pname, params);
693 }
694 else
695 {
696 GenerateContextLostErrorOnCurrentGlobalContext();
697 }
698 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
699 }
700
GL_GetLightfv(GLenum light,GLenum pname,GLfloat * params)701 void GL_APIENTRY GL_GetLightfv(GLenum light, GLenum pname, GLfloat *params)
702 {
703 Context *context = GetValidGlobalContext();
704 EVENT(context, GLGetLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
705 CID(context), GLenumToString(GLESEnum::LightName, light),
706 GLenumToString(GLESEnum::LightParameter, pname), (uintptr_t)params);
707
708 if (context)
709 {
710 LightParameter pnamePacked = PackParam<LightParameter>(pname);
711 bool isCallValid =
712 (context->skipValidation() ||
713 ValidateGetLightfv(context->getPrivateState(),
714 context->getMutableErrorSetForValidation(),
715 angle::EntryPoint::GLGetLightfv, light, pnamePacked, params));
716 if (isCallValid)
717 {
718 ContextPrivateGetLightfv(context->getMutablePrivateState(),
719 context->getMutablePrivateStateCache(), light, pnamePacked,
720 params);
721 }
722 ANGLE_CAPTURE_GL(GetLightfv, isCallValid, context, light, pnamePacked, params);
723 }
724 else
725 {
726 GenerateContextLostErrorOnCurrentGlobalContext();
727 }
728 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
729 }
730
GL_GetLightxv(GLenum light,GLenum pname,GLfixed * params)731 void GL_APIENTRY GL_GetLightxv(GLenum light, GLenum pname, GLfixed *params)
732 {
733 Context *context = GetValidGlobalContext();
734 EVENT(context, GLGetLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
735 CID(context), GLenumToString(GLESEnum::LightName, light),
736 GLenumToString(GLESEnum::LightParameter, pname), (uintptr_t)params);
737
738 if (context)
739 {
740 LightParameter pnamePacked = PackParam<LightParameter>(pname);
741 bool isCallValid =
742 (context->skipValidation() ||
743 ValidateGetLightxv(context->getPrivateState(),
744 context->getMutableErrorSetForValidation(),
745 angle::EntryPoint::GLGetLightxv, light, pnamePacked, params));
746 if (isCallValid)
747 {
748 ContextPrivateGetLightxv(context->getMutablePrivateState(),
749 context->getMutablePrivateStateCache(), light, pnamePacked,
750 params);
751 }
752 ANGLE_CAPTURE_GL(GetLightxv, isCallValid, context, light, pnamePacked, params);
753 }
754 else
755 {
756 GenerateContextLostErrorOnCurrentGlobalContext();
757 }
758 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
759 }
760
GL_GetMaterialfv(GLenum face,GLenum pname,GLfloat * params)761 void GL_APIENTRY GL_GetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
762 {
763 Context *context = GetValidGlobalContext();
764 EVENT(context, GLGetMaterialfv,
765 "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
766 GLenumToString(GLESEnum::TriangleFace, face),
767 GLenumToString(GLESEnum::MaterialParameter, pname), (uintptr_t)params);
768
769 if (context)
770 {
771 MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
772 bool isCallValid =
773 (context->skipValidation() ||
774 ValidateGetMaterialfv(context->getPrivateState(),
775 context->getMutableErrorSetForValidation(),
776 angle::EntryPoint::GLGetMaterialfv, face, pnamePacked, params));
777 if (isCallValid)
778 {
779 ContextPrivateGetMaterialfv(context->getMutablePrivateState(),
780 context->getMutablePrivateStateCache(), face, pnamePacked,
781 params);
782 }
783 ANGLE_CAPTURE_GL(GetMaterialfv, isCallValid, context, face, pnamePacked, params);
784 }
785 else
786 {
787 GenerateContextLostErrorOnCurrentGlobalContext();
788 }
789 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
790 }
791
GL_GetMaterialxv(GLenum face,GLenum pname,GLfixed * params)792 void GL_APIENTRY GL_GetMaterialxv(GLenum face, GLenum pname, GLfixed *params)
793 {
794 Context *context = GetValidGlobalContext();
795 EVENT(context, GLGetMaterialxv,
796 "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
797 GLenumToString(GLESEnum::TriangleFace, face),
798 GLenumToString(GLESEnum::MaterialParameter, pname), (uintptr_t)params);
799
800 if (context)
801 {
802 MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
803 bool isCallValid =
804 (context->skipValidation() ||
805 ValidateGetMaterialxv(context->getPrivateState(),
806 context->getMutableErrorSetForValidation(),
807 angle::EntryPoint::GLGetMaterialxv, face, pnamePacked, params));
808 if (isCallValid)
809 {
810 ContextPrivateGetMaterialxv(context->getMutablePrivateState(),
811 context->getMutablePrivateStateCache(), face, pnamePacked,
812 params);
813 }
814 ANGLE_CAPTURE_GL(GetMaterialxv, isCallValid, context, face, pnamePacked, params);
815 }
816 else
817 {
818 GenerateContextLostErrorOnCurrentGlobalContext();
819 }
820 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
821 }
822
GL_GetTexEnvfv(GLenum target,GLenum pname,GLfloat * params)823 void GL_APIENTRY GL_GetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
824 {
825 Context *context = GetValidGlobalContext();
826 EVENT(context, GLGetTexEnvfv,
827 "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
828 GLenumToString(GLESEnum::TextureEnvTarget, target),
829 GLenumToString(GLESEnum::TextureEnvParameter, pname), (uintptr_t)params);
830
831 if (context)
832 {
833 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
834 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
835 bool isCallValid =
836 (context->skipValidation() ||
837 ValidateGetTexEnvfv(
838 context->getPrivateState(), context->getMutableErrorSetForValidation(),
839 angle::EntryPoint::GLGetTexEnvfv, targetPacked, pnamePacked, params));
840 if (isCallValid)
841 {
842 ContextPrivateGetTexEnvfv(context->getMutablePrivateState(),
843 context->getMutablePrivateStateCache(), targetPacked,
844 pnamePacked, params);
845 }
846 ANGLE_CAPTURE_GL(GetTexEnvfv, isCallValid, context, targetPacked, pnamePacked, params);
847 }
848 else
849 {
850 GenerateContextLostErrorOnCurrentGlobalContext();
851 }
852 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
853 }
854
GL_GetTexEnviv(GLenum target,GLenum pname,GLint * params)855 void GL_APIENTRY GL_GetTexEnviv(GLenum target, GLenum pname, GLint *params)
856 {
857 Context *context = GetValidGlobalContext();
858 EVENT(context, GLGetTexEnviv,
859 "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
860 GLenumToString(GLESEnum::TextureEnvTarget, target),
861 GLenumToString(GLESEnum::TextureEnvParameter, pname), (uintptr_t)params);
862
863 if (context)
864 {
865 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
866 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
867 bool isCallValid =
868 (context->skipValidation() ||
869 ValidateGetTexEnviv(
870 context->getPrivateState(), context->getMutableErrorSetForValidation(),
871 angle::EntryPoint::GLGetTexEnviv, targetPacked, pnamePacked, params));
872 if (isCallValid)
873 {
874 ContextPrivateGetTexEnviv(context->getMutablePrivateState(),
875 context->getMutablePrivateStateCache(), targetPacked,
876 pnamePacked, params);
877 }
878 ANGLE_CAPTURE_GL(GetTexEnviv, isCallValid, context, targetPacked, pnamePacked, params);
879 }
880 else
881 {
882 GenerateContextLostErrorOnCurrentGlobalContext();
883 }
884 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
885 }
886
GL_GetTexEnvxv(GLenum target,GLenum pname,GLfixed * params)887 void GL_APIENTRY GL_GetTexEnvxv(GLenum target, GLenum pname, GLfixed *params)
888 {
889 Context *context = GetValidGlobalContext();
890 EVENT(context, GLGetTexEnvxv,
891 "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
892 GLenumToString(GLESEnum::TextureEnvTarget, target),
893 GLenumToString(GLESEnum::TextureEnvParameter, pname), (uintptr_t)params);
894
895 if (context)
896 {
897 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
898 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
899 bool isCallValid =
900 (context->skipValidation() ||
901 ValidateGetTexEnvxv(
902 context->getPrivateState(), context->getMutableErrorSetForValidation(),
903 angle::EntryPoint::GLGetTexEnvxv, targetPacked, pnamePacked, params));
904 if (isCallValid)
905 {
906 ContextPrivateGetTexEnvxv(context->getMutablePrivateState(),
907 context->getMutablePrivateStateCache(), targetPacked,
908 pnamePacked, params);
909 }
910 ANGLE_CAPTURE_GL(GetTexEnvxv, isCallValid, context, targetPacked, pnamePacked, params);
911 }
912 else
913 {
914 GenerateContextLostErrorOnCurrentGlobalContext();
915 }
916 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
917 }
918
GL_GetTexParameterxv(GLenum target,GLenum pname,GLfixed * params)919 void GL_APIENTRY GL_GetTexParameterxv(GLenum target, GLenum pname, GLfixed *params)
920 {
921 Context *context = GetValidGlobalContext();
922 EVENT(context, GLGetTexParameterxv,
923 "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
924 GLenumToString(GLESEnum::TextureTarget, target),
925 GLenumToString(GLESEnum::GetTextureParameter, pname), (uintptr_t)params);
926
927 if (context)
928 {
929 TextureType targetPacked = PackParam<TextureType>(target);
930 SCOPED_SHARE_CONTEXT_LOCK(context);
931 bool isCallValid =
932 (context->skipValidation() ||
933 ValidateGetTexParameterxv(context, angle::EntryPoint::GLGetTexParameterxv,
934 targetPacked, pname, params));
935 if (isCallValid)
936 {
937 context->getTexParameterxv(targetPacked, pname, params);
938 }
939 ANGLE_CAPTURE_GL(GetTexParameterxv, isCallValid, context, targetPacked, pname, params);
940 }
941 else
942 {
943 GenerateContextLostErrorOnCurrentGlobalContext();
944 }
945 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
946 }
947
GL_LightModelf(GLenum pname,GLfloat param)948 void GL_APIENTRY GL_LightModelf(GLenum pname, GLfloat param)
949 {
950 Context *context = GetValidGlobalContext();
951 EVENT(context, GLLightModelf, "context = %d, pname = %s, param = %f", CID(context),
952 GLenumToString(GLESEnum::LightModelParameter, pname), param);
953
954 if (context)
955 {
956 bool isCallValid =
957 (context->skipValidation() ||
958 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
959 context->getMutableErrorSetForValidation(),
960 angle::EntryPoint::GLLightModelf) &&
961 ValidateLightModelf(context->getPrivateState(),
962 context->getMutableErrorSetForValidation(),
963 angle::EntryPoint::GLLightModelf, pname, param)));
964 if (isCallValid)
965 {
966 ContextPrivateLightModelf(context->getMutablePrivateState(),
967 context->getMutablePrivateStateCache(), pname, param);
968 }
969 ANGLE_CAPTURE_GL(LightModelf, isCallValid, context, pname, param);
970 }
971 else
972 {
973 GenerateContextLostErrorOnCurrentGlobalContext();
974 }
975 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
976 }
977
GL_LightModelfv(GLenum pname,const GLfloat * params)978 void GL_APIENTRY GL_LightModelfv(GLenum pname, const GLfloat *params)
979 {
980 Context *context = GetValidGlobalContext();
981 EVENT(context, GLLightModelfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
982 CID(context), GLenumToString(GLESEnum::LightModelParameter, pname), (uintptr_t)params);
983
984 if (context)
985 {
986 bool isCallValid =
987 (context->skipValidation() ||
988 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
989 context->getMutableErrorSetForValidation(),
990 angle::EntryPoint::GLLightModelfv) &&
991 ValidateLightModelfv(context->getPrivateState(),
992 context->getMutableErrorSetForValidation(),
993 angle::EntryPoint::GLLightModelfv, pname, params)));
994 if (isCallValid)
995 {
996 ContextPrivateLightModelfv(context->getMutablePrivateState(),
997 context->getMutablePrivateStateCache(), pname, params);
998 }
999 ANGLE_CAPTURE_GL(LightModelfv, isCallValid, context, pname, params);
1000 }
1001 else
1002 {
1003 GenerateContextLostErrorOnCurrentGlobalContext();
1004 }
1005 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1006 }
1007
GL_LightModelx(GLenum pname,GLfixed param)1008 void GL_APIENTRY GL_LightModelx(GLenum pname, GLfixed param)
1009 {
1010 Context *context = GetValidGlobalContext();
1011 EVENT(context, GLLightModelx, "context = %d, pname = %s, param = 0x%X", CID(context),
1012 GLenumToString(GLESEnum::LightModelParameter, pname), param);
1013
1014 if (context)
1015 {
1016 bool isCallValid =
1017 (context->skipValidation() ||
1018 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1019 context->getMutableErrorSetForValidation(),
1020 angle::EntryPoint::GLLightModelx) &&
1021 ValidateLightModelx(context->getPrivateState(),
1022 context->getMutableErrorSetForValidation(),
1023 angle::EntryPoint::GLLightModelx, pname, param)));
1024 if (isCallValid)
1025 {
1026 ContextPrivateLightModelx(context->getMutablePrivateState(),
1027 context->getMutablePrivateStateCache(), pname, param);
1028 }
1029 ANGLE_CAPTURE_GL(LightModelx, isCallValid, context, pname, param);
1030 }
1031 else
1032 {
1033 GenerateContextLostErrorOnCurrentGlobalContext();
1034 }
1035 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1036 }
1037
GL_LightModelxv(GLenum pname,const GLfixed * param)1038 void GL_APIENTRY GL_LightModelxv(GLenum pname, const GLfixed *param)
1039 {
1040 Context *context = GetValidGlobalContext();
1041 EVENT(context, GLLightModelxv, "context = %d, pname = %s, param = 0x%016" PRIxPTR "",
1042 CID(context), GLenumToString(GLESEnum::LightModelParameter, pname), (uintptr_t)param);
1043
1044 if (context)
1045 {
1046 bool isCallValid =
1047 (context->skipValidation() ||
1048 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1049 context->getMutableErrorSetForValidation(),
1050 angle::EntryPoint::GLLightModelxv) &&
1051 ValidateLightModelxv(context->getPrivateState(),
1052 context->getMutableErrorSetForValidation(),
1053 angle::EntryPoint::GLLightModelxv, pname, param)));
1054 if (isCallValid)
1055 {
1056 ContextPrivateLightModelxv(context->getMutablePrivateState(),
1057 context->getMutablePrivateStateCache(), pname, param);
1058 }
1059 ANGLE_CAPTURE_GL(LightModelxv, isCallValid, context, pname, param);
1060 }
1061 else
1062 {
1063 GenerateContextLostErrorOnCurrentGlobalContext();
1064 }
1065 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1066 }
1067
GL_Lightf(GLenum light,GLenum pname,GLfloat param)1068 void GL_APIENTRY GL_Lightf(GLenum light, GLenum pname, GLfloat param)
1069 {
1070 Context *context = GetValidGlobalContext();
1071 EVENT(context, GLLightf, "context = %d, light = %s, pname = %s, param = %f", CID(context),
1072 GLenumToString(GLESEnum::LightName, light),
1073 GLenumToString(GLESEnum::LightParameter, pname), param);
1074
1075 if (context)
1076 {
1077 LightParameter pnamePacked = PackParam<LightParameter>(pname);
1078 bool isCallValid =
1079 (context->skipValidation() ||
1080 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1081 context->getMutableErrorSetForValidation(),
1082 angle::EntryPoint::GLLightf) &&
1083 ValidateLightf(context->getPrivateState(), context->getMutableErrorSetForValidation(),
1084 angle::EntryPoint::GLLightf, light, pnamePacked, param)));
1085 if (isCallValid)
1086 {
1087 ContextPrivateLightf(context->getMutablePrivateState(),
1088 context->getMutablePrivateStateCache(), light, pnamePacked, param);
1089 }
1090 ANGLE_CAPTURE_GL(Lightf, isCallValid, context, light, pnamePacked, param);
1091 }
1092 else
1093 {
1094 GenerateContextLostErrorOnCurrentGlobalContext();
1095 }
1096 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1097 }
1098
GL_Lightfv(GLenum light,GLenum pname,const GLfloat * params)1099 void GL_APIENTRY GL_Lightfv(GLenum light, GLenum pname, const GLfloat *params)
1100 {
1101 Context *context = GetValidGlobalContext();
1102 EVENT(context, GLLightfv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
1103 CID(context), GLenumToString(GLESEnum::LightName, light),
1104 GLenumToString(GLESEnum::LightParameter, pname), (uintptr_t)params);
1105
1106 if (context)
1107 {
1108 LightParameter pnamePacked = PackParam<LightParameter>(pname);
1109 bool isCallValid =
1110 (context->skipValidation() ||
1111 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1112 context->getMutableErrorSetForValidation(),
1113 angle::EntryPoint::GLLightfv) &&
1114 ValidateLightfv(context->getPrivateState(),
1115 context->getMutableErrorSetForValidation(),
1116 angle::EntryPoint::GLLightfv, light, pnamePacked, params)));
1117 if (isCallValid)
1118 {
1119 ContextPrivateLightfv(context->getMutablePrivateState(),
1120 context->getMutablePrivateStateCache(), light, pnamePacked,
1121 params);
1122 }
1123 ANGLE_CAPTURE_GL(Lightfv, isCallValid, context, light, pnamePacked, params);
1124 }
1125 else
1126 {
1127 GenerateContextLostErrorOnCurrentGlobalContext();
1128 }
1129 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1130 }
1131
GL_Lightx(GLenum light,GLenum pname,GLfixed param)1132 void GL_APIENTRY GL_Lightx(GLenum light, GLenum pname, GLfixed param)
1133 {
1134 Context *context = GetValidGlobalContext();
1135 EVENT(context, GLLightx, "context = %d, light = %s, pname = %s, param = 0x%X", CID(context),
1136 GLenumToString(GLESEnum::LightName, light),
1137 GLenumToString(GLESEnum::LightParameter, pname), param);
1138
1139 if (context)
1140 {
1141 LightParameter pnamePacked = PackParam<LightParameter>(pname);
1142 bool isCallValid =
1143 (context->skipValidation() ||
1144 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1145 context->getMutableErrorSetForValidation(),
1146 angle::EntryPoint::GLLightx) &&
1147 ValidateLightx(context->getPrivateState(), context->getMutableErrorSetForValidation(),
1148 angle::EntryPoint::GLLightx, light, pnamePacked, param)));
1149 if (isCallValid)
1150 {
1151 ContextPrivateLightx(context->getMutablePrivateState(),
1152 context->getMutablePrivateStateCache(), light, pnamePacked, param);
1153 }
1154 ANGLE_CAPTURE_GL(Lightx, isCallValid, context, light, pnamePacked, param);
1155 }
1156 else
1157 {
1158 GenerateContextLostErrorOnCurrentGlobalContext();
1159 }
1160 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1161 }
1162
GL_Lightxv(GLenum light,GLenum pname,const GLfixed * params)1163 void GL_APIENTRY GL_Lightxv(GLenum light, GLenum pname, const GLfixed *params)
1164 {
1165 Context *context = GetValidGlobalContext();
1166 EVENT(context, GLLightxv, "context = %d, light = %s, pname = %s, params = 0x%016" PRIxPTR "",
1167 CID(context), GLenumToString(GLESEnum::LightName, light),
1168 GLenumToString(GLESEnum::LightParameter, pname), (uintptr_t)params);
1169
1170 if (context)
1171 {
1172 LightParameter pnamePacked = PackParam<LightParameter>(pname);
1173 bool isCallValid =
1174 (context->skipValidation() ||
1175 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1176 context->getMutableErrorSetForValidation(),
1177 angle::EntryPoint::GLLightxv) &&
1178 ValidateLightxv(context->getPrivateState(),
1179 context->getMutableErrorSetForValidation(),
1180 angle::EntryPoint::GLLightxv, light, pnamePacked, params)));
1181 if (isCallValid)
1182 {
1183 ContextPrivateLightxv(context->getMutablePrivateState(),
1184 context->getMutablePrivateStateCache(), light, pnamePacked,
1185 params);
1186 }
1187 ANGLE_CAPTURE_GL(Lightxv, isCallValid, context, light, pnamePacked, params);
1188 }
1189 else
1190 {
1191 GenerateContextLostErrorOnCurrentGlobalContext();
1192 }
1193 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1194 }
1195
GL_LineWidthx(GLfixed width)1196 void GL_APIENTRY GL_LineWidthx(GLfixed width)
1197 {
1198 Context *context = GetValidGlobalContext();
1199 EVENT(context, GLLineWidthx, "context = %d, width = 0x%X", CID(context), width);
1200
1201 if (context)
1202 {
1203 bool isCallValid =
1204 (context->skipValidation() ||
1205 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1206 context->getMutableErrorSetForValidation(),
1207 angle::EntryPoint::GLLineWidthx) &&
1208 ValidateLineWidthx(context->getPrivateState(),
1209 context->getMutableErrorSetForValidation(),
1210 angle::EntryPoint::GLLineWidthx, width)));
1211 if (isCallValid)
1212 {
1213 ContextPrivateLineWidthx(context->getMutablePrivateState(),
1214 context->getMutablePrivateStateCache(), width);
1215 }
1216 ANGLE_CAPTURE_GL(LineWidthx, isCallValid, context, width);
1217 }
1218 else
1219 {
1220 GenerateContextLostErrorOnCurrentGlobalContext();
1221 }
1222 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1223 }
1224
GL_LoadIdentity()1225 void GL_APIENTRY GL_LoadIdentity()
1226 {
1227 Context *context = GetValidGlobalContext();
1228 EVENT(context, GLLoadIdentity, "context = %d", CID(context));
1229
1230 if (context)
1231 {
1232 bool isCallValid =
1233 (context->skipValidation() ||
1234 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1235 context->getMutableErrorSetForValidation(),
1236 angle::EntryPoint::GLLoadIdentity) &&
1237 ValidateLoadIdentity(context->getPrivateState(),
1238 context->getMutableErrorSetForValidation(),
1239 angle::EntryPoint::GLLoadIdentity)));
1240 if (isCallValid)
1241 {
1242 ContextPrivateLoadIdentity(context->getMutablePrivateState(),
1243 context->getMutablePrivateStateCache());
1244 }
1245 ANGLE_CAPTURE_GL(LoadIdentity, isCallValid, context);
1246 }
1247 else
1248 {
1249 GenerateContextLostErrorOnCurrentGlobalContext();
1250 }
1251 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1252 }
1253
GL_LoadMatrixf(const GLfloat * m)1254 void GL_APIENTRY GL_LoadMatrixf(const GLfloat *m)
1255 {
1256 Context *context = GetValidGlobalContext();
1257 EVENT(context, GLLoadMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1258 (uintptr_t)m);
1259
1260 if (context)
1261 {
1262 bool isCallValid =
1263 (context->skipValidation() ||
1264 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1265 context->getMutableErrorSetForValidation(),
1266 angle::EntryPoint::GLLoadMatrixf) &&
1267 ValidateLoadMatrixf(context->getPrivateState(),
1268 context->getMutableErrorSetForValidation(),
1269 angle::EntryPoint::GLLoadMatrixf, m)));
1270 if (isCallValid)
1271 {
1272 ContextPrivateLoadMatrixf(context->getMutablePrivateState(),
1273 context->getMutablePrivateStateCache(), m);
1274 }
1275 ANGLE_CAPTURE_GL(LoadMatrixf, isCallValid, context, m);
1276 }
1277 else
1278 {
1279 GenerateContextLostErrorOnCurrentGlobalContext();
1280 }
1281 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1282 }
1283
GL_LoadMatrixx(const GLfixed * m)1284 void GL_APIENTRY GL_LoadMatrixx(const GLfixed *m)
1285 {
1286 Context *context = GetValidGlobalContext();
1287 EVENT(context, GLLoadMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1288 (uintptr_t)m);
1289
1290 if (context)
1291 {
1292 bool isCallValid =
1293 (context->skipValidation() ||
1294 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1295 context->getMutableErrorSetForValidation(),
1296 angle::EntryPoint::GLLoadMatrixx) &&
1297 ValidateLoadMatrixx(context->getPrivateState(),
1298 context->getMutableErrorSetForValidation(),
1299 angle::EntryPoint::GLLoadMatrixx, m)));
1300 if (isCallValid)
1301 {
1302 ContextPrivateLoadMatrixx(context->getMutablePrivateState(),
1303 context->getMutablePrivateStateCache(), m);
1304 }
1305 ANGLE_CAPTURE_GL(LoadMatrixx, isCallValid, context, m);
1306 }
1307 else
1308 {
1309 GenerateContextLostErrorOnCurrentGlobalContext();
1310 }
1311 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1312 }
1313
GL_LogicOp(GLenum opcode)1314 void GL_APIENTRY GL_LogicOp(GLenum opcode)
1315 {
1316 Context *context = GetValidGlobalContext();
1317 EVENT(context, GLLogicOp, "context = %d, opcode = %s", CID(context),
1318 GLenumToString(GLESEnum::LogicOp, opcode));
1319
1320 if (context)
1321 {
1322 LogicalOperation opcodePacked = PackParam<LogicalOperation>(opcode);
1323 bool isCallValid =
1324 (context->skipValidation() ||
1325 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1326 context->getMutableErrorSetForValidation(),
1327 angle::EntryPoint::GLLogicOp) &&
1328 ValidateLogicOp(context->getPrivateState(),
1329 context->getMutableErrorSetForValidation(),
1330 angle::EntryPoint::GLLogicOp, opcodePacked)));
1331 if (isCallValid)
1332 {
1333 ContextPrivateLogicOp(context->getMutablePrivateState(),
1334 context->getMutablePrivateStateCache(), opcodePacked);
1335 }
1336 ANGLE_CAPTURE_GL(LogicOp, isCallValid, context, opcodePacked);
1337 }
1338 else
1339 {
1340 GenerateContextLostErrorOnCurrentGlobalContext();
1341 }
1342 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1343 }
1344
GL_Materialf(GLenum face,GLenum pname,GLfloat param)1345 void GL_APIENTRY GL_Materialf(GLenum face, GLenum pname, GLfloat param)
1346 {
1347 Context *context = GetValidGlobalContext();
1348 EVENT(context, GLMaterialf, "context = %d, face = %s, pname = %s, param = %f", CID(context),
1349 GLenumToString(GLESEnum::TriangleFace, face),
1350 GLenumToString(GLESEnum::MaterialParameter, pname), param);
1351
1352 if (context)
1353 {
1354 MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1355 bool isCallValid =
1356 (context->skipValidation() ||
1357 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1358 context->getMutableErrorSetForValidation(),
1359 angle::EntryPoint::GLMaterialf) &&
1360 ValidateMaterialf(context->getPrivateState(),
1361 context->getMutableErrorSetForValidation(),
1362 angle::EntryPoint::GLMaterialf, face, pnamePacked, param)));
1363 if (isCallValid)
1364 {
1365 ContextPrivateMaterialf(context->getMutablePrivateState(),
1366 context->getMutablePrivateStateCache(), face, pnamePacked,
1367 param);
1368 }
1369 ANGLE_CAPTURE_GL(Materialf, isCallValid, context, face, pnamePacked, param);
1370 }
1371 else
1372 {
1373 GenerateContextLostErrorOnCurrentGlobalContext();
1374 }
1375 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1376 }
1377
GL_Materialfv(GLenum face,GLenum pname,const GLfloat * params)1378 void GL_APIENTRY GL_Materialfv(GLenum face, GLenum pname, const GLfloat *params)
1379 {
1380 Context *context = GetValidGlobalContext();
1381 EVENT(context, GLMaterialfv, "context = %d, face = %s, pname = %s, params = 0x%016" PRIxPTR "",
1382 CID(context), GLenumToString(GLESEnum::TriangleFace, face),
1383 GLenumToString(GLESEnum::MaterialParameter, pname), (uintptr_t)params);
1384
1385 if (context)
1386 {
1387 MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1388 bool isCallValid =
1389 (context->skipValidation() ||
1390 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1391 context->getMutableErrorSetForValidation(),
1392 angle::EntryPoint::GLMaterialfv) &&
1393 ValidateMaterialfv(context->getPrivateState(),
1394 context->getMutableErrorSetForValidation(),
1395 angle::EntryPoint::GLMaterialfv, face, pnamePacked, params)));
1396 if (isCallValid)
1397 {
1398 ContextPrivateMaterialfv(context->getMutablePrivateState(),
1399 context->getMutablePrivateStateCache(), face, pnamePacked,
1400 params);
1401 }
1402 ANGLE_CAPTURE_GL(Materialfv, isCallValid, context, face, pnamePacked, params);
1403 }
1404 else
1405 {
1406 GenerateContextLostErrorOnCurrentGlobalContext();
1407 }
1408 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1409 }
1410
GL_Materialx(GLenum face,GLenum pname,GLfixed param)1411 void GL_APIENTRY GL_Materialx(GLenum face, GLenum pname, GLfixed param)
1412 {
1413 Context *context = GetValidGlobalContext();
1414 EVENT(context, GLMaterialx, "context = %d, face = %s, pname = %s, param = 0x%X", CID(context),
1415 GLenumToString(GLESEnum::TriangleFace, face),
1416 GLenumToString(GLESEnum::MaterialParameter, pname), param);
1417
1418 if (context)
1419 {
1420 MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1421 bool isCallValid =
1422 (context->skipValidation() ||
1423 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1424 context->getMutableErrorSetForValidation(),
1425 angle::EntryPoint::GLMaterialx) &&
1426 ValidateMaterialx(context->getPrivateState(),
1427 context->getMutableErrorSetForValidation(),
1428 angle::EntryPoint::GLMaterialx, face, pnamePacked, param)));
1429 if (isCallValid)
1430 {
1431 ContextPrivateMaterialx(context->getMutablePrivateState(),
1432 context->getMutablePrivateStateCache(), face, pnamePacked,
1433 param);
1434 }
1435 ANGLE_CAPTURE_GL(Materialx, isCallValid, context, face, pnamePacked, param);
1436 }
1437 else
1438 {
1439 GenerateContextLostErrorOnCurrentGlobalContext();
1440 }
1441 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1442 }
1443
GL_Materialxv(GLenum face,GLenum pname,const GLfixed * param)1444 void GL_APIENTRY GL_Materialxv(GLenum face, GLenum pname, const GLfixed *param)
1445 {
1446 Context *context = GetValidGlobalContext();
1447 EVENT(context, GLMaterialxv, "context = %d, face = %s, pname = %s, param = 0x%016" PRIxPTR "",
1448 CID(context), GLenumToString(GLESEnum::TriangleFace, face),
1449 GLenumToString(GLESEnum::MaterialParameter, pname), (uintptr_t)param);
1450
1451 if (context)
1452 {
1453 MaterialParameter pnamePacked = PackParam<MaterialParameter>(pname);
1454 bool isCallValid =
1455 (context->skipValidation() ||
1456 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1457 context->getMutableErrorSetForValidation(),
1458 angle::EntryPoint::GLMaterialxv) &&
1459 ValidateMaterialxv(context->getPrivateState(),
1460 context->getMutableErrorSetForValidation(),
1461 angle::EntryPoint::GLMaterialxv, face, pnamePacked, param)));
1462 if (isCallValid)
1463 {
1464 ContextPrivateMaterialxv(context->getMutablePrivateState(),
1465 context->getMutablePrivateStateCache(), face, pnamePacked,
1466 param);
1467 }
1468 ANGLE_CAPTURE_GL(Materialxv, isCallValid, context, face, pnamePacked, param);
1469 }
1470 else
1471 {
1472 GenerateContextLostErrorOnCurrentGlobalContext();
1473 }
1474 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1475 }
1476
GL_MatrixMode(GLenum mode)1477 void GL_APIENTRY GL_MatrixMode(GLenum mode)
1478 {
1479 Context *context = GetValidGlobalContext();
1480 EVENT(context, GLMatrixMode, "context = %d, mode = %s", CID(context),
1481 GLenumToString(GLESEnum::MatrixMode, mode));
1482
1483 if (context)
1484 {
1485 MatrixType modePacked = PackParam<MatrixType>(mode);
1486 bool isCallValid =
1487 (context->skipValidation() ||
1488 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1489 context->getMutableErrorSetForValidation(),
1490 angle::EntryPoint::GLMatrixMode) &&
1491 ValidateMatrixMode(context->getPrivateState(),
1492 context->getMutableErrorSetForValidation(),
1493 angle::EntryPoint::GLMatrixMode, modePacked)));
1494 if (isCallValid)
1495 {
1496 ContextPrivateMatrixMode(context->getMutablePrivateState(),
1497 context->getMutablePrivateStateCache(), modePacked);
1498 }
1499 ANGLE_CAPTURE_GL(MatrixMode, isCallValid, context, modePacked);
1500 }
1501 else
1502 {
1503 GenerateContextLostErrorOnCurrentGlobalContext();
1504 }
1505 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1506 }
1507
GL_MultMatrixf(const GLfloat * m)1508 void GL_APIENTRY GL_MultMatrixf(const GLfloat *m)
1509 {
1510 Context *context = GetValidGlobalContext();
1511 EVENT(context, GLMultMatrixf, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1512 (uintptr_t)m);
1513
1514 if (context)
1515 {
1516 bool isCallValid =
1517 (context->skipValidation() ||
1518 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1519 context->getMutableErrorSetForValidation(),
1520 angle::EntryPoint::GLMultMatrixf) &&
1521 ValidateMultMatrixf(context->getPrivateState(),
1522 context->getMutableErrorSetForValidation(),
1523 angle::EntryPoint::GLMultMatrixf, m)));
1524 if (isCallValid)
1525 {
1526 ContextPrivateMultMatrixf(context->getMutablePrivateState(),
1527 context->getMutablePrivateStateCache(), m);
1528 }
1529 ANGLE_CAPTURE_GL(MultMatrixf, isCallValid, context, m);
1530 }
1531 else
1532 {
1533 GenerateContextLostErrorOnCurrentGlobalContext();
1534 }
1535 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1536 }
1537
GL_MultMatrixx(const GLfixed * m)1538 void GL_APIENTRY GL_MultMatrixx(const GLfixed *m)
1539 {
1540 Context *context = GetValidGlobalContext();
1541 EVENT(context, GLMultMatrixx, "context = %d, m = 0x%016" PRIxPTR "", CID(context),
1542 (uintptr_t)m);
1543
1544 if (context)
1545 {
1546 bool isCallValid =
1547 (context->skipValidation() ||
1548 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1549 context->getMutableErrorSetForValidation(),
1550 angle::EntryPoint::GLMultMatrixx) &&
1551 ValidateMultMatrixx(context->getPrivateState(),
1552 context->getMutableErrorSetForValidation(),
1553 angle::EntryPoint::GLMultMatrixx, m)));
1554 if (isCallValid)
1555 {
1556 ContextPrivateMultMatrixx(context->getMutablePrivateState(),
1557 context->getMutablePrivateStateCache(), m);
1558 }
1559 ANGLE_CAPTURE_GL(MultMatrixx, isCallValid, context, m);
1560 }
1561 else
1562 {
1563 GenerateContextLostErrorOnCurrentGlobalContext();
1564 }
1565 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1566 }
1567
GL_MultiTexCoord4f(GLenum target,GLfloat s,GLfloat t,GLfloat r,GLfloat q)1568 void GL_APIENTRY GL_MultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
1569 {
1570 Context *context = GetValidGlobalContext();
1571 EVENT(context, GLMultiTexCoord4f, "context = %d, target = %s, s = %f, t = %f, r = %f, q = %f",
1572 CID(context), GLenumToString(GLESEnum::TextureUnit, target), s, t, r, q);
1573
1574 if (context)
1575 {
1576 bool isCallValid =
1577 (context->skipValidation() ||
1578 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1579 context->getMutableErrorSetForValidation(),
1580 angle::EntryPoint::GLMultiTexCoord4f) &&
1581 ValidateMultiTexCoord4f(context->getPrivateState(),
1582 context->getMutableErrorSetForValidation(),
1583 angle::EntryPoint::GLMultiTexCoord4f, target, s, t, r, q)));
1584 if (isCallValid)
1585 {
1586 ContextPrivateMultiTexCoord4f(context->getMutablePrivateState(),
1587 context->getMutablePrivateStateCache(), target, s, t, r,
1588 q);
1589 }
1590 ANGLE_CAPTURE_GL(MultiTexCoord4f, isCallValid, context, target, s, t, r, q);
1591 }
1592 else
1593 {
1594 GenerateContextLostErrorOnCurrentGlobalContext();
1595 }
1596 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1597 }
1598
GL_MultiTexCoord4x(GLenum texture,GLfixed s,GLfixed t,GLfixed r,GLfixed q)1599 void GL_APIENTRY GL_MultiTexCoord4x(GLenum texture, GLfixed s, GLfixed t, GLfixed r, GLfixed q)
1600 {
1601 Context *context = GetValidGlobalContext();
1602 EVENT(context, GLMultiTexCoord4x,
1603 "context = %d, texture = %s, s = 0x%X, t = 0x%X, r = 0x%X, q = 0x%X", CID(context),
1604 GLenumToString(GLESEnum::TextureUnit, texture), s, t, r, q);
1605
1606 if (context)
1607 {
1608 bool isCallValid =
1609 (context->skipValidation() ||
1610 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1611 context->getMutableErrorSetForValidation(),
1612 angle::EntryPoint::GLMultiTexCoord4x) &&
1613 ValidateMultiTexCoord4x(context->getPrivateState(),
1614 context->getMutableErrorSetForValidation(),
1615 angle::EntryPoint::GLMultiTexCoord4x, texture, s, t, r, q)));
1616 if (isCallValid)
1617 {
1618 ContextPrivateMultiTexCoord4x(context->getMutablePrivateState(),
1619 context->getMutablePrivateStateCache(), texture, s, t, r,
1620 q);
1621 }
1622 ANGLE_CAPTURE_GL(MultiTexCoord4x, isCallValid, context, texture, s, t, r, q);
1623 }
1624 else
1625 {
1626 GenerateContextLostErrorOnCurrentGlobalContext();
1627 }
1628 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1629 }
1630
GL_Normal3f(GLfloat nx,GLfloat ny,GLfloat nz)1631 void GL_APIENTRY GL_Normal3f(GLfloat nx, GLfloat ny, GLfloat nz)
1632 {
1633 Context *context = GetValidGlobalContext();
1634 EVENT(context, GLNormal3f, "context = %d, nx = %f, ny = %f, nz = %f", CID(context), nx, ny, nz);
1635
1636 if (context)
1637 {
1638 bool isCallValid =
1639 (context->skipValidation() ||
1640 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1641 context->getMutableErrorSetForValidation(),
1642 angle::EntryPoint::GLNormal3f) &&
1643 ValidateNormal3f(context->getPrivateState(),
1644 context->getMutableErrorSetForValidation(),
1645 angle::EntryPoint::GLNormal3f, nx, ny, nz)));
1646 if (isCallValid)
1647 {
1648 ContextPrivateNormal3f(context->getMutablePrivateState(),
1649 context->getMutablePrivateStateCache(), nx, ny, nz);
1650 }
1651 ANGLE_CAPTURE_GL(Normal3f, isCallValid, context, nx, ny, nz);
1652 }
1653 else
1654 {
1655 GenerateContextLostErrorOnCurrentGlobalContext();
1656 }
1657 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1658 }
1659
GL_Normal3x(GLfixed nx,GLfixed ny,GLfixed nz)1660 void GL_APIENTRY GL_Normal3x(GLfixed nx, GLfixed ny, GLfixed nz)
1661 {
1662 Context *context = GetValidGlobalContext();
1663 EVENT(context, GLNormal3x, "context = %d, nx = 0x%X, ny = 0x%X, nz = 0x%X", CID(context), nx,
1664 ny, nz);
1665
1666 if (context)
1667 {
1668 bool isCallValid =
1669 (context->skipValidation() ||
1670 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1671 context->getMutableErrorSetForValidation(),
1672 angle::EntryPoint::GLNormal3x) &&
1673 ValidateNormal3x(context->getPrivateState(),
1674 context->getMutableErrorSetForValidation(),
1675 angle::EntryPoint::GLNormal3x, nx, ny, nz)));
1676 if (isCallValid)
1677 {
1678 ContextPrivateNormal3x(context->getMutablePrivateState(),
1679 context->getMutablePrivateStateCache(), nx, ny, nz);
1680 }
1681 ANGLE_CAPTURE_GL(Normal3x, isCallValid, context, nx, ny, nz);
1682 }
1683 else
1684 {
1685 GenerateContextLostErrorOnCurrentGlobalContext();
1686 }
1687 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1688 }
1689
GL_NormalPointer(GLenum type,GLsizei stride,const void * pointer)1690 void GL_APIENTRY GL_NormalPointer(GLenum type, GLsizei stride, const void *pointer)
1691 {
1692 Context *context = GetValidGlobalContext();
1693 EVENT(context, GLNormalPointer,
1694 "context = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "", CID(context),
1695 GLenumToString(GLESEnum::NormalPointerType, type), stride, (uintptr_t)pointer);
1696
1697 if (context)
1698 {
1699 VertexAttribType typePacked = PackParam<VertexAttribType>(type);
1700 SCOPED_SHARE_CONTEXT_LOCK(context);
1701 bool isCallValid =
1702 (context->skipValidation() ||
1703 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1704 context->getMutableErrorSetForValidation(),
1705 angle::EntryPoint::GLNormalPointer) &&
1706 ValidateNormalPointer(context, angle::EntryPoint::GLNormalPointer, typePacked, stride,
1707 pointer)));
1708 if (isCallValid)
1709 {
1710 context->normalPointer(typePacked, stride, pointer);
1711 }
1712 ANGLE_CAPTURE_GL(NormalPointer, isCallValid, context, typePacked, stride, pointer);
1713 }
1714 else
1715 {
1716 GenerateContextLostErrorOnCurrentGlobalContext();
1717 }
1718 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1719 }
1720
GL_Orthof(GLfloat l,GLfloat r,GLfloat b,GLfloat t,GLfloat n,GLfloat f)1721 void GL_APIENTRY GL_Orthof(GLfloat l, GLfloat r, GLfloat b, GLfloat t, GLfloat n, GLfloat f)
1722 {
1723 Context *context = GetValidGlobalContext();
1724 EVENT(context, GLOrthof, "context = %d, l = %f, r = %f, b = %f, t = %f, n = %f, f = %f",
1725 CID(context), l, r, b, t, n, f);
1726
1727 if (context)
1728 {
1729 bool isCallValid =
1730 (context->skipValidation() ||
1731 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1732 context->getMutableErrorSetForValidation(),
1733 angle::EntryPoint::GLOrthof) &&
1734 ValidateOrthof(context->getPrivateState(), context->getMutableErrorSetForValidation(),
1735 angle::EntryPoint::GLOrthof, l, r, b, t, n, f)));
1736 if (isCallValid)
1737 {
1738 ContextPrivateOrthof(context->getMutablePrivateState(),
1739 context->getMutablePrivateStateCache(), l, r, b, t, n, f);
1740 }
1741 ANGLE_CAPTURE_GL(Orthof, isCallValid, context, l, r, b, t, n, f);
1742 }
1743 else
1744 {
1745 GenerateContextLostErrorOnCurrentGlobalContext();
1746 }
1747 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1748 }
1749
GL_Orthox(GLfixed l,GLfixed r,GLfixed b,GLfixed t,GLfixed n,GLfixed f)1750 void GL_APIENTRY GL_Orthox(GLfixed l, GLfixed r, GLfixed b, GLfixed t, GLfixed n, GLfixed f)
1751 {
1752 Context *context = GetValidGlobalContext();
1753 EVENT(context, GLOrthox,
1754 "context = %d, l = 0x%X, r = 0x%X, b = 0x%X, t = 0x%X, n = 0x%X, f = 0x%X", CID(context),
1755 l, r, b, t, n, f);
1756
1757 if (context)
1758 {
1759 bool isCallValid =
1760 (context->skipValidation() ||
1761 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1762 context->getMutableErrorSetForValidation(),
1763 angle::EntryPoint::GLOrthox) &&
1764 ValidateOrthox(context->getPrivateState(), context->getMutableErrorSetForValidation(),
1765 angle::EntryPoint::GLOrthox, l, r, b, t, n, f)));
1766 if (isCallValid)
1767 {
1768 ContextPrivateOrthox(context->getMutablePrivateState(),
1769 context->getMutablePrivateStateCache(), l, r, b, t, n, f);
1770 }
1771 ANGLE_CAPTURE_GL(Orthox, isCallValid, context, l, r, b, t, n, f);
1772 }
1773 else
1774 {
1775 GenerateContextLostErrorOnCurrentGlobalContext();
1776 }
1777 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1778 }
1779
GL_PointParameterf(GLenum pname,GLfloat param)1780 void GL_APIENTRY GL_PointParameterf(GLenum pname, GLfloat param)
1781 {
1782 Context *context = GetValidGlobalContext();
1783 EVENT(context, GLPointParameterf, "context = %d, pname = %s, param = %f", CID(context),
1784 GLenumToString(GLESEnum::AllEnums, pname), param);
1785
1786 if (context)
1787 {
1788 PointParameter pnamePacked = PackParam<PointParameter>(pname);
1789 bool isCallValid =
1790 (context->skipValidation() ||
1791 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1792 context->getMutableErrorSetForValidation(),
1793 angle::EntryPoint::GLPointParameterf) &&
1794 ValidatePointParameterf(context->getPrivateState(),
1795 context->getMutableErrorSetForValidation(),
1796 angle::EntryPoint::GLPointParameterf, pnamePacked, param)));
1797 if (isCallValid)
1798 {
1799 ContextPrivatePointParameterf(context->getMutablePrivateState(),
1800 context->getMutablePrivateStateCache(), pnamePacked,
1801 param);
1802 }
1803 ANGLE_CAPTURE_GL(PointParameterf, isCallValid, context, pnamePacked, param);
1804 }
1805 else
1806 {
1807 GenerateContextLostErrorOnCurrentGlobalContext();
1808 }
1809 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1810 }
1811
GL_PointParameterfv(GLenum pname,const GLfloat * params)1812 void GL_APIENTRY GL_PointParameterfv(GLenum pname, const GLfloat *params)
1813 {
1814 Context *context = GetValidGlobalContext();
1815 EVENT(context, GLPointParameterfv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
1816 CID(context), GLenumToString(GLESEnum::AllEnums, pname), (uintptr_t)params);
1817
1818 if (context)
1819 {
1820 PointParameter pnamePacked = PackParam<PointParameter>(pname);
1821 bool isCallValid =
1822 (context->skipValidation() ||
1823 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1824 context->getMutableErrorSetForValidation(),
1825 angle::EntryPoint::GLPointParameterfv) &&
1826 ValidatePointParameterfv(
1827 context->getPrivateState(), context->getMutableErrorSetForValidation(),
1828 angle::EntryPoint::GLPointParameterfv, pnamePacked, params)));
1829 if (isCallValid)
1830 {
1831 ContextPrivatePointParameterfv(context->getMutablePrivateState(),
1832 context->getMutablePrivateStateCache(), pnamePacked,
1833 params);
1834 }
1835 ANGLE_CAPTURE_GL(PointParameterfv, isCallValid, context, pnamePacked, params);
1836 }
1837 else
1838 {
1839 GenerateContextLostErrorOnCurrentGlobalContext();
1840 }
1841 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1842 }
1843
GL_PointParameterx(GLenum pname,GLfixed param)1844 void GL_APIENTRY GL_PointParameterx(GLenum pname, GLfixed param)
1845 {
1846 Context *context = GetValidGlobalContext();
1847 EVENT(context, GLPointParameterx, "context = %d, pname = %s, param = 0x%X", CID(context),
1848 GLenumToString(GLESEnum::AllEnums, pname), param);
1849
1850 if (context)
1851 {
1852 PointParameter pnamePacked = PackParam<PointParameter>(pname);
1853 bool isCallValid =
1854 (context->skipValidation() ||
1855 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1856 context->getMutableErrorSetForValidation(),
1857 angle::EntryPoint::GLPointParameterx) &&
1858 ValidatePointParameterx(context->getPrivateState(),
1859 context->getMutableErrorSetForValidation(),
1860 angle::EntryPoint::GLPointParameterx, pnamePacked, param)));
1861 if (isCallValid)
1862 {
1863 ContextPrivatePointParameterx(context->getMutablePrivateState(),
1864 context->getMutablePrivateStateCache(), pnamePacked,
1865 param);
1866 }
1867 ANGLE_CAPTURE_GL(PointParameterx, isCallValid, context, pnamePacked, param);
1868 }
1869 else
1870 {
1871 GenerateContextLostErrorOnCurrentGlobalContext();
1872 }
1873 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1874 }
1875
GL_PointParameterxv(GLenum pname,const GLfixed * params)1876 void GL_APIENTRY GL_PointParameterxv(GLenum pname, const GLfixed *params)
1877 {
1878 Context *context = GetValidGlobalContext();
1879 EVENT(context, GLPointParameterxv, "context = %d, pname = %s, params = 0x%016" PRIxPTR "",
1880 CID(context), GLenumToString(GLESEnum::AllEnums, pname), (uintptr_t)params);
1881
1882 if (context)
1883 {
1884 PointParameter pnamePacked = PackParam<PointParameter>(pname);
1885 bool isCallValid =
1886 (context->skipValidation() ||
1887 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1888 context->getMutableErrorSetForValidation(),
1889 angle::EntryPoint::GLPointParameterxv) &&
1890 ValidatePointParameterxv(
1891 context->getPrivateState(), context->getMutableErrorSetForValidation(),
1892 angle::EntryPoint::GLPointParameterxv, pnamePacked, params)));
1893 if (isCallValid)
1894 {
1895 ContextPrivatePointParameterxv(context->getMutablePrivateState(),
1896 context->getMutablePrivateStateCache(), pnamePacked,
1897 params);
1898 }
1899 ANGLE_CAPTURE_GL(PointParameterxv, isCallValid, context, pnamePacked, params);
1900 }
1901 else
1902 {
1903 GenerateContextLostErrorOnCurrentGlobalContext();
1904 }
1905 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1906 }
1907
GL_PointSize(GLfloat size)1908 void GL_APIENTRY GL_PointSize(GLfloat size)
1909 {
1910 Context *context = GetValidGlobalContext();
1911 EVENT(context, GLPointSize, "context = %d, size = %f", CID(context), size);
1912
1913 if (context)
1914 {
1915 bool isCallValid =
1916 (context->skipValidation() ||
1917 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1918 context->getMutableErrorSetForValidation(),
1919 angle::EntryPoint::GLPointSize) &&
1920 ValidatePointSize(context->getPrivateState(),
1921 context->getMutableErrorSetForValidation(),
1922 angle::EntryPoint::GLPointSize, size)));
1923 if (isCallValid)
1924 {
1925 ContextPrivatePointSize(context->getMutablePrivateState(),
1926 context->getMutablePrivateStateCache(), size);
1927 }
1928 ANGLE_CAPTURE_GL(PointSize, isCallValid, context, size);
1929 }
1930 else
1931 {
1932 GenerateContextLostErrorOnCurrentGlobalContext();
1933 }
1934 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1935 }
1936
GL_PointSizex(GLfixed size)1937 void GL_APIENTRY GL_PointSizex(GLfixed size)
1938 {
1939 Context *context = GetValidGlobalContext();
1940 EVENT(context, GLPointSizex, "context = %d, size = 0x%X", CID(context), size);
1941
1942 if (context)
1943 {
1944 bool isCallValid =
1945 (context->skipValidation() ||
1946 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
1947 context->getMutableErrorSetForValidation(),
1948 angle::EntryPoint::GLPointSizex) &&
1949 ValidatePointSizex(context->getPrivateState(),
1950 context->getMutableErrorSetForValidation(),
1951 angle::EntryPoint::GLPointSizex, size)));
1952 if (isCallValid)
1953 {
1954 ContextPrivatePointSizex(context->getMutablePrivateState(),
1955 context->getMutablePrivateStateCache(), size);
1956 }
1957 ANGLE_CAPTURE_GL(PointSizex, isCallValid, context, size);
1958 }
1959 else
1960 {
1961 GenerateContextLostErrorOnCurrentGlobalContext();
1962 }
1963 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1964 }
1965
GL_PolygonOffsetx(GLfixed factor,GLfixed units)1966 void GL_APIENTRY GL_PolygonOffsetx(GLfixed factor, GLfixed units)
1967 {
1968 Context *context = GetValidGlobalContext();
1969 EVENT(context, GLPolygonOffsetx, "context = %d, factor = 0x%X, units = 0x%X", CID(context),
1970 factor, units);
1971
1972 if (context)
1973 {
1974 bool isCallValid =
1975 (context->skipValidation() ||
1976 ValidatePolygonOffsetx(context->getPrivateState(),
1977 context->getMutableErrorSetForValidation(),
1978 angle::EntryPoint::GLPolygonOffsetx, factor, units));
1979 if (isCallValid)
1980 {
1981 ContextPrivatePolygonOffsetx(context->getMutablePrivateState(),
1982 context->getMutablePrivateStateCache(), factor, units);
1983 }
1984 ANGLE_CAPTURE_GL(PolygonOffsetx, isCallValid, context, factor, units);
1985 }
1986 else
1987 {
1988 GenerateContextLostErrorOnCurrentGlobalContext();
1989 }
1990 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
1991 }
1992
GL_PopMatrix()1993 void GL_APIENTRY GL_PopMatrix()
1994 {
1995 Context *context = GetValidGlobalContext();
1996 EVENT(context, GLPopMatrix, "context = %d", CID(context));
1997
1998 if (context)
1999 {
2000 bool isCallValid =
2001 (context->skipValidation() ||
2002 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2003 context->getMutableErrorSetForValidation(),
2004 angle::EntryPoint::GLPopMatrix) &&
2005 ValidatePopMatrix(context->getPrivateState(),
2006 context->getMutableErrorSetForValidation(),
2007 angle::EntryPoint::GLPopMatrix)));
2008 if (isCallValid)
2009 {
2010 ContextPrivatePopMatrix(context->getMutablePrivateState(),
2011 context->getMutablePrivateStateCache());
2012 }
2013 ANGLE_CAPTURE_GL(PopMatrix, isCallValid, context);
2014 }
2015 else
2016 {
2017 GenerateContextLostErrorOnCurrentGlobalContext();
2018 }
2019 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2020 }
2021
GL_PushMatrix()2022 void GL_APIENTRY GL_PushMatrix()
2023 {
2024 Context *context = GetValidGlobalContext();
2025 EVENT(context, GLPushMatrix, "context = %d", CID(context));
2026
2027 if (context)
2028 {
2029 bool isCallValid =
2030 (context->skipValidation() ||
2031 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2032 context->getMutableErrorSetForValidation(),
2033 angle::EntryPoint::GLPushMatrix) &&
2034 ValidatePushMatrix(context->getPrivateState(),
2035 context->getMutableErrorSetForValidation(),
2036 angle::EntryPoint::GLPushMatrix)));
2037 if (isCallValid)
2038 {
2039 ContextPrivatePushMatrix(context->getMutablePrivateState(),
2040 context->getMutablePrivateStateCache());
2041 }
2042 ANGLE_CAPTURE_GL(PushMatrix, isCallValid, context);
2043 }
2044 else
2045 {
2046 GenerateContextLostErrorOnCurrentGlobalContext();
2047 }
2048 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2049 }
2050
GL_Rotatef(GLfloat angle,GLfloat x,GLfloat y,GLfloat z)2051 void GL_APIENTRY GL_Rotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
2052 {
2053 Context *context = GetValidGlobalContext();
2054 EVENT(context, GLRotatef, "context = %d, angle = %f, x = %f, y = %f, z = %f", CID(context),
2055 angle, x, y, z);
2056
2057 if (context)
2058 {
2059 bool isCallValid =
2060 (context->skipValidation() ||
2061 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2062 context->getMutableErrorSetForValidation(),
2063 angle::EntryPoint::GLRotatef) &&
2064 ValidateRotatef(context->getPrivateState(),
2065 context->getMutableErrorSetForValidation(),
2066 angle::EntryPoint::GLRotatef, angle, x, y, z)));
2067 if (isCallValid)
2068 {
2069 ContextPrivateRotatef(context->getMutablePrivateState(),
2070 context->getMutablePrivateStateCache(), angle, x, y, z);
2071 }
2072 ANGLE_CAPTURE_GL(Rotatef, isCallValid, context, angle, x, y, z);
2073 }
2074 else
2075 {
2076 GenerateContextLostErrorOnCurrentGlobalContext();
2077 }
2078 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2079 }
2080
GL_Rotatex(GLfixed angle,GLfixed x,GLfixed y,GLfixed z)2081 void GL_APIENTRY GL_Rotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z)
2082 {
2083 Context *context = GetValidGlobalContext();
2084 EVENT(context, GLRotatex, "context = %d, angle = 0x%X, x = 0x%X, y = 0x%X, z = 0x%X",
2085 CID(context), angle, x, y, z);
2086
2087 if (context)
2088 {
2089 bool isCallValid =
2090 (context->skipValidation() ||
2091 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2092 context->getMutableErrorSetForValidation(),
2093 angle::EntryPoint::GLRotatex) &&
2094 ValidateRotatex(context->getPrivateState(),
2095 context->getMutableErrorSetForValidation(),
2096 angle::EntryPoint::GLRotatex, angle, x, y, z)));
2097 if (isCallValid)
2098 {
2099 ContextPrivateRotatex(context->getMutablePrivateState(),
2100 context->getMutablePrivateStateCache(), angle, x, y, z);
2101 }
2102 ANGLE_CAPTURE_GL(Rotatex, isCallValid, context, angle, x, y, z);
2103 }
2104 else
2105 {
2106 GenerateContextLostErrorOnCurrentGlobalContext();
2107 }
2108 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2109 }
2110
GL_SampleCoveragex(GLclampx value,GLboolean invert)2111 void GL_APIENTRY GL_SampleCoveragex(GLclampx value, GLboolean invert)
2112 {
2113 Context *context = GetValidGlobalContext();
2114 EVENT(context, GLSampleCoveragex, "context = %d, value = 0x%X, invert = %s", CID(context),
2115 value, GLbooleanToString(invert));
2116
2117 if (context)
2118 {
2119 bool isCallValid =
2120 (context->skipValidation() ||
2121 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2122 context->getMutableErrorSetForValidation(),
2123 angle::EntryPoint::GLSampleCoveragex) &&
2124 ValidateSampleCoveragex(context->getPrivateState(),
2125 context->getMutableErrorSetForValidation(),
2126 angle::EntryPoint::GLSampleCoveragex, value, invert)));
2127 if (isCallValid)
2128 {
2129 ContextPrivateSampleCoveragex(context->getMutablePrivateState(),
2130 context->getMutablePrivateStateCache(), value, invert);
2131 }
2132 ANGLE_CAPTURE_GL(SampleCoveragex, isCallValid, context, value, invert);
2133 }
2134 else
2135 {
2136 GenerateContextLostErrorOnCurrentGlobalContext();
2137 }
2138 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2139 }
2140
GL_Scalef(GLfloat x,GLfloat y,GLfloat z)2141 void GL_APIENTRY GL_Scalef(GLfloat x, GLfloat y, GLfloat z)
2142 {
2143 Context *context = GetValidGlobalContext();
2144 EVENT(context, GLScalef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
2145
2146 if (context)
2147 {
2148 bool isCallValid =
2149 (context->skipValidation() ||
2150 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2151 context->getMutableErrorSetForValidation(),
2152 angle::EntryPoint::GLScalef) &&
2153 ValidateScalef(context->getPrivateState(), context->getMutableErrorSetForValidation(),
2154 angle::EntryPoint::GLScalef, x, y, z)));
2155 if (isCallValid)
2156 {
2157 ContextPrivateScalef(context->getMutablePrivateState(),
2158 context->getMutablePrivateStateCache(), x, y, z);
2159 }
2160 ANGLE_CAPTURE_GL(Scalef, isCallValid, context, x, y, z);
2161 }
2162 else
2163 {
2164 GenerateContextLostErrorOnCurrentGlobalContext();
2165 }
2166 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2167 }
2168
GL_Scalex(GLfixed x,GLfixed y,GLfixed z)2169 void GL_APIENTRY GL_Scalex(GLfixed x, GLfixed y, GLfixed z)
2170 {
2171 Context *context = GetValidGlobalContext();
2172 EVENT(context, GLScalex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y, z);
2173
2174 if (context)
2175 {
2176 bool isCallValid =
2177 (context->skipValidation() ||
2178 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2179 context->getMutableErrorSetForValidation(),
2180 angle::EntryPoint::GLScalex) &&
2181 ValidateScalex(context->getPrivateState(), context->getMutableErrorSetForValidation(),
2182 angle::EntryPoint::GLScalex, x, y, z)));
2183 if (isCallValid)
2184 {
2185 ContextPrivateScalex(context->getMutablePrivateState(),
2186 context->getMutablePrivateStateCache(), x, y, z);
2187 }
2188 ANGLE_CAPTURE_GL(Scalex, isCallValid, context, x, y, z);
2189 }
2190 else
2191 {
2192 GenerateContextLostErrorOnCurrentGlobalContext();
2193 }
2194 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2195 }
2196
GL_ShadeModel(GLenum mode)2197 void GL_APIENTRY GL_ShadeModel(GLenum mode)
2198 {
2199 Context *context = GetValidGlobalContext();
2200 EVENT(context, GLShadeModel, "context = %d, mode = %s", CID(context),
2201 GLenumToString(GLESEnum::ShadingModel, mode));
2202
2203 if (context)
2204 {
2205 ShadingModel modePacked = PackParam<ShadingModel>(mode);
2206 bool isCallValid =
2207 (context->skipValidation() ||
2208 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2209 context->getMutableErrorSetForValidation(),
2210 angle::EntryPoint::GLShadeModel) &&
2211 ValidateShadeModel(context->getPrivateState(),
2212 context->getMutableErrorSetForValidation(),
2213 angle::EntryPoint::GLShadeModel, modePacked)));
2214 if (isCallValid)
2215 {
2216 ContextPrivateShadeModel(context->getMutablePrivateState(),
2217 context->getMutablePrivateStateCache(), modePacked);
2218 }
2219 ANGLE_CAPTURE_GL(ShadeModel, isCallValid, context, modePacked);
2220 }
2221 else
2222 {
2223 GenerateContextLostErrorOnCurrentGlobalContext();
2224 }
2225 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2226 }
2227
GL_TexCoordPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)2228 void GL_APIENTRY GL_TexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
2229 {
2230 Context *context = GetValidGlobalContext();
2231 EVENT(context, GLTexCoordPointer,
2232 "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
2233 CID(context), size, GLenumToString(GLESEnum::TexCoordPointerType, type), stride,
2234 (uintptr_t)pointer);
2235
2236 if (context)
2237 {
2238 VertexAttribType typePacked = PackParam<VertexAttribType>(type);
2239 SCOPED_SHARE_CONTEXT_LOCK(context);
2240 bool isCallValid =
2241 (context->skipValidation() ||
2242 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2243 context->getMutableErrorSetForValidation(),
2244 angle::EntryPoint::GLTexCoordPointer) &&
2245 ValidateTexCoordPointer(context, angle::EntryPoint::GLTexCoordPointer, size,
2246 typePacked, stride, pointer)));
2247 if (isCallValid)
2248 {
2249 context->texCoordPointer(size, typePacked, stride, pointer);
2250 }
2251 ANGLE_CAPTURE_GL(TexCoordPointer, isCallValid, context, size, typePacked, stride, pointer);
2252 }
2253 else
2254 {
2255 GenerateContextLostErrorOnCurrentGlobalContext();
2256 }
2257 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2258 }
2259
GL_TexEnvf(GLenum target,GLenum pname,GLfloat param)2260 void GL_APIENTRY GL_TexEnvf(GLenum target, GLenum pname, GLfloat param)
2261 {
2262 Context *context = GetValidGlobalContext();
2263 EVENT(context, GLTexEnvf, "context = %d, target = %s, pname = %s, param = %f", CID(context),
2264 GLenumToString(GLESEnum::TextureEnvTarget, target),
2265 GLenumToString(GLESEnum::TextureEnvParameter, pname), param);
2266
2267 if (context)
2268 {
2269 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
2270 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
2271 bool isCallValid =
2272 (context->skipValidation() ||
2273 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2274 context->getMutableErrorSetForValidation(),
2275 angle::EntryPoint::GLTexEnvf) &&
2276 ValidateTexEnvf(context->getPrivateState(),
2277 context->getMutableErrorSetForValidation(),
2278 angle::EntryPoint::GLTexEnvf, targetPacked, pnamePacked, param)));
2279 if (isCallValid)
2280 {
2281 ContextPrivateTexEnvf(context->getMutablePrivateState(),
2282 context->getMutablePrivateStateCache(), targetPacked, pnamePacked,
2283 param);
2284 }
2285 ANGLE_CAPTURE_GL(TexEnvf, isCallValid, context, targetPacked, pnamePacked, param);
2286 }
2287 else
2288 {
2289 GenerateContextLostErrorOnCurrentGlobalContext();
2290 }
2291 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2292 }
2293
GL_TexEnvfv(GLenum target,GLenum pname,const GLfloat * params)2294 void GL_APIENTRY GL_TexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
2295 {
2296 Context *context = GetValidGlobalContext();
2297 EVENT(context, GLTexEnvfv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "",
2298 CID(context), GLenumToString(GLESEnum::TextureEnvTarget, target),
2299 GLenumToString(GLESEnum::TextureEnvParameter, pname), (uintptr_t)params);
2300
2301 if (context)
2302 {
2303 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
2304 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
2305 bool isCallValid =
2306 (context->skipValidation() ||
2307 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2308 context->getMutableErrorSetForValidation(),
2309 angle::EntryPoint::GLTexEnvfv) &&
2310 ValidateTexEnvfv(context->getPrivateState(),
2311 context->getMutableErrorSetForValidation(),
2312 angle::EntryPoint::GLTexEnvfv, targetPacked, pnamePacked, params)));
2313 if (isCallValid)
2314 {
2315 ContextPrivateTexEnvfv(context->getMutablePrivateState(),
2316 context->getMutablePrivateStateCache(), targetPacked,
2317 pnamePacked, params);
2318 }
2319 ANGLE_CAPTURE_GL(TexEnvfv, isCallValid, context, targetPacked, pnamePacked, params);
2320 }
2321 else
2322 {
2323 GenerateContextLostErrorOnCurrentGlobalContext();
2324 }
2325 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2326 }
2327
GL_TexEnvi(GLenum target,GLenum pname,GLint param)2328 void GL_APIENTRY GL_TexEnvi(GLenum target, GLenum pname, GLint param)
2329 {
2330 Context *context = GetValidGlobalContext();
2331 EVENT(context, GLTexEnvi, "context = %d, target = %s, pname = %s, param = %d", CID(context),
2332 GLenumToString(GLESEnum::TextureEnvTarget, target),
2333 GLenumToString(GLESEnum::TextureEnvParameter, pname), param);
2334
2335 if (context)
2336 {
2337 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
2338 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
2339 bool isCallValid =
2340 (context->skipValidation() ||
2341 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2342 context->getMutableErrorSetForValidation(),
2343 angle::EntryPoint::GLTexEnvi) &&
2344 ValidateTexEnvi(context->getPrivateState(),
2345 context->getMutableErrorSetForValidation(),
2346 angle::EntryPoint::GLTexEnvi, targetPacked, pnamePacked, param)));
2347 if (isCallValid)
2348 {
2349 ContextPrivateTexEnvi(context->getMutablePrivateState(),
2350 context->getMutablePrivateStateCache(), targetPacked, pnamePacked,
2351 param);
2352 }
2353 ANGLE_CAPTURE_GL(TexEnvi, isCallValid, context, targetPacked, pnamePacked, param);
2354 }
2355 else
2356 {
2357 GenerateContextLostErrorOnCurrentGlobalContext();
2358 }
2359 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2360 }
2361
GL_TexEnviv(GLenum target,GLenum pname,const GLint * params)2362 void GL_APIENTRY GL_TexEnviv(GLenum target, GLenum pname, const GLint *params)
2363 {
2364 Context *context = GetValidGlobalContext();
2365 EVENT(context, GLTexEnviv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "",
2366 CID(context), GLenumToString(GLESEnum::TextureEnvTarget, target),
2367 GLenumToString(GLESEnum::TextureEnvParameter, pname), (uintptr_t)params);
2368
2369 if (context)
2370 {
2371 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
2372 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
2373 bool isCallValid =
2374 (context->skipValidation() ||
2375 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2376 context->getMutableErrorSetForValidation(),
2377 angle::EntryPoint::GLTexEnviv) &&
2378 ValidateTexEnviv(context->getPrivateState(),
2379 context->getMutableErrorSetForValidation(),
2380 angle::EntryPoint::GLTexEnviv, targetPacked, pnamePacked, params)));
2381 if (isCallValid)
2382 {
2383 ContextPrivateTexEnviv(context->getMutablePrivateState(),
2384 context->getMutablePrivateStateCache(), targetPacked,
2385 pnamePacked, params);
2386 }
2387 ANGLE_CAPTURE_GL(TexEnviv, isCallValid, context, targetPacked, pnamePacked, params);
2388 }
2389 else
2390 {
2391 GenerateContextLostErrorOnCurrentGlobalContext();
2392 }
2393 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2394 }
2395
GL_TexEnvx(GLenum target,GLenum pname,GLfixed param)2396 void GL_APIENTRY GL_TexEnvx(GLenum target, GLenum pname, GLfixed param)
2397 {
2398 Context *context = GetValidGlobalContext();
2399 EVENT(context, GLTexEnvx, "context = %d, target = %s, pname = %s, param = 0x%X", CID(context),
2400 GLenumToString(GLESEnum::TextureEnvTarget, target),
2401 GLenumToString(GLESEnum::TextureEnvParameter, pname), param);
2402
2403 if (context)
2404 {
2405 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
2406 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
2407 bool isCallValid =
2408 (context->skipValidation() ||
2409 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2410 context->getMutableErrorSetForValidation(),
2411 angle::EntryPoint::GLTexEnvx) &&
2412 ValidateTexEnvx(context->getPrivateState(),
2413 context->getMutableErrorSetForValidation(),
2414 angle::EntryPoint::GLTexEnvx, targetPacked, pnamePacked, param)));
2415 if (isCallValid)
2416 {
2417 ContextPrivateTexEnvx(context->getMutablePrivateState(),
2418 context->getMutablePrivateStateCache(), targetPacked, pnamePacked,
2419 param);
2420 }
2421 ANGLE_CAPTURE_GL(TexEnvx, isCallValid, context, targetPacked, pnamePacked, param);
2422 }
2423 else
2424 {
2425 GenerateContextLostErrorOnCurrentGlobalContext();
2426 }
2427 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2428 }
2429
GL_TexEnvxv(GLenum target,GLenum pname,const GLfixed * params)2430 void GL_APIENTRY GL_TexEnvxv(GLenum target, GLenum pname, const GLfixed *params)
2431 {
2432 Context *context = GetValidGlobalContext();
2433 EVENT(context, GLTexEnvxv, "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "",
2434 CID(context), GLenumToString(GLESEnum::TextureEnvTarget, target),
2435 GLenumToString(GLESEnum::TextureEnvParameter, pname), (uintptr_t)params);
2436
2437 if (context)
2438 {
2439 TextureEnvTarget targetPacked = PackParam<TextureEnvTarget>(target);
2440 TextureEnvParameter pnamePacked = PackParam<TextureEnvParameter>(pname);
2441 bool isCallValid =
2442 (context->skipValidation() ||
2443 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2444 context->getMutableErrorSetForValidation(),
2445 angle::EntryPoint::GLTexEnvxv) &&
2446 ValidateTexEnvxv(context->getPrivateState(),
2447 context->getMutableErrorSetForValidation(),
2448 angle::EntryPoint::GLTexEnvxv, targetPacked, pnamePacked, params)));
2449 if (isCallValid)
2450 {
2451 ContextPrivateTexEnvxv(context->getMutablePrivateState(),
2452 context->getMutablePrivateStateCache(), targetPacked,
2453 pnamePacked, params);
2454 }
2455 ANGLE_CAPTURE_GL(TexEnvxv, isCallValid, context, targetPacked, pnamePacked, params);
2456 }
2457 else
2458 {
2459 GenerateContextLostErrorOnCurrentGlobalContext();
2460 }
2461 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2462 }
2463
GL_TexParameterx(GLenum target,GLenum pname,GLfixed param)2464 void GL_APIENTRY GL_TexParameterx(GLenum target, GLenum pname, GLfixed param)
2465 {
2466 Context *context = GetValidGlobalContext();
2467 EVENT(context, GLTexParameterx, "context = %d, target = %s, pname = %s, param = 0x%X",
2468 CID(context), GLenumToString(GLESEnum::TextureTarget, target),
2469 GLenumToString(GLESEnum::GetTextureParameter, pname), param);
2470
2471 if (context)
2472 {
2473 TextureType targetPacked = PackParam<TextureType>(target);
2474 SCOPED_SHARE_CONTEXT_LOCK(context);
2475 bool isCallValid = (context->skipValidation() ||
2476 ValidateTexParameterx(context, angle::EntryPoint::GLTexParameterx,
2477 targetPacked, pname, param));
2478 if (isCallValid)
2479 {
2480 context->texParameterx(targetPacked, pname, param);
2481 }
2482 ANGLE_CAPTURE_GL(TexParameterx, isCallValid, context, targetPacked, pname, param);
2483 }
2484 else
2485 {
2486 GenerateContextLostErrorOnCurrentGlobalContext();
2487 }
2488 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2489 }
2490
GL_TexParameterxv(GLenum target,GLenum pname,const GLfixed * params)2491 void GL_APIENTRY GL_TexParameterxv(GLenum target, GLenum pname, const GLfixed *params)
2492 {
2493 Context *context = GetValidGlobalContext();
2494 EVENT(context, GLTexParameterxv,
2495 "context = %d, target = %s, pname = %s, params = 0x%016" PRIxPTR "", CID(context),
2496 GLenumToString(GLESEnum::TextureTarget, target),
2497 GLenumToString(GLESEnum::GetTextureParameter, pname), (uintptr_t)params);
2498
2499 if (context)
2500 {
2501 TextureType targetPacked = PackParam<TextureType>(target);
2502 SCOPED_SHARE_CONTEXT_LOCK(context);
2503 bool isCallValid = (context->skipValidation() ||
2504 ValidateTexParameterxv(context, angle::EntryPoint::GLTexParameterxv,
2505 targetPacked, pname, params));
2506 if (isCallValid)
2507 {
2508 context->texParameterxv(targetPacked, pname, params);
2509 }
2510 ANGLE_CAPTURE_GL(TexParameterxv, isCallValid, context, targetPacked, pname, params);
2511 }
2512 else
2513 {
2514 GenerateContextLostErrorOnCurrentGlobalContext();
2515 }
2516 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2517 }
2518
GL_Translatef(GLfloat x,GLfloat y,GLfloat z)2519 void GL_APIENTRY GL_Translatef(GLfloat x, GLfloat y, GLfloat z)
2520 {
2521 Context *context = GetValidGlobalContext();
2522 EVENT(context, GLTranslatef, "context = %d, x = %f, y = %f, z = %f", CID(context), x, y, z);
2523
2524 if (context)
2525 {
2526 bool isCallValid =
2527 (context->skipValidation() ||
2528 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2529 context->getMutableErrorSetForValidation(),
2530 angle::EntryPoint::GLTranslatef) &&
2531 ValidateTranslatef(context->getPrivateState(),
2532 context->getMutableErrorSetForValidation(),
2533 angle::EntryPoint::GLTranslatef, x, y, z)));
2534 if (isCallValid)
2535 {
2536 ContextPrivateTranslatef(context->getMutablePrivateState(),
2537 context->getMutablePrivateStateCache(), x, y, z);
2538 }
2539 ANGLE_CAPTURE_GL(Translatef, isCallValid, context, x, y, z);
2540 }
2541 else
2542 {
2543 GenerateContextLostErrorOnCurrentGlobalContext();
2544 }
2545 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2546 }
2547
GL_Translatex(GLfixed x,GLfixed y,GLfixed z)2548 void GL_APIENTRY GL_Translatex(GLfixed x, GLfixed y, GLfixed z)
2549 {
2550 Context *context = GetValidGlobalContext();
2551 EVENT(context, GLTranslatex, "context = %d, x = 0x%X, y = 0x%X, z = 0x%X", CID(context), x, y,
2552 z);
2553
2554 if (context)
2555 {
2556 bool isCallValid =
2557 (context->skipValidation() ||
2558 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2559 context->getMutableErrorSetForValidation(),
2560 angle::EntryPoint::GLTranslatex) &&
2561 ValidateTranslatex(context->getPrivateState(),
2562 context->getMutableErrorSetForValidation(),
2563 angle::EntryPoint::GLTranslatex, x, y, z)));
2564 if (isCallValid)
2565 {
2566 ContextPrivateTranslatex(context->getMutablePrivateState(),
2567 context->getMutablePrivateStateCache(), x, y, z);
2568 }
2569 ANGLE_CAPTURE_GL(Translatex, isCallValid, context, x, y, z);
2570 }
2571 else
2572 {
2573 GenerateContextLostErrorOnCurrentGlobalContext();
2574 }
2575 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2576 }
2577
GL_VertexPointer(GLint size,GLenum type,GLsizei stride,const void * pointer)2578 void GL_APIENTRY GL_VertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
2579 {
2580 Context *context = GetValidGlobalContext();
2581 EVENT(context, GLVertexPointer,
2582 "context = %d, size = %d, type = %s, stride = %d, pointer = 0x%016" PRIxPTR "",
2583 CID(context), size, GLenumToString(GLESEnum::VertexPointerType, type), stride,
2584 (uintptr_t)pointer);
2585
2586 if (context)
2587 {
2588 VertexAttribType typePacked = PackParam<VertexAttribType>(type);
2589 SCOPED_SHARE_CONTEXT_LOCK(context);
2590 bool isCallValid =
2591 (context->skipValidation() ||
2592 (ValidatePixelLocalStorageInactive(context->getPrivateState(),
2593 context->getMutableErrorSetForValidation(),
2594 angle::EntryPoint::GLVertexPointer) &&
2595 ValidateVertexPointer(context, angle::EntryPoint::GLVertexPointer, size, typePacked,
2596 stride, pointer)));
2597 if (isCallValid)
2598 {
2599 context->vertexPointer(size, typePacked, stride, pointer);
2600 }
2601 ANGLE_CAPTURE_GL(VertexPointer, isCallValid, context, size, typePacked, stride, pointer);
2602 }
2603 else
2604 {
2605 GenerateContextLostErrorOnCurrentGlobalContext();
2606 }
2607 ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
2608 }
2609
2610 } // extern "C"
2611