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