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_gl_4_5_autogen.cpp:
9 // Defines the GL 4.5 entry points.
10
11 #include "libGL/entry_points_gl_4_5_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_autogen.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/validationESEXT.h"
24 #include "libANGLE/validationGL45_autogen.h"
25 #include "libGLESv2/global_state.h"
26
27 namespace gl
28 {
BindTextureUnit(GLuint unit,GLuint texture)29 void GL_APIENTRY BindTextureUnit(GLuint unit, GLuint texture)
30 {
31 EVENT("(GLuint unit = %u, GLuint texture = %u)", unit, texture);
32
33 Context *context = GetValidGlobalContext();
34 if (context)
35 {
36 TextureID texturePacked = FromGL<TextureID>(texture);
37 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
38 bool isCallValid =
39 (context->skipValidation() || ValidateBindTextureUnit(context, unit, texturePacked));
40 if (isCallValid)
41 {
42 context->bindTextureUnit(unit, texturePacked);
43 }
44 ANGLE_CAPTURE(BindTextureUnit, isCallValid, context, unit, texturePacked);
45 }
46 }
47
BlitNamedFramebuffer(GLuint readFramebuffer,GLuint drawFramebuffer,GLint srcX0,GLint srcY0,GLint srcX1,GLint srcY1,GLint dstX0,GLint dstY0,GLint dstX1,GLint dstY1,GLbitfield mask,GLenum filter)48 void GL_APIENTRY BlitNamedFramebuffer(GLuint readFramebuffer,
49 GLuint drawFramebuffer,
50 GLint srcX0,
51 GLint srcY0,
52 GLint srcX1,
53 GLint srcY1,
54 GLint dstX0,
55 GLint dstY0,
56 GLint dstX1,
57 GLint dstY1,
58 GLbitfield mask,
59 GLenum filter)
60 {
61 EVENT(
62 "(GLuint readFramebuffer = %u, GLuint drawFramebuffer = %u, GLint srcX0 = %d, GLint srcY0 "
63 "= %d, GLint srcX1 = %d, GLint srcY1 = %d, GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 "
64 "= %d, GLint dstY1 = %d, GLbitfield mask = %s, GLenum filter = %s)",
65 readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1,
66 GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(),
67 GLenumToString(GLenumGroup::BlitFramebufferFilter, filter));
68
69 Context *context = GetValidGlobalContext();
70 if (context)
71 {
72 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
73 bool isCallValid =
74 (context->skipValidation() ||
75 ValidateBlitNamedFramebuffer(context, readFramebuffer, drawFramebuffer, srcX0, srcY0,
76 srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
77 if (isCallValid)
78 {
79 context->blitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1,
80 srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
81 }
82 ANGLE_CAPTURE(BlitNamedFramebuffer, isCallValid, context, readFramebuffer, drawFramebuffer,
83 srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
84 }
85 }
86
CheckNamedFramebufferStatus(GLuint framebuffer,GLenum target)87 GLenum GL_APIENTRY CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
88 {
89 EVENT("(GLuint framebuffer = %u, GLenum target = %s)", framebuffer,
90 GLenumToString(GLenumGroup::FramebufferTarget, target));
91
92 Context *context = GetValidGlobalContext();
93 GLenum returnValue;
94 if (context)
95 {
96 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
97 bool isCallValid = (context->skipValidation() ||
98 ValidateCheckNamedFramebufferStatus(context, framebuffer, target));
99 if (isCallValid)
100 {
101 returnValue = context->checkNamedFramebufferStatus(framebuffer, target);
102 }
103 else
104 {
105 returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
106 }
107 ANGLE_CAPTURE(CheckNamedFramebufferStatus, isCallValid, context, framebuffer, target,
108 returnValue);
109 }
110 else
111 {
112 returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
113 }
114 return returnValue;
115 }
116
ClearNamedBufferData(GLuint buffer,GLenum internalformat,GLenum format,GLenum type,const void * data)117 void GL_APIENTRY ClearNamedBufferData(GLuint buffer,
118 GLenum internalformat,
119 GLenum format,
120 GLenum type,
121 const void *data)
122 {
123 EVENT(
124 "(GLuint buffer = %u, GLenum internalformat = %s, GLenum format = %s, GLenum type = %s, "
125 "const void *data = 0x%016" PRIxPTR ")",
126 buffer, GLenumToString(GLenumGroup::InternalFormat, internalformat),
127 GLenumToString(GLenumGroup::PixelFormat, format),
128 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
129
130 Context *context = GetValidGlobalContext();
131 if (context)
132 {
133 BufferID bufferPacked = FromGL<BufferID>(buffer);
134 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
135 bool isCallValid = (context->skipValidation() ||
136 ValidateClearNamedBufferData(context, bufferPacked, internalformat,
137 format, type, data));
138 if (isCallValid)
139 {
140 context->clearNamedBufferData(bufferPacked, internalformat, format, type, data);
141 }
142 ANGLE_CAPTURE(ClearNamedBufferData, isCallValid, context, bufferPacked, internalformat,
143 format, type, data);
144 }
145 }
146
ClearNamedBufferSubData(GLuint buffer,GLenum internalformat,GLintptr offset,GLsizeiptr size,GLenum format,GLenum type,const void * data)147 void GL_APIENTRY ClearNamedBufferSubData(GLuint buffer,
148 GLenum internalformat,
149 GLintptr offset,
150 GLsizeiptr size,
151 GLenum format,
152 GLenum type,
153 const void *data)
154 {
155 EVENT(
156 "(GLuint buffer = %u, GLenum internalformat = %s, GLintptr offset = %llu, GLsizeiptr size "
157 "= %llu, GLenum format = %s, GLenum type = %s, const void *data = 0x%016" PRIxPTR ")",
158 buffer, GLenumToString(GLenumGroup::InternalFormat, internalformat),
159 static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
160 GLenumToString(GLenumGroup::PixelFormat, format),
161 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
162
163 Context *context = GetValidGlobalContext();
164 if (context)
165 {
166 BufferID bufferPacked = FromGL<BufferID>(buffer);
167 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
168 bool isCallValid = (context->skipValidation() ||
169 ValidateClearNamedBufferSubData(context, bufferPacked, internalformat,
170 offset, size, format, type, data));
171 if (isCallValid)
172 {
173 context->clearNamedBufferSubData(bufferPacked, internalformat, offset, size, format,
174 type, data);
175 }
176 ANGLE_CAPTURE(ClearNamedBufferSubData, isCallValid, context, bufferPacked, internalformat,
177 offset, size, format, type, data);
178 }
179 }
180
ClearNamedFramebufferfi(GLuint framebuffer,GLenum buffer,GLint drawbuffer,GLfloat depth,GLint stencil)181 void GL_APIENTRY ClearNamedFramebufferfi(GLuint framebuffer,
182 GLenum buffer,
183 GLint drawbuffer,
184 GLfloat depth,
185 GLint stencil)
186 {
187 EVENT(
188 "(GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, GLfloat depth = %f, "
189 "GLint stencil = %d)",
190 framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, depth, stencil);
191
192 Context *context = GetValidGlobalContext();
193 if (context)
194 {
195 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
196 bool isCallValid = (context->skipValidation() ||
197 ValidateClearNamedFramebufferfi(context, framebuffer, buffer,
198 drawbuffer, depth, stencil));
199 if (isCallValid)
200 {
201 context->clearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil);
202 }
203 ANGLE_CAPTURE(ClearNamedFramebufferfi, isCallValid, context, framebuffer, buffer,
204 drawbuffer, depth, stencil);
205 }
206 }
207
ClearNamedFramebufferfv(GLuint framebuffer,GLenum buffer,GLint drawbuffer,const GLfloat * value)208 void GL_APIENTRY ClearNamedFramebufferfv(GLuint framebuffer,
209 GLenum buffer,
210 GLint drawbuffer,
211 const GLfloat *value)
212 {
213 EVENT(
214 "(GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, const GLfloat *value "
215 "= 0x%016" PRIxPTR ")",
216 framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value);
217
218 Context *context = GetValidGlobalContext();
219 if (context)
220 {
221 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
222 bool isCallValid =
223 (context->skipValidation() ||
224 ValidateClearNamedFramebufferfv(context, framebuffer, buffer, drawbuffer, value));
225 if (isCallValid)
226 {
227 context->clearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value);
228 }
229 ANGLE_CAPTURE(ClearNamedFramebufferfv, isCallValid, context, framebuffer, buffer,
230 drawbuffer, value);
231 }
232 }
233
ClearNamedFramebufferiv(GLuint framebuffer,GLenum buffer,GLint drawbuffer,const GLint * value)234 void GL_APIENTRY ClearNamedFramebufferiv(GLuint framebuffer,
235 GLenum buffer,
236 GLint drawbuffer,
237 const GLint *value)
238 {
239 EVENT(
240 "(GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, const GLint *value = "
241 "0x%016" PRIxPTR ")",
242 framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value);
243
244 Context *context = GetValidGlobalContext();
245 if (context)
246 {
247 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
248 bool isCallValid =
249 (context->skipValidation() ||
250 ValidateClearNamedFramebufferiv(context, framebuffer, buffer, drawbuffer, value));
251 if (isCallValid)
252 {
253 context->clearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value);
254 }
255 ANGLE_CAPTURE(ClearNamedFramebufferiv, isCallValid, context, framebuffer, buffer,
256 drawbuffer, value);
257 }
258 }
259
ClearNamedFramebufferuiv(GLuint framebuffer,GLenum buffer,GLint drawbuffer,const GLuint * value)260 void GL_APIENTRY ClearNamedFramebufferuiv(GLuint framebuffer,
261 GLenum buffer,
262 GLint drawbuffer,
263 const GLuint *value)
264 {
265 EVENT(
266 "(GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, const GLuint *value "
267 "= 0x%016" PRIxPTR ")",
268 framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, (uintptr_t)value);
269
270 Context *context = GetValidGlobalContext();
271 if (context)
272 {
273 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
274 bool isCallValid =
275 (context->skipValidation() ||
276 ValidateClearNamedFramebufferuiv(context, framebuffer, buffer, drawbuffer, value));
277 if (isCallValid)
278 {
279 context->clearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value);
280 }
281 ANGLE_CAPTURE(ClearNamedFramebufferuiv, isCallValid, context, framebuffer, buffer,
282 drawbuffer, value);
283 }
284 }
285
ClipControl(GLenum origin,GLenum depth)286 void GL_APIENTRY ClipControl(GLenum origin, GLenum depth)
287 {
288 EVENT("(GLenum origin = %s, GLenum depth = %s)",
289 GLenumToString(GLenumGroup::ClipControlOrigin, origin),
290 GLenumToString(GLenumGroup::ClipControlDepth, depth));
291
292 Context *context = GetValidGlobalContext();
293 if (context)
294 {
295 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
296 bool isCallValid =
297 (context->skipValidation() || ValidateClipControl(context, origin, depth));
298 if (isCallValid)
299 {
300 context->clipControl(origin, depth);
301 }
302 ANGLE_CAPTURE(ClipControl, isCallValid, context, origin, depth);
303 }
304 }
305
CompressedTextureSubImage1D(GLuint texture,GLint level,GLint xoffset,GLsizei width,GLenum format,GLsizei imageSize,const void * data)306 void GL_APIENTRY CompressedTextureSubImage1D(GLuint texture,
307 GLint level,
308 GLint xoffset,
309 GLsizei width,
310 GLenum format,
311 GLsizei imageSize,
312 const void *data)
313 {
314 EVENT(
315 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLsizei width = %d, GLenum "
316 "format = %s, GLsizei imageSize = %d, const void *data = 0x%016" PRIxPTR ")",
317 texture, level, xoffset, width, GLenumToString(GLenumGroup::PixelFormat, format), imageSize,
318 (uintptr_t)data);
319
320 Context *context = GetValidGlobalContext();
321 if (context)
322 {
323 TextureID texturePacked = FromGL<TextureID>(texture);
324 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
325 bool isCallValid = (context->skipValidation() || ValidateCompressedTextureSubImage1D(
326 context, texturePacked, level, xoffset,
327 width, format, imageSize, data));
328 if (isCallValid)
329 {
330 context->compressedTextureSubImage1D(texturePacked, level, xoffset, width, format,
331 imageSize, data);
332 }
333 ANGLE_CAPTURE(CompressedTextureSubImage1D, isCallValid, context, texturePacked, level,
334 xoffset, width, format, imageSize, data);
335 }
336 }
337
CompressedTextureSubImage2D(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLsizei imageSize,const void * data)338 void GL_APIENTRY CompressedTextureSubImage2D(GLuint texture,
339 GLint level,
340 GLint xoffset,
341 GLint yoffset,
342 GLsizei width,
343 GLsizei height,
344 GLenum format,
345 GLsizei imageSize,
346 const void *data)
347 {
348 EVENT(
349 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
350 "width = %d, GLsizei height = %d, GLenum format = %s, GLsizei imageSize = %d, const void "
351 "*data = 0x%016" PRIxPTR ")",
352 texture, level, xoffset, yoffset, width, height,
353 GLenumToString(GLenumGroup::PixelFormat, format), imageSize, (uintptr_t)data);
354
355 Context *context = GetValidGlobalContext();
356 if (context)
357 {
358 TextureID texturePacked = FromGL<TextureID>(texture);
359 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
360 bool isCallValid =
361 (context->skipValidation() ||
362 ValidateCompressedTextureSubImage2D(context, texturePacked, level, xoffset, yoffset,
363 width, height, format, imageSize, data));
364 if (isCallValid)
365 {
366 context->compressedTextureSubImage2D(texturePacked, level, xoffset, yoffset, width,
367 height, format, imageSize, data);
368 }
369 ANGLE_CAPTURE(CompressedTextureSubImage2D, isCallValid, context, texturePacked, level,
370 xoffset, yoffset, width, height, format, imageSize, data);
371 }
372 }
373
CompressedTextureSubImage3D(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLsizei imageSize,const void * data)374 void GL_APIENTRY CompressedTextureSubImage3D(GLuint texture,
375 GLint level,
376 GLint xoffset,
377 GLint yoffset,
378 GLint zoffset,
379 GLsizei width,
380 GLsizei height,
381 GLsizei depth,
382 GLenum format,
383 GLsizei imageSize,
384 const void *data)
385 {
386 EVENT(
387 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
388 "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
389 "= %s, GLsizei imageSize = %d, const void *data = 0x%016" PRIxPTR ")",
390 texture, level, xoffset, yoffset, zoffset, width, height, depth,
391 GLenumToString(GLenumGroup::PixelFormat, format), imageSize, (uintptr_t)data);
392
393 Context *context = GetValidGlobalContext();
394 if (context)
395 {
396 TextureID texturePacked = FromGL<TextureID>(texture);
397 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
398 bool isCallValid = (context->skipValidation() ||
399 ValidateCompressedTextureSubImage3D(
400 context, texturePacked, level, xoffset, yoffset, zoffset, width,
401 height, depth, format, imageSize, data));
402 if (isCallValid)
403 {
404 context->compressedTextureSubImage3D(texturePacked, level, xoffset, yoffset, zoffset,
405 width, height, depth, format, imageSize, data);
406 }
407 ANGLE_CAPTURE(CompressedTextureSubImage3D, isCallValid, context, texturePacked, level,
408 xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
409 }
410 }
411
CopyNamedBufferSubData(GLuint readBuffer,GLuint writeBuffer,GLintptr readOffset,GLintptr writeOffset,GLsizeiptr size)412 void GL_APIENTRY CopyNamedBufferSubData(GLuint readBuffer,
413 GLuint writeBuffer,
414 GLintptr readOffset,
415 GLintptr writeOffset,
416 GLsizeiptr size)
417 {
418 EVENT(
419 "(GLuint readBuffer = %u, GLuint writeBuffer = %u, GLintptr readOffset = %llu, GLintptr "
420 "writeOffset = %llu, GLsizeiptr size = %llu)",
421 readBuffer, writeBuffer, static_cast<unsigned long long>(readOffset),
422 static_cast<unsigned long long>(writeOffset), static_cast<unsigned long long>(size));
423
424 Context *context = GetValidGlobalContext();
425 if (context)
426 {
427 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
428 bool isCallValid = (context->skipValidation() ||
429 ValidateCopyNamedBufferSubData(context, readBuffer, writeBuffer,
430 readOffset, writeOffset, size));
431 if (isCallValid)
432 {
433 context->copyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size);
434 }
435 ANGLE_CAPTURE(CopyNamedBufferSubData, isCallValid, context, readBuffer, writeBuffer,
436 readOffset, writeOffset, size);
437 }
438 }
439
440 void GL_APIENTRY
CopyTextureSubImage1D(GLuint texture,GLint level,GLint xoffset,GLint x,GLint y,GLsizei width)441 CopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
442 {
443 EVENT(
444 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint x = %d, GLint y = %d, "
445 "GLsizei width = %d)",
446 texture, level, xoffset, x, y, width);
447
448 Context *context = GetValidGlobalContext();
449 if (context)
450 {
451 TextureID texturePacked = FromGL<TextureID>(texture);
452 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
453 bool isCallValid =
454 (context->skipValidation() ||
455 ValidateCopyTextureSubImage1D(context, texturePacked, level, xoffset, x, y, width));
456 if (isCallValid)
457 {
458 context->copyTextureSubImage1D(texturePacked, level, xoffset, x, y, width);
459 }
460 ANGLE_CAPTURE(CopyTextureSubImage1D, isCallValid, context, texturePacked, level, xoffset, x,
461 y, width);
462 }
463 }
464
CopyTextureSubImage2D(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLint x,GLint y,GLsizei width,GLsizei height)465 void GL_APIENTRY CopyTextureSubImage2D(GLuint texture,
466 GLint level,
467 GLint xoffset,
468 GLint yoffset,
469 GLint x,
470 GLint y,
471 GLsizei width,
472 GLsizei height)
473 {
474 EVENT(
475 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint x = "
476 "%d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
477 texture, level, xoffset, yoffset, x, y, width, height);
478
479 Context *context = GetValidGlobalContext();
480 if (context)
481 {
482 TextureID texturePacked = FromGL<TextureID>(texture);
483 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
484 bool isCallValid = (context->skipValidation() ||
485 ValidateCopyTextureSubImage2D(context, texturePacked, level, xoffset,
486 yoffset, x, y, width, height));
487 if (isCallValid)
488 {
489 context->copyTextureSubImage2D(texturePacked, level, xoffset, yoffset, x, y, width,
490 height);
491 }
492 ANGLE_CAPTURE(CopyTextureSubImage2D, isCallValid, context, texturePacked, level, xoffset,
493 yoffset, x, y, width, height);
494 }
495 }
496
CopyTextureSubImage3D(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLint x,GLint y,GLsizei width,GLsizei height)497 void GL_APIENTRY CopyTextureSubImage3D(GLuint texture,
498 GLint level,
499 GLint xoffset,
500 GLint yoffset,
501 GLint zoffset,
502 GLint x,
503 GLint y,
504 GLsizei width,
505 GLsizei height)
506 {
507 EVENT(
508 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
509 "zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
510 texture, level, xoffset, yoffset, zoffset, x, y, width, height);
511
512 Context *context = GetValidGlobalContext();
513 if (context)
514 {
515 TextureID texturePacked = FromGL<TextureID>(texture);
516 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
517 bool isCallValid = (context->skipValidation() ||
518 ValidateCopyTextureSubImage3D(context, texturePacked, level, xoffset,
519 yoffset, zoffset, x, y, width, height));
520 if (isCallValid)
521 {
522 context->copyTextureSubImage3D(texturePacked, level, xoffset, yoffset, zoffset, x, y,
523 width, height);
524 }
525 ANGLE_CAPTURE(CopyTextureSubImage3D, isCallValid, context, texturePacked, level, xoffset,
526 yoffset, zoffset, x, y, width, height);
527 }
528 }
529
CreateBuffers(GLsizei n,GLuint * buffers)530 void GL_APIENTRY CreateBuffers(GLsizei n, GLuint *buffers)
531 {
532 EVENT("(GLsizei n = %d, GLuint *buffers = 0x%016" PRIxPTR ")", n, (uintptr_t)buffers);
533
534 Context *context = GetValidGlobalContext();
535 if (context)
536 {
537 BufferID *buffersPacked = FromGL<BufferID *>(buffers);
538 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
539 bool isCallValid =
540 (context->skipValidation() || ValidateCreateBuffers(context, n, buffersPacked));
541 if (isCallValid)
542 {
543 context->createBuffers(n, buffersPacked);
544 }
545 ANGLE_CAPTURE(CreateBuffers, isCallValid, context, n, buffersPacked);
546 }
547 }
548
CreateFramebuffers(GLsizei n,GLuint * framebuffers)549 void GL_APIENTRY CreateFramebuffers(GLsizei n, GLuint *framebuffers)
550 {
551 EVENT("(GLsizei n = %d, GLuint *framebuffers = 0x%016" PRIxPTR ")", n, (uintptr_t)framebuffers);
552
553 Context *context = GetValidGlobalContext();
554 if (context)
555 {
556 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
557 bool isCallValid =
558 (context->skipValidation() || ValidateCreateFramebuffers(context, n, framebuffers));
559 if (isCallValid)
560 {
561 context->createFramebuffers(n, framebuffers);
562 }
563 ANGLE_CAPTURE(CreateFramebuffers, isCallValid, context, n, framebuffers);
564 }
565 }
566
CreateProgramPipelines(GLsizei n,GLuint * pipelines)567 void GL_APIENTRY CreateProgramPipelines(GLsizei n, GLuint *pipelines)
568 {
569 EVENT("(GLsizei n = %d, GLuint *pipelines = 0x%016" PRIxPTR ")", n, (uintptr_t)pipelines);
570
571 Context *context = GetValidGlobalContext();
572 if (context)
573 {
574 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
575 bool isCallValid =
576 (context->skipValidation() || ValidateCreateProgramPipelines(context, n, pipelines));
577 if (isCallValid)
578 {
579 context->createProgramPipelines(n, pipelines);
580 }
581 ANGLE_CAPTURE(CreateProgramPipelines, isCallValid, context, n, pipelines);
582 }
583 }
584
CreateQueries(GLenum target,GLsizei n,GLuint * ids)585 void GL_APIENTRY CreateQueries(GLenum target, GLsizei n, GLuint *ids)
586 {
587 EVENT("(GLenum target = %s, GLsizei n = %d, GLuint *ids = 0x%016" PRIxPTR ")",
588 GLenumToString(GLenumGroup::QueryTarget, target), n, (uintptr_t)ids);
589
590 Context *context = GetValidGlobalContext();
591 if (context)
592 {
593 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
594 bool isCallValid =
595 (context->skipValidation() || ValidateCreateQueries(context, target, n, ids));
596 if (isCallValid)
597 {
598 context->createQueries(target, n, ids);
599 }
600 ANGLE_CAPTURE(CreateQueries, isCallValid, context, target, n, ids);
601 }
602 }
603
CreateRenderbuffers(GLsizei n,GLuint * renderbuffers)604 void GL_APIENTRY CreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
605 {
606 EVENT("(GLsizei n = %d, GLuint *renderbuffers = 0x%016" PRIxPTR ")", n,
607 (uintptr_t)renderbuffers);
608
609 Context *context = GetValidGlobalContext();
610 if (context)
611 {
612 RenderbufferID *renderbuffersPacked = FromGL<RenderbufferID *>(renderbuffers);
613 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
614 bool isCallValid = (context->skipValidation() ||
615 ValidateCreateRenderbuffers(context, n, renderbuffersPacked));
616 if (isCallValid)
617 {
618 context->createRenderbuffers(n, renderbuffersPacked);
619 }
620 ANGLE_CAPTURE(CreateRenderbuffers, isCallValid, context, n, renderbuffersPacked);
621 }
622 }
623
CreateSamplers(GLsizei n,GLuint * samplers)624 void GL_APIENTRY CreateSamplers(GLsizei n, GLuint *samplers)
625 {
626 EVENT("(GLsizei n = %d, GLuint *samplers = 0x%016" PRIxPTR ")", n, (uintptr_t)samplers);
627
628 Context *context = GetValidGlobalContext();
629 if (context)
630 {
631 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
632 bool isCallValid =
633 (context->skipValidation() || ValidateCreateSamplers(context, n, samplers));
634 if (isCallValid)
635 {
636 context->createSamplers(n, samplers);
637 }
638 ANGLE_CAPTURE(CreateSamplers, isCallValid, context, n, samplers);
639 }
640 }
641
CreateTextures(GLenum target,GLsizei n,GLuint * textures)642 void GL_APIENTRY CreateTextures(GLenum target, GLsizei n, GLuint *textures)
643 {
644 EVENT("(GLenum target = %s, GLsizei n = %d, GLuint *textures = 0x%016" PRIxPTR ")",
645 GLenumToString(GLenumGroup::TextureTarget, target), n, (uintptr_t)textures);
646
647 Context *context = GetValidGlobalContext();
648 if (context)
649 {
650 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
651 bool isCallValid =
652 (context->skipValidation() || ValidateCreateTextures(context, target, n, textures));
653 if (isCallValid)
654 {
655 context->createTextures(target, n, textures);
656 }
657 ANGLE_CAPTURE(CreateTextures, isCallValid, context, target, n, textures);
658 }
659 }
660
CreateTransformFeedbacks(GLsizei n,GLuint * ids)661 void GL_APIENTRY CreateTransformFeedbacks(GLsizei n, GLuint *ids)
662 {
663 EVENT("(GLsizei n = %d, GLuint *ids = 0x%016" PRIxPTR ")", n, (uintptr_t)ids);
664
665 Context *context = GetValidGlobalContext();
666 if (context)
667 {
668 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
669 bool isCallValid =
670 (context->skipValidation() || ValidateCreateTransformFeedbacks(context, n, ids));
671 if (isCallValid)
672 {
673 context->createTransformFeedbacks(n, ids);
674 }
675 ANGLE_CAPTURE(CreateTransformFeedbacks, isCallValid, context, n, ids);
676 }
677 }
678
CreateVertexArrays(GLsizei n,GLuint * arrays)679 void GL_APIENTRY CreateVertexArrays(GLsizei n, GLuint *arrays)
680 {
681 EVENT("(GLsizei n = %d, GLuint *arrays = 0x%016" PRIxPTR ")", n, (uintptr_t)arrays);
682
683 Context *context = GetValidGlobalContext();
684 if (context)
685 {
686 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
687 bool isCallValid =
688 (context->skipValidation() || ValidateCreateVertexArrays(context, n, arrays));
689 if (isCallValid)
690 {
691 context->createVertexArrays(n, arrays);
692 }
693 ANGLE_CAPTURE(CreateVertexArrays, isCallValid, context, n, arrays);
694 }
695 }
696
DisableVertexArrayAttrib(GLuint vaobj,GLuint index)697 void GL_APIENTRY DisableVertexArrayAttrib(GLuint vaobj, GLuint index)
698 {
699 EVENT("(GLuint vaobj = %u, GLuint index = %u)", vaobj, index);
700
701 Context *context = GetValidGlobalContext();
702 if (context)
703 {
704 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
705 bool isCallValid =
706 (context->skipValidation() || ValidateDisableVertexArrayAttrib(context, vaobj, index));
707 if (isCallValid)
708 {
709 context->disableVertexArrayAttrib(vaobj, index);
710 }
711 ANGLE_CAPTURE(DisableVertexArrayAttrib, isCallValid, context, vaobj, index);
712 }
713 }
714
EnableVertexArrayAttrib(GLuint vaobj,GLuint index)715 void GL_APIENTRY EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
716 {
717 EVENT("(GLuint vaobj = %u, GLuint index = %u)", vaobj, index);
718
719 Context *context = GetValidGlobalContext();
720 if (context)
721 {
722 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
723 bool isCallValid =
724 (context->skipValidation() || ValidateEnableVertexArrayAttrib(context, vaobj, index));
725 if (isCallValid)
726 {
727 context->enableVertexArrayAttrib(vaobj, index);
728 }
729 ANGLE_CAPTURE(EnableVertexArrayAttrib, isCallValid, context, vaobj, index);
730 }
731 }
732
FlushMappedNamedBufferRange(GLuint buffer,GLintptr offset,GLsizeiptr length)733 void GL_APIENTRY FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length)
734 {
735 EVENT("(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu)", buffer,
736 static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length));
737
738 Context *context = GetValidGlobalContext();
739 if (context)
740 {
741 BufferID bufferPacked = FromGL<BufferID>(buffer);
742 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
743 bool isCallValid =
744 (context->skipValidation() ||
745 ValidateFlushMappedNamedBufferRange(context, bufferPacked, offset, length));
746 if (isCallValid)
747 {
748 context->flushMappedNamedBufferRange(bufferPacked, offset, length);
749 }
750 ANGLE_CAPTURE(FlushMappedNamedBufferRange, isCallValid, context, bufferPacked, offset,
751 length);
752 }
753 }
754
GenerateTextureMipmap(GLuint texture)755 void GL_APIENTRY GenerateTextureMipmap(GLuint texture)
756 {
757 EVENT("(GLuint texture = %u)", texture);
758
759 Context *context = GetValidGlobalContext();
760 if (context)
761 {
762 TextureID texturePacked = FromGL<TextureID>(texture);
763 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
764 bool isCallValid =
765 (context->skipValidation() || ValidateGenerateTextureMipmap(context, texturePacked));
766 if (isCallValid)
767 {
768 context->generateTextureMipmap(texturePacked);
769 }
770 ANGLE_CAPTURE(GenerateTextureMipmap, isCallValid, context, texturePacked);
771 }
772 }
773
GetCompressedTextureImage(GLuint texture,GLint level,GLsizei bufSize,void * pixels)774 void GL_APIENTRY GetCompressedTextureImage(GLuint texture,
775 GLint level,
776 GLsizei bufSize,
777 void *pixels)
778 {
779 EVENT(
780 "(GLuint texture = %u, GLint level = %d, GLsizei bufSize = %d, void *pixels = "
781 "0x%016" PRIxPTR ")",
782 texture, level, bufSize, (uintptr_t)pixels);
783
784 Context *context = GetValidGlobalContext();
785 if (context)
786 {
787 TextureID texturePacked = FromGL<TextureID>(texture);
788 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
789 bool isCallValid =
790 (context->skipValidation() ||
791 ValidateGetCompressedTextureImage(context, texturePacked, level, bufSize, pixels));
792 if (isCallValid)
793 {
794 context->getCompressedTextureImage(texturePacked, level, bufSize, pixels);
795 }
796 ANGLE_CAPTURE(GetCompressedTextureImage, isCallValid, context, texturePacked, level,
797 bufSize, pixels);
798 }
799 }
800
GetCompressedTextureSubImage(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLsizei bufSize,void * pixels)801 void GL_APIENTRY GetCompressedTextureSubImage(GLuint texture,
802 GLint level,
803 GLint xoffset,
804 GLint yoffset,
805 GLint zoffset,
806 GLsizei width,
807 GLsizei height,
808 GLsizei depth,
809 GLsizei bufSize,
810 void *pixels)
811 {
812 EVENT(
813 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
814 "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLsizei "
815 "bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
816 texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize,
817 (uintptr_t)pixels);
818
819 Context *context = GetValidGlobalContext();
820 if (context)
821 {
822 TextureID texturePacked = FromGL<TextureID>(texture);
823 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
824 bool isCallValid =
825 (context->skipValidation() ||
826 ValidateGetCompressedTextureSubImage(context, texturePacked, level, xoffset, yoffset,
827 zoffset, width, height, depth, bufSize, pixels));
828 if (isCallValid)
829 {
830 context->getCompressedTextureSubImage(texturePacked, level, xoffset, yoffset, zoffset,
831 width, height, depth, bufSize, pixels);
832 }
833 ANGLE_CAPTURE(GetCompressedTextureSubImage, isCallValid, context, texturePacked, level,
834 xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels);
835 }
836 }
837
GetGraphicsResetStatus()838 GLenum GL_APIENTRY GetGraphicsResetStatus()
839 {
840 EVENT("()");
841
842 Context *context = GetGlobalContext();
843 GLenum returnValue;
844 if (context)
845 {
846 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
847 bool isCallValid = (context->skipValidation() || ValidateGetGraphicsResetStatus(context));
848 if (isCallValid)
849 {
850 returnValue = context->getGraphicsResetStatus();
851 }
852 else
853 {
854 returnValue = GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatus, GLenum>();
855 }
856 ANGLE_CAPTURE(GetGraphicsResetStatus, isCallValid, context, returnValue);
857 }
858 else
859 {
860 returnValue = GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatus, GLenum>();
861 }
862 return returnValue;
863 }
864
GetNamedBufferParameteri64v(GLuint buffer,GLenum pname,GLint64 * params)865 void GL_APIENTRY GetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params)
866 {
867 EVENT("(GLuint buffer = %u, GLenum pname = %s, GLint64 *params = 0x%016" PRIxPTR ")", buffer,
868 GLenumToString(GLenumGroup::VertexBufferObjectParameter, pname), (uintptr_t)params);
869
870 Context *context = GetValidGlobalContext();
871 if (context)
872 {
873 BufferID bufferPacked = FromGL<BufferID>(buffer);
874 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
875 bool isCallValid = (context->skipValidation() || ValidateGetNamedBufferParameteri64v(
876 context, bufferPacked, pname, params));
877 if (isCallValid)
878 {
879 context->getNamedBufferParameteri64v(bufferPacked, pname, params);
880 }
881 ANGLE_CAPTURE(GetNamedBufferParameteri64v, isCallValid, context, bufferPacked, pname,
882 params);
883 }
884 }
885
GetNamedBufferParameteriv(GLuint buffer,GLenum pname,GLint * params)886 void GL_APIENTRY GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
887 {
888 EVENT("(GLuint buffer = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", buffer,
889 GLenumToString(GLenumGroup::VertexBufferObjectParameter, pname), (uintptr_t)params);
890
891 Context *context = GetValidGlobalContext();
892 if (context)
893 {
894 BufferID bufferPacked = FromGL<BufferID>(buffer);
895 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
896 bool isCallValid = (context->skipValidation() || ValidateGetNamedBufferParameteriv(
897 context, bufferPacked, pname, params));
898 if (isCallValid)
899 {
900 context->getNamedBufferParameteriv(bufferPacked, pname, params);
901 }
902 ANGLE_CAPTURE(GetNamedBufferParameteriv, isCallValid, context, bufferPacked, pname, params);
903 }
904 }
905
GetNamedBufferPointerv(GLuint buffer,GLenum pname,void ** params)906 void GL_APIENTRY GetNamedBufferPointerv(GLuint buffer, GLenum pname, void **params)
907 {
908 EVENT("(GLuint buffer = %u, GLenum pname = %s, void **params = 0x%016" PRIxPTR ")", buffer,
909 GLenumToString(GLenumGroup::VertexBufferObjectParameter, pname), (uintptr_t)params);
910
911 Context *context = GetValidGlobalContext();
912 if (context)
913 {
914 BufferID bufferPacked = FromGL<BufferID>(buffer);
915 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
916 bool isCallValid = (context->skipValidation() ||
917 ValidateGetNamedBufferPointerv(context, bufferPacked, pname, params));
918 if (isCallValid)
919 {
920 context->getNamedBufferPointerv(bufferPacked, pname, params);
921 }
922 ANGLE_CAPTURE(GetNamedBufferPointerv, isCallValid, context, bufferPacked, pname, params);
923 }
924 }
925
GetNamedBufferSubData(GLuint buffer,GLintptr offset,GLsizeiptr size,void * data)926 void GL_APIENTRY GetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, void *data)
927 {
928 EVENT(
929 "(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr size = %llu, void *data = "
930 "0x%016" PRIxPTR ")",
931 buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
932 (uintptr_t)data);
933
934 Context *context = GetValidGlobalContext();
935 if (context)
936 {
937 BufferID bufferPacked = FromGL<BufferID>(buffer);
938 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
939 bool isCallValid =
940 (context->skipValidation() ||
941 ValidateGetNamedBufferSubData(context, bufferPacked, offset, size, data));
942 if (isCallValid)
943 {
944 context->getNamedBufferSubData(bufferPacked, offset, size, data);
945 }
946 ANGLE_CAPTURE(GetNamedBufferSubData, isCallValid, context, bufferPacked, offset, size,
947 data);
948 }
949 }
950
GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,GLenum attachment,GLenum pname,GLint * params)951 void GL_APIENTRY GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
952 GLenum attachment,
953 GLenum pname,
954 GLint *params)
955 {
956 EVENT(
957 "(GLuint framebuffer = %u, GLenum attachment = %s, GLenum pname = %s, GLint *params = "
958 "0x%016" PRIxPTR ")",
959 framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment),
960 GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname), (uintptr_t)params);
961
962 Context *context = GetValidGlobalContext();
963 if (context)
964 {
965 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
966 bool isCallValid =
967 (context->skipValidation() || ValidateGetNamedFramebufferAttachmentParameteriv(
968 context, framebuffer, attachment, pname, params));
969 if (isCallValid)
970 {
971 context->getNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname,
972 params);
973 }
974 ANGLE_CAPTURE(GetNamedFramebufferAttachmentParameteriv, isCallValid, context, framebuffer,
975 attachment, pname, params);
976 }
977 }
978
GetNamedFramebufferParameteriv(GLuint framebuffer,GLenum pname,GLint * param)979 void GL_APIENTRY GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param)
980 {
981 EVENT("(GLuint framebuffer = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR ")",
982 framebuffer, GLenumToString(GLenumGroup::GetFramebufferParameter, pname),
983 (uintptr_t)param);
984
985 Context *context = GetValidGlobalContext();
986 if (context)
987 {
988 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
989 bool isCallValid = (context->skipValidation() || ValidateGetNamedFramebufferParameteriv(
990 context, framebuffer, pname, param));
991 if (isCallValid)
992 {
993 context->getNamedFramebufferParameteriv(framebuffer, pname, param);
994 }
995 ANGLE_CAPTURE(GetNamedFramebufferParameteriv, isCallValid, context, framebuffer, pname,
996 param);
997 }
998 }
999
GetNamedRenderbufferParameteriv(GLuint renderbuffer,GLenum pname,GLint * params)1000 void GL_APIENTRY GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params)
1001 {
1002 EVENT("(GLuint renderbuffer = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")",
1003 renderbuffer, GLenumToString(GLenumGroup::RenderbufferParameterName, pname),
1004 (uintptr_t)params);
1005
1006 Context *context = GetValidGlobalContext();
1007 if (context)
1008 {
1009 RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
1010 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1011 bool isCallValid =
1012 (context->skipValidation() ||
1013 ValidateGetNamedRenderbufferParameteriv(context, renderbufferPacked, pname, params));
1014 if (isCallValid)
1015 {
1016 context->getNamedRenderbufferParameteriv(renderbufferPacked, pname, params);
1017 }
1018 ANGLE_CAPTURE(GetNamedRenderbufferParameteriv, isCallValid, context, renderbufferPacked,
1019 pname, params);
1020 }
1021 }
1022
GetQueryBufferObjecti64v(GLuint id,GLuint buffer,GLenum pname,GLintptr offset)1023 void GL_APIENTRY GetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1024 {
1025 EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = %llu)", id,
1026 buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1027 static_cast<unsigned long long>(offset));
1028
1029 Context *context = GetValidGlobalContext();
1030 if (context)
1031 {
1032 BufferID bufferPacked = FromGL<BufferID>(buffer);
1033 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1034 bool isCallValid =
1035 (context->skipValidation() ||
1036 ValidateGetQueryBufferObjecti64v(context, id, bufferPacked, pname, offset));
1037 if (isCallValid)
1038 {
1039 context->getQueryBufferObjecti64v(id, bufferPacked, pname, offset);
1040 }
1041 ANGLE_CAPTURE(GetQueryBufferObjecti64v, isCallValid, context, id, bufferPacked, pname,
1042 offset);
1043 }
1044 }
1045
GetQueryBufferObjectiv(GLuint id,GLuint buffer,GLenum pname,GLintptr offset)1046 void GL_APIENTRY GetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1047 {
1048 EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = %llu)", id,
1049 buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1050 static_cast<unsigned long long>(offset));
1051
1052 Context *context = GetValidGlobalContext();
1053 if (context)
1054 {
1055 BufferID bufferPacked = FromGL<BufferID>(buffer);
1056 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1057 bool isCallValid =
1058 (context->skipValidation() ||
1059 ValidateGetQueryBufferObjectiv(context, id, bufferPacked, pname, offset));
1060 if (isCallValid)
1061 {
1062 context->getQueryBufferObjectiv(id, bufferPacked, pname, offset);
1063 }
1064 ANGLE_CAPTURE(GetQueryBufferObjectiv, isCallValid, context, id, bufferPacked, pname,
1065 offset);
1066 }
1067 }
1068
GetQueryBufferObjectui64v(GLuint id,GLuint buffer,GLenum pname,GLintptr offset)1069 void GL_APIENTRY GetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1070 {
1071 EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = %llu)", id,
1072 buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1073 static_cast<unsigned long long>(offset));
1074
1075 Context *context = GetValidGlobalContext();
1076 if (context)
1077 {
1078 BufferID bufferPacked = FromGL<BufferID>(buffer);
1079 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1080 bool isCallValid =
1081 (context->skipValidation() ||
1082 ValidateGetQueryBufferObjectui64v(context, id, bufferPacked, pname, offset));
1083 if (isCallValid)
1084 {
1085 context->getQueryBufferObjectui64v(id, bufferPacked, pname, offset);
1086 }
1087 ANGLE_CAPTURE(GetQueryBufferObjectui64v, isCallValid, context, id, bufferPacked, pname,
1088 offset);
1089 }
1090 }
1091
GetQueryBufferObjectuiv(GLuint id,GLuint buffer,GLenum pname,GLintptr offset)1092 void GL_APIENTRY GetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1093 {
1094 EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = %llu)", id,
1095 buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1096 static_cast<unsigned long long>(offset));
1097
1098 Context *context = GetValidGlobalContext();
1099 if (context)
1100 {
1101 BufferID bufferPacked = FromGL<BufferID>(buffer);
1102 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1103 bool isCallValid =
1104 (context->skipValidation() ||
1105 ValidateGetQueryBufferObjectuiv(context, id, bufferPacked, pname, offset));
1106 if (isCallValid)
1107 {
1108 context->getQueryBufferObjectuiv(id, bufferPacked, pname, offset);
1109 }
1110 ANGLE_CAPTURE(GetQueryBufferObjectuiv, isCallValid, context, id, bufferPacked, pname,
1111 offset);
1112 }
1113 }
1114
GetTextureImage(GLuint texture,GLint level,GLenum format,GLenum type,GLsizei bufSize,void * pixels)1115 void GL_APIENTRY GetTextureImage(GLuint texture,
1116 GLint level,
1117 GLenum format,
1118 GLenum type,
1119 GLsizei bufSize,
1120 void *pixels)
1121 {
1122 EVENT(
1123 "(GLuint texture = %u, GLint level = %d, GLenum format = %s, GLenum type = %s, GLsizei "
1124 "bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
1125 texture, level, GLenumToString(GLenumGroup::PixelFormat, format),
1126 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)pixels);
1127
1128 Context *context = GetValidGlobalContext();
1129 if (context)
1130 {
1131 TextureID texturePacked = FromGL<TextureID>(texture);
1132 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1133 bool isCallValid =
1134 (context->skipValidation() ||
1135 ValidateGetTextureImage(context, texturePacked, level, format, type, bufSize, pixels));
1136 if (isCallValid)
1137 {
1138 context->getTextureImage(texturePacked, level, format, type, bufSize, pixels);
1139 }
1140 ANGLE_CAPTURE(GetTextureImage, isCallValid, context, texturePacked, level, format, type,
1141 bufSize, pixels);
1142 }
1143 }
1144
GetTextureLevelParameterfv(GLuint texture,GLint level,GLenum pname,GLfloat * params)1145 void GL_APIENTRY GetTextureLevelParameterfv(GLuint texture,
1146 GLint level,
1147 GLenum pname,
1148 GLfloat *params)
1149 {
1150 EVENT(
1151 "(GLuint texture = %u, GLint level = %d, GLenum pname = %s, GLfloat *params = "
1152 "0x%016" PRIxPTR ")",
1153 texture, level, GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1154
1155 Context *context = GetValidGlobalContext();
1156 if (context)
1157 {
1158 TextureID texturePacked = FromGL<TextureID>(texture);
1159 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1160 bool isCallValid =
1161 (context->skipValidation() ||
1162 ValidateGetTextureLevelParameterfv(context, texturePacked, level, pname, params));
1163 if (isCallValid)
1164 {
1165 context->getTextureLevelParameterfv(texturePacked, level, pname, params);
1166 }
1167 ANGLE_CAPTURE(GetTextureLevelParameterfv, isCallValid, context, texturePacked, level, pname,
1168 params);
1169 }
1170 }
1171
GetTextureLevelParameteriv(GLuint texture,GLint level,GLenum pname,GLint * params)1172 void GL_APIENTRY GetTextureLevelParameteriv(GLuint texture,
1173 GLint level,
1174 GLenum pname,
1175 GLint *params)
1176 {
1177 EVENT(
1178 "(GLuint texture = %u, GLint level = %d, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR
1179 ")",
1180 texture, level, GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1181
1182 Context *context = GetValidGlobalContext();
1183 if (context)
1184 {
1185 TextureID texturePacked = FromGL<TextureID>(texture);
1186 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1187 bool isCallValid =
1188 (context->skipValidation() ||
1189 ValidateGetTextureLevelParameteriv(context, texturePacked, level, pname, params));
1190 if (isCallValid)
1191 {
1192 context->getTextureLevelParameteriv(texturePacked, level, pname, params);
1193 }
1194 ANGLE_CAPTURE(GetTextureLevelParameteriv, isCallValid, context, texturePacked, level, pname,
1195 params);
1196 }
1197 }
1198
GetTextureParameterIiv(GLuint texture,GLenum pname,GLint * params)1199 void GL_APIENTRY GetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
1200 {
1201 EVENT("(GLuint texture = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", texture,
1202 GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1203
1204 Context *context = GetValidGlobalContext();
1205 if (context)
1206 {
1207 TextureID texturePacked = FromGL<TextureID>(texture);
1208 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1209 bool isCallValid = (context->skipValidation() ||
1210 ValidateGetTextureParameterIiv(context, texturePacked, pname, params));
1211 if (isCallValid)
1212 {
1213 context->getTextureParameterIiv(texturePacked, pname, params);
1214 }
1215 ANGLE_CAPTURE(GetTextureParameterIiv, isCallValid, context, texturePacked, pname, params);
1216 }
1217 }
1218
GetTextureParameterIuiv(GLuint texture,GLenum pname,GLuint * params)1219 void GL_APIENTRY GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
1220 {
1221 EVENT("(GLuint texture = %u, GLenum pname = %s, GLuint *params = 0x%016" PRIxPTR ")", texture,
1222 GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1223
1224 Context *context = GetValidGlobalContext();
1225 if (context)
1226 {
1227 TextureID texturePacked = FromGL<TextureID>(texture);
1228 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1229 bool isCallValid = (context->skipValidation() ||
1230 ValidateGetTextureParameterIuiv(context, texturePacked, pname, params));
1231 if (isCallValid)
1232 {
1233 context->getTextureParameterIuiv(texturePacked, pname, params);
1234 }
1235 ANGLE_CAPTURE(GetTextureParameterIuiv, isCallValid, context, texturePacked, pname, params);
1236 }
1237 }
1238
GetTextureParameterfv(GLuint texture,GLenum pname,GLfloat * params)1239 void GL_APIENTRY GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
1240 {
1241 EVENT("(GLuint texture = %u, GLenum pname = %s, GLfloat *params = 0x%016" PRIxPTR ")", texture,
1242 GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1243
1244 Context *context = GetValidGlobalContext();
1245 if (context)
1246 {
1247 TextureID texturePacked = FromGL<TextureID>(texture);
1248 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1249 bool isCallValid = (context->skipValidation() ||
1250 ValidateGetTextureParameterfv(context, texturePacked, pname, params));
1251 if (isCallValid)
1252 {
1253 context->getTextureParameterfv(texturePacked, pname, params);
1254 }
1255 ANGLE_CAPTURE(GetTextureParameterfv, isCallValid, context, texturePacked, pname, params);
1256 }
1257 }
1258
GetTextureParameteriv(GLuint texture,GLenum pname,GLint * params)1259 void GL_APIENTRY GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
1260 {
1261 EVENT("(GLuint texture = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR ")", texture,
1262 GLenumToString(GLenumGroup::GetTextureParameter, pname), (uintptr_t)params);
1263
1264 Context *context = GetValidGlobalContext();
1265 if (context)
1266 {
1267 TextureID texturePacked = FromGL<TextureID>(texture);
1268 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1269 bool isCallValid = (context->skipValidation() ||
1270 ValidateGetTextureParameteriv(context, texturePacked, pname, params));
1271 if (isCallValid)
1272 {
1273 context->getTextureParameteriv(texturePacked, pname, params);
1274 }
1275 ANGLE_CAPTURE(GetTextureParameteriv, isCallValid, context, texturePacked, pname, params);
1276 }
1277 }
1278
GetTextureSubImage(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,GLsizei bufSize,void * pixels)1279 void GL_APIENTRY GetTextureSubImage(GLuint texture,
1280 GLint level,
1281 GLint xoffset,
1282 GLint yoffset,
1283 GLint zoffset,
1284 GLsizei width,
1285 GLsizei height,
1286 GLsizei depth,
1287 GLenum format,
1288 GLenum type,
1289 GLsizei bufSize,
1290 void *pixels)
1291 {
1292 EVENT(
1293 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
1294 "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
1295 "= %s, GLenum type = %s, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
1296 texture, level, xoffset, yoffset, zoffset, width, height, depth,
1297 GLenumToString(GLenumGroup::PixelFormat, format),
1298 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)pixels);
1299
1300 Context *context = GetValidGlobalContext();
1301 if (context)
1302 {
1303 TextureID texturePacked = FromGL<TextureID>(texture);
1304 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1305 bool isCallValid =
1306 (context->skipValidation() ||
1307 ValidateGetTextureSubImage(context, texturePacked, level, xoffset, yoffset, zoffset,
1308 width, height, depth, format, type, bufSize, pixels));
1309 if (isCallValid)
1310 {
1311 context->getTextureSubImage(texturePacked, level, xoffset, yoffset, zoffset, width,
1312 height, depth, format, type, bufSize, pixels);
1313 }
1314 ANGLE_CAPTURE(GetTextureSubImage, isCallValid, context, texturePacked, level, xoffset,
1315 yoffset, zoffset, width, height, depth, format, type, bufSize, pixels);
1316 }
1317 }
1318
GetTransformFeedbacki64_v(GLuint xfb,GLenum pname,GLuint index,GLint64 * param)1319 void GL_APIENTRY GetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)
1320 {
1321 EVENT("(GLuint xfb = %u, GLenum pname = %s, GLuint index = %u, GLint64 *param = 0x%016" PRIxPTR
1322 ")",
1323 xfb, GLenumToString(GLenumGroup::TransformFeedbackPName, pname), index, (uintptr_t)param);
1324
1325 Context *context = GetValidGlobalContext();
1326 if (context)
1327 {
1328 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1329 bool isCallValid = (context->skipValidation() ||
1330 ValidateGetTransformFeedbacki64_v(context, xfb, pname, index, param));
1331 if (isCallValid)
1332 {
1333 context->getTransformFeedbacki64_v(xfb, pname, index, param);
1334 }
1335 ANGLE_CAPTURE(GetTransformFeedbacki64_v, isCallValid, context, xfb, pname, index, param);
1336 }
1337 }
1338
GetTransformFeedbacki_v(GLuint xfb,GLenum pname,GLuint index,GLint * param)1339 void GL_APIENTRY GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param)
1340 {
1341 EVENT("(GLuint xfb = %u, GLenum pname = %s, GLuint index = %u, GLint *param = 0x%016" PRIxPTR
1342 ")",
1343 xfb, GLenumToString(GLenumGroup::TransformFeedbackPName, pname), index, (uintptr_t)param);
1344
1345 Context *context = GetValidGlobalContext();
1346 if (context)
1347 {
1348 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1349 bool isCallValid = (context->skipValidation() ||
1350 ValidateGetTransformFeedbacki_v(context, xfb, pname, index, param));
1351 if (isCallValid)
1352 {
1353 context->getTransformFeedbacki_v(xfb, pname, index, param);
1354 }
1355 ANGLE_CAPTURE(GetTransformFeedbacki_v, isCallValid, context, xfb, pname, index, param);
1356 }
1357 }
1358
GetTransformFeedbackiv(GLuint xfb,GLenum pname,GLint * param)1359 void GL_APIENTRY GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
1360 {
1361 EVENT("(GLuint xfb = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR ")", xfb,
1362 GLenumToString(GLenumGroup::TransformFeedbackPName, pname), (uintptr_t)param);
1363
1364 Context *context = GetValidGlobalContext();
1365 if (context)
1366 {
1367 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1368 bool isCallValid = (context->skipValidation() ||
1369 ValidateGetTransformFeedbackiv(context, xfb, pname, param));
1370 if (isCallValid)
1371 {
1372 context->getTransformFeedbackiv(xfb, pname, param);
1373 }
1374 ANGLE_CAPTURE(GetTransformFeedbackiv, isCallValid, context, xfb, pname, param);
1375 }
1376 }
1377
GetVertexArrayIndexed64iv(GLuint vaobj,GLuint index,GLenum pname,GLint64 * param)1378 void GL_APIENTRY GetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)
1379 {
1380 EVENT(
1381 "(GLuint vaobj = %u, GLuint index = %u, GLenum pname = %s, GLint64 *param = 0x%016" PRIxPTR
1382 ")",
1383 vaobj, index, GLenumToString(GLenumGroup::VertexArrayPName, pname), (uintptr_t)param);
1384
1385 Context *context = GetValidGlobalContext();
1386 if (context)
1387 {
1388 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1389 bool isCallValid = (context->skipValidation() ||
1390 ValidateGetVertexArrayIndexed64iv(context, vaobj, index, pname, param));
1391 if (isCallValid)
1392 {
1393 context->getVertexArrayIndexed64iv(vaobj, index, pname, param);
1394 }
1395 ANGLE_CAPTURE(GetVertexArrayIndexed64iv, isCallValid, context, vaobj, index, pname, param);
1396 }
1397 }
1398
GetVertexArrayIndexediv(GLuint vaobj,GLuint index,GLenum pname,GLint * param)1399 void GL_APIENTRY GetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param)
1400 {
1401 EVENT("(GLuint vaobj = %u, GLuint index = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR
1402 ")",
1403 vaobj, index, GLenumToString(GLenumGroup::VertexArrayPName, pname), (uintptr_t)param);
1404
1405 Context *context = GetValidGlobalContext();
1406 if (context)
1407 {
1408 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1409 bool isCallValid = (context->skipValidation() ||
1410 ValidateGetVertexArrayIndexediv(context, vaobj, index, pname, param));
1411 if (isCallValid)
1412 {
1413 context->getVertexArrayIndexediv(vaobj, index, pname, param);
1414 }
1415 ANGLE_CAPTURE(GetVertexArrayIndexediv, isCallValid, context, vaobj, index, pname, param);
1416 }
1417 }
1418
GetVertexArrayiv(GLuint vaobj,GLenum pname,GLint * param)1419 void GL_APIENTRY GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
1420 {
1421 EVENT("(GLuint vaobj = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR ")", vaobj,
1422 GLenumToString(GLenumGroup::VertexArrayPName, pname), (uintptr_t)param);
1423
1424 Context *context = GetValidGlobalContext();
1425 if (context)
1426 {
1427 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1428 bool isCallValid =
1429 (context->skipValidation() || ValidateGetVertexArrayiv(context, vaobj, pname, param));
1430 if (isCallValid)
1431 {
1432 context->getVertexArrayiv(vaobj, pname, param);
1433 }
1434 ANGLE_CAPTURE(GetVertexArrayiv, isCallValid, context, vaobj, pname, param);
1435 }
1436 }
1437
1438 void GL_APIENTRY
GetnColorTable(GLenum target,GLenum format,GLenum type,GLsizei bufSize,void * table)1439 GetnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table)
1440 {
1441 EVENT(
1442 "(GLenum target = %s, GLenum format = %s, GLenum type = %s, GLsizei bufSize = %d, void "
1443 "*table = 0x%016" PRIxPTR ")",
1444 GLenumToString(GLenumGroup::ColorTableTarget, target),
1445 GLenumToString(GLenumGroup::PixelFormat, format),
1446 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)table);
1447
1448 Context *context = GetValidGlobalContext();
1449 if (context)
1450 {
1451 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1452 bool isCallValid = (context->skipValidation() ||
1453 ValidateGetnColorTable(context, target, format, type, bufSize, table));
1454 if (isCallValid)
1455 {
1456 context->getnColorTable(target, format, type, bufSize, table);
1457 }
1458 ANGLE_CAPTURE(GetnColorTable, isCallValid, context, target, format, type, bufSize, table);
1459 }
1460 }
1461
GetnCompressedTexImage(GLenum target,GLint lod,GLsizei bufSize,void * pixels)1462 void GL_APIENTRY GetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels)
1463 {
1464 EVENT("(GLenum target = %s, GLint lod = %d, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR
1465 ")",
1466 GLenumToString(GLenumGroup::TextureTarget, target), lod, bufSize, (uintptr_t)pixels);
1467
1468 Context *context = GetValidGlobalContext();
1469 if (context)
1470 {
1471 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1472 bool isCallValid = (context->skipValidation() ||
1473 ValidateGetnCompressedTexImage(context, target, lod, bufSize, pixels));
1474 if (isCallValid)
1475 {
1476 context->getnCompressedTexImage(target, lod, bufSize, pixels);
1477 }
1478 ANGLE_CAPTURE(GetnCompressedTexImage, isCallValid, context, target, lod, bufSize, pixels);
1479 }
1480 }
1481
1482 void GL_APIENTRY
GetnConvolutionFilter(GLenum target,GLenum format,GLenum type,GLsizei bufSize,void * image)1483 GetnConvolutionFilter(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image)
1484 {
1485 EVENT(
1486 "(GLenum target = %s, GLenum format = %s, GLenum type = %s, GLsizei bufSize = %d, void "
1487 "*image = 0x%016" PRIxPTR ")",
1488 GLenumToString(GLenumGroup::ConvolutionTarget, target),
1489 GLenumToString(GLenumGroup::PixelFormat, format),
1490 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)image);
1491
1492 Context *context = GetValidGlobalContext();
1493 if (context)
1494 {
1495 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1496 bool isCallValid =
1497 (context->skipValidation() ||
1498 ValidateGetnConvolutionFilter(context, target, format, type, bufSize, image));
1499 if (isCallValid)
1500 {
1501 context->getnConvolutionFilter(target, format, type, bufSize, image);
1502 }
1503 ANGLE_CAPTURE(GetnConvolutionFilter, isCallValid, context, target, format, type, bufSize,
1504 image);
1505 }
1506 }
1507
GetnHistogram(GLenum target,GLboolean reset,GLenum format,GLenum type,GLsizei bufSize,void * values)1508 void GL_APIENTRY GetnHistogram(GLenum target,
1509 GLboolean reset,
1510 GLenum format,
1511 GLenum type,
1512 GLsizei bufSize,
1513 void *values)
1514 {
1515 EVENT(
1516 "(GLenum target = %s, GLboolean reset = %s, GLenum format = %s, GLenum type = %s, GLsizei "
1517 "bufSize = %d, void *values = 0x%016" PRIxPTR ")",
1518 GLenumToString(GLenumGroup::HistogramTargetEXT, target), GLbooleanToString(reset),
1519 GLenumToString(GLenumGroup::PixelFormat, format),
1520 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)values);
1521
1522 Context *context = GetValidGlobalContext();
1523 if (context)
1524 {
1525 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1526 bool isCallValid =
1527 (context->skipValidation() ||
1528 ValidateGetnHistogram(context, target, reset, format, type, bufSize, values));
1529 if (isCallValid)
1530 {
1531 context->getnHistogram(target, reset, format, type, bufSize, values);
1532 }
1533 ANGLE_CAPTURE(GetnHistogram, isCallValid, context, target, reset, format, type, bufSize,
1534 values);
1535 }
1536 }
1537
GetnMapdv(GLenum target,GLenum query,GLsizei bufSize,GLdouble * v)1538 void GL_APIENTRY GetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)
1539 {
1540 EVENT(
1541 "(GLenum target = %s, GLenum query = %s, GLsizei bufSize = %d, GLdouble *v = 0x%016" PRIxPTR
1542 ")",
1543 GLenumToString(GLenumGroup::MapTarget, target),
1544 GLenumToString(GLenumGroup::MapQuery, query), bufSize, (uintptr_t)v);
1545
1546 Context *context = GetValidGlobalContext();
1547 if (context)
1548 {
1549 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1550 bool isCallValid =
1551 (context->skipValidation() || ValidateGetnMapdv(context, target, query, bufSize, v));
1552 if (isCallValid)
1553 {
1554 context->getnMapdv(target, query, bufSize, v);
1555 }
1556 ANGLE_CAPTURE(GetnMapdv, isCallValid, context, target, query, bufSize, v);
1557 }
1558 }
1559
GetnMapfv(GLenum target,GLenum query,GLsizei bufSize,GLfloat * v)1560 void GL_APIENTRY GetnMapfv(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)
1561 {
1562 EVENT(
1563 "(GLenum target = %s, GLenum query = %s, GLsizei bufSize = %d, GLfloat *v = 0x%016" PRIxPTR
1564 ")",
1565 GLenumToString(GLenumGroup::MapTarget, target),
1566 GLenumToString(GLenumGroup::MapQuery, query), bufSize, (uintptr_t)v);
1567
1568 Context *context = GetValidGlobalContext();
1569 if (context)
1570 {
1571 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1572 bool isCallValid =
1573 (context->skipValidation() || ValidateGetnMapfv(context, target, query, bufSize, v));
1574 if (isCallValid)
1575 {
1576 context->getnMapfv(target, query, bufSize, v);
1577 }
1578 ANGLE_CAPTURE(GetnMapfv, isCallValid, context, target, query, bufSize, v);
1579 }
1580 }
1581
GetnMapiv(GLenum target,GLenum query,GLsizei bufSize,GLint * v)1582 void GL_APIENTRY GetnMapiv(GLenum target, GLenum query, GLsizei bufSize, GLint *v)
1583 {
1584 EVENT("(GLenum target = %s, GLenum query = %s, GLsizei bufSize = %d, GLint *v = 0x%016" PRIxPTR
1585 ")",
1586 GLenumToString(GLenumGroup::MapTarget, target),
1587 GLenumToString(GLenumGroup::MapQuery, query), bufSize, (uintptr_t)v);
1588
1589 Context *context = GetValidGlobalContext();
1590 if (context)
1591 {
1592 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1593 bool isCallValid =
1594 (context->skipValidation() || ValidateGetnMapiv(context, target, query, bufSize, v));
1595 if (isCallValid)
1596 {
1597 context->getnMapiv(target, query, bufSize, v);
1598 }
1599 ANGLE_CAPTURE(GetnMapiv, isCallValid, context, target, query, bufSize, v);
1600 }
1601 }
1602
GetnMinmax(GLenum target,GLboolean reset,GLenum format,GLenum type,GLsizei bufSize,void * values)1603 void GL_APIENTRY GetnMinmax(GLenum target,
1604 GLboolean reset,
1605 GLenum format,
1606 GLenum type,
1607 GLsizei bufSize,
1608 void *values)
1609 {
1610 EVENT(
1611 "(GLenum target = %s, GLboolean reset = %s, GLenum format = %s, GLenum type = %s, GLsizei "
1612 "bufSize = %d, void *values = 0x%016" PRIxPTR ")",
1613 GLenumToString(GLenumGroup::MinmaxTargetEXT, target), GLbooleanToString(reset),
1614 GLenumToString(GLenumGroup::PixelFormat, format),
1615 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)values);
1616
1617 Context *context = GetValidGlobalContext();
1618 if (context)
1619 {
1620 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1621 bool isCallValid =
1622 (context->skipValidation() ||
1623 ValidateGetnMinmax(context, target, reset, format, type, bufSize, values));
1624 if (isCallValid)
1625 {
1626 context->getnMinmax(target, reset, format, type, bufSize, values);
1627 }
1628 ANGLE_CAPTURE(GetnMinmax, isCallValid, context, target, reset, format, type, bufSize,
1629 values);
1630 }
1631 }
1632
GetnPixelMapfv(GLenum map,GLsizei bufSize,GLfloat * values)1633 void GL_APIENTRY GetnPixelMapfv(GLenum map, GLsizei bufSize, GLfloat *values)
1634 {
1635 EVENT("(GLenum map = %s, GLsizei bufSize = %d, GLfloat *values = 0x%016" PRIxPTR ")",
1636 GLenumToString(GLenumGroup::PixelMap, map), bufSize, (uintptr_t)values);
1637
1638 Context *context = GetValidGlobalContext();
1639 if (context)
1640 {
1641 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1642 bool isCallValid =
1643 (context->skipValidation() || ValidateGetnPixelMapfv(context, map, bufSize, values));
1644 if (isCallValid)
1645 {
1646 context->getnPixelMapfv(map, bufSize, values);
1647 }
1648 ANGLE_CAPTURE(GetnPixelMapfv, isCallValid, context, map, bufSize, values);
1649 }
1650 }
1651
GetnPixelMapuiv(GLenum map,GLsizei bufSize,GLuint * values)1652 void GL_APIENTRY GetnPixelMapuiv(GLenum map, GLsizei bufSize, GLuint *values)
1653 {
1654 EVENT("(GLenum map = %s, GLsizei bufSize = %d, GLuint *values = 0x%016" PRIxPTR ")",
1655 GLenumToString(GLenumGroup::PixelMap, map), bufSize, (uintptr_t)values);
1656
1657 Context *context = GetValidGlobalContext();
1658 if (context)
1659 {
1660 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1661 bool isCallValid =
1662 (context->skipValidation() || ValidateGetnPixelMapuiv(context, map, bufSize, values));
1663 if (isCallValid)
1664 {
1665 context->getnPixelMapuiv(map, bufSize, values);
1666 }
1667 ANGLE_CAPTURE(GetnPixelMapuiv, isCallValid, context, map, bufSize, values);
1668 }
1669 }
1670
GetnPixelMapusv(GLenum map,GLsizei bufSize,GLushort * values)1671 void GL_APIENTRY GetnPixelMapusv(GLenum map, GLsizei bufSize, GLushort *values)
1672 {
1673 EVENT("(GLenum map = %s, GLsizei bufSize = %d, GLushort *values = 0x%016" PRIxPTR ")",
1674 GLenumToString(GLenumGroup::PixelMap, map), bufSize, (uintptr_t)values);
1675
1676 Context *context = GetValidGlobalContext();
1677 if (context)
1678 {
1679 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1680 bool isCallValid =
1681 (context->skipValidation() || ValidateGetnPixelMapusv(context, map, bufSize, values));
1682 if (isCallValid)
1683 {
1684 context->getnPixelMapusv(map, bufSize, values);
1685 }
1686 ANGLE_CAPTURE(GetnPixelMapusv, isCallValid, context, map, bufSize, values);
1687 }
1688 }
1689
GetnPolygonStipple(GLsizei bufSize,GLubyte * pattern)1690 void GL_APIENTRY GetnPolygonStipple(GLsizei bufSize, GLubyte *pattern)
1691 {
1692 EVENT("(GLsizei bufSize = %d, GLubyte *pattern = 0x%016" PRIxPTR ")", bufSize,
1693 (uintptr_t)pattern);
1694
1695 Context *context = GetValidGlobalContext();
1696 if (context)
1697 {
1698 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1699 bool isCallValid =
1700 (context->skipValidation() || ValidateGetnPolygonStipple(context, bufSize, pattern));
1701 if (isCallValid)
1702 {
1703 context->getnPolygonStipple(bufSize, pattern);
1704 }
1705 ANGLE_CAPTURE(GetnPolygonStipple, isCallValid, context, bufSize, pattern);
1706 }
1707 }
1708
GetnSeparableFilter(GLenum target,GLenum format,GLenum type,GLsizei rowBufSize,void * row,GLsizei columnBufSize,void * column,void * span)1709 void GL_APIENTRY GetnSeparableFilter(GLenum target,
1710 GLenum format,
1711 GLenum type,
1712 GLsizei rowBufSize,
1713 void *row,
1714 GLsizei columnBufSize,
1715 void *column,
1716 void *span)
1717 {
1718 EVENT(
1719 "(GLenum target = %s, GLenum format = %s, GLenum type = %s, GLsizei rowBufSize = %d, void "
1720 "*row = 0x%016" PRIxPTR ", GLsizei columnBufSize = %d, void *column = 0x%016" PRIxPTR
1721 ", void *span = 0x%016" PRIxPTR ")",
1722 GLenumToString(GLenumGroup::SeparableTargetEXT, target),
1723 GLenumToString(GLenumGroup::PixelFormat, format),
1724 GLenumToString(GLenumGroup::PixelType, type), rowBufSize, (uintptr_t)row, columnBufSize,
1725 (uintptr_t)column, (uintptr_t)span);
1726
1727 Context *context = GetValidGlobalContext();
1728 if (context)
1729 {
1730 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1731 bool isCallValid = (context->skipValidation() ||
1732 ValidateGetnSeparableFilter(context, target, format, type, rowBufSize,
1733 row, columnBufSize, column, span));
1734 if (isCallValid)
1735 {
1736 context->getnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize,
1737 column, span);
1738 }
1739 ANGLE_CAPTURE(GetnSeparableFilter, isCallValid, context, target, format, type, rowBufSize,
1740 row, columnBufSize, column, span);
1741 }
1742 }
1743
1744 void GL_APIENTRY
GetnTexImage(GLenum target,GLint level,GLenum format,GLenum type,GLsizei bufSize,void * pixels)1745 GetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
1746 {
1747 EVENT(
1748 "(GLenum target = %s, GLint level = %d, GLenum format = %s, GLenum type = %s, GLsizei "
1749 "bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
1750 GLenumToString(GLenumGroup::TextureTarget, target), level,
1751 GLenumToString(GLenumGroup::PixelFormat, format),
1752 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)pixels);
1753
1754 Context *context = GetValidGlobalContext();
1755 if (context)
1756 {
1757 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1758 bool isCallValid =
1759 (context->skipValidation() ||
1760 ValidateGetnTexImage(context, target, level, format, type, bufSize, pixels));
1761 if (isCallValid)
1762 {
1763 context->getnTexImage(target, level, format, type, bufSize, pixels);
1764 }
1765 ANGLE_CAPTURE(GetnTexImage, isCallValid, context, target, level, format, type, bufSize,
1766 pixels);
1767 }
1768 }
1769
GetnUniformdv(GLuint program,GLint location,GLsizei bufSize,GLdouble * params)1770 void GL_APIENTRY GetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params)
1771 {
1772 EVENT(
1773 "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLdouble *params = "
1774 "0x%016" PRIxPTR ")",
1775 program, location, bufSize, (uintptr_t)params);
1776
1777 Context *context = GetValidGlobalContext();
1778 if (context)
1779 {
1780 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1781 bool isCallValid = (context->skipValidation() ||
1782 ValidateGetnUniformdv(context, program, location, bufSize, params));
1783 if (isCallValid)
1784 {
1785 context->getnUniformdv(program, location, bufSize, params);
1786 }
1787 ANGLE_CAPTURE(GetnUniformdv, isCallValid, context, program, location, bufSize, params);
1788 }
1789 }
1790
GetnUniformfv(GLuint program,GLint location,GLsizei bufSize,GLfloat * params)1791 void GL_APIENTRY GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
1792 {
1793 EVENT(
1794 "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLfloat *params = "
1795 "0x%016" PRIxPTR ")",
1796 program, location, bufSize, (uintptr_t)params);
1797
1798 Context *context = GetValidGlobalContext();
1799 if (context)
1800 {
1801 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1802 bool isCallValid = (context->skipValidation() ||
1803 ValidateGetnUniformfv(context, program, location, bufSize, params));
1804 if (isCallValid)
1805 {
1806 context->getnUniformfv(program, location, bufSize, params);
1807 }
1808 ANGLE_CAPTURE(GetnUniformfv, isCallValid, context, program, location, bufSize, params);
1809 }
1810 }
1811
GetnUniformiv(GLuint program,GLint location,GLsizei bufSize,GLint * params)1812 void GL_APIENTRY GetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params)
1813 {
1814 EVENT(
1815 "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLint *params = "
1816 "0x%016" PRIxPTR ")",
1817 program, location, bufSize, (uintptr_t)params);
1818
1819 Context *context = GetValidGlobalContext();
1820 if (context)
1821 {
1822 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1823 bool isCallValid = (context->skipValidation() ||
1824 ValidateGetnUniformiv(context, program, location, bufSize, params));
1825 if (isCallValid)
1826 {
1827 context->getnUniformiv(program, location, bufSize, params);
1828 }
1829 ANGLE_CAPTURE(GetnUniformiv, isCallValid, context, program, location, bufSize, params);
1830 }
1831 }
1832
GetnUniformuiv(GLuint program,GLint location,GLsizei bufSize,GLuint * params)1833 void GL_APIENTRY GetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params)
1834 {
1835 EVENT(
1836 "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLuint *params = "
1837 "0x%016" PRIxPTR ")",
1838 program, location, bufSize, (uintptr_t)params);
1839
1840 Context *context = GetValidGlobalContext();
1841 if (context)
1842 {
1843 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1844 bool isCallValid = (context->skipValidation() ||
1845 ValidateGetnUniformuiv(context, program, location, bufSize, params));
1846 if (isCallValid)
1847 {
1848 context->getnUniformuiv(program, location, bufSize, params);
1849 }
1850 ANGLE_CAPTURE(GetnUniformuiv, isCallValid, context, program, location, bufSize, params);
1851 }
1852 }
1853
InvalidateNamedFramebufferData(GLuint framebuffer,GLsizei numAttachments,const GLenum * attachments)1854 void GL_APIENTRY InvalidateNamedFramebufferData(GLuint framebuffer,
1855 GLsizei numAttachments,
1856 const GLenum *attachments)
1857 {
1858 EVENT(
1859 "(GLuint framebuffer = %u, GLsizei numAttachments = %d, const GLenum *attachments = "
1860 "0x%016" PRIxPTR ")",
1861 framebuffer, numAttachments, (uintptr_t)attachments);
1862
1863 Context *context = GetValidGlobalContext();
1864 if (context)
1865 {
1866 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1867 bool isCallValid =
1868 (context->skipValidation() || ValidateInvalidateNamedFramebufferData(
1869 context, framebuffer, numAttachments, attachments));
1870 if (isCallValid)
1871 {
1872 context->invalidateNamedFramebufferData(framebuffer, numAttachments, attachments);
1873 }
1874 ANGLE_CAPTURE(InvalidateNamedFramebufferData, isCallValid, context, framebuffer,
1875 numAttachments, attachments);
1876 }
1877 }
1878
InvalidateNamedFramebufferSubData(GLuint framebuffer,GLsizei numAttachments,const GLenum * attachments,GLint x,GLint y,GLsizei width,GLsizei height)1879 void GL_APIENTRY InvalidateNamedFramebufferSubData(GLuint framebuffer,
1880 GLsizei numAttachments,
1881 const GLenum *attachments,
1882 GLint x,
1883 GLint y,
1884 GLsizei width,
1885 GLsizei height)
1886 {
1887 EVENT(
1888 "(GLuint framebuffer = %u, GLsizei numAttachments = %d, const GLenum *attachments = "
1889 "0x%016" PRIxPTR ", GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
1890 framebuffer, numAttachments, (uintptr_t)attachments, x, y, width, height);
1891
1892 Context *context = GetValidGlobalContext();
1893 if (context)
1894 {
1895 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1896 bool isCallValid = (context->skipValidation() || ValidateInvalidateNamedFramebufferSubData(
1897 context, framebuffer, numAttachments,
1898 attachments, x, y, width, height));
1899 if (isCallValid)
1900 {
1901 context->invalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x,
1902 y, width, height);
1903 }
1904 ANGLE_CAPTURE(InvalidateNamedFramebufferSubData, isCallValid, context, framebuffer,
1905 numAttachments, attachments, x, y, width, height);
1906 }
1907 }
1908
MapNamedBuffer(GLuint buffer,GLenum access)1909 void *GL_APIENTRY MapNamedBuffer(GLuint buffer, GLenum access)
1910 {
1911 EVENT("(GLuint buffer = %u, GLenum access = %s)", buffer,
1912 GLenumToString(GLenumGroup::BufferAccessARB, access));
1913
1914 Context *context = GetValidGlobalContext();
1915 void *returnValue;
1916 if (context)
1917 {
1918 BufferID bufferPacked = FromGL<BufferID>(buffer);
1919 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1920 bool isCallValid =
1921 (context->skipValidation() || ValidateMapNamedBuffer(context, bufferPacked, access));
1922 if (isCallValid)
1923 {
1924 returnValue = context->mapNamedBuffer(bufferPacked, access);
1925 }
1926 else
1927 {
1928 returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBuffer, void *>();
1929 }
1930 ANGLE_CAPTURE(MapNamedBuffer, isCallValid, context, bufferPacked, access, returnValue);
1931 }
1932 else
1933 {
1934 returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBuffer, void *>();
1935 }
1936 return returnValue;
1937 }
1938
MapNamedBufferRange(GLuint buffer,GLintptr offset,GLsizeiptr length,GLbitfield access)1939 void *GL_APIENTRY MapNamedBufferRange(GLuint buffer,
1940 GLintptr offset,
1941 GLsizeiptr length,
1942 GLbitfield access)
1943 {
1944 EVENT(
1945 "(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu, GLbitfield access "
1946 "= %s)",
1947 buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length),
1948 GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str());
1949
1950 Context *context = GetValidGlobalContext();
1951 void *returnValue;
1952 if (context)
1953 {
1954 BufferID bufferPacked = FromGL<BufferID>(buffer);
1955 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1956 bool isCallValid =
1957 (context->skipValidation() ||
1958 ValidateMapNamedBufferRange(context, bufferPacked, offset, length, access));
1959 if (isCallValid)
1960 {
1961 returnValue = context->mapNamedBufferRange(bufferPacked, offset, length, access);
1962 }
1963 else
1964 {
1965 returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBufferRange, void *>();
1966 }
1967 ANGLE_CAPTURE(MapNamedBufferRange, isCallValid, context, bufferPacked, offset, length,
1968 access, returnValue);
1969 }
1970 else
1971 {
1972 returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBufferRange, void *>();
1973 }
1974 return returnValue;
1975 }
1976
MemoryBarrierByRegion(GLbitfield barriers)1977 void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers)
1978 {
1979 EVENT("(GLbitfield barriers = %s)",
1980 GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str());
1981
1982 Context *context = GetValidGlobalContext();
1983 if (context)
1984 {
1985 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1986 bool isCallValid =
1987 (context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers));
1988 if (isCallValid)
1989 {
1990 context->memoryBarrierByRegion(barriers);
1991 }
1992 ANGLE_CAPTURE(MemoryBarrierByRegion, isCallValid, context, barriers);
1993 }
1994 }
1995
NamedBufferData(GLuint buffer,GLsizeiptr size,const void * data,GLenum usage)1996 void GL_APIENTRY NamedBufferData(GLuint buffer, GLsizeiptr size, const void *data, GLenum usage)
1997 {
1998 EVENT("(GLuint buffer = %u, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR
1999 ", GLenum usage = %s)",
2000 buffer, static_cast<unsigned long long>(size), (uintptr_t)data,
2001 GLenumToString(GLenumGroup::VertexBufferObjectUsage, usage));
2002
2003 Context *context = GetValidGlobalContext();
2004 if (context)
2005 {
2006 BufferID bufferPacked = FromGL<BufferID>(buffer);
2007 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2008 bool isCallValid = (context->skipValidation() ||
2009 ValidateNamedBufferData(context, bufferPacked, size, data, usage));
2010 if (isCallValid)
2011 {
2012 context->namedBufferData(bufferPacked, size, data, usage);
2013 }
2014 ANGLE_CAPTURE(NamedBufferData, isCallValid, context, bufferPacked, size, data, usage);
2015 }
2016 }
2017
NamedBufferStorage(GLuint buffer,GLsizeiptr size,const void * data,GLbitfield flags)2018 void GL_APIENTRY NamedBufferStorage(GLuint buffer,
2019 GLsizeiptr size,
2020 const void *data,
2021 GLbitfield flags)
2022 {
2023 EVENT("(GLuint buffer = %u, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR
2024 ", GLbitfield flags = %s)",
2025 buffer, static_cast<unsigned long long>(size), (uintptr_t)data,
2026 GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str());
2027
2028 Context *context = GetValidGlobalContext();
2029 if (context)
2030 {
2031 BufferID bufferPacked = FromGL<BufferID>(buffer);
2032 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2033 bool isCallValid = (context->skipValidation() ||
2034 ValidateNamedBufferStorage(context, bufferPacked, size, data, flags));
2035 if (isCallValid)
2036 {
2037 context->namedBufferStorage(bufferPacked, size, data, flags);
2038 }
2039 ANGLE_CAPTURE(NamedBufferStorage, isCallValid, context, bufferPacked, size, data, flags);
2040 }
2041 }
2042
NamedBufferSubData(GLuint buffer,GLintptr offset,GLsizeiptr size,const void * data)2043 void GL_APIENTRY NamedBufferSubData(GLuint buffer,
2044 GLintptr offset,
2045 GLsizeiptr size,
2046 const void *data)
2047 {
2048 EVENT(
2049 "(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr size = %llu, const void *data = "
2050 "0x%016" PRIxPTR ")",
2051 buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
2052 (uintptr_t)data);
2053
2054 Context *context = GetValidGlobalContext();
2055 if (context)
2056 {
2057 BufferID bufferPacked = FromGL<BufferID>(buffer);
2058 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2059 bool isCallValid = (context->skipValidation() ||
2060 ValidateNamedBufferSubData(context, bufferPacked, offset, size, data));
2061 if (isCallValid)
2062 {
2063 context->namedBufferSubData(bufferPacked, offset, size, data);
2064 }
2065 ANGLE_CAPTURE(NamedBufferSubData, isCallValid, context, bufferPacked, offset, size, data);
2066 }
2067 }
2068
NamedFramebufferDrawBuffer(GLuint framebuffer,GLenum buf)2069 void GL_APIENTRY NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
2070 {
2071 EVENT("(GLuint framebuffer = %u, GLenum buf = %s)", framebuffer,
2072 GLenumToString(GLenumGroup::ColorBuffer, buf));
2073
2074 Context *context = GetValidGlobalContext();
2075 if (context)
2076 {
2077 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2078 bool isCallValid = (context->skipValidation() ||
2079 ValidateNamedFramebufferDrawBuffer(context, framebuffer, buf));
2080 if (isCallValid)
2081 {
2082 context->namedFramebufferDrawBuffer(framebuffer, buf);
2083 }
2084 ANGLE_CAPTURE(NamedFramebufferDrawBuffer, isCallValid, context, framebuffer, buf);
2085 }
2086 }
2087
NamedFramebufferDrawBuffers(GLuint framebuffer,GLsizei n,const GLenum * bufs)2088 void GL_APIENTRY NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs)
2089 {
2090 EVENT("(GLuint framebuffer = %u, GLsizei n = %d, const GLenum *bufs = 0x%016" PRIxPTR ")",
2091 framebuffer, n, (uintptr_t)bufs);
2092
2093 Context *context = GetValidGlobalContext();
2094 if (context)
2095 {
2096 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2097 bool isCallValid = (context->skipValidation() ||
2098 ValidateNamedFramebufferDrawBuffers(context, framebuffer, n, bufs));
2099 if (isCallValid)
2100 {
2101 context->namedFramebufferDrawBuffers(framebuffer, n, bufs);
2102 }
2103 ANGLE_CAPTURE(NamedFramebufferDrawBuffers, isCallValid, context, framebuffer, n, bufs);
2104 }
2105 }
2106
NamedFramebufferParameteri(GLuint framebuffer,GLenum pname,GLint param)2107 void GL_APIENTRY NamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param)
2108 {
2109 EVENT("(GLuint framebuffer = %u, GLenum pname = %s, GLint param = %d)", framebuffer,
2110 GLenumToString(GLenumGroup::FramebufferParameterName, pname), param);
2111
2112 Context *context = GetValidGlobalContext();
2113 if (context)
2114 {
2115 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2116 bool isCallValid = (context->skipValidation() ||
2117 ValidateNamedFramebufferParameteri(context, framebuffer, pname, param));
2118 if (isCallValid)
2119 {
2120 context->namedFramebufferParameteri(framebuffer, pname, param);
2121 }
2122 ANGLE_CAPTURE(NamedFramebufferParameteri, isCallValid, context, framebuffer, pname, param);
2123 }
2124 }
2125
NamedFramebufferReadBuffer(GLuint framebuffer,GLenum src)2126 void GL_APIENTRY NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
2127 {
2128 EVENT("(GLuint framebuffer = %u, GLenum src = %s)", framebuffer,
2129 GLenumToString(GLenumGroup::ColorBuffer, src));
2130
2131 Context *context = GetValidGlobalContext();
2132 if (context)
2133 {
2134 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2135 bool isCallValid = (context->skipValidation() ||
2136 ValidateNamedFramebufferReadBuffer(context, framebuffer, src));
2137 if (isCallValid)
2138 {
2139 context->namedFramebufferReadBuffer(framebuffer, src);
2140 }
2141 ANGLE_CAPTURE(NamedFramebufferReadBuffer, isCallValid, context, framebuffer, src);
2142 }
2143 }
2144
NamedFramebufferRenderbuffer(GLuint framebuffer,GLenum attachment,GLenum renderbuffertarget,GLuint renderbuffer)2145 void GL_APIENTRY NamedFramebufferRenderbuffer(GLuint framebuffer,
2146 GLenum attachment,
2147 GLenum renderbuffertarget,
2148 GLuint renderbuffer)
2149 {
2150 EVENT(
2151 "(GLuint framebuffer = %u, GLenum attachment = %s, GLenum renderbuffertarget = %s, GLuint "
2152 "renderbuffer = %u)",
2153 framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment),
2154 GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer);
2155
2156 Context *context = GetValidGlobalContext();
2157 if (context)
2158 {
2159 RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
2160 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2161 bool isCallValid =
2162 (context->skipValidation() ||
2163 ValidateNamedFramebufferRenderbuffer(context, framebuffer, attachment,
2164 renderbuffertarget, renderbufferPacked));
2165 if (isCallValid)
2166 {
2167 context->namedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget,
2168 renderbufferPacked);
2169 }
2170 ANGLE_CAPTURE(NamedFramebufferRenderbuffer, isCallValid, context, framebuffer, attachment,
2171 renderbuffertarget, renderbufferPacked);
2172 }
2173 }
2174
NamedFramebufferTexture(GLuint framebuffer,GLenum attachment,GLuint texture,GLint level)2175 void GL_APIENTRY NamedFramebufferTexture(GLuint framebuffer,
2176 GLenum attachment,
2177 GLuint texture,
2178 GLint level)
2179 {
2180 EVENT(
2181 "(GLuint framebuffer = %u, GLenum attachment = %s, GLuint texture = %u, GLint level = %d)",
2182 framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture,
2183 level);
2184
2185 Context *context = GetValidGlobalContext();
2186 if (context)
2187 {
2188 TextureID texturePacked = FromGL<TextureID>(texture);
2189 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2190 bool isCallValid = (context->skipValidation() ||
2191 ValidateNamedFramebufferTexture(context, framebuffer, attachment,
2192 texturePacked, level));
2193 if (isCallValid)
2194 {
2195 context->namedFramebufferTexture(framebuffer, attachment, texturePacked, level);
2196 }
2197 ANGLE_CAPTURE(NamedFramebufferTexture, isCallValid, context, framebuffer, attachment,
2198 texturePacked, level);
2199 }
2200 }
2201
NamedFramebufferTextureLayer(GLuint framebuffer,GLenum attachment,GLuint texture,GLint level,GLint layer)2202 void GL_APIENTRY NamedFramebufferTextureLayer(GLuint framebuffer,
2203 GLenum attachment,
2204 GLuint texture,
2205 GLint level,
2206 GLint layer)
2207 {
2208 EVENT(
2209 "(GLuint framebuffer = %u, GLenum attachment = %s, GLuint texture = %u, GLint level = %d, "
2210 "GLint layer = %d)",
2211 framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment), texture, level,
2212 layer);
2213
2214 Context *context = GetValidGlobalContext();
2215 if (context)
2216 {
2217 TextureID texturePacked = FromGL<TextureID>(texture);
2218 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2219 bool isCallValid = (context->skipValidation() ||
2220 ValidateNamedFramebufferTextureLayer(context, framebuffer, attachment,
2221 texturePacked, level, layer));
2222 if (isCallValid)
2223 {
2224 context->namedFramebufferTextureLayer(framebuffer, attachment, texturePacked, level,
2225 layer);
2226 }
2227 ANGLE_CAPTURE(NamedFramebufferTextureLayer, isCallValid, context, framebuffer, attachment,
2228 texturePacked, level, layer);
2229 }
2230 }
2231
NamedRenderbufferStorage(GLuint renderbuffer,GLenum internalformat,GLsizei width,GLsizei height)2232 void GL_APIENTRY NamedRenderbufferStorage(GLuint renderbuffer,
2233 GLenum internalformat,
2234 GLsizei width,
2235 GLsizei height)
2236 {
2237 EVENT(
2238 "(GLuint renderbuffer = %u, GLenum internalformat = %s, GLsizei width = %d, GLsizei height "
2239 "= %d)",
2240 renderbuffer, GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height);
2241
2242 Context *context = GetValidGlobalContext();
2243 if (context)
2244 {
2245 RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
2246 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2247 bool isCallValid = (context->skipValidation() ||
2248 ValidateNamedRenderbufferStorage(context, renderbufferPacked,
2249 internalformat, width, height));
2250 if (isCallValid)
2251 {
2252 context->namedRenderbufferStorage(renderbufferPacked, internalformat, width, height);
2253 }
2254 ANGLE_CAPTURE(NamedRenderbufferStorage, isCallValid, context, renderbufferPacked,
2255 internalformat, width, height);
2256 }
2257 }
2258
NamedRenderbufferStorageMultisample(GLuint renderbuffer,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height)2259 void GL_APIENTRY NamedRenderbufferStorageMultisample(GLuint renderbuffer,
2260 GLsizei samples,
2261 GLenum internalformat,
2262 GLsizei width,
2263 GLsizei height)
2264 {
2265 EVENT(
2266 "(GLuint renderbuffer = %u, GLsizei samples = %d, GLenum internalformat = %s, GLsizei "
2267 "width = %d, GLsizei height = %d)",
2268 renderbuffer, samples, GLenumToString(GLenumGroup::InternalFormat, internalformat), width,
2269 height);
2270
2271 Context *context = GetValidGlobalContext();
2272 if (context)
2273 {
2274 RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
2275 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2276 bool isCallValid =
2277 (context->skipValidation() ||
2278 ValidateNamedRenderbufferStorageMultisample(context, renderbufferPacked, samples,
2279 internalformat, width, height));
2280 if (isCallValid)
2281 {
2282 context->namedRenderbufferStorageMultisample(renderbufferPacked, samples,
2283 internalformat, width, height);
2284 }
2285 ANGLE_CAPTURE(NamedRenderbufferStorageMultisample, isCallValid, context, renderbufferPacked,
2286 samples, internalformat, width, height);
2287 }
2288 }
2289
ReadnPixels(GLint x,GLint y,GLsizei width,GLsizei height,GLenum format,GLenum type,GLsizei bufSize,void * data)2290 void GL_APIENTRY ReadnPixels(GLint x,
2291 GLint y,
2292 GLsizei width,
2293 GLsizei height,
2294 GLenum format,
2295 GLenum type,
2296 GLsizei bufSize,
2297 void *data)
2298 {
2299 EVENT(
2300 "(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLenum format = %s, "
2301 "GLenum type = %s, GLsizei bufSize = %d, void *data = 0x%016" PRIxPTR ")",
2302 x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format),
2303 GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)data);
2304
2305 Context *context = GetValidGlobalContext();
2306 if (context)
2307 {
2308 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2309 bool isCallValid =
2310 (context->skipValidation() ||
2311 ValidateReadnPixels(context, x, y, width, height, format, type, bufSize, data));
2312 if (isCallValid)
2313 {
2314 context->readnPixels(x, y, width, height, format, type, bufSize, data);
2315 }
2316 ANGLE_CAPTURE(ReadnPixels, isCallValid, context, x, y, width, height, format, type, bufSize,
2317 data);
2318 }
2319 }
2320
TextureBarrier()2321 void GL_APIENTRY TextureBarrier()
2322 {
2323 EVENT("()");
2324
2325 Context *context = GetValidGlobalContext();
2326 if (context)
2327 {
2328 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2329 bool isCallValid = (context->skipValidation() || ValidateTextureBarrier(context));
2330 if (isCallValid)
2331 {
2332 context->textureBarrier();
2333 }
2334 ANGLE_CAPTURE(TextureBarrier, isCallValid, context);
2335 }
2336 }
2337
TextureBuffer(GLuint texture,GLenum internalformat,GLuint buffer)2338 void GL_APIENTRY TextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer)
2339 {
2340 EVENT("(GLuint texture = %u, GLenum internalformat = %s, GLuint buffer = %u)", texture,
2341 GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer);
2342
2343 Context *context = GetValidGlobalContext();
2344 if (context)
2345 {
2346 TextureID texturePacked = FromGL<TextureID>(texture);
2347 BufferID bufferPacked = FromGL<BufferID>(buffer);
2348 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2349 bool isCallValid =
2350 (context->skipValidation() ||
2351 ValidateTextureBuffer(context, texturePacked, internalformat, bufferPacked));
2352 if (isCallValid)
2353 {
2354 context->textureBuffer(texturePacked, internalformat, bufferPacked);
2355 }
2356 ANGLE_CAPTURE(TextureBuffer, isCallValid, context, texturePacked, internalformat,
2357 bufferPacked);
2358 }
2359 }
2360
TextureBufferRange(GLuint texture,GLenum internalformat,GLuint buffer,GLintptr offset,GLsizeiptr size)2361 void GL_APIENTRY TextureBufferRange(GLuint texture,
2362 GLenum internalformat,
2363 GLuint buffer,
2364 GLintptr offset,
2365 GLsizeiptr size)
2366 {
2367 EVENT(
2368 "(GLuint texture = %u, GLenum internalformat = %s, GLuint buffer = %u, GLintptr offset = "
2369 "%llu, GLsizeiptr size = %llu)",
2370 texture, GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer,
2371 static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size));
2372
2373 Context *context = GetValidGlobalContext();
2374 if (context)
2375 {
2376 TextureID texturePacked = FromGL<TextureID>(texture);
2377 BufferID bufferPacked = FromGL<BufferID>(buffer);
2378 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2379 bool isCallValid = (context->skipValidation() ||
2380 ValidateTextureBufferRange(context, texturePacked, internalformat,
2381 bufferPacked, offset, size));
2382 if (isCallValid)
2383 {
2384 context->textureBufferRange(texturePacked, internalformat, bufferPacked, offset, size);
2385 }
2386 ANGLE_CAPTURE(TextureBufferRange, isCallValid, context, texturePacked, internalformat,
2387 bufferPacked, offset, size);
2388 }
2389 }
2390
TextureParameterIiv(GLuint texture,GLenum pname,const GLint * params)2391 void GL_APIENTRY TextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
2392 {
2393 EVENT("(GLuint texture = %u, GLenum pname = %s, const GLint *params = 0x%016" PRIxPTR ")",
2394 texture, GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params);
2395
2396 Context *context = GetValidGlobalContext();
2397 if (context)
2398 {
2399 TextureID texturePacked = FromGL<TextureID>(texture);
2400 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2401 bool isCallValid = (context->skipValidation() ||
2402 ValidateTextureParameterIiv(context, texturePacked, pname, params));
2403 if (isCallValid)
2404 {
2405 context->textureParameterIiv(texturePacked, pname, params);
2406 }
2407 ANGLE_CAPTURE(TextureParameterIiv, isCallValid, context, texturePacked, pname, params);
2408 }
2409 }
2410
TextureParameterIuiv(GLuint texture,GLenum pname,const GLuint * params)2411 void GL_APIENTRY TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
2412 {
2413 EVENT("(GLuint texture = %u, GLenum pname = %s, const GLuint *params = 0x%016" PRIxPTR ")",
2414 texture, GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)params);
2415
2416 Context *context = GetValidGlobalContext();
2417 if (context)
2418 {
2419 TextureID texturePacked = FromGL<TextureID>(texture);
2420 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2421 bool isCallValid = (context->skipValidation() ||
2422 ValidateTextureParameterIuiv(context, texturePacked, pname, params));
2423 if (isCallValid)
2424 {
2425 context->textureParameterIuiv(texturePacked, pname, params);
2426 }
2427 ANGLE_CAPTURE(TextureParameterIuiv, isCallValid, context, texturePacked, pname, params);
2428 }
2429 }
2430
TextureParameterf(GLuint texture,GLenum pname,GLfloat param)2431 void GL_APIENTRY TextureParameterf(GLuint texture, GLenum pname, GLfloat param)
2432 {
2433 EVENT("(GLuint texture = %u, GLenum pname = %s, GLfloat param = %f)", texture,
2434 GLenumToString(GLenumGroup::TextureParameterName, pname), param);
2435
2436 Context *context = GetValidGlobalContext();
2437 if (context)
2438 {
2439 TextureID texturePacked = FromGL<TextureID>(texture);
2440 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2441 bool isCallValid = (context->skipValidation() ||
2442 ValidateTextureParameterf(context, texturePacked, pname, param));
2443 if (isCallValid)
2444 {
2445 context->textureParameterf(texturePacked, pname, param);
2446 }
2447 ANGLE_CAPTURE(TextureParameterf, isCallValid, context, texturePacked, pname, param);
2448 }
2449 }
2450
TextureParameterfv(GLuint texture,GLenum pname,const GLfloat * param)2451 void GL_APIENTRY TextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param)
2452 {
2453 EVENT("(GLuint texture = %u, GLenum pname = %s, const GLfloat *param = 0x%016" PRIxPTR ")",
2454 texture, GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)param);
2455
2456 Context *context = GetValidGlobalContext();
2457 if (context)
2458 {
2459 TextureID texturePacked = FromGL<TextureID>(texture);
2460 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2461 bool isCallValid = (context->skipValidation() ||
2462 ValidateTextureParameterfv(context, texturePacked, pname, param));
2463 if (isCallValid)
2464 {
2465 context->textureParameterfv(texturePacked, pname, param);
2466 }
2467 ANGLE_CAPTURE(TextureParameterfv, isCallValid, context, texturePacked, pname, param);
2468 }
2469 }
2470
TextureParameteri(GLuint texture,GLenum pname,GLint param)2471 void GL_APIENTRY TextureParameteri(GLuint texture, GLenum pname, GLint param)
2472 {
2473 EVENT("(GLuint texture = %u, GLenum pname = %s, GLint param = %d)", texture,
2474 GLenumToString(GLenumGroup::TextureParameterName, pname), param);
2475
2476 Context *context = GetValidGlobalContext();
2477 if (context)
2478 {
2479 TextureID texturePacked = FromGL<TextureID>(texture);
2480 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2481 bool isCallValid = (context->skipValidation() ||
2482 ValidateTextureParameteri(context, texturePacked, pname, param));
2483 if (isCallValid)
2484 {
2485 context->textureParameteri(texturePacked, pname, param);
2486 }
2487 ANGLE_CAPTURE(TextureParameteri, isCallValid, context, texturePacked, pname, param);
2488 }
2489 }
2490
TextureParameteriv(GLuint texture,GLenum pname,const GLint * param)2491 void GL_APIENTRY TextureParameteriv(GLuint texture, GLenum pname, const GLint *param)
2492 {
2493 EVENT("(GLuint texture = %u, GLenum pname = %s, const GLint *param = 0x%016" PRIxPTR ")",
2494 texture, GLenumToString(GLenumGroup::TextureParameterName, pname), (uintptr_t)param);
2495
2496 Context *context = GetValidGlobalContext();
2497 if (context)
2498 {
2499 TextureID texturePacked = FromGL<TextureID>(texture);
2500 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2501 bool isCallValid = (context->skipValidation() ||
2502 ValidateTextureParameteriv(context, texturePacked, pname, param));
2503 if (isCallValid)
2504 {
2505 context->textureParameteriv(texturePacked, pname, param);
2506 }
2507 ANGLE_CAPTURE(TextureParameteriv, isCallValid, context, texturePacked, pname, param);
2508 }
2509 }
2510
TextureStorage1D(GLuint texture,GLsizei levels,GLenum internalformat,GLsizei width)2511 void GL_APIENTRY TextureStorage1D(GLuint texture,
2512 GLsizei levels,
2513 GLenum internalformat,
2514 GLsizei width)
2515 {
2516 EVENT(
2517 "(GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = %s, GLsizei width = "
2518 "%d)",
2519 texture, levels, GLenumToString(GLenumGroup::InternalFormat, internalformat), width);
2520
2521 Context *context = GetValidGlobalContext();
2522 if (context)
2523 {
2524 TextureID texturePacked = FromGL<TextureID>(texture);
2525 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2526 bool isCallValid =
2527 (context->skipValidation() ||
2528 ValidateTextureStorage1D(context, texturePacked, levels, internalformat, width));
2529 if (isCallValid)
2530 {
2531 context->textureStorage1D(texturePacked, levels, internalformat, width);
2532 }
2533 ANGLE_CAPTURE(TextureStorage1D, isCallValid, context, texturePacked, levels, internalformat,
2534 width);
2535 }
2536 }
2537
TextureStorage2D(GLuint texture,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height)2538 void GL_APIENTRY TextureStorage2D(GLuint texture,
2539 GLsizei levels,
2540 GLenum internalformat,
2541 GLsizei width,
2542 GLsizei height)
2543 {
2544 EVENT(
2545 "(GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = %s, GLsizei width = "
2546 "%d, GLsizei height = %d)",
2547 texture, levels, GLenumToString(GLenumGroup::InternalFormat, internalformat), width,
2548 height);
2549
2550 Context *context = GetValidGlobalContext();
2551 if (context)
2552 {
2553 TextureID texturePacked = FromGL<TextureID>(texture);
2554 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2555 bool isCallValid =
2556 (context->skipValidation() || ValidateTextureStorage2D(context, texturePacked, levels,
2557 internalformat, width, height));
2558 if (isCallValid)
2559 {
2560 context->textureStorage2D(texturePacked, levels, internalformat, width, height);
2561 }
2562 ANGLE_CAPTURE(TextureStorage2D, isCallValid, context, texturePacked, levels, internalformat,
2563 width, height);
2564 }
2565 }
2566
TextureStorage2DMultisample(GLuint texture,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLboolean fixedsamplelocations)2567 void GL_APIENTRY TextureStorage2DMultisample(GLuint texture,
2568 GLsizei samples,
2569 GLenum internalformat,
2570 GLsizei width,
2571 GLsizei height,
2572 GLboolean fixedsamplelocations)
2573 {
2574 EVENT(
2575 "(GLuint texture = %u, GLsizei samples = %d, GLenum internalformat = %s, GLsizei width = "
2576 "%d, GLsizei height = %d, GLboolean fixedsamplelocations = %s)",
2577 texture, samples, GLenumToString(GLenumGroup::InternalFormat, internalformat), width,
2578 height, GLbooleanToString(fixedsamplelocations));
2579
2580 Context *context = GetValidGlobalContext();
2581 if (context)
2582 {
2583 TextureID texturePacked = FromGL<TextureID>(texture);
2584 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2585 bool isCallValid =
2586 (context->skipValidation() ||
2587 ValidateTextureStorage2DMultisample(context, texturePacked, samples, internalformat,
2588 width, height, fixedsamplelocations));
2589 if (isCallValid)
2590 {
2591 context->textureStorage2DMultisample(texturePacked, samples, internalformat, width,
2592 height, fixedsamplelocations);
2593 }
2594 ANGLE_CAPTURE(TextureStorage2DMultisample, isCallValid, context, texturePacked, samples,
2595 internalformat, width, height, fixedsamplelocations);
2596 }
2597 }
2598
TextureStorage3D(GLuint texture,GLsizei levels,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth)2599 void GL_APIENTRY TextureStorage3D(GLuint texture,
2600 GLsizei levels,
2601 GLenum internalformat,
2602 GLsizei width,
2603 GLsizei height,
2604 GLsizei depth)
2605 {
2606 EVENT(
2607 "(GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = %s, GLsizei width = "
2608 "%d, GLsizei height = %d, GLsizei depth = %d)",
2609 texture, levels, GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height,
2610 depth);
2611
2612 Context *context = GetValidGlobalContext();
2613 if (context)
2614 {
2615 TextureID texturePacked = FromGL<TextureID>(texture);
2616 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2617 bool isCallValid = (context->skipValidation() ||
2618 ValidateTextureStorage3D(context, texturePacked, levels, internalformat,
2619 width, height, depth));
2620 if (isCallValid)
2621 {
2622 context->textureStorage3D(texturePacked, levels, internalformat, width, height, depth);
2623 }
2624 ANGLE_CAPTURE(TextureStorage3D, isCallValid, context, texturePacked, levels, internalformat,
2625 width, height, depth);
2626 }
2627 }
2628
TextureStorage3DMultisample(GLuint texture,GLsizei samples,GLenum internalformat,GLsizei width,GLsizei height,GLsizei depth,GLboolean fixedsamplelocations)2629 void GL_APIENTRY TextureStorage3DMultisample(GLuint texture,
2630 GLsizei samples,
2631 GLenum internalformat,
2632 GLsizei width,
2633 GLsizei height,
2634 GLsizei depth,
2635 GLboolean fixedsamplelocations)
2636 {
2637 EVENT(
2638 "(GLuint texture = %u, GLsizei samples = %d, GLenum internalformat = %s, GLsizei width = "
2639 "%d, GLsizei height = %d, GLsizei depth = %d, GLboolean fixedsamplelocations = %s)",
2640 texture, samples, GLenumToString(GLenumGroup::InternalFormat, internalformat), width,
2641 height, depth, GLbooleanToString(fixedsamplelocations));
2642
2643 Context *context = GetValidGlobalContext();
2644 if (context)
2645 {
2646 TextureID texturePacked = FromGL<TextureID>(texture);
2647 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2648 bool isCallValid =
2649 (context->skipValidation() ||
2650 ValidateTextureStorage3DMultisample(context, texturePacked, samples, internalformat,
2651 width, height, depth, fixedsamplelocations));
2652 if (isCallValid)
2653 {
2654 context->textureStorage3DMultisample(texturePacked, samples, internalformat, width,
2655 height, depth, fixedsamplelocations);
2656 }
2657 ANGLE_CAPTURE(TextureStorage3DMultisample, isCallValid, context, texturePacked, samples,
2658 internalformat, width, height, depth, fixedsamplelocations);
2659 }
2660 }
2661
TextureSubImage1D(GLuint texture,GLint level,GLint xoffset,GLsizei width,GLenum format,GLenum type,const void * pixels)2662 void GL_APIENTRY TextureSubImage1D(GLuint texture,
2663 GLint level,
2664 GLint xoffset,
2665 GLsizei width,
2666 GLenum format,
2667 GLenum type,
2668 const void *pixels)
2669 {
2670 EVENT(
2671 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLsizei width = %d, GLenum "
2672 "format = %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR ")",
2673 texture, level, xoffset, width, GLenumToString(GLenumGroup::PixelFormat, format),
2674 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
2675
2676 Context *context = GetValidGlobalContext();
2677 if (context)
2678 {
2679 TextureID texturePacked = FromGL<TextureID>(texture);
2680 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2681 bool isCallValid = (context->skipValidation() ||
2682 ValidateTextureSubImage1D(context, texturePacked, level, xoffset, width,
2683 format, type, pixels));
2684 if (isCallValid)
2685 {
2686 context->textureSubImage1D(texturePacked, level, xoffset, width, format, type, pixels);
2687 }
2688 ANGLE_CAPTURE(TextureSubImage1D, isCallValid, context, texturePacked, level, xoffset, width,
2689 format, type, pixels);
2690 }
2691 }
2692
TextureSubImage2D(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLsizei width,GLsizei height,GLenum format,GLenum type,const void * pixels)2693 void GL_APIENTRY TextureSubImage2D(GLuint texture,
2694 GLint level,
2695 GLint xoffset,
2696 GLint yoffset,
2697 GLsizei width,
2698 GLsizei height,
2699 GLenum format,
2700 GLenum type,
2701 const void *pixels)
2702 {
2703 EVENT(
2704 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
2705 "width = %d, GLsizei height = %d, GLenum format = %s, GLenum type = %s, const void *pixels "
2706 "= 0x%016" PRIxPTR ")",
2707 texture, level, xoffset, yoffset, width, height,
2708 GLenumToString(GLenumGroup::PixelFormat, format),
2709 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
2710
2711 Context *context = GetValidGlobalContext();
2712 if (context)
2713 {
2714 TextureID texturePacked = FromGL<TextureID>(texture);
2715 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2716 bool isCallValid =
2717 (context->skipValidation() ||
2718 ValidateTextureSubImage2D(context, texturePacked, level, xoffset, yoffset, width,
2719 height, format, type, pixels));
2720 if (isCallValid)
2721 {
2722 context->textureSubImage2D(texturePacked, level, xoffset, yoffset, width, height,
2723 format, type, pixels);
2724 }
2725 ANGLE_CAPTURE(TextureSubImage2D, isCallValid, context, texturePacked, level, xoffset,
2726 yoffset, width, height, format, type, pixels);
2727 }
2728 }
2729
TextureSubImage3D(GLuint texture,GLint level,GLint xoffset,GLint yoffset,GLint zoffset,GLsizei width,GLsizei height,GLsizei depth,GLenum format,GLenum type,const void * pixels)2730 void GL_APIENTRY TextureSubImage3D(GLuint texture,
2731 GLint level,
2732 GLint xoffset,
2733 GLint yoffset,
2734 GLint zoffset,
2735 GLsizei width,
2736 GLsizei height,
2737 GLsizei depth,
2738 GLenum format,
2739 GLenum type,
2740 const void *pixels)
2741 {
2742 EVENT(
2743 "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
2744 "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
2745 "= %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR ")",
2746 texture, level, xoffset, yoffset, zoffset, width, height, depth,
2747 GLenumToString(GLenumGroup::PixelFormat, format),
2748 GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
2749
2750 Context *context = GetValidGlobalContext();
2751 if (context)
2752 {
2753 TextureID texturePacked = FromGL<TextureID>(texture);
2754 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2755 bool isCallValid =
2756 (context->skipValidation() ||
2757 ValidateTextureSubImage3D(context, texturePacked, level, xoffset, yoffset, zoffset,
2758 width, height, depth, format, type, pixels));
2759 if (isCallValid)
2760 {
2761 context->textureSubImage3D(texturePacked, level, xoffset, yoffset, zoffset, width,
2762 height, depth, format, type, pixels);
2763 }
2764 ANGLE_CAPTURE(TextureSubImage3D, isCallValid, context, texturePacked, level, xoffset,
2765 yoffset, zoffset, width, height, depth, format, type, pixels);
2766 }
2767 }
2768
TransformFeedbackBufferBase(GLuint xfb,GLuint index,GLuint buffer)2769 void GL_APIENTRY TransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
2770 {
2771 EVENT("(GLuint xfb = %u, GLuint index = %u, GLuint buffer = %u)", xfb, index, buffer);
2772
2773 Context *context = GetValidGlobalContext();
2774 if (context)
2775 {
2776 BufferID bufferPacked = FromGL<BufferID>(buffer);
2777 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2778 bool isCallValid = (context->skipValidation() ||
2779 ValidateTransformFeedbackBufferBase(context, xfb, index, bufferPacked));
2780 if (isCallValid)
2781 {
2782 context->transformFeedbackBufferBase(xfb, index, bufferPacked);
2783 }
2784 ANGLE_CAPTURE(TransformFeedbackBufferBase, isCallValid, context, xfb, index, bufferPacked);
2785 }
2786 }
2787
TransformFeedbackBufferRange(GLuint xfb,GLuint index,GLuint buffer,GLintptr offset,GLsizeiptr size)2788 void GL_APIENTRY TransformFeedbackBufferRange(GLuint xfb,
2789 GLuint index,
2790 GLuint buffer,
2791 GLintptr offset,
2792 GLsizeiptr size)
2793 {
2794 EVENT(
2795 "(GLuint xfb = %u, GLuint index = %u, GLuint buffer = %u, GLintptr offset = %llu, "
2796 "GLsizeiptr size = %llu)",
2797 xfb, index, buffer, static_cast<unsigned long long>(offset),
2798 static_cast<unsigned long long>(size));
2799
2800 Context *context = GetValidGlobalContext();
2801 if (context)
2802 {
2803 BufferID bufferPacked = FromGL<BufferID>(buffer);
2804 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2805 bool isCallValid =
2806 (context->skipValidation() ||
2807 ValidateTransformFeedbackBufferRange(context, xfb, index, bufferPacked, offset, size));
2808 if (isCallValid)
2809 {
2810 context->transformFeedbackBufferRange(xfb, index, bufferPacked, offset, size);
2811 }
2812 ANGLE_CAPTURE(TransformFeedbackBufferRange, isCallValid, context, xfb, index, bufferPacked,
2813 offset, size);
2814 }
2815 }
2816
UnmapNamedBuffer(GLuint buffer)2817 GLboolean GL_APIENTRY UnmapNamedBuffer(GLuint buffer)
2818 {
2819 EVENT("(GLuint buffer = %u)", buffer);
2820
2821 Context *context = GetValidGlobalContext();
2822 GLboolean returnValue;
2823 if (context)
2824 {
2825 BufferID bufferPacked = FromGL<BufferID>(buffer);
2826 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2827 bool isCallValid =
2828 (context->skipValidation() || ValidateUnmapNamedBuffer(context, bufferPacked));
2829 if (isCallValid)
2830 {
2831 returnValue = context->unmapNamedBuffer(bufferPacked);
2832 }
2833 else
2834 {
2835 returnValue = GetDefaultReturnValue<EntryPoint::UnmapNamedBuffer, GLboolean>();
2836 }
2837 ANGLE_CAPTURE(UnmapNamedBuffer, isCallValid, context, bufferPacked, returnValue);
2838 }
2839 else
2840 {
2841 returnValue = GetDefaultReturnValue<EntryPoint::UnmapNamedBuffer, GLboolean>();
2842 }
2843 return returnValue;
2844 }
2845
VertexArrayAttribBinding(GLuint vaobj,GLuint attribindex,GLuint bindingindex)2846 void GL_APIENTRY VertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex)
2847 {
2848 EVENT("(GLuint vaobj = %u, GLuint attribindex = %u, GLuint bindingindex = %u)", vaobj,
2849 attribindex, bindingindex);
2850
2851 Context *context = GetValidGlobalContext();
2852 if (context)
2853 {
2854 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2855 bool isCallValid =
2856 (context->skipValidation() ||
2857 ValidateVertexArrayAttribBinding(context, vaobj, attribindex, bindingindex));
2858 if (isCallValid)
2859 {
2860 context->vertexArrayAttribBinding(vaobj, attribindex, bindingindex);
2861 }
2862 ANGLE_CAPTURE(VertexArrayAttribBinding, isCallValid, context, vaobj, attribindex,
2863 bindingindex);
2864 }
2865 }
2866
VertexArrayAttribFormat(GLuint vaobj,GLuint attribindex,GLint size,GLenum type,GLboolean normalized,GLuint relativeoffset)2867 void GL_APIENTRY VertexArrayAttribFormat(GLuint vaobj,
2868 GLuint attribindex,
2869 GLint size,
2870 GLenum type,
2871 GLboolean normalized,
2872 GLuint relativeoffset)
2873 {
2874 EVENT(
2875 "(GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLboolean "
2876 "normalized = %s, GLuint relativeoffset = %u)",
2877 vaobj, attribindex, size, GLenumToString(GLenumGroup::VertexAttribType, type),
2878 GLbooleanToString(normalized), relativeoffset);
2879
2880 Context *context = GetValidGlobalContext();
2881 if (context)
2882 {
2883 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2884 bool isCallValid = (context->skipValidation() ||
2885 ValidateVertexArrayAttribFormat(context, vaobj, attribindex, size, type,
2886 normalized, relativeoffset));
2887 if (isCallValid)
2888 {
2889 context->vertexArrayAttribFormat(vaobj, attribindex, size, type, normalized,
2890 relativeoffset);
2891 }
2892 ANGLE_CAPTURE(VertexArrayAttribFormat, isCallValid, context, vaobj, attribindex, size, type,
2893 normalized, relativeoffset);
2894 }
2895 }
2896
VertexArrayAttribIFormat(GLuint vaobj,GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)2897 void GL_APIENTRY VertexArrayAttribIFormat(GLuint vaobj,
2898 GLuint attribindex,
2899 GLint size,
2900 GLenum type,
2901 GLuint relativeoffset)
2902 {
2903 EVENT(
2904 "(GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLuint "
2905 "relativeoffset = %u)",
2906 vaobj, attribindex, size, GLenumToString(GLenumGroup::VertexAttribType, type),
2907 relativeoffset);
2908
2909 Context *context = GetValidGlobalContext();
2910 if (context)
2911 {
2912 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2913 bool isCallValid = (context->skipValidation() ||
2914 ValidateVertexArrayAttribIFormat(context, vaobj, attribindex, size,
2915 type, relativeoffset));
2916 if (isCallValid)
2917 {
2918 context->vertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset);
2919 }
2920 ANGLE_CAPTURE(VertexArrayAttribIFormat, isCallValid, context, vaobj, attribindex, size,
2921 type, relativeoffset);
2922 }
2923 }
2924
VertexArrayAttribLFormat(GLuint vaobj,GLuint attribindex,GLint size,GLenum type,GLuint relativeoffset)2925 void GL_APIENTRY VertexArrayAttribLFormat(GLuint vaobj,
2926 GLuint attribindex,
2927 GLint size,
2928 GLenum type,
2929 GLuint relativeoffset)
2930 {
2931 EVENT(
2932 "(GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLuint "
2933 "relativeoffset = %u)",
2934 vaobj, attribindex, size, GLenumToString(GLenumGroup::VertexAttribType, type),
2935 relativeoffset);
2936
2937 Context *context = GetValidGlobalContext();
2938 if (context)
2939 {
2940 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2941 bool isCallValid = (context->skipValidation() ||
2942 ValidateVertexArrayAttribLFormat(context, vaobj, attribindex, size,
2943 type, relativeoffset));
2944 if (isCallValid)
2945 {
2946 context->vertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset);
2947 }
2948 ANGLE_CAPTURE(VertexArrayAttribLFormat, isCallValid, context, vaobj, attribindex, size,
2949 type, relativeoffset);
2950 }
2951 }
2952
VertexArrayBindingDivisor(GLuint vaobj,GLuint bindingindex,GLuint divisor)2953 void GL_APIENTRY VertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor)
2954 {
2955 EVENT("(GLuint vaobj = %u, GLuint bindingindex = %u, GLuint divisor = %u)", vaobj, bindingindex,
2956 divisor);
2957
2958 Context *context = GetValidGlobalContext();
2959 if (context)
2960 {
2961 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2962 bool isCallValid =
2963 (context->skipValidation() ||
2964 ValidateVertexArrayBindingDivisor(context, vaobj, bindingindex, divisor));
2965 if (isCallValid)
2966 {
2967 context->vertexArrayBindingDivisor(vaobj, bindingindex, divisor);
2968 }
2969 ANGLE_CAPTURE(VertexArrayBindingDivisor, isCallValid, context, vaobj, bindingindex,
2970 divisor);
2971 }
2972 }
2973
VertexArrayElementBuffer(GLuint vaobj,GLuint buffer)2974 void GL_APIENTRY VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
2975 {
2976 EVENT("(GLuint vaobj = %u, GLuint buffer = %u)", vaobj, buffer);
2977
2978 Context *context = GetValidGlobalContext();
2979 if (context)
2980 {
2981 BufferID bufferPacked = FromGL<BufferID>(buffer);
2982 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2983 bool isCallValid = (context->skipValidation() ||
2984 ValidateVertexArrayElementBuffer(context, vaobj, bufferPacked));
2985 if (isCallValid)
2986 {
2987 context->vertexArrayElementBuffer(vaobj, bufferPacked);
2988 }
2989 ANGLE_CAPTURE(VertexArrayElementBuffer, isCallValid, context, vaobj, bufferPacked);
2990 }
2991 }
2992
VertexArrayVertexBuffer(GLuint vaobj,GLuint bindingindex,GLuint buffer,GLintptr offset,GLsizei stride)2993 void GL_APIENTRY VertexArrayVertexBuffer(GLuint vaobj,
2994 GLuint bindingindex,
2995 GLuint buffer,
2996 GLintptr offset,
2997 GLsizei stride)
2998 {
2999 EVENT(
3000 "(GLuint vaobj = %u, GLuint bindingindex = %u, GLuint buffer = %u, GLintptr offset = %llu, "
3001 "GLsizei stride = %d)",
3002 vaobj, bindingindex, buffer, static_cast<unsigned long long>(offset), stride);
3003
3004 Context *context = GetValidGlobalContext();
3005 if (context)
3006 {
3007 BufferID bufferPacked = FromGL<BufferID>(buffer);
3008 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3009 bool isCallValid = (context->skipValidation() ||
3010 ValidateVertexArrayVertexBuffer(context, vaobj, bindingindex,
3011 bufferPacked, offset, stride));
3012 if (isCallValid)
3013 {
3014 context->vertexArrayVertexBuffer(vaobj, bindingindex, bufferPacked, offset, stride);
3015 }
3016 ANGLE_CAPTURE(VertexArrayVertexBuffer, isCallValid, context, vaobj, bindingindex,
3017 bufferPacked, offset, stride);
3018 }
3019 }
3020
VertexArrayVertexBuffers(GLuint vaobj,GLuint first,GLsizei count,const GLuint * buffers,const GLintptr * offsets,const GLsizei * strides)3021 void GL_APIENTRY VertexArrayVertexBuffers(GLuint vaobj,
3022 GLuint first,
3023 GLsizei count,
3024 const GLuint *buffers,
3025 const GLintptr *offsets,
3026 const GLsizei *strides)
3027 {
3028 EVENT(
3029 "(GLuint vaobj = %u, GLuint first = %u, GLsizei count = %d, const GLuint *buffers = "
3030 "0x%016" PRIxPTR ", const GLintptr *offsets = 0x%016" PRIxPTR
3031 ", const GLsizei *strides = 0x%016" PRIxPTR ")",
3032 vaobj, first, count, (uintptr_t)buffers, (uintptr_t)offsets, (uintptr_t)strides);
3033
3034 Context *context = GetValidGlobalContext();
3035 if (context)
3036 {
3037 const BufferID *buffersPacked = FromGL<const BufferID *>(buffers);
3038 std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3039 bool isCallValid = (context->skipValidation() ||
3040 ValidateVertexArrayVertexBuffers(context, vaobj, first, count,
3041 buffersPacked, offsets, strides));
3042 if (isCallValid)
3043 {
3044 context->vertexArrayVertexBuffers(vaobj, first, count, buffersPacked, offsets, strides);
3045 }
3046 ANGLE_CAPTURE(VertexArrayVertexBuffers, isCallValid, context, vaobj, first, count,
3047 buffersPacked, offsets, strides);
3048 }
3049 }
3050 } // namespace gl
3051