1
// GENERATED FILE - DO NOT EDIT.
2
// Generated by generate_entry_points.py using data from gl.xml.
4
// Copyright 2020 The ANGLE Project Authors. All rights reserved.
5
// Use of this source code is governed by a BSD-style license that can be
6
// found in the LICENSE file.
8
// entry_points_gl_4_5_autogen.cpp:
9
// Defines the GL 4.5 entry points.
11
#include "libGL/entry_points_gl_4_5_autogen.h"
13
#include "libANGLE/Context.h"
14
#include "libANGLE/Context.inl.h"
15
#include "libANGLE/entry_points_utils.h"
16
#include "libANGLE/gl_enum_utils.h"
17
#include "libANGLE/validationEGL.h"
18
#include "libANGLE/validationES.h"
19
#include "libANGLE/validationES1.h"
20
#include "libANGLE/validationES2.h"
21
#include "libANGLE/validationES3.h"
22
#include "libANGLE/validationES31.h"
23
#include "libANGLE/validationES32.h"
24
#include "libANGLE/validationESEXT.h"
25
#include "libANGLE/validationGL45_autogen.h"
26
#include "libGLESv2/global_state.h"
30
void GL_APIENTRY BindTextureUnit(GLuint unit, GLuint texture)
32
Context *context = GetValidGlobalContext();
33
EVENT("glBindTextureUnit", "context = %d, GLuint unit = %u, GLuint texture = %u", CID(context),
38
TextureID texturePacked = FromGL<TextureID>(texture);
39
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
41
(context->skipValidation() || ValidateBindTextureUnit(context, unit, texturePacked));
44
context->bindTextureUnit(unit, texturePacked);
46
ANGLE_CAPTURE(BindTextureUnit, isCallValid, context, unit, texturePacked);
50
void GL_APIENTRY BlitNamedFramebuffer(GLuint readFramebuffer,
51
GLuint drawFramebuffer,
63
Context *context = GetValidGlobalContext();
64
EVENT("glBlitNamedFramebuffer",
65
"context = %d, GLuint readFramebuffer = %u, GLuint drawFramebuffer = %u, GLint srcX0 = "
66
"%d, GLint srcY0 = %d, GLint srcX1 = %d, GLint srcY1 = %d, GLint dstX0 = %d, GLint dstY0 "
67
"= %d, GLint dstX1 = %d, GLint dstY1 = %d, GLbitfield mask = %s, GLenum filter = %s",
68
CID(context), readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0,
69
dstX1, dstY1, GLbitfieldToString(GLenumGroup::ClearBufferMask, mask).c_str(),
70
GLenumToString(GLenumGroup::BlitFramebufferFilter, filter));
74
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
76
(context->skipValidation() ||
77
ValidateBlitNamedFramebuffer(context, readFramebuffer, drawFramebuffer, srcX0, srcY0,
78
srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
81
context->blitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1,
82
srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
84
ANGLE_CAPTURE(BlitNamedFramebuffer, isCallValid, context, readFramebuffer, drawFramebuffer,
85
srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
89
GLenum GL_APIENTRY CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
91
Context *context = GetValidGlobalContext();
92
EVENT("glCheckNamedFramebufferStatus",
93
"context = %d, GLuint framebuffer = %u, GLenum target = %s", CID(context), framebuffer,
94
GLenumToString(GLenumGroup::FramebufferTarget, target));
99
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
100
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
101
bool isCallValid = (context->skipValidation() || ValidateCheckNamedFramebufferStatus(
102
context, framebufferPacked, target));
105
returnValue = context->checkNamedFramebufferStatus(framebufferPacked, target);
109
returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
111
ANGLE_CAPTURE(CheckNamedFramebufferStatus, isCallValid, context, framebufferPacked, target,
116
returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
121
void GL_APIENTRY ClearNamedBufferData(GLuint buffer,
122
GLenum internalformat,
127
Context *context = GetValidGlobalContext();
128
EVENT("glClearNamedBufferData",
129
"context = %d, GLuint buffer = %u, GLenum internalformat = %s, GLenum format = %s, "
130
"GLenum type = %s, const void *data = 0x%016" PRIxPTR "",
131
CID(context), buffer, GLenumToString(GLenumGroup::InternalFormat, internalformat),
132
GLenumToString(GLenumGroup::PixelFormat, format),
133
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
137
BufferID bufferPacked = FromGL<BufferID>(buffer);
138
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
139
bool isCallValid = (context->skipValidation() ||
140
ValidateClearNamedBufferData(context, bufferPacked, internalformat,
141
format, type, data));
144
context->clearNamedBufferData(bufferPacked, internalformat, format, type, data);
146
ANGLE_CAPTURE(ClearNamedBufferData, isCallValid, context, bufferPacked, internalformat,
151
void GL_APIENTRY ClearNamedBufferSubData(GLuint buffer,
152
GLenum internalformat,
159
Context *context = GetValidGlobalContext();
160
EVENT("glClearNamedBufferSubData",
161
"context = %d, GLuint buffer = %u, GLenum internalformat = %s, GLintptr offset = %llu, "
162
"GLsizeiptr size = %llu, GLenum format = %s, GLenum type = %s, const void *data = "
164
CID(context), buffer, GLenumToString(GLenumGroup::InternalFormat, internalformat),
165
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
166
GLenumToString(GLenumGroup::PixelFormat, format),
167
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
171
BufferID bufferPacked = FromGL<BufferID>(buffer);
172
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
173
bool isCallValid = (context->skipValidation() ||
174
ValidateClearNamedBufferSubData(context, bufferPacked, internalformat,
175
offset, size, format, type, data));
178
context->clearNamedBufferSubData(bufferPacked, internalformat, offset, size, format,
181
ANGLE_CAPTURE(ClearNamedBufferSubData, isCallValid, context, bufferPacked, internalformat,
182
offset, size, format, type, data);
186
void GL_APIENTRY ClearNamedFramebufferfi(GLuint framebuffer,
192
Context *context = GetValidGlobalContext();
193
EVENT("glClearNamedFramebufferfi",
194
"context = %d, GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, "
195
"GLfloat depth = %f, GLint stencil = %d",
196
CID(context), framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer, depth,
201
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
202
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
203
bool isCallValid = (context->skipValidation() ||
204
ValidateClearNamedFramebufferfi(context, framebufferPacked, buffer,
205
drawbuffer, depth, stencil));
208
context->clearNamedFramebufferfi(framebufferPacked, buffer, drawbuffer, depth, stencil);
210
ANGLE_CAPTURE(ClearNamedFramebufferfi, isCallValid, context, framebufferPacked, buffer,
211
drawbuffer, depth, stencil);
215
void GL_APIENTRY ClearNamedFramebufferfv(GLuint framebuffer,
218
const GLfloat *value)
220
Context *context = GetValidGlobalContext();
221
EVENT("glClearNamedFramebufferfv",
222
"context = %d, GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, const "
223
"GLfloat *value = 0x%016" PRIxPTR "",
224
CID(context), framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer,
229
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
230
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
231
bool isCallValid = (context->skipValidation() ||
232
ValidateClearNamedFramebufferfv(context, framebufferPacked, buffer,
236
context->clearNamedFramebufferfv(framebufferPacked, buffer, drawbuffer, value);
238
ANGLE_CAPTURE(ClearNamedFramebufferfv, isCallValid, context, framebufferPacked, buffer,
243
void GL_APIENTRY ClearNamedFramebufferiv(GLuint framebuffer,
248
Context *context = GetValidGlobalContext();
249
EVENT("glClearNamedFramebufferiv",
250
"context = %d, GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, const "
251
"GLint *value = 0x%016" PRIxPTR "",
252
CID(context), framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer,
257
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
258
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
259
bool isCallValid = (context->skipValidation() ||
260
ValidateClearNamedFramebufferiv(context, framebufferPacked, buffer,
264
context->clearNamedFramebufferiv(framebufferPacked, buffer, drawbuffer, value);
266
ANGLE_CAPTURE(ClearNamedFramebufferiv, isCallValid, context, framebufferPacked, buffer,
271
void GL_APIENTRY ClearNamedFramebufferuiv(GLuint framebuffer,
276
Context *context = GetValidGlobalContext();
277
EVENT("glClearNamedFramebufferuiv",
278
"context = %d, GLuint framebuffer = %u, GLenum buffer = %s, GLint drawbuffer = %d, const "
279
"GLuint *value = 0x%016" PRIxPTR "",
280
CID(context), framebuffer, GLenumToString(GLenumGroup::Buffer, buffer), drawbuffer,
285
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
286
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
287
bool isCallValid = (context->skipValidation() ||
288
ValidateClearNamedFramebufferuiv(context, framebufferPacked, buffer,
292
context->clearNamedFramebufferuiv(framebufferPacked, buffer, drawbuffer, value);
294
ANGLE_CAPTURE(ClearNamedFramebufferuiv, isCallValid, context, framebufferPacked, buffer,
299
void GL_APIENTRY ClipControl(GLenum origin, GLenum depth)
301
Context *context = GetValidGlobalContext();
302
EVENT("glClipControl", "context = %d, GLenum origin = %s, GLenum depth = %s", CID(context),
303
GLenumToString(GLenumGroup::ClipControlOrigin, origin),
304
GLenumToString(GLenumGroup::ClipControlDepth, depth));
308
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
310
(context->skipValidation() || ValidateClipControl(context, origin, depth));
313
context->clipControl(origin, depth);
315
ANGLE_CAPTURE(ClipControl, isCallValid, context, origin, depth);
319
void GL_APIENTRY CompressedTextureSubImage1D(GLuint texture,
327
Context *context = GetValidGlobalContext();
328
EVENT("glCompressedTextureSubImage1D",
329
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLsizei width "
330
"= %d, GLenum format = %s, GLsizei imageSize = %d, const void *data = 0x%016" PRIxPTR "",
331
CID(context), texture, level, xoffset, width,
332
GLenumToString(GLenumGroup::PixelFormat, format), imageSize, (uintptr_t)data);
336
TextureID texturePacked = FromGL<TextureID>(texture);
337
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
338
bool isCallValid = (context->skipValidation() || ValidateCompressedTextureSubImage1D(
339
context, texturePacked, level, xoffset,
340
width, format, imageSize, data));
343
context->compressedTextureSubImage1D(texturePacked, level, xoffset, width, format,
346
ANGLE_CAPTURE(CompressedTextureSubImage1D, isCallValid, context, texturePacked, level,
347
xoffset, width, format, imageSize, data);
351
void GL_APIENTRY CompressedTextureSubImage2D(GLuint texture,
361
Context *context = GetValidGlobalContext();
362
EVENT("glCompressedTextureSubImage2D",
363
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
364
"= %d, GLsizei width = %d, GLsizei height = %d, GLenum format = %s, GLsizei imageSize = "
365
"%d, const void *data = 0x%016" PRIxPTR "",
366
CID(context), texture, level, xoffset, yoffset, width, height,
367
GLenumToString(GLenumGroup::PixelFormat, format), imageSize, (uintptr_t)data);
371
TextureID texturePacked = FromGL<TextureID>(texture);
372
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
374
(context->skipValidation() ||
375
ValidateCompressedTextureSubImage2D(context, texturePacked, level, xoffset, yoffset,
376
width, height, format, imageSize, data));
379
context->compressedTextureSubImage2D(texturePacked, level, xoffset, yoffset, width,
380
height, format, imageSize, data);
382
ANGLE_CAPTURE(CompressedTextureSubImage2D, isCallValid, context, texturePacked, level,
383
xoffset, yoffset, width, height, format, imageSize, data);
387
void GL_APIENTRY CompressedTextureSubImage3D(GLuint texture,
399
Context *context = GetValidGlobalContext();
400
EVENT("glCompressedTextureSubImage3D",
401
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
402
"= %d, GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
403
"GLenum format = %s, GLsizei imageSize = %d, const void *data = 0x%016" PRIxPTR "",
404
CID(context), texture, level, xoffset, yoffset, zoffset, width, height, depth,
405
GLenumToString(GLenumGroup::PixelFormat, format), imageSize, (uintptr_t)data);
409
TextureID texturePacked = FromGL<TextureID>(texture);
410
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
411
bool isCallValid = (context->skipValidation() ||
412
ValidateCompressedTextureSubImage3D(
413
context, texturePacked, level, xoffset, yoffset, zoffset, width,
414
height, depth, format, imageSize, data));
417
context->compressedTextureSubImage3D(texturePacked, level, xoffset, yoffset, zoffset,
418
width, height, depth, format, imageSize, data);
420
ANGLE_CAPTURE(CompressedTextureSubImage3D, isCallValid, context, texturePacked, level,
421
xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data);
425
void GL_APIENTRY CopyNamedBufferSubData(GLuint readBuffer,
428
GLintptr writeOffset,
431
Context *context = GetValidGlobalContext();
432
EVENT("glCopyNamedBufferSubData",
433
"context = %d, GLuint readBuffer = %u, GLuint writeBuffer = %u, GLintptr readOffset = "
434
"%llu, GLintptr writeOffset = %llu, GLsizeiptr size = %llu",
435
CID(context), readBuffer, writeBuffer, static_cast<unsigned long long>(readOffset),
436
static_cast<unsigned long long>(writeOffset), static_cast<unsigned long long>(size));
440
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
441
bool isCallValid = (context->skipValidation() ||
442
ValidateCopyNamedBufferSubData(context, readBuffer, writeBuffer,
443
readOffset, writeOffset, size));
446
context->copyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size);
448
ANGLE_CAPTURE(CopyNamedBufferSubData, isCallValid, context, readBuffer, writeBuffer,
449
readOffset, writeOffset, size);
454
CopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
456
Context *context = GetValidGlobalContext();
457
EVENT("glCopyTextureSubImage1D",
458
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint x = %d, "
459
"GLint y = %d, GLsizei width = %d",
460
CID(context), texture, level, xoffset, x, y, width);
464
TextureID texturePacked = FromGL<TextureID>(texture);
465
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
467
(context->skipValidation() ||
468
ValidateCopyTextureSubImage1D(context, texturePacked, level, xoffset, x, y, width));
471
context->copyTextureSubImage1D(texturePacked, level, xoffset, x, y, width);
473
ANGLE_CAPTURE(CopyTextureSubImage1D, isCallValid, context, texturePacked, level, xoffset, x,
478
void GL_APIENTRY CopyTextureSubImage2D(GLuint texture,
487
Context *context = GetValidGlobalContext();
488
EVENT("glCopyTextureSubImage2D",
489
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
490
"= %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d",
491
CID(context), texture, level, xoffset, yoffset, x, y, width, height);
495
TextureID texturePacked = FromGL<TextureID>(texture);
496
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
497
bool isCallValid = (context->skipValidation() ||
498
ValidateCopyTextureSubImage2D(context, texturePacked, level, xoffset,
499
yoffset, x, y, width, height));
502
context->copyTextureSubImage2D(texturePacked, level, xoffset, yoffset, x, y, width,
505
ANGLE_CAPTURE(CopyTextureSubImage2D, isCallValid, context, texturePacked, level, xoffset,
506
yoffset, x, y, width, height);
510
void GL_APIENTRY CopyTextureSubImage3D(GLuint texture,
520
Context *context = GetValidGlobalContext();
521
EVENT("glCopyTextureSubImage3D",
522
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
523
"= %d, GLint zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei "
525
CID(context), texture, level, xoffset, yoffset, zoffset, x, y, width, height);
529
TextureID texturePacked = FromGL<TextureID>(texture);
530
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
531
bool isCallValid = (context->skipValidation() ||
532
ValidateCopyTextureSubImage3D(context, texturePacked, level, xoffset,
533
yoffset, zoffset, x, y, width, height));
536
context->copyTextureSubImage3D(texturePacked, level, xoffset, yoffset, zoffset, x, y,
539
ANGLE_CAPTURE(CopyTextureSubImage3D, isCallValid, context, texturePacked, level, xoffset,
540
yoffset, zoffset, x, y, width, height);
544
void GL_APIENTRY CreateBuffers(GLsizei n, GLuint *buffers)
546
Context *context = GetValidGlobalContext();
547
EVENT("glCreateBuffers", "context = %d, GLsizei n = %d, GLuint *buffers = 0x%016" PRIxPTR "",
548
CID(context), n, (uintptr_t)buffers);
552
BufferID *buffersPacked = FromGL<BufferID *>(buffers);
553
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
555
(context->skipValidation() || ValidateCreateBuffers(context, n, buffersPacked));
558
context->createBuffers(n, buffersPacked);
560
ANGLE_CAPTURE(CreateBuffers, isCallValid, context, n, buffersPacked);
564
void GL_APIENTRY CreateFramebuffers(GLsizei n, GLuint *framebuffers)
566
Context *context = GetValidGlobalContext();
567
EVENT("glCreateFramebuffers",
568
"context = %d, GLsizei n = %d, GLuint *framebuffers = 0x%016" PRIxPTR "", CID(context), n,
569
(uintptr_t)framebuffers);
573
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
575
(context->skipValidation() || ValidateCreateFramebuffers(context, n, framebuffers));
578
context->createFramebuffers(n, framebuffers);
580
ANGLE_CAPTURE(CreateFramebuffers, isCallValid, context, n, framebuffers);
584
void GL_APIENTRY CreateProgramPipelines(GLsizei n, GLuint *pipelines)
586
Context *context = GetValidGlobalContext();
587
EVENT("glCreateProgramPipelines",
588
"context = %d, GLsizei n = %d, GLuint *pipelines = 0x%016" PRIxPTR "", CID(context), n,
589
(uintptr_t)pipelines);
593
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
595
(context->skipValidation() || ValidateCreateProgramPipelines(context, n, pipelines));
598
context->createProgramPipelines(n, pipelines);
600
ANGLE_CAPTURE(CreateProgramPipelines, isCallValid, context, n, pipelines);
604
void GL_APIENTRY CreateQueries(GLenum target, GLsizei n, GLuint *ids)
606
Context *context = GetValidGlobalContext();
607
EVENT("glCreateQueries",
608
"context = %d, GLenum target = %s, GLsizei n = %d, GLuint *ids = 0x%016" PRIxPTR "",
609
CID(context), GLenumToString(GLenumGroup::QueryTarget, target), n, (uintptr_t)ids);
613
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
615
(context->skipValidation() || ValidateCreateQueries(context, target, n, ids));
618
context->createQueries(target, n, ids);
620
ANGLE_CAPTURE(CreateQueries, isCallValid, context, target, n, ids);
624
void GL_APIENTRY CreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
626
Context *context = GetValidGlobalContext();
627
EVENT("glCreateRenderbuffers",
628
"context = %d, GLsizei n = %d, GLuint *renderbuffers = 0x%016" PRIxPTR "", CID(context),
629
n, (uintptr_t)renderbuffers);
633
RenderbufferID *renderbuffersPacked = FromGL<RenderbufferID *>(renderbuffers);
634
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
635
bool isCallValid = (context->skipValidation() ||
636
ValidateCreateRenderbuffers(context, n, renderbuffersPacked));
639
context->createRenderbuffers(n, renderbuffersPacked);
641
ANGLE_CAPTURE(CreateRenderbuffers, isCallValid, context, n, renderbuffersPacked);
645
void GL_APIENTRY CreateSamplers(GLsizei n, GLuint *samplers)
647
Context *context = GetValidGlobalContext();
648
EVENT("glCreateSamplers", "context = %d, GLsizei n = %d, GLuint *samplers = 0x%016" PRIxPTR "",
649
CID(context), n, (uintptr_t)samplers);
653
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
655
(context->skipValidation() || ValidateCreateSamplers(context, n, samplers));
658
context->createSamplers(n, samplers);
660
ANGLE_CAPTURE(CreateSamplers, isCallValid, context, n, samplers);
664
void GL_APIENTRY CreateTextures(GLenum target, GLsizei n, GLuint *textures)
666
Context *context = GetValidGlobalContext();
667
EVENT("glCreateTextures",
668
"context = %d, GLenum target = %s, GLsizei n = %d, GLuint *textures = 0x%016" PRIxPTR "",
669
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), n, (uintptr_t)textures);
673
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
675
(context->skipValidation() || ValidateCreateTextures(context, target, n, textures));
678
context->createTextures(target, n, textures);
680
ANGLE_CAPTURE(CreateTextures, isCallValid, context, target, n, textures);
684
void GL_APIENTRY CreateTransformFeedbacks(GLsizei n, GLuint *ids)
686
Context *context = GetValidGlobalContext();
687
EVENT("glCreateTransformFeedbacks",
688
"context = %d, GLsizei n = %d, GLuint *ids = 0x%016" PRIxPTR "", CID(context), n,
693
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
695
(context->skipValidation() || ValidateCreateTransformFeedbacks(context, n, ids));
698
context->createTransformFeedbacks(n, ids);
700
ANGLE_CAPTURE(CreateTransformFeedbacks, isCallValid, context, n, ids);
704
void GL_APIENTRY CreateVertexArrays(GLsizei n, GLuint *arrays)
706
Context *context = GetValidGlobalContext();
707
EVENT("glCreateVertexArrays",
708
"context = %d, GLsizei n = %d, GLuint *arrays = 0x%016" PRIxPTR "", CID(context), n,
713
VertexArrayID *arraysPacked = FromGL<VertexArrayID *>(arrays);
714
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
716
(context->skipValidation() || ValidateCreateVertexArrays(context, n, arraysPacked));
719
context->createVertexArrays(n, arraysPacked);
721
ANGLE_CAPTURE(CreateVertexArrays, isCallValid, context, n, arraysPacked);
725
void GL_APIENTRY DisableVertexArrayAttrib(GLuint vaobj, GLuint index)
727
Context *context = GetValidGlobalContext();
728
EVENT("glDisableVertexArrayAttrib", "context = %d, GLuint vaobj = %u, GLuint index = %u",
729
CID(context), vaobj, index);
733
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
734
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
735
bool isCallValid = (context->skipValidation() ||
736
ValidateDisableVertexArrayAttrib(context, vaobjPacked, index));
739
context->disableVertexArrayAttrib(vaobjPacked, index);
741
ANGLE_CAPTURE(DisableVertexArrayAttrib, isCallValid, context, vaobjPacked, index);
745
void GL_APIENTRY EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
747
Context *context = GetValidGlobalContext();
748
EVENT("glEnableVertexArrayAttrib", "context = %d, GLuint vaobj = %u, GLuint index = %u",
749
CID(context), vaobj, index);
753
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
754
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
755
bool isCallValid = (context->skipValidation() ||
756
ValidateEnableVertexArrayAttrib(context, vaobjPacked, index));
759
context->enableVertexArrayAttrib(vaobjPacked, index);
761
ANGLE_CAPTURE(EnableVertexArrayAttrib, isCallValid, context, vaobjPacked, index);
765
void GL_APIENTRY FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length)
767
Context *context = GetValidGlobalContext();
768
EVENT("glFlushMappedNamedBufferRange",
769
"context = %d, GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu",
770
CID(context), buffer, static_cast<unsigned long long>(offset),
771
static_cast<unsigned long long>(length));
775
BufferID bufferPacked = FromGL<BufferID>(buffer);
776
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
778
(context->skipValidation() ||
779
ValidateFlushMappedNamedBufferRange(context, bufferPacked, offset, length));
782
context->flushMappedNamedBufferRange(bufferPacked, offset, length);
784
ANGLE_CAPTURE(FlushMappedNamedBufferRange, isCallValid, context, bufferPacked, offset,
789
void GL_APIENTRY GenerateTextureMipmap(GLuint texture)
791
Context *context = GetValidGlobalContext();
792
EVENT("glGenerateTextureMipmap", "context = %d, GLuint texture = %u", CID(context), texture);
796
TextureID texturePacked = FromGL<TextureID>(texture);
797
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
799
(context->skipValidation() || ValidateGenerateTextureMipmap(context, texturePacked));
802
context->generateTextureMipmap(texturePacked);
804
ANGLE_CAPTURE(GenerateTextureMipmap, isCallValid, context, texturePacked);
808
void GL_APIENTRY GetCompressedTextureImage(GLuint texture,
813
Context *context = GetValidGlobalContext();
814
EVENT("glGetCompressedTextureImage",
815
"context = %d, GLuint texture = %u, GLint level = %d, GLsizei bufSize = %d, void *pixels "
816
"= 0x%016" PRIxPTR "",
817
CID(context), texture, level, bufSize, (uintptr_t)pixels);
821
TextureID texturePacked = FromGL<TextureID>(texture);
822
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
824
(context->skipValidation() ||
825
ValidateGetCompressedTextureImage(context, texturePacked, level, bufSize, pixels));
828
context->getCompressedTextureImage(texturePacked, level, bufSize, pixels);
830
ANGLE_CAPTURE(GetCompressedTextureImage, isCallValid, context, texturePacked, level,
835
void GL_APIENTRY GetCompressedTextureSubImage(GLuint texture,
846
Context *context = GetValidGlobalContext();
847
EVENT("glGetCompressedTextureSubImage",
848
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
849
"= %d, GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
850
"GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR "",
851
CID(context), texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize,
856
TextureID texturePacked = FromGL<TextureID>(texture);
857
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
859
(context->skipValidation() ||
860
ValidateGetCompressedTextureSubImage(context, texturePacked, level, xoffset, yoffset,
861
zoffset, width, height, depth, bufSize, pixels));
864
context->getCompressedTextureSubImage(texturePacked, level, xoffset, yoffset, zoffset,
865
width, height, depth, bufSize, pixels);
867
ANGLE_CAPTURE(GetCompressedTextureSubImage, isCallValid, context, texturePacked, level,
868
xoffset, yoffset, zoffset, width, height, depth, bufSize, pixels);
872
GLenum GL_APIENTRY GetGraphicsResetStatus()
874
Context *context = GetGlobalContext();
875
EVENT("glGetGraphicsResetStatus", "context = %d", CID(context));
880
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
881
bool isCallValid = (context->skipValidation() || ValidateGetGraphicsResetStatus(context));
884
returnValue = context->getGraphicsResetStatus();
888
returnValue = GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatus, GLenum>();
890
ANGLE_CAPTURE(GetGraphicsResetStatus, isCallValid, context, returnValue);
894
returnValue = GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatus, GLenum>();
899
void GL_APIENTRY GetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params)
901
Context *context = GetValidGlobalContext();
902
EVENT("glGetNamedBufferParameteri64v",
903
"context = %d, GLuint buffer = %u, GLenum pname = %s, GLint64 *params = 0x%016" PRIxPTR
905
CID(context), buffer, GLenumToString(GLenumGroup::VertexBufferObjectParameter, pname),
910
BufferID bufferPacked = FromGL<BufferID>(buffer);
911
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
912
bool isCallValid = (context->skipValidation() || ValidateGetNamedBufferParameteri64v(
913
context, bufferPacked, pname, params));
916
context->getNamedBufferParameteri64v(bufferPacked, pname, params);
918
ANGLE_CAPTURE(GetNamedBufferParameteri64v, isCallValid, context, bufferPacked, pname,
923
void GL_APIENTRY GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
925
Context *context = GetValidGlobalContext();
926
EVENT("glGetNamedBufferParameteriv",
927
"context = %d, GLuint buffer = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR "",
928
CID(context), buffer, GLenumToString(GLenumGroup::VertexBufferObjectParameter, pname),
933
BufferID bufferPacked = FromGL<BufferID>(buffer);
934
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
935
bool isCallValid = (context->skipValidation() || ValidateGetNamedBufferParameteriv(
936
context, bufferPacked, pname, params));
939
context->getNamedBufferParameteriv(bufferPacked, pname, params);
941
ANGLE_CAPTURE(GetNamedBufferParameteriv, isCallValid, context, bufferPacked, pname, params);
945
void GL_APIENTRY GetNamedBufferPointerv(GLuint buffer, GLenum pname, void **params)
947
Context *context = GetValidGlobalContext();
948
EVENT("glGetNamedBufferPointerv",
949
"context = %d, GLuint buffer = %u, GLenum pname = %s, void **params = 0x%016" PRIxPTR "",
950
CID(context), buffer, GLenumToString(GLenumGroup::VertexBufferObjectParameter, pname),
955
BufferID bufferPacked = FromGL<BufferID>(buffer);
956
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
957
bool isCallValid = (context->skipValidation() ||
958
ValidateGetNamedBufferPointerv(context, bufferPacked, pname, params));
961
context->getNamedBufferPointerv(bufferPacked, pname, params);
963
ANGLE_CAPTURE(GetNamedBufferPointerv, isCallValid, context, bufferPacked, pname, params);
967
void GL_APIENTRY GetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, void *data)
969
Context *context = GetValidGlobalContext();
970
EVENT("glGetNamedBufferSubData",
971
"context = %d, GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr size = %llu, void "
972
"*data = 0x%016" PRIxPTR "",
973
CID(context), buffer, static_cast<unsigned long long>(offset),
974
static_cast<unsigned long long>(size), (uintptr_t)data);
978
BufferID bufferPacked = FromGL<BufferID>(buffer);
979
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
981
(context->skipValidation() ||
982
ValidateGetNamedBufferSubData(context, bufferPacked, offset, size, data));
985
context->getNamedBufferSubData(bufferPacked, offset, size, data);
987
ANGLE_CAPTURE(GetNamedBufferSubData, isCallValid, context, bufferPacked, offset, size,
992
void GL_APIENTRY GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
997
Context *context = GetValidGlobalContext();
998
EVENT("glGetNamedFramebufferAttachmentParameteriv",
999
"context = %d, GLuint framebuffer = %u, GLenum attachment = %s, GLenum pname = %s, GLint "
1000
"*params = 0x%016" PRIxPTR "",
1001
CID(context), framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment),
1002
GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname),
1007
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
1008
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1009
bool isCallValid = (context->skipValidation() ||
1010
ValidateGetNamedFramebufferAttachmentParameteriv(
1011
context, framebufferPacked, attachment, pname, params));
1014
context->getNamedFramebufferAttachmentParameteriv(framebufferPacked, attachment, pname,
1017
ANGLE_CAPTURE(GetNamedFramebufferAttachmentParameteriv, isCallValid, context,
1018
framebufferPacked, attachment, pname, params);
1022
void GL_APIENTRY GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param)
1024
Context *context = GetValidGlobalContext();
1025
EVENT("glGetNamedFramebufferParameteriv",
1026
"context = %d, GLuint framebuffer = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR
1028
CID(context), framebuffer, GLenumToString(GLenumGroup::GetFramebufferParameter, pname),
1033
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
1034
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1036
(context->skipValidation() ||
1037
ValidateGetNamedFramebufferParameteriv(context, framebufferPacked, pname, param));
1040
context->getNamedFramebufferParameteriv(framebufferPacked, pname, param);
1042
ANGLE_CAPTURE(GetNamedFramebufferParameteriv, isCallValid, context, framebufferPacked,
1047
void GL_APIENTRY GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params)
1049
Context *context = GetValidGlobalContext();
1051
"glGetNamedRenderbufferParameteriv",
1052
"context = %d, GLuint renderbuffer = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR
1054
CID(context), renderbuffer, GLenumToString(GLenumGroup::RenderbufferParameterName, pname),
1059
RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
1060
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1062
(context->skipValidation() ||
1063
ValidateGetNamedRenderbufferParameteriv(context, renderbufferPacked, pname, params));
1066
context->getNamedRenderbufferParameteriv(renderbufferPacked, pname, params);
1068
ANGLE_CAPTURE(GetNamedRenderbufferParameteriv, isCallValid, context, renderbufferPacked,
1073
void GL_APIENTRY GetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1075
Context *context = GetValidGlobalContext();
1076
EVENT("glGetQueryBufferObjecti64v",
1077
"context = %d, GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = "
1079
CID(context), id, buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1080
static_cast<unsigned long long>(offset));
1084
BufferID bufferPacked = FromGL<BufferID>(buffer);
1085
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1087
(context->skipValidation() ||
1088
ValidateGetQueryBufferObjecti64v(context, id, bufferPacked, pname, offset));
1091
context->getQueryBufferObjecti64v(id, bufferPacked, pname, offset);
1093
ANGLE_CAPTURE(GetQueryBufferObjecti64v, isCallValid, context, id, bufferPacked, pname,
1098
void GL_APIENTRY GetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1100
Context *context = GetValidGlobalContext();
1101
EVENT("glGetQueryBufferObjectiv",
1102
"context = %d, GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = "
1104
CID(context), id, buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1105
static_cast<unsigned long long>(offset));
1109
BufferID bufferPacked = FromGL<BufferID>(buffer);
1110
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1112
(context->skipValidation() ||
1113
ValidateGetQueryBufferObjectiv(context, id, bufferPacked, pname, offset));
1116
context->getQueryBufferObjectiv(id, bufferPacked, pname, offset);
1118
ANGLE_CAPTURE(GetQueryBufferObjectiv, isCallValid, context, id, bufferPacked, pname,
1123
void GL_APIENTRY GetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1125
Context *context = GetValidGlobalContext();
1126
EVENT("glGetQueryBufferObjectui64v",
1127
"context = %d, GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = "
1129
CID(context), id, buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1130
static_cast<unsigned long long>(offset));
1134
BufferID bufferPacked = FromGL<BufferID>(buffer);
1135
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1137
(context->skipValidation() ||
1138
ValidateGetQueryBufferObjectui64v(context, id, bufferPacked, pname, offset));
1141
context->getQueryBufferObjectui64v(id, bufferPacked, pname, offset);
1143
ANGLE_CAPTURE(GetQueryBufferObjectui64v, isCallValid, context, id, bufferPacked, pname,
1148
void GL_APIENTRY GetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
1150
Context *context = GetValidGlobalContext();
1151
EVENT("glGetQueryBufferObjectuiv",
1152
"context = %d, GLuint id = %u, GLuint buffer = %u, GLenum pname = %s, GLintptr offset = "
1154
CID(context), id, buffer, GLenumToString(GLenumGroup::QueryObjectParameterName, pname),
1155
static_cast<unsigned long long>(offset));
1159
BufferID bufferPacked = FromGL<BufferID>(buffer);
1160
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1162
(context->skipValidation() ||
1163
ValidateGetQueryBufferObjectuiv(context, id, bufferPacked, pname, offset));
1166
context->getQueryBufferObjectuiv(id, bufferPacked, pname, offset);
1168
ANGLE_CAPTURE(GetQueryBufferObjectuiv, isCallValid, context, id, bufferPacked, pname,
1173
void GL_APIENTRY GetTextureImage(GLuint texture,
1180
Context *context = GetValidGlobalContext();
1181
EVENT("glGetTextureImage",
1182
"context = %d, GLuint texture = %u, GLint level = %d, GLenum format = %s, GLenum type = "
1183
"%s, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR "",
1184
CID(context), texture, level, GLenumToString(GLenumGroup::PixelFormat, format),
1185
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)pixels);
1189
TextureID texturePacked = FromGL<TextureID>(texture);
1190
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1192
(context->skipValidation() ||
1193
ValidateGetTextureImage(context, texturePacked, level, format, type, bufSize, pixels));
1196
context->getTextureImage(texturePacked, level, format, type, bufSize, pixels);
1198
ANGLE_CAPTURE(GetTextureImage, isCallValid, context, texturePacked, level, format, type,
1203
void GL_APIENTRY GetTextureLevelParameterfv(GLuint texture,
1208
Context *context = GetValidGlobalContext();
1209
EVENT("glGetTextureLevelParameterfv",
1210
"context = %d, GLuint texture = %u, GLint level = %d, GLenum pname = %s, GLfloat *params "
1211
"= 0x%016" PRIxPTR "",
1212
CID(context), texture, level, GLenumToString(GLenumGroup::GetTextureParameter, pname),
1217
TextureID texturePacked = FromGL<TextureID>(texture);
1218
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1220
(context->skipValidation() ||
1221
ValidateGetTextureLevelParameterfv(context, texturePacked, level, pname, params));
1224
context->getTextureLevelParameterfv(texturePacked, level, pname, params);
1226
ANGLE_CAPTURE(GetTextureLevelParameterfv, isCallValid, context, texturePacked, level, pname,
1231
void GL_APIENTRY GetTextureLevelParameteriv(GLuint texture,
1236
Context *context = GetValidGlobalContext();
1237
EVENT("glGetTextureLevelParameteriv",
1238
"context = %d, GLuint texture = %u, GLint level = %d, GLenum pname = %s, GLint *params = "
1239
"0x%016" PRIxPTR "",
1240
CID(context), texture, level, GLenumToString(GLenumGroup::GetTextureParameter, pname),
1245
TextureID texturePacked = FromGL<TextureID>(texture);
1246
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1248
(context->skipValidation() ||
1249
ValidateGetTextureLevelParameteriv(context, texturePacked, level, pname, params));
1252
context->getTextureLevelParameteriv(texturePacked, level, pname, params);
1254
ANGLE_CAPTURE(GetTextureLevelParameteriv, isCallValid, context, texturePacked, level, pname,
1259
void GL_APIENTRY GetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
1261
Context *context = GetValidGlobalContext();
1262
EVENT("glGetTextureParameterIiv",
1263
"context = %d, GLuint texture = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR "",
1264
CID(context), texture, GLenumToString(GLenumGroup::GetTextureParameter, pname),
1269
TextureID texturePacked = FromGL<TextureID>(texture);
1270
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1271
bool isCallValid = (context->skipValidation() ||
1272
ValidateGetTextureParameterIiv(context, texturePacked, pname, params));
1275
context->getTextureParameterIiv(texturePacked, pname, params);
1277
ANGLE_CAPTURE(GetTextureParameterIiv, isCallValid, context, texturePacked, pname, params);
1281
void GL_APIENTRY GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
1283
Context *context = GetValidGlobalContext();
1284
EVENT("glGetTextureParameterIuiv",
1285
"context = %d, GLuint texture = %u, GLenum pname = %s, GLuint *params = 0x%016" PRIxPTR
1287
CID(context), texture, GLenumToString(GLenumGroup::GetTextureParameter, pname),
1292
TextureID texturePacked = FromGL<TextureID>(texture);
1293
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1294
bool isCallValid = (context->skipValidation() ||
1295
ValidateGetTextureParameterIuiv(context, texturePacked, pname, params));
1298
context->getTextureParameterIuiv(texturePacked, pname, params);
1300
ANGLE_CAPTURE(GetTextureParameterIuiv, isCallValid, context, texturePacked, pname, params);
1304
void GL_APIENTRY GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
1306
Context *context = GetValidGlobalContext();
1307
EVENT("glGetTextureParameterfv",
1308
"context = %d, GLuint texture = %u, GLenum pname = %s, GLfloat *params = 0x%016" PRIxPTR
1310
CID(context), texture, GLenumToString(GLenumGroup::GetTextureParameter, pname),
1315
TextureID texturePacked = FromGL<TextureID>(texture);
1316
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1317
bool isCallValid = (context->skipValidation() ||
1318
ValidateGetTextureParameterfv(context, texturePacked, pname, params));
1321
context->getTextureParameterfv(texturePacked, pname, params);
1323
ANGLE_CAPTURE(GetTextureParameterfv, isCallValid, context, texturePacked, pname, params);
1327
void GL_APIENTRY GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
1329
Context *context = GetValidGlobalContext();
1330
EVENT("glGetTextureParameteriv",
1331
"context = %d, GLuint texture = %u, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR "",
1332
CID(context), texture, GLenumToString(GLenumGroup::GetTextureParameter, pname),
1337
TextureID texturePacked = FromGL<TextureID>(texture);
1338
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1339
bool isCallValid = (context->skipValidation() ||
1340
ValidateGetTextureParameteriv(context, texturePacked, pname, params));
1343
context->getTextureParameteriv(texturePacked, pname, params);
1345
ANGLE_CAPTURE(GetTextureParameteriv, isCallValid, context, texturePacked, pname, params);
1349
void GL_APIENTRY GetTextureSubImage(GLuint texture,
1362
Context *context = GetValidGlobalContext();
1364
"glGetTextureSubImage",
1365
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = "
1366
"%d, GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
1367
"GLenum format = %s, GLenum type = %s, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR
1369
CID(context), texture, level, xoffset, yoffset, zoffset, width, height, depth,
1370
GLenumToString(GLenumGroup::PixelFormat, format),
1371
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)pixels);
1375
TextureID texturePacked = FromGL<TextureID>(texture);
1376
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1378
(context->skipValidation() ||
1379
ValidateGetTextureSubImage(context, texturePacked, level, xoffset, yoffset, zoffset,
1380
width, height, depth, format, type, bufSize, pixels));
1383
context->getTextureSubImage(texturePacked, level, xoffset, yoffset, zoffset, width,
1384
height, depth, format, type, bufSize, pixels);
1386
ANGLE_CAPTURE(GetTextureSubImage, isCallValid, context, texturePacked, level, xoffset,
1387
yoffset, zoffset, width, height, depth, format, type, bufSize, pixels);
1391
void GL_APIENTRY GetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)
1393
Context *context = GetValidGlobalContext();
1394
EVENT("glGetTransformFeedbacki64_v",
1395
"context = %d, GLuint xfb = %u, GLenum pname = %s, GLuint index = %u, GLint64 *param = "
1396
"0x%016" PRIxPTR "",
1397
CID(context), xfb, GLenumToString(GLenumGroup::TransformFeedbackPName, pname), index,
1402
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1403
bool isCallValid = (context->skipValidation() ||
1404
ValidateGetTransformFeedbacki64_v(context, xfb, pname, index, param));
1407
context->getTransformFeedbacki64_v(xfb, pname, index, param);
1409
ANGLE_CAPTURE(GetTransformFeedbacki64_v, isCallValid, context, xfb, pname, index, param);
1413
void GL_APIENTRY GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param)
1415
Context *context = GetValidGlobalContext();
1416
EVENT("glGetTransformFeedbacki_v",
1417
"context = %d, GLuint xfb = %u, GLenum pname = %s, GLuint index = %u, GLint *param = "
1418
"0x%016" PRIxPTR "",
1419
CID(context), xfb, GLenumToString(GLenumGroup::TransformFeedbackPName, pname), index,
1424
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1425
bool isCallValid = (context->skipValidation() ||
1426
ValidateGetTransformFeedbacki_v(context, xfb, pname, index, param));
1429
context->getTransformFeedbacki_v(xfb, pname, index, param);
1431
ANGLE_CAPTURE(GetTransformFeedbacki_v, isCallValid, context, xfb, pname, index, param);
1435
void GL_APIENTRY GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
1437
Context *context = GetValidGlobalContext();
1438
EVENT("glGetTransformFeedbackiv",
1439
"context = %d, GLuint xfb = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR "",
1440
CID(context), xfb, GLenumToString(GLenumGroup::TransformFeedbackPName, pname),
1445
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1446
bool isCallValid = (context->skipValidation() ||
1447
ValidateGetTransformFeedbackiv(context, xfb, pname, param));
1450
context->getTransformFeedbackiv(xfb, pname, param);
1452
ANGLE_CAPTURE(GetTransformFeedbackiv, isCallValid, context, xfb, pname, param);
1456
void GL_APIENTRY GetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)
1458
Context *context = GetValidGlobalContext();
1459
EVENT("glGetVertexArrayIndexed64iv",
1460
"context = %d, GLuint vaobj = %u, GLuint index = %u, GLenum pname = %s, GLint64 *param = "
1461
"0x%016" PRIxPTR "",
1462
CID(context), vaobj, index, GLenumToString(GLenumGroup::VertexArrayPName, pname),
1467
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
1468
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1470
(context->skipValidation() ||
1471
ValidateGetVertexArrayIndexed64iv(context, vaobjPacked, index, pname, param));
1474
context->getVertexArrayIndexed64iv(vaobjPacked, index, pname, param);
1476
ANGLE_CAPTURE(GetVertexArrayIndexed64iv, isCallValid, context, vaobjPacked, index, pname,
1481
void GL_APIENTRY GetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param)
1483
Context *context = GetValidGlobalContext();
1484
EVENT("glGetVertexArrayIndexediv",
1485
"context = %d, GLuint vaobj = %u, GLuint index = %u, GLenum pname = %s, GLint *param = "
1486
"0x%016" PRIxPTR "",
1487
CID(context), vaobj, index, GLenumToString(GLenumGroup::VertexArrayPName, pname),
1492
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
1493
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1495
(context->skipValidation() ||
1496
ValidateGetVertexArrayIndexediv(context, vaobjPacked, index, pname, param));
1499
context->getVertexArrayIndexediv(vaobjPacked, index, pname, param);
1501
ANGLE_CAPTURE(GetVertexArrayIndexediv, isCallValid, context, vaobjPacked, index, pname,
1506
void GL_APIENTRY GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
1508
Context *context = GetValidGlobalContext();
1509
EVENT("glGetVertexArrayiv",
1510
"context = %d, GLuint vaobj = %u, GLenum pname = %s, GLint *param = 0x%016" PRIxPTR "",
1511
CID(context), vaobj, GLenumToString(GLenumGroup::VertexArrayPName, pname),
1516
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
1517
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1518
bool isCallValid = (context->skipValidation() ||
1519
ValidateGetVertexArrayiv(context, vaobjPacked, pname, param));
1522
context->getVertexArrayiv(vaobjPacked, pname, param);
1524
ANGLE_CAPTURE(GetVertexArrayiv, isCallValid, context, vaobjPacked, pname, param);
1529
GetnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table)
1531
Context *context = GetValidGlobalContext();
1532
EVENT("glGetnColorTable",
1533
"context = %d, GLenum target = %s, GLenum format = %s, GLenum type = %s, GLsizei bufSize "
1534
"= %d, void *table = 0x%016" PRIxPTR "",
1535
CID(context), GLenumToString(GLenumGroup::ColorTableTarget, target),
1536
GLenumToString(GLenumGroup::PixelFormat, format),
1537
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)table);
1541
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1542
bool isCallValid = (context->skipValidation() ||
1543
ValidateGetnColorTable(context, target, format, type, bufSize, table));
1546
context->getnColorTable(target, format, type, bufSize, table);
1548
ANGLE_CAPTURE(GetnColorTable, isCallValid, context, target, format, type, bufSize, table);
1552
void GL_APIENTRY GetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels)
1554
Context *context = GetValidGlobalContext();
1555
EVENT("glGetnCompressedTexImage",
1556
"context = %d, GLenum target = %s, GLint lod = %d, GLsizei bufSize = %d, void *pixels = "
1557
"0x%016" PRIxPTR "",
1558
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), lod, bufSize,
1563
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1564
bool isCallValid = (context->skipValidation() ||
1565
ValidateGetnCompressedTexImage(context, target, lod, bufSize, pixels));
1568
context->getnCompressedTexImage(target, lod, bufSize, pixels);
1570
ANGLE_CAPTURE(GetnCompressedTexImage, isCallValid, context, target, lod, bufSize, pixels);
1575
GetnConvolutionFilter(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image)
1577
Context *context = GetValidGlobalContext();
1578
EVENT("glGetnConvolutionFilter",
1579
"context = %d, GLenum target = %s, GLenum format = %s, GLenum type = %s, GLsizei bufSize "
1580
"= %d, void *image = 0x%016" PRIxPTR "",
1581
CID(context), GLenumToString(GLenumGroup::ConvolutionTarget, target),
1582
GLenumToString(GLenumGroup::PixelFormat, format),
1583
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)image);
1587
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1589
(context->skipValidation() ||
1590
ValidateGetnConvolutionFilter(context, target, format, type, bufSize, image));
1593
context->getnConvolutionFilter(target, format, type, bufSize, image);
1595
ANGLE_CAPTURE(GetnConvolutionFilter, isCallValid, context, target, format, type, bufSize,
1600
void GL_APIENTRY GetnHistogram(GLenum target,
1607
Context *context = GetValidGlobalContext();
1608
EVENT("glGetnHistogram",
1609
"context = %d, GLenum target = %s, GLboolean reset = %s, GLenum format = %s, GLenum type "
1610
"= %s, GLsizei bufSize = %d, void *values = 0x%016" PRIxPTR "",
1611
CID(context), GLenumToString(GLenumGroup::HistogramTargetEXT, target),
1612
GLbooleanToString(reset), GLenumToString(GLenumGroup::PixelFormat, format),
1613
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)values);
1617
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1619
(context->skipValidation() ||
1620
ValidateGetnHistogram(context, target, reset, format, type, bufSize, values));
1623
context->getnHistogram(target, reset, format, type, bufSize, values);
1625
ANGLE_CAPTURE(GetnHistogram, isCallValid, context, target, reset, format, type, bufSize,
1630
void GL_APIENTRY GetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)
1632
Context *context = GetValidGlobalContext();
1633
EVENT("glGetnMapdv",
1634
"context = %d, GLenum target = %s, GLenum query = %s, GLsizei bufSize = %d, GLdouble *v "
1635
"= 0x%016" PRIxPTR "",
1636
CID(context), GLenumToString(GLenumGroup::MapTarget, target),
1637
GLenumToString(GLenumGroup::MapQuery, query), bufSize, (uintptr_t)v);
1641
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1643
(context->skipValidation() || ValidateGetnMapdv(context, target, query, bufSize, v));
1646
context->getnMapdv(target, query, bufSize, v);
1648
ANGLE_CAPTURE(GetnMapdv, isCallValid, context, target, query, bufSize, v);
1652
void GL_APIENTRY GetnMapfv(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)
1654
Context *context = GetValidGlobalContext();
1655
EVENT("glGetnMapfv",
1656
"context = %d, GLenum target = %s, GLenum query = %s, GLsizei bufSize = %d, GLfloat *v = "
1657
"0x%016" PRIxPTR "",
1658
CID(context), GLenumToString(GLenumGroup::MapTarget, target),
1659
GLenumToString(GLenumGroup::MapQuery, query), bufSize, (uintptr_t)v);
1663
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1665
(context->skipValidation() || ValidateGetnMapfv(context, target, query, bufSize, v));
1668
context->getnMapfv(target, query, bufSize, v);
1670
ANGLE_CAPTURE(GetnMapfv, isCallValid, context, target, query, bufSize, v);
1674
void GL_APIENTRY GetnMapiv(GLenum target, GLenum query, GLsizei bufSize, GLint *v)
1676
Context *context = GetValidGlobalContext();
1677
EVENT("glGetnMapiv",
1678
"context = %d, GLenum target = %s, GLenum query = %s, GLsizei bufSize = %d, GLint *v = "
1679
"0x%016" PRIxPTR "",
1680
CID(context), GLenumToString(GLenumGroup::MapTarget, target),
1681
GLenumToString(GLenumGroup::MapQuery, query), bufSize, (uintptr_t)v);
1685
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1687
(context->skipValidation() || ValidateGetnMapiv(context, target, query, bufSize, v));
1690
context->getnMapiv(target, query, bufSize, v);
1692
ANGLE_CAPTURE(GetnMapiv, isCallValid, context, target, query, bufSize, v);
1696
void GL_APIENTRY GetnMinmax(GLenum target,
1703
Context *context = GetValidGlobalContext();
1704
EVENT("glGetnMinmax",
1705
"context = %d, GLenum target = %s, GLboolean reset = %s, GLenum format = %s, GLenum type "
1706
"= %s, GLsizei bufSize = %d, void *values = 0x%016" PRIxPTR "",
1707
CID(context), GLenumToString(GLenumGroup::MinmaxTargetEXT, target),
1708
GLbooleanToString(reset), GLenumToString(GLenumGroup::PixelFormat, format),
1709
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)values);
1713
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1715
(context->skipValidation() ||
1716
ValidateGetnMinmax(context, target, reset, format, type, bufSize, values));
1719
context->getnMinmax(target, reset, format, type, bufSize, values);
1721
ANGLE_CAPTURE(GetnMinmax, isCallValid, context, target, reset, format, type, bufSize,
1726
void GL_APIENTRY GetnPixelMapfv(GLenum map, GLsizei bufSize, GLfloat *values)
1728
Context *context = GetValidGlobalContext();
1729
EVENT("glGetnPixelMapfv",
1730
"context = %d, GLenum map = %s, GLsizei bufSize = %d, GLfloat *values = 0x%016" PRIxPTR
1732
CID(context), GLenumToString(GLenumGroup::PixelMap, map), bufSize, (uintptr_t)values);
1736
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1738
(context->skipValidation() || ValidateGetnPixelMapfv(context, map, bufSize, values));
1741
context->getnPixelMapfv(map, bufSize, values);
1743
ANGLE_CAPTURE(GetnPixelMapfv, isCallValid, context, map, bufSize, values);
1747
void GL_APIENTRY GetnPixelMapuiv(GLenum map, GLsizei bufSize, GLuint *values)
1749
Context *context = GetValidGlobalContext();
1750
EVENT("glGetnPixelMapuiv",
1751
"context = %d, GLenum map = %s, GLsizei bufSize = %d, GLuint *values = 0x%016" PRIxPTR "",
1752
CID(context), GLenumToString(GLenumGroup::PixelMap, map), bufSize, (uintptr_t)values);
1756
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1758
(context->skipValidation() || ValidateGetnPixelMapuiv(context, map, bufSize, values));
1761
context->getnPixelMapuiv(map, bufSize, values);
1763
ANGLE_CAPTURE(GetnPixelMapuiv, isCallValid, context, map, bufSize, values);
1767
void GL_APIENTRY GetnPixelMapusv(GLenum map, GLsizei bufSize, GLushort *values)
1769
Context *context = GetValidGlobalContext();
1770
EVENT("glGetnPixelMapusv",
1771
"context = %d, GLenum map = %s, GLsizei bufSize = %d, GLushort *values = 0x%016" PRIxPTR
1773
CID(context), GLenumToString(GLenumGroup::PixelMap, map), bufSize, (uintptr_t)values);
1777
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1779
(context->skipValidation() || ValidateGetnPixelMapusv(context, map, bufSize, values));
1782
context->getnPixelMapusv(map, bufSize, values);
1784
ANGLE_CAPTURE(GetnPixelMapusv, isCallValid, context, map, bufSize, values);
1788
void GL_APIENTRY GetnPolygonStipple(GLsizei bufSize, GLubyte *pattern)
1790
Context *context = GetValidGlobalContext();
1791
EVENT("glGetnPolygonStipple",
1792
"context = %d, GLsizei bufSize = %d, GLubyte *pattern = 0x%016" PRIxPTR "", CID(context),
1793
bufSize, (uintptr_t)pattern);
1797
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1799
(context->skipValidation() || ValidateGetnPolygonStipple(context, bufSize, pattern));
1802
context->getnPolygonStipple(bufSize, pattern);
1804
ANGLE_CAPTURE(GetnPolygonStipple, isCallValid, context, bufSize, pattern);
1808
void GL_APIENTRY GetnSeparableFilter(GLenum target,
1813
GLsizei columnBufSize,
1817
Context *context = GetValidGlobalContext();
1818
EVENT("glGetnSeparableFilter",
1819
"context = %d, GLenum target = %s, GLenum format = %s, GLenum type = %s, GLsizei "
1820
"rowBufSize = %d, void *row = 0x%016" PRIxPTR
1821
", GLsizei columnBufSize = %d, void *column = 0x%016" PRIxPTR
1822
", void *span = 0x%016" PRIxPTR "",
1823
CID(context), GLenumToString(GLenumGroup::SeparableTargetEXT, target),
1824
GLenumToString(GLenumGroup::PixelFormat, format),
1825
GLenumToString(GLenumGroup::PixelType, type), rowBufSize, (uintptr_t)row, columnBufSize,
1826
(uintptr_t)column, (uintptr_t)span);
1830
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1831
bool isCallValid = (context->skipValidation() ||
1832
ValidateGetnSeparableFilter(context, target, format, type, rowBufSize,
1833
row, columnBufSize, column, span));
1836
context->getnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize,
1839
ANGLE_CAPTURE(GetnSeparableFilter, isCallValid, context, target, format, type, rowBufSize,
1840
row, columnBufSize, column, span);
1845
GetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
1847
Context *context = GetValidGlobalContext();
1848
EVENT("glGetnTexImage",
1849
"context = %d, GLenum target = %s, GLint level = %d, GLenum format = %s, GLenum type = "
1850
"%s, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR "",
1851
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), level,
1852
GLenumToString(GLenumGroup::PixelFormat, format),
1853
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)pixels);
1857
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1859
(context->skipValidation() ||
1860
ValidateGetnTexImage(context, target, level, format, type, bufSize, pixels));
1863
context->getnTexImage(target, level, format, type, bufSize, pixels);
1865
ANGLE_CAPTURE(GetnTexImage, isCallValid, context, target, level, format, type, bufSize,
1870
void GL_APIENTRY GetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params)
1872
Context *context = GetValidGlobalContext();
1873
EVENT("glGetnUniformdv",
1874
"context = %d, GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLdouble "
1875
"*params = 0x%016" PRIxPTR "",
1876
CID(context), program, location, bufSize, (uintptr_t)params);
1880
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
1881
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1883
(context->skipValidation() ||
1884
ValidateGetnUniformdv(context, programPacked, location, bufSize, params));
1887
context->getnUniformdv(programPacked, location, bufSize, params);
1889
ANGLE_CAPTURE(GetnUniformdv, isCallValid, context, programPacked, location, bufSize,
1894
void GL_APIENTRY GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
1896
Context *context = GetValidGlobalContext();
1897
EVENT("glGetnUniformfv",
1898
"context = %d, GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLfloat "
1899
"*params = 0x%016" PRIxPTR "",
1900
CID(context), program, location, bufSize, (uintptr_t)params);
1904
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
1905
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1907
(context->skipValidation() ||
1908
ValidateGetnUniformfv(context, programPacked, location, bufSize, params));
1911
context->getnUniformfv(programPacked, location, bufSize, params);
1913
ANGLE_CAPTURE(GetnUniformfv, isCallValid, context, programPacked, location, bufSize,
1918
void GL_APIENTRY GetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params)
1920
Context *context = GetValidGlobalContext();
1921
EVENT("glGetnUniformiv",
1922
"context = %d, GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLint "
1923
"*params = 0x%016" PRIxPTR "",
1924
CID(context), program, location, bufSize, (uintptr_t)params);
1928
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
1929
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1931
(context->skipValidation() ||
1932
ValidateGetnUniformiv(context, programPacked, location, bufSize, params));
1935
context->getnUniformiv(programPacked, location, bufSize, params);
1937
ANGLE_CAPTURE(GetnUniformiv, isCallValid, context, programPacked, location, bufSize,
1942
void GL_APIENTRY GetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params)
1944
Context *context = GetValidGlobalContext();
1945
EVENT("glGetnUniformuiv",
1946
"context = %d, GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLuint "
1947
"*params = 0x%016" PRIxPTR "",
1948
CID(context), program, location, bufSize, (uintptr_t)params);
1952
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
1953
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1955
(context->skipValidation() ||
1956
ValidateGetnUniformuiv(context, programPacked, location, bufSize, params));
1959
context->getnUniformuiv(programPacked, location, bufSize, params);
1961
ANGLE_CAPTURE(GetnUniformuiv, isCallValid, context, programPacked, location, bufSize,
1966
void GL_APIENTRY InvalidateNamedFramebufferData(GLuint framebuffer,
1967
GLsizei numAttachments,
1968
const GLenum *attachments)
1970
Context *context = GetValidGlobalContext();
1971
EVENT("glInvalidateNamedFramebufferData",
1972
"context = %d, GLuint framebuffer = %u, GLsizei numAttachments = %d, const GLenum "
1973
"*attachments = 0x%016" PRIxPTR "",
1974
CID(context), framebuffer, numAttachments, (uintptr_t)attachments);
1978
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
1979
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1980
bool isCallValid = (context->skipValidation() ||
1981
ValidateInvalidateNamedFramebufferData(context, framebufferPacked,
1982
numAttachments, attachments));
1985
context->invalidateNamedFramebufferData(framebufferPacked, numAttachments, attachments);
1987
ANGLE_CAPTURE(InvalidateNamedFramebufferData, isCallValid, context, framebufferPacked,
1988
numAttachments, attachments);
1992
void GL_APIENTRY InvalidateNamedFramebufferSubData(GLuint framebuffer,
1993
GLsizei numAttachments,
1994
const GLenum *attachments,
2000
Context *context = GetValidGlobalContext();
2001
EVENT("glInvalidateNamedFramebufferSubData",
2002
"context = %d, GLuint framebuffer = %u, GLsizei numAttachments = %d, const GLenum "
2003
"*attachments = 0x%016" PRIxPTR
2004
", GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d",
2005
CID(context), framebuffer, numAttachments, (uintptr_t)attachments, x, y, width, height);
2009
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2010
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2012
(context->skipValidation() ||
2013
ValidateInvalidateNamedFramebufferSubData(context, framebufferPacked, numAttachments,
2014
attachments, x, y, width, height));
2017
context->invalidateNamedFramebufferSubData(framebufferPacked, numAttachments,
2018
attachments, x, y, width, height);
2020
ANGLE_CAPTURE(InvalidateNamedFramebufferSubData, isCallValid, context, framebufferPacked,
2021
numAttachments, attachments, x, y, width, height);
2025
void *GL_APIENTRY MapNamedBuffer(GLuint buffer, GLenum access)
2027
Context *context = GetValidGlobalContext();
2028
EVENT("glMapNamedBuffer", "context = %d, GLuint buffer = %u, GLenum access = %s", CID(context),
2029
buffer, GLenumToString(GLenumGroup::BufferAccessARB, access));
2034
BufferID bufferPacked = FromGL<BufferID>(buffer);
2035
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2037
(context->skipValidation() || ValidateMapNamedBuffer(context, bufferPacked, access));
2040
returnValue = context->mapNamedBuffer(bufferPacked, access);
2044
returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBuffer, void *>();
2046
ANGLE_CAPTURE(MapNamedBuffer, isCallValid, context, bufferPacked, access, returnValue);
2050
returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBuffer, void *>();
2055
void *GL_APIENTRY MapNamedBufferRange(GLuint buffer,
2060
Context *context = GetValidGlobalContext();
2061
EVENT("glMapNamedBufferRange",
2062
"context = %d, GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu, "
2063
"GLbitfield access = %s",
2064
CID(context), buffer, static_cast<unsigned long long>(offset),
2065
static_cast<unsigned long long>(length),
2066
GLbitfieldToString(GLenumGroup::BufferAccessMask, access).c_str());
2071
BufferID bufferPacked = FromGL<BufferID>(buffer);
2072
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2074
(context->skipValidation() ||
2075
ValidateMapNamedBufferRange(context, bufferPacked, offset, length, access));
2078
returnValue = context->mapNamedBufferRange(bufferPacked, offset, length, access);
2082
returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBufferRange, void *>();
2084
ANGLE_CAPTURE(MapNamedBufferRange, isCallValid, context, bufferPacked, offset, length,
2085
access, returnValue);
2089
returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBufferRange, void *>();
2094
void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers)
2096
Context *context = GetValidGlobalContext();
2097
EVENT("glMemoryBarrierByRegion", "context = %d, GLbitfield barriers = %s", CID(context),
2098
GLbitfieldToString(GLenumGroup::MemoryBarrierMask, barriers).c_str());
2102
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2104
(context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers));
2107
context->memoryBarrierByRegion(barriers);
2109
ANGLE_CAPTURE(MemoryBarrierByRegion, isCallValid, context, barriers);
2113
void GL_APIENTRY NamedBufferData(GLuint buffer, GLsizeiptr size, const void *data, GLenum usage)
2115
Context *context = GetValidGlobalContext();
2116
EVENT("glNamedBufferData",
2117
"context = %d, GLuint buffer = %u, GLsizeiptr size = %llu, const void *data = "
2118
"0x%016" PRIxPTR ", GLenum usage = %s",
2119
CID(context), buffer, static_cast<unsigned long long>(size), (uintptr_t)data,
2120
GLenumToString(GLenumGroup::VertexBufferObjectUsage, usage));
2124
BufferID bufferPacked = FromGL<BufferID>(buffer);
2125
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2126
bool isCallValid = (context->skipValidation() ||
2127
ValidateNamedBufferData(context, bufferPacked, size, data, usage));
2130
context->namedBufferData(bufferPacked, size, data, usage);
2132
ANGLE_CAPTURE(NamedBufferData, isCallValid, context, bufferPacked, size, data, usage);
2136
void GL_APIENTRY NamedBufferStorage(GLuint buffer,
2141
Context *context = GetValidGlobalContext();
2142
EVENT("glNamedBufferStorage",
2143
"context = %d, GLuint buffer = %u, GLsizeiptr size = %llu, const void *data = "
2144
"0x%016" PRIxPTR ", GLbitfield flags = %s",
2145
CID(context), buffer, static_cast<unsigned long long>(size), (uintptr_t)data,
2146
GLbitfieldToString(GLenumGroup::MapBufferUsageMask, flags).c_str());
2150
BufferID bufferPacked = FromGL<BufferID>(buffer);
2151
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2152
bool isCallValid = (context->skipValidation() ||
2153
ValidateNamedBufferStorage(context, bufferPacked, size, data, flags));
2156
context->namedBufferStorage(bufferPacked, size, data, flags);
2158
ANGLE_CAPTURE(NamedBufferStorage, isCallValid, context, bufferPacked, size, data, flags);
2162
void GL_APIENTRY NamedBufferSubData(GLuint buffer,
2167
Context *context = GetValidGlobalContext();
2168
EVENT("glNamedBufferSubData",
2169
"context = %d, GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr size = %llu, const "
2170
"void *data = 0x%016" PRIxPTR "",
2171
CID(context), buffer, static_cast<unsigned long long>(offset),
2172
static_cast<unsigned long long>(size), (uintptr_t)data);
2176
BufferID bufferPacked = FromGL<BufferID>(buffer);
2177
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2178
bool isCallValid = (context->skipValidation() ||
2179
ValidateNamedBufferSubData(context, bufferPacked, offset, size, data));
2182
context->namedBufferSubData(bufferPacked, offset, size, data);
2184
ANGLE_CAPTURE(NamedBufferSubData, isCallValid, context, bufferPacked, offset, size, data);
2188
void GL_APIENTRY NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
2190
Context *context = GetValidGlobalContext();
2191
EVENT("glNamedFramebufferDrawBuffer", "context = %d, GLuint framebuffer = %u, GLenum buf = %s",
2192
CID(context), framebuffer, GLenumToString(GLenumGroup::ColorBuffer, buf));
2196
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2197
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2198
bool isCallValid = (context->skipValidation() ||
2199
ValidateNamedFramebufferDrawBuffer(context, framebufferPacked, buf));
2202
context->namedFramebufferDrawBuffer(framebufferPacked, buf);
2204
ANGLE_CAPTURE(NamedFramebufferDrawBuffer, isCallValid, context, framebufferPacked, buf);
2208
void GL_APIENTRY NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs)
2210
Context *context = GetValidGlobalContext();
2212
"glNamedFramebufferDrawBuffers",
2213
"context = %d, GLuint framebuffer = %u, GLsizei n = %d, const GLenum *bufs = 0x%016" PRIxPTR
2215
CID(context), framebuffer, n, (uintptr_t)bufs);
2219
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2220
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2221
bool isCallValid = (context->skipValidation() || ValidateNamedFramebufferDrawBuffers(
2222
context, framebufferPacked, n, bufs));
2225
context->namedFramebufferDrawBuffers(framebufferPacked, n, bufs);
2227
ANGLE_CAPTURE(NamedFramebufferDrawBuffers, isCallValid, context, framebufferPacked, n,
2232
void GL_APIENTRY NamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param)
2234
Context *context = GetValidGlobalContext();
2235
EVENT("glNamedFramebufferParameteri",
2236
"context = %d, GLuint framebuffer = %u, GLenum pname = %s, GLint param = %d",
2237
CID(context), framebuffer, GLenumToString(GLenumGroup::FramebufferParameterName, pname),
2242
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2243
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2245
(context->skipValidation() ||
2246
ValidateNamedFramebufferParameteri(context, framebufferPacked, pname, param));
2249
context->namedFramebufferParameteri(framebufferPacked, pname, param);
2251
ANGLE_CAPTURE(NamedFramebufferParameteri, isCallValid, context, framebufferPacked, pname,
2256
void GL_APIENTRY NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
2258
Context *context = GetValidGlobalContext();
2259
EVENT("glNamedFramebufferReadBuffer", "context = %d, GLuint framebuffer = %u, GLenum src = %s",
2260
CID(context), framebuffer, GLenumToString(GLenumGroup::ColorBuffer, src));
2264
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2265
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2266
bool isCallValid = (context->skipValidation() ||
2267
ValidateNamedFramebufferReadBuffer(context, framebufferPacked, src));
2270
context->namedFramebufferReadBuffer(framebufferPacked, src);
2272
ANGLE_CAPTURE(NamedFramebufferReadBuffer, isCallValid, context, framebufferPacked, src);
2276
void GL_APIENTRY NamedFramebufferRenderbuffer(GLuint framebuffer,
2278
GLenum renderbuffertarget,
2279
GLuint renderbuffer)
2281
Context *context = GetValidGlobalContext();
2282
EVENT("glNamedFramebufferRenderbuffer",
2283
"context = %d, GLuint framebuffer = %u, GLenum attachment = %s, GLenum "
2284
"renderbuffertarget = %s, GLuint renderbuffer = %u",
2285
CID(context), framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment),
2286
GLenumToString(GLenumGroup::RenderbufferTarget, renderbuffertarget), renderbuffer);
2290
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2291
RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
2292
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2294
(context->skipValidation() ||
2295
ValidateNamedFramebufferRenderbuffer(context, framebufferPacked, attachment,
2296
renderbuffertarget, renderbufferPacked));
2299
context->namedFramebufferRenderbuffer(framebufferPacked, attachment, renderbuffertarget,
2300
renderbufferPacked);
2302
ANGLE_CAPTURE(NamedFramebufferRenderbuffer, isCallValid, context, framebufferPacked,
2303
attachment, renderbuffertarget, renderbufferPacked);
2307
void GL_APIENTRY NamedFramebufferTexture(GLuint framebuffer,
2312
Context *context = GetValidGlobalContext();
2313
EVENT("glNamedFramebufferTexture",
2314
"context = %d, GLuint framebuffer = %u, GLenum attachment = %s, GLuint texture = %u, "
2316
CID(context), framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment),
2321
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2322
TextureID texturePacked = FromGL<TextureID>(texture);
2323
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2324
bool isCallValid = (context->skipValidation() ||
2325
ValidateNamedFramebufferTexture(context, framebufferPacked, attachment,
2326
texturePacked, level));
2329
context->namedFramebufferTexture(framebufferPacked, attachment, texturePacked, level);
2331
ANGLE_CAPTURE(NamedFramebufferTexture, isCallValid, context, framebufferPacked, attachment,
2332
texturePacked, level);
2336
void GL_APIENTRY NamedFramebufferTextureLayer(GLuint framebuffer,
2342
Context *context = GetValidGlobalContext();
2343
EVENT("glNamedFramebufferTextureLayer",
2344
"context = %d, GLuint framebuffer = %u, GLenum attachment = %s, GLuint texture = %u, "
2345
"GLint level = %d, GLint layer = %d",
2346
CID(context), framebuffer, GLenumToString(GLenumGroup::FramebufferAttachment, attachment),
2347
texture, level, layer);
2351
FramebufferID framebufferPacked = FromGL<FramebufferID>(framebuffer);
2352
TextureID texturePacked = FromGL<TextureID>(texture);
2353
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2354
bool isCallValid = (context->skipValidation() || ValidateNamedFramebufferTextureLayer(
2355
context, framebufferPacked, attachment,
2356
texturePacked, level, layer));
2359
context->namedFramebufferTextureLayer(framebufferPacked, attachment, texturePacked,
2362
ANGLE_CAPTURE(NamedFramebufferTextureLayer, isCallValid, context, framebufferPacked,
2363
attachment, texturePacked, level, layer);
2367
void GL_APIENTRY NamedRenderbufferStorage(GLuint renderbuffer,
2368
GLenum internalformat,
2372
Context *context = GetValidGlobalContext();
2373
EVENT("glNamedRenderbufferStorage",
2374
"context = %d, GLuint renderbuffer = %u, GLenum internalformat = %s, GLsizei width = %d, "
2375
"GLsizei height = %d",
2376
CID(context), renderbuffer, GLenumToString(GLenumGroup::InternalFormat, internalformat),
2381
RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
2382
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2383
bool isCallValid = (context->skipValidation() ||
2384
ValidateNamedRenderbufferStorage(context, renderbufferPacked,
2385
internalformat, width, height));
2388
context->namedRenderbufferStorage(renderbufferPacked, internalformat, width, height);
2390
ANGLE_CAPTURE(NamedRenderbufferStorage, isCallValid, context, renderbufferPacked,
2391
internalformat, width, height);
2395
void GL_APIENTRY NamedRenderbufferStorageMultisample(GLuint renderbuffer,
2397
GLenum internalformat,
2401
Context *context = GetValidGlobalContext();
2402
EVENT("glNamedRenderbufferStorageMultisample",
2403
"context = %d, GLuint renderbuffer = %u, GLsizei samples = %d, GLenum internalformat = "
2404
"%s, GLsizei width = %d, GLsizei height = %d",
2405
CID(context), renderbuffer, samples,
2406
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height);
2410
RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
2411
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2413
(context->skipValidation() ||
2414
ValidateNamedRenderbufferStorageMultisample(context, renderbufferPacked, samples,
2415
internalformat, width, height));
2418
context->namedRenderbufferStorageMultisample(renderbufferPacked, samples,
2419
internalformat, width, height);
2421
ANGLE_CAPTURE(NamedRenderbufferStorageMultisample, isCallValid, context, renderbufferPacked,
2422
samples, internalformat, width, height);
2426
void GL_APIENTRY ReadnPixels(GLint x,
2435
Context *context = GetValidGlobalContext();
2436
EVENT("glReadnPixels",
2437
"context = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, "
2438
"GLenum format = %s, GLenum type = %s, GLsizei bufSize = %d, void *data = 0x%016" PRIxPTR
2440
CID(context), x, y, width, height, GLenumToString(GLenumGroup::PixelFormat, format),
2441
GLenumToString(GLenumGroup::PixelType, type), bufSize, (uintptr_t)data);
2445
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2447
(context->skipValidation() ||
2448
ValidateReadnPixels(context, x, y, width, height, format, type, bufSize, data));
2451
context->readnPixels(x, y, width, height, format, type, bufSize, data);
2453
ANGLE_CAPTURE(ReadnPixels, isCallValid, context, x, y, width, height, format, type, bufSize,
2458
void GL_APIENTRY TextureBarrier()
2460
Context *context = GetValidGlobalContext();
2461
EVENT("glTextureBarrier", "context = %d", CID(context));
2465
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2466
bool isCallValid = (context->skipValidation() || ValidateTextureBarrier(context));
2469
context->textureBarrier();
2471
ANGLE_CAPTURE(TextureBarrier, isCallValid, context);
2475
void GL_APIENTRY TextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer)
2477
Context *context = GetValidGlobalContext();
2478
EVENT("glTextureBuffer",
2479
"context = %d, GLuint texture = %u, GLenum internalformat = %s, GLuint buffer = %u",
2480
CID(context), texture, GLenumToString(GLenumGroup::InternalFormat, internalformat),
2485
TextureID texturePacked = FromGL<TextureID>(texture);
2486
BufferID bufferPacked = FromGL<BufferID>(buffer);
2487
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2489
(context->skipValidation() ||
2490
ValidateTextureBuffer(context, texturePacked, internalformat, bufferPacked));
2493
context->textureBuffer(texturePacked, internalformat, bufferPacked);
2495
ANGLE_CAPTURE(TextureBuffer, isCallValid, context, texturePacked, internalformat,
2500
void GL_APIENTRY TextureBufferRange(GLuint texture,
2501
GLenum internalformat,
2506
Context *context = GetValidGlobalContext();
2507
EVENT("glTextureBufferRange",
2508
"context = %d, GLuint texture = %u, GLenum internalformat = %s, GLuint buffer = %u, "
2509
"GLintptr offset = %llu, GLsizeiptr size = %llu",
2510
CID(context), texture, GLenumToString(GLenumGroup::InternalFormat, internalformat),
2511
buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size));
2515
TextureID texturePacked = FromGL<TextureID>(texture);
2516
BufferID bufferPacked = FromGL<BufferID>(buffer);
2517
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2518
bool isCallValid = (context->skipValidation() ||
2519
ValidateTextureBufferRange(context, texturePacked, internalformat,
2520
bufferPacked, offset, size));
2523
context->textureBufferRange(texturePacked, internalformat, bufferPacked, offset, size);
2525
ANGLE_CAPTURE(TextureBufferRange, isCallValid, context, texturePacked, internalformat,
2526
bufferPacked, offset, size);
2530
void GL_APIENTRY TextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
2532
Context *context = GetValidGlobalContext();
2534
"glTextureParameterIiv",
2535
"context = %d, GLuint texture = %u, GLenum pname = %s, const GLint *params = 0x%016" PRIxPTR
2537
CID(context), texture, GLenumToString(GLenumGroup::TextureParameterName, pname),
2542
TextureID texturePacked = FromGL<TextureID>(texture);
2543
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2544
bool isCallValid = (context->skipValidation() ||
2545
ValidateTextureParameterIiv(context, texturePacked, pname, params));
2548
context->textureParameterIiv(texturePacked, pname, params);
2550
ANGLE_CAPTURE(TextureParameterIiv, isCallValid, context, texturePacked, pname, params);
2554
void GL_APIENTRY TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
2556
Context *context = GetValidGlobalContext();
2557
EVENT("glTextureParameterIuiv",
2558
"context = %d, GLuint texture = %u, GLenum pname = %s, const GLuint *params = "
2559
"0x%016" PRIxPTR "",
2560
CID(context), texture, GLenumToString(GLenumGroup::TextureParameterName, pname),
2565
TextureID texturePacked = FromGL<TextureID>(texture);
2566
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2567
bool isCallValid = (context->skipValidation() ||
2568
ValidateTextureParameterIuiv(context, texturePacked, pname, params));
2571
context->textureParameterIuiv(texturePacked, pname, params);
2573
ANGLE_CAPTURE(TextureParameterIuiv, isCallValid, context, texturePacked, pname, params);
2577
void GL_APIENTRY TextureParameterf(GLuint texture, GLenum pname, GLfloat param)
2579
Context *context = GetValidGlobalContext();
2580
EVENT("glTextureParameterf",
2581
"context = %d, GLuint texture = %u, GLenum pname = %s, GLfloat param = %f", CID(context),
2582
texture, GLenumToString(GLenumGroup::TextureParameterName, pname), param);
2586
TextureID texturePacked = FromGL<TextureID>(texture);
2587
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2588
bool isCallValid = (context->skipValidation() ||
2589
ValidateTextureParameterf(context, texturePacked, pname, param));
2592
context->textureParameterf(texturePacked, pname, param);
2594
ANGLE_CAPTURE(TextureParameterf, isCallValid, context, texturePacked, pname, param);
2598
void GL_APIENTRY TextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param)
2600
Context *context = GetValidGlobalContext();
2601
EVENT("glTextureParameterfv",
2602
"context = %d, GLuint texture = %u, GLenum pname = %s, const GLfloat *param = "
2603
"0x%016" PRIxPTR "",
2604
CID(context), texture, GLenumToString(GLenumGroup::TextureParameterName, pname),
2609
TextureID texturePacked = FromGL<TextureID>(texture);
2610
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2611
bool isCallValid = (context->skipValidation() ||
2612
ValidateTextureParameterfv(context, texturePacked, pname, param));
2615
context->textureParameterfv(texturePacked, pname, param);
2617
ANGLE_CAPTURE(TextureParameterfv, isCallValid, context, texturePacked, pname, param);
2621
void GL_APIENTRY TextureParameteri(GLuint texture, GLenum pname, GLint param)
2623
Context *context = GetValidGlobalContext();
2624
EVENT("glTextureParameteri",
2625
"context = %d, GLuint texture = %u, GLenum pname = %s, GLint param = %d", CID(context),
2626
texture, GLenumToString(GLenumGroup::TextureParameterName, pname), param);
2630
TextureID texturePacked = FromGL<TextureID>(texture);
2631
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2632
bool isCallValid = (context->skipValidation() ||
2633
ValidateTextureParameteri(context, texturePacked, pname, param));
2636
context->textureParameteri(texturePacked, pname, param);
2638
ANGLE_CAPTURE(TextureParameteri, isCallValid, context, texturePacked, pname, param);
2642
void GL_APIENTRY TextureParameteriv(GLuint texture, GLenum pname, const GLint *param)
2644
Context *context = GetValidGlobalContext();
2646
"glTextureParameteriv",
2647
"context = %d, GLuint texture = %u, GLenum pname = %s, const GLint *param = 0x%016" PRIxPTR
2649
CID(context), texture, GLenumToString(GLenumGroup::TextureParameterName, pname),
2654
TextureID texturePacked = FromGL<TextureID>(texture);
2655
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2656
bool isCallValid = (context->skipValidation() ||
2657
ValidateTextureParameteriv(context, texturePacked, pname, param));
2660
context->textureParameteriv(texturePacked, pname, param);
2662
ANGLE_CAPTURE(TextureParameteriv, isCallValid, context, texturePacked, pname, param);
2666
void GL_APIENTRY TextureStorage1D(GLuint texture,
2668
GLenum internalformat,
2671
Context *context = GetValidGlobalContext();
2672
EVENT("glTextureStorage1D",
2673
"context = %d, GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = %s, "
2674
"GLsizei width = %d",
2675
CID(context), texture, levels,
2676
GLenumToString(GLenumGroup::InternalFormat, internalformat), width);
2680
TextureID texturePacked = FromGL<TextureID>(texture);
2681
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2683
(context->skipValidation() ||
2684
ValidateTextureStorage1D(context, texturePacked, levels, internalformat, width));
2687
context->textureStorage1D(texturePacked, levels, internalformat, width);
2689
ANGLE_CAPTURE(TextureStorage1D, isCallValid, context, texturePacked, levels, internalformat,
2694
void GL_APIENTRY TextureStorage2D(GLuint texture,
2696
GLenum internalformat,
2700
Context *context = GetValidGlobalContext();
2701
EVENT("glTextureStorage2D",
2702
"context = %d, GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = %s, "
2703
"GLsizei width = %d, GLsizei height = %d",
2704
CID(context), texture, levels,
2705
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height);
2709
TextureID texturePacked = FromGL<TextureID>(texture);
2710
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2712
(context->skipValidation() || ValidateTextureStorage2D(context, texturePacked, levels,
2713
internalformat, width, height));
2716
context->textureStorage2D(texturePacked, levels, internalformat, width, height);
2718
ANGLE_CAPTURE(TextureStorage2D, isCallValid, context, texturePacked, levels, internalformat,
2723
void GL_APIENTRY TextureStorage2DMultisample(GLuint texture,
2725
GLenum internalformat,
2728
GLboolean fixedsamplelocations)
2730
Context *context = GetValidGlobalContext();
2731
EVENT("glTextureStorage2DMultisample",
2732
"context = %d, GLuint texture = %u, GLsizei samples = %d, GLenum internalformat = %s, "
2733
"GLsizei width = %d, GLsizei height = %d, GLboolean fixedsamplelocations = %s",
2734
CID(context), texture, samples,
2735
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height,
2736
GLbooleanToString(fixedsamplelocations));
2740
TextureID texturePacked = FromGL<TextureID>(texture);
2741
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2743
(context->skipValidation() ||
2744
ValidateTextureStorage2DMultisample(context, texturePacked, samples, internalformat,
2745
width, height, fixedsamplelocations));
2748
context->textureStorage2DMultisample(texturePacked, samples, internalformat, width,
2749
height, fixedsamplelocations);
2751
ANGLE_CAPTURE(TextureStorage2DMultisample, isCallValid, context, texturePacked, samples,
2752
internalformat, width, height, fixedsamplelocations);
2756
void GL_APIENTRY TextureStorage3D(GLuint texture,
2758
GLenum internalformat,
2763
Context *context = GetValidGlobalContext();
2764
EVENT("glTextureStorage3D",
2765
"context = %d, GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = %s, "
2766
"GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d",
2767
CID(context), texture, levels,
2768
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth);
2772
TextureID texturePacked = FromGL<TextureID>(texture);
2773
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2774
bool isCallValid = (context->skipValidation() ||
2775
ValidateTextureStorage3D(context, texturePacked, levels, internalformat,
2776
width, height, depth));
2779
context->textureStorage3D(texturePacked, levels, internalformat, width, height, depth);
2781
ANGLE_CAPTURE(TextureStorage3D, isCallValid, context, texturePacked, levels, internalformat,
2782
width, height, depth);
2786
void GL_APIENTRY TextureStorage3DMultisample(GLuint texture,
2788
GLenum internalformat,
2792
GLboolean fixedsamplelocations)
2794
Context *context = GetValidGlobalContext();
2795
EVENT("glTextureStorage3DMultisample",
2796
"context = %d, GLuint texture = %u, GLsizei samples = %d, GLenum internalformat = %s, "
2797
"GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLboolean "
2798
"fixedsamplelocations = %s",
2799
CID(context), texture, samples,
2800
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth,
2801
GLbooleanToString(fixedsamplelocations));
2805
TextureID texturePacked = FromGL<TextureID>(texture);
2806
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2808
(context->skipValidation() ||
2809
ValidateTextureStorage3DMultisample(context, texturePacked, samples, internalformat,
2810
width, height, depth, fixedsamplelocations));
2813
context->textureStorage3DMultisample(texturePacked, samples, internalformat, width,
2814
height, depth, fixedsamplelocations);
2816
ANGLE_CAPTURE(TextureStorage3DMultisample, isCallValid, context, texturePacked, samples,
2817
internalformat, width, height, depth, fixedsamplelocations);
2821
void GL_APIENTRY TextureSubImage1D(GLuint texture,
2829
Context *context = GetValidGlobalContext();
2830
EVENT("glTextureSubImage1D",
2831
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLsizei width "
2832
"= %d, GLenum format = %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR "",
2833
CID(context), texture, level, xoffset, width,
2834
GLenumToString(GLenumGroup::PixelFormat, format),
2835
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
2839
TextureID texturePacked = FromGL<TextureID>(texture);
2840
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2841
bool isCallValid = (context->skipValidation() ||
2842
ValidateTextureSubImage1D(context, texturePacked, level, xoffset, width,
2843
format, type, pixels));
2846
context->textureSubImage1D(texturePacked, level, xoffset, width, format, type, pixels);
2848
ANGLE_CAPTURE(TextureSubImage1D, isCallValid, context, texturePacked, level, xoffset, width,
2849
format, type, pixels);
2853
void GL_APIENTRY TextureSubImage2D(GLuint texture,
2863
Context *context = GetValidGlobalContext();
2864
EVENT("glTextureSubImage2D",
2865
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
2866
"= %d, GLsizei width = %d, GLsizei height = %d, GLenum format = %s, GLenum type = %s, "
2867
"const void *pixels = 0x%016" PRIxPTR "",
2868
CID(context), texture, level, xoffset, yoffset, width, height,
2869
GLenumToString(GLenumGroup::PixelFormat, format),
2870
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
2874
TextureID texturePacked = FromGL<TextureID>(texture);
2875
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2877
(context->skipValidation() ||
2878
ValidateTextureSubImage2D(context, texturePacked, level, xoffset, yoffset, width,
2879
height, format, type, pixels));
2882
context->textureSubImage2D(texturePacked, level, xoffset, yoffset, width, height,
2883
format, type, pixels);
2885
ANGLE_CAPTURE(TextureSubImage2D, isCallValid, context, texturePacked, level, xoffset,
2886
yoffset, width, height, format, type, pixels);
2890
void GL_APIENTRY TextureSubImage3D(GLuint texture,
2902
Context *context = GetValidGlobalContext();
2903
EVENT("glTextureSubImage3D",
2904
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
2905
"= %d, GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, "
2906
"GLenum format = %s, GLenum type = %s, const void *pixels = 0x%016" PRIxPTR "",
2907
CID(context), texture, level, xoffset, yoffset, zoffset, width, height, depth,
2908
GLenumToString(GLenumGroup::PixelFormat, format),
2909
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)pixels);
2913
TextureID texturePacked = FromGL<TextureID>(texture);
2914
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2916
(context->skipValidation() ||
2917
ValidateTextureSubImage3D(context, texturePacked, level, xoffset, yoffset, zoffset,
2918
width, height, depth, format, type, pixels));
2921
context->textureSubImage3D(texturePacked, level, xoffset, yoffset, zoffset, width,
2922
height, depth, format, type, pixels);
2924
ANGLE_CAPTURE(TextureSubImage3D, isCallValid, context, texturePacked, level, xoffset,
2925
yoffset, zoffset, width, height, depth, format, type, pixels);
2929
void GL_APIENTRY TransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
2931
Context *context = GetValidGlobalContext();
2932
EVENT("glTransformFeedbackBufferBase",
2933
"context = %d, GLuint xfb = %u, GLuint index = %u, GLuint buffer = %u", CID(context), xfb,
2938
BufferID bufferPacked = FromGL<BufferID>(buffer);
2939
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2940
bool isCallValid = (context->skipValidation() ||
2941
ValidateTransformFeedbackBufferBase(context, xfb, index, bufferPacked));
2944
context->transformFeedbackBufferBase(xfb, index, bufferPacked);
2946
ANGLE_CAPTURE(TransformFeedbackBufferBase, isCallValid, context, xfb, index, bufferPacked);
2950
void GL_APIENTRY TransformFeedbackBufferRange(GLuint xfb,
2956
Context *context = GetValidGlobalContext();
2957
EVENT("glTransformFeedbackBufferRange",
2958
"context = %d, GLuint xfb = %u, GLuint index = %u, GLuint buffer = %u, GLintptr offset = "
2959
"%llu, GLsizeiptr size = %llu",
2960
CID(context), xfb, index, buffer, static_cast<unsigned long long>(offset),
2961
static_cast<unsigned long long>(size));
2965
BufferID bufferPacked = FromGL<BufferID>(buffer);
2966
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2968
(context->skipValidation() ||
2969
ValidateTransformFeedbackBufferRange(context, xfb, index, bufferPacked, offset, size));
2972
context->transformFeedbackBufferRange(xfb, index, bufferPacked, offset, size);
2974
ANGLE_CAPTURE(TransformFeedbackBufferRange, isCallValid, context, xfb, index, bufferPacked,
2979
GLboolean GL_APIENTRY UnmapNamedBuffer(GLuint buffer)
2981
Context *context = GetValidGlobalContext();
2982
EVENT("glUnmapNamedBuffer", "context = %d, GLuint buffer = %u", CID(context), buffer);
2984
GLboolean returnValue;
2987
BufferID bufferPacked = FromGL<BufferID>(buffer);
2988
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
2990
(context->skipValidation() || ValidateUnmapNamedBuffer(context, bufferPacked));
2993
returnValue = context->unmapNamedBuffer(bufferPacked);
2997
returnValue = GetDefaultReturnValue<EntryPoint::UnmapNamedBuffer, GLboolean>();
2999
ANGLE_CAPTURE(UnmapNamedBuffer, isCallValid, context, bufferPacked, returnValue);
3003
returnValue = GetDefaultReturnValue<EntryPoint::UnmapNamedBuffer, GLboolean>();
3008
void GL_APIENTRY VertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex)
3010
Context *context = GetValidGlobalContext();
3011
EVENT("glVertexArrayAttribBinding",
3012
"context = %d, GLuint vaobj = %u, GLuint attribindex = %u, GLuint bindingindex = %u",
3013
CID(context), vaobj, attribindex, bindingindex);
3017
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3018
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3020
(context->skipValidation() ||
3021
ValidateVertexArrayAttribBinding(context, vaobjPacked, attribindex, bindingindex));
3024
context->vertexArrayAttribBinding(vaobjPacked, attribindex, bindingindex);
3026
ANGLE_CAPTURE(VertexArrayAttribBinding, isCallValid, context, vaobjPacked, attribindex,
3031
void GL_APIENTRY VertexArrayAttribFormat(GLuint vaobj,
3035
GLboolean normalized,
3036
GLuint relativeoffset)
3038
Context *context = GetValidGlobalContext();
3039
EVENT("glVertexArrayAttribFormat",
3040
"context = %d, GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type "
3041
"= %s, GLboolean normalized = %s, GLuint relativeoffset = %u",
3042
CID(context), vaobj, attribindex, size,
3043
GLenumToString(GLenumGroup::VertexAttribType, type), GLbooleanToString(normalized),
3048
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3049
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3050
bool isCallValid = (context->skipValidation() ||
3051
ValidateVertexArrayAttribFormat(context, vaobjPacked, attribindex, size,
3052
type, normalized, relativeoffset));
3055
context->vertexArrayAttribFormat(vaobjPacked, attribindex, size, type, normalized,
3058
ANGLE_CAPTURE(VertexArrayAttribFormat, isCallValid, context, vaobjPacked, attribindex, size,
3059
type, normalized, relativeoffset);
3063
void GL_APIENTRY VertexArrayAttribIFormat(GLuint vaobj,
3067
GLuint relativeoffset)
3069
Context *context = GetValidGlobalContext();
3070
EVENT("glVertexArrayAttribIFormat",
3071
"context = %d, GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type "
3072
"= %s, GLuint relativeoffset = %u",
3073
CID(context), vaobj, attribindex, size,
3074
GLenumToString(GLenumGroup::VertexAttribType, type), relativeoffset);
3078
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3079
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3080
bool isCallValid = (context->skipValidation() ||
3081
ValidateVertexArrayAttribIFormat(context, vaobjPacked, attribindex,
3082
size, type, relativeoffset));
3085
context->vertexArrayAttribIFormat(vaobjPacked, attribindex, size, type, relativeoffset);
3087
ANGLE_CAPTURE(VertexArrayAttribIFormat, isCallValid, context, vaobjPacked, attribindex,
3088
size, type, relativeoffset);
3092
void GL_APIENTRY VertexArrayAttribLFormat(GLuint vaobj,
3096
GLuint relativeoffset)
3098
Context *context = GetValidGlobalContext();
3099
EVENT("glVertexArrayAttribLFormat",
3100
"context = %d, GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type "
3101
"= %s, GLuint relativeoffset = %u",
3102
CID(context), vaobj, attribindex, size,
3103
GLenumToString(GLenumGroup::VertexAttribType, type), relativeoffset);
3107
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3108
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3109
bool isCallValid = (context->skipValidation() ||
3110
ValidateVertexArrayAttribLFormat(context, vaobjPacked, attribindex,
3111
size, type, relativeoffset));
3114
context->vertexArrayAttribLFormat(vaobjPacked, attribindex, size, type, relativeoffset);
3116
ANGLE_CAPTURE(VertexArrayAttribLFormat, isCallValid, context, vaobjPacked, attribindex,
3117
size, type, relativeoffset);
3121
void GL_APIENTRY VertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor)
3123
Context *context = GetValidGlobalContext();
3124
EVENT("glVertexArrayBindingDivisor",
3125
"context = %d, GLuint vaobj = %u, GLuint bindingindex = %u, GLuint divisor = %u",
3126
CID(context), vaobj, bindingindex, divisor);
3130
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3131
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3133
(context->skipValidation() ||
3134
ValidateVertexArrayBindingDivisor(context, vaobjPacked, bindingindex, divisor));
3137
context->vertexArrayBindingDivisor(vaobjPacked, bindingindex, divisor);
3139
ANGLE_CAPTURE(VertexArrayBindingDivisor, isCallValid, context, vaobjPacked, bindingindex,
3144
void GL_APIENTRY VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
3146
Context *context = GetValidGlobalContext();
3147
EVENT("glVertexArrayElementBuffer", "context = %d, GLuint vaobj = %u, GLuint buffer = %u",
3148
CID(context), vaobj, buffer);
3152
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3153
BufferID bufferPacked = FromGL<BufferID>(buffer);
3154
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3155
bool isCallValid = (context->skipValidation() ||
3156
ValidateVertexArrayElementBuffer(context, vaobjPacked, bufferPacked));
3159
context->vertexArrayElementBuffer(vaobjPacked, bufferPacked);
3161
ANGLE_CAPTURE(VertexArrayElementBuffer, isCallValid, context, vaobjPacked, bufferPacked);
3165
void GL_APIENTRY VertexArrayVertexBuffer(GLuint vaobj,
3166
GLuint bindingindex,
3171
Context *context = GetValidGlobalContext();
3172
EVENT("glVertexArrayVertexBuffer",
3173
"context = %d, GLuint vaobj = %u, GLuint bindingindex = %u, GLuint buffer = %u, GLintptr "
3174
"offset = %llu, GLsizei stride = %d",
3175
CID(context), vaobj, bindingindex, buffer, static_cast<unsigned long long>(offset),
3180
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3181
BufferID bufferPacked = FromGL<BufferID>(buffer);
3182
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3183
bool isCallValid = (context->skipValidation() ||
3184
ValidateVertexArrayVertexBuffer(context, vaobjPacked, bindingindex,
3185
bufferPacked, offset, stride));
3188
context->vertexArrayVertexBuffer(vaobjPacked, bindingindex, bufferPacked, offset,
3191
ANGLE_CAPTURE(VertexArrayVertexBuffer, isCallValid, context, vaobjPacked, bindingindex,
3192
bufferPacked, offset, stride);
3196
void GL_APIENTRY VertexArrayVertexBuffers(GLuint vaobj,
3199
const GLuint *buffers,
3200
const GLintptr *offsets,
3201
const GLsizei *strides)
3203
Context *context = GetValidGlobalContext();
3204
EVENT("glVertexArrayVertexBuffers",
3205
"context = %d, GLuint vaobj = %u, GLuint first = %u, GLsizei count = %d, const GLuint "
3206
"*buffers = 0x%016" PRIxPTR ", const GLintptr *offsets = 0x%016" PRIxPTR
3207
", const GLsizei *strides = 0x%016" PRIxPTR "",
3208
CID(context), vaobj, first, count, (uintptr_t)buffers, (uintptr_t)offsets,
3209
(uintptr_t)strides);
3213
VertexArrayID vaobjPacked = FromGL<VertexArrayID>(vaobj);
3214
const BufferID *buffersPacked = FromGL<const BufferID *>(buffers);
3215
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
3216
bool isCallValid = (context->skipValidation() ||
3217
ValidateVertexArrayVertexBuffers(context, vaobjPacked, first, count,
3218
buffersPacked, offsets, strides));
3221
context->vertexArrayVertexBuffers(vaobjPacked, first, count, buffersPacked, offsets,
3224
ANGLE_CAPTURE(VertexArrayVertexBuffers, isCallValid, context, vaobjPacked, first, count,
3225
buffersPacked, offsets, strides);