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