• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_gl_2_autogen.cpp:
9 //   Defines the Desktop GL 2.x entry points.
10 
11 #include "libGLESv2/entry_points_gl_2_autogen.h"
12 
13 #include "common/gl_enum_utils.h"
14 #include "libANGLE/Context.h"
15 #include "libANGLE/Context.inl.h"
16 #include "libANGLE/capture/capture_gl_2_autogen.h"
17 #include "libANGLE/context_private_call_gl_autogen.h"
18 #include "libANGLE/context_private_call_gles_autogen.h"
19 #include "libANGLE/entry_points_utils.h"
20 #include "libANGLE/validationEGL.h"
21 #include "libANGLE/validationES.h"
22 #include "libANGLE/validationES1.h"
23 #include "libANGLE/validationES2.h"
24 #include "libANGLE/validationES3.h"
25 #include "libANGLE/validationES31.h"
26 #include "libANGLE/validationES32.h"
27 #include "libANGLE/validationESEXT.h"
28 #include "libANGLE/validationGL2_autogen.h"
29 #include "libGLESv2/global_state.h"
30 
31 using namespace gl;
32 
33 extern "C" {
34 
35 // GL 2.0
GL_GetVertexAttribdv(GLuint index,GLenum pname,GLdouble * params)36 void GL_APIENTRY GL_GetVertexAttribdv(GLuint index, GLenum pname, GLdouble *params)
37 {
38     Context *context = GetValidGlobalContext();
39     EVENT(context, GLGetVertexAttribdv,
40           "context = %d, index = %u, pname = %s, params = 0x%016" PRIxPTR "", CID(context), index,
41           GLenumToString(BigGLEnum::AllEnums, pname), (uintptr_t)params);
42 
43     if (context)
44     {
45         SCOPED_SHARE_CONTEXT_LOCK(context);
46         bool isCallValid =
47             (context->skipValidation() ||
48              ValidateGetVertexAttribdv(context, angle::EntryPoint::GLGetVertexAttribdv, index,
49                                        pname, params));
50         if (isCallValid)
51         {
52             context->getVertexAttribdv(index, pname, params);
53         }
54         ANGLE_CAPTURE_GL(GetVertexAttribdv, isCallValid, context, index, pname, params);
55     }
56     else
57     {
58         GenerateContextLostErrorOnCurrentGlobalContext();
59     }
60     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
61 }
62 
GL_VertexAttrib1d(GLuint index,GLdouble x)63 void GL_APIENTRY GL_VertexAttrib1d(GLuint index, GLdouble x)
64 {
65     Context *context = GetValidGlobalContext();
66     EVENT(context, GLVertexAttrib1d, "context = %d, index = %u, x = %f", CID(context), index, x);
67 
68     if (context)
69     {
70         bool isCallValid = (context->skipValidation() ||
71                             ValidateVertexAttrib1d(context->getPrivateState(),
72                                                    context->getMutableErrorSetForValidation(),
73                                                    angle::EntryPoint::GLVertexAttrib1d, index, x));
74         if (isCallValid)
75         {
76             ContextPrivateVertexAttrib1d(context->getMutablePrivateState(),
77                                          context->getMutablePrivateStateCache(), index, x);
78         }
79         ANGLE_CAPTURE_GL(VertexAttrib1d, isCallValid, context, index, x);
80     }
81     else
82     {
83         GenerateContextLostErrorOnCurrentGlobalContext();
84     }
85     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
86 }
87 
GL_VertexAttrib1dv(GLuint index,const GLdouble * v)88 void GL_APIENTRY GL_VertexAttrib1dv(GLuint index, const GLdouble *v)
89 {
90     Context *context = GetValidGlobalContext();
91     EVENT(context, GLVertexAttrib1dv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
92           CID(context), index, (uintptr_t)v);
93 
94     if (context)
95     {
96         bool isCallValid =
97             (context->skipValidation() ||
98              ValidateVertexAttrib1dv(context->getPrivateState(),
99                                      context->getMutableErrorSetForValidation(),
100                                      angle::EntryPoint::GLVertexAttrib1dv, index, v));
101         if (isCallValid)
102         {
103             ContextPrivateVertexAttrib1dv(context->getMutablePrivateState(),
104                                           context->getMutablePrivateStateCache(), index, v);
105         }
106         ANGLE_CAPTURE_GL(VertexAttrib1dv, isCallValid, context, index, v);
107     }
108     else
109     {
110         GenerateContextLostErrorOnCurrentGlobalContext();
111     }
112     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
113 }
114 
GL_VertexAttrib1s(GLuint index,GLshort x)115 void GL_APIENTRY GL_VertexAttrib1s(GLuint index, GLshort x)
116 {
117     Context *context = GetValidGlobalContext();
118     EVENT(context, GLVertexAttrib1s, "context = %d, index = %u, x = %d", CID(context), index, x);
119 
120     if (context)
121     {
122         bool isCallValid = (context->skipValidation() ||
123                             ValidateVertexAttrib1s(context->getPrivateState(),
124                                                    context->getMutableErrorSetForValidation(),
125                                                    angle::EntryPoint::GLVertexAttrib1s, index, x));
126         if (isCallValid)
127         {
128             ContextPrivateVertexAttrib1s(context->getMutablePrivateState(),
129                                          context->getMutablePrivateStateCache(), index, x);
130         }
131         ANGLE_CAPTURE_GL(VertexAttrib1s, isCallValid, context, index, x);
132     }
133     else
134     {
135         GenerateContextLostErrorOnCurrentGlobalContext();
136     }
137     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
138 }
139 
GL_VertexAttrib1sv(GLuint index,const GLshort * v)140 void GL_APIENTRY GL_VertexAttrib1sv(GLuint index, const GLshort *v)
141 {
142     Context *context = GetValidGlobalContext();
143     EVENT(context, GLVertexAttrib1sv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
144           CID(context), index, (uintptr_t)v);
145 
146     if (context)
147     {
148         bool isCallValid =
149             (context->skipValidation() ||
150              ValidateVertexAttrib1sv(context->getPrivateState(),
151                                      context->getMutableErrorSetForValidation(),
152                                      angle::EntryPoint::GLVertexAttrib1sv, index, v));
153         if (isCallValid)
154         {
155             ContextPrivateVertexAttrib1sv(context->getMutablePrivateState(),
156                                           context->getMutablePrivateStateCache(), index, v);
157         }
158         ANGLE_CAPTURE_GL(VertexAttrib1sv, isCallValid, context, index, v);
159     }
160     else
161     {
162         GenerateContextLostErrorOnCurrentGlobalContext();
163     }
164     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
165 }
166 
GL_VertexAttrib2d(GLuint index,GLdouble x,GLdouble y)167 void GL_APIENTRY GL_VertexAttrib2d(GLuint index, GLdouble x, GLdouble y)
168 {
169     Context *context = GetValidGlobalContext();
170     EVENT(context, GLVertexAttrib2d, "context = %d, index = %u, x = %f, y = %f", CID(context),
171           index, x, y);
172 
173     if (context)
174     {
175         bool isCallValid =
176             (context->skipValidation() ||
177              ValidateVertexAttrib2d(context->getPrivateState(),
178                                     context->getMutableErrorSetForValidation(),
179                                     angle::EntryPoint::GLVertexAttrib2d, index, x, y));
180         if (isCallValid)
181         {
182             ContextPrivateVertexAttrib2d(context->getMutablePrivateState(),
183                                          context->getMutablePrivateStateCache(), index, x, y);
184         }
185         ANGLE_CAPTURE_GL(VertexAttrib2d, isCallValid, context, index, x, y);
186     }
187     else
188     {
189         GenerateContextLostErrorOnCurrentGlobalContext();
190     }
191     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
192 }
193 
GL_VertexAttrib2dv(GLuint index,const GLdouble * v)194 void GL_APIENTRY GL_VertexAttrib2dv(GLuint index, const GLdouble *v)
195 {
196     Context *context = GetValidGlobalContext();
197     EVENT(context, GLVertexAttrib2dv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
198           CID(context), index, (uintptr_t)v);
199 
200     if (context)
201     {
202         bool isCallValid =
203             (context->skipValidation() ||
204              ValidateVertexAttrib2dv(context->getPrivateState(),
205                                      context->getMutableErrorSetForValidation(),
206                                      angle::EntryPoint::GLVertexAttrib2dv, index, v));
207         if (isCallValid)
208         {
209             ContextPrivateVertexAttrib2dv(context->getMutablePrivateState(),
210                                           context->getMutablePrivateStateCache(), index, v);
211         }
212         ANGLE_CAPTURE_GL(VertexAttrib2dv, isCallValid, context, index, v);
213     }
214     else
215     {
216         GenerateContextLostErrorOnCurrentGlobalContext();
217     }
218     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
219 }
220 
GL_VertexAttrib2s(GLuint index,GLshort x,GLshort y)221 void GL_APIENTRY GL_VertexAttrib2s(GLuint index, GLshort x, GLshort y)
222 {
223     Context *context = GetValidGlobalContext();
224     EVENT(context, GLVertexAttrib2s, "context = %d, index = %u, x = %d, y = %d", CID(context),
225           index, x, y);
226 
227     if (context)
228     {
229         bool isCallValid =
230             (context->skipValidation() ||
231              ValidateVertexAttrib2s(context->getPrivateState(),
232                                     context->getMutableErrorSetForValidation(),
233                                     angle::EntryPoint::GLVertexAttrib2s, index, x, y));
234         if (isCallValid)
235         {
236             ContextPrivateVertexAttrib2s(context->getMutablePrivateState(),
237                                          context->getMutablePrivateStateCache(), index, x, y);
238         }
239         ANGLE_CAPTURE_GL(VertexAttrib2s, isCallValid, context, index, x, y);
240     }
241     else
242     {
243         GenerateContextLostErrorOnCurrentGlobalContext();
244     }
245     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
246 }
247 
GL_VertexAttrib2sv(GLuint index,const GLshort * v)248 void GL_APIENTRY GL_VertexAttrib2sv(GLuint index, const GLshort *v)
249 {
250     Context *context = GetValidGlobalContext();
251     EVENT(context, GLVertexAttrib2sv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
252           CID(context), index, (uintptr_t)v);
253 
254     if (context)
255     {
256         bool isCallValid =
257             (context->skipValidation() ||
258              ValidateVertexAttrib2sv(context->getPrivateState(),
259                                      context->getMutableErrorSetForValidation(),
260                                      angle::EntryPoint::GLVertexAttrib2sv, index, v));
261         if (isCallValid)
262         {
263             ContextPrivateVertexAttrib2sv(context->getMutablePrivateState(),
264                                           context->getMutablePrivateStateCache(), index, v);
265         }
266         ANGLE_CAPTURE_GL(VertexAttrib2sv, isCallValid, context, index, v);
267     }
268     else
269     {
270         GenerateContextLostErrorOnCurrentGlobalContext();
271     }
272     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
273 }
274 
GL_VertexAttrib3d(GLuint index,GLdouble x,GLdouble y,GLdouble z)275 void GL_APIENTRY GL_VertexAttrib3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
276 {
277     Context *context = GetValidGlobalContext();
278     EVENT(context, GLVertexAttrib3d, "context = %d, index = %u, x = %f, y = %f, z = %f",
279           CID(context), index, x, y, z);
280 
281     if (context)
282     {
283         bool isCallValid =
284             (context->skipValidation() ||
285              ValidateVertexAttrib3d(context->getPrivateState(),
286                                     context->getMutableErrorSetForValidation(),
287                                     angle::EntryPoint::GLVertexAttrib3d, index, x, y, z));
288         if (isCallValid)
289         {
290             ContextPrivateVertexAttrib3d(context->getMutablePrivateState(),
291                                          context->getMutablePrivateStateCache(), index, x, y, z);
292         }
293         ANGLE_CAPTURE_GL(VertexAttrib3d, isCallValid, context, index, x, y, z);
294     }
295     else
296     {
297         GenerateContextLostErrorOnCurrentGlobalContext();
298     }
299     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
300 }
301 
GL_VertexAttrib3dv(GLuint index,const GLdouble * v)302 void GL_APIENTRY GL_VertexAttrib3dv(GLuint index, const GLdouble *v)
303 {
304     Context *context = GetValidGlobalContext();
305     EVENT(context, GLVertexAttrib3dv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
306           CID(context), index, (uintptr_t)v);
307 
308     if (context)
309     {
310         bool isCallValid =
311             (context->skipValidation() ||
312              ValidateVertexAttrib3dv(context->getPrivateState(),
313                                      context->getMutableErrorSetForValidation(),
314                                      angle::EntryPoint::GLVertexAttrib3dv, index, v));
315         if (isCallValid)
316         {
317             ContextPrivateVertexAttrib3dv(context->getMutablePrivateState(),
318                                           context->getMutablePrivateStateCache(), index, v);
319         }
320         ANGLE_CAPTURE_GL(VertexAttrib3dv, isCallValid, context, index, v);
321     }
322     else
323     {
324         GenerateContextLostErrorOnCurrentGlobalContext();
325     }
326     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
327 }
328 
GL_VertexAttrib3s(GLuint index,GLshort x,GLshort y,GLshort z)329 void GL_APIENTRY GL_VertexAttrib3s(GLuint index, GLshort x, GLshort y, GLshort z)
330 {
331     Context *context = GetValidGlobalContext();
332     EVENT(context, GLVertexAttrib3s, "context = %d, index = %u, x = %d, y = %d, z = %d",
333           CID(context), index, x, y, z);
334 
335     if (context)
336     {
337         bool isCallValid =
338             (context->skipValidation() ||
339              ValidateVertexAttrib3s(context->getPrivateState(),
340                                     context->getMutableErrorSetForValidation(),
341                                     angle::EntryPoint::GLVertexAttrib3s, index, x, y, z));
342         if (isCallValid)
343         {
344             ContextPrivateVertexAttrib3s(context->getMutablePrivateState(),
345                                          context->getMutablePrivateStateCache(), index, x, y, z);
346         }
347         ANGLE_CAPTURE_GL(VertexAttrib3s, isCallValid, context, index, x, y, z);
348     }
349     else
350     {
351         GenerateContextLostErrorOnCurrentGlobalContext();
352     }
353     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
354 }
355 
GL_VertexAttrib3sv(GLuint index,const GLshort * v)356 void GL_APIENTRY GL_VertexAttrib3sv(GLuint index, const GLshort *v)
357 {
358     Context *context = GetValidGlobalContext();
359     EVENT(context, GLVertexAttrib3sv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
360           CID(context), index, (uintptr_t)v);
361 
362     if (context)
363     {
364         bool isCallValid =
365             (context->skipValidation() ||
366              ValidateVertexAttrib3sv(context->getPrivateState(),
367                                      context->getMutableErrorSetForValidation(),
368                                      angle::EntryPoint::GLVertexAttrib3sv, index, v));
369         if (isCallValid)
370         {
371             ContextPrivateVertexAttrib3sv(context->getMutablePrivateState(),
372                                           context->getMutablePrivateStateCache(), index, v);
373         }
374         ANGLE_CAPTURE_GL(VertexAttrib3sv, isCallValid, context, index, v);
375     }
376     else
377     {
378         GenerateContextLostErrorOnCurrentGlobalContext();
379     }
380     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
381 }
382 
GL_VertexAttrib4Nbv(GLuint index,const GLbyte * v)383 void GL_APIENTRY GL_VertexAttrib4Nbv(GLuint index, const GLbyte *v)
384 {
385     Context *context = GetValidGlobalContext();
386     EVENT(context, GLVertexAttrib4Nbv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
387           CID(context), index, (uintptr_t)v);
388 
389     if (context)
390     {
391         bool isCallValid =
392             (context->skipValidation() ||
393              ValidateVertexAttrib4Nbv(context->getPrivateState(),
394                                       context->getMutableErrorSetForValidation(),
395                                       angle::EntryPoint::GLVertexAttrib4Nbv, index, v));
396         if (isCallValid)
397         {
398             ContextPrivateVertexAttrib4Nbv(context->getMutablePrivateState(),
399                                            context->getMutablePrivateStateCache(), index, v);
400         }
401         ANGLE_CAPTURE_GL(VertexAttrib4Nbv, isCallValid, context, index, v);
402     }
403     else
404     {
405         GenerateContextLostErrorOnCurrentGlobalContext();
406     }
407     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
408 }
409 
GL_VertexAttrib4Niv(GLuint index,const GLint * v)410 void GL_APIENTRY GL_VertexAttrib4Niv(GLuint index, const GLint *v)
411 {
412     Context *context = GetValidGlobalContext();
413     EVENT(context, GLVertexAttrib4Niv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
414           CID(context), index, (uintptr_t)v);
415 
416     if (context)
417     {
418         bool isCallValid =
419             (context->skipValidation() ||
420              ValidateVertexAttrib4Niv(context->getPrivateState(),
421                                       context->getMutableErrorSetForValidation(),
422                                       angle::EntryPoint::GLVertexAttrib4Niv, index, v));
423         if (isCallValid)
424         {
425             ContextPrivateVertexAttrib4Niv(context->getMutablePrivateState(),
426                                            context->getMutablePrivateStateCache(), index, v);
427         }
428         ANGLE_CAPTURE_GL(VertexAttrib4Niv, isCallValid, context, index, v);
429     }
430     else
431     {
432         GenerateContextLostErrorOnCurrentGlobalContext();
433     }
434     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
435 }
436 
GL_VertexAttrib4Nsv(GLuint index,const GLshort * v)437 void GL_APIENTRY GL_VertexAttrib4Nsv(GLuint index, const GLshort *v)
438 {
439     Context *context = GetValidGlobalContext();
440     EVENT(context, GLVertexAttrib4Nsv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
441           CID(context), index, (uintptr_t)v);
442 
443     if (context)
444     {
445         bool isCallValid =
446             (context->skipValidation() ||
447              ValidateVertexAttrib4Nsv(context->getPrivateState(),
448                                       context->getMutableErrorSetForValidation(),
449                                       angle::EntryPoint::GLVertexAttrib4Nsv, index, v));
450         if (isCallValid)
451         {
452             ContextPrivateVertexAttrib4Nsv(context->getMutablePrivateState(),
453                                            context->getMutablePrivateStateCache(), index, v);
454         }
455         ANGLE_CAPTURE_GL(VertexAttrib4Nsv, isCallValid, context, index, v);
456     }
457     else
458     {
459         GenerateContextLostErrorOnCurrentGlobalContext();
460     }
461     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
462 }
463 
GL_VertexAttrib4Nub(GLuint index,GLubyte x,GLubyte y,GLubyte z,GLubyte w)464 void GL_APIENTRY GL_VertexAttrib4Nub(GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w)
465 {
466     Context *context = GetValidGlobalContext();
467     EVENT(context, GLVertexAttrib4Nub, "context = %d, index = %u, x = %d, y = %d, z = %d, w = %d",
468           CID(context), index, x, y, z, w);
469 
470     if (context)
471     {
472         bool isCallValid =
473             (context->skipValidation() ||
474              ValidateVertexAttrib4Nub(context->getPrivateState(),
475                                       context->getMutableErrorSetForValidation(),
476                                       angle::EntryPoint::GLVertexAttrib4Nub, index, x, y, z, w));
477         if (isCallValid)
478         {
479             ContextPrivateVertexAttrib4Nub(context->getMutablePrivateState(),
480                                            context->getMutablePrivateStateCache(), index, x, y, z,
481                                            w);
482         }
483         ANGLE_CAPTURE_GL(VertexAttrib4Nub, isCallValid, context, index, x, y, z, w);
484     }
485     else
486     {
487         GenerateContextLostErrorOnCurrentGlobalContext();
488     }
489     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
490 }
491 
GL_VertexAttrib4Nubv(GLuint index,const GLubyte * v)492 void GL_APIENTRY GL_VertexAttrib4Nubv(GLuint index, const GLubyte *v)
493 {
494     Context *context = GetValidGlobalContext();
495     EVENT(context, GLVertexAttrib4Nubv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
496           CID(context), index, (uintptr_t)v);
497 
498     if (context)
499     {
500         bool isCallValid =
501             (context->skipValidation() ||
502              ValidateVertexAttrib4Nubv(context->getPrivateState(),
503                                        context->getMutableErrorSetForValidation(),
504                                        angle::EntryPoint::GLVertexAttrib4Nubv, index, v));
505         if (isCallValid)
506         {
507             ContextPrivateVertexAttrib4Nubv(context->getMutablePrivateState(),
508                                             context->getMutablePrivateStateCache(), index, v);
509         }
510         ANGLE_CAPTURE_GL(VertexAttrib4Nubv, isCallValid, context, index, v);
511     }
512     else
513     {
514         GenerateContextLostErrorOnCurrentGlobalContext();
515     }
516     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
517 }
518 
GL_VertexAttrib4Nuiv(GLuint index,const GLuint * v)519 void GL_APIENTRY GL_VertexAttrib4Nuiv(GLuint index, const GLuint *v)
520 {
521     Context *context = GetValidGlobalContext();
522     EVENT(context, GLVertexAttrib4Nuiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
523           CID(context), index, (uintptr_t)v);
524 
525     if (context)
526     {
527         bool isCallValid =
528             (context->skipValidation() ||
529              ValidateVertexAttrib4Nuiv(context->getPrivateState(),
530                                        context->getMutableErrorSetForValidation(),
531                                        angle::EntryPoint::GLVertexAttrib4Nuiv, index, v));
532         if (isCallValid)
533         {
534             ContextPrivateVertexAttrib4Nuiv(context->getMutablePrivateState(),
535                                             context->getMutablePrivateStateCache(), index, v);
536         }
537         ANGLE_CAPTURE_GL(VertexAttrib4Nuiv, isCallValid, context, index, v);
538     }
539     else
540     {
541         GenerateContextLostErrorOnCurrentGlobalContext();
542     }
543     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
544 }
545 
GL_VertexAttrib4Nusv(GLuint index,const GLushort * v)546 void GL_APIENTRY GL_VertexAttrib4Nusv(GLuint index, const GLushort *v)
547 {
548     Context *context = GetValidGlobalContext();
549     EVENT(context, GLVertexAttrib4Nusv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
550           CID(context), index, (uintptr_t)v);
551 
552     if (context)
553     {
554         bool isCallValid =
555             (context->skipValidation() ||
556              ValidateVertexAttrib4Nusv(context->getPrivateState(),
557                                        context->getMutableErrorSetForValidation(),
558                                        angle::EntryPoint::GLVertexAttrib4Nusv, index, v));
559         if (isCallValid)
560         {
561             ContextPrivateVertexAttrib4Nusv(context->getMutablePrivateState(),
562                                             context->getMutablePrivateStateCache(), index, v);
563         }
564         ANGLE_CAPTURE_GL(VertexAttrib4Nusv, isCallValid, context, index, v);
565     }
566     else
567     {
568         GenerateContextLostErrorOnCurrentGlobalContext();
569     }
570     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
571 }
572 
GL_VertexAttrib4bv(GLuint index,const GLbyte * v)573 void GL_APIENTRY GL_VertexAttrib4bv(GLuint index, const GLbyte *v)
574 {
575     Context *context = GetValidGlobalContext();
576     EVENT(context, GLVertexAttrib4bv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
577           CID(context), index, (uintptr_t)v);
578 
579     if (context)
580     {
581         bool isCallValid =
582             (context->skipValidation() ||
583              ValidateVertexAttrib4bv(context->getPrivateState(),
584                                      context->getMutableErrorSetForValidation(),
585                                      angle::EntryPoint::GLVertexAttrib4bv, index, v));
586         if (isCallValid)
587         {
588             ContextPrivateVertexAttrib4bv(context->getMutablePrivateState(),
589                                           context->getMutablePrivateStateCache(), index, v);
590         }
591         ANGLE_CAPTURE_GL(VertexAttrib4bv, isCallValid, context, index, v);
592     }
593     else
594     {
595         GenerateContextLostErrorOnCurrentGlobalContext();
596     }
597     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
598 }
599 
GL_VertexAttrib4d(GLuint index,GLdouble x,GLdouble y,GLdouble z,GLdouble w)600 void GL_APIENTRY GL_VertexAttrib4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
601 {
602     Context *context = GetValidGlobalContext();
603     EVENT(context, GLVertexAttrib4d, "context = %d, index = %u, x = %f, y = %f, z = %f, w = %f",
604           CID(context), index, x, y, z, w);
605 
606     if (context)
607     {
608         bool isCallValid =
609             (context->skipValidation() ||
610              ValidateVertexAttrib4d(context->getPrivateState(),
611                                     context->getMutableErrorSetForValidation(),
612                                     angle::EntryPoint::GLVertexAttrib4d, index, x, y, z, w));
613         if (isCallValid)
614         {
615             ContextPrivateVertexAttrib4d(context->getMutablePrivateState(),
616                                          context->getMutablePrivateStateCache(), index, x, y, z, w);
617         }
618         ANGLE_CAPTURE_GL(VertexAttrib4d, isCallValid, context, index, x, y, z, w);
619     }
620     else
621     {
622         GenerateContextLostErrorOnCurrentGlobalContext();
623     }
624     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
625 }
626 
GL_VertexAttrib4dv(GLuint index,const GLdouble * v)627 void GL_APIENTRY GL_VertexAttrib4dv(GLuint index, const GLdouble *v)
628 {
629     Context *context = GetValidGlobalContext();
630     EVENT(context, GLVertexAttrib4dv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
631           CID(context), index, (uintptr_t)v);
632 
633     if (context)
634     {
635         bool isCallValid =
636             (context->skipValidation() ||
637              ValidateVertexAttrib4dv(context->getPrivateState(),
638                                      context->getMutableErrorSetForValidation(),
639                                      angle::EntryPoint::GLVertexAttrib4dv, index, v));
640         if (isCallValid)
641         {
642             ContextPrivateVertexAttrib4dv(context->getMutablePrivateState(),
643                                           context->getMutablePrivateStateCache(), index, v);
644         }
645         ANGLE_CAPTURE_GL(VertexAttrib4dv, isCallValid, context, index, v);
646     }
647     else
648     {
649         GenerateContextLostErrorOnCurrentGlobalContext();
650     }
651     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
652 }
653 
GL_VertexAttrib4iv(GLuint index,const GLint * v)654 void GL_APIENTRY GL_VertexAttrib4iv(GLuint index, const GLint *v)
655 {
656     Context *context = GetValidGlobalContext();
657     EVENT(context, GLVertexAttrib4iv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
658           CID(context), index, (uintptr_t)v);
659 
660     if (context)
661     {
662         bool isCallValid =
663             (context->skipValidation() ||
664              ValidateVertexAttrib4iv(context->getPrivateState(),
665                                      context->getMutableErrorSetForValidation(),
666                                      angle::EntryPoint::GLVertexAttrib4iv, index, v));
667         if (isCallValid)
668         {
669             ContextPrivateVertexAttrib4iv(context->getMutablePrivateState(),
670                                           context->getMutablePrivateStateCache(), index, v);
671         }
672         ANGLE_CAPTURE_GL(VertexAttrib4iv, isCallValid, context, index, v);
673     }
674     else
675     {
676         GenerateContextLostErrorOnCurrentGlobalContext();
677     }
678     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
679 }
680 
GL_VertexAttrib4s(GLuint index,GLshort x,GLshort y,GLshort z,GLshort w)681 void GL_APIENTRY GL_VertexAttrib4s(GLuint index, GLshort x, GLshort y, GLshort z, GLshort w)
682 {
683     Context *context = GetValidGlobalContext();
684     EVENT(context, GLVertexAttrib4s, "context = %d, index = %u, x = %d, y = %d, z = %d, w = %d",
685           CID(context), index, x, y, z, w);
686 
687     if (context)
688     {
689         bool isCallValid =
690             (context->skipValidation() ||
691              ValidateVertexAttrib4s(context->getPrivateState(),
692                                     context->getMutableErrorSetForValidation(),
693                                     angle::EntryPoint::GLVertexAttrib4s, index, x, y, z, w));
694         if (isCallValid)
695         {
696             ContextPrivateVertexAttrib4s(context->getMutablePrivateState(),
697                                          context->getMutablePrivateStateCache(), index, x, y, z, w);
698         }
699         ANGLE_CAPTURE_GL(VertexAttrib4s, isCallValid, context, index, x, y, z, w);
700     }
701     else
702     {
703         GenerateContextLostErrorOnCurrentGlobalContext();
704     }
705     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
706 }
707 
GL_VertexAttrib4sv(GLuint index,const GLshort * v)708 void GL_APIENTRY GL_VertexAttrib4sv(GLuint index, const GLshort *v)
709 {
710     Context *context = GetValidGlobalContext();
711     EVENT(context, GLVertexAttrib4sv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
712           CID(context), index, (uintptr_t)v);
713 
714     if (context)
715     {
716         bool isCallValid =
717             (context->skipValidation() ||
718              ValidateVertexAttrib4sv(context->getPrivateState(),
719                                      context->getMutableErrorSetForValidation(),
720                                      angle::EntryPoint::GLVertexAttrib4sv, index, v));
721         if (isCallValid)
722         {
723             ContextPrivateVertexAttrib4sv(context->getMutablePrivateState(),
724                                           context->getMutablePrivateStateCache(), index, v);
725         }
726         ANGLE_CAPTURE_GL(VertexAttrib4sv, isCallValid, context, index, v);
727     }
728     else
729     {
730         GenerateContextLostErrorOnCurrentGlobalContext();
731     }
732     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
733 }
734 
GL_VertexAttrib4ubv(GLuint index,const GLubyte * v)735 void GL_APIENTRY GL_VertexAttrib4ubv(GLuint index, const GLubyte *v)
736 {
737     Context *context = GetValidGlobalContext();
738     EVENT(context, GLVertexAttrib4ubv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
739           CID(context), index, (uintptr_t)v);
740 
741     if (context)
742     {
743         bool isCallValid =
744             (context->skipValidation() ||
745              ValidateVertexAttrib4ubv(context->getPrivateState(),
746                                       context->getMutableErrorSetForValidation(),
747                                       angle::EntryPoint::GLVertexAttrib4ubv, index, v));
748         if (isCallValid)
749         {
750             ContextPrivateVertexAttrib4ubv(context->getMutablePrivateState(),
751                                            context->getMutablePrivateStateCache(), index, v);
752         }
753         ANGLE_CAPTURE_GL(VertexAttrib4ubv, isCallValid, context, index, v);
754     }
755     else
756     {
757         GenerateContextLostErrorOnCurrentGlobalContext();
758     }
759     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
760 }
761 
GL_VertexAttrib4uiv(GLuint index,const GLuint * v)762 void GL_APIENTRY GL_VertexAttrib4uiv(GLuint index, const GLuint *v)
763 {
764     Context *context = GetValidGlobalContext();
765     EVENT(context, GLVertexAttrib4uiv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
766           CID(context), index, (uintptr_t)v);
767 
768     if (context)
769     {
770         bool isCallValid =
771             (context->skipValidation() ||
772              ValidateVertexAttrib4uiv(context->getPrivateState(),
773                                       context->getMutableErrorSetForValidation(),
774                                       angle::EntryPoint::GLVertexAttrib4uiv, index, v));
775         if (isCallValid)
776         {
777             ContextPrivateVertexAttrib4uiv(context->getMutablePrivateState(),
778                                            context->getMutablePrivateStateCache(), index, v);
779         }
780         ANGLE_CAPTURE_GL(VertexAttrib4uiv, isCallValid, context, index, v);
781     }
782     else
783     {
784         GenerateContextLostErrorOnCurrentGlobalContext();
785     }
786     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
787 }
788 
GL_VertexAttrib4usv(GLuint index,const GLushort * v)789 void GL_APIENTRY GL_VertexAttrib4usv(GLuint index, const GLushort *v)
790 {
791     Context *context = GetValidGlobalContext();
792     EVENT(context, GLVertexAttrib4usv, "context = %d, index = %u, v = 0x%016" PRIxPTR "",
793           CID(context), index, (uintptr_t)v);
794 
795     if (context)
796     {
797         bool isCallValid =
798             (context->skipValidation() ||
799              ValidateVertexAttrib4usv(context->getPrivateState(),
800                                       context->getMutableErrorSetForValidation(),
801                                       angle::EntryPoint::GLVertexAttrib4usv, index, v));
802         if (isCallValid)
803         {
804             ContextPrivateVertexAttrib4usv(context->getMutablePrivateState(),
805                                            context->getMutablePrivateStateCache(), index, v);
806         }
807         ANGLE_CAPTURE_GL(VertexAttrib4usv, isCallValid, context, index, v);
808     }
809     else
810     {
811         GenerateContextLostErrorOnCurrentGlobalContext();
812     }
813     ASSERT(!egl::Display::GetCurrentThreadUnlockedTailCall()->any());
814 }
815 
816 // GL 2.1
817 }  // extern "C"
818