1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2017 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_gles_3_1_autogen.cpp:
9 //   Defines the GLES 3.1 entry points.
10 
11 #include "libANGLE/Context.h"
12 #include "libANGLE/validationES31.h"
13 #include "libGLESv2/global_state.h"
14 
15 namespace gl
16 {
DispatchCompute(GLuint num_groups_x,GLuint num_groups_y,GLuint num_groups_z)17 void GL_APIENTRY DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
18 {
19     EVENT("(GLuint num_groups_x = %u, GLuint num_groups_y = %u, GLuint num_groups_z = %u)",
20           num_groups_x, num_groups_y, num_groups_z);
21 
22     Context *context = GetValidGlobalContext();
23     if (context)
24     {
25         context->gatherParams<EntryPoint::DispatchCompute>(num_groups_x, num_groups_y,
26                                                            num_groups_z);
27 
28         if (context->skipValidation() ||
29             ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z))
30         {
31             context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z);
32         }
33     }
34 }
35 
DispatchComputeIndirect(GLintptr indirect)36 void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect)
37 {
38     EVENT("(GLintptr indirect = %d)", indirect);
39 
40     Context *context = GetValidGlobalContext();
41     if (context)
42     {
43         context->gatherParams<EntryPoint::DispatchComputeIndirect>(indirect);
44 
45         if (context->skipValidation() || ValidateDispatchComputeIndirect(context, indirect))
46         {
47             context->dispatchComputeIndirect(indirect);
48         }
49     }
50 }
51 
DrawArraysIndirect(GLenum mode,const void * indirect)52 void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect)
53 {
54     EVENT("(GLenum mode = 0x%X, const void *indirect = 0x%0.8p)", mode, indirect);
55 
56     Context *context = GetValidGlobalContext();
57     if (context)
58     {
59         context->gatherParams<EntryPoint::DrawArraysIndirect>(mode, indirect);
60 
61         if (context->skipValidation() || ValidateDrawArraysIndirect(context, mode, indirect))
62         {
63             context->drawArraysIndirect(mode, indirect);
64         }
65     }
66 }
67 
DrawElementsIndirect(GLenum mode,GLenum type,const void * indirect)68 void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
69 {
70     EVENT("(GLenum mode = 0x%X, GLenum type = 0x%X, const void *indirect = 0x%0.8p)", mode, type,
71           indirect);
72 
73     Context *context = GetValidGlobalContext();
74     if (context)
75     {
76         context->gatherParams<EntryPoint::DrawElementsIndirect>(mode, type, indirect);
77 
78         if (context->skipValidation() ||
79             ValidateDrawElementsIndirect(context, mode, type, indirect))
80         {
81             context->drawElementsIndirect(mode, type, indirect);
82         }
83     }
84 }
85 
FramebufferParameteri(GLenum target,GLenum pname,GLint param)86 void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param)
87 {
88     EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint param = %d)", target, pname, param);
89 
90     Context *context = GetValidGlobalContext();
91     if (context)
92     {
93         context->gatherParams<EntryPoint::FramebufferParameteri>(target, pname, param);
94 
95         if (context->skipValidation() ||
96             ValidateFramebufferParameteri(context, target, pname, param))
97         {
98             context->framebufferParameteri(target, pname, param);
99         }
100     }
101 }
102 
GetFramebufferParameteriv(GLenum target,GLenum pname,GLint * params)103 void GL_APIENTRY GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
104 {
105     EVENT("(GLenum target = 0x%X, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", target, pname,
106           params);
107 
108     Context *context = GetValidGlobalContext();
109     if (context)
110     {
111         context->gatherParams<EntryPoint::GetFramebufferParameteriv>(target, pname, params);
112 
113         if (context->skipValidation() ||
114             ValidateGetFramebufferParameteriv(context, target, pname, params))
115         {
116             context->getFramebufferParameteriv(target, pname, params);
117         }
118     }
119 }
120 
GetProgramInterfaceiv(GLuint program,GLenum programInterface,GLenum pname,GLint * params)121 void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
122                                        GLenum programInterface,
123                                        GLenum pname,
124                                        GLint *params)
125 {
126     EVENT(
127         "(GLuint program = %u, GLenum programInterface = 0x%X, GLenum pname = 0x%X, GLint *params "
128         "= 0x%0.8p)",
129         program, programInterface, pname, params);
130 
131     Context *context = GetValidGlobalContext();
132     if (context)
133     {
134         context->gatherParams<EntryPoint::GetProgramInterfaceiv>(program, programInterface, pname,
135                                                                  params);
136 
137         if (context->skipValidation() ||
138             ValidateGetProgramInterfaceiv(context, program, programInterface, pname, params))
139         {
140             context->getProgramInterfaceiv(program, programInterface, pname, params);
141         }
142     }
143 }
144 
GetProgramResourceIndex(GLuint program,GLenum programInterface,const GLchar * name)145 GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program,
146                                            GLenum programInterface,
147                                            const GLchar *name)
148 {
149     EVENT("(GLuint program = %u, GLenum programInterface = 0x%X, const GLchar *name = 0x%0.8p)",
150           program, programInterface, name);
151 
152     Context *context = GetValidGlobalContext();
153     if (context)
154     {
155         context->gatherParams<EntryPoint::GetProgramResourceIndex>(program, programInterface, name);
156 
157         if (context->skipValidation() ||
158             ValidateGetProgramResourceIndex(context, program, programInterface, name))
159         {
160             return context->getProgramResourceIndex(program, programInterface, name);
161         }
162     }
163 
164     return GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
165 }
166 
GetProgramResourceName(GLuint program,GLenum programInterface,GLuint index,GLsizei bufSize,GLsizei * length,GLchar * name)167 void GL_APIENTRY GetProgramResourceName(GLuint program,
168                                         GLenum programInterface,
169                                         GLuint index,
170                                         GLsizei bufSize,
171                                         GLsizei *length,
172                                         GLchar *name)
173 {
174     EVENT(
175         "(GLuint program = %u, GLenum programInterface = 0x%X, GLuint index = %u, GLsizei bufSize "
176         "= %d, GLsizei *length = 0x%0.8p, GLchar *name = 0x%0.8p)",
177         program, programInterface, index, bufSize, length, name);
178 
179     Context *context = GetValidGlobalContext();
180     if (context)
181     {
182         context->gatherParams<EntryPoint::GetProgramResourceName>(program, programInterface, index,
183                                                                   bufSize, length, name);
184 
185         if (context->skipValidation() ||
186             ValidateGetProgramResourceName(context, program, programInterface, index, bufSize,
187                                            length, name))
188         {
189             context->getProgramResourceName(program, programInterface, index, bufSize, length,
190                                             name);
191         }
192     }
193 }
194 
GetProgramResourceiv(GLuint program,GLenum programInterface,GLuint index,GLsizei propCount,const GLenum * props,GLsizei bufSize,GLsizei * length,GLint * params)195 void GL_APIENTRY GetProgramResourceiv(GLuint program,
196                                       GLenum programInterface,
197                                       GLuint index,
198                                       GLsizei propCount,
199                                       const GLenum *props,
200                                       GLsizei bufSize,
201                                       GLsizei *length,
202                                       GLint *params)
203 {
204     EVENT(
205         "(GLuint program = %u, GLenum programInterface = 0x%X, GLuint index = %u, GLsizei "
206         "propCount = %d, const GLenum *props = 0x%0.8p, GLsizei bufSize = %d, GLsizei *length = "
207         "0x%0.8p, GLint *params = 0x%0.8p)",
208         program, programInterface, index, propCount, props, bufSize, length, params);
209 
210     Context *context = GetValidGlobalContext();
211     if (context)
212     {
213         context->gatherParams<EntryPoint::GetProgramResourceiv>(
214             program, programInterface, index, propCount, props, bufSize, length, params);
215 
216         if (context->skipValidation() ||
217             ValidateGetProgramResourceiv(context, program, programInterface, index, propCount,
218                                          props, bufSize, length, params))
219         {
220             context->getProgramResourceiv(program, programInterface, index, propCount, props,
221                                           bufSize, length, params);
222         }
223     }
224 }
225 
GetProgramResourceLocation(GLuint program,GLenum programInterface,const GLchar * name)226 GLint GL_APIENTRY GetProgramResourceLocation(GLuint program,
227                                              GLenum programInterface,
228                                              const GLchar *name)
229 {
230     EVENT("(GLuint program = %u, GLenum programInterface = 0x%X, const GLchar *name = 0x%0.8p)",
231           program, programInterface, name);
232 
233     Context *context = GetValidGlobalContext();
234     if (context)
235     {
236         context->gatherParams<EntryPoint::GetProgramResourceLocation>(program, programInterface,
237                                                                       name);
238 
239         if (context->skipValidation() ||
240             ValidateGetProgramResourceLocation(context, program, programInterface, name))
241         {
242             return context->getProgramResourceLocation(program, programInterface, name);
243         }
244     }
245 
246     return GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
247 }
248 
UseProgramStages(GLuint pipeline,GLbitfield stages,GLuint program)249 void GL_APIENTRY UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
250 {
251     EVENT("(GLuint pipeline = %u, GLbitfield stages = 0x%X, GLuint program = %u)", pipeline, stages,
252           program);
253 
254     Context *context = GetValidGlobalContext();
255     if (context)
256     {
257         context->gatherParams<EntryPoint::UseProgramStages>(pipeline, stages, program);
258 
259         if (context->skipValidation() ||
260             ValidateUseProgramStages(context, pipeline, stages, program))
261         {
262             context->useProgramStages(pipeline, stages, program);
263         }
264     }
265 }
266 
ActiveShaderProgram(GLuint pipeline,GLuint program)267 void GL_APIENTRY ActiveShaderProgram(GLuint pipeline, GLuint program)
268 {
269     EVENT("(GLuint pipeline = %u, GLuint program = %u)", pipeline, program);
270 
271     Context *context = GetValidGlobalContext();
272     if (context)
273     {
274         context->gatherParams<EntryPoint::ActiveShaderProgram>(pipeline, program);
275 
276         if (context->skipValidation() || ValidateActiveShaderProgram(context, pipeline, program))
277         {
278             context->activeShaderProgram(pipeline, program);
279         }
280     }
281 }
282 
CreateShaderProgramv(GLenum type,GLsizei count,const GLchar * const * strings)283 GLuint GL_APIENTRY CreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
284 {
285     EVENT("(GLenum type = 0x%X, GLsizei count = %d, const GLchar *const*strings = 0x%0.8p)", type,
286           count, strings);
287 
288     Context *context = GetValidGlobalContext();
289     if (context)
290     {
291         context->gatherParams<EntryPoint::CreateShaderProgramv>(type, count, strings);
292 
293         if (context->skipValidation() ||
294             ValidateCreateShaderProgramv(context, type, count, strings))
295         {
296             return context->createShaderProgramv(type, count, strings);
297         }
298     }
299 
300     return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
301 }
302 
BindProgramPipeline(GLuint pipeline)303 void GL_APIENTRY BindProgramPipeline(GLuint pipeline)
304 {
305     EVENT("(GLuint pipeline = %u)", pipeline);
306 
307     Context *context = GetValidGlobalContext();
308     if (context)
309     {
310         context->gatherParams<EntryPoint::BindProgramPipeline>(pipeline);
311 
312         if (context->skipValidation() || ValidateBindProgramPipeline(context, pipeline))
313         {
314             context->bindProgramPipeline(pipeline);
315         }
316     }
317 }
318 
DeleteProgramPipelines(GLsizei n,const GLuint * pipelines)319 void GL_APIENTRY DeleteProgramPipelines(GLsizei n, const GLuint *pipelines)
320 {
321     EVENT("(GLsizei n = %d, const GLuint *pipelines = 0x%0.8p)", n, pipelines);
322 
323     Context *context = GetValidGlobalContext();
324     if (context)
325     {
326         context->gatherParams<EntryPoint::DeleteProgramPipelines>(n, pipelines);
327 
328         if (context->skipValidation() || ValidateDeleteProgramPipelines(context, n, pipelines))
329         {
330             context->deleteProgramPipelines(n, pipelines);
331         }
332     }
333 }
334 
GenProgramPipelines(GLsizei n,GLuint * pipelines)335 void GL_APIENTRY GenProgramPipelines(GLsizei n, GLuint *pipelines)
336 {
337     EVENT("(GLsizei n = %d, GLuint *pipelines = 0x%0.8p)", n, pipelines);
338 
339     Context *context = GetValidGlobalContext();
340     if (context)
341     {
342         context->gatherParams<EntryPoint::GenProgramPipelines>(n, pipelines);
343 
344         if (context->skipValidation() || ValidateGenProgramPipelines(context, n, pipelines))
345         {
346             context->genProgramPipelines(n, pipelines);
347         }
348     }
349 }
350 
IsProgramPipeline(GLuint pipeline)351 GLboolean GL_APIENTRY IsProgramPipeline(GLuint pipeline)
352 {
353     EVENT("(GLuint pipeline = %u)", pipeline);
354 
355     Context *context = GetValidGlobalContext();
356     if (context)
357     {
358         context->gatherParams<EntryPoint::IsProgramPipeline>(pipeline);
359 
360         if (context->skipValidation() || ValidateIsProgramPipeline(context, pipeline))
361         {
362             return context->isProgramPipeline(pipeline);
363         }
364     }
365 
366     return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
367 }
368 
GetProgramPipelineiv(GLuint pipeline,GLenum pname,GLint * params)369 void GL_APIENTRY GetProgramPipelineiv(GLuint pipeline, GLenum pname, GLint *params)
370 {
371     EVENT("(GLuint pipeline = %u, GLenum pname = 0x%X, GLint *params = 0x%0.8p)", pipeline, pname,
372           params);
373 
374     Context *context = GetValidGlobalContext();
375     if (context)
376     {
377         context->gatherParams<EntryPoint::GetProgramPipelineiv>(pipeline, pname, params);
378 
379         if (context->skipValidation() ||
380             ValidateGetProgramPipelineiv(context, pipeline, pname, params))
381         {
382             context->getProgramPipelineiv(pipeline, pname, params);
383         }
384     }
385 }
386 
ProgramUniform1i(GLuint program,GLint location,GLint v0)387 void GL_APIENTRY ProgramUniform1i(GLuint program, GLint location, GLint v0)
388 {
389     EVENT("(GLuint program = %u, GLint location = %d, GLint v0 = %d)", program, location, v0);
390 
391     Context *context = GetValidGlobalContext();
392     if (context)
393     {
394         context->gatherParams<EntryPoint::ProgramUniform1i>(program, location, v0);
395 
396         if (context->skipValidation() || ValidateProgramUniform1i(context, program, location, v0))
397         {
398             context->programUniform1i(program, location, v0);
399         }
400     }
401 }
402 
ProgramUniform2i(GLuint program,GLint location,GLint v0,GLint v1)403 void GL_APIENTRY ProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
404 {
405     EVENT("(GLuint program = %u, GLint location = %d, GLint v0 = %d, GLint v1 = %d)", program,
406           location, v0, v1);
407 
408     Context *context = GetValidGlobalContext();
409     if (context)
410     {
411         context->gatherParams<EntryPoint::ProgramUniform2i>(program, location, v0, v1);
412 
413         if (context->skipValidation() ||
414             ValidateProgramUniform2i(context, program, location, v0, v1))
415         {
416             context->programUniform2i(program, location, v0, v1);
417         }
418     }
419 }
420 
ProgramUniform3i(GLuint program,GLint location,GLint v0,GLint v1,GLint v2)421 void GL_APIENTRY ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
422 {
423     EVENT("(GLuint program = %u, GLint location = %d, GLint v0 = %d, GLint v1 = %d, GLint v2 = %d)",
424           program, location, v0, v1, v2);
425 
426     Context *context = GetValidGlobalContext();
427     if (context)
428     {
429         context->gatherParams<EntryPoint::ProgramUniform3i>(program, location, v0, v1, v2);
430 
431         if (context->skipValidation() ||
432             ValidateProgramUniform3i(context, program, location, v0, v1, v2))
433         {
434             context->programUniform3i(program, location, v0, v1, v2);
435         }
436     }
437 }
438 
439 void GL_APIENTRY
ProgramUniform4i(GLuint program,GLint location,GLint v0,GLint v1,GLint v2,GLint v3)440 ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
441 {
442     EVENT(
443         "(GLuint program = %u, GLint location = %d, GLint v0 = %d, GLint v1 = %d, GLint v2 = %d, "
444         "GLint v3 = %d)",
445         program, location, v0, v1, v2, v3);
446 
447     Context *context = GetValidGlobalContext();
448     if (context)
449     {
450         context->gatherParams<EntryPoint::ProgramUniform4i>(program, location, v0, v1, v2, v3);
451 
452         if (context->skipValidation() ||
453             ValidateProgramUniform4i(context, program, location, v0, v1, v2, v3))
454         {
455             context->programUniform4i(program, location, v0, v1, v2, v3);
456         }
457     }
458 }
459 
ProgramUniform1ui(GLuint program,GLint location,GLuint v0)460 void GL_APIENTRY ProgramUniform1ui(GLuint program, GLint location, GLuint v0)
461 {
462     EVENT("(GLuint program = %u, GLint location = %d, GLuint v0 = %u)", program, location, v0);
463 
464     Context *context = GetValidGlobalContext();
465     if (context)
466     {
467         context->gatherParams<EntryPoint::ProgramUniform1ui>(program, location, v0);
468 
469         if (context->skipValidation() || ValidateProgramUniform1ui(context, program, location, v0))
470         {
471             context->programUniform1ui(program, location, v0);
472         }
473     }
474 }
475 
ProgramUniform2ui(GLuint program,GLint location,GLuint v0,GLuint v1)476 void GL_APIENTRY ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
477 {
478     EVENT("(GLuint program = %u, GLint location = %d, GLuint v0 = %u, GLuint v1 = %u)", program,
479           location, v0, v1);
480 
481     Context *context = GetValidGlobalContext();
482     if (context)
483     {
484         context->gatherParams<EntryPoint::ProgramUniform2ui>(program, location, v0, v1);
485 
486         if (context->skipValidation() ||
487             ValidateProgramUniform2ui(context, program, location, v0, v1))
488         {
489             context->programUniform2ui(program, location, v0, v1);
490         }
491     }
492 }
493 
ProgramUniform3ui(GLuint program,GLint location,GLuint v0,GLuint v1,GLuint v2)494 void GL_APIENTRY ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
495 {
496     EVENT(
497         "(GLuint program = %u, GLint location = %d, GLuint v0 = %u, GLuint v1 = %u, GLuint v2 = "
498         "%u)",
499         program, location, v0, v1, v2);
500 
501     Context *context = GetValidGlobalContext();
502     if (context)
503     {
504         context->gatherParams<EntryPoint::ProgramUniform3ui>(program, location, v0, v1, v2);
505 
506         if (context->skipValidation() ||
507             ValidateProgramUniform3ui(context, program, location, v0, v1, v2))
508         {
509             context->programUniform3ui(program, location, v0, v1, v2);
510         }
511     }
512 }
513 
514 void GL_APIENTRY
ProgramUniform4ui(GLuint program,GLint location,GLuint v0,GLuint v1,GLuint v2,GLuint v3)515 ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
516 {
517     EVENT(
518         "(GLuint program = %u, GLint location = %d, GLuint v0 = %u, GLuint v1 = %u, GLuint v2 = "
519         "%u, GLuint v3 = %u)",
520         program, location, v0, v1, v2, v3);
521 
522     Context *context = GetValidGlobalContext();
523     if (context)
524     {
525         context->gatherParams<EntryPoint::ProgramUniform4ui>(program, location, v0, v1, v2, v3);
526 
527         if (context->skipValidation() ||
528             ValidateProgramUniform4ui(context, program, location, v0, v1, v2, v3))
529         {
530             context->programUniform4ui(program, location, v0, v1, v2, v3);
531         }
532     }
533 }
534 
ProgramUniform1f(GLuint program,GLint location,GLfloat v0)535 void GL_APIENTRY ProgramUniform1f(GLuint program, GLint location, GLfloat v0)
536 {
537     EVENT("(GLuint program = %u, GLint location = %d, GLfloat v0 = %f)", program, location, v0);
538 
539     Context *context = GetValidGlobalContext();
540     if (context)
541     {
542         context->gatherParams<EntryPoint::ProgramUniform1f>(program, location, v0);
543 
544         if (context->skipValidation() || ValidateProgramUniform1f(context, program, location, v0))
545         {
546             context->programUniform1f(program, location, v0);
547         }
548     }
549 }
550 
ProgramUniform2f(GLuint program,GLint location,GLfloat v0,GLfloat v1)551 void GL_APIENTRY ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
552 {
553     EVENT("(GLuint program = %u, GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f)", program,
554           location, v0, v1);
555 
556     Context *context = GetValidGlobalContext();
557     if (context)
558     {
559         context->gatherParams<EntryPoint::ProgramUniform2f>(program, location, v0, v1);
560 
561         if (context->skipValidation() ||
562             ValidateProgramUniform2f(context, program, location, v0, v1))
563         {
564             context->programUniform2f(program, location, v0, v1);
565         }
566     }
567 }
568 
569 void GL_APIENTRY
ProgramUniform3f(GLuint program,GLint location,GLfloat v0,GLfloat v1,GLfloat v2)570 ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
571 {
572     EVENT(
573         "(GLuint program = %u, GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f, GLfloat v2 = "
574         "%f)",
575         program, location, v0, v1, v2);
576 
577     Context *context = GetValidGlobalContext();
578     if (context)
579     {
580         context->gatherParams<EntryPoint::ProgramUniform3f>(program, location, v0, v1, v2);
581 
582         if (context->skipValidation() ||
583             ValidateProgramUniform3f(context, program, location, v0, v1, v2))
584         {
585             context->programUniform3f(program, location, v0, v1, v2);
586         }
587     }
588 }
589 
590 void GL_APIENTRY
ProgramUniform4f(GLuint program,GLint location,GLfloat v0,GLfloat v1,GLfloat v2,GLfloat v3)591 ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
592 {
593     EVENT(
594         "(GLuint program = %u, GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f, GLfloat v2 = "
595         "%f, GLfloat v3 = %f)",
596         program, location, v0, v1, v2, v3);
597 
598     Context *context = GetValidGlobalContext();
599     if (context)
600     {
601         context->gatherParams<EntryPoint::ProgramUniform4f>(program, location, v0, v1, v2, v3);
602 
603         if (context->skipValidation() ||
604             ValidateProgramUniform4f(context, program, location, v0, v1, v2, v3))
605         {
606             context->programUniform4f(program, location, v0, v1, v2, v3);
607         }
608     }
609 }
610 
ProgramUniform1iv(GLuint program,GLint location,GLsizei count,const GLint * value)611 void GL_APIENTRY ProgramUniform1iv(GLuint program,
612                                    GLint location,
613                                    GLsizei count,
614                                    const GLint *value)
615 {
616     EVENT(
617         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
618         "0x%0.8p)",
619         program, location, count, value);
620 
621     Context *context = GetValidGlobalContext();
622     if (context)
623     {
624         context->gatherParams<EntryPoint::ProgramUniform1iv>(program, location, count, value);
625 
626         if (context->skipValidation() ||
627             ValidateProgramUniform1iv(context, program, location, count, value))
628         {
629             context->programUniform1iv(program, location, count, value);
630         }
631     }
632 }
633 
ProgramUniform2iv(GLuint program,GLint location,GLsizei count,const GLint * value)634 void GL_APIENTRY ProgramUniform2iv(GLuint program,
635                                    GLint location,
636                                    GLsizei count,
637                                    const GLint *value)
638 {
639     EVENT(
640         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
641         "0x%0.8p)",
642         program, location, count, value);
643 
644     Context *context = GetValidGlobalContext();
645     if (context)
646     {
647         context->gatherParams<EntryPoint::ProgramUniform2iv>(program, location, count, value);
648 
649         if (context->skipValidation() ||
650             ValidateProgramUniform2iv(context, program, location, count, value))
651         {
652             context->programUniform2iv(program, location, count, value);
653         }
654     }
655 }
656 
ProgramUniform3iv(GLuint program,GLint location,GLsizei count,const GLint * value)657 void GL_APIENTRY ProgramUniform3iv(GLuint program,
658                                    GLint location,
659                                    GLsizei count,
660                                    const GLint *value)
661 {
662     EVENT(
663         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
664         "0x%0.8p)",
665         program, location, count, value);
666 
667     Context *context = GetValidGlobalContext();
668     if (context)
669     {
670         context->gatherParams<EntryPoint::ProgramUniform3iv>(program, location, count, value);
671 
672         if (context->skipValidation() ||
673             ValidateProgramUniform3iv(context, program, location, count, value))
674         {
675             context->programUniform3iv(program, location, count, value);
676         }
677     }
678 }
679 
ProgramUniform4iv(GLuint program,GLint location,GLsizei count,const GLint * value)680 void GL_APIENTRY ProgramUniform4iv(GLuint program,
681                                    GLint location,
682                                    GLsizei count,
683                                    const GLint *value)
684 {
685     EVENT(
686         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
687         "0x%0.8p)",
688         program, location, count, value);
689 
690     Context *context = GetValidGlobalContext();
691     if (context)
692     {
693         context->gatherParams<EntryPoint::ProgramUniform4iv>(program, location, count, value);
694 
695         if (context->skipValidation() ||
696             ValidateProgramUniform4iv(context, program, location, count, value))
697         {
698             context->programUniform4iv(program, location, count, value);
699         }
700     }
701 }
702 
ProgramUniform1uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)703 void GL_APIENTRY ProgramUniform1uiv(GLuint program,
704                                     GLint location,
705                                     GLsizei count,
706                                     const GLuint *value)
707 {
708     EVENT(
709         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
710         "0x%0.8p)",
711         program, location, count, value);
712 
713     Context *context = GetValidGlobalContext();
714     if (context)
715     {
716         context->gatherParams<EntryPoint::ProgramUniform1uiv>(program, location, count, value);
717 
718         if (context->skipValidation() ||
719             ValidateProgramUniform1uiv(context, program, location, count, value))
720         {
721             context->programUniform1uiv(program, location, count, value);
722         }
723     }
724 }
725 
ProgramUniform2uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)726 void GL_APIENTRY ProgramUniform2uiv(GLuint program,
727                                     GLint location,
728                                     GLsizei count,
729                                     const GLuint *value)
730 {
731     EVENT(
732         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
733         "0x%0.8p)",
734         program, location, count, value);
735 
736     Context *context = GetValidGlobalContext();
737     if (context)
738     {
739         context->gatherParams<EntryPoint::ProgramUniform2uiv>(program, location, count, value);
740 
741         if (context->skipValidation() ||
742             ValidateProgramUniform2uiv(context, program, location, count, value))
743         {
744             context->programUniform2uiv(program, location, count, value);
745         }
746     }
747 }
748 
ProgramUniform3uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)749 void GL_APIENTRY ProgramUniform3uiv(GLuint program,
750                                     GLint location,
751                                     GLsizei count,
752                                     const GLuint *value)
753 {
754     EVENT(
755         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
756         "0x%0.8p)",
757         program, location, count, value);
758 
759     Context *context = GetValidGlobalContext();
760     if (context)
761     {
762         context->gatherParams<EntryPoint::ProgramUniform3uiv>(program, location, count, value);
763 
764         if (context->skipValidation() ||
765             ValidateProgramUniform3uiv(context, program, location, count, value))
766         {
767             context->programUniform3uiv(program, location, count, value);
768         }
769     }
770 }
771 
ProgramUniform4uiv(GLuint program,GLint location,GLsizei count,const GLuint * value)772 void GL_APIENTRY ProgramUniform4uiv(GLuint program,
773                                     GLint location,
774                                     GLsizei count,
775                                     const GLuint *value)
776 {
777     EVENT(
778         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
779         "0x%0.8p)",
780         program, location, count, value);
781 
782     Context *context = GetValidGlobalContext();
783     if (context)
784     {
785         context->gatherParams<EntryPoint::ProgramUniform4uiv>(program, location, count, value);
786 
787         if (context->skipValidation() ||
788             ValidateProgramUniform4uiv(context, program, location, count, value))
789         {
790             context->programUniform4uiv(program, location, count, value);
791         }
792     }
793 }
794 
ProgramUniform1fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)795 void GL_APIENTRY ProgramUniform1fv(GLuint program,
796                                    GLint location,
797                                    GLsizei count,
798                                    const GLfloat *value)
799 {
800     EVENT(
801         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
802         "0x%0.8p)",
803         program, location, count, value);
804 
805     Context *context = GetValidGlobalContext();
806     if (context)
807     {
808         context->gatherParams<EntryPoint::ProgramUniform1fv>(program, location, count, value);
809 
810         if (context->skipValidation() ||
811             ValidateProgramUniform1fv(context, program, location, count, value))
812         {
813             context->programUniform1fv(program, location, count, value);
814         }
815     }
816 }
817 
ProgramUniform2fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)818 void GL_APIENTRY ProgramUniform2fv(GLuint program,
819                                    GLint location,
820                                    GLsizei count,
821                                    const GLfloat *value)
822 {
823     EVENT(
824         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
825         "0x%0.8p)",
826         program, location, count, value);
827 
828     Context *context = GetValidGlobalContext();
829     if (context)
830     {
831         context->gatherParams<EntryPoint::ProgramUniform2fv>(program, location, count, value);
832 
833         if (context->skipValidation() ||
834             ValidateProgramUniform2fv(context, program, location, count, value))
835         {
836             context->programUniform2fv(program, location, count, value);
837         }
838     }
839 }
840 
ProgramUniform3fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)841 void GL_APIENTRY ProgramUniform3fv(GLuint program,
842                                    GLint location,
843                                    GLsizei count,
844                                    const GLfloat *value)
845 {
846     EVENT(
847         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
848         "0x%0.8p)",
849         program, location, count, value);
850 
851     Context *context = GetValidGlobalContext();
852     if (context)
853     {
854         context->gatherParams<EntryPoint::ProgramUniform3fv>(program, location, count, value);
855 
856         if (context->skipValidation() ||
857             ValidateProgramUniform3fv(context, program, location, count, value))
858         {
859             context->programUniform3fv(program, location, count, value);
860         }
861     }
862 }
863 
ProgramUniform4fv(GLuint program,GLint location,GLsizei count,const GLfloat * value)864 void GL_APIENTRY ProgramUniform4fv(GLuint program,
865                                    GLint location,
866                                    GLsizei count,
867                                    const GLfloat *value)
868 {
869     EVENT(
870         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
871         "0x%0.8p)",
872         program, location, count, value);
873 
874     Context *context = GetValidGlobalContext();
875     if (context)
876     {
877         context->gatherParams<EntryPoint::ProgramUniform4fv>(program, location, count, value);
878 
879         if (context->skipValidation() ||
880             ValidateProgramUniform4fv(context, program, location, count, value))
881         {
882             context->programUniform4fv(program, location, count, value);
883         }
884     }
885 }
886 
ProgramUniformMatrix2fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)887 void GL_APIENTRY ProgramUniformMatrix2fv(GLuint program,
888                                          GLint location,
889                                          GLsizei count,
890                                          GLboolean transpose,
891                                          const GLfloat *value)
892 {
893     EVENT(
894         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
895         "const GLfloat *value = 0x%0.8p)",
896         program, location, count, transpose, value);
897 
898     Context *context = GetValidGlobalContext();
899     if (context)
900     {
901         context->gatherParams<EntryPoint::ProgramUniformMatrix2fv>(program, location, count,
902                                                                    transpose, value);
903 
904         if (context->skipValidation() ||
905             ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value))
906         {
907             context->programUniformMatrix2fv(program, location, count, transpose, value);
908         }
909     }
910 }
911 
ProgramUniformMatrix3fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)912 void GL_APIENTRY ProgramUniformMatrix3fv(GLuint program,
913                                          GLint location,
914                                          GLsizei count,
915                                          GLboolean transpose,
916                                          const GLfloat *value)
917 {
918     EVENT(
919         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
920         "const GLfloat *value = 0x%0.8p)",
921         program, location, count, transpose, value);
922 
923     Context *context = GetValidGlobalContext();
924     if (context)
925     {
926         context->gatherParams<EntryPoint::ProgramUniformMatrix3fv>(program, location, count,
927                                                                    transpose, value);
928 
929         if (context->skipValidation() ||
930             ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value))
931         {
932             context->programUniformMatrix3fv(program, location, count, transpose, value);
933         }
934     }
935 }
936 
ProgramUniformMatrix4fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)937 void GL_APIENTRY ProgramUniformMatrix4fv(GLuint program,
938                                          GLint location,
939                                          GLsizei count,
940                                          GLboolean transpose,
941                                          const GLfloat *value)
942 {
943     EVENT(
944         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
945         "const GLfloat *value = 0x%0.8p)",
946         program, location, count, transpose, value);
947 
948     Context *context = GetValidGlobalContext();
949     if (context)
950     {
951         context->gatherParams<EntryPoint::ProgramUniformMatrix4fv>(program, location, count,
952                                                                    transpose, value);
953 
954         if (context->skipValidation() ||
955             ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value))
956         {
957             context->programUniformMatrix4fv(program, location, count, transpose, value);
958         }
959     }
960 }
961 
ProgramUniformMatrix2x3fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)962 void GL_APIENTRY ProgramUniformMatrix2x3fv(GLuint program,
963                                            GLint location,
964                                            GLsizei count,
965                                            GLboolean transpose,
966                                            const GLfloat *value)
967 {
968     EVENT(
969         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
970         "const GLfloat *value = 0x%0.8p)",
971         program, location, count, transpose, value);
972 
973     Context *context = GetValidGlobalContext();
974     if (context)
975     {
976         context->gatherParams<EntryPoint::ProgramUniformMatrix2x3fv>(program, location, count,
977                                                                      transpose, value);
978 
979         if (context->skipValidation() ||
980             ValidateProgramUniformMatrix2x3fv(context, program, location, count, transpose, value))
981         {
982             context->programUniformMatrix2x3fv(program, location, count, transpose, value);
983         }
984     }
985 }
986 
ProgramUniformMatrix3x2fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)987 void GL_APIENTRY ProgramUniformMatrix3x2fv(GLuint program,
988                                            GLint location,
989                                            GLsizei count,
990                                            GLboolean transpose,
991                                            const GLfloat *value)
992 {
993     EVENT(
994         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
995         "const GLfloat *value = 0x%0.8p)",
996         program, location, count, transpose, value);
997 
998     Context *context = GetValidGlobalContext();
999     if (context)
1000     {
1001         context->gatherParams<EntryPoint::ProgramUniformMatrix3x2fv>(program, location, count,
1002                                                                      transpose, value);
1003 
1004         if (context->skipValidation() ||
1005             ValidateProgramUniformMatrix3x2fv(context, program, location, count, transpose, value))
1006         {
1007             context->programUniformMatrix3x2fv(program, location, count, transpose, value);
1008         }
1009     }
1010 }
1011 
ProgramUniformMatrix2x4fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1012 void GL_APIENTRY ProgramUniformMatrix2x4fv(GLuint program,
1013                                            GLint location,
1014                                            GLsizei count,
1015                                            GLboolean transpose,
1016                                            const GLfloat *value)
1017 {
1018     EVENT(
1019         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
1020         "const GLfloat *value = 0x%0.8p)",
1021         program, location, count, transpose, value);
1022 
1023     Context *context = GetValidGlobalContext();
1024     if (context)
1025     {
1026         context->gatherParams<EntryPoint::ProgramUniformMatrix2x4fv>(program, location, count,
1027                                                                      transpose, value);
1028 
1029         if (context->skipValidation() ||
1030             ValidateProgramUniformMatrix2x4fv(context, program, location, count, transpose, value))
1031         {
1032             context->programUniformMatrix2x4fv(program, location, count, transpose, value);
1033         }
1034     }
1035 }
1036 
ProgramUniformMatrix4x2fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1037 void GL_APIENTRY ProgramUniformMatrix4x2fv(GLuint program,
1038                                            GLint location,
1039                                            GLsizei count,
1040                                            GLboolean transpose,
1041                                            const GLfloat *value)
1042 {
1043     EVENT(
1044         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
1045         "const GLfloat *value = 0x%0.8p)",
1046         program, location, count, transpose, value);
1047 
1048     Context *context = GetValidGlobalContext();
1049     if (context)
1050     {
1051         context->gatherParams<EntryPoint::ProgramUniformMatrix4x2fv>(program, location, count,
1052                                                                      transpose, value);
1053 
1054         if (context->skipValidation() ||
1055             ValidateProgramUniformMatrix4x2fv(context, program, location, count, transpose, value))
1056         {
1057             context->programUniformMatrix4x2fv(program, location, count, transpose, value);
1058         }
1059     }
1060 }
1061 
ProgramUniformMatrix3x4fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1062 void GL_APIENTRY ProgramUniformMatrix3x4fv(GLuint program,
1063                                            GLint location,
1064                                            GLsizei count,
1065                                            GLboolean transpose,
1066                                            const GLfloat *value)
1067 {
1068     EVENT(
1069         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
1070         "const GLfloat *value = 0x%0.8p)",
1071         program, location, count, transpose, value);
1072 
1073     Context *context = GetValidGlobalContext();
1074     if (context)
1075     {
1076         context->gatherParams<EntryPoint::ProgramUniformMatrix3x4fv>(program, location, count,
1077                                                                      transpose, value);
1078 
1079         if (context->skipValidation() ||
1080             ValidateProgramUniformMatrix3x4fv(context, program, location, count, transpose, value))
1081         {
1082             context->programUniformMatrix3x4fv(program, location, count, transpose, value);
1083         }
1084     }
1085 }
1086 
ProgramUniformMatrix4x3fv(GLuint program,GLint location,GLsizei count,GLboolean transpose,const GLfloat * value)1087 void GL_APIENTRY ProgramUniformMatrix4x3fv(GLuint program,
1088                                            GLint location,
1089                                            GLsizei count,
1090                                            GLboolean transpose,
1091                                            const GLfloat *value)
1092 {
1093     EVENT(
1094         "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
1095         "const GLfloat *value = 0x%0.8p)",
1096         program, location, count, transpose, value);
1097 
1098     Context *context = GetValidGlobalContext();
1099     if (context)
1100     {
1101         context->gatherParams<EntryPoint::ProgramUniformMatrix4x3fv>(program, location, count,
1102                                                                      transpose, value);
1103 
1104         if (context->skipValidation() ||
1105             ValidateProgramUniformMatrix4x3fv(context, program, location, count, transpose, value))
1106         {
1107             context->programUniformMatrix4x3fv(program, location, count, transpose, value);
1108         }
1109     }
1110 }
1111 
ValidateProgramPipeline(GLuint pipeline)1112 void GL_APIENTRY ValidateProgramPipeline(GLuint pipeline)
1113 {
1114     EVENT("(GLuint pipeline = %u)", pipeline);
1115 
1116     Context *context = GetValidGlobalContext();
1117     if (context)
1118     {
1119         context->gatherParams<EntryPoint::ValidateProgramPipeline>(pipeline);
1120 
1121         if (context->skipValidation() || ValidateValidateProgramPipeline(context, pipeline))
1122         {
1123             context->validateProgramPipeline(pipeline);
1124         }
1125     }
1126 }
1127 
GetProgramPipelineInfoLog(GLuint pipeline,GLsizei bufSize,GLsizei * length,GLchar * infoLog)1128 void GL_APIENTRY GetProgramPipelineInfoLog(GLuint pipeline,
1129                                            GLsizei bufSize,
1130                                            GLsizei *length,
1131                                            GLchar *infoLog)
1132 {
1133     EVENT(
1134         "(GLuint pipeline = %u, GLsizei bufSize = %d, GLsizei *length = 0x%0.8p, GLchar *infoLog = "
1135         "0x%0.8p)",
1136         pipeline, bufSize, length, infoLog);
1137 
1138     Context *context = GetValidGlobalContext();
1139     if (context)
1140     {
1141         context->gatherParams<EntryPoint::GetProgramPipelineInfoLog>(pipeline, bufSize, length,
1142                                                                      infoLog);
1143 
1144         if (context->skipValidation() ||
1145             ValidateGetProgramPipelineInfoLog(context, pipeline, bufSize, length, infoLog))
1146         {
1147             context->getProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
1148         }
1149     }
1150 }
1151 
BindImageTexture(GLuint unit,GLuint texture,GLint level,GLboolean layered,GLint layer,GLenum access,GLenum format)1152 void GL_APIENTRY BindImageTexture(GLuint unit,
1153                                   GLuint texture,
1154                                   GLint level,
1155                                   GLboolean layered,
1156                                   GLint layer,
1157                                   GLenum access,
1158                                   GLenum format)
1159 {
1160     EVENT(
1161         "(GLuint unit = %u, GLuint texture = %u, GLint level = %d, GLboolean layered = %u, GLint "
1162         "layer = %d, GLenum access = 0x%X, GLenum format = 0x%X)",
1163         unit, texture, level, layered, layer, access, format);
1164 
1165     Context *context = GetValidGlobalContext();
1166     if (context)
1167     {
1168         context->gatherParams<EntryPoint::BindImageTexture>(unit, texture, level, layered, layer,
1169                                                             access, format);
1170 
1171         if (context->skipValidation() ||
1172             ValidateBindImageTexture(context, unit, texture, level, layered, layer, access, format))
1173         {
1174             context->bindImageTexture(unit, texture, level, layered, layer, access, format);
1175         }
1176     }
1177 }
1178 
GetBooleani_v(GLenum target,GLuint index,GLboolean * data)1179 void GL_APIENTRY GetBooleani_v(GLenum target, GLuint index, GLboolean *data)
1180 {
1181     EVENT("(GLenum target = 0x%X, GLuint index = %u, GLboolean *data = 0x%0.8p)", target, index,
1182           data);
1183 
1184     Context *context = GetValidGlobalContext();
1185     if (context)
1186     {
1187         context->gatherParams<EntryPoint::GetBooleani_v>(target, index, data);
1188 
1189         if (context->skipValidation() || ValidateGetBooleani_v(context, target, index, data))
1190         {
1191             context->getBooleani_v(target, index, data);
1192         }
1193     }
1194 }
1195 
MemoryBarrier(GLbitfield barriers)1196 void GL_APIENTRY MemoryBarrier(GLbitfield barriers)
1197 {
1198     EVENT("(GLbitfield barriers = 0x%X)", barriers);
1199 
1200     Context *context = GetValidGlobalContext();
1201     if (context)
1202     {
1203         context->gatherParams<EntryPoint::MemoryBarrier>(barriers);
1204 
1205         if (context->skipValidation() || ValidateMemoryBarrier(context, barriers))
1206         {
1207             context->memoryBarrier(barriers);
1208         }
1209     }
1210 }
1211 
MemoryBarrierByRegion(GLbitfield barriers)1212 void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers)
1213 {
1214     EVENT("(GLbitfield barriers = 0x%X)", barriers);
1215 
1216     Context *context = GetValidGlobalContext();
1217     if (context)
1218     {
1219         context->gatherParams<EntryPoint::MemoryBarrierByRegion>(barriers);
1220 
1221         if (context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers))
1222         {
1223             context->memoryBarrierByRegion(barriers);
1224         }
1225     }
1226 }
1227 
TexStorage2DMultisample(GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)1228 void GL_APIENTRY TexStorage2DMultisample(GLenum target,
1229                                          GLsizei samples,
1230                                          GLenum internalformat,
1231                                          GLsizei width,
1232                                          GLsizei height,
1233                                          GLboolean fixedsamplelocations)
1234 {
1235     EVENT(
1236         "(GLenum target = 0x%X, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width "
1237         "= %d, GLsizei height = %d, GLboolean fixedsamplelocations = %u)",
1238         target, samples, internalformat, width, height, fixedsamplelocations);
1239 
1240     Context *context = GetValidGlobalContext();
1241     if (context)
1242     {
1243         context->gatherParams<EntryPoint::TexStorage2DMultisample>(
1244             target, samples, internalformat, width, height, fixedsamplelocations);
1245 
1246         if (context->skipValidation() ||
1247             ValidateTexStorage2DMultisample(context, target, samples, internalformat, width, height,
1248                                             fixedsamplelocations))
1249         {
1250             context->texStorage2DMultisample(target, samples, internalformat, width, height,
1251                                              fixedsamplelocations);
1252         }
1253     }
1254 }
1255 
GetMultisamplefv(GLenum pname,GLuint index,GLfloat * val)1256 void GL_APIENTRY GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
1257 {
1258     EVENT("(GLenum pname = 0x%X, GLuint index = %u, GLfloat *val = 0x%0.8p)", pname, index, val);
1259 
1260     Context *context = GetValidGlobalContext();
1261     if (context)
1262     {
1263         context->gatherParams<EntryPoint::GetMultisamplefv>(pname, index, val);
1264 
1265         if (context->skipValidation() || ValidateGetMultisamplefv(context, pname, index, val))
1266         {
1267             context->getMultisamplefv(pname, index, val);
1268         }
1269     }
1270 }
1271 
SampleMaski(GLuint maskNumber,GLbitfield mask)1272 void GL_APIENTRY SampleMaski(GLuint maskNumber, GLbitfield mask)
1273 {
1274     EVENT("(GLuint maskNumber = %u, GLbitfield mask = 0x%X)", maskNumber, mask);
1275 
1276     Context *context = GetValidGlobalContext();
1277     if (context)
1278     {
1279         context->gatherParams<EntryPoint::SampleMaski>(maskNumber, mask);
1280 
1281         if (context->skipValidation() || ValidateSampleMaski(context, maskNumber, mask))
1282         {
1283             context->sampleMaski(maskNumber, mask);
1284         }
1285     }
1286 }
1287 
GetTexLevelParameteriv(GLenum target,GLint level,GLenum pname,GLint * params)1288 void GL_APIENTRY GetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
1289 {
1290     EVENT("(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLint *params = 0x%0.8p)",
1291           target, level, pname, params);
1292 
1293     Context *context = GetValidGlobalContext();
1294     if (context)
1295     {
1296         context->gatherParams<EntryPoint::GetTexLevelParameteriv>(target, level, pname, params);
1297 
1298         if (context->skipValidation() ||
1299             ValidateGetTexLevelParameteriv(context, target, level, pname, params))
1300         {
1301             context->getTexLevelParameteriv(target, level, pname, params);
1302         }
1303     }
1304 }
1305 
GetTexLevelParameterfv(GLenum target,GLint level,GLenum pname,GLfloat * params)1306 void GL_APIENTRY GetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
1307 {
1308     EVENT(
1309         "(GLenum target = 0x%X, GLint level = %d, GLenum pname = 0x%X, GLfloat *params = 0x%0.8p)",
1310         target, level, pname, params);
1311 
1312     Context *context = GetValidGlobalContext();
1313     if (context)
1314     {
1315         context->gatherParams<EntryPoint::GetTexLevelParameterfv>(target, level, pname, params);
1316 
1317         if (context->skipValidation() ||
1318             ValidateGetTexLevelParameterfv(context, target, level, pname, params))
1319         {
1320             context->getTexLevelParameterfv(target, level, pname, params);
1321         }
1322     }
1323 }
1324 
BindVertexBuffer(GLuint bindingindex,GLuint buffer,GLintptr offset,GLsizei stride)1325 void GL_APIENTRY BindVertexBuffer(GLuint bindingindex,
1326                                   GLuint buffer,
1327                                   GLintptr offset,
1328                                   GLsizei stride)
1329 {
1330     EVENT(
1331         "(GLuint bindingindex = %u, GLuint buffer = %u, GLintptr offset = %d, GLsizei stride = %d)",
1332         bindingindex, buffer, offset, stride);
1333 
1334     Context *context = GetValidGlobalContext();
1335     if (context)
1336     {
1337         context->gatherParams<EntryPoint::BindVertexBuffer>(bindingindex, buffer, offset, stride);
1338 
1339         if (context->skipValidation() ||
1340             ValidateBindVertexBuffer(context, bindingindex, buffer, offset, stride))
1341         {
1342             context->bindVertexBuffer(bindingindex, buffer, offset, stride);
1343         }
1344     }
1345 }
1346 
VertexAttribFormat(GLuint attribindex,GLint size,GLenum type,GLboolean normalized,GLuint relativeoffset)1347 void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
1348                                     GLint size,
1349                                     GLenum type,
1350                                     GLboolean normalized,
1351                                     GLuint relativeoffset)
1352 {
1353     EVENT(
1354         "(GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, GLboolean normalized = %u, "
1355         "GLuint relativeoffset = %u)",
1356         attribindex, size, type, normalized, relativeoffset);
1357 
1358     Context *context = GetValidGlobalContext();
1359     if (context)
1360     {
1361         context->gatherParams<EntryPoint::VertexAttribFormat>(attribindex, size, type, normalized,
1362                                                               relativeoffset);
1363 
1364         if (context->skipValidation() ||
1365             ValidateVertexAttribFormat(context, attribindex, size, type, normalized,
1366                                        relativeoffset))
1367         {
1368             context->vertexAttribFormat(attribindex, size, type, normalized, relativeoffset);
1369         }
1370     }
1371 }
1372 
VertexAttribIFormat(GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)1373 void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
1374                                      GLint size,
1375                                      GLenum type,
1376                                      GLuint relativeoffset)
1377 {
1378     EVENT(
1379         "(GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, GLuint relativeoffset = "
1380         "%u)",
1381         attribindex, size, type, relativeoffset);
1382 
1383     Context *context = GetValidGlobalContext();
1384     if (context)
1385     {
1386         context->gatherParams<EntryPoint::VertexAttribIFormat>(attribindex, size, type,
1387                                                                relativeoffset);
1388 
1389         if (context->skipValidation() ||
1390             ValidateVertexAttribIFormat(context, attribindex, size, type, relativeoffset))
1391         {
1392             context->vertexAttribIFormat(attribindex, size, type, relativeoffset);
1393         }
1394     }
1395 }
1396 
VertexAttribBinding(GLuint attribindex,GLuint bindingindex)1397 void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
1398 {
1399     EVENT("(GLuint attribindex = %u, GLuint bindingindex = %u)", attribindex, bindingindex);
1400 
1401     Context *context = GetValidGlobalContext();
1402     if (context)
1403     {
1404         context->gatherParams<EntryPoint::VertexAttribBinding>(attribindex, bindingindex);
1405 
1406         if (context->skipValidation() ||
1407             ValidateVertexAttribBinding(context, attribindex, bindingindex))
1408         {
1409             context->vertexAttribBinding(attribindex, bindingindex);
1410         }
1411     }
1412 }
1413 
VertexBindingDivisor(GLuint bindingindex,GLuint divisor)1414 void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor)
1415 {
1416     EVENT("(GLuint bindingindex = %u, GLuint divisor = %u)", bindingindex, divisor);
1417 
1418     Context *context = GetValidGlobalContext();
1419     if (context)
1420     {
1421         context->gatherParams<EntryPoint::VertexBindingDivisor>(bindingindex, divisor);
1422 
1423         if (context->skipValidation() ||
1424             ValidateVertexBindingDivisor(context, bindingindex, divisor))
1425         {
1426             context->vertexBindingDivisor(bindingindex, divisor);
1427         }
1428     }
1429 }
1430 }  // namespace gl
1431