• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // GENERATED FILE - DO NOT EDIT.
2 // Generated by generate_entry_points.py using data from gl.xml.
3 //
4 // Copyright 2020 The ANGLE Project Authors. All rights reserved.
5 // Use of this source code is governed by a BSD-style license that can be
6 // found in the LICENSE file.
7 //
8 // entry_points_gl_3_2_autogen.cpp:
9 //   Defines the GL 3.2 entry points.
10 
11 #include "libGL/entry_points_gl_3_2_autogen.h"
12 
13 #include "libANGLE/Context.h"
14 #include "libANGLE/Context.inl.h"
15 #include "libANGLE/entry_points_utils.h"
16 #include "libANGLE/gl_enum_utils.h"
17 #include "libANGLE/validationEGL.h"
18 #include "libANGLE/validationES.h"
19 #include "libANGLE/validationES1.h"
20 #include "libANGLE/validationES2.h"
21 #include "libANGLE/validationES3.h"
22 #include "libANGLE/validationES31.h"
23 #include "libANGLE/validationES32.h"
24 #include "libANGLE/validationESEXT.h"
25 #include "libANGLE/validationGL32_autogen.h"
26 #include "libGLESv2/global_state.h"
27 
28 namespace gl
29 {
ClientWaitSync(GLsync sync,GLbitfield flags,GLuint64 timeout)30 GLenum GL_APIENTRY ClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
31 {
32     Context *context = GetValidGlobalContext();
33     EVENT("glClientWaitSync",
34           "context = %d, GLsync sync = 0x%016" PRIxPTR
35           ", GLbitfield flags = %s, GLuint64 timeout = %llu",
36           CID(context), (uintptr_t)sync,
37           GLbitfieldToString(GLenumGroup::SyncObjectMask, flags).c_str(),
38           static_cast<unsigned long long>(timeout));
39 
40     GLenum returnValue;
41     if (context)
42     {
43         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
44         bool isCallValid =
45             (context->skipValidation() || ValidateClientWaitSync(context, sync, flags, timeout));
46         if (isCallValid)
47         {
48             returnValue = context->clientWaitSync(sync, flags, timeout);
49         }
50         else
51         {
52             returnValue = GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>();
53         }
54         ANGLE_CAPTURE(ClientWaitSync, isCallValid, context, sync, flags, timeout, returnValue);
55     }
56     else
57     {
58         returnValue = GetDefaultReturnValue<EntryPoint::ClientWaitSync, GLenum>();
59     }
60     return returnValue;
61 }
62 
DeleteSync(GLsync sync)63 void GL_APIENTRY DeleteSync(GLsync sync)
64 {
65     Context *context = GetValidGlobalContext();
66     EVENT("glDeleteSync", "context = %d, GLsync sync = 0x%016" PRIxPTR "", CID(context),
67           (uintptr_t)sync);
68 
69     if (context)
70     {
71         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
72         bool isCallValid = (context->skipValidation() || ValidateDeleteSync(context, sync));
73         if (isCallValid)
74         {
75             context->deleteSync(sync);
76         }
77         ANGLE_CAPTURE(DeleteSync, isCallValid, context, sync);
78     }
79 }
80 
DrawElementsBaseVertex(GLenum mode,GLsizei count,GLenum type,const void * indices,GLint basevertex)81 void GL_APIENTRY DrawElementsBaseVertex(GLenum mode,
82                                         GLsizei count,
83                                         GLenum type,
84                                         const void *indices,
85                                         GLint basevertex)
86 {
87     Context *context = GetValidGlobalContext();
88     EVENT("glDrawElementsBaseVertex",
89           "context = %d, GLenum mode = %s, GLsizei count = %d, GLenum type = %s, const void "
90           "*indices = 0x%016" PRIxPTR ", GLint basevertex = %d",
91           CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count,
92           GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex);
93 
94     if (context)
95     {
96         PrimitiveMode modePacked                              = FromGL<PrimitiveMode>(mode);
97         DrawElementsType typePacked                           = FromGL<DrawElementsType>(type);
98         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
99         bool isCallValid                                      = (context->skipValidation() ||
100                             ValidateDrawElementsBaseVertex(context, modePacked, count, typePacked,
101                                                            indices, basevertex));
102         if (isCallValid)
103         {
104             context->drawElementsBaseVertex(modePacked, count, typePacked, indices, basevertex);
105         }
106         ANGLE_CAPTURE(DrawElementsBaseVertex, isCallValid, context, modePacked, count, typePacked,
107                       indices, basevertex);
108     }
109 }
110 
DrawElementsInstancedBaseVertex(GLenum mode,GLsizei count,GLenum type,const void * indices,GLsizei instancecount,GLint basevertex)111 void GL_APIENTRY DrawElementsInstancedBaseVertex(GLenum mode,
112                                                  GLsizei count,
113                                                  GLenum type,
114                                                  const void *indices,
115                                                  GLsizei instancecount,
116                                                  GLint basevertex)
117 {
118     Context *context = GetValidGlobalContext();
119     EVENT("glDrawElementsInstancedBaseVertex",
120           "context = %d, GLenum mode = %s, GLsizei count = %d, GLenum type = %s, const void "
121           "*indices = 0x%016" PRIxPTR ", GLsizei instancecount = %d, GLint basevertex = %d",
122           CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), count,
123           GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, instancecount,
124           basevertex);
125 
126     if (context)
127     {
128         PrimitiveMode modePacked                              = FromGL<PrimitiveMode>(mode);
129         DrawElementsType typePacked                           = FromGL<DrawElementsType>(type);
130         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
131         bool isCallValid = (context->skipValidation() || ValidateDrawElementsInstancedBaseVertex(
132                                                              context, modePacked, count, typePacked,
133                                                              indices, instancecount, basevertex));
134         if (isCallValid)
135         {
136             context->drawElementsInstancedBaseVertex(modePacked, count, typePacked, indices,
137                                                      instancecount, basevertex);
138         }
139         ANGLE_CAPTURE(DrawElementsInstancedBaseVertex, isCallValid, context, modePacked, count,
140                       typePacked, indices, instancecount, basevertex);
141     }
142 }
143 
DrawRangeElementsBaseVertex(GLenum mode,GLuint start,GLuint end,GLsizei count,GLenum type,const void * indices,GLint basevertex)144 void GL_APIENTRY DrawRangeElementsBaseVertex(GLenum mode,
145                                              GLuint start,
146                                              GLuint end,
147                                              GLsizei count,
148                                              GLenum type,
149                                              const void *indices,
150                                              GLint basevertex)
151 {
152     Context *context = GetValidGlobalContext();
153     EVENT("glDrawRangeElementsBaseVertex",
154           "context = %d, GLenum mode = %s, GLuint start = %u, GLuint end = %u, GLsizei count = %d, "
155           "GLenum type = %s, const void *indices = 0x%016" PRIxPTR ", GLint basevertex = %d",
156           CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), start, end, count,
157           GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, basevertex);
158 
159     if (context)
160     {
161         PrimitiveMode modePacked                              = FromGL<PrimitiveMode>(mode);
162         DrawElementsType typePacked                           = FromGL<DrawElementsType>(type);
163         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
164         bool isCallValid = (context->skipValidation() || ValidateDrawRangeElementsBaseVertex(
165                                                              context, modePacked, start, end, count,
166                                                              typePacked, indices, basevertex));
167         if (isCallValid)
168         {
169             context->drawRangeElementsBaseVertex(modePacked, start, end, count, typePacked, indices,
170                                                  basevertex);
171         }
172         ANGLE_CAPTURE(DrawRangeElementsBaseVertex, isCallValid, context, modePacked, start, end,
173                       count, typePacked, indices, basevertex);
174     }
175 }
176 
FenceSync(GLenum condition,GLbitfield flags)177 GLsync GL_APIENTRY FenceSync(GLenum condition, GLbitfield flags)
178 {
179     Context *context = GetValidGlobalContext();
180     EVENT("glFenceSync", "context = %d, GLenum condition = %s, GLbitfield flags = %s", CID(context),
181           GLenumToString(GLenumGroup::SyncCondition, condition),
182           GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str());
183 
184     GLsync returnValue;
185     if (context)
186     {
187         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
188         bool isCallValid =
189             (context->skipValidation() || ValidateFenceSync(context, condition, flags));
190         if (isCallValid)
191         {
192             returnValue = context->fenceSync(condition, flags);
193         }
194         else
195         {
196             returnValue = GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
197         }
198         ANGLE_CAPTURE(FenceSync, isCallValid, context, condition, flags, returnValue);
199     }
200     else
201     {
202         returnValue = GetDefaultReturnValue<EntryPoint::FenceSync, GLsync>();
203     }
204     return returnValue;
205 }
206 
FramebufferTexture(GLenum target,GLenum attachment,GLuint texture,GLint level)207 void GL_APIENTRY FramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level)
208 {
209     Context *context = GetValidGlobalContext();
210     EVENT("glFramebufferTexture",
211           "context = %d, GLenum target = %s, GLenum attachment = %s, GLuint texture = %u, GLint "
212           "level = %d",
213           CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),
214           GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level);
215 
216     if (context)
217     {
218         TextureID texturePacked                               = FromGL<TextureID>(texture);
219         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
220         bool isCallValid =
221             (context->skipValidation() ||
222              ValidateFramebufferTexture(context, target, attachment, texturePacked, level));
223         if (isCallValid)
224         {
225             context->framebufferTexture(target, attachment, texturePacked, level);
226         }
227         ANGLE_CAPTURE(FramebufferTexture, isCallValid, context, target, attachment, texturePacked,
228                       level);
229     }
230 }
231 
GetBufferParameteri64v(GLenum target,GLenum pname,GLint64 * params)232 void GL_APIENTRY GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
233 {
234     Context *context = GetValidGlobalContext();
235     EVENT("glGetBufferParameteri64v",
236           "context = %d, GLenum target = %s, GLenum pname = %s, GLint64 *params = 0x%016" PRIxPTR
237           "",
238           CID(context), GLenumToString(GLenumGroup::BufferTargetARB, target),
239           GLenumToString(GLenumGroup::DefaultGroup, pname), (uintptr_t)params);
240 
241     if (context)
242     {
243         BufferBinding targetPacked                            = FromGL<BufferBinding>(target);
244         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
245         bool isCallValid                                      = (context->skipValidation() ||
246                             ValidateGetBufferParameteri64v(context, targetPacked, pname, params));
247         if (isCallValid)
248         {
249             context->getBufferParameteri64v(targetPacked, pname, params);
250         }
251         ANGLE_CAPTURE(GetBufferParameteri64v, isCallValid, context, targetPacked, pname, params);
252     }
253 }
254 
GetInteger64i_v(GLenum target,GLuint index,GLint64 * data)255 void GL_APIENTRY GetInteger64i_v(GLenum target, GLuint index, GLint64 *data)
256 {
257     Context *context = GetValidGlobalContext();
258     EVENT("glGetInteger64i_v",
259           "context = %d, GLenum target = %s, GLuint index = %u, GLint64 *data = 0x%016" PRIxPTR "",
260           CID(context), GLenumToString(GLenumGroup::TypeEnum, target), index, (uintptr_t)data);
261 
262     if (context)
263     {
264         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
265         bool isCallValid =
266             (context->skipValidation() || ValidateGetInteger64i_v(context, target, index, data));
267         if (isCallValid)
268         {
269             context->getInteger64i_v(target, index, data);
270         }
271         ANGLE_CAPTURE(GetInteger64i_v, isCallValid, context, target, index, data);
272     }
273 }
274 
GetInteger64v(GLenum pname,GLint64 * data)275 void GL_APIENTRY GetInteger64v(GLenum pname, GLint64 *data)
276 {
277     Context *context = GetValidGlobalContext();
278     EVENT("glGetInteger64v", "context = %d, GLenum pname = %s, GLint64 *data = 0x%016" PRIxPTR "",
279           CID(context), GLenumToString(GLenumGroup::GetPName, pname), (uintptr_t)data);
280 
281     if (context)
282     {
283         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
284         bool isCallValid =
285             (context->skipValidation() || ValidateGetInteger64v(context, pname, data));
286         if (isCallValid)
287         {
288             context->getInteger64v(pname, data);
289         }
290         ANGLE_CAPTURE(GetInteger64v, isCallValid, context, pname, data);
291     }
292 }
293 
GetMultisamplefv(GLenum pname,GLuint index,GLfloat * val)294 void GL_APIENTRY GetMultisamplefv(GLenum pname, GLuint index, GLfloat *val)
295 {
296     Context *context = GetValidGlobalContext();
297     EVENT("glGetMultisamplefv",
298           "context = %d, GLenum pname = %s, GLuint index = %u, GLfloat *val = 0x%016" PRIxPTR "",
299           CID(context), GLenumToString(GLenumGroup::DefaultGroup, pname), index, (uintptr_t)val);
300 
301     if (context)
302     {
303         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
304         bool isCallValid =
305             (context->skipValidation() || ValidateGetMultisamplefv(context, pname, index, val));
306         if (isCallValid)
307         {
308             context->getMultisamplefv(pname, index, val);
309         }
310         ANGLE_CAPTURE(GetMultisamplefv, isCallValid, context, pname, index, val);
311     }
312 }
313 
314 void GL_APIENTRY
GetSynciv(GLsync sync,GLenum pname,GLsizei bufSize,GLsizei * length,GLint * values)315 GetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values)
316 {
317     Context *context = GetGlobalContext();
318     EVENT("glGetSynciv",
319           "context = %d, GLsync sync = 0x%016" PRIxPTR
320           ", GLenum pname = %s, GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
321           ", GLint *values = 0x%016" PRIxPTR "",
322           CID(context), (uintptr_t)sync, GLenumToString(GLenumGroup::SyncParameterName, pname),
323           bufSize, (uintptr_t)length, (uintptr_t)values);
324 
325     if (context)
326     {
327         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
328         bool isCallValid                                      = (context->skipValidation() ||
329                             ValidateGetSynciv(context, sync, pname, bufSize, length, values));
330         if (isCallValid)
331         {
332             context->getSynciv(sync, pname, bufSize, length, values);
333         }
334         ANGLE_CAPTURE(GetSynciv, isCallValid, context, sync, pname, bufSize, length, values);
335     }
336 }
337 
IsSync(GLsync sync)338 GLboolean GL_APIENTRY IsSync(GLsync sync)
339 {
340     Context *context = GetValidGlobalContext();
341     EVENT("glIsSync", "context = %d, GLsync sync = 0x%016" PRIxPTR "", CID(context),
342           (uintptr_t)sync);
343 
344     GLboolean returnValue;
345     if (context)
346     {
347         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
348         bool isCallValid = (context->skipValidation() || ValidateIsSync(context, sync));
349         if (isCallValid)
350         {
351             returnValue = context->isSync(sync);
352         }
353         else
354         {
355             returnValue = GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
356         }
357         ANGLE_CAPTURE(IsSync, isCallValid, context, sync, returnValue);
358     }
359     else
360     {
361         returnValue = GetDefaultReturnValue<EntryPoint::IsSync, GLboolean>();
362     }
363     return returnValue;
364 }
365 
MultiDrawElementsBaseVertex(GLenum mode,const GLsizei * count,GLenum type,const void * const * indices,GLsizei drawcount,const GLint * basevertex)366 void GL_APIENTRY MultiDrawElementsBaseVertex(GLenum mode,
367                                              const GLsizei *count,
368                                              GLenum type,
369                                              const void *const *indices,
370                                              GLsizei drawcount,
371                                              const GLint *basevertex)
372 {
373     Context *context = GetValidGlobalContext();
374     EVENT("glMultiDrawElementsBaseVertex",
375           "context = %d, GLenum mode = %s, const GLsizei *count = 0x%016" PRIxPTR
376           ", GLenum type = %s, const void *const*indices = 0x%016" PRIxPTR
377           ", GLsizei drawcount = %d, const GLint *basevertex = 0x%016" PRIxPTR "",
378           CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)count,
379           GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indices, drawcount,
380           (uintptr_t)basevertex);
381 
382     if (context)
383     {
384         PrimitiveMode modePacked                              = FromGL<PrimitiveMode>(mode);
385         DrawElementsType typePacked                           = FromGL<DrawElementsType>(type);
386         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
387         bool isCallValid = (context->skipValidation() || ValidateMultiDrawElementsBaseVertex(
388                                                              context, modePacked, count, typePacked,
389                                                              indices, drawcount, basevertex));
390         if (isCallValid)
391         {
392             context->multiDrawElementsBaseVertex(modePacked, count, typePacked, indices, drawcount,
393                                                  basevertex);
394         }
395         ANGLE_CAPTURE(MultiDrawElementsBaseVertex, isCallValid, context, modePacked, count,
396                       typePacked, indices, drawcount, basevertex);
397     }
398 }
399 
ProvokingVertex(GLenum mode)400 void GL_APIENTRY ProvokingVertex(GLenum mode)
401 {
402     Context *context = GetValidGlobalContext();
403     EVENT("glProvokingVertex", "context = %d, GLenum mode = %s", CID(context),
404           GLenumToString(GLenumGroup::VertexProvokingMode, mode));
405 
406     if (context)
407     {
408         ProvokingVertexConvention modePacked = FromGL<ProvokingVertexConvention>(mode);
409         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
410         bool isCallValid =
411             (context->skipValidation() || ValidateProvokingVertex(context, modePacked));
412         if (isCallValid)
413         {
414             context->provokingVertex(modePacked);
415         }
416         ANGLE_CAPTURE(ProvokingVertex, isCallValid, context, modePacked);
417     }
418 }
419 
SampleMaski(GLuint maskNumber,GLbitfield mask)420 void GL_APIENTRY SampleMaski(GLuint maskNumber, GLbitfield mask)
421 {
422     Context *context = GetValidGlobalContext();
423     EVENT("glSampleMaski", "context = %d, GLuint maskNumber = %u, GLbitfield mask = %s",
424           CID(context), maskNumber, GLbitfieldToString(GLenumGroup::DefaultGroup, mask).c_str());
425 
426     if (context)
427     {
428         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
429         bool isCallValid =
430             (context->skipValidation() || ValidateSampleMaski(context, maskNumber, mask));
431         if (isCallValid)
432         {
433             context->sampleMaski(maskNumber, mask);
434         }
435         ANGLE_CAPTURE(SampleMaski, isCallValid, context, maskNumber, mask);
436     }
437 }
438 
TexImage2DMultisample(GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)439 void GL_APIENTRY TexImage2DMultisample(GLenum target,
440                                        GLsizei samples,
441                                        GLenum internalformat,
442                                        GLsizei width,
443                                        GLsizei height,
444                                        GLboolean fixedsamplelocations)
445 {
446     Context *context = GetValidGlobalContext();
447     EVENT("glTexImage2DMultisample",
448           "context = %d, GLenum target = %s, GLsizei samples = %d, GLenum internalformat = %s, "
449           "GLsizei width = %d, GLsizei height = %d, GLboolean fixedsamplelocations = %s",
450           CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,
451           GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height,
452           GLbooleanToString(fixedsamplelocations));
453 
454     if (context)
455     {
456         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
457         bool isCallValid                                      = (context->skipValidation() ||
458                             ValidateTexImage2DMultisample(context, target, samples, internalformat,
459                                                           width, height, fixedsamplelocations));
460         if (isCallValid)
461         {
462             context->texImage2DMultisample(target, samples, internalformat, width, height,
463                                            fixedsamplelocations);
464         }
465         ANGLE_CAPTURE(TexImage2DMultisample, isCallValid, context, target, samples, internalformat,
466                       width, height, fixedsamplelocations);
467     }
468 }
469 
TexImage3DMultisample(GLenum target,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedsamplelocations)470 void GL_APIENTRY TexImage3DMultisample(GLenum target,
471                                        GLsizei samples,
472                                        GLenum internalformat,
473                                        GLsizei width,
474                                        GLsizei height,
475                                        GLsizei depth,
476                                        GLboolean fixedsamplelocations)
477 {
478     Context *context = GetValidGlobalContext();
479     EVENT("glTexImage3DMultisample",
480           "context = %d, GLenum target = %s, GLsizei samples = %d, GLenum internalformat = %s, "
481           "GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLboolean "
482           "fixedsamplelocations = %s",
483           CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,
484           GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth,
485           GLbooleanToString(fixedsamplelocations));
486 
487     if (context)
488     {
489         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
490         bool isCallValid =
491             (context->skipValidation() ||
492              ValidateTexImage3DMultisample(context, target, samples, internalformat, width, height,
493                                            depth, fixedsamplelocations));
494         if (isCallValid)
495         {
496             context->texImage3DMultisample(target, samples, internalformat, width, height, depth,
497                                            fixedsamplelocations);
498         }
499         ANGLE_CAPTURE(TexImage3DMultisample, isCallValid, context, target, samples, internalformat,
500                       width, height, depth, fixedsamplelocations);
501     }
502 }
503 
WaitSync(GLsync sync,GLbitfield flags,GLuint64 timeout)504 void GL_APIENTRY WaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout)
505 {
506     Context *context = GetValidGlobalContext();
507     EVENT("glWaitSync",
508           "context = %d, GLsync sync = 0x%016" PRIxPTR
509           ", GLbitfield flags = %s, GLuint64 timeout = %llu",
510           CID(context), (uintptr_t)sync,
511           GLbitfieldToString(GLenumGroup::DefaultGroup, flags).c_str(),
512           static_cast<unsigned long long>(timeout));
513 
514     if (context)
515     {
516         std::unique_lock<angle::GlobalMutex> shareContextLock = GetShareGroupLock(context);
517         bool isCallValid =
518             (context->skipValidation() || ValidateWaitSync(context, sync, flags, timeout));
519         if (isCallValid)
520         {
521             context->waitSync(sync, flags, timeout);
522         }
523         ANGLE_CAPTURE(WaitSync, isCallValid, context, sync, flags, timeout);
524     }
525 }
526 }  // namespace gl
527