1 /*
2  * Copyright © 2012 Intel Corporation
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the next
12  * paragraph) shall be included in all copies or substantial portions of the
13  * Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
24 /**
25  * \name dispatch_sanity.cpp
26  *
27  * Verify that only set of functions that should be available in a particular
28  * API are available in that API.
29  *
30  * The list of expected functions originally came from the functions set by
31  * api_exec_es2.c.  This file no longer exists in Mesa (but api_exec_es1.c was
32  * still generated at the time this test was written).  It was the generated
33  * file that configured the dispatch table for ES2 contexts.  This test
34  * verifies that all of the functions set by the old api_exec_es2.c (with the
35  * recent addition of VAO functions) are set in the dispatch table and
36  * everything else is a NOP.
37  *
38  * When adding extensions that add new functions, this test will need to be
39  * modified to expect dispatch functions for the new extension functions.
40  */
41 
42 #include <gtest/gtest.h>
43 
44 #include "GL/gl.h"
45 #include "GL/glext.h"
46 #include "main/compiler.h"
47 #include "main/api_exec.h"
48 #include "main/context.h"
49 #include "main/remap.h"
50 #include "main/vtxfmt.h"
51 #include "glapi/glapi.h"
52 #include "drivers/common/driverfuncs.h"
53 
54 #include "swrast/swrast.h"
55 #include "vbo/vbo.h"
56 #include "tnl/tnl.h"
57 #include "swrast_setup/swrast_setup.h"
58 
59 #ifndef GLAPIENTRYP
60 #define GLAPIENTRYP GL_APIENTRYP
61 #endif
62 
63 #include "main/dispatch.h"
64 
65 struct function {
66    const char *name;
67    unsigned int Version;
68    int offset;
69 };
70 
71 extern const struct function common_desktop_functions_possible[];
72 extern const struct function gl_compatibility_functions_possible[];
73 extern const struct function gl_core_functions_possible[];
74 extern const struct function gles11_functions_possible[];
75 extern const struct function gles2_functions_possible[];
76 extern const struct function gles3_functions_possible[];
77 extern const struct function gles31_functions_possible[];
78 
79 class DispatchSanity_test : public ::testing::Test {
80 public:
81    virtual void SetUp();
82    void SetUpCtx(gl_api api, unsigned int version);
83 
84    struct gl_config visual;
85    struct dd_function_table driver_functions;
86    struct gl_context share_list;
87    struct gl_context ctx;
88    _glapi_proc *nop_table;
89 };
90 
91 void
SetUp()92 DispatchSanity_test::SetUp()
93 {
94    memset(&visual, 0, sizeof(visual));
95    memset(&driver_functions, 0, sizeof(driver_functions));
96    memset(&share_list, 0, sizeof(share_list));
97    memset(&ctx, 0, sizeof(ctx));
98 
99    _mesa_init_driver_functions(&driver_functions);
100 
101    const unsigned size = _glapi_get_dispatch_table_size();
102    nop_table = (_glapi_proc *) _mesa_new_nop_table(size);
103 }
104 
105 void
SetUpCtx(gl_api api,unsigned int version)106 DispatchSanity_test::SetUpCtx(gl_api api, unsigned int version)
107 {
108    _mesa_initialize_context(&ctx,
109                             api,
110                             &visual,
111                             NULL, // share_list
112                             &driver_functions);
113    _vbo_CreateContext(&ctx);
114 
115    _mesa_override_extensions(&ctx);
116    ctx.Version = version;
117 
118    _mesa_initialize_dispatch_tables(&ctx);
119    _mesa_initialize_vbo_vtxfmt(&ctx);
120 }
121 
122 static const char *
offset_to_proc_name_safe(unsigned offset)123 offset_to_proc_name_safe(unsigned offset)
124 {
125    const char *name = _glapi_get_proc_name(offset);
126    return name ? name : "???";
127 }
128 
129 /* Scan through the dispatch table and check that all the functions in
130  * _glapi_proc *table exist.
131  */
132 static void
validate_functions(struct gl_context * ctx,const struct function * function_table,const _glapi_proc * nop_table)133 validate_functions(struct gl_context *ctx, const struct function *function_table,
134                    const _glapi_proc *nop_table)
135 {
136    _glapi_proc *table = (_glapi_proc *) ctx->Exec;
137 
138    for (unsigned i = 0; function_table[i].name != NULL; i++) {
139       /* The context version is >= the GL version where the function was
140        * introduced. Therefore, the function cannot be set to the nop
141        * function.
142        */
143       const bool cant_be_nop = ctx->Version >= function_table[i].Version;
144 
145       const int offset = (function_table[i].offset != -1)
146          ? function_table[i].offset
147          : _glapi_get_proc_offset(function_table[i].name);
148 
149       ASSERT_NE(-1, offset)
150          << "Function: " << function_table[i].name;
151       ASSERT_EQ(offset,
152                 _glapi_get_proc_offset(function_table[i].name))
153          << "Function: " << function_table[i].name;
154       if (cant_be_nop) {
155          EXPECT_NE(nop_table[offset], table[offset])
156             << "Function: " << function_table[i].name
157             << " at offset " << offset;
158       }
159 
160       table[offset] = nop_table[offset];
161    }
162 }
163 
164 /* Scan through the table and ensure that there is nothing except
165  * nop functions (as set by validate_functions().
166  */
167 static void
validate_nops(struct gl_context * ctx,const _glapi_proc * nop_table)168 validate_nops(struct gl_context *ctx, const _glapi_proc *nop_table)
169 {
170    _glapi_proc *table = (_glapi_proc *) ctx->Exec;
171 
172    const unsigned size = _glapi_get_dispatch_table_size();
173    for (unsigned i = 0; i < size; i++) {
174       EXPECT_EQ(nop_table[i], table[i])
175          << "i = " << i << " (" << offset_to_proc_name_safe(i) << ")";
176    }
177 }
178 
TEST_F(DispatchSanity_test,GL31_CORE)179 TEST_F(DispatchSanity_test, GL31_CORE)
180 {
181    SetUpCtx(API_OPENGL_CORE, 31);
182    validate_functions(&ctx, common_desktop_functions_possible, nop_table);
183    validate_functions(&ctx, gl_core_functions_possible, nop_table);
184    validate_nops(&ctx, nop_table);
185 }
186 
TEST_F(DispatchSanity_test,GL30)187 TEST_F(DispatchSanity_test, GL30)
188 {
189    SetUpCtx(API_OPENGL_COMPAT, 30);
190    validate_functions(&ctx, common_desktop_functions_possible, nop_table);
191    validate_functions(&ctx, gl_compatibility_functions_possible, nop_table);
192    validate_nops(&ctx, nop_table);
193 }
194 
TEST_F(DispatchSanity_test,GLES11)195 TEST_F(DispatchSanity_test, GLES11)
196 {
197    SetUpCtx(API_OPENGLES, 11);
198    validate_functions(&ctx, gles11_functions_possible, nop_table);
199    validate_nops(&ctx, nop_table);
200 }
201 
TEST_F(DispatchSanity_test,GLES2)202 TEST_F(DispatchSanity_test, GLES2)
203 {
204    SetUpCtx(API_OPENGLES2, 20);
205    validate_functions(&ctx, gles2_functions_possible, nop_table);
206    validate_nops(&ctx, nop_table);
207 }
208 
TEST_F(DispatchSanity_test,GLES3)209 TEST_F(DispatchSanity_test, GLES3)
210 {
211    SetUpCtx(API_OPENGLES2, 30);
212    validate_functions(&ctx, gles2_functions_possible, nop_table);
213    validate_functions(&ctx, gles3_functions_possible, nop_table);
214    validate_nops(&ctx, nop_table);
215 }
216 
TEST_F(DispatchSanity_test,GLES31)217 TEST_F(DispatchSanity_test, GLES31)
218 {
219    SetUpCtx(API_OPENGLES2, 31);
220    validate_functions(&ctx, gles2_functions_possible, nop_table);
221    validate_functions(&ctx, gles3_functions_possible, nop_table);
222    validate_functions(&ctx, gles31_functions_possible, nop_table);
223    validate_nops(&ctx, nop_table);
224 }
225 
226 const struct function common_desktop_functions_possible[] = {
227    { "glCullFace", 10, -1 },
228    { "glFrontFace", 10, -1 },
229    { "glHint", 10, -1 },
230    { "glLineWidth", 10, -1 },
231    { "glPointSize", 10, -1 },
232    { "glPolygonMode", 10, -1 },
233    { "glScissor", 10, -1 },
234    { "glTexParameterf", 10, -1 },
235    { "glTexParameterfv", 10, -1 },
236    { "glTexParameteri", 10, -1 },
237    { "glTexParameteriv", 10, -1 },
238    { "glTexImage1D", 10, _gloffset_TexImage1D },
239    { "glTexImage2D", 10, _gloffset_TexImage2D },
240    { "glDrawBuffer", 10, -1 },
241    { "glClear", 10, -1 },
242    { "glClearColor", 10, -1 },
243    { "glClearStencil", 10, -1 },
244    { "glClearDepth", 10, -1 },
245    { "glStencilMask", 10, -1 },
246    { "glColorMask", 10, -1 },
247    { "glDepthMask", 10, -1 },
248    { "glDisable", 10, -1 },
249    { "glEnable", 10, -1 },
250    { "glFinish", 10, -1 },
251    { "glFlush", 10, -1 },
252    { "glBlendFunc", 10, -1 },
253    { "glLogicOp", 10, -1 },
254    { "glStencilFunc", 10, -1 },
255    { "glStencilOp", 10, -1 },
256    { "glDepthFunc", 10, -1 },
257    { "glPixelStoref", 10, -1 },
258    { "glPixelStorei", 10, -1 },
259    { "glReadBuffer", 10, -1 },
260    { "glReadPixels", 10, -1 },
261    { "glGetBooleanv", 10, -1 },
262    { "glGetDoublev", 10, -1 },
263    { "glGetError", 10, -1 },
264    { "glGetFloatv", 10, -1 },
265    { "glGetIntegerv", 10, -1 },
266    { "glGetString", 10, -1 },
267    { "glGetTexImage", 10, -1 },
268    { "glGetTexParameterfv", 10, -1 },
269    { "glGetTexParameteriv", 10, -1 },
270    { "glGetTexLevelParameterfv", 10, -1 },
271    { "glGetTexLevelParameteriv", 10, -1 },
272    { "glIsEnabled", 10, -1 },
273    { "glDepthRange", 10, -1 },
274    { "glViewport", 10, -1 },
275 
276    /* GL 1.1 */
277    { "glDrawArrays", 11, -1 },
278    { "glDrawElements", 11, -1 },
279    { "glGetPointerv", 11, -1 },
280    { "glPolygonOffset", 11, -1 },
281    { "glCopyTexImage1D", 11, -1 },
282    { "glCopyTexImage2D", 11, -1 },
283    { "glCopyTexSubImage1D", 11, -1 },
284    { "glCopyTexSubImage2D", 11, -1 },
285    { "glTexSubImage1D", 11, -1 },
286    { "glTexSubImage2D", 11, -1 },
287    { "glBindTexture", 11, -1 },
288    { "glDeleteTextures", 11, -1 },
289    { "glGenTextures", 11, -1 },
290    { "glIsTexture", 11, -1 },
291 
292    /* GL 1.2 */
293    { "glBlendColor", 12, -1 },
294    { "glBlendEquation", 12, -1 },
295    { "glDrawRangeElements", 12, -1 },
296    { "glTexImage3D", 12, -1 },
297    { "glTexSubImage3D", 12, -1 },
298    { "glCopyTexSubImage3D", 12, -1 },
299 
300    /* GL 1.3 */
301    { "glActiveTexture", 13, -1 },
302    { "glSampleCoverage", 13, -1 },
303    { "glCompressedTexImage3D", 13, -1 },
304    { "glCompressedTexImage2D", 13, -1 },
305    { "glCompressedTexImage1D", 13, -1 },
306    { "glCompressedTexSubImage3D", 13, -1 },
307    { "glCompressedTexSubImage2D", 13, -1 },
308    { "glCompressedTexSubImage1D", 13, -1 },
309    { "glGetCompressedTexImage", 13, -1 },
310 
311    /* GL 1.4 */
312    { "glBlendFuncSeparate", 14, -1 },
313    { "glMultiDrawArrays", 14, -1 },
314    { "glMultiDrawElements", 14, -1 },
315    { "glPointParameterf", 14, -1 },
316    { "glPointParameterfv", 14, -1 },
317    { "glPointParameteri", 14, -1 },
318    { "glPointParameteriv", 14, -1 },
319 
320    /* GL 1.5 */
321    { "glGenQueries", 15, -1 },
322    { "glDeleteQueries", 15, -1 },
323    { "glIsQuery", 15, -1 },
324    { "glBeginQuery", 15, -1 },
325    { "glEndQuery", 15, -1 },
326    { "glGetQueryiv", 15, -1 },
327    { "glGetQueryObjectiv", 15, -1 },
328    { "glGetQueryObjectuiv", 15, -1 },
329    { "glBindBuffer", 15, -1 },
330    { "glDeleteBuffers", 15, -1 },
331    { "glGenBuffers", 15, -1 },
332    { "glIsBuffer", 15, -1 },
333    { "glBufferData", 15, -1 },
334    { "glBufferSubData", 15, -1 },
335    { "glGetBufferSubData", 15, -1 },
336    { "glMapBuffer", 15, -1 },
337    { "glUnmapBuffer", 15, -1 },
338    { "glGetBufferParameteriv", 15, -1 },
339    { "glGetBufferPointerv", 15, -1 },
340 
341    /* GL 2.0 */
342    { "glBlendEquationSeparate", 20, -1 },
343    { "glDrawBuffers", 20, -1 },
344    { "glStencilOpSeparate", 20, -1 },
345    { "glStencilFuncSeparate", 20, -1 },
346    { "glStencilMaskSeparate", 20, -1 },
347    { "glAttachShader", 20, -1 },
348    { "glBindAttribLocation", 20, -1 },
349    { "glCompileShader", 20, -1 },
350    { "glCreateProgram", 20, -1 },
351    { "glCreateShader", 20, -1 },
352    { "glDeleteProgram", 20, -1 },
353    { "glDeleteShader", 20, -1 },
354    { "glDetachShader", 20, -1 },
355    { "glDisableVertexAttribArray", 20, -1 },
356    { "glEnableVertexAttribArray", 20, -1 },
357    { "glGetActiveAttrib", 20, -1 },
358    { "glGetActiveUniform", 20, -1 },
359    { "glGetAttachedShaders", 20, -1 },
360    { "glGetAttribLocation", 20, -1 },
361    { "glGetProgramiv", 20, -1 },
362    { "glGetProgramInfoLog", 20, -1 },
363    { "glGetShaderiv", 20, -1 },
364    { "glGetShaderInfoLog", 20, -1 },
365    { "glGetShaderSource", 20, -1 },
366    { "glGetUniformLocation", 20, -1 },
367    { "glGetUniformfv", 20, -1 },
368    { "glGetUniformiv", 20, -1 },
369    { "glGetVertexAttribdv", 20, -1 },
370    { "glGetVertexAttribfv", 20, -1 },
371    { "glGetVertexAttribiv", 20, -1 },
372    { "glGetVertexAttribPointerv", 20, -1 },
373    { "glIsProgram", 20, -1 },
374    { "glIsShader", 20, -1 },
375    { "glLinkProgram", 20, -1 },
376    { "glShaderSource", 20, -1 },
377    { "glUseProgram", 20, -1 },
378    { "glUniform1f", 20, -1 },
379    { "glUniform2f", 20, -1 },
380    { "glUniform3f", 20, -1 },
381    { "glUniform4f", 20, -1 },
382    { "glUniform1i", 20, -1 },
383    { "glUniform2i", 20, -1 },
384    { "glUniform3i", 20, -1 },
385    { "glUniform4i", 20, -1 },
386    { "glUniform1fv", 20, -1 },
387    { "glUniform2fv", 20, -1 },
388    { "glUniform3fv", 20, -1 },
389    { "glUniform4fv", 20, -1 },
390    { "glUniform1iv", 20, -1 },
391    { "glUniform2iv", 20, -1 },
392    { "glUniform3iv", 20, -1 },
393    { "glUniform4iv", 20, -1 },
394    { "glUniformMatrix2fv", 20, -1 },
395    { "glUniformMatrix3fv", 20, -1 },
396    { "glUniformMatrix4fv", 20, -1 },
397    { "glValidateProgram", 20, -1 },
398    { "glVertexAttrib1d", 20, -1 },
399    { "glVertexAttrib1dv", 20, -1 },
400    { "glVertexAttrib1f", 20, -1 },
401    { "glVertexAttrib1fv", 20, -1 },
402    { "glVertexAttrib1s", 20, -1 },
403    { "glVertexAttrib1sv", 20, -1 },
404    { "glVertexAttrib2d", 20, -1 },
405    { "glVertexAttrib2dv", 20, -1 },
406    { "glVertexAttrib2f", 20, -1 },
407    { "glVertexAttrib2fv", 20, -1 },
408    { "glVertexAttrib2s", 20, -1 },
409    { "glVertexAttrib2sv", 20, -1 },
410    { "glVertexAttrib3d", 20, -1 },
411    { "glVertexAttrib3dv", 20, -1 },
412    { "glVertexAttrib3f", 20, -1 },
413    { "glVertexAttrib3fv", 20, -1 },
414    { "glVertexAttrib3s", 20, -1 },
415    { "glVertexAttrib3sv", 20, -1 },
416    { "glVertexAttrib4Nbv", 20, -1 },
417    { "glVertexAttrib4Niv", 20, -1 },
418    { "glVertexAttrib4Nsv", 20, -1 },
419    { "glVertexAttrib4Nub", 20, -1 },
420    { "glVertexAttrib4Nubv", 20, -1 },
421    { "glVertexAttrib4Nuiv", 20, -1 },
422    { "glVertexAttrib4Nusv", 20, -1 },
423    { "glVertexAttrib4bv", 20, -1 },
424    { "glVertexAttrib4d", 20, -1 },
425    { "glVertexAttrib4dv", 20, -1 },
426    { "glVertexAttrib4f", 20, -1 },
427    { "glVertexAttrib4fv", 20, -1 },
428    { "glVertexAttrib4iv", 20, -1 },
429    { "glVertexAttrib4s", 20, -1 },
430    { "glVertexAttrib4sv", 20, -1 },
431    { "glVertexAttrib4ubv", 20, -1 },
432    { "glVertexAttrib4uiv", 20, -1 },
433    { "glVertexAttrib4usv", 20, -1 },
434    { "glVertexAttribPointer", 20, -1 },
435 
436    /* GL 2.1 */
437    { "glUniformMatrix2x3fv", 21, -1 },
438    { "glUniformMatrix3x2fv", 21, -1 },
439    { "glUniformMatrix2x4fv", 21, -1 },
440    { "glUniformMatrix4x2fv", 21, -1 },
441    { "glUniformMatrix3x4fv", 21, -1 },
442    { "glUniformMatrix4x3fv", 21, -1 },
443 
444    /* GL 3.0 */
445    { "glColorMaski", 30, -1 },
446    { "glGetBooleani_v", 30, -1 },
447    { "glGetIntegeri_v", 30, -1 },
448    { "glEnablei", 30, -1 },
449    { "glDisablei", 30, -1 },
450    { "glIsEnabledi", 30, -1 },
451    { "glBeginTransformFeedback", 30, -1 },
452    { "glEndTransformFeedback", 30, -1 },
453    { "glBindBufferRange", 30, -1 },
454    { "glBindBufferBase", 30, -1 },
455    { "glTransformFeedbackVaryings", 30, -1 },
456    { "glGetTransformFeedbackVarying", 30, -1 },
457    { "glClampColor", 30, -1 },
458    { "glBeginConditionalRender", 30, -1 },
459    { "glEndConditionalRender", 30, -1 },
460    { "glVertexAttribIPointer", 30, -1 },
461    { "glGetVertexAttribIiv", 30, -1 },
462    { "glGetVertexAttribIuiv", 30, -1 },
463    { "glVertexAttribI1i", 30, -1 },
464    { "glVertexAttribI2i", 30, -1 },
465    { "glVertexAttribI3i", 30, -1 },
466    { "glVertexAttribI4i", 30, -1 },
467    { "glVertexAttribI1ui", 30, -1 },
468    { "glVertexAttribI2ui", 30, -1 },
469    { "glVertexAttribI3ui", 30, -1 },
470    { "glVertexAttribI4ui", 30, -1 },
471    { "glVertexAttribI1iv", 30, -1 },
472    { "glVertexAttribI2iv", 30, -1 },
473    { "glVertexAttribI3iv", 30, -1 },
474    { "glVertexAttribI4iv", 30, -1 },
475    { "glVertexAttribI1uiv", 30, -1 },
476    { "glVertexAttribI2uiv", 30, -1 },
477    { "glVertexAttribI3uiv", 30, -1 },
478    { "glVertexAttribI4uiv", 30, -1 },
479    { "glVertexAttribI4bv", 30, -1 },
480    { "glVertexAttribI4sv", 30, -1 },
481    { "glVertexAttribI4ubv", 30, -1 },
482    { "glVertexAttribI4usv", 30, -1 },
483    { "glGetUniformuiv", 30, -1 },
484    { "glBindFragDataLocation", 30, -1 },
485    { "glGetFragDataLocation", 30, -1 },
486    { "glUniform1ui", 30, -1 },
487    { "glUniform2ui", 30, -1 },
488    { "glUniform3ui", 30, -1 },
489    { "glUniform4ui", 30, -1 },
490    { "glUniform1uiv", 30, -1 },
491    { "glUniform2uiv", 30, -1 },
492    { "glUniform3uiv", 30, -1 },
493    { "glUniform4uiv", 30, -1 },
494    { "glTexParameterIiv", 30, -1 },
495    { "glTexParameterIuiv", 30, -1 },
496    { "glGetTexParameterIiv", 30, -1 },
497    { "glGetTexParameterIuiv", 30, -1 },
498    { "glClearBufferiv", 30, -1 },
499    { "glClearBufferuiv", 30, -1 },
500    { "glClearBufferfv", 30, -1 },
501    { "glClearBufferfi", 30, -1 },
502    { "glGetStringi", 30, -1 },
503 
504    /* GL 3.1 */
505    { "glDrawArraysInstanced", 31, -1 },
506    { "glDrawElementsInstanced", 31, -1 },
507    { "glPrimitiveRestartIndex", 31, -1 },
508    { "glTexBuffer", 31, -1 },
509 
510    /* GL_ARB_texture_buffer_range */
511    { "glTexBufferRange", 43, -1 },
512 
513    /* GL_ARB_shader_objects */
514    { "glDeleteObjectARB", 31, -1 },
515    { "glGetHandleARB", 31, -1 },
516    { "glDetachObjectARB", 31, -1 },
517    { "glCreateShaderObjectARB", 31, -1 },
518    { "glCreateProgramObjectARB", 31, -1 },
519    { "glAttachObjectARB", 31, -1 },
520    { "glGetObjectParameterfvARB", 31, -1 },
521    { "glGetObjectParameterivARB", 31, -1 },
522    { "glGetInfoLogARB", 31, -1 },
523    { "glGetAttachedObjectsARB", 31, -1 },
524 
525    /* GL_ARB_get_program_binary */
526    { "glGetProgramBinary", 30, -1 },
527    { "glProgramBinary", 30, -1 },
528    { "glProgramParameteri", 30, -1 },
529 
530    /* GL_EXT_transform_feedback */
531    { "glBindBufferOffsetEXT", 31, -1 },
532 
533    /* GL_IBM_multimode_draw_arrays */
534    { "glMultiModeDrawArraysIBM", 31, -1 },
535    { "glMultiModeDrawElementsIBM", 31, -1 },
536 
537    /* GL_EXT_depth_bounds_test */
538    { "glDepthBoundsEXT", 31, -1 },
539 
540    /* GL_apple_object_purgeable */
541    { "glObjectPurgeableAPPLE", 31, -1 },
542    { "glObjectUnpurgeableAPPLE", 31, -1 },
543    { "glGetObjectParameterivAPPLE", 31, -1 },
544 
545    /* GL_ARB_instanced_arrays */
546    { "glVertexAttribDivisorARB", 31, -1 },
547 
548    /* GL_NV_texture_barrier */
549    { "glTextureBarrierNV", 31, -1 },
550 
551    /* GL_EXT_texture_integer */
552    { "glClearColorIiEXT", 31, -1 },
553    { "glClearColorIuiEXT", 31, -1 },
554 
555    /* GL_OES_EGL_image */
556    { "glEGLImageTargetRenderbufferStorageOES", 31, -1 },
557    { "glEGLImageTargetTexture2DOES", 31, -1 },
558 
559    /* GL 3.2 */
560    { "glGetInteger64i_v", 32, -1 },
561    { "glGetBufferParameteri64v", 32, -1 },
562    { "glFramebufferTexture", 32, -1 },
563    { "glProgramParameteri", 32, -1 },
564    { "glFramebufferTextureLayer", 32, -1 },
565 
566    /* GL 3.3 */
567    { "glVertexAttribDivisor", 33, -1 },
568 
569    /* GL 4.0 */
570    { "glMinSampleShading", 40, -1 },
571    { "glPatchParameteri", 40, -1 },
572    { "glPatchParameterfv", 40, -1 },
573    { "glBlendEquationi", 40, -1 },
574    { "glBlendEquationSeparatei", 40, -1 },
575    { "glBlendFunci", 40, -1 },
576    { "glBlendFuncSeparatei", 40, -1 },
577 
578    /* GL 4.3 */
579    { "glIsRenderbuffer", 43, -1 },
580    { "glBindRenderbuffer", 43, -1 },
581    { "glDeleteRenderbuffers", 43, -1 },
582    { "glGenRenderbuffers", 43, -1 },
583    { "glRenderbufferStorage", 43, -1 },
584    { "glGetRenderbufferParameteriv", 43, -1 },
585    { "glIsFramebuffer", 43, -1 },
586    { "glBindFramebuffer", 43, -1 },
587    { "glDeleteFramebuffers", 43, -1 },
588    { "glGenFramebuffers", 43, -1 },
589    { "glCheckFramebufferStatus", 43, -1 },
590    { "glFramebufferTexture1D", 43, -1 },
591    { "glFramebufferTexture2D", 43, -1 },
592    { "glFramebufferTexture3D", 43, -1 },
593    { "glFramebufferRenderbuffer", 43, -1 },
594    { "glGetFramebufferAttachmentParameteriv", 43, -1 },
595    { "glGenerateMipmap", 43, -1 },
596    { "glBlitFramebuffer", 43, -1 },
597    { "glRenderbufferStorageMultisample", 43, -1 },
598    { "glFramebufferTextureLayer", 43, -1 },
599    { "glMapBufferRange", 43, -1 },
600    { "glFlushMappedBufferRange", 43, -1 },
601    { "glBindVertexArray", 43, -1 },
602    { "glDeleteVertexArrays", 43, -1 },
603    { "glGenVertexArrays", 43, -1 },
604    { "glIsVertexArray", 43, -1 },
605    { "glGetUniformIndices", 43, -1 },
606    { "glGetActiveUniformsiv", 43, -1 },
607    { "glGetActiveUniformName", 43, -1 },
608    { "glGetUniformBlockIndex", 43, -1 },
609    { "glGetActiveUniformBlockiv", 43, -1 },
610    { "glGetActiveUniformBlockName", 43, -1 },
611    { "glUniformBlockBinding", 43, -1 },
612    { "glCopyBufferSubData", 43, -1 },
613    { "glDrawElementsBaseVertex", 43, -1 },
614    { "glDrawRangeElementsBaseVertex", 43, -1 },
615    { "glDrawElementsInstancedBaseVertex", 43, -1 },
616    { "glMultiDrawElementsBaseVertex", 43, -1 },
617    { "glProvokingVertex", 43, -1 },
618    { "glFenceSync", 43, -1 },
619    { "glIsSync", 43, -1 },
620    { "glDeleteSync", 43, -1 },
621    { "glClientWaitSync", 43, -1 },
622    { "glWaitSync", 43, -1 },
623    { "glGetInteger64v", 43, -1 },
624    { "glGetSynciv", 43, -1 },
625    { "glTexImage2DMultisample", 43, -1 },
626    { "glTexImage3DMultisample", 43, -1 },
627    { "glGetMultisamplefv", 43, -1 },
628    { "glSampleMaski", 43, -1 },
629    { "glBlendEquationiARB", 43, -1 },
630    { "glBlendEquationSeparateiARB", 43, -1 },
631    { "glBlendFunciARB", 43, -1 },
632    { "glBlendFuncSeparateiARB", 43, -1 },
633    { "glMinSampleShadingARB", 43, -1 },                 // XXX: Add to xml
634 // { "glNamedStringARB", 43, -1 },                      // XXX: Add to xml
635 // { "glDeleteNamedStringARB", 43, -1 },                // XXX: Add to xml
636 // { "glCompileShaderIncludeARB", 43, -1 },             // XXX: Add to xml
637 // { "glIsNamedStringARB", 43, -1 },                    // XXX: Add to xml
638 // { "glGetNamedStringARB", 43, -1 },                   // XXX: Add to xml
639 // { "glGetNamedStringivARB", 43, -1 },                 // XXX: Add to xml
640    { "glBindFragDataLocationIndexed", 43, -1 },
641    { "glGetFragDataIndex", 43, -1 },
642    { "glGenSamplers", 43, -1 },
643    { "glDeleteSamplers", 43, -1 },
644    { "glIsSampler", 43, -1 },
645    { "glBindSampler", 43, -1 },
646    { "glSamplerParameteri", 43, -1 },
647    { "glSamplerParameteriv", 43, -1 },
648    { "glSamplerParameterf", 43, -1 },
649    { "glSamplerParameterfv", 43, -1 },
650    { "glSamplerParameterIiv", 43, -1 },
651    { "glSamplerParameterIuiv", 43, -1 },
652    { "glGetSamplerParameteriv", 43, -1 },
653    { "glGetSamplerParameterIiv", 43, -1 },
654    { "glGetSamplerParameterfv", 43, -1 },
655    { "glGetSamplerParameterIuiv", 43, -1 },
656    { "glQueryCounter", 43, -1 },
657    { "glGetQueryObjecti64v", 43, -1 },
658    { "glGetQueryObjectui64v", 43, -1 },
659    { "glVertexP2ui", 43, -1 },
660    { "glVertexP2uiv", 43, -1 },
661    { "glVertexP3ui", 43, -1 },
662    { "glVertexP3uiv", 43, -1 },
663    { "glVertexP4ui", 43, -1 },
664    { "glVertexP4uiv", 43, -1 },
665    { "glTexCoordP1ui", 43, -1 },
666    { "glTexCoordP1uiv", 43, -1 },
667    { "glTexCoordP2ui", 43, -1 },
668    { "glTexCoordP2uiv", 43, -1 },
669    { "glTexCoordP3ui", 43, -1 },
670    { "glTexCoordP3uiv", 43, -1 },
671    { "glTexCoordP4ui", 43, -1 },
672    { "glTexCoordP4uiv", 43, -1 },
673    { "glMultiTexCoordP1ui", 43, -1 },
674    { "glMultiTexCoordP1uiv", 43, -1 },
675    { "glMultiTexCoordP2ui", 43, -1 },
676    { "glMultiTexCoordP2uiv", 43, -1 },
677    { "glMultiTexCoordP3ui", 43, -1 },
678    { "glMultiTexCoordP3uiv", 43, -1 },
679    { "glMultiTexCoordP4ui", 43, -1 },
680    { "glMultiTexCoordP4uiv", 43, -1 },
681    { "glNormalP3ui", 43, -1 },
682    { "glNormalP3uiv", 43, -1 },
683    { "glColorP3ui", 43, -1 },
684    { "glColorP3uiv", 43, -1 },
685    { "glColorP4ui", 43, -1 },
686    { "glColorP4uiv", 43, -1 },
687    { "glSecondaryColorP3ui", 43, -1 },
688    { "glSecondaryColorP3uiv", 43, -1 },
689    { "glVertexAttribP1ui", 43, -1 },
690    { "glVertexAttribP1uiv", 43, -1 },
691    { "glVertexAttribP2ui", 43, -1 },
692    { "glVertexAttribP2uiv", 43, -1 },
693    { "glVertexAttribP3ui", 43, -1 },
694    { "glVertexAttribP3uiv", 43, -1 },
695    { "glVertexAttribP4ui", 43, -1 },
696    { "glVertexAttribP4uiv", 43, -1 },
697    { "glDrawArraysIndirect", 43, -1 },
698    { "glDrawElementsIndirect", 43, -1 },
699    { "glBindTransformFeedback", 43, -1 },
700    { "glDeleteTransformFeedbacks", 43, -1 },
701    { "glGenTransformFeedbacks", 43, -1 },
702    { "glIsTransformFeedback", 43, -1 },
703    { "glPauseTransformFeedback", 43, -1 },
704    { "glResumeTransformFeedback", 43, -1 },
705    { "glDrawTransformFeedback", 43, -1 },
706    { "glDrawTransformFeedbackStream", 43, -1 },
707    { "glBeginQueryIndexed", 43, -1 },
708    { "glEndQueryIndexed", 43, -1 },
709    { "glGetQueryIndexediv", 43, -1 },
710    { "glReleaseShaderCompiler", 43, -1 },
711    { "glShaderBinary", 43, -1 },
712    { "glGetShaderPrecisionFormat", 43, -1 },
713    { "glDepthRangef", 43, -1 },
714    { "glClearDepthf", 43, -1 },
715    { "glGetProgramBinary", 43, -1 },
716    { "glProgramBinary", 43, -1 },
717    { "glProgramParameteri", 43, -1 },
718    { "glUseProgramStages", 43, -1 },
719    { "glActiveShaderProgram", 43, -1 },
720    { "glCreateShaderProgramv", 43, -1 },
721    { "glBindProgramPipeline", 43, -1 },
722    { "glDeleteProgramPipelines", 43, -1 },
723    { "glGenProgramPipelines", 43, -1 },
724    { "glIsProgramPipeline", 43, -1 },
725    { "glGetProgramPipelineiv", 43, -1 },
726    { "glProgramUniform1d", 43, -1 },
727    { "glProgramUniform1dv", 43, -1 },
728    { "glProgramUniform1i", 43, -1 },
729    { "glProgramUniform1iv", 43, -1 },
730    { "glProgramUniform1f", 43, -1 },
731    { "glProgramUniform1fv", 43, -1 },
732    { "glProgramUniform1ui", 43, -1 },
733    { "glProgramUniform1uiv", 43, -1 },
734    { "glProgramUniform2i", 43, -1 },
735    { "glProgramUniform2iv", 43, -1 },
736    { "glProgramUniform2f", 43, -1 },
737    { "glProgramUniform2fv", 43, -1 },
738    { "glProgramUniform2d", 40, -1 },
739    { "glProgramUniform2dv", 40, -1 },
740    { "glProgramUniform2ui", 43, -1 },
741    { "glProgramUniform2uiv", 43, -1 },
742    { "glProgramUniform3i", 43, -1 },
743    { "glProgramUniform3iv", 43, -1 },
744    { "glProgramUniform3f", 43, -1 },
745    { "glProgramUniform3fv", 43, -1 },
746    { "glProgramUniform3d", 40, -1 },
747    { "glProgramUniform3dv", 40, -1 },
748    { "glProgramUniform3ui", 43, -1 },
749    { "glProgramUniform3uiv", 43, -1 },
750    { "glProgramUniform4i", 43, -1 },
751    { "glProgramUniform4iv", 43, -1 },
752    { "glProgramUniform4d", 43, -1 },
753    { "glProgramUniform4dv", 43, -1 },
754    { "glProgramUniform4f", 43, -1 },
755    { "glProgramUniform4fv", 43, -1 },
756    { "glProgramUniform4ui", 43, -1 },
757    { "glProgramUniform4uiv", 43, -1 },
758    { "glProgramUniformMatrix2dv", 43, -1 },
759    { "glProgramUniformMatrix2fv", 43, -1 },
760    { "glProgramUniformMatrix3dv", 43, -1 },
761    { "glProgramUniformMatrix3fv", 43, -1 },
762    { "glProgramUniformMatrix4dv", 43, -1 },
763    { "glProgramUniformMatrix4fv", 43, -1 },
764    { "glProgramUniformMatrix2x3dv", 43, -1 },
765    { "glProgramUniformMatrix2x3fv", 43, -1 },
766    { "glProgramUniformMatrix3x2dv", 43, -1 },
767    { "glProgramUniformMatrix3x2fv", 43, -1 },
768    { "glProgramUniformMatrix2x4dv", 43, -1 },
769    { "glProgramUniformMatrix2x4fv", 43, -1 },
770    { "glProgramUniformMatrix4x2dv", 43, -1 },
771    { "glProgramUniformMatrix4x2fv", 43, -1 },
772    { "glProgramUniformMatrix3x4dv", 43, -1 },
773    { "glProgramUniformMatrix3x4fv", 43, -1 },
774    { "glProgramUniformMatrix4x3dv", 43, -1 },
775    { "glProgramUniformMatrix4x3fv", 43, -1 },
776    { "glValidateProgramPipeline", 43, -1 },
777    { "glGetProgramPipelineInfoLog", 43, -1 },
778    { "glGetFloati_v", 43, -1 },
779    { "glGetDoublei_v", 43, -1 },
780 // { "glCreateSyncFromCLeventARB", 43, -1 },            // XXX: Add to xml
781    { "glGetGraphicsResetStatusARB", 43, -1 },
782    { "glGetnMapdvARB", 43, -1 },
783    { "glGetnMapfvARB", 43, -1 },
784    { "glGetnMapivARB", 43, -1 },
785    { "glGetnPixelMapfvARB", 43, -1 },
786    { "glGetnPixelMapuivARB", 43, -1 },
787    { "glGetnPixelMapusvARB", 43, -1 },
788    { "glGetnPolygonStippleARB", 43, -1 },
789    { "glGetnColorTableARB", 43, -1 },
790    { "glGetnConvolutionFilterARB", 43, -1 },
791    { "glGetnSeparableFilterARB", 43, -1 },
792    { "glGetnHistogramARB", 43, -1 },
793    { "glGetnMinmaxARB", 43, -1 },
794    { "glGetnTexImageARB", 43, -1 },
795    { "glReadnPixelsARB", 43, -1 },
796    { "glGetnCompressedTexImageARB", 43, -1 },
797    { "glGetnUniformfvARB", 43, -1 },
798    { "glGetnUniformivARB", 43, -1 },
799    { "glGetnUniformuivARB", 43, -1 },
800    { "glGetnUniformdvARB", 43, -1 },
801    { "glDrawArraysInstancedBaseInstance", 43, -1 },
802    { "glDrawElementsInstancedBaseInstance", 43, -1 },
803    { "glDrawElementsInstancedBaseVertexBaseInstance", 43, -1 },
804    { "glDrawTransformFeedbackInstanced", 43, -1 },
805    { "glDrawTransformFeedbackStreamInstanced", 43, -1 },
806 // { "glGetInternalformativ", 43, -1 },                 // XXX: Add to xml
807    { "glGetActiveAtomicCounterBufferiv", 43, -1 },
808    { "glBindImageTexture", 43, -1 },
809    { "glMemoryBarrier", 43, -1 },
810    { "glTexStorage1D", 43, -1 },
811    { "glTexStorage2D", 43, -1 },
812    { "glTexStorage3D", 43, -1 },
813    { "glTextureStorage1DEXT", 43, -1 },
814    { "glTextureStorage2DEXT", 43, -1 },
815    { "glTextureStorage3DEXT", 43, -1 },
816    { "glClearBufferData", 43, -1 },
817    { "glClearBufferSubData", 43, -1 },
818 // { "glClearNamedBufferDataEXT", 43, -1 },             // XXX: Add to xml
819 // { "glClearNamedBufferSubDataEXT", 43, -1 },          // XXX: Add to xml
820    { "glCopyImageSubData", 43, -1 },
821    { "glTextureView", 43, -1 },
822    { "glBindVertexBuffer", 43, -1 },
823    { "glVertexAttribFormat", 43, -1 },
824    { "glVertexAttribIFormat", 43, -1 },
825    { "glVertexAttribLFormat", 43, -1 },
826    { "glVertexAttribBinding", 43, -1 },
827    { "glVertexBindingDivisor", 43, -1 },
828 // { "glVertexArrayBindVertexBufferEXT", 43, -1 },      // XXX: Add to xml
829 // { "glVertexArrayVertexAttribFormatEXT", 43, -1 },    // XXX: Add to xml
830 // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 },   // XXX: Add to xml
831 // { "glVertexArrayVertexAttribBindingEXT", 43, -1 },   // XXX: Add to xml
832 // { "glVertexArrayVertexBindingDivisorEXT", 43, -1 },  // XXX: Add to xml
833    { "glFramebufferParameteri", 43, -1 },
834    { "glGetFramebufferParameteriv", 43, -1 },
835 // { "glNamedFramebufferParameteriEXT", 43, -1 },       // XXX: Add to xml
836 // { "glGetNamedFramebufferParameterivEXT", 43, -1 },   // XXX: Add to xml
837 // { "glGetInternalformati64v", 43, -1 },               // XXX: Add to xml
838    { "glInvalidateTexSubImage", 43, -1 },
839    { "glInvalidateTexImage", 43, -1 },
840    { "glInvalidateBufferSubData", 43, -1 },
841    { "glInvalidateBufferData", 43, -1 },
842    { "glInvalidateFramebuffer", 43, -1 },
843    { "glInvalidateSubFramebuffer", 43, -1 },
844    { "glMultiDrawArraysIndirect", 43, -1 },
845    { "glMultiDrawElementsIndirect", 43, -1 },
846    { "glGetProgramInterfaceiv", 43, -1 },
847    { "glGetProgramResourceIndex", 43, -1 },
848    { "glGetProgramResourceName", 43, -1 },
849    { "glGetProgramResourceiv", 43, -1 },
850    { "glGetProgramResourceLocation", 43, -1 },
851    { "glGetProgramResourceLocationIndex", 43, -1 },
852    { "glShaderStorageBlockBinding", 43, -1 },
853 // { "glTextureBufferRangeEXT", 43, -1 },               // XXX: Add to xml
854    { "glTexStorage2DMultisample", 43, -1 },
855    { "glTexStorage3DMultisample", 43, -1 },
856 // { "glTextureStorage2DMultisampleEXT", 43, -1 },      // XXX: Add to xml
857 // { "glTextureStorage3DMultisampleEXT", 43, -1 },      // XXX: Add to xml
858 
859 /* GL 4.5 */
860    /* aliased versions checked above */
861    //{ "glGetGraphicsResetStatus", 45, -1 },
862    //{ "glReadnPixels", 45, -1 },
863    //{ "glGetnUniformfv", 45, -1 },
864    //{ "glGetnUniformiv", 45, -1 },
865    //{ "glGetnUniformuiv", 45, -1 },
866    { "glMemoryBarrierByRegion", 45, -1 },
867 
868    /* GL_ARB_internalformat_query */
869    { "glGetInternalformativ", 30, -1 },
870 
871    /* GL_ARB_internalformat_query */
872    { "glGetInternalformati64v", 30, -1 },
873 
874    /* GL_ARB_multi_bind */
875    { "glBindBuffersBase", 44, -1 },
876    { "glBindBuffersRange", 44, -1 },
877    { "glBindTextures", 44, -1 },
878    { "glBindSamplers", 44, -1 },
879    { "glBindImageTextures", 44, -1 },
880    { "glBindVertexBuffers", 44, -1 },
881 
882    /* GL_KHR_debug/GL_ARB_debug_output */
883    { "glPushDebugGroup", 11, -1 },
884    { "glPopDebugGroup", 11, -1 },
885    { "glDebugMessageCallback", 11, -1 },
886    { "glDebugMessageControl", 11, -1 },
887    { "glDebugMessageInsert", 11, -1 },
888    { "glGetDebugMessageLog", 11, -1 },
889    { "glGetObjectLabel", 11, -1 },
890    { "glGetObjectPtrLabel", 11, -1 },
891    { "glObjectLabel", 11, -1 },
892    { "glObjectPtrLabel", 11, -1 },
893    /* aliased versions checked above */
894    //{ "glDebugMessageControlARB", 11, -1 },
895    //{ "glDebugMessageInsertARB", 11, -1 },
896    //{ "glDebugMessageCallbackARB", 11, -1 },
897    //{ "glGetDebugMessageLogARB", 11, -1 },
898 
899    /* GL_AMD_performance_monitor */
900    { "glGetPerfMonitorGroupsAMD", 11, -1 },
901    { "glGetPerfMonitorCountersAMD", 11, -1 },
902    { "glGetPerfMonitorGroupStringAMD", 11, -1 },
903    { "glGetPerfMonitorCounterStringAMD", 11, -1 },
904    { "glGetPerfMonitorCounterInfoAMD", 11, -1 },
905    { "glGenPerfMonitorsAMD", 11, -1 },
906    { "glDeletePerfMonitorsAMD", 11, -1 },
907    { "glSelectPerfMonitorCountersAMD", 11, -1 },
908    { "glBeginPerfMonitorAMD", 11, -1 },
909    { "glEndPerfMonitorAMD", 11, -1 },
910    { "glGetPerfMonitorCounterDataAMD", 11, -1 },
911 
912    /* GL_INTEL_performance_query */
913    { "glGetFirstPerfQueryIdINTEL", 30, -1 },
914    { "glGetNextPerfQueryIdINTEL", 30, -1 },
915    { "glGetPerfQueryIdByNameINTEL", 30, -1 },
916    { "glGetPerfQueryInfoINTEL", 30, -1 },
917    { "glGetPerfCounterInfoINTEL", 30, -1 },
918    { "glCreatePerfQueryINTEL", 30, -1 },
919    { "glDeletePerfQueryINTEL", 30, -1 },
920    { "glBeginPerfQueryINTEL", 30, -1 },
921    { "glEndPerfQueryINTEL", 30, -1 },
922    { "glGetPerfQueryDataINTEL", 30, -1 },
923 
924    /* GL_NV_vdpau_interop */
925    { "glVDPAUInitNV", 11, -1 },
926    { "glVDPAUFiniNV", 11, -1 },
927    { "glVDPAURegisterVideoSurfaceNV", 11, -1 },
928    { "glVDPAURegisterOutputSurfaceNV", 11, -1 },
929    { "glVDPAUIsSurfaceNV", 11, -1 },
930    { "glVDPAUUnregisterSurfaceNV", 11, -1 },
931    { "glVDPAUGetSurfaceivNV", 11, -1 },
932    { "glVDPAUSurfaceAccessNV", 11, -1 },
933    { "glVDPAUMapSurfacesNV", 11, -1 },
934    { "glVDPAUUnmapSurfacesNV", 11, -1 },
935 
936    /* GL_ARB_buffer_storage */
937    { "glBufferStorage", 43, -1 },
938 
939    /* GL_ARB_clear_texture */
940    { "glClearTexImage", 13, -1 },
941    { "glClearTexSubImage", 13, -1 },
942 
943    /* GL_ARB_clip_control */
944    { "glClipControl", 45, -1 },
945 
946    /* GL_ARB_compute_shader */
947    { "glDispatchCompute", 43, -1 },
948    { "glDispatchComputeIndirect", 43, -1 },
949 
950    /* GL_ARB_compute_variable_group_size */
951    { "glDispatchComputeGroupSizeARB", 43, -1 },
952 
953    /* GL_EXT_polygon_offset_clamp */
954    { "glPolygonOffsetClampEXT", 11, -1 },
955 
956    /* GL_ARB_get_texture_sub_image */
957    { "glGetTextureSubImage", 20, -1 },
958    { "glGetCompressedTextureSubImage", 20, -1 },
959 
960    /* GL_GREMEDY_string_marker */
961    { "glStringMarkerGREMEDY", 15, -1 },
962 
963    /* GL_EXT_window_rectangles */
964    { "glWindowRectanglesEXT", 30, -1 },
965 
966    /* GL_KHR_blend_equation_advanced */
967    { "glBlendBarrierKHR", 20, -1 },
968 
969    /* GL_ARB_sparse_buffer */
970    { "glBufferPageCommitmentARB", 43, -1 },
971    { "glNamedBufferPageCommitmentARB", 43, -1 },
972 
973    /* GL_ARB_bindless_texture */
974    { "glGetTextureHandleARB", 40, -1 },
975    { "glGetTextureSamplerHandleARB", 40, -1 },
976    { "glMakeTextureHandleResidentARB", 40, -1 },
977    { "glMakeTextureHandleNonResidentARB", 40, -1 },
978    { "glIsTextureHandleResidentARB", 40, -1 },
979    { "glGetImageHandleARB", 40, -1 },
980    { "glMakeImageHandleResidentARB", 40, -1 },
981    { "glMakeImageHandleNonResidentARB", 40, -1 },
982    { "glIsImageHandleResidentARB", 40, -1 },
983    { "glUniformHandleui64ARB", 40, -1 },
984    { "glUniformHandleui64vARB", 40, -1 },
985    { "glProgramUniformHandleui64ARB", 40, -1 },
986    { "glProgramUniformHandleui64vARB", 40, -1 },
987    { "glVertexAttribL1ui64ARB", 40, -1 },
988    { "glVertexAttribL1ui64vARB", 40, -1 },
989    { "glGetVertexAttribLui64vARB", 40, -1 },
990 
991    /* GL_EXT_external_objects */
992    { "glGetUnsignedBytevEXT", 45, -1 },
993    { "glGetUnsignedBytei_vEXT", 45, -1 },
994    { "glDeleteMemoryObjectsEXT", 45, -1 },
995    { "glIsMemoryObjectEXT", 45, -1 },
996    { "glCreateMemoryObjectsEXT", 45, -1 },
997    { "glMemoryObjectParameterivEXT", 45, -1 },
998    { "glGetMemoryObjectParameterivEXT", 45, -1 },
999    { "glTexStorageMem2DEXT", 45, -1 },
1000    { "glTexStorageMem2DMultisampleEXT", 45, -1 },
1001    { "glTexStorageMem3DEXT", 45, -1 },
1002    { "glTexStorageMem3DMultisampleEXT", 45, -1 },
1003    { "glBufferStorageMemEXT", 45, -1 },
1004    { "glTextureStorageMem2DEXT", 45, -1 },
1005    { "glTextureStorageMem2DMultisampleEXT", 45, -1 },
1006    { "glTextureStorageMem3DEXT", 45, -1 },
1007    { "glTextureStorageMem3DMultisampleEXT", 45, -1 },
1008    { "glNamedBufferStorageMemEXT", 45, -1 },
1009    { "glTexStorageMem1DEXT", 45, -1 },
1010    { "glTextureStorageMem1DEXT", 45, -1 },
1011    { "glGenSemaphoresEXT", 45, -1 },
1012    { "glDeleteSemaphoresEXT", 45, -1 },
1013    { "glIsSemaphoreEXT", 45, -1 },
1014    { "glSemaphoreParameterui64vEXT", 45, -1 },
1015    { "glGetSemaphoreParameterui64vEXT", 45, -1 },
1016    { "glWaitSemaphoreEXT", 45, -1 },
1017    { "glSignalSemaphoreEXT", 45, -1 },
1018 
1019    /* GL_EXT_external_objects_fd */
1020    { "glImportMemoryFdEXT", 45, -1 },
1021    { "glImportSemaphoreFdEXT", 45, -1 },
1022 
1023    /* GL_ARB_gl_spirv */
1024    { "glSpecializeShaderARB", 45, -1 },
1025 
1026    { NULL, 0, -1 }
1027 };
1028 
1029 const struct function gl_compatibility_functions_possible[] = {
1030    { "glBindRenderbufferEXT", 10, -1 },
1031    { "glBindFramebufferEXT", 10, -1 },
1032    { "glNewList", 10, _gloffset_NewList },
1033    { "glEndList", 10, _gloffset_EndList },
1034    { "glCallList", 10, _gloffset_CallList },
1035    { "glCallLists", 10, _gloffset_CallLists },
1036    { "glDeleteLists", 10, _gloffset_DeleteLists },
1037    { "glGenLists", 10, _gloffset_GenLists },
1038    { "glListBase", 10, _gloffset_ListBase },
1039    { "glBegin", 10, _gloffset_Begin },
1040    { "glBitmap", 10, _gloffset_Bitmap },
1041    { "glColor3b", 10, _gloffset_Color3b },
1042    { "glColor3bv", 10, _gloffset_Color3bv },
1043    { "glColor3d", 10, _gloffset_Color3d },
1044    { "glColor3dv", 10, _gloffset_Color3dv },
1045    { "glColor3f", 10, _gloffset_Color3f },
1046    { "glColor3fv", 10, _gloffset_Color3fv },
1047    { "glColor3i", 10, _gloffset_Color3i },
1048    { "glColor3iv", 10, _gloffset_Color3iv },
1049    { "glColor3s", 10, _gloffset_Color3s },
1050    { "glColor3sv", 10, _gloffset_Color3sv },
1051    { "glColor3ub", 10, _gloffset_Color3ub },
1052    { "glColor3ubv", 10, _gloffset_Color3ubv },
1053    { "glColor3ui", 10, _gloffset_Color3ui },
1054    { "glColor3uiv", 10, _gloffset_Color3uiv },
1055    { "glColor3us", 10, _gloffset_Color3us },
1056    { "glColor3usv", 10, _gloffset_Color3usv },
1057    { "glColor4b", 10, _gloffset_Color4b },
1058    { "glColor4bv", 10, _gloffset_Color4bv },
1059    { "glColor4d", 10, _gloffset_Color4d },
1060    { "glColor4dv", 10, _gloffset_Color4dv },
1061    { "glColor4f", 10, _gloffset_Color4f },
1062    { "glColor4fv", 10, _gloffset_Color4fv },
1063    { "glColor4i", 10, _gloffset_Color4i },
1064    { "glColor4iv", 10, _gloffset_Color4iv },
1065    { "glColor4s", 10, _gloffset_Color4s },
1066    { "glColor4sv", 10, _gloffset_Color4sv },
1067    { "glColor4ub", 10, _gloffset_Color4ub },
1068    { "glColor4ubv", 10, _gloffset_Color4ubv },
1069    { "glColor4ui", 10, _gloffset_Color4ui },
1070    { "glColor4uiv", 10, _gloffset_Color4uiv },
1071    { "glColor4us", 10, _gloffset_Color4us },
1072    { "glColor4usv", 10, _gloffset_Color4usv },
1073    { "glEdgeFlag", 10, _gloffset_EdgeFlag },
1074    { "glEdgeFlagv", 10, _gloffset_EdgeFlagv },
1075    { "glEnd", 10, _gloffset_End },
1076    { "glIndexd", 10, _gloffset_Indexd },
1077    { "glIndexdv", 10, _gloffset_Indexdv },
1078    { "glIndexf", 10, _gloffset_Indexf },
1079    { "glIndexfv", 10, _gloffset_Indexfv },
1080    { "glIndexi", 10, _gloffset_Indexi },
1081    { "glIndexiv", 10, _gloffset_Indexiv },
1082    { "glIndexs", 10, _gloffset_Indexs },
1083    { "glIndexsv", 10, _gloffset_Indexsv },
1084    { "glNormal3b", 10, _gloffset_Normal3b },
1085    { "glNormal3bv", 10, _gloffset_Normal3bv },
1086    { "glNormal3d", 10, _gloffset_Normal3d },
1087    { "glNormal3dv", 10, _gloffset_Normal3dv },
1088    { "glNormal3f", 10, _gloffset_Normal3f },
1089    { "glNormal3fv", 10, _gloffset_Normal3fv },
1090    { "glNormal3i", 10, _gloffset_Normal3i },
1091    { "glNormal3iv", 10, _gloffset_Normal3iv },
1092    { "glNormal3s", 10, _gloffset_Normal3s },
1093    { "glNormal3sv", 10, _gloffset_Normal3sv },
1094    { "glRasterPos2d", 10, _gloffset_RasterPos2d },
1095    { "glRasterPos2dv", 10, _gloffset_RasterPos2dv },
1096    { "glRasterPos2f", 10, _gloffset_RasterPos2f },
1097    { "glRasterPos2fv", 10, _gloffset_RasterPos2fv },
1098    { "glRasterPos2i", 10, _gloffset_RasterPos2i },
1099    { "glRasterPos2iv", 10, _gloffset_RasterPos2iv },
1100    { "glRasterPos2s", 10, _gloffset_RasterPos2s },
1101    { "glRasterPos2sv", 10, _gloffset_RasterPos2sv },
1102    { "glRasterPos3d", 10, _gloffset_RasterPos3d },
1103    { "glRasterPos3dv", 10, _gloffset_RasterPos3dv },
1104    { "glRasterPos3f", 10, _gloffset_RasterPos3f },
1105    { "glRasterPos3fv", 10, _gloffset_RasterPos3fv },
1106    { "glRasterPos3i", 10, _gloffset_RasterPos3i },
1107    { "glRasterPos3iv", 10, _gloffset_RasterPos3iv },
1108    { "glRasterPos3s", 10, _gloffset_RasterPos3s },
1109    { "glRasterPos3sv", 10, _gloffset_RasterPos3sv },
1110    { "glRasterPos4d", 10, _gloffset_RasterPos4d },
1111    { "glRasterPos4dv", 10, _gloffset_RasterPos4dv },
1112    { "glRasterPos4f", 10, _gloffset_RasterPos4f },
1113    { "glRasterPos4fv", 10, _gloffset_RasterPos4fv },
1114    { "glRasterPos4i", 10, _gloffset_RasterPos4i },
1115    { "glRasterPos4iv", 10, _gloffset_RasterPos4iv },
1116    { "glRasterPos4s", 10, _gloffset_RasterPos4s },
1117    { "glRasterPos4sv", 10, _gloffset_RasterPos4sv },
1118    { "glRectd", 10, _gloffset_Rectd },
1119    { "glRectdv", 10, _gloffset_Rectdv },
1120    { "glRectf", 10, _gloffset_Rectf },
1121    { "glRectfv", 10, _gloffset_Rectfv },
1122    { "glRecti", 10, _gloffset_Recti },
1123    { "glRectiv", 10, _gloffset_Rectiv },
1124    { "glRects", 10, _gloffset_Rects },
1125    { "glRectsv", 10, _gloffset_Rectsv },
1126    { "glTexCoord1d", 10, _gloffset_TexCoord1d },
1127    { "glTexCoord1dv", 10, _gloffset_TexCoord1dv },
1128    { "glTexCoord1f", 10, _gloffset_TexCoord1f },
1129    { "glTexCoord1fv", 10, _gloffset_TexCoord1fv },
1130    { "glTexCoord1i", 10, _gloffset_TexCoord1i },
1131    { "glTexCoord1iv", 10, _gloffset_TexCoord1iv },
1132    { "glTexCoord1s", 10, _gloffset_TexCoord1s },
1133    { "glTexCoord1sv", 10, _gloffset_TexCoord1sv },
1134    { "glTexCoord2d", 10, _gloffset_TexCoord2d },
1135    { "glTexCoord2dv", 10, _gloffset_TexCoord2dv },
1136    { "glTexCoord2f", 10, _gloffset_TexCoord2f },
1137    { "glTexCoord2fv", 10, _gloffset_TexCoord2fv },
1138    { "glTexCoord2i", 10, _gloffset_TexCoord2i },
1139    { "glTexCoord2iv", 10, _gloffset_TexCoord2iv },
1140    { "glTexCoord2s", 10, _gloffset_TexCoord2s },
1141    { "glTexCoord2sv", 10, _gloffset_TexCoord2sv },
1142    { "glTexCoord3d", 10, _gloffset_TexCoord3d },
1143    { "glTexCoord3dv", 10, _gloffset_TexCoord3dv },
1144    { "glTexCoord3f", 10, _gloffset_TexCoord3f },
1145    { "glTexCoord3fv", 10, _gloffset_TexCoord3fv },
1146    { "glTexCoord3i", 10, _gloffset_TexCoord3i },
1147    { "glTexCoord3iv", 10, _gloffset_TexCoord3iv },
1148    { "glTexCoord3s", 10, _gloffset_TexCoord3s },
1149    { "glTexCoord3sv", 10, _gloffset_TexCoord3sv },
1150    { "glTexCoord4d", 10, _gloffset_TexCoord4d },
1151    { "glTexCoord4dv", 10, _gloffset_TexCoord4dv },
1152    { "glTexCoord4f", 10, _gloffset_TexCoord4f },
1153    { "glTexCoord4fv", 10, _gloffset_TexCoord4fv },
1154    { "glTexCoord4i", 10, _gloffset_TexCoord4i },
1155    { "glTexCoord4iv", 10, _gloffset_TexCoord4iv },
1156    { "glTexCoord4s", 10, _gloffset_TexCoord4s },
1157    { "glTexCoord4sv", 10, _gloffset_TexCoord4sv },
1158    { "glVertex2d", 10, _gloffset_Vertex2d },
1159    { "glVertex2dv", 10, _gloffset_Vertex2dv },
1160    { "glVertex2f", 10, _gloffset_Vertex2f },
1161    { "glVertex2fv", 10, _gloffset_Vertex2fv },
1162    { "glVertex2i", 10, _gloffset_Vertex2i },
1163    { "glVertex2iv", 10, _gloffset_Vertex2iv },
1164    { "glVertex2s", 10, _gloffset_Vertex2s },
1165    { "glVertex2sv", 10, _gloffset_Vertex2sv },
1166    { "glVertex3d", 10, _gloffset_Vertex3d },
1167    { "glVertex3dv", 10, _gloffset_Vertex3dv },
1168    { "glVertex3f", 10, _gloffset_Vertex3f },
1169    { "glVertex3fv", 10, _gloffset_Vertex3fv },
1170    { "glVertex3i", 10, _gloffset_Vertex3i },
1171    { "glVertex3iv", 10, _gloffset_Vertex3iv },
1172    { "glVertex3s", 10, _gloffset_Vertex3s },
1173    { "glVertex3sv", 10, _gloffset_Vertex3sv },
1174    { "glVertex4d", 10, _gloffset_Vertex4d },
1175    { "glVertex4dv", 10, _gloffset_Vertex4dv },
1176    { "glVertex4f", 10, _gloffset_Vertex4f },
1177    { "glVertex4fv", 10, _gloffset_Vertex4fv },
1178    { "glVertex4i", 10, _gloffset_Vertex4i },
1179    { "glVertex4iv", 10, _gloffset_Vertex4iv },
1180    { "glVertex4s", 10, _gloffset_Vertex4s },
1181    { "glVertex4sv", 10, _gloffset_Vertex4sv },
1182    { "glClipPlane", 10, _gloffset_ClipPlane },
1183    { "glColorMaterial", 10, _gloffset_ColorMaterial },
1184    { "glFogf", 10, _gloffset_Fogf },
1185    { "glFogfv", 10, _gloffset_Fogfv },
1186    { "glFogi", 10, _gloffset_Fogi },
1187    { "glFogiv", 10, _gloffset_Fogiv },
1188    { "glLightf", 10, _gloffset_Lightf },
1189    { "glLightfv", 10, _gloffset_Lightfv },
1190    { "glLighti", 10, _gloffset_Lighti },
1191    { "glLightiv", 10, _gloffset_Lightiv },
1192    { "glLightModelf", 10, _gloffset_LightModelf },
1193    { "glLightModelfv", 10, _gloffset_LightModelfv },
1194    { "glLightModeli", 10, _gloffset_LightModeli },
1195    { "glLightModeliv", 10, _gloffset_LightModeliv },
1196    { "glLineStipple", 10, _gloffset_LineStipple },
1197    { "glMaterialf", 10, _gloffset_Materialf },
1198    { "glMaterialfv", 10, _gloffset_Materialfv },
1199    { "glMateriali", 10, _gloffset_Materiali },
1200    { "glMaterialiv", 10, _gloffset_Materialiv },
1201    { "glPolygonStipple", 10, _gloffset_PolygonStipple },
1202    { "glShadeModel", 10, _gloffset_ShadeModel },
1203    { "glTexEnvf", 10, _gloffset_TexEnvf },
1204    { "glTexEnvfv", 10, _gloffset_TexEnvfv },
1205    { "glTexEnvi", 10, _gloffset_TexEnvi },
1206    { "glTexEnviv", 10, _gloffset_TexEnviv },
1207    { "glTexGend", 10, _gloffset_TexGend },
1208    { "glTexGendv", 10, _gloffset_TexGendv },
1209    { "glTexGenf", 10, _gloffset_TexGenf },
1210    { "glTexGenfv", 10, _gloffset_TexGenfv },
1211    { "glTexGeni", 10, _gloffset_TexGeni },
1212    { "glTexGeniv", 10, _gloffset_TexGeniv },
1213    { "glFeedbackBuffer", 10, _gloffset_FeedbackBuffer },
1214    { "glSelectBuffer", 10, _gloffset_SelectBuffer },
1215    { "glRenderMode", 10, _gloffset_RenderMode },
1216    { "glInitNames", 10, _gloffset_InitNames },
1217    { "glLoadName", 10, _gloffset_LoadName },
1218    { "glPassThrough", 10, _gloffset_PassThrough },
1219    { "glPopName", 10, _gloffset_PopName },
1220    { "glPushName", 10, _gloffset_PushName },
1221    { "glClearAccum", 10, _gloffset_ClearAccum },
1222    { "glClearIndex", 10, _gloffset_ClearIndex },
1223    { "glIndexMask", 10, _gloffset_IndexMask },
1224    { "glAccum", 10, _gloffset_Accum },
1225    { "glPopAttrib", 10, _gloffset_PopAttrib },
1226    { "glPushAttrib", 10, _gloffset_PushAttrib },
1227    { "glMap1d", 10, _gloffset_Map1d },
1228    { "glMap1f", 10, _gloffset_Map1f },
1229    { "glMap2d", 10, _gloffset_Map2d },
1230    { "glMap2f", 10, _gloffset_Map2f },
1231    { "glMapGrid1d", 10, _gloffset_MapGrid1d },
1232    { "glMapGrid1f", 10, _gloffset_MapGrid1f },
1233    { "glMapGrid2d", 10, _gloffset_MapGrid2d },
1234    { "glMapGrid2f", 10, _gloffset_MapGrid2f },
1235    { "glEvalCoord1d", 10, _gloffset_EvalCoord1d },
1236    { "glEvalCoord1dv", 10, _gloffset_EvalCoord1dv },
1237    { "glEvalCoord1f", 10, _gloffset_EvalCoord1f },
1238    { "glEvalCoord1fv", 10, _gloffset_EvalCoord1fv },
1239    { "glEvalCoord2d", 10, _gloffset_EvalCoord2d },
1240    { "glEvalCoord2dv", 10, _gloffset_EvalCoord2dv },
1241    { "glEvalCoord2f", 10, _gloffset_EvalCoord2f },
1242    { "glEvalCoord2fv", 10, _gloffset_EvalCoord2fv },
1243    { "glEvalMesh1", 10, _gloffset_EvalMesh1 },
1244    { "glEvalPoint1", 10, _gloffset_EvalPoint1 },
1245    { "glEvalMesh2", 10, _gloffset_EvalMesh2 },
1246    { "glEvalPoint2", 10, _gloffset_EvalPoint2 },
1247    { "glAlphaFunc", 10, _gloffset_AlphaFunc },
1248    { "glPixelZoom", 10, _gloffset_PixelZoom },
1249    { "glPixelTransferf", 10, _gloffset_PixelTransferf },
1250    { "glPixelTransferi", 10, _gloffset_PixelTransferi },
1251    { "glPixelMapfv", 10, _gloffset_PixelMapfv },
1252    { "glPixelMapuiv", 10, _gloffset_PixelMapuiv },
1253    { "glPixelMapusv", 10, _gloffset_PixelMapusv },
1254    { "glCopyPixels", 10, _gloffset_CopyPixels },
1255    { "glDrawPixels", 10, _gloffset_DrawPixels },
1256    { "glGetClipPlane", 10, _gloffset_GetClipPlane },
1257    { "glGetLightfv", 10, _gloffset_GetLightfv },
1258    { "glGetLightiv", 10, _gloffset_GetLightiv },
1259    { "glGetMapdv", 10, _gloffset_GetMapdv },
1260    { "glGetMapfv", 10, _gloffset_GetMapfv },
1261    { "glGetMapiv", 10, _gloffset_GetMapiv },
1262    { "glGetMaterialfv", 10, _gloffset_GetMaterialfv },
1263    { "glGetMaterialiv", 10, _gloffset_GetMaterialiv },
1264    { "glGetPixelMapfv", 10, _gloffset_GetPixelMapfv },
1265    { "glGetPixelMapuiv", 10, _gloffset_GetPixelMapuiv },
1266    { "glGetPixelMapusv", 10, _gloffset_GetPixelMapusv },
1267    { "glGetPolygonStipple", 10, _gloffset_GetPolygonStipple },
1268    { "glGetTexEnvfv", 10, _gloffset_GetTexEnvfv },
1269    { "glGetTexEnviv", 10, _gloffset_GetTexEnviv },
1270    { "glGetTexGendv", 10, _gloffset_GetTexGendv },
1271    { "glGetTexGenfv", 10, _gloffset_GetTexGenfv },
1272    { "glGetTexGeniv", 10, _gloffset_GetTexGeniv },
1273    { "glIsList", 10, _gloffset_IsList },
1274    { "glFrustum", 10, _gloffset_Frustum },
1275    { "glLoadIdentity", 10, _gloffset_LoadIdentity },
1276    { "glLoadMatrixf", 10, _gloffset_LoadMatrixf },
1277    { "glLoadMatrixd", 10, _gloffset_LoadMatrixd },
1278    { "glMatrixMode", 10, _gloffset_MatrixMode },
1279    { "glMultMatrixf", 10, _gloffset_MultMatrixf },
1280    { "glMultMatrixd", 10, _gloffset_MultMatrixd },
1281    { "glOrtho", 10, _gloffset_Ortho },
1282    { "glPopMatrix", 10, _gloffset_PopMatrix },
1283    { "glPushMatrix", 10, _gloffset_PushMatrix },
1284    { "glRotated", 10, _gloffset_Rotated },
1285    { "glRotatef", 10, _gloffset_Rotatef },
1286    { "glScaled", 10, _gloffset_Scaled },
1287    { "glScalef", 10, _gloffset_Scalef },
1288    { "glTranslated", 10, _gloffset_Translated },
1289    { "glTranslatef", 10, _gloffset_Translatef },
1290    { "glArrayElement", 10, _gloffset_ArrayElement },
1291    { "glColorPointer", 10, _gloffset_ColorPointer },
1292    { "glDisableClientState", 10, _gloffset_DisableClientState },
1293    { "glEdgeFlagPointer", 10, _gloffset_EdgeFlagPointer },
1294    { "glEnableClientState", 10, _gloffset_EnableClientState },
1295    { "glIndexPointer", 10, _gloffset_IndexPointer },
1296    { "glInterleavedArrays", 10, _gloffset_InterleavedArrays },
1297    { "glNormalPointer", 10, _gloffset_NormalPointer },
1298    { "glTexCoordPointer", 10, _gloffset_TexCoordPointer },
1299    { "glVertexPointer", 10, _gloffset_VertexPointer },
1300    { "glAreTexturesResident", 10, _gloffset_AreTexturesResident },
1301    { "glPrioritizeTextures", 10, _gloffset_PrioritizeTextures },
1302    { "glIndexub", 10, _gloffset_Indexub },
1303    { "glIndexubv", 10, _gloffset_Indexubv },
1304    { "glPopClientAttrib", 10, _gloffset_PopClientAttrib },
1305    { "glPushClientAttrib", 10, _gloffset_PushClientAttrib },
1306    { "glColorTable", 10, _gloffset_ColorTable },
1307    { "glColorTableParameterfv", 10, _gloffset_ColorTableParameterfv },
1308    { "glColorTableParameteriv", 10, _gloffset_ColorTableParameteriv },
1309    { "glCopyColorTable", 10, _gloffset_CopyColorTable },
1310    { "glGetColorTable", 10, _gloffset_GetColorTable },
1311    { "glGetColorTableParameterfv", 10, _gloffset_GetColorTableParameterfv },
1312    { "glGetColorTableParameteriv", 10, _gloffset_GetColorTableParameteriv },
1313    { "glColorSubTable", 10, _gloffset_ColorSubTable },
1314    { "glCopyColorSubTable", 10, _gloffset_CopyColorSubTable },
1315    { "glConvolutionFilter1D", 10, _gloffset_ConvolutionFilter1D },
1316    { "glConvolutionFilter2D", 10, _gloffset_ConvolutionFilter2D },
1317    { "glConvolutionParameterf", 10, _gloffset_ConvolutionParameterf },
1318    { "glConvolutionParameterfv", 10, _gloffset_ConvolutionParameterfv },
1319    { "glConvolutionParameteri", 10, _gloffset_ConvolutionParameteri },
1320    { "glConvolutionParameteriv", 10, _gloffset_ConvolutionParameteriv },
1321    { "glCopyConvolutionFilter1D", 10, _gloffset_CopyConvolutionFilter1D },
1322    { "glCopyConvolutionFilter2D", 10, _gloffset_CopyConvolutionFilter2D },
1323    { "glGetConvolutionFilter", 10, _gloffset_GetConvolutionFilter },
1324    { "glGetConvolutionParameterfv", 10, _gloffset_GetConvolutionParameterfv },
1325    { "glGetConvolutionParameteriv", 10, _gloffset_GetConvolutionParameteriv },
1326    { "glGetSeparableFilter", 10, _gloffset_GetSeparableFilter },
1327    { "glSeparableFilter2D", 10, _gloffset_SeparableFilter2D },
1328    { "glGetHistogram", 10, _gloffset_GetHistogram },
1329    { "glGetHistogramParameterfv", 10, _gloffset_GetHistogramParameterfv },
1330    { "glGetHistogramParameteriv", 10, _gloffset_GetHistogramParameteriv },
1331    { "glGetMinmax", 10, _gloffset_GetMinmax },
1332    { "glGetMinmaxParameterfv", 10, _gloffset_GetMinmaxParameterfv },
1333    { "glGetMinmaxParameteriv", 10, _gloffset_GetMinmaxParameteriv },
1334    { "glHistogram", 10, _gloffset_Histogram },
1335    { "glMinmax", 10, _gloffset_Minmax },
1336    { "glResetHistogram", 10, _gloffset_ResetHistogram },
1337    { "glResetMinmax", 10, _gloffset_ResetMinmax },
1338    { "glClientActiveTexture", 10, _gloffset_ClientActiveTexture },
1339    { "glMultiTexCoord1d", 10, _gloffset_MultiTexCoord1d },
1340    { "glMultiTexCoord1dv", 10, _gloffset_MultiTexCoord1dv },
1341    { "glMultiTexCoord1f", 10, _gloffset_MultiTexCoord1fARB },
1342    { "glMultiTexCoord1fv", 10, _gloffset_MultiTexCoord1fvARB },
1343    { "glMultiTexCoord1i", 10, _gloffset_MultiTexCoord1i },
1344    { "glMultiTexCoord1iv", 10, _gloffset_MultiTexCoord1iv },
1345    { "glMultiTexCoord1s", 10, _gloffset_MultiTexCoord1s },
1346    { "glMultiTexCoord1sv", 10, _gloffset_MultiTexCoord1sv },
1347    { "glMultiTexCoord2d", 10, _gloffset_MultiTexCoord2d },
1348    { "glMultiTexCoord2dv", 10, _gloffset_MultiTexCoord2dv },
1349    { "glMultiTexCoord2f", 10, _gloffset_MultiTexCoord2fARB },
1350    { "glMultiTexCoord2fv", 10, _gloffset_MultiTexCoord2fvARB },
1351    { "glMultiTexCoord2i", 10, _gloffset_MultiTexCoord2i },
1352    { "glMultiTexCoord2iv", 10, _gloffset_MultiTexCoord2iv },
1353    { "glMultiTexCoord2s", 10, _gloffset_MultiTexCoord2s },
1354    { "glMultiTexCoord2sv", 10, _gloffset_MultiTexCoord2sv },
1355    { "glMultiTexCoord3d", 10, _gloffset_MultiTexCoord3d },
1356    { "glMultiTexCoord3dv", 10, _gloffset_MultiTexCoord3dv },
1357    { "glMultiTexCoord3f", 10, _gloffset_MultiTexCoord3fARB },
1358    { "glMultiTexCoord3fv", 10, _gloffset_MultiTexCoord3fvARB },
1359    { "glMultiTexCoord3i", 10, _gloffset_MultiTexCoord3i },
1360    { "glMultiTexCoord3iv", 10, _gloffset_MultiTexCoord3iv },
1361    { "glMultiTexCoord3s", 10, _gloffset_MultiTexCoord3s },
1362    { "glMultiTexCoord3sv", 10, _gloffset_MultiTexCoord3sv },
1363    { "glMultiTexCoord4d", 10, _gloffset_MultiTexCoord4d },
1364    { "glMultiTexCoord4dv", 10, _gloffset_MultiTexCoord4dv },
1365    { "glMultiTexCoord4f", 10, _gloffset_MultiTexCoord4fARB },
1366    { "glMultiTexCoord4fv", 10, _gloffset_MultiTexCoord4fvARB },
1367    { "glMultiTexCoord4i", 10, _gloffset_MultiTexCoord4i },
1368    { "glMultiTexCoord4iv", 10, _gloffset_MultiTexCoord4iv },
1369    { "glMultiTexCoord4s", 10, _gloffset_MultiTexCoord4s },
1370    { "glMultiTexCoord4sv", 10, _gloffset_MultiTexCoord4sv },
1371    { "glLoadTransposeMatrixf", 10, -1 },
1372    { "glLoadTransposeMatrixd", 10, -1 },
1373    { "glMultTransposeMatrixf", 10, -1 },
1374    { "glMultTransposeMatrixd", 10, -1 },
1375    { "glFogCoordf", 10, -1 },
1376    { "glFogCoordfv", 10, -1 },
1377    { "glFogCoordd", 10, -1 },
1378    { "glFogCoorddv", 10, -1 },
1379    { "glFogCoordPointer", 10, -1 },
1380    { "glSecondaryColor3b", 10, -1 },
1381    { "glSecondaryColor3bv", 10, -1 },
1382    { "glSecondaryColor3d", 10, -1 },
1383    { "glSecondaryColor3dv", 10, -1 },
1384    { "glSecondaryColor3f", 10, -1 },
1385    { "glSecondaryColor3fv", 10, -1 },
1386    { "glSecondaryColor3i", 10, -1 },
1387    { "glSecondaryColor3iv", 10, -1 },
1388    { "glSecondaryColor3s", 10, -1 },
1389    { "glSecondaryColor3sv", 10, -1 },
1390    { "glSecondaryColor3ub", 10, -1 },
1391    { "glSecondaryColor3ubv", 10, -1 },
1392    { "glSecondaryColor3ui", 10, -1 },
1393    { "glSecondaryColor3uiv", 10, -1 },
1394    { "glSecondaryColor3us", 10, -1 },
1395    { "glSecondaryColor3usv", 10, -1 },
1396    { "glSecondaryColorPointer", 10, -1 },
1397    { "glWindowPos2d", 10, -1 },
1398    { "glWindowPos2dv", 10, -1 },
1399    { "glWindowPos2f", 10, -1 },
1400    { "glWindowPos2fv", 10, -1 },
1401    { "glWindowPos2i", 10, -1 },
1402    { "glWindowPos2iv", 10, -1 },
1403    { "glWindowPos2s", 10, -1 },
1404    { "glWindowPos2sv", 10, -1 },
1405    { "glWindowPos3d", 10, -1 },
1406    { "glWindowPos3dv", 10, -1 },
1407    { "glWindowPos3f", 10, -1 },
1408    { "glWindowPos3fv", 10, -1 },
1409    { "glWindowPos3i", 10, -1 },
1410    { "glWindowPos3iv", 10, -1 },
1411    { "glWindowPos3s", 10, -1 },
1412    { "glWindowPos3sv", 10, -1 },
1413    { "glProgramStringARB", 10, -1 },
1414    { "glProgramEnvParameter4dARB", 10, -1 },
1415    { "glProgramEnvParameter4dvARB", 10, -1 },
1416    { "glProgramEnvParameter4fARB", 10, -1 },
1417    { "glProgramEnvParameter4fvARB", 10, -1 },
1418    { "glProgramLocalParameter4dARB", 10, -1 },
1419    { "glProgramLocalParameter4dvARB", 10, -1 },
1420    { "glProgramLocalParameter4fARB", 10, -1 },
1421    { "glProgramLocalParameter4fvARB", 10, -1 },
1422    { "glGetProgramEnvParameterdvARB", 10, -1 },
1423    { "glGetProgramEnvParameterfvARB", 10, -1 },
1424    { "glGetProgramLocalParameterdvARB", 10, -1 },
1425    { "glGetProgramLocalParameterfvARB", 10, -1 },
1426    { "glGetProgramivARB", 10, -1 },
1427    { "glGetProgramStringARB", 10, -1 },
1428    { "glPolygonOffsetEXT", 10, -1 },
1429    { "glColorPointerEXT", 10, -1 },
1430    { "glEdgeFlagPointerEXT", 10, -1 },
1431    { "glIndexPointerEXT", 10, -1 },
1432    { "glNormalPointerEXT", 10, -1 },
1433    { "glTexCoordPointerEXT", 10, -1 },
1434    { "glVertexPointerEXT", 10, -1 },
1435    { "glLockArraysEXT", 10, -1 },
1436    { "glUnlockArraysEXT", 10, -1 },
1437    { "glWindowPos4dMESA", 10, -1 },
1438    { "glWindowPos4dvMESA", 10, -1 },
1439    { "glWindowPos4fMESA", 10, -1 },
1440    { "glWindowPos4fvMESA", 10, -1 },
1441    { "glWindowPos4iMESA", 10, -1 },
1442    { "glWindowPos4ivMESA", 10, -1 },
1443    { "glWindowPos4sMESA", 10, -1 },
1444    { "glWindowPos4svMESA", 10, -1 },
1445    { "glBindProgramNV", 10, -1 },
1446    { "glDeleteProgramsNV", 10, -1 },
1447    { "glGenProgramsNV", 10, -1 },
1448    { "glIsProgramNV", 10, -1 },
1449    { "glVertexAttrib1sNV", 10, -1 },
1450    { "glVertexAttrib1svNV", 10, -1 },
1451    { "glVertexAttrib2sNV", 10, -1 },
1452    { "glVertexAttrib2svNV", 10, -1 },
1453    { "glVertexAttrib3sNV", 10, -1 },
1454    { "glVertexAttrib3svNV", 10, -1 },
1455    { "glVertexAttrib4sNV", 10, -1 },
1456    { "glVertexAttrib4svNV", 10, -1 },
1457    { "glVertexAttrib1fNV", 10, -1 },
1458    { "glVertexAttrib1fvNV", 10, -1 },
1459    { "glVertexAttrib2fNV", 10, -1 },
1460    { "glVertexAttrib2fvNV", 10, -1 },
1461    { "glVertexAttrib3fNV", 10, -1 },
1462    { "glVertexAttrib3fvNV", 10, -1 },
1463    { "glVertexAttrib4fNV", 10, -1 },
1464    { "glVertexAttrib4fvNV", 10, -1 },
1465    { "glVertexAttrib1dNV", 10, -1 },
1466    { "glVertexAttrib1dvNV", 10, -1 },
1467    { "glVertexAttrib2dNV", 10, -1 },
1468    { "glVertexAttrib2dvNV", 10, -1 },
1469    { "glVertexAttrib3dNV", 10, -1 },
1470    { "glVertexAttrib3dvNV", 10, -1 },
1471    { "glVertexAttrib4dNV", 10, -1 },
1472    { "glVertexAttrib4dvNV", 10, -1 },
1473    { "glVertexAttrib4ubNV", 10, -1 },
1474    { "glVertexAttrib4ubvNV", 10, -1 },
1475    { "glVertexAttribs1svNV", 10, -1 },
1476    { "glVertexAttribs2svNV", 10, -1 },
1477    { "glVertexAttribs3svNV", 10, -1 },
1478    { "glVertexAttribs4svNV", 10, -1 },
1479    { "glVertexAttribs1fvNV", 10, -1 },
1480    { "glVertexAttribs2fvNV", 10, -1 },
1481    { "glVertexAttribs3fvNV", 10, -1 },
1482    { "glVertexAttribs4fvNV", 10, -1 },
1483    { "glVertexAttribs1dvNV", 10, -1 },
1484    { "glVertexAttribs2dvNV", 10, -1 },
1485    { "glVertexAttribs3dvNV", 10, -1 },
1486    { "glVertexAttribs4dvNV", 10, -1 },
1487    { "glVertexAttribs4ubvNV", 10, -1 },
1488    { "glGenFragmentShadersATI", 10, -1 },
1489    { "glBindFragmentShaderATI", 10, -1 },
1490    { "glDeleteFragmentShaderATI", 10, -1 },
1491    { "glBeginFragmentShaderATI", 10, -1 },
1492    { "glEndFragmentShaderATI", 10, -1 },
1493    { "glPassTexCoordATI", 10, -1 },
1494    { "glSampleMapATI", 10, -1 },
1495    { "glColorFragmentOp1ATI", 10, -1 },
1496    { "glColorFragmentOp2ATI", 10, -1 },
1497    { "glColorFragmentOp3ATI", 10, -1 },
1498    { "glAlphaFragmentOp1ATI", 10, -1 },
1499    { "glAlphaFragmentOp2ATI", 10, -1 },
1500    { "glAlphaFragmentOp3ATI", 10, -1 },
1501    { "glSetFragmentShaderConstantATI", 10, -1 },
1502    { "glActiveStencilFaceEXT", 10, -1 },
1503    { "glStencilFuncSeparateATI", 10, -1 },
1504    { "glProgramEnvParameters4fvEXT", 10, -1 },
1505    { "glProgramLocalParameters4fvEXT", 10, -1 },
1506    { "glPrimitiveRestartNV", 10, -1 },
1507 
1508    { NULL, 0, -1 }
1509 };
1510 
1511 const struct function gl_core_functions_possible[] = {
1512    /* GL 3.2 */
1513    { "glFramebufferTexture", 32, -1 },
1514 
1515    /* GL 4.0 */
1516    { "glGetSubroutineUniformLocation", 40, -1 },
1517    { "glGetSubroutineIndex", 40, -1 },
1518    { "glGetActiveSubroutineUniformiv", 40, -1 },
1519    { "glGetActiveSubroutineUniformName", 40, -1 },
1520    { "glGetActiveSubroutineName", 40, -1 },
1521    { "glUniformSubroutinesuiv", 40, -1 },
1522    { "glGetUniformSubroutineuiv", 40, -1 },
1523    { "glGetProgramStageiv", 40, -1 },
1524 
1525    /* GL 4.3 */
1526    { "glIsRenderbuffer", 43, -1 },
1527    { "glBindRenderbuffer", 43, -1 },
1528    { "glDeleteRenderbuffers", 43, -1 },
1529    { "glGenRenderbuffers", 43, -1 },
1530    { "glRenderbufferStorage", 43, -1 },
1531    { "glGetRenderbufferParameteriv", 43, -1 },
1532    { "glIsFramebuffer", 43, -1 },
1533    { "glBindFramebuffer", 43, -1 },
1534    { "glDeleteFramebuffers", 43, -1 },
1535    { "glGenFramebuffers", 43, -1 },
1536    { "glCheckFramebufferStatus", 43, -1 },
1537    { "glFramebufferTexture1D", 43, -1 },
1538    { "glFramebufferTexture2D", 43, -1 },
1539    { "glFramebufferTexture3D", 43, -1 },
1540    { "glFramebufferRenderbuffer", 43, -1 },
1541    { "glGetFramebufferAttachmentParameteriv", 43, -1 },
1542    { "glGenerateMipmap", 43, -1 },
1543    { "glBlitFramebuffer", 43, -1 },
1544    { "glRenderbufferStorageMultisample", 43, -1 },
1545    { "glFramebufferTextureLayer", 43, -1 },
1546    { "glMapBufferRange", 43, -1 },
1547    { "glFlushMappedBufferRange", 43, -1 },
1548    { "glBindVertexArray", 43, -1 },
1549    { "glDeleteVertexArrays", 43, -1 },
1550    { "glGenVertexArrays", 43, -1 },
1551    { "glIsVertexArray", 43, -1 },
1552    { "glGetUniformIndices", 43, -1 },
1553    { "glGetActiveUniformsiv", 43, -1 },
1554    { "glGetActiveUniformName", 43, -1 },
1555    { "glGetUniformBlockIndex", 43, -1 },
1556    { "glGetActiveUniformBlockiv", 43, -1 },
1557    { "glGetActiveUniformBlockName", 43, -1 },
1558    { "glUniformBlockBinding", 43, -1 },
1559    { "glCopyBufferSubData", 43, -1 },
1560    { "glDrawElementsBaseVertex", 43, -1 },
1561    { "glDrawRangeElementsBaseVertex", 43, -1 },
1562    { "glDrawElementsInstancedBaseVertex", 43, -1 },
1563    { "glMultiDrawElementsBaseVertex", 43, -1 },
1564    { "glProvokingVertex", 43, -1 },
1565    { "glFenceSync", 43, -1 },
1566    { "glIsSync", 43, -1 },
1567    { "glDeleteSync", 43, -1 },
1568    { "glClientWaitSync", 43, -1 },
1569    { "glWaitSync", 43, -1 },
1570    { "glGetInteger64v", 43, -1 },
1571    { "glGetSynciv", 43, -1 },
1572    { "glTexImage2DMultisample", 43, -1 },
1573    { "glTexImage3DMultisample", 43, -1 },
1574    { "glGetMultisamplefv", 43, -1 },
1575    { "glSampleMaski", 43, -1 },
1576    { "glBlendEquationiARB", 43, -1 },
1577    { "glBlendEquationSeparateiARB", 43, -1 },
1578    { "glBlendFunciARB", 43, -1 },
1579    { "glBlendFuncSeparateiARB", 43, -1 },
1580    { "glMinSampleShadingARB", 43, -1 },                 // XXX: Add to xml
1581 // { "glNamedStringARB", 43, -1 },                      // XXX: Add to xml
1582 // { "glDeleteNamedStringARB", 43, -1 },                // XXX: Add to xml
1583 // { "glCompileShaderIncludeARB", 43, -1 },             // XXX: Add to xml
1584 // { "glIsNamedStringARB", 43, -1 },                    // XXX: Add to xml
1585 // { "glGetNamedStringARB", 43, -1 },                   // XXX: Add to xml
1586 // { "glGetNamedStringivARB", 43, -1 },                 // XXX: Add to xml
1587    { "glBindFragDataLocationIndexed", 43, -1 },
1588    { "glGetFragDataIndex", 43, -1 },
1589    { "glGenSamplers", 43, -1 },
1590    { "glDeleteSamplers", 43, -1 },
1591    { "glIsSampler", 43, -1 },
1592    { "glBindSampler", 43, -1 },
1593    { "glSamplerParameteri", 43, -1 },
1594    { "glSamplerParameteriv", 43, -1 },
1595    { "glSamplerParameterf", 43, -1 },
1596    { "glSamplerParameterfv", 43, -1 },
1597    { "glSamplerParameterIiv", 43, -1 },
1598    { "glSamplerParameterIuiv", 43, -1 },
1599    { "glGetSamplerParameteriv", 43, -1 },
1600    { "glGetSamplerParameterIiv", 43, -1 },
1601    { "glGetSamplerParameterfv", 43, -1 },
1602    { "glGetSamplerParameterIuiv", 43, -1 },
1603    { "glQueryCounter", 43, -1 },
1604    { "glGetQueryObjecti64v", 43, -1 },
1605    { "glGetQueryObjectui64v", 43, -1 },
1606    { "glVertexP2ui", 43, -1 },
1607    { "glVertexP2uiv", 43, -1 },
1608    { "glVertexP3ui", 43, -1 },
1609    { "glVertexP3uiv", 43, -1 },
1610    { "glVertexP4ui", 43, -1 },
1611    { "glVertexP4uiv", 43, -1 },
1612    { "glTexCoordP1ui", 43, -1 },
1613    { "glTexCoordP1uiv", 43, -1 },
1614    { "glTexCoordP2ui", 43, -1 },
1615    { "glTexCoordP2uiv", 43, -1 },
1616    { "glTexCoordP3ui", 43, -1 },
1617    { "glTexCoordP3uiv", 43, -1 },
1618    { "glTexCoordP4ui", 43, -1 },
1619    { "glTexCoordP4uiv", 43, -1 },
1620    { "glMultiTexCoordP1ui", 43, -1 },
1621    { "glMultiTexCoordP1uiv", 43, -1 },
1622    { "glMultiTexCoordP2ui", 43, -1 },
1623    { "glMultiTexCoordP2uiv", 43, -1 },
1624    { "glMultiTexCoordP3ui", 43, -1 },
1625    { "glMultiTexCoordP3uiv", 43, -1 },
1626    { "glMultiTexCoordP4ui", 43, -1 },
1627    { "glMultiTexCoordP4uiv", 43, -1 },
1628    { "glNormalP3ui", 43, -1 },
1629    { "glNormalP3uiv", 43, -1 },
1630    { "glColorP3ui", 43, -1 },
1631    { "glColorP3uiv", 43, -1 },
1632    { "glColorP4ui", 43, -1 },
1633    { "glColorP4uiv", 43, -1 },
1634    { "glVertexAttribP1ui", 43, -1 },
1635    { "glVertexAttribP1uiv", 43, -1 },
1636    { "glVertexAttribP2ui", 43, -1 },
1637    { "glVertexAttribP2uiv", 43, -1 },
1638    { "glVertexAttribP3ui", 43, -1 },
1639    { "glVertexAttribP3uiv", 43, -1 },
1640    { "glVertexAttribP4ui", 43, -1 },
1641    { "glVertexAttribP4uiv", 43, -1 },
1642    { "glDrawArraysIndirect", 43, -1 },
1643    { "glDrawElementsIndirect", 43, -1 },
1644 
1645    { "glUniform1d", 40, -1 },
1646    { "glUniform2d", 40, -1 },
1647    { "glUniform3d", 40, -1 },
1648    { "glUniform4d", 40, -1 },
1649    { "glUniform1dv", 40, -1 },
1650    { "glUniform2dv", 40, -1 },
1651    { "glUniform3dv", 40, -1 },
1652    { "glUniform4dv", 40, -1 },
1653    { "glUniformMatrix2dv", 40, -1 },
1654    { "glUniformMatrix3dv", 40, -1 },
1655    { "glUniformMatrix4dv", 40, -1 },
1656    { "glUniformMatrix2x3dv", 40, -1 },
1657    { "glUniformMatrix2x4dv", 40, -1 },
1658    { "glUniformMatrix3x2dv", 40, -1 },
1659    { "glUniformMatrix3x4dv", 40, -1 },
1660    { "glUniformMatrix4x2dv", 40, -1 },
1661    { "glUniformMatrix4x3dv", 40, -1 },
1662    { "glGetUniformdv", 43, -1 },
1663 
1664    { "glBindTransformFeedback", 43, -1 },
1665    { "glDeleteTransformFeedbacks", 43, -1 },
1666    { "glGenTransformFeedbacks", 43, -1 },
1667    { "glIsTransformFeedback", 43, -1 },
1668    { "glPauseTransformFeedback", 43, -1 },
1669    { "glResumeTransformFeedback", 43, -1 },
1670    { "glDrawTransformFeedback", 43, -1 },
1671    { "glDrawTransformFeedbackStream", 43, -1 },
1672    { "glBeginQueryIndexed", 43, -1 },
1673    { "glEndQueryIndexed", 43, -1 },
1674    { "glGetQueryIndexediv", 43, -1 },
1675    { "glReleaseShaderCompiler", 43, -1 },
1676    { "glShaderBinary", 43, -1 },
1677    { "glGetShaderPrecisionFormat", 43, -1 },
1678    { "glDepthRangef", 43, -1 },
1679    { "glClearDepthf", 43, -1 },
1680    { "glGetProgramBinary", 43, -1 },
1681    { "glProgramBinary", 43, -1 },
1682    { "glProgramParameteri", 43, -1 },
1683    { "glUseProgramStages", 43, -1 },
1684    { "glActiveShaderProgram", 43, -1 },
1685    { "glCreateShaderProgramv", 43, -1 },
1686    { "glBindProgramPipeline", 43, -1 },
1687    { "glDeleteProgramPipelines", 43, -1 },
1688    { "glGenProgramPipelines", 43, -1 },
1689    { "glIsProgramPipeline", 43, -1 },
1690    { "glGetProgramPipelineiv", 43, -1 },
1691    { "glProgramUniform1i", 43, -1 },
1692    { "glProgramUniform1iv", 43, -1 },
1693    { "glProgramUniform1f", 43, -1 },
1694    { "glProgramUniform1fv", 43, -1 },
1695    { "glProgramUniform1d", 40, -1 },
1696    { "glProgramUniform1dv", 40, -1 },
1697    { "glProgramUniform1ui", 43, -1 },
1698    { "glProgramUniform1uiv", 43, -1 },
1699    { "glProgramUniform2i", 43, -1 },
1700    { "glProgramUniform2iv", 43, -1 },
1701    { "glProgramUniform2f", 43, -1 },
1702    { "glProgramUniform2fv", 43, -1 },
1703    { "glProgramUniform2d", 40, -1 },
1704    { "glProgramUniform2dv", 40, -1 },
1705    { "glProgramUniform2ui", 43, -1 },
1706    { "glProgramUniform2uiv", 43, -1 },
1707    { "glProgramUniform3i", 43, -1 },
1708    { "glProgramUniform3iv", 43, -1 },
1709    { "glProgramUniform3f", 43, -1 },
1710    { "glProgramUniform3fv", 43, -1 },
1711    { "glProgramUniform3d", 40, -1 },
1712    { "glProgramUniform3dv", 40, -1 },
1713    { "glProgramUniform3ui", 43, -1 },
1714    { "glProgramUniform3uiv", 43, -1 },
1715    { "glProgramUniform4i", 43, -1 },
1716    { "glProgramUniform4iv", 43, -1 },
1717    { "glProgramUniform4f", 43, -1 },
1718    { "glProgramUniform4fv", 43, -1 },
1719    { "glProgramUniform4d", 40, -1 },
1720    { "glProgramUniform4dv", 40, -1 },
1721    { "glProgramUniform4ui", 43, -1 },
1722    { "glProgramUniform4uiv", 43, -1 },
1723    { "glProgramUniformMatrix2fv", 43, -1 },
1724    { "glProgramUniformMatrix3fv", 43, -1 },
1725    { "glProgramUniformMatrix4fv", 43, -1 },
1726    { "glProgramUniformMatrix2dv", 40, -1 },
1727    { "glProgramUniformMatrix3dv", 40, -1 },
1728    { "glProgramUniformMatrix4dv", 40, -1 },
1729    { "glProgramUniformMatrix2x3fv", 43, -1 },
1730    { "glProgramUniformMatrix3x2fv", 43, -1 },
1731    { "glProgramUniformMatrix2x4fv", 43, -1 },
1732    { "glProgramUniformMatrix4x2fv", 43, -1 },
1733    { "glProgramUniformMatrix3x4fv", 43, -1 },
1734    { "glProgramUniformMatrix4x3fv", 43, -1 },
1735    { "glProgramUniformMatrix2x3dv", 40, -1 },
1736    { "glProgramUniformMatrix3x2dv", 40, -1 },
1737    { "glProgramUniformMatrix2x4dv", 40, -1 },
1738    { "glProgramUniformMatrix4x2dv", 40, -1 },
1739    { "glProgramUniformMatrix3x4dv", 40, -1 },
1740    { "glProgramUniformMatrix4x3dv", 40, -1 },
1741    { "glValidateProgramPipeline", 43, -1 },
1742    { "glGetProgramPipelineInfoLog", 43, -1 },
1743 
1744    { "glVertexAttribL1d", 41, -1 },
1745    { "glVertexAttribL2d", 41, -1 },
1746    { "glVertexAttribL3d", 41, -1 },
1747    { "glVertexAttribL4d", 41, -1 },
1748    { "glVertexAttribL1dv", 41, -1 },
1749    { "glVertexAttribL2dv", 41, -1 },
1750    { "glVertexAttribL3dv", 41, -1 },
1751    { "glVertexAttribL4dv", 41, -1 },
1752    { "glVertexAttribLPointer", 41, -1 },
1753    { "glGetVertexAttribLdv", 41, -1 },
1754    { "glViewportArrayv", 43, -1 },
1755    { "glViewportIndexedf", 43, -1 },
1756    { "glViewportIndexedfv", 43, -1 },
1757    { "glScissorArrayv", 43, -1 },
1758    { "glScissorIndexed", 43, -1 },
1759    { "glScissorIndexedv", 43, -1 },
1760    { "glDepthRangeArrayv", 43, -1 },
1761    { "glDepthRangeIndexed", 43, -1 },
1762 
1763 // { "glCreateSyncFromCLeventARB", 43, -1 },            // XXX: Add to xml
1764 
1765    { "glDrawArraysInstancedBaseInstance", 43, -1 },
1766    { "glDrawElementsInstancedBaseInstance", 43, -1 },
1767    { "glDrawElementsInstancedBaseVertexBaseInstance", 43, -1 },
1768    { "glDrawTransformFeedbackInstanced", 43, -1 },
1769    { "glDrawTransformFeedbackStreamInstanced", 43, -1 },
1770    { "glGetActiveAtomicCounterBufferiv", 43, -1 },
1771    { "glBindImageTexture", 43, -1 },
1772    { "glMemoryBarrier", 43, -1 },
1773    { "glTexStorage1D", 43, -1 },
1774    { "glTexStorage2D", 43, -1 },
1775    { "glTexStorage3D", 43, -1 },
1776    { "glTextureStorage1DEXT", 43, -1 },
1777    { "glTextureStorage2DEXT", 43, -1 },
1778    { "glTextureStorage3DEXT", 43, -1 },
1779    { "glClearBufferData", 43, -1 },
1780    { "glClearBufferSubData", 43, -1 },
1781 // { "glClearNamedBufferDataEXT", 43, -1 },             // XXX: Add to xml
1782 // { "glClearNamedBufferSubDataEXT", 43, -1 },          // XXX: Add to xml
1783    { "glCopyImageSubData", 43, -1 },
1784    { "glTextureView", 43, -1 },
1785    { "glBindVertexBuffer", 43, -1 },
1786    { "glVertexAttribFormat", 43, -1 },
1787    { "glVertexAttribIFormat", 43, -1 },
1788    { "glVertexAttribBinding", 43, -1 },
1789    { "glVertexBindingDivisor", 43, -1 },
1790 // { "glVertexArrayBindVertexBufferEXT", 43, -1 },      // XXX: Add to xml
1791 // { "glVertexArrayVertexAttribFormatEXT", 43, -1 },    // XXX: Add to xml
1792 // { "glVertexArrayVertexAttribIFormatEXT", 43, -1 },   // XXX: Add to xml
1793 // { "glVertexArrayVertexAttribLFormatEXT", 43, -1 },   // XXX: Add to xml
1794 // { "glVertexArrayVertexAttribBindingEXT", 43, -1 },   // XXX: Add to xml
1795 // { "glVertexArrayVertexBindingDivisorEXT", 43, -1 },  // XXX: Add to xml
1796 // { "glFramebufferParameteri", 43, -1 },               // XXX: Add to xml
1797 // { "glGetFramebufferParameteriv", 43, -1 },           // XXX: Add to xml
1798 // { "glNamedFramebufferParameteriEXT", 43, -1 },       // XXX: Add to xml
1799 // { "glGetNamedFramebufferParameterivEXT", 43, -1 },   // XXX: Add to xml
1800 // { "glGetInternalformati64v", 43, -1 },               // XXX: Add to xml
1801    { "glInvalidateTexSubImage", 43, -1 },
1802    { "glInvalidateTexImage", 43, -1 },
1803    { "glInvalidateBufferSubData", 43, -1 },
1804    { "glInvalidateBufferData", 43, -1 },
1805    { "glInvalidateFramebuffer", 43, -1 },
1806    { "glInvalidateSubFramebuffer", 43, -1 },
1807    { "glMultiDrawArraysIndirect", 43, -1 },
1808    { "glMultiDrawElementsIndirect", 43, -1 },
1809    { "glGetProgramInterfaceiv", 43, -1 },
1810    { "glGetProgramResourceIndex", 43, -1 },
1811    { "glGetProgramResourceName", 43, -1 },
1812    { "glGetProgramResourceiv", 43, -1 },
1813    { "glGetProgramResourceLocation", 43, -1 },
1814    { "glGetProgramResourceLocationIndex", 43, -1 },
1815 // { "glShaderStorageBlockBinding", 43, -1 },           // XXX: Add to xml
1816 // { "glTextureBufferRangeEXT", 43, -1 },               // XXX: Add to xml
1817    { "glTexStorage2DMultisample", 43, -1 },
1818    { "glTexStorage3DMultisample", 43, -1 },
1819 // { "glTextureStorage2DMultisampleEXT", 43, -1 },      // XXX: Add to xml
1820 // { "glTextureStorage3DMultisampleEXT", 43, -1 },      // XXX: Add to xml
1821 
1822 /* GL 4.5 */
1823    { "glMemoryBarrierByRegion", 45, -1 },
1824 
1825    /* GL_ARB_direct_state_access */
1826    { "glCreateTransformFeedbacks", 45, -1 },
1827    { "glTransformFeedbackBufferBase", 45, -1 },
1828    { "glTransformFeedbackBufferRange", 45, -1 },
1829    { "glGetTransformFeedbackiv", 45, -1 },
1830    { "glGetTransformFeedbacki_v", 45, -1 },
1831    { "glGetTransformFeedbacki64_v", 45, -1 },
1832    { "glCreateBuffers", 45, -1 },
1833    { "glNamedBufferStorage", 45, -1 },
1834    { "glNamedBufferData", 45, -1 },
1835    { "glNamedBufferSubData", 45, -1 },
1836    { "glCopyNamedBufferSubData", 45, -1 },
1837    { "glClearNamedBufferData", 45, -1 },
1838    { "glClearNamedBufferSubData", 45, -1 },
1839    { "glMapNamedBuffer", 45, -1 },
1840    { "glMapNamedBufferRange", 45, -1 },
1841    { "glUnmapNamedBuffer", 45, -1 },
1842    { "glFlushMappedNamedBufferRange", 45, -1 },
1843    { "glGetNamedBufferParameteriv", 45, -1 },
1844    { "glGetNamedBufferParameteri64v", 45, -1 },
1845    { "glGetNamedBufferPointerv", 45, -1 },
1846    { "glGetNamedBufferSubData", 45, -1 },
1847    { "glCreateFramebuffers", 45, -1 },
1848    { "glNamedFramebufferRenderbuffer", 45, -1 },
1849    { "glNamedFramebufferParameteri", 45, -1 },
1850    { "glNamedFramebufferTexture", 45, -1 },
1851    { "glNamedFramebufferTextureLayer", 45, -1 },
1852    { "glNamedFramebufferDrawBuffer", 45, -1 },
1853    { "glNamedFramebufferDrawBuffers", 45, -1 },
1854    { "glNamedFramebufferReadBuffer", 45, -1 },
1855    { "glInvalidateNamedFramebufferSubData", 45, -1 },
1856    { "glInvalidateNamedFramebufferData", 45, -1 },
1857    { "glClearNamedFramebufferiv", 45, -1 },
1858    { "glClearNamedFramebufferuiv", 45, -1 },
1859    { "glClearNamedFramebufferfv", 45, -1 },
1860    { "glClearNamedFramebufferfi", 45, -1 },
1861    { "glBlitNamedFramebuffer", 45, -1 },
1862    { "glCheckNamedFramebufferStatus", 45, -1 },
1863    { "glGetNamedFramebufferParameteriv", 45, -1 },
1864    { "glGetNamedFramebufferAttachmentParameteriv", 45, -1 },
1865    { "glCreateRenderbuffers", 45, -1 },
1866    { "glNamedRenderbufferStorage", 45, -1 },
1867    { "glNamedRenderbufferStorageMultisample", 45, -1 },
1868    { "glGetNamedRenderbufferParameteriv", 45, -1 },
1869    { "glCreateTextures", 45, -1 },
1870    { "glTextureStorage1D", 45, -1 },
1871    { "glTextureStorage2D", 45, -1 },
1872    { "glTextureStorage3D", 45, -1 },
1873    { "glTextureSubImage1D", 45, -1 },
1874    { "glTextureSubImage2D", 45, -1 },
1875    { "glTextureSubImage3D", 45, -1 },
1876    { "glBindTextureUnit", 45, -1 },
1877    { "glTextureParameterf", 45, -1 },
1878    { "glTextureParameterfv", 45, -1 },
1879    { "glTextureParameteri", 45, -1 },
1880    { "glTextureParameterIiv", 45, -1 },
1881    { "glTextureParameterIuiv", 45, -1 },
1882    { "glTextureParameteriv", 45, -1 },
1883    { "glGetTextureLevelParameterfv", 45, -1 },
1884    { "glGetTextureLevelParameteriv", 45, -1 },
1885    { "glGetTextureParameterfv", 45, -1 },
1886    { "glGetTextureParameterIiv", 45, -1 },
1887    { "glGetTextureParameterIuiv", 45, -1 },
1888    { "glGetTextureParameteriv", 45, -1 },
1889    { "glCopyTextureSubImage1D", 45, -1 },
1890    { "glCopyTextureSubImage2D", 45, -1 },
1891    { "glCopyTextureSubImage3D", 45, -1 },
1892    { "glGetTextureImage", 45, -1 },
1893    { "glGetCompressedTextureImage", 45, -1 },
1894    { "glCompressedTextureSubImage1D", 45, -1 },
1895    { "glCompressedTextureSubImage2D", 45, -1 },
1896    { "glCompressedTextureSubImage3D", 45, -1 },
1897    { "glGenerateTextureMipmap", 45, -1 },
1898    { "glTextureStorage2DMultisample", 45, -1 },
1899    { "glTextureStorage3DMultisample", 45, -1 },
1900    { "glTextureBuffer", 45, -1 },
1901    { "glTextureBufferRange", 45, -1 },
1902    { "glCreateVertexArrays", 45, -1 },
1903    { "glDisableVertexArrayAttrib", 45, -1 },
1904    { "glEnableVertexArrayAttrib", 45, -1 },
1905    { "glVertexArrayElementBuffer", 45, -1 },
1906    { "glVertexArrayVertexBuffer", 45, -1 },
1907    { "glVertexArrayVertexBuffers", 45, -1 },
1908    { "glVertexArrayAttribFormat", 45, -1 },
1909    { "glVertexArrayAttribIFormat", 45, -1 },
1910    { "glVertexArrayAttribLFormat", 45, -1 },
1911    { "glVertexArrayAttribBinding", 45, -1 },
1912    { "glVertexArrayBindingDivisor", 45, -1 },
1913    { "glGetVertexArrayiv", 45, -1 },
1914    { "glGetVertexArrayIndexediv", 45, -1 },
1915    { "glGetVertexArrayIndexed64iv", 45, -1 },
1916    { "glCreateSamplers", 45, -1 },
1917    { "glCreateProgramPipelines", 45, -1 },
1918    { "glCreateQueries", 45, -1 },
1919    { "glGetQueryBufferObjectiv", 45, -1 },
1920    { "glGetQueryBufferObjectuiv", 45, -1 },
1921    { "glGetQueryBufferObjecti64v", 45, -1 },
1922    { "glGetQueryBufferObjectui64v", 45, -1 },
1923 
1924    /* GL_ARB_indirect_parameters */
1925    { "glMultiDrawArraysIndirectCountARB", 31, -1 },
1926    { "glMultiDrawElementsIndirectCountARB", 31, -1 },
1927 
1928    /* GL_ARB_ES3_2_compatibility */
1929    { "glPrimitiveBoundingBoxARB", 45, -1 },
1930 
1931    /* GL_ARB_gpu_shader_int64 */
1932    { "glUniform1i64ARB", 45, -1 },
1933    { "glUniform2i64ARB", 45, -1 },
1934    { "glUniform3i64ARB", 45, -1 },
1935    { "glUniform4i64ARB", 45, -1 },
1936    { "glUniform1ui64ARB", 45, -1 },
1937    { "glUniform2ui64ARB", 45, -1 },
1938    { "glUniform3ui64ARB", 45, -1 },
1939    { "glUniform4ui64ARB", 45, -1 },
1940    { "glUniform1i64vARB", 45, -1 },
1941    { "glUniform2i64vARB", 45, -1 },
1942    { "glUniform3i64vARB", 45, -1 },
1943    { "glUniform4i64vARB", 45, -1 },
1944    { "glUniform1ui64vARB", 45, -1 },
1945    { "glUniform2ui64vARB", 45, -1 },
1946    { "glUniform3ui64vARB", 45, -1 },
1947    { "glUniform4ui64vARB", 45, -1 },
1948    { "glGetUniformi64vARB", 45, -1 },
1949    { "glGetUniformui64vARB", 45, -1 },
1950    { "glGetnUniformi64vARB", 45, -1 },
1951    { "glGetnUniformui64vARB", 45, -1 },
1952    { "glProgramUniform1i64ARB", 45, -1 },
1953    { "glProgramUniform2i64ARB", 45, -1 },
1954    { "glProgramUniform3i64ARB", 45, -1 },
1955    { "glProgramUniform4i64ARB", 45, -1 },
1956    { "glProgramUniform1ui64ARB", 45, -1 },
1957    { "glProgramUniform2ui64ARB", 45, -1 },
1958    { "glProgramUniform3ui64ARB", 45, -1 },
1959    { "glProgramUniform4ui64ARB", 45, -1 },
1960    { "glProgramUniform1i64vARB", 45, -1 },
1961    { "glProgramUniform2i64vARB", 45, -1 },
1962    { "glProgramUniform3i64vARB", 45, -1 },
1963    { "glProgramUniform4i64vARB", 45, -1 },
1964    { "glProgramUniform1ui64vARB", 45, -1 },
1965    { "glProgramUniform2ui64vARB", 45, -1 },
1966    { "glProgramUniform3ui64vARB", 45, -1 },
1967    { "glProgramUniform4ui64vARB", 45, -1 },
1968 
1969    /* GL_ARB_gl_spirv */
1970    { "glSpecializeShaderARB", 45, -1 },
1971 
1972    { NULL, 0, -1 }
1973 };
1974 
1975 const struct function gles11_functions_possible[] = {
1976    { "glActiveTexture", 11, _gloffset_ActiveTexture },
1977    { "glAlphaFunc", 11, _gloffset_AlphaFunc },
1978    { "glAlphaFuncx", 11, -1 },
1979    { "glBindBuffer", 11, -1 },
1980    { "glBindFramebufferOES", 11, -1 },
1981    { "glBindRenderbufferOES", 11, -1 },
1982    { "glBindTexture", 11, _gloffset_BindTexture },
1983    { "glBlendEquationOES", 11, _gloffset_BlendEquation },
1984    { "glBlendEquationSeparateOES", 11, -1 },
1985    { "glBlendFunc", 11, _gloffset_BlendFunc },
1986    { "glBlendFuncSeparateOES", 11, -1 },
1987    { "glBufferData", 11, -1 },
1988    { "glBufferSubData", 11, -1 },
1989    { "glCheckFramebufferStatusOES", 11, -1 },
1990    { "glClear", 11, _gloffset_Clear },
1991    { "glClearColor", 11, _gloffset_ClearColor },
1992    { "glClearColorx", 11, -1 },
1993    { "glClearDepthf", 11, -1 },
1994    { "glClearDepthx", 11, -1 },
1995    { "glClearStencil", 11, _gloffset_ClearStencil },
1996    { "glClientActiveTexture", 11, _gloffset_ClientActiveTexture },
1997    { "glClipPlanef", 11, -1 },
1998    { "glClipPlanex", 11, -1 },
1999    { "glColor4f", 11, _gloffset_Color4f },
2000    { "glColor4ub", 11, _gloffset_Color4ub },
2001    { "glColor4x", 11, -1 },
2002    { "glColorMask", 11, _gloffset_ColorMask },
2003    { "glColorPointer", 11, _gloffset_ColorPointer },
2004    { "glCompressedTexImage2D", 11, -1 },
2005    { "glCompressedTexSubImage2D", 11, -1 },
2006    { "glCopyTexImage2D", 11, _gloffset_CopyTexImage2D },
2007    { "glCopyTexSubImage2D", 11, _gloffset_CopyTexSubImage2D },
2008    { "glCullFace", 11, _gloffset_CullFace },
2009    { "glDeleteBuffers", 11, -1 },
2010    { "glDeleteFramebuffersOES", 11, -1 },
2011    { "glDeleteRenderbuffersOES", 11, -1 },
2012    { "glDeleteTextures", 11, _gloffset_DeleteTextures },
2013    { "glDepthFunc", 11, _gloffset_DepthFunc },
2014    { "glDepthMask", 11, _gloffset_DepthMask },
2015    { "glDepthRangef", 11, -1 },
2016    { "glDepthRangex", 11, -1 },
2017    { "glDisable", 11, _gloffset_Disable },
2018    { "glDiscardFramebufferEXT", 11, -1 },
2019    { "glDisableClientState", 11, _gloffset_DisableClientState },
2020    { "glDrawArrays", 11, _gloffset_DrawArrays },
2021    { "glDrawElements", 11, _gloffset_DrawElements },
2022    { "glDrawTexfOES", 11, -1 },
2023    { "glDrawTexfvOES", 11, -1 },
2024    { "glDrawTexiOES", 11, -1 },
2025    { "glDrawTexivOES", 11, -1 },
2026    { "glDrawTexsOES", 11, -1 },
2027    { "glDrawTexsvOES", 11, -1 },
2028    { "glDrawTexxOES", 11, -1 },
2029    { "glDrawTexxvOES", 11, -1 },
2030    { "glEGLImageTargetRenderbufferStorageOES", 11, -1 },
2031    { "glEGLImageTargetTexture2DOES", 11, -1 },
2032    { "glEnable", 11, _gloffset_Enable },
2033    { "glEnableClientState", 11, _gloffset_EnableClientState },
2034    { "glFinish", 11, _gloffset_Finish },
2035    { "glFlush", 11, _gloffset_Flush },
2036    { "glFlushMappedBufferRangeEXT", 11, -1 },
2037    { "glFogf", 11, _gloffset_Fogf },
2038    { "glFogfv", 11, _gloffset_Fogfv },
2039    { "glFogx", 11, -1 },
2040    { "glFogxv", 11, -1 },
2041    { "glFramebufferRenderbufferOES", 11, -1 },
2042    { "glFramebufferTexture2DOES", 11, -1 },
2043    { "glFrontFace", 11, _gloffset_FrontFace },
2044    { "glFrustumf", 11, -1 },
2045    { "glFrustumx", 11, -1 },
2046    { "glGenBuffers", 11, -1 },
2047    { "glGenFramebuffersOES", 11, -1 },
2048    { "glGenRenderbuffersOES", 11, -1 },
2049    { "glGenTextures", 11, _gloffset_GenTextures },
2050    { "glGenerateMipmapOES", 11, -1 },
2051    { "glGetBooleanv", 11, _gloffset_GetBooleanv },
2052    { "glGetBufferParameteriv", 11, -1 },
2053    { "glGetBufferPointervOES", 11, -1 },
2054    { "glGetClipPlanef", 11, -1 },
2055    { "glGetClipPlanex", 11, -1 },
2056    { "glGetError", 11, _gloffset_GetError },
2057    { "glGetFixedv", 11, -1 },
2058    { "glGetFloatv", 11, _gloffset_GetFloatv },
2059    { "glGetFramebufferAttachmentParameterivOES", 11, -1 },
2060    { "glGetIntegerv", 11, _gloffset_GetIntegerv },
2061    { "glGetLightfv", 11, _gloffset_GetLightfv },
2062    { "glGetLightxv", 11, -1 },
2063    { "glGetMaterialfv", 11, _gloffset_GetMaterialfv },
2064    { "glGetMaterialxv", 11, -1 },
2065    // We check for the aliased -KHR version in GLES 1.1
2066 // { "glGetPointerv", 11, _gloffset_GetPointerv },
2067    { "glGetRenderbufferParameterivOES", 11, -1 },
2068    { "glGetString", 11, _gloffset_GetString },
2069    { "glGetTexEnvfv", 11, _gloffset_GetTexEnvfv },
2070    { "glGetTexEnviv", 11, _gloffset_GetTexEnviv },
2071    { "glGetTexEnvxv", 11, -1 },
2072    { "glGetTexGenfvOES", 11, _gloffset_GetTexGenfv },
2073    { "glGetTexGenivOES", 11, _gloffset_GetTexGeniv },
2074    { "glGetTexGenxvOES", 11, -1 },
2075    { "glGetTexParameterfv", 11, _gloffset_GetTexParameterfv },
2076    { "glGetTexParameteriv", 11, _gloffset_GetTexParameteriv },
2077    { "glGetTexParameterxv", 11, -1 },
2078    { "glHint", 11, _gloffset_Hint },
2079    { "glIsBuffer", 11, -1 },
2080    { "glIsEnabled", 11, _gloffset_IsEnabled },
2081    { "glIsFramebufferOES", 11, -1 },
2082    { "glIsRenderbufferOES", 11, -1 },
2083    { "glIsTexture", 11, _gloffset_IsTexture },
2084    { "glLightModelf", 11, _gloffset_LightModelf },
2085    { "glLightModelfv", 11, _gloffset_LightModelfv },
2086    { "glLightModelx", 11, -1 },
2087    { "glLightModelxv", 11, -1 },
2088    { "glLightf", 11, _gloffset_Lightf },
2089    { "glLightfv", 11, _gloffset_Lightfv },
2090    { "glLightx", 11, -1 },
2091    { "glLightxv", 11, -1 },
2092    { "glLineWidth", 11, _gloffset_LineWidth },
2093    { "glLineWidthx", 11, -1 },
2094    { "glLoadIdentity", 11, _gloffset_LoadIdentity },
2095    { "glLoadMatrixf", 11, _gloffset_LoadMatrixf },
2096    { "glLoadMatrixx", 11, -1 },
2097    { "glLogicOp", 11, _gloffset_LogicOp },
2098    { "glMapBufferOES", 11, -1 },
2099    { "glMapBufferRangeEXT", 11, -1 },
2100    { "glMaterialf", 11, _gloffset_Materialf },
2101    { "glMaterialfv", 11, _gloffset_Materialfv },
2102    { "glMaterialx", 11, -1 },
2103    { "glMaterialxv", 11, -1 },
2104    { "glMatrixMode", 11, _gloffset_MatrixMode },
2105    { "glMultMatrixf", 11, _gloffset_MultMatrixf },
2106    { "glMultMatrixx", 11, -1 },
2107    { "glMultiDrawArraysEXT", 11, -1 },
2108    { "glMultiDrawElementsEXT", 11, -1 },
2109    { "glMultiTexCoord4f", 11, _gloffset_MultiTexCoord4fARB },
2110    { "glMultiTexCoord4x", 11, -1 },
2111    { "glNormal3f", 11, _gloffset_Normal3f },
2112    { "glNormal3x", 11, -1 },
2113    { "glNormalPointer", 11, _gloffset_NormalPointer },
2114    { "glOrthof", 11, -1 },
2115    { "glOrthox", 11, -1 },
2116    { "glPixelStorei", 11, _gloffset_PixelStorei },
2117    { "glPointParameterf", 11, -1 },
2118    { "glPointParameterfv", 11, -1 },
2119    { "glPointParameterx", 11, -1 },
2120    { "glPointParameterxv", 11, -1 },
2121    { "glPointSize", 11, _gloffset_PointSize },
2122    { "glPointSizePointerOES", 11, -1 },
2123    { "glPointSizex", 11, -1 },
2124    { "glPolygonOffset", 11, _gloffset_PolygonOffset },
2125    { "glPolygonOffsetx", 11, -1 },
2126    { "glPopMatrix", 11, _gloffset_PopMatrix },
2127    { "glPushMatrix", 11, _gloffset_PushMatrix },
2128    { "glQueryMatrixxOES", 11, -1 },
2129    { "glReadPixels", 11, _gloffset_ReadPixels },
2130    { "glRenderbufferStorageOES", 11, -1 },
2131    { "glRotatef", 11, _gloffset_Rotatef },
2132    { "glRotatex", 11, -1 },
2133    { "glSampleCoverage", 11, -1 },
2134    { "glSampleCoveragex", 11, -1 },
2135    { "glScalef", 11, _gloffset_Scalef },
2136    { "glScalex", 11, -1 },
2137    { "glScissor", 11, _gloffset_Scissor },
2138    { "glShadeModel", 11, _gloffset_ShadeModel },
2139    { "glStencilFunc", 11, _gloffset_StencilFunc },
2140    { "glStencilMask", 11, _gloffset_StencilMask },
2141    { "glStencilOp", 11, _gloffset_StencilOp },
2142    { "glTexCoordPointer", 11, _gloffset_TexCoordPointer },
2143    { "glTexEnvf", 11, _gloffset_TexEnvf },
2144    { "glTexEnvfv", 11, _gloffset_TexEnvfv },
2145    { "glTexEnvi", 11, _gloffset_TexEnvi },
2146    { "glTexEnviv", 11, _gloffset_TexEnviv },
2147    { "glTexEnvx", 11, -1 },
2148    { "glTexEnvxv", 11, -1 },
2149    { "glTexGenfOES", 11, _gloffset_TexGenf },
2150    { "glTexGenfvOES", 11, _gloffset_TexGenfv },
2151    { "glTexGeniOES", 11, _gloffset_TexGeni },
2152    { "glTexGenivOES", 11, _gloffset_TexGeniv },
2153    { "glTexGenxOES", 11, -1 },
2154    { "glTexGenxvOES", 11, -1 },
2155    { "glTexImage2D", 11, _gloffset_TexImage2D },
2156    { "glTexParameterf", 11, _gloffset_TexParameterf },
2157    { "glTexParameterfv", 11, _gloffset_TexParameterfv },
2158    { "glTexParameteri", 11, _gloffset_TexParameteri },
2159    { "glTexParameteriv", 11, _gloffset_TexParameteriv },
2160    { "glTexParameterx", 11, -1 },
2161    { "glTexParameterxv", 11, -1 },
2162    { "glTexSubImage2D", 11, _gloffset_TexSubImage2D },
2163    { "glTranslatef", 11, _gloffset_Translatef },
2164    { "glTranslatex", 11, -1 },
2165    { "glUnmapBufferOES", 11, -1 },
2166    { "glVertexPointer", 11, _gloffset_VertexPointer },
2167    { "glViewport", 11, _gloffset_Viewport },
2168 
2169    /* GL_KHR_debug */
2170    { "glPushDebugGroupKHR", 11, -1 },
2171    { "glPopDebugGroupKHR", 11, -1 },
2172    { "glDebugMessageCallbackKHR", 11, -1 },
2173    { "glDebugMessageControlKHR", 11, -1 },
2174    { "glDebugMessageInsertKHR", 11, -1 },
2175    { "glGetDebugMessageLogKHR", 11, -1 },
2176    { "glGetObjectLabelKHR", 11, -1 },
2177    { "glGetObjectPtrLabelKHR", 11, -1 },
2178    { "glGetPointervKHR", 11, _gloffset_GetPointerv },
2179    { "glObjectLabelKHR", 11, -1 },
2180    { "glObjectPtrLabelKHR", 11, -1 },
2181 
2182    /* GL_EXT_polygon_offset_clamp */
2183    { "glPolygonOffsetClampEXT", 11, -1 },
2184 
2185    { NULL, 0, -1 }
2186 };
2187 
2188 const struct function gles2_functions_possible[] = {
2189    { "glActiveTexture", 20, _gloffset_ActiveTexture },
2190    { "glAttachShader", 20, -1 },
2191    { "glBindAttribLocation", 20, -1 },
2192    { "glBindBuffer", 20, -1 },
2193    { "glBindFramebuffer", 20, -1 },
2194    { "glBindRenderbuffer", 20, -1 },
2195    { "glBindTexture", 20, _gloffset_BindTexture },
2196    { "glBindVertexArrayOES", 20, -1 },
2197    { "glBlendColor", 20, _gloffset_BlendColor },
2198    { "glBlendEquation", 20, _gloffset_BlendEquation },
2199    { "glBlendEquationSeparate", 20, -1 },
2200    { "glBlendFunc", 20, _gloffset_BlendFunc },
2201    { "glBlendFuncSeparate", 20, -1 },
2202    { "glBufferData", 20, -1 },
2203    { "glBufferSubData", 20, -1 },
2204    { "glCheckFramebufferStatus", 20, -1 },
2205    { "glClear", 20, _gloffset_Clear },
2206    { "glClearColor", 20, _gloffset_ClearColor },
2207    { "glClearDepthf", 20, -1 },
2208    { "glClearStencil", 20, _gloffset_ClearStencil },
2209    { "glColorMask", 20, _gloffset_ColorMask },
2210    { "glCompileShader", 20, -1 },
2211    { "glCompressedTexImage2D", 20, -1 },
2212    { "glCompressedTexImage3DOES", 20, -1 },
2213    { "glCompressedTexSubImage2D", 20, -1 },
2214    { "glCompressedTexSubImage3DOES", 20, -1 },
2215    { "glCopyTexImage2D", 20, _gloffset_CopyTexImage2D },
2216    { "glCopyTexSubImage2D", 20, _gloffset_CopyTexSubImage2D },
2217    { "glCopyTexSubImage3DOES", 20, _gloffset_CopyTexSubImage3D },
2218    { "glCreateProgram", 20, -1 },
2219    { "glCreateShader", 20, -1 },
2220    { "glCullFace", 20, _gloffset_CullFace },
2221    { "glDeleteBuffers", 20, -1 },
2222    { "glDeleteFramebuffers", 20, -1 },
2223    { "glDeleteProgram", 20, -1 },
2224    { "glDeleteRenderbuffers", 20, -1 },
2225    { "glDeleteShader", 20, -1 },
2226    { "glDeleteTextures", 20, _gloffset_DeleteTextures },
2227    { "glDeleteVertexArraysOES", 20, -1 },
2228    { "glDepthFunc", 20, _gloffset_DepthFunc },
2229    { "glDepthMask", 20, _gloffset_DepthMask },
2230    { "glDepthRangef", 20, -1 },
2231    { "glDetachShader", 20, -1 },
2232    { "glDisable", 20, _gloffset_Disable },
2233    { "glDiscardFramebufferEXT", 20, -1 },
2234    { "glDisableVertexAttribArray", 20, -1 },
2235    { "glDrawArrays", 20, _gloffset_DrawArrays },
2236    { "glDrawBuffersNV", 20, -1 },
2237    { "glDrawElements", 20, _gloffset_DrawElements },
2238    { "glEGLImageTargetRenderbufferStorageOES", 20, -1 },
2239    { "glEGLImageTargetTexture2DOES", 20, -1 },
2240    { "glEnable", 20, _gloffset_Enable },
2241    { "glEnableVertexAttribArray", 20, -1 },
2242    { "glFinish", 20, _gloffset_Finish },
2243    { "glFlush", 20, _gloffset_Flush },
2244    { "glFlushMappedBufferRangeEXT", 20, -1 },
2245    { "glFramebufferRenderbuffer", 20, -1 },
2246    { "glFramebufferTexture2D", 20, -1 },
2247    { "glFramebufferTexture3DOES", 20, -1 },
2248    { "glFrontFace", 20, _gloffset_FrontFace },
2249    { "glGenBuffers", 20, -1 },
2250    { "glGenFramebuffers", 20, -1 },
2251    { "glGenRenderbuffers", 20, -1 },
2252    { "glGenTextures", 20, _gloffset_GenTextures },
2253    { "glGenVertexArraysOES", 20, -1 },
2254    { "glGenerateMipmap", 20, -1 },
2255    { "glGetActiveAttrib", 20, -1 },
2256    { "glGetActiveUniform", 20, -1 },
2257    { "glGetAttachedShaders", 20, -1 },
2258    { "glGetAttribLocation", 20, -1 },
2259    { "glGetBooleanv", 20, _gloffset_GetBooleanv },
2260    { "glGetBufferParameteriv", 20, -1 },
2261    { "glGetBufferPointervOES", 20, -1 },
2262    { "glGetError", 20, _gloffset_GetError },
2263    { "glGetFloatv", 20, _gloffset_GetFloatv },
2264    { "glGetFramebufferAttachmentParameteriv", 20, -1 },
2265    { "glGetIntegerv", 20, _gloffset_GetIntegerv },
2266    { "glGetProgramInfoLog", 20, -1 },
2267    { "glGetProgramiv", 20, -1 },
2268    { "glGetRenderbufferParameteriv", 20, -1 },
2269    { "glGetShaderInfoLog", 20, -1 },
2270    { "glGetShaderPrecisionFormat", 20, -1 },
2271    { "glGetShaderSource", 20, -1 },
2272    { "glGetShaderiv", 20, -1 },
2273    { "glGetString", 20, _gloffset_GetString },
2274    { "glGetTexParameterfv", 20, _gloffset_GetTexParameterfv },
2275    { "glGetTexParameteriv", 20, _gloffset_GetTexParameteriv },
2276    { "glGetUniformLocation", 20, -1 },
2277    { "glGetUniformfv", 20, -1 },
2278    { "glGetUniformiv", 20, -1 },
2279    { "glGetVertexAttribPointerv", 20, -1 },
2280    { "glGetVertexAttribfv", 20, -1 },
2281    { "glGetVertexAttribiv", 20, -1 },
2282    { "glHint", 20, _gloffset_Hint },
2283    { "glIsBuffer", 20, -1 },
2284    { "glIsEnabled", 20, _gloffset_IsEnabled },
2285    { "glIsFramebuffer", 20, -1 },
2286    { "glIsProgram", 20, -1 },
2287    { "glIsRenderbuffer", 20, -1 },
2288    { "glIsShader", 20, -1 },
2289    { "glIsTexture", 20, _gloffset_IsTexture },
2290    { "glIsVertexArrayOES", 20, -1 },
2291    { "glLineWidth", 20, _gloffset_LineWidth },
2292    { "glLinkProgram", 20, -1 },
2293    { "glMapBufferOES", 20, -1 },
2294    { "glMapBufferRangeEXT", 20, -1 },
2295    { "glMultiDrawArraysEXT", 20, -1 },
2296    { "glMultiDrawElementsEXT", 20, -1 },
2297    { "glPixelStorei", 20, _gloffset_PixelStorei },
2298    { "glPolygonOffset", 20, _gloffset_PolygonOffset },
2299    { "glReadBufferNV", 20, _gloffset_ReadBuffer },
2300    { "glReadPixels", 20, _gloffset_ReadPixels },
2301    { "glReleaseShaderCompiler", 20, -1 },
2302    { "glRenderbufferStorage", 20, -1 },
2303    { "glSampleCoverage", 20, -1 },
2304    { "glScissor", 20, _gloffset_Scissor },
2305    { "glShaderBinary", 20, -1 },
2306    { "glShaderSource", 20, -1 },
2307    { "glStencilFunc", 20, _gloffset_StencilFunc },
2308    { "glStencilFuncSeparate", 20, -1 },
2309    { "glStencilMask", 20, _gloffset_StencilMask },
2310    { "glStencilMaskSeparate", 20, -1 },
2311    { "glStencilOp", 20, _gloffset_StencilOp },
2312    { "glStencilOpSeparate", 20, -1 },
2313    { "glTexImage2D", 20, _gloffset_TexImage2D },
2314    { "glTexImage3DOES", 20, _gloffset_TexImage3D },
2315    { "glTexParameterf", 20, _gloffset_TexParameterf },
2316    { "glTexParameterfv", 20, _gloffset_TexParameterfv },
2317    { "glTexParameteri", 20, _gloffset_TexParameteri },
2318    { "glTexParameteriv", 20, _gloffset_TexParameteriv },
2319    { "glTexSubImage2D", 20, _gloffset_TexSubImage2D },
2320    { "glTexSubImage3DOES", 20, _gloffset_TexSubImage3D },
2321    { "glUniform1f", 20, -1 },
2322    { "glUniform1fv", 20, -1 },
2323    { "glUniform1i", 20, -1 },
2324    { "glUniform1iv", 20, -1 },
2325    { "glUniform2f", 20, -1 },
2326    { "glUniform2fv", 20, -1 },
2327    { "glUniform2i", 20, -1 },
2328    { "glUniform2iv", 20, -1 },
2329    { "glUniform3f", 20, -1 },
2330    { "glUniform3fv", 20, -1 },
2331    { "glUniform3i", 20, -1 },
2332    { "glUniform3iv", 20, -1 },
2333    { "glUniform4f", 20, -1 },
2334    { "glUniform4fv", 20, -1 },
2335    { "glUniform4i", 20, -1 },
2336    { "glUniform4iv", 20, -1 },
2337    { "glUniformMatrix2fv", 20, -1 },
2338    { "glUniformMatrix3fv", 20, -1 },
2339    { "glUniformMatrix4fv", 20, -1 },
2340    { "glUnmapBufferOES", 20, -1 },
2341    { "glUseProgram", 20, -1 },
2342    { "glValidateProgram", 20, -1 },
2343    { "glVertexAttrib1f", 20, -1 },
2344    { "glVertexAttrib1fv", 20, -1 },
2345    { "glVertexAttrib2f", 20, -1 },
2346    { "glVertexAttrib2fv", 20, -1 },
2347    { "glVertexAttrib3f", 20, -1 },
2348    { "glVertexAttrib3fv", 20, -1 },
2349    { "glVertexAttrib4f", 20, -1 },
2350    { "glVertexAttrib4fv", 20, -1 },
2351    { "glVertexAttribPointer", 20, -1 },
2352    { "glViewport", 20, _gloffset_Viewport },
2353 
2354    /* GL_OES_get_program_binary - Also part of OpenGL ES 3.0. */
2355    { "glGetProgramBinaryOES", 20, -1 },
2356    { "glProgramBinaryOES", 20, -1 },
2357 
2358    /* GL_EXT_separate_shader_objects - Also part of OpenGL ES 3.1. */
2359    { "glProgramParameteriEXT", 20, -1 },
2360    { "glUseProgramStagesEXT", 20, -1 },
2361    { "glActiveShaderProgramEXT", 20, -1 },
2362    { "glCreateShaderProgramvEXT", 20, -1 },
2363    { "glBindProgramPipelineEXT", 20, -1 },
2364    { "glDeleteProgramPipelinesEXT", 20, -1 },
2365    { "glGenProgramPipelinesEXT", 20, -1 },
2366    { "glIsProgramPipelineEXT", 20, -1 },
2367    { "glGetProgramPipelineivEXT", 20, -1 },
2368    { "glProgramUniform1iEXT", 20, -1 },
2369    { "glProgramUniform1ivEXT", 20, -1 },
2370    { "glProgramUniform1fEXT", 20, -1 },
2371    { "glProgramUniform1fvEXT", 20, -1 },
2372    { "glProgramUniform2iEXT", 20, -1 },
2373    { "glProgramUniform2ivEXT", 20, -1 },
2374    { "glProgramUniform2fEXT", 20, -1 },
2375    { "glProgramUniform2fvEXT", 20, -1 },
2376    { "glProgramUniform3iEXT", 20, -1 },
2377    { "glProgramUniform3ivEXT", 20, -1 },
2378    { "glProgramUniform3fEXT", 20, -1 },
2379    { "glProgramUniform3fvEXT", 20, -1 },
2380    { "glProgramUniform4iEXT", 20, -1 },
2381    { "glProgramUniform4ivEXT", 20, -1 },
2382    { "glProgramUniform4fEXT", 20, -1 },
2383    { "glProgramUniform4fvEXT", 20, -1 },
2384    { "glProgramUniformMatrix2fvEXT", 20, -1 },
2385    { "glProgramUniformMatrix3fvEXT", 20, -1 },
2386    { "glProgramUniformMatrix4fvEXT", 20, -1 },
2387    { "glProgramUniformMatrix2x3fvEXT", 20, -1 },
2388    { "glProgramUniformMatrix3x2fvEXT", 20, -1 },
2389    { "glProgramUniformMatrix2x4fvEXT", 20, -1 },
2390    { "glProgramUniformMatrix4x2fvEXT", 20, -1 },
2391    { "glProgramUniformMatrix3x4fvEXT", 20, -1 },
2392    { "glProgramUniformMatrix4x3fvEXT", 20, -1 },
2393    { "glValidateProgramPipelineEXT", 20, -1 },
2394    { "glGetProgramPipelineInfoLogEXT", 20, -1 },
2395 
2396    /* GL_INTEL_performance_query */
2397    { "glGetFirstPerfQueryIdINTEL", 20, -1 },
2398    { "glGetNextPerfQueryIdINTEL", 20, -1 },
2399    { "glGetPerfQueryIdByNameINTEL", 20, -1 },
2400    { "glGetPerfQueryInfoINTEL", 20, -1 },
2401    { "glGetPerfCounterInfoINTEL", 20, -1 },
2402    { "glCreatePerfQueryINTEL", 20, -1 },
2403    { "glDeletePerfQueryINTEL", 20, -1 },
2404    { "glBeginPerfQueryINTEL", 20, -1 },
2405    { "glEndPerfQueryINTEL", 20, -1 },
2406    { "glGetPerfQueryDataINTEL", 20, -1 },
2407 
2408    /* GL_KHR_debug */
2409    { "glPushDebugGroupKHR", 20, -1 },
2410    { "glPopDebugGroupKHR", 20, -1 },
2411    { "glDebugMessageCallbackKHR", 20, -1 },
2412    { "glDebugMessageControlKHR", 20, -1 },
2413    { "glDebugMessageInsertKHR", 20, -1 },
2414    { "glGetDebugMessageLogKHR", 20, -1 },
2415    { "glGetObjectLabelKHR", 20, -1 },
2416    { "glGetObjectPtrLabelKHR", 20, -1 },
2417    { "glGetPointervKHR", 20, -1 },
2418    { "glObjectLabelKHR", 20, -1 },
2419    { "glObjectPtrLabelKHR", 20, -1 },
2420 
2421    /* GL_EXT_polygon_offset_clamp */
2422    { "glPolygonOffsetClampEXT", 11, -1 },
2423 
2424    /* GL_KHR_robustness */
2425    { "glGetGraphicsResetStatusKHR", 20, -1 },
2426    { "glReadnPixelsKHR", 20, -1 },
2427    { "glGetnUniformfvKHR", 20, -1 },
2428    { "glGetnUniformivKHR", 20, -1 },
2429    { "glGetnUniformuivKHR", 20, -1 },
2430 
2431    /* GL_KHR_blend_equation_advanced */
2432    { "glBlendBarrierKHR", 20, -1 },
2433 
2434    /* GL_EXT_occlusion_query_boolean */
2435    { "glGenQueriesEXT", 20, -1 },
2436    { "glDeleteQueriesEXT", 20, -1 },
2437    { "glIsQueryEXT", 20, -1 },
2438    { "glBeginQueryEXT", 20, -1 },
2439    { "glEndQueryEXT", 20, -1 },
2440    { "glGetQueryivEXT", 20, -1 },
2441    { "glGetQueryObjectivEXT", 20, -1 },
2442    { "glGetQueryObjectuivEXT", 20, -1 },
2443 
2444    /* GL_EXT_disjoint_timer_query */
2445    { "glGetQueryObjecti64vEXT", 20, -1 },
2446    { "glGetQueryObjectui64vEXT", 20, -1 },
2447    { "glQueryCounterEXT", 20, -1 },
2448 
2449    { NULL, 0, -1 }
2450 };
2451 
2452 const struct function gles3_functions_possible[] = {
2453    // We check for the aliased -EXT version in GLES 2
2454    // { "glBeginQuery", 30, -1 },
2455    { "glBeginTransformFeedback", 30, -1 },
2456    { "glBindBufferBase", 30, -1 },
2457    { "glBindBufferRange", 30, -1 },
2458    { "glBindSampler", 30, -1 },
2459    { "glBindTransformFeedback", 30, -1 },
2460    // We check for the aliased -OES version in GLES 2
2461    // { "glBindVertexArray", 30, -1 },
2462    { "glBlitFramebuffer", 30, -1 },
2463    { "glClearBufferfi", 30, -1 },
2464    { "glClearBufferfv", 30, -1 },
2465    { "glClearBufferiv", 30, -1 },
2466    { "glClearBufferuiv", 30, -1 },
2467    { "glClientWaitSync", 30, -1 },
2468    // We check for the aliased -OES version in GLES 2
2469    // { "glCompressedTexImage3D", 30, -1 },
2470    // We check for the aliased -OES version in GLES 2
2471    // { "glCompressedTexSubImage3D", 30, -1 },
2472    { "glCopyBufferSubData", 30, -1 },
2473    // We check for the aliased -OES version in GLES 2
2474    // { "glCopyTexSubImage3D", 30, -1 },
2475    // We check for the aliased -EXT version in GLES 2
2476    // { "glDeleteQueries", 30, -1 },
2477    { "glDeleteSamplers", 30, -1 },
2478    { "glDeleteSync", 30, -1 },
2479    { "glDeleteTransformFeedbacks", 30, -1 },
2480    // We check for the aliased -OES version in GLES 2
2481    // { "glDeleteVertexArrays", 30, -1 },
2482    { "glDrawArraysInstanced", 30, -1 },
2483    // We check for the aliased -NV version in GLES 2
2484    // { "glDrawBuffers", 30, -1 },
2485    { "glDrawElementsInstanced", 30, -1 },
2486    { "glDrawRangeElements", 30, -1 },
2487    // We check for the aliased -EXT version in GLES 2
2488    // { "glEndQuery", 30, -1 },
2489    { "glEndTransformFeedback", 30, -1 },
2490    { "glFenceSync", 30, -1 },
2491    // We check for the aliased -EXT version in GLES 2
2492    // { "glFlushMappedBufferRange", 30, -1 },
2493    { "glFramebufferTextureLayer", 30, -1 },
2494    // We check for the aliased -EXT version in GLES 2
2495    // { "glGenQueries", 30, -1 },
2496    { "glGenSamplers", 30, -1 },
2497    { "glGenTransformFeedbacks", 30, -1 },
2498    // We check for the aliased -OES version in GLES 2
2499    // { "glGenVertexArrays", 30, -1 },
2500    { "glGetActiveUniformBlockiv", 30, -1 },
2501    { "glGetActiveUniformBlockName", 30, -1 },
2502    { "glGetActiveUniformsiv", 30, -1 },
2503    { "glGetBufferParameteri64v", 30, -1 },
2504    // We check for the aliased -OES version in GLES 2
2505    // { "glGetBufferPointerv", 30, -1 },
2506    { "glGetFragDataLocation", 30, -1 },
2507    { "glGetInteger64i_v", 30, -1 },
2508    { "glGetInteger64v", 30, -1 },
2509    { "glGetIntegeri_v", 30, -1 },
2510    { "glGetInternalformativ", 30, -1 },
2511    { "glGetInternalformati64v", 30, -1 },
2512    // glGetProgramBinary aliases glGetProgramBinaryOES in GLES 2
2513    // We check for the aliased -EXT version in GLES 2
2514    // { "glGetQueryiv", 30, -1 },
2515    // We check for the aliased -EXT version in GLES 2
2516    // { "glGetQueryObjectuiv", 30, -1 },
2517    { "glGetSamplerParameterfv", 30, -1 },
2518    { "glGetSamplerParameteriv", 30, -1 },
2519    { "glGetStringi", 30, -1 },
2520    { "glGetSynciv", 30, -1 },
2521    { "glGetTransformFeedbackVarying", 30, -1 },
2522    { "glGetUniformBlockIndex", 30, -1 },
2523    { "glGetUniformIndices", 30, -1 },
2524    { "glGetUniformuiv", 30, -1 },
2525    { "glGetVertexAttribIiv", 30, -1 },
2526    { "glGetVertexAttribIuiv", 30, -1 },
2527    { "glInvalidateFramebuffer", 30, -1 },
2528    { "glInvalidateSubFramebuffer", 30, -1 },
2529    // We check for the aliased -EXT version in GLES 2
2530    // { "glIsQuery", 30, -1 },
2531    { "glIsSampler", 30, -1 },
2532    { "glIsSync", 30, -1 },
2533    { "glIsTransformFeedback", 30, -1 },
2534    // We check for the aliased -OES version in GLES 2
2535    // { "glIsVertexArray", 30, -1 },
2536    // We check for the aliased -EXT version in GLES 2
2537    // { "glMapBufferRange", 30, -1 },
2538    { "glPauseTransformFeedback", 30, -1 },
2539    // glProgramBinary aliases glProgramBinaryOES in GLES 2
2540    // glProgramParameteri aliases glProgramParameteriEXT in GLES 2
2541    // We check for the aliased -NV version in GLES 2
2542    // { "glReadBuffer", 30, -1 },
2543    { "glRenderbufferStorageMultisample", 30, -1 },
2544    { "glResumeTransformFeedback", 30, -1 },
2545    { "glSamplerParameterf", 30, -1 },
2546    { "glSamplerParameterfv", 30, -1 },
2547    { "glSamplerParameteri", 30, -1 },
2548    { "glSamplerParameteriv", 30, -1 },
2549    // We check for the aliased -OES version in GLES 2
2550    // { "glTexImage3D", 30, -1 },
2551    { "glTexStorage2D", 30, -1 },
2552    { "glTexStorage3D", 30, -1 },
2553    // We check for the aliased -OES version in GLES 2
2554    // { "glTexSubImage3D", 30, -1 },
2555    { "glTransformFeedbackVaryings", 30, -1 },
2556    { "glUniform1ui", 30, -1 },
2557    { "glUniform1uiv", 30, -1 },
2558    { "glUniform2ui", 30, -1 },
2559    { "glUniform2uiv", 30, -1 },
2560    { "glUniform3ui", 30, -1 },
2561    { "glUniform3uiv", 30, -1 },
2562    { "glUniform4ui", 30, -1 },
2563    { "glUniform4uiv", 30, -1 },
2564    { "glUniformBlockBinding", 30, -1 },
2565    { "glUniformMatrix2x3fv", 30, -1 },
2566    { "glUniformMatrix2x4fv", 30, -1 },
2567    { "glUniformMatrix3x2fv", 30, -1 },
2568    { "glUniformMatrix3x4fv", 30, -1 },
2569    { "glUniformMatrix4x2fv", 30, -1 },
2570    { "glUniformMatrix4x3fv", 30, -1 },
2571    // We check for the aliased -OES version in GLES 2
2572    // { "glUnmapBuffer", 30, -1 },
2573    { "glVertexAttribDivisor", 30, -1 },
2574    { "glVertexAttribI4i", 30, -1 },
2575    { "glVertexAttribI4iv", 30, -1 },
2576    { "glVertexAttribI4ui", 30, -1 },
2577    { "glVertexAttribI4uiv", 30, -1 },
2578    { "glVertexAttribIPointer", 30, -1 },
2579    { "glWaitSync", 30, -1 },
2580 
2581    /* GL_EXT_separate_shader_objects - Also part of OpenGL ES 3.1. */
2582    { "glProgramUniform1uiEXT", 30, -1 },
2583    { "glProgramUniform1uivEXT", 30, -1 },
2584    { "glProgramUniform2uiEXT", 30, -1 },
2585    { "glProgramUniform2uivEXT", 30, -1 },
2586    { "glProgramUniform3uiEXT", 30, -1 },
2587    { "glProgramUniform3uivEXT", 30, -1 },
2588    { "glProgramUniform4uiEXT", 30, -1 },
2589    { "glProgramUniform4uivEXT", 30, -1 },
2590 
2591    /* GL_EXT_blend_func_extended */
2592    { "glBindFragDataLocationIndexedEXT", 30, -1 },
2593    { "glGetFragDataIndexEXT", 30, -1 },
2594    { "glBindFragDataLocationEXT", 30, -1 },
2595 
2596    /* GL_OES_texture_border_clamp */
2597    { "glTexParameterIivOES", 30, -1 },
2598    { "glTexParameterIuivOES", 30, -1 },
2599    { "glGetTexParameterIivOES", 30, -1 },
2600    { "glGetTexParameterIuivOES", 30, -1 },
2601    { "glSamplerParameterIivOES", 30, -1 },
2602    { "glSamplerParameterIuivOES", 30, -1 },
2603    { "glGetSamplerParameterIivOES", 30, -1 },
2604    { "glGetSamplerParameterIuivOES", 30, -1 },
2605 
2606    /* GL_OES_texture_buffer */
2607    { "glTexBufferOES", 31, -1 },
2608    { "glTexBufferRangeOES", 31, -1 },
2609 
2610    /* GL_OES_sample_shading */
2611    { "glMinSampleShadingOES", 30, -1 },
2612 
2613    /* GL_OES_copy_image */
2614    { "glCopyImageSubDataOES", 30, -1 },
2615 
2616    /* GL_OES_draw_buffers_indexed */
2617    { "glBlendFunciOES", 30, -1 },
2618    { "glBlendFuncSeparateiOES", 30, -1 },
2619    { "glBlendEquationiOES", 30, -1 },
2620    { "glBlendEquationSeparateiOES", 30, -1 },
2621    { "glColorMaskiOES", 30, -1 },
2622    { "glEnableiOES", 30, -1 },
2623    { "glDisableiOES", 30, -1 },
2624    { "glIsEnablediOES", 30, -1 },
2625 
2626    /* GL_EXT_base_instance */
2627    { "glDrawArraysInstancedBaseInstanceEXT", 30, -1 },
2628    { "glDrawElementsInstancedBaseInstanceEXT", 30, -1 },
2629    { "glDrawElementsInstancedBaseVertexBaseInstanceEXT", 30, -1 },
2630 
2631    /* GL_EXT_window_rectangles */
2632    { "glWindowRectanglesEXT", 30, -1 },
2633 
2634    { NULL, 0, -1 }
2635 };
2636 
2637 const struct function gles31_functions_possible[] = {
2638    { "glDispatchCompute", 31, -1 },
2639    { "glDispatchComputeIndirect", 31, -1 },
2640    { "glDrawArraysIndirect", 31, -1 },
2641    { "glDrawElementsIndirect", 31, -1 },
2642 
2643    { "glFramebufferParameteri", 31, -1 },
2644    { "glGetFramebufferParameteriv", 31, -1 },
2645 
2646    { "glGetProgramInterfaceiv", 31, -1 },
2647    { "glGetProgramResourceIndex", 31, -1 },
2648    { "glGetProgramResourceName", 31, -1 },
2649    { "glGetProgramResourceiv", 31, -1 },
2650    { "glGetProgramResourceLocation", 31, -1 },
2651 
2652    // We check for the aliased EXT versions in GLES 2
2653    // { "glUseProgramStages", 31, -1 },
2654    // { "glActiveShaderProgram", 31, -1 },
2655    // { "glCreateShaderProgramv", 31, -1 },
2656    // { "glBindProgramPipeline", 31, -1 },
2657    // { "glDeleteProgramPipelines", 31, -1 },
2658    // { "glGenProgramPipelines", 31, -1 },
2659    // { "glIsProgramPipeline", 31, -1 },
2660    // { "glGetProgramPipelineiv", 31, -1 },
2661    // { "glProgramUniform1i", 31, -1 },
2662    // { "glProgramUniform2i", 31, -1 },
2663    // { "glProgramUniform3i", 31, -1 },
2664    // { "glProgramUniform4i", 31, -1 },
2665    // { "glProgramUniform1f", 31, -1 },
2666    // { "glProgramUniform2f", 31, -1 },
2667    // { "glProgramUniform3f", 31, -1 },
2668    // { "glProgramUniform4f", 31, -1 },
2669    // { "glProgramUniform1iv", 31, -1 },
2670    // { "glProgramUniform2iv", 31, -1 },
2671    // { "glProgramUniform3iv", 31, -1 },
2672    // { "glProgramUniform4iv", 31, -1 },
2673    // { "glProgramUniform1fv", 31, -1 },
2674    // { "glProgramUniform2fv", 31, -1 },
2675    // { "glProgramUniform3fv", 31, -1 },
2676    // { "glProgramUniform4fv", 31, -1 },
2677    // { "glProgramUniformMatrix2fv", 31, -1 },
2678    // { "glProgramUniformMatrix3fv", 31, -1 },
2679    // { "glProgramUniformMatrix4fv", 31, -1 },
2680    // { "glProgramUniformMatrix2x3fv", 31, -1 },
2681    // { "glProgramUniformMatrix3x2fv", 31, -1 },
2682    // { "glProgramUniformMatrix2x4fv", 31, -1 },
2683    // { "glProgramUniformMatrix4x2fv", 31, -1 },
2684    // { "glProgramUniformMatrix3x4fv", 31, -1 },
2685    // { "glProgramUniformMatrix4x3fv", 31, -1 },
2686    // { "glValidateProgramPipeline", 31, -1 },
2687    // { "glGetProgramPipelineInfoLog", 31, -1 },
2688 
2689    // We check for the aliased EXT versions in GLES 3
2690    // { "glProgramUniform1ui", 31, -1 },
2691    // { "glProgramUniform2ui", 31, -1 },
2692    // { "glProgramUniform3ui", 31, -1 },
2693    // { "glProgramUniform4ui", 31, -1 },
2694    // { "glProgramUniform1uiv", 31, -1 },
2695    // { "glProgramUniform2uiv", 31, -1 },
2696    // { "glProgramUniform3uiv", 31, -1 },
2697    // { "glProgramUniform4uiv", 31, -1 },
2698 
2699    { "glBindImageTexture", 31, -1 },
2700    { "glGetBooleani_v", 31, -1 },
2701    { "glMemoryBarrier", 31, -1 },
2702 
2703    { "glMemoryBarrierByRegion", 31, -1 },
2704 
2705    { "glTexStorage2DMultisample", 31, -1 },
2706    { "glGetMultisamplefv", 31, -1 },
2707    { "glSampleMaski", 31, -1 },
2708    { "glGetTexLevelParameteriv", 31, -1 },
2709    { "glGetTexLevelParameterfv", 31, -1 },
2710    { "glBindVertexBuffer", 31, -1 },
2711    { "glVertexAttribFormat", 31, -1 },
2712    { "glVertexAttribIFormat", 31, -1 },
2713    { "glVertexAttribBinding", 31, -1 },
2714    { "glVertexBindingDivisor", 31, -1 },
2715 
2716    /* GL_OES_texture_storage_multisample_2d_array */
2717    { "glTexStorage3DMultisampleOES", 31, -1 },
2718 
2719    /* GL_EXT_buffer_storage */
2720    { "glBufferStorageEXT", 31, -1 },
2721 
2722    /* GL_EXT_blend_func_extended */
2723    { "glGetProgramResourceLocationIndexEXT", 31, -1 },
2724 
2725    /* GL_OES_geometry_shader */
2726    { "glFramebufferTextureOES", 31, -1},
2727 
2728    /* GL_EXT_geometry_shader */
2729    // We check for the aliased OES version above
2730    // { "glFramebufferTextureEXT", 31, -1},
2731 
2732    /* GL_OES_tessellation_shader */
2733    { "glPatchParameteriOES", 31, -1 },
2734 
2735    /* GL_OES_primitive_bound_box */
2736    { "glPrimitiveBoundingBoxOES", 31, -1 },
2737 
2738    /* GL_OES_viewport_array */
2739    { "glViewportArrayvOES", 31, -1 },
2740    { "glViewportIndexedfOES", 31, -1 },
2741    { "glViewportIndexedfvOES", 31, -1 },
2742    { "glScissorArrayvOES", 31, -1 },
2743    { "glScissorIndexedOES", 31, -1 },
2744    { "glScissorIndexedvOES", 31, -1 },
2745    { "glDepthRangeArrayfvOES", 31, -1 },
2746    { "glDepthRangeIndexedfOES", 31, -1 },
2747    { "glGetFloati_vOES", 31, -1 },
2748 
2749    { NULL, 0, -1 },
2750  };
2751