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_3_autogen.cpp:
9
// Defines the GL 4.3 entry points.
11
#include "libGL/entry_points_gl_4_3_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/validationGL43_autogen.h"
26
#include "libGLESv2/global_state.h"
30
void GL_APIENTRY BindVertexBuffer(GLuint bindingindex,
35
Context *context = GetValidGlobalContext();
36
EVENT("glBindVertexBuffer",
37
"context = %d, GLuint bindingindex = %u, GLuint buffer = %u, GLintptr offset = %llu, "
38
"GLsizei stride = %d",
39
CID(context), bindingindex, buffer, static_cast<unsigned long long>(offset), stride);
43
BufferID bufferPacked = FromGL<BufferID>(buffer);
44
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
46
(context->skipValidation() ||
47
ValidateBindVertexBuffer(context, bindingindex, bufferPacked, offset, stride));
50
context->bindVertexBuffer(bindingindex, bufferPacked, offset, stride);
52
ANGLE_CAPTURE(BindVertexBuffer, isCallValid, context, bindingindex, bufferPacked, offset,
58
ClearBufferData(GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data)
60
Context *context = GetValidGlobalContext();
61
EVENT("glClearBufferData",
62
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLenum format = %s, "
63
"GLenum type = %s, const void *data = 0x%016" PRIxPTR "",
64
CID(context), GLenumToString(GLenumGroup::BufferStorageTarget, target),
65
GLenumToString(GLenumGroup::InternalFormat, internalformat),
66
GLenumToString(GLenumGroup::PixelFormat, format),
67
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
71
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
73
(context->skipValidation() ||
74
ValidateClearBufferData(context, target, internalformat, format, type, data));
77
context->clearBufferData(target, internalformat, format, type, data);
79
ANGLE_CAPTURE(ClearBufferData, isCallValid, context, target, internalformat, format, type,
84
void GL_APIENTRY ClearBufferSubData(GLenum target,
85
GLenum internalformat,
92
Context *context = GetValidGlobalContext();
93
EVENT("glClearBufferSubData",
94
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLintptr offset = %llu, "
95
"GLsizeiptr size = %llu, GLenum format = %s, GLenum type = %s, const void *data = "
97
CID(context), GLenumToString(GLenumGroup::DefaultGroup, target),
98
GLenumToString(GLenumGroup::InternalFormat, internalformat),
99
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
100
GLenumToString(GLenumGroup::PixelFormat, format),
101
GLenumToString(GLenumGroup::PixelType, type), (uintptr_t)data);
105
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
106
bool isCallValid = (context->skipValidation() ||
107
ValidateClearBufferSubData(context, target, internalformat, offset,
108
size, format, type, data));
111
context->clearBufferSubData(target, internalformat, offset, size, format, type, data);
113
ANGLE_CAPTURE(ClearBufferSubData, isCallValid, context, target, internalformat, offset,
114
size, format, type, data);
118
void GL_APIENTRY CopyImageSubData(GLuint srcName,
134
Context *context = GetValidGlobalContext();
135
EVENT("glCopyImageSubData",
136
"context = %d, GLuint srcName = %u, GLenum srcTarget = %s, GLint srcLevel = %d, GLint "
137
"srcX = %d, GLint srcY = %d, GLint srcZ = %d, GLuint dstName = %u, GLenum dstTarget = "
138
"%s, GLint dstLevel = %d, GLint dstX = %d, GLint dstY = %d, GLint dstZ = %d, GLsizei "
139
"srcWidth = %d, GLsizei srcHeight = %d, GLsizei srcDepth = %d",
140
CID(context), srcName, GLenumToString(GLenumGroup::CopyBufferSubDataTarget, srcTarget),
141
srcLevel, srcX, srcY, srcZ, dstName,
142
GLenumToString(GLenumGroup::CopyBufferSubDataTarget, dstTarget), dstLevel, dstX, dstY,
143
dstZ, srcWidth, srcHeight, srcDepth);
147
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
148
bool isCallValid = (context->skipValidation() ||
149
ValidateCopyImageSubData(context, srcName, srcTarget, srcLevel, srcX,
150
srcY, srcZ, dstName, dstTarget, dstLevel, dstX,
151
dstY, dstZ, srcWidth, srcHeight, srcDepth));
154
context->copyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName,
155
dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight,
158
ANGLE_CAPTURE(CopyImageSubData, isCallValid, context, srcName, srcTarget, srcLevel, srcX,
159
srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth,
160
srcHeight, srcDepth);
164
void GL_APIENTRY DebugMessageCallback(GLDEBUGPROC callback, const void *userParam)
166
Context *context = GetValidGlobalContext();
167
EVENT("glDebugMessageCallback",
168
"context = %d, GLDEBUGPROC callback = 0x%016" PRIxPTR
169
", const void *userParam = 0x%016" PRIxPTR "",
170
CID(context), (uintptr_t)callback, (uintptr_t)userParam);
174
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
175
bool isCallValid = (context->skipValidation() ||
176
ValidateDebugMessageCallback(context, callback, userParam));
179
context->debugMessageCallback(callback, userParam);
181
ANGLE_CAPTURE(DebugMessageCallback, isCallValid, context, callback, userParam);
185
void GL_APIENTRY DebugMessageControl(GLenum source,
192
Context *context = GetValidGlobalContext();
193
EVENT("glDebugMessageControl",
194
"context = %d, GLenum source = %s, GLenum type = %s, GLenum severity = %s, GLsizei count "
195
"= %d, const GLuint *ids = 0x%016" PRIxPTR ", GLboolean enabled = %s",
196
CID(context), GLenumToString(GLenumGroup::DebugSource, source),
197
GLenumToString(GLenumGroup::DebugType, type),
198
GLenumToString(GLenumGroup::DebugSeverity, severity), count, (uintptr_t)ids,
199
GLbooleanToString(enabled));
203
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
205
(context->skipValidation() ||
206
ValidateDebugMessageControl(context, source, type, severity, count, ids, enabled));
209
context->debugMessageControl(source, type, severity, count, ids, enabled);
211
ANGLE_CAPTURE(DebugMessageControl, isCallValid, context, source, type, severity, count, ids,
216
void GL_APIENTRY DebugMessageInsert(GLenum source,
223
Context *context = GetValidGlobalContext();
224
EVENT("glDebugMessageInsert",
225
"context = %d, GLenum source = %s, GLenum type = %s, GLuint id = %u, GLenum severity = "
226
"%s, GLsizei length = %d, const GLchar *buf = 0x%016" PRIxPTR "",
227
CID(context), GLenumToString(GLenumGroup::DebugSource, source),
228
GLenumToString(GLenumGroup::DebugType, type), id,
229
GLenumToString(GLenumGroup::DebugSeverity, severity), length, (uintptr_t)buf);
233
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
235
(context->skipValidation() ||
236
ValidateDebugMessageInsert(context, source, type, id, severity, length, buf));
239
context->debugMessageInsert(source, type, id, severity, length, buf);
241
ANGLE_CAPTURE(DebugMessageInsert, isCallValid, context, source, type, id, severity, length,
246
void GL_APIENTRY DispatchCompute(GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z)
248
Context *context = GetValidGlobalContext();
249
EVENT("glDispatchCompute",
250
"context = %d, GLuint num_groups_x = %u, GLuint num_groups_y = %u, GLuint num_groups_z = "
252
CID(context), num_groups_x, num_groups_y, num_groups_z);
256
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
258
(context->skipValidation() ||
259
ValidateDispatchCompute(context, num_groups_x, num_groups_y, num_groups_z));
262
context->dispatchCompute(num_groups_x, num_groups_y, num_groups_z);
264
ANGLE_CAPTURE(DispatchCompute, isCallValid, context, num_groups_x, num_groups_y,
269
void GL_APIENTRY DispatchComputeIndirect(GLintptr indirect)
271
Context *context = GetValidGlobalContext();
272
EVENT("glDispatchComputeIndirect", "context = %d, GLintptr indirect = %llu", CID(context),
273
static_cast<unsigned long long>(indirect));
277
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
279
(context->skipValidation() || ValidateDispatchComputeIndirect(context, indirect));
282
context->dispatchComputeIndirect(indirect);
284
ANGLE_CAPTURE(DispatchComputeIndirect, isCallValid, context, indirect);
288
void GL_APIENTRY FramebufferParameteri(GLenum target, GLenum pname, GLint param)
290
Context *context = GetValidGlobalContext();
291
EVENT("glFramebufferParameteri",
292
"context = %d, GLenum target = %s, GLenum pname = %s, GLint param = %d", CID(context),
293
GLenumToString(GLenumGroup::FramebufferTarget, target),
294
GLenumToString(GLenumGroup::FramebufferParameterName, pname), param);
298
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
299
bool isCallValid = (context->skipValidation() ||
300
ValidateFramebufferParameteri(context, target, pname, param));
303
context->framebufferParameteri(target, pname, param);
305
ANGLE_CAPTURE(FramebufferParameteri, isCallValid, context, target, pname, param);
309
GLuint GL_APIENTRY GetDebugMessageLog(GLuint count,
318
Context *context = GetValidGlobalContext();
319
EVENT("glGetDebugMessageLog",
320
"context = %d, GLuint count = %u, GLsizei bufSize = %d, GLenum *sources = 0x%016" PRIxPTR
321
", GLenum *types = 0x%016" PRIxPTR ", GLuint *ids = 0x%016" PRIxPTR
322
", GLenum *severities = 0x%016" PRIxPTR ", GLsizei *lengths = 0x%016" PRIxPTR
323
", GLchar *messageLog = 0x%016" PRIxPTR "",
324
CID(context), count, bufSize, (uintptr_t)sources, (uintptr_t)types, (uintptr_t)ids,
325
(uintptr_t)severities, (uintptr_t)lengths, (uintptr_t)messageLog);
330
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
331
bool isCallValid = (context->skipValidation() ||
332
ValidateGetDebugMessageLog(context, count, bufSize, sources, types, ids,
333
severities, lengths, messageLog));
336
returnValue = context->getDebugMessageLog(count, bufSize, sources, types, ids,
337
severities, lengths, messageLog);
341
returnValue = GetDefaultReturnValue<EntryPoint::GetDebugMessageLog, GLuint>();
343
ANGLE_CAPTURE(GetDebugMessageLog, isCallValid, context, count, bufSize, sources, types, ids,
344
severities, lengths, messageLog, returnValue);
348
returnValue = GetDefaultReturnValue<EntryPoint::GetDebugMessageLog, GLuint>();
353
void GL_APIENTRY GetFramebufferParameteriv(GLenum target, GLenum pname, GLint *params)
355
Context *context = GetValidGlobalContext();
356
EVENT("glGetFramebufferParameteriv",
357
"context = %d, GLenum target = %s, GLenum pname = %s, GLint *params = 0x%016" PRIxPTR "",
358
CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target),
359
GLenumToString(GLenumGroup::FramebufferAttachmentParameterName, pname),
364
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
365
bool isCallValid = (context->skipValidation() ||
366
ValidateGetFramebufferParameteriv(context, target, pname, params));
369
context->getFramebufferParameteriv(target, pname, params);
371
ANGLE_CAPTURE(GetFramebufferParameteriv, isCallValid, context, target, pname, params);
375
void GL_APIENTRY GetInternalformati64v(GLenum target,
376
GLenum internalformat,
381
Context *context = GetValidGlobalContext();
382
EVENT("glGetInternalformati64v",
383
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLenum pname = %s, "
384
"GLsizei bufSize = %d, GLint64 *params = 0x%016" PRIxPTR "",
385
CID(context), GLenumToString(GLenumGroup::TextureTarget, target),
386
GLenumToString(GLenumGroup::InternalFormat, internalformat),
387
GLenumToString(GLenumGroup::InternalFormatPName, pname), bufSize, (uintptr_t)params);
391
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
392
bool isCallValid = (context->skipValidation() ||
393
ValidateGetInternalformati64v(context, target, internalformat, pname,
397
context->getInternalformati64v(target, internalformat, pname, bufSize, params);
399
ANGLE_CAPTURE(GetInternalformati64v, isCallValid, context, target, internalformat, pname,
405
GetObjectLabel(GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label)
407
Context *context = GetValidGlobalContext();
408
EVENT("glGetObjectLabel",
409
"context = %d, GLenum identifier = %s, GLuint name = %u, GLsizei bufSize = %d, GLsizei "
410
"*length = 0x%016" PRIxPTR ", GLchar *label = 0x%016" PRIxPTR "",
411
CID(context), GLenumToString(GLenumGroup::DefaultGroup, identifier), name, bufSize,
412
(uintptr_t)length, (uintptr_t)label);
416
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
418
(context->skipValidation() ||
419
ValidateGetObjectLabel(context, identifier, name, bufSize, length, label));
422
context->getObjectLabel(identifier, name, bufSize, length, label);
424
ANGLE_CAPTURE(GetObjectLabel, isCallValid, context, identifier, name, bufSize, length,
429
void GL_APIENTRY GetObjectPtrLabel(const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label)
431
Context *context = GetValidGlobalContext();
432
EVENT("glGetObjectPtrLabel",
433
"context = %d, const void *ptr = 0x%016" PRIxPTR
434
", GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
435
", GLchar *label = 0x%016" PRIxPTR "",
436
CID(context), (uintptr_t)ptr, bufSize, (uintptr_t)length, (uintptr_t)label);
440
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
441
bool isCallValid = (context->skipValidation() ||
442
ValidateGetObjectPtrLabel(context, ptr, bufSize, length, label));
445
context->getObjectPtrLabel(ptr, bufSize, length, label);
447
ANGLE_CAPTURE(GetObjectPtrLabel, isCallValid, context, ptr, bufSize, length, label);
451
void GL_APIENTRY GetProgramInterfaceiv(GLuint program,
452
GLenum programInterface,
456
Context *context = GetValidGlobalContext();
457
EVENT("glGetProgramInterfaceiv",
458
"context = %d, GLuint program = %u, GLenum programInterface = %s, GLenum pname = %s, "
459
"GLint *params = 0x%016" PRIxPTR "",
460
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
461
GLenumToString(GLenumGroup::ProgramInterfacePName, pname), (uintptr_t)params);
465
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
466
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
467
bool isCallValid = (context->skipValidation() ||
468
ValidateGetProgramInterfaceiv(context, programPacked, programInterface,
472
context->getProgramInterfaceiv(programPacked, programInterface, pname, params);
474
ANGLE_CAPTURE(GetProgramInterfaceiv, isCallValid, context, programPacked, programInterface,
479
GLuint GL_APIENTRY GetProgramResourceIndex(GLuint program,
480
GLenum programInterface,
483
Context *context = GetValidGlobalContext();
484
EVENT("glGetProgramResourceIndex",
485
"context = %d, GLuint program = %u, GLenum programInterface = %s, const GLchar *name = "
487
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
493
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
494
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
496
(context->skipValidation() ||
497
ValidateGetProgramResourceIndex(context, programPacked, programInterface, name));
500
returnValue = context->getProgramResourceIndex(programPacked, programInterface, name);
504
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
506
ANGLE_CAPTURE(GetProgramResourceIndex, isCallValid, context, programPacked,
507
programInterface, name, returnValue);
511
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceIndex, GLuint>();
516
GLint GL_APIENTRY GetProgramResourceLocation(GLuint program,
517
GLenum programInterface,
520
Context *context = GetValidGlobalContext();
521
EVENT("glGetProgramResourceLocation",
522
"context = %d, GLuint program = %u, GLenum programInterface = %s, const GLchar *name = "
524
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
530
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
531
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
533
(context->skipValidation() ||
534
ValidateGetProgramResourceLocation(context, programPacked, programInterface, name));
538
context->getProgramResourceLocation(programPacked, programInterface, name);
542
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
544
ANGLE_CAPTURE(GetProgramResourceLocation, isCallValid, context, programPacked,
545
programInterface, name, returnValue);
549
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceLocation, GLint>();
554
GLint GL_APIENTRY GetProgramResourceLocationIndex(GLuint program,
555
GLenum programInterface,
558
Context *context = GetValidGlobalContext();
559
EVENT("glGetProgramResourceLocationIndex",
560
"context = %d, GLuint program = %u, GLenum programInterface = %s, const GLchar *name = "
562
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
568
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
569
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
571
(context->skipValidation() || ValidateGetProgramResourceLocationIndex(
572
context, programPacked, programInterface, name));
576
context->getProgramResourceLocationIndex(programPacked, programInterface, name);
581
GetDefaultReturnValue<EntryPoint::GetProgramResourceLocationIndex, GLint>();
583
ANGLE_CAPTURE(GetProgramResourceLocationIndex, isCallValid, context, programPacked,
584
programInterface, name, returnValue);
588
returnValue = GetDefaultReturnValue<EntryPoint::GetProgramResourceLocationIndex, GLint>();
593
void GL_APIENTRY GetProgramResourceName(GLuint program,
594
GLenum programInterface,
600
Context *context = GetValidGlobalContext();
601
EVENT("glGetProgramResourceName",
602
"context = %d, GLuint program = %u, GLenum programInterface = %s, GLuint index = %u, "
603
"GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR ", GLchar *name = 0x%016" PRIxPTR
605
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
606
index, bufSize, (uintptr_t)length, (uintptr_t)name);
610
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
611
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
612
bool isCallValid = (context->skipValidation() ||
613
ValidateGetProgramResourceName(context, programPacked, programInterface,
614
index, bufSize, length, name));
617
context->getProgramResourceName(programPacked, programInterface, index, bufSize, length,
620
ANGLE_CAPTURE(GetProgramResourceName, isCallValid, context, programPacked, programInterface,
621
index, bufSize, length, name);
625
void GL_APIENTRY GetProgramResourceiv(GLuint program,
626
GLenum programInterface,
634
Context *context = GetValidGlobalContext();
635
EVENT("glGetProgramResourceiv",
636
"context = %d, GLuint program = %u, GLenum programInterface = %s, GLuint index = %u, "
637
"GLsizei propCount = %d, const GLenum *props = 0x%016" PRIxPTR
638
", GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
639
", GLint *params = 0x%016" PRIxPTR "",
640
CID(context), program, GLenumToString(GLenumGroup::ProgramInterface, programInterface),
641
index, propCount, (uintptr_t)props, bufSize, (uintptr_t)length, (uintptr_t)params);
645
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
646
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
648
(context->skipValidation() ||
649
ValidateGetProgramResourceiv(context, programPacked, programInterface, index,
650
propCount, props, bufSize, length, params));
653
context->getProgramResourceiv(programPacked, programInterface, index, propCount, props,
654
bufSize, length, params);
656
ANGLE_CAPTURE(GetProgramResourceiv, isCallValid, context, programPacked, programInterface,
657
index, propCount, props, bufSize, length, params);
661
void GL_APIENTRY InvalidateBufferData(GLuint buffer)
663
Context *context = GetValidGlobalContext();
664
EVENT("glInvalidateBufferData", "context = %d, GLuint buffer = %u", CID(context), buffer);
668
BufferID bufferPacked = FromGL<BufferID>(buffer);
669
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
671
(context->skipValidation() || ValidateInvalidateBufferData(context, bufferPacked));
674
context->invalidateBufferData(bufferPacked);
676
ANGLE_CAPTURE(InvalidateBufferData, isCallValid, context, bufferPacked);
680
void GL_APIENTRY InvalidateBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr length)
682
Context *context = GetValidGlobalContext();
683
EVENT("glInvalidateBufferSubData",
684
"context = %d, GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu",
685
CID(context), buffer, static_cast<unsigned long long>(offset),
686
static_cast<unsigned long long>(length));
690
BufferID bufferPacked = FromGL<BufferID>(buffer);
691
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
692
bool isCallValid = (context->skipValidation() ||
693
ValidateInvalidateBufferSubData(context, bufferPacked, offset, length));
696
context->invalidateBufferSubData(bufferPacked, offset, length);
698
ANGLE_CAPTURE(InvalidateBufferSubData, isCallValid, context, bufferPacked, offset, length);
702
void GL_APIENTRY InvalidateFramebuffer(GLenum target,
703
GLsizei numAttachments,
704
const GLenum *attachments)
706
Context *context = GetValidGlobalContext();
707
EVENT("glInvalidateFramebuffer",
708
"context = %d, GLenum target = %s, GLsizei numAttachments = %d, const GLenum "
709
"*attachments = 0x%016" PRIxPTR "",
710
CID(context), GLenumToString(GLenumGroup::FramebufferTarget, target), numAttachments,
711
(uintptr_t)attachments);
715
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
717
(context->skipValidation() ||
718
ValidateInvalidateFramebuffer(context, target, numAttachments, attachments));
721
context->invalidateFramebuffer(target, numAttachments, attachments);
723
ANGLE_CAPTURE(InvalidateFramebuffer, isCallValid, context, target, numAttachments,
728
void GL_APIENTRY InvalidateSubFramebuffer(GLenum target,
729
GLsizei numAttachments,
730
const GLenum *attachments,
736
Context *context = GetValidGlobalContext();
737
EVENT("glInvalidateSubFramebuffer",
738
"context = %d, GLenum target = %s, GLsizei numAttachments = %d, const GLenum "
739
"*attachments = 0x%016" PRIxPTR
740
", GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d",
741
CID(context), GLenumToString(GLenumGroup::DefaultGroup, target), numAttachments,
742
(uintptr_t)attachments, x, y, width, height);
746
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
747
bool isCallValid = (context->skipValidation() ||
748
ValidateInvalidateSubFramebuffer(context, target, numAttachments,
749
attachments, x, y, width, height));
752
context->invalidateSubFramebuffer(target, numAttachments, attachments, x, y, width,
755
ANGLE_CAPTURE(InvalidateSubFramebuffer, isCallValid, context, target, numAttachments,
756
attachments, x, y, width, height);
760
void GL_APIENTRY InvalidateTexImage(GLuint texture, GLint level)
762
Context *context = GetValidGlobalContext();
763
EVENT("glInvalidateTexImage", "context = %d, GLuint texture = %u, GLint level = %d",
764
CID(context), texture, level);
768
TextureID texturePacked = FromGL<TextureID>(texture);
769
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
770
bool isCallValid = (context->skipValidation() ||
771
ValidateInvalidateTexImage(context, texturePacked, level));
774
context->invalidateTexImage(texturePacked, level);
776
ANGLE_CAPTURE(InvalidateTexImage, isCallValid, context, texturePacked, level);
780
void GL_APIENTRY InvalidateTexSubImage(GLuint texture,
789
Context *context = GetValidGlobalContext();
790
EVENT("glInvalidateTexSubImage",
791
"context = %d, GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset "
792
"= %d, GLint zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d",
793
CID(context), texture, level, xoffset, yoffset, zoffset, width, height, depth);
797
TextureID texturePacked = FromGL<TextureID>(texture);
798
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
799
bool isCallValid = (context->skipValidation() ||
800
ValidateInvalidateTexSubImage(context, texturePacked, level, xoffset,
801
yoffset, zoffset, width, height, depth));
804
context->invalidateTexSubImage(texturePacked, level, xoffset, yoffset, zoffset, width,
807
ANGLE_CAPTURE(InvalidateTexSubImage, isCallValid, context, texturePacked, level, xoffset,
808
yoffset, zoffset, width, height, depth);
812
void GL_APIENTRY MultiDrawArraysIndirect(GLenum mode,
813
const void *indirect,
817
Context *context = GetValidGlobalContext();
818
EVENT("glMultiDrawArraysIndirect",
819
"context = %d, GLenum mode = %s, const void *indirect = 0x%016" PRIxPTR
820
", GLsizei drawcount = %d, GLsizei stride = %d",
821
CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode), (uintptr_t)indirect,
826
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
828
(context->skipValidation() ||
829
ValidateMultiDrawArraysIndirect(context, mode, indirect, drawcount, stride));
832
context->multiDrawArraysIndirect(mode, indirect, drawcount, stride);
834
ANGLE_CAPTURE(MultiDrawArraysIndirect, isCallValid, context, mode, indirect, drawcount,
839
void GL_APIENTRY MultiDrawElementsIndirect(GLenum mode,
841
const void *indirect,
845
Context *context = GetValidGlobalContext();
846
EVENT("glMultiDrawElementsIndirect",
847
"context = %d, GLenum mode = %s, GLenum type = %s, const void *indirect = 0x%016" PRIxPTR
848
", GLsizei drawcount = %d, GLsizei stride = %d",
849
CID(context), GLenumToString(GLenumGroup::PrimitiveType, mode),
850
GLenumToString(GLenumGroup::DrawElementsType, type), (uintptr_t)indirect, drawcount,
855
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
857
(context->skipValidation() ||
858
ValidateMultiDrawElementsIndirect(context, mode, type, indirect, drawcount, stride));
861
context->multiDrawElementsIndirect(mode, type, indirect, drawcount, stride);
863
ANGLE_CAPTURE(MultiDrawElementsIndirect, isCallValid, context, mode, type, indirect,
868
void GL_APIENTRY ObjectLabel(GLenum identifier, GLuint name, GLsizei length, const GLchar *label)
870
Context *context = GetValidGlobalContext();
871
EVENT("glObjectLabel",
872
"context = %d, GLenum identifier = %s, GLuint name = %u, GLsizei length = %d, const "
873
"GLchar *label = 0x%016" PRIxPTR "",
874
CID(context), GLenumToString(GLenumGroup::ObjectIdentifier, identifier), name, length,
879
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
880
bool isCallValid = (context->skipValidation() ||
881
ValidateObjectLabel(context, identifier, name, length, label));
884
context->objectLabel(identifier, name, length, label);
886
ANGLE_CAPTURE(ObjectLabel, isCallValid, context, identifier, name, length, label);
890
void GL_APIENTRY ObjectPtrLabel(const void *ptr, GLsizei length, const GLchar *label)
892
Context *context = GetValidGlobalContext();
893
EVENT("glObjectPtrLabel",
894
"context = %d, const void *ptr = 0x%016" PRIxPTR
895
", GLsizei length = %d, const GLchar *label = 0x%016" PRIxPTR "",
896
CID(context), (uintptr_t)ptr, length, (uintptr_t)label);
900
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
902
(context->skipValidation() || ValidateObjectPtrLabel(context, ptr, length, label));
905
context->objectPtrLabel(ptr, length, label);
907
ANGLE_CAPTURE(ObjectPtrLabel, isCallValid, context, ptr, length, label);
911
void GL_APIENTRY PopDebugGroup()
913
Context *context = GetValidGlobalContext();
914
EVENT("glPopDebugGroup", "context = %d", CID(context));
918
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
919
bool isCallValid = (context->skipValidation() || ValidatePopDebugGroup(context));
922
context->popDebugGroup();
924
ANGLE_CAPTURE(PopDebugGroup, isCallValid, context);
928
void GL_APIENTRY PushDebugGroup(GLenum source, GLuint id, GLsizei length, const GLchar *message)
930
Context *context = GetValidGlobalContext();
931
EVENT("glPushDebugGroup",
932
"context = %d, GLenum source = %s, GLuint id = %u, GLsizei length = %d, const GLchar "
933
"*message = 0x%016" PRIxPTR "",
934
CID(context), GLenumToString(GLenumGroup::DebugSource, source), id, length,
939
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
940
bool isCallValid = (context->skipValidation() ||
941
ValidatePushDebugGroup(context, source, id, length, message));
944
context->pushDebugGroup(source, id, length, message);
946
ANGLE_CAPTURE(PushDebugGroup, isCallValid, context, source, id, length, message);
950
void GL_APIENTRY ShaderStorageBlockBinding(GLuint program,
951
GLuint storageBlockIndex,
952
GLuint storageBlockBinding)
954
Context *context = GetValidGlobalContext();
955
EVENT("glShaderStorageBlockBinding",
956
"context = %d, GLuint program = %u, GLuint storageBlockIndex = %u, GLuint "
957
"storageBlockBinding = %u",
958
CID(context), program, storageBlockIndex, storageBlockBinding);
962
ShaderProgramID programPacked = FromGL<ShaderProgramID>(program);
963
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
964
bool isCallValid = (context->skipValidation() ||
965
ValidateShaderStorageBlockBinding(
966
context, programPacked, storageBlockIndex, storageBlockBinding));
969
context->shaderStorageBlockBinding(programPacked, storageBlockIndex,
970
storageBlockBinding);
972
ANGLE_CAPTURE(ShaderStorageBlockBinding, isCallValid, context, programPacked,
973
storageBlockIndex, storageBlockBinding);
977
void GL_APIENTRY TexBufferRange(GLenum target,
978
GLenum internalformat,
983
Context *context = GetValidGlobalContext();
984
EVENT("glTexBufferRange",
985
"context = %d, GLenum target = %s, GLenum internalformat = %s, GLuint buffer = %u, "
986
"GLintptr offset = %llu, GLsizeiptr size = %llu",
987
CID(context), GLenumToString(GLenumGroup::TextureTarget, target),
988
GLenumToString(GLenumGroup::InternalFormat, internalformat), buffer,
989
static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size));
993
BufferID bufferPacked = FromGL<BufferID>(buffer);
994
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
996
(context->skipValidation() ||
997
ValidateTexBufferRange(context, target, internalformat, bufferPacked, offset, size));
1000
context->texBufferRange(target, internalformat, bufferPacked, offset, size);
1002
ANGLE_CAPTURE(TexBufferRange, isCallValid, context, target, internalformat, bufferPacked,
1007
void GL_APIENTRY TexStorage2DMultisample(GLenum target,
1009
GLenum internalformat,
1012
GLboolean fixedsamplelocations)
1014
Context *context = GetValidGlobalContext();
1015
EVENT("glTexStorage2DMultisample",
1016
"context = %d, GLenum target = %s, GLsizei samples = %d, GLenum internalformat = %s, "
1017
"GLsizei width = %d, GLsizei height = %d, GLboolean fixedsamplelocations = %s",
1018
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,
1019
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height,
1020
GLbooleanToString(fixedsamplelocations));
1024
TextureType targetPacked = FromGL<TextureType>(target);
1025
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1027
(context->skipValidation() ||
1028
ValidateTexStorage2DMultisample(context, targetPacked, samples, internalformat, width,
1029
height, fixedsamplelocations));
1032
context->texStorage2DMultisample(targetPacked, samples, internalformat, width, height,
1033
fixedsamplelocations);
1035
ANGLE_CAPTURE(TexStorage2DMultisample, isCallValid, context, targetPacked, samples,
1036
internalformat, width, height, fixedsamplelocations);
1040
void GL_APIENTRY TexStorage3DMultisample(GLenum target,
1042
GLenum internalformat,
1046
GLboolean fixedsamplelocations)
1048
Context *context = GetValidGlobalContext();
1049
EVENT("glTexStorage3DMultisample",
1050
"context = %d, GLenum target = %s, GLsizei samples = %d, GLenum internalformat = %s, "
1051
"GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLboolean "
1052
"fixedsamplelocations = %s",
1053
CID(context), GLenumToString(GLenumGroup::TextureTarget, target), samples,
1054
GLenumToString(GLenumGroup::InternalFormat, internalformat), width, height, depth,
1055
GLbooleanToString(fixedsamplelocations));
1059
TextureType targetPacked = FromGL<TextureType>(target);
1060
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1062
(context->skipValidation() ||
1063
ValidateTexStorage3DMultisample(context, targetPacked, samples, internalformat, width,
1064
height, depth, fixedsamplelocations));
1067
context->texStorage3DMultisample(targetPacked, samples, internalformat, width, height,
1068
depth, fixedsamplelocations);
1070
ANGLE_CAPTURE(TexStorage3DMultisample, isCallValid, context, targetPacked, samples,
1071
internalformat, width, height, depth, fixedsamplelocations);
1075
void GL_APIENTRY TextureView(GLuint texture,
1078
GLenum internalformat,
1084
Context *context = GetValidGlobalContext();
1085
EVENT("glTextureView",
1086
"context = %d, GLuint texture = %u, GLenum target = %s, GLuint origtexture = %u, GLenum "
1087
"internalformat = %s, GLuint minlevel = %u, GLuint numlevels = %u, GLuint minlayer = %u, "
1088
"GLuint numlayers = %u",
1089
CID(context), texture, GLenumToString(GLenumGroup::TextureTarget, target), origtexture,
1090
GLenumToString(GLenumGroup::InternalFormat, internalformat), minlevel, numlevels,
1091
minlayer, numlayers);
1095
TextureID texturePacked = FromGL<TextureID>(texture);
1096
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1098
(context->skipValidation() ||
1099
ValidateTextureView(context, texturePacked, target, origtexture, internalformat,
1100
minlevel, numlevels, minlayer, numlayers));
1103
context->textureView(texturePacked, target, origtexture, internalformat, minlevel,
1104
numlevels, minlayer, numlayers);
1106
ANGLE_CAPTURE(TextureView, isCallValid, context, texturePacked, target, origtexture,
1107
internalformat, minlevel, numlevels, minlayer, numlayers);
1111
void GL_APIENTRY VertexAttribBinding(GLuint attribindex, GLuint bindingindex)
1113
Context *context = GetValidGlobalContext();
1114
EVENT("glVertexAttribBinding",
1115
"context = %d, GLuint attribindex = %u, GLuint bindingindex = %u", CID(context),
1116
attribindex, bindingindex);
1120
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1121
bool isCallValid = (context->skipValidation() ||
1122
ValidateVertexAttribBinding(context, attribindex, bindingindex));
1125
context->vertexAttribBinding(attribindex, bindingindex);
1127
ANGLE_CAPTURE(VertexAttribBinding, isCallValid, context, attribindex, bindingindex);
1131
void GL_APIENTRY VertexAttribFormat(GLuint attribindex,
1134
GLboolean normalized,
1135
GLuint relativeoffset)
1137
Context *context = GetValidGlobalContext();
1138
EVENT("glVertexAttribFormat",
1139
"context = %d, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLboolean "
1140
"normalized = %s, GLuint relativeoffset = %u",
1141
CID(context), attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type),
1142
GLbooleanToString(normalized), relativeoffset);
1146
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
1147
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1148
bool isCallValid = (context->skipValidation() ||
1149
ValidateVertexAttribFormat(context, attribindex, size, typePacked,
1150
normalized, relativeoffset));
1153
context->vertexAttribFormat(attribindex, size, typePacked, normalized, relativeoffset);
1155
ANGLE_CAPTURE(VertexAttribFormat, isCallValid, context, attribindex, size, typePacked,
1156
normalized, relativeoffset);
1160
void GL_APIENTRY VertexAttribIFormat(GLuint attribindex,
1163
GLuint relativeoffset)
1165
Context *context = GetValidGlobalContext();
1166
EVENT("glVertexAttribIFormat",
1167
"context = %d, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLuint "
1168
"relativeoffset = %u",
1169
CID(context), attribindex, size, GLenumToString(GLenumGroup::DefaultGroup, type),
1174
VertexAttribType typePacked = FromGL<VertexAttribType>(type);
1175
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1177
(context->skipValidation() ||
1178
ValidateVertexAttribIFormat(context, attribindex, size, typePacked, relativeoffset));
1181
context->vertexAttribIFormat(attribindex, size, typePacked, relativeoffset);
1183
ANGLE_CAPTURE(VertexAttribIFormat, isCallValid, context, attribindex, size, typePacked,
1188
void GL_APIENTRY VertexAttribLFormat(GLuint attribindex,
1191
GLuint relativeoffset)
1193
Context *context = GetValidGlobalContext();
1194
EVENT("glVertexAttribLFormat",
1195
"context = %d, GLuint attribindex = %u, GLint size = %d, GLenum type = %s, GLuint "
1196
"relativeoffset = %u",
1197
CID(context), attribindex, size, GLenumToString(GLenumGroup::VertexAttribType, type),
1202
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1204
(context->skipValidation() ||
1205
ValidateVertexAttribLFormat(context, attribindex, size, type, relativeoffset));
1208
context->vertexAttribLFormat(attribindex, size, type, relativeoffset);
1210
ANGLE_CAPTURE(VertexAttribLFormat, isCallValid, context, attribindex, size, type,
1215
void GL_APIENTRY VertexBindingDivisor(GLuint bindingindex, GLuint divisor)
1217
Context *context = GetValidGlobalContext();
1218
EVENT("glVertexBindingDivisor", "context = %d, GLuint bindingindex = %u, GLuint divisor = %u",
1219
CID(context), bindingindex, divisor);
1223
std::unique_lock<std::mutex> shareContextLock = GetShareGroupLock(context);
1224
bool isCallValid = (context->skipValidation() ||
1225
ValidateVertexBindingDivisor(context, bindingindex, divisor));
1228
context->vertexBindingDivisor(bindingindex, divisor);
1230
ANGLE_CAPTURE(VertexBindingDivisor, isCallValid, context, bindingindex, divisor);