// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml.
//
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// entry_points_gl_4_5_autogen.cpp:
//   Defines the GL 4.5 entry points.

#include "libGL/entry_points_gl_4_5_autogen.h"

#include "libANGLE/Context.h"
#include "libANGLE/Context.inl.h"
#include "libANGLE/entry_points_utils.h"
#include "libANGLE/validationEGL.h"
#include "libANGLE/validationES.h"
#include "libANGLE/validationES1.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES3.h"
#include "libANGLE/validationES31.h"
#include "libANGLE/validationESEXT.h"
#include "libANGLE/validationGL45_autogen.h"
#include "libGLESv2/global_state.h"

namespace gl
{
void GL_APIENTRY BindTextureUnit(GLuint unit, GLuint texture)
{
    EVENT("(GLuint unit = %u, GLuint texture = %u)", unit, texture);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateBindTextureUnit(context, unit, texture));
        if (isCallValid)
        {
            context->bindTextureUnit(unit, texture);
        }
        ANGLE_CAPTURE(BindTextureUnit, isCallValid, context, unit, texture);
    }
}

void GL_APIENTRY BlitNamedFramebuffer(GLuint readFramebuffer,
                                      GLuint drawFramebuffer,
                                      GLint srcX0,
                                      GLint srcY0,
                                      GLint srcX1,
                                      GLint srcY1,
                                      GLint dstX0,
                                      GLint dstY0,
                                      GLint dstX1,
                                      GLint dstY1,
                                      GLbitfield mask,
                                      GLenum filter)
{
    EVENT(
        "(GLuint readFramebuffer = %u, GLuint drawFramebuffer = %u, GLint srcX0 = %d, GLint srcY0 "
        "= %d, GLint srcX1 = %d, GLint srcY1 = %d, GLint dstX0 = %d, GLint dstY0 = %d, GLint dstX1 "
        "= %d, GLint dstY1 = %d, GLbitfield mask = 0x%X, GLenum filter = 0x%X)",
        readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1,
        mask, filter);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateBlitNamedFramebuffer(context, readFramebuffer, drawFramebuffer, srcX0, srcY0,
                                          srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter));
        if (isCallValid)
        {
            context->blitNamedFramebuffer(readFramebuffer, drawFramebuffer, srcX0, srcY0, srcX1,
                                          srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
        }
        ANGLE_CAPTURE(BlitNamedFramebuffer, isCallValid, context, readFramebuffer, drawFramebuffer,
                      srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter);
    }
}

GLenum GL_APIENTRY CheckNamedFramebufferStatus(GLuint framebuffer, GLenum target)
{
    EVENT("(GLuint framebuffer = %u, GLenum target = 0x%X)", framebuffer, target);

    Context *context = GetValidGlobalContext();
    GLenum returnValue;
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateCheckNamedFramebufferStatus(context, framebuffer, target));
        if (isCallValid)
        {
            returnValue = context->checkNamedFramebufferStatus(framebuffer, target);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
        }
        ANGLE_CAPTURE(CheckNamedFramebufferStatus, isCallValid, context, framebuffer, target,
                      returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::CheckNamedFramebufferStatus, GLenum>();
    }
    return returnValue;
}

void GL_APIENTRY ClearNamedBufferData(GLuint buffer,
                                      GLenum internalformat,
                                      GLenum format,
                                      GLenum type,
                                      const void *data)
{
    EVENT(
        "(GLuint buffer = %u, GLenum internalformat = 0x%X, GLenum format = 0x%X, GLenum type = "
        "0x%X, const void *data = 0x%016" PRIxPTR ")",
        buffer, internalformat, format, type, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateClearNamedBufferData(context, buffer, internalformat, format, type, data));
        if (isCallValid)
        {
            context->clearNamedBufferData(buffer, internalformat, format, type, data);
        }
        ANGLE_CAPTURE(ClearNamedBufferData, isCallValid, context, buffer, internalformat, format,
                      type, data);
    }
}

void GL_APIENTRY ClearNamedBufferSubData(GLuint buffer,
                                         GLenum internalformat,
                                         GLintptr offset,
                                         GLsizeiptr size,
                                         GLenum format,
                                         GLenum type,
                                         const void *data)
{
    EVENT(
        "(GLuint buffer = %u, GLenum internalformat = 0x%X, GLintptr offset = %llu, GLsizeiptr "
        "size = %llu, GLenum format = 0x%X, GLenum type = 0x%X, const void *data = 0x%016" PRIxPTR
        ")",
        buffer, internalformat, static_cast<unsigned long long>(offset),
        static_cast<unsigned long long>(size), format, type, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateClearNamedBufferSubData(context, buffer, internalformat, offset,
                                                            size, format, type, data));
        if (isCallValid)
        {
            context->clearNamedBufferSubData(buffer, internalformat, offset, size, format, type,
                                             data);
        }
        ANGLE_CAPTURE(ClearNamedBufferSubData, isCallValid, context, buffer, internalformat, offset,
                      size, format, type, data);
    }
}

void GL_APIENTRY ClearNamedFramebufferfi(GLuint framebuffer,
                                         GLenum buffer,
                                         GLint drawbuffer,
                                         GLfloat depth,
                                         GLint stencil)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum buffer = 0x%X, GLint drawbuffer = %d, GLfloat depth = "
        "%f, GLint stencil = %d)",
        framebuffer, buffer, drawbuffer, depth, stencil);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateClearNamedFramebufferfi(context, framebuffer, buffer,
                                                            drawbuffer, depth, stencil));
        if (isCallValid)
        {
            context->clearNamedFramebufferfi(framebuffer, buffer, drawbuffer, depth, stencil);
        }
        ANGLE_CAPTURE(ClearNamedFramebufferfi, isCallValid, context, framebuffer, buffer,
                      drawbuffer, depth, stencil);
    }
}

void GL_APIENTRY ClearNamedFramebufferfv(GLuint framebuffer,
                                         GLenum buffer,
                                         GLint drawbuffer,
                                         const GLfloat *value)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLfloat "
        "*value = 0x%016" PRIxPTR ")",
        framebuffer, buffer, drawbuffer, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateClearNamedFramebufferfv(context, framebuffer, buffer, drawbuffer, value));
        if (isCallValid)
        {
            context->clearNamedFramebufferfv(framebuffer, buffer, drawbuffer, value);
        }
        ANGLE_CAPTURE(ClearNamedFramebufferfv, isCallValid, context, framebuffer, buffer,
                      drawbuffer, value);
    }
}

void GL_APIENTRY ClearNamedFramebufferiv(GLuint framebuffer,
                                         GLenum buffer,
                                         GLint drawbuffer,
                                         const GLint *value)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLint *value "
        "= 0x%016" PRIxPTR ")",
        framebuffer, buffer, drawbuffer, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateClearNamedFramebufferiv(context, framebuffer, buffer, drawbuffer, value));
        if (isCallValid)
        {
            context->clearNamedFramebufferiv(framebuffer, buffer, drawbuffer, value);
        }
        ANGLE_CAPTURE(ClearNamedFramebufferiv, isCallValid, context, framebuffer, buffer,
                      drawbuffer, value);
    }
}

void GL_APIENTRY ClearNamedFramebufferuiv(GLuint framebuffer,
                                          GLenum buffer,
                                          GLint drawbuffer,
                                          const GLuint *value)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum buffer = 0x%X, GLint drawbuffer = %d, const GLuint "
        "*value = 0x%016" PRIxPTR ")",
        framebuffer, buffer, drawbuffer, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateClearNamedFramebufferuiv(context, framebuffer, buffer, drawbuffer, value));
        if (isCallValid)
        {
            context->clearNamedFramebufferuiv(framebuffer, buffer, drawbuffer, value);
        }
        ANGLE_CAPTURE(ClearNamedFramebufferuiv, isCallValid, context, framebuffer, buffer,
                      drawbuffer, value);
    }
}

void GL_APIENTRY ClipControl(GLenum origin, GLenum depth)
{
    EVENT("(GLenum origin = 0x%X, GLenum depth = 0x%X)", origin, depth);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateClipControl(context, origin, depth));
        if (isCallValid)
        {
            context->clipControl(origin, depth);
        }
        ANGLE_CAPTURE(ClipControl, isCallValid, context, origin, depth);
    }
}

void GL_APIENTRY CompressedTextureSubImage1D(GLuint texture,
                                             GLint level,
                                             GLint xoffset,
                                             GLsizei width,
                                             GLenum format,
                                             GLsizei imageSize,
                                             const void *data)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLsizei width = %d, GLenum "
        "format = 0x%X, GLsizei imageSize = %d, const void *data = 0x%016" PRIxPTR ")",
        texture, level, xoffset, width, format, imageSize, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateCompressedTextureSubImage1D(context, texture, level, xoffset,
                                                                width, format, imageSize, data));
        if (isCallValid)
        {
            context->compressedTextureSubImage1D(texture, level, xoffset, width, format, imageSize,
                                                 data);
        }
        ANGLE_CAPTURE(CompressedTextureSubImage1D, isCallValid, context, texture, level, xoffset,
                      width, format, imageSize, data);
    }
}

void GL_APIENTRY CompressedTextureSubImage2D(GLuint texture,
                                             GLint level,
                                             GLint xoffset,
                                             GLint yoffset,
                                             GLsizei width,
                                             GLsizei height,
                                             GLenum format,
                                             GLsizei imageSize,
                                             const void *data)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
        "width = %d, GLsizei height = %d, GLenum format = 0x%X, GLsizei imageSize = %d, const void "
        "*data = 0x%016" PRIxPTR ")",
        texture, level, xoffset, yoffset, width, height, format, imageSize, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateCompressedTextureSubImage2D(context, texture, level, xoffset, yoffset, width,
                                                 height, format, imageSize, data));
        if (isCallValid)
        {
            context->compressedTextureSubImage2D(texture, level, xoffset, yoffset, width, height,
                                                 format, imageSize, data);
        }
        ANGLE_CAPTURE(CompressedTextureSubImage2D, isCallValid, context, texture, level, xoffset,
                      yoffset, width, height, format, imageSize, data);
    }
}

void GL_APIENTRY CompressedTextureSubImage3D(GLuint texture,
                                             GLint level,
                                             GLint xoffset,
                                             GLint yoffset,
                                             GLint zoffset,
                                             GLsizei width,
                                             GLsizei height,
                                             GLsizei depth,
                                             GLenum format,
                                             GLsizei imageSize,
                                             const void *data)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
        "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
        "= 0x%X, GLsizei imageSize = %d, const void *data = 0x%016" PRIxPTR ")",
        texture, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize,
        (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateCompressedTextureSubImage3D(context, texture, level, xoffset, yoffset, zoffset,
                                                 width, height, depth, format, imageSize, data));
        if (isCallValid)
        {
            context->compressedTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, width,
                                                 height, depth, format, imageSize, data);
        }
        ANGLE_CAPTURE(CompressedTextureSubImage3D, isCallValid, context, texture, level, xoffset,
                      yoffset, zoffset, width, height, depth, format, imageSize, data);
    }
}

void GL_APIENTRY CopyNamedBufferSubData(GLuint readBuffer,
                                        GLuint writeBuffer,
                                        GLintptr readOffset,
                                        GLintptr writeOffset,
                                        GLsizeiptr size)
{
    EVENT(
        "(GLuint readBuffer = %u, GLuint writeBuffer = %u, GLintptr readOffset = %llu, GLintptr "
        "writeOffset = %llu, GLsizeiptr size = %llu)",
        readBuffer, writeBuffer, static_cast<unsigned long long>(readOffset),
        static_cast<unsigned long long>(writeOffset), static_cast<unsigned long long>(size));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateCopyNamedBufferSubData(context, readBuffer, writeBuffer,
                                                           readOffset, writeOffset, size));
        if (isCallValid)
        {
            context->copyNamedBufferSubData(readBuffer, writeBuffer, readOffset, writeOffset, size);
        }
        ANGLE_CAPTURE(CopyNamedBufferSubData, isCallValid, context, readBuffer, writeBuffer,
                      readOffset, writeOffset, size);
    }
}

void GL_APIENTRY
CopyTextureSubImage1D(GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint x = %d, GLint y = %d, "
        "GLsizei width = %d)",
        texture, level, xoffset, x, y, width);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateCopyTextureSubImage1D(context, texture, level, xoffset, x, y, width));
        if (isCallValid)
        {
            context->copyTextureSubImage1D(texture, level, xoffset, x, y, width);
        }
        ANGLE_CAPTURE(CopyTextureSubImage1D, isCallValid, context, texture, level, xoffset, x, y,
                      width);
    }
}

void GL_APIENTRY CopyTextureSubImage2D(GLuint texture,
                                       GLint level,
                                       GLint xoffset,
                                       GLint yoffset,
                                       GLint x,
                                       GLint y,
                                       GLsizei width,
                                       GLsizei height)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint x = "
        "%d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
        texture, level, xoffset, yoffset, x, y, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateCopyTextureSubImage2D(context, texture, level, xoffset, yoffset,
                                                          x, y, width, height));
        if (isCallValid)
        {
            context->copyTextureSubImage2D(texture, level, xoffset, yoffset, x, y, width, height);
        }
        ANGLE_CAPTURE(CopyTextureSubImage2D, isCallValid, context, texture, level, xoffset, yoffset,
                      x, y, width, height);
    }
}

void GL_APIENTRY CopyTextureSubImage3D(GLuint texture,
                                       GLint level,
                                       GLint xoffset,
                                       GLint yoffset,
                                       GLint zoffset,
                                       GLint x,
                                       GLint y,
                                       GLsizei width,
                                       GLsizei height)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
        "zoffset = %d, GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
        texture, level, xoffset, yoffset, zoffset, x, y, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateCopyTextureSubImage3D(context, texture, level, xoffset, yoffset,
                                                          zoffset, x, y, width, height));
        if (isCallValid)
        {
            context->copyTextureSubImage3D(texture, level, xoffset, yoffset, zoffset, x, y, width,
                                           height);
        }
        ANGLE_CAPTURE(CopyTextureSubImage3D, isCallValid, context, texture, level, xoffset, yoffset,
                      zoffset, x, y, width, height);
    }
}

void GL_APIENTRY CreateBuffers(GLsizei n, GLuint *buffers)
{
    EVENT("(GLsizei n = %d, GLuint *buffers = 0x%016" PRIxPTR ")", n, (uintptr_t)buffers);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateBuffers(context, n, buffers));
        if (isCallValid)
        {
            context->createBuffers(n, buffers);
        }
        ANGLE_CAPTURE(CreateBuffers, isCallValid, context, n, buffers);
    }
}

void GL_APIENTRY CreateFramebuffers(GLsizei n, GLuint *framebuffers)
{
    EVENT("(GLsizei n = %d, GLuint *framebuffers = 0x%016" PRIxPTR ")", n, (uintptr_t)framebuffers);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateFramebuffers(context, n, framebuffers));
        if (isCallValid)
        {
            context->createFramebuffers(n, framebuffers);
        }
        ANGLE_CAPTURE(CreateFramebuffers, isCallValid, context, n, framebuffers);
    }
}

void GL_APIENTRY CreateProgramPipelines(GLsizei n, GLuint *pipelines)
{
    EVENT("(GLsizei n = %d, GLuint *pipelines = 0x%016" PRIxPTR ")", n, (uintptr_t)pipelines);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateProgramPipelines(context, n, pipelines));
        if (isCallValid)
        {
            context->createProgramPipelines(n, pipelines);
        }
        ANGLE_CAPTURE(CreateProgramPipelines, isCallValid, context, n, pipelines);
    }
}

void GL_APIENTRY CreateQueries(GLenum target, GLsizei n, GLuint *ids)
{
    EVENT("(GLenum target = 0x%X, GLsizei n = %d, GLuint *ids = 0x%016" PRIxPTR ")", target, n,
          (uintptr_t)ids);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateQueries(context, target, n, ids));
        if (isCallValid)
        {
            context->createQueries(target, n, ids);
        }
        ANGLE_CAPTURE(CreateQueries, isCallValid, context, target, n, ids);
    }
}

void GL_APIENTRY CreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
{
    EVENT("(GLsizei n = %d, GLuint *renderbuffers = 0x%016" PRIxPTR ")", n,
          (uintptr_t)renderbuffers);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        RenderbufferID *renderbuffersPacked = FromGL<RenderbufferID *>(renderbuffers);
        bool isCallValid                    = (context->skipValidation() ||
                            ValidateCreateRenderbuffers(context, n, renderbuffersPacked));
        if (isCallValid)
        {
            context->createRenderbuffers(n, renderbuffersPacked);
        }
        ANGLE_CAPTURE(CreateRenderbuffers, isCallValid, context, n, renderbuffersPacked);
    }
}

void GL_APIENTRY CreateSamplers(GLsizei n, GLuint *samplers)
{
    EVENT("(GLsizei n = %d, GLuint *samplers = 0x%016" PRIxPTR ")", n, (uintptr_t)samplers);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateSamplers(context, n, samplers));
        if (isCallValid)
        {
            context->createSamplers(n, samplers);
        }
        ANGLE_CAPTURE(CreateSamplers, isCallValid, context, n, samplers);
    }
}

void GL_APIENTRY CreateTextures(GLenum target, GLsizei n, GLuint *textures)
{
    EVENT("(GLenum target = 0x%X, GLsizei n = %d, GLuint *textures = 0x%016" PRIxPTR ")", target, n,
          (uintptr_t)textures);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateTextures(context, target, n, textures));
        if (isCallValid)
        {
            context->createTextures(target, n, textures);
        }
        ANGLE_CAPTURE(CreateTextures, isCallValid, context, target, n, textures);
    }
}

void GL_APIENTRY CreateTransformFeedbacks(GLsizei n, GLuint *ids)
{
    EVENT("(GLsizei n = %d, GLuint *ids = 0x%016" PRIxPTR ")", n, (uintptr_t)ids);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateTransformFeedbacks(context, n, ids));
        if (isCallValid)
        {
            context->createTransformFeedbacks(n, ids);
        }
        ANGLE_CAPTURE(CreateTransformFeedbacks, isCallValid, context, n, ids);
    }
}

void GL_APIENTRY CreateVertexArrays(GLsizei n, GLuint *arrays)
{
    EVENT("(GLsizei n = %d, GLuint *arrays = 0x%016" PRIxPTR ")", n, (uintptr_t)arrays);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateCreateVertexArrays(context, n, arrays));
        if (isCallValid)
        {
            context->createVertexArrays(n, arrays);
        }
        ANGLE_CAPTURE(CreateVertexArrays, isCallValid, context, n, arrays);
    }
}

void GL_APIENTRY DisableVertexArrayAttrib(GLuint vaobj, GLuint index)
{
    EVENT("(GLuint vaobj = %u, GLuint index = %u)", vaobj, index);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateDisableVertexArrayAttrib(context, vaobj, index));
        if (isCallValid)
        {
            context->disableVertexArrayAttrib(vaobj, index);
        }
        ANGLE_CAPTURE(DisableVertexArrayAttrib, isCallValid, context, vaobj, index);
    }
}

void GL_APIENTRY EnableVertexArrayAttrib(GLuint vaobj, GLuint index)
{
    EVENT("(GLuint vaobj = %u, GLuint index = %u)", vaobj, index);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateEnableVertexArrayAttrib(context, vaobj, index));
        if (isCallValid)
        {
            context->enableVertexArrayAttrib(vaobj, index);
        }
        ANGLE_CAPTURE(EnableVertexArrayAttrib, isCallValid, context, vaobj, index);
    }
}

void GL_APIENTRY FlushMappedNamedBufferRange(GLuint buffer, GLintptr offset, GLsizeiptr length)
{
    EVENT("(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu)", buffer,
          static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateFlushMappedNamedBufferRange(context, buffer, offset, length));
        if (isCallValid)
        {
            context->flushMappedNamedBufferRange(buffer, offset, length);
        }
        ANGLE_CAPTURE(FlushMappedNamedBufferRange, isCallValid, context, buffer, offset, length);
    }
}

void GL_APIENTRY GenerateTextureMipmap(GLuint texture)
{
    EVENT("(GLuint texture = %u)", texture);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGenerateTextureMipmap(context, texture));
        if (isCallValid)
        {
            context->generateTextureMipmap(texture);
        }
        ANGLE_CAPTURE(GenerateTextureMipmap, isCallValid, context, texture);
    }
}

void GL_APIENTRY GetCompressedTextureImage(GLuint texture,
                                           GLint level,
                                           GLsizei bufSize,
                                           void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLsizei bufSize = %d, void *pixels = "
        "0x%016" PRIxPTR ")",
        texture, level, bufSize, (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetCompressedTextureImage(context, texture, level, bufSize, pixels));
        if (isCallValid)
        {
            context->getCompressedTextureImage(texture, level, bufSize, pixels);
        }
        ANGLE_CAPTURE(GetCompressedTextureImage, isCallValid, context, texture, level, bufSize,
                      pixels);
    }
}

void GL_APIENTRY GetCompressedTextureSubImage(GLuint texture,
                                              GLint level,
                                              GLint xoffset,
                                              GLint yoffset,
                                              GLint zoffset,
                                              GLsizei width,
                                              GLsizei height,
                                              GLsizei depth,
                                              GLsizei bufSize,
                                              void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
        "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLsizei "
        "bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
        texture, level, xoffset, yoffset, zoffset, width, height, depth, bufSize,
        (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetCompressedTextureSubImage(context, texture, level, xoffset, yoffset,
                                                  zoffset, width, height, depth, bufSize, pixels));
        if (isCallValid)
        {
            context->getCompressedTextureSubImage(texture, level, xoffset, yoffset, zoffset, width,
                                                  height, depth, bufSize, pixels);
        }
        ANGLE_CAPTURE(GetCompressedTextureSubImage, isCallValid, context, texture, level, xoffset,
                      yoffset, zoffset, width, height, depth, bufSize, pixels);
    }
}

GLenum GL_APIENTRY GetGraphicsResetStatus()
{
    EVENT("()");

    Context *context = GetGlobalContext();
    GLenum returnValue;
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateGetGraphicsResetStatus(context));
        if (isCallValid)
        {
            returnValue = context->getGraphicsResetStatus();
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatus, GLenum>();
        }
        ANGLE_CAPTURE(GetGraphicsResetStatus, isCallValid, context, returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::GetGraphicsResetStatus, GLenum>();
    }
    return returnValue;
}

void GL_APIENTRY GetNamedBufferParameteri64v(GLuint buffer, GLenum pname, GLint64 *params)
{
    EVENT("(GLuint buffer = %u, GLenum pname = 0x%X, GLint64 *params = 0x%016" PRIxPTR ")", buffer,
          pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetNamedBufferParameteri64v(context, buffer, pname, params));
        if (isCallValid)
        {
            context->getNamedBufferParameteri64v(buffer, pname, params);
        }
        ANGLE_CAPTURE(GetNamedBufferParameteri64v, isCallValid, context, buffer, pname, params);
    }
}

void GL_APIENTRY GetNamedBufferParameteriv(GLuint buffer, GLenum pname, GLint *params)
{
    EVENT("(GLuint buffer = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", buffer,
          pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetNamedBufferParameteriv(context, buffer, pname, params));
        if (isCallValid)
        {
            context->getNamedBufferParameteriv(buffer, pname, params);
        }
        ANGLE_CAPTURE(GetNamedBufferParameteriv, isCallValid, context, buffer, pname, params);
    }
}

void GL_APIENTRY GetNamedBufferPointerv(GLuint buffer, GLenum pname, void **params)
{
    EVENT("(GLuint buffer = %u, GLenum pname = 0x%X, void **params = 0x%016" PRIxPTR ")", buffer,
          pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetNamedBufferPointerv(context, buffer, pname, params));
        if (isCallValid)
        {
            context->getNamedBufferPointerv(buffer, pname, params);
        }
        ANGLE_CAPTURE(GetNamedBufferPointerv, isCallValid, context, buffer, pname, params);
    }
}

void GL_APIENTRY GetNamedBufferSubData(GLuint buffer, GLintptr offset, GLsizeiptr size, void *data)
{
    EVENT(
        "(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr size = %llu, void *data = "
        "0x%016" PRIxPTR ")",
        buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
        (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetNamedBufferSubData(context, buffer, offset, size, data));
        if (isCallValid)
        {
            context->getNamedBufferSubData(buffer, offset, size, data);
        }
        ANGLE_CAPTURE(GetNamedBufferSubData, isCallValid, context, buffer, offset, size, data);
    }
}

void GL_APIENTRY GetNamedFramebufferAttachmentParameteriv(GLuint framebuffer,
                                                          GLenum attachment,
                                                          GLenum pname,
                                                          GLint *params)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum attachment = 0x%X, GLenum pname = 0x%X, GLint *params = "
        "0x%016" PRIxPTR ")",
        framebuffer, attachment, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetNamedFramebufferAttachmentParameteriv(
                                              context, framebuffer, attachment, pname, params));
        if (isCallValid)
        {
            context->getNamedFramebufferAttachmentParameteriv(framebuffer, attachment, pname,
                                                              params);
        }
        ANGLE_CAPTURE(GetNamedFramebufferAttachmentParameteriv, isCallValid, context, framebuffer,
                      attachment, pname, params);
    }
}

void GL_APIENTRY GetNamedFramebufferParameteriv(GLuint framebuffer, GLenum pname, GLint *param)
{
    EVENT("(GLuint framebuffer = %u, GLenum pname = 0x%X, GLint *param = 0x%016" PRIxPTR ")",
          framebuffer, pname, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateGetNamedFramebufferParameteriv(
                                                             context, framebuffer, pname, param));
        if (isCallValid)
        {
            context->getNamedFramebufferParameteriv(framebuffer, pname, param);
        }
        ANGLE_CAPTURE(GetNamedFramebufferParameteriv, isCallValid, context, framebuffer, pname,
                      param);
    }
}

void GL_APIENTRY GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, GLint *params)
{
    EVENT("(GLuint renderbuffer = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")",
          renderbuffer, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetNamedRenderbufferParameteriv(context, renderbufferPacked, pname, params));
        if (isCallValid)
        {
            context->getNamedRenderbufferParameteriv(renderbufferPacked, pname, params);
        }
        ANGLE_CAPTURE(GetNamedRenderbufferParameteriv, isCallValid, context, renderbufferPacked,
                      pname, params);
    }
}

void GL_APIENTRY GetQueryBufferObjecti64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
{
    EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = 0x%X, GLintptr offset = %llu)", id,
          buffer, pname, static_cast<unsigned long long>(offset));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetQueryBufferObjecti64v(context, id, buffer, pname, offset));
        if (isCallValid)
        {
            context->getQueryBufferObjecti64v(id, buffer, pname, offset);
        }
        ANGLE_CAPTURE(GetQueryBufferObjecti64v, isCallValid, context, id, buffer, pname, offset);
    }
}

void GL_APIENTRY GetQueryBufferObjectiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
{
    EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = 0x%X, GLintptr offset = %llu)", id,
          buffer, pname, static_cast<unsigned long long>(offset));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetQueryBufferObjectiv(context, id, buffer, pname, offset));
        if (isCallValid)
        {
            context->getQueryBufferObjectiv(id, buffer, pname, offset);
        }
        ANGLE_CAPTURE(GetQueryBufferObjectiv, isCallValid, context, id, buffer, pname, offset);
    }
}

void GL_APIENTRY GetQueryBufferObjectui64v(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
{
    EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = 0x%X, GLintptr offset = %llu)", id,
          buffer, pname, static_cast<unsigned long long>(offset));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetQueryBufferObjectui64v(context, id, buffer, pname, offset));
        if (isCallValid)
        {
            context->getQueryBufferObjectui64v(id, buffer, pname, offset);
        }
        ANGLE_CAPTURE(GetQueryBufferObjectui64v, isCallValid, context, id, buffer, pname, offset);
    }
}

void GL_APIENTRY GetQueryBufferObjectuiv(GLuint id, GLuint buffer, GLenum pname, GLintptr offset)
{
    EVENT("(GLuint id = %u, GLuint buffer = %u, GLenum pname = 0x%X, GLintptr offset = %llu)", id,
          buffer, pname, static_cast<unsigned long long>(offset));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetQueryBufferObjectuiv(context, id, buffer, pname, offset));
        if (isCallValid)
        {
            context->getQueryBufferObjectuiv(id, buffer, pname, offset);
        }
        ANGLE_CAPTURE(GetQueryBufferObjectuiv, isCallValid, context, id, buffer, pname, offset);
    }
}

void GL_APIENTRY GetTextureImage(GLuint texture,
                                 GLint level,
                                 GLenum format,
                                 GLenum type,
                                 GLsizei bufSize,
                                 void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLenum format = 0x%X, GLenum type = 0x%X, GLsizei "
        "bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
        texture, level, format, type, bufSize, (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetTextureImage(context, texture, level, format, type, bufSize, pixels));
        if (isCallValid)
        {
            context->getTextureImage(texture, level, format, type, bufSize, pixels);
        }
        ANGLE_CAPTURE(GetTextureImage, isCallValid, context, texture, level, format, type, bufSize,
                      pixels);
    }
}

void GL_APIENTRY GetTextureLevelParameterfv(GLuint texture,
                                            GLint level,
                                            GLenum pname,
                                            GLfloat *params)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLenum pname = 0x%X, GLfloat *params = "
        "0x%016" PRIxPTR ")",
        texture, level, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetTextureLevelParameterfv(context, texture, level, pname, params));
        if (isCallValid)
        {
            context->getTextureLevelParameterfv(texture, level, pname, params);
        }
        ANGLE_CAPTURE(GetTextureLevelParameterfv, isCallValid, context, texture, level, pname,
                      params);
    }
}

void GL_APIENTRY GetTextureLevelParameteriv(GLuint texture,
                                            GLint level,
                                            GLenum pname,
                                            GLint *params)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLenum pname = 0x%X, GLint *params = "
        "0x%016" PRIxPTR ")",
        texture, level, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetTextureLevelParameteriv(context, texture, level, pname, params));
        if (isCallValid)
        {
            context->getTextureLevelParameteriv(texture, level, pname, params);
        }
        ANGLE_CAPTURE(GetTextureLevelParameteriv, isCallValid, context, texture, level, pname,
                      params);
    }
}

void GL_APIENTRY GetTextureParameterIiv(GLuint texture, GLenum pname, GLint *params)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", texture,
          pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTextureParameterIiv(context, texture, pname, params));
        if (isCallValid)
        {
            context->getTextureParameterIiv(texture, pname, params);
        }
        ANGLE_CAPTURE(GetTextureParameterIiv, isCallValid, context, texture, pname, params);
    }
}

void GL_APIENTRY GetTextureParameterIuiv(GLuint texture, GLenum pname, GLuint *params)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, GLuint *params = 0x%016" PRIxPTR ")", texture,
          pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTextureParameterIuiv(context, texture, pname, params));
        if (isCallValid)
        {
            context->getTextureParameterIuiv(texture, pname, params);
        }
        ANGLE_CAPTURE(GetTextureParameterIuiv, isCallValid, context, texture, pname, params);
    }
}

void GL_APIENTRY GetTextureParameterfv(GLuint texture, GLenum pname, GLfloat *params)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, GLfloat *params = 0x%016" PRIxPTR ")",
          texture, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTextureParameterfv(context, texture, pname, params));
        if (isCallValid)
        {
            context->getTextureParameterfv(texture, pname, params);
        }
        ANGLE_CAPTURE(GetTextureParameterfv, isCallValid, context, texture, pname, params);
    }
}

void GL_APIENTRY GetTextureParameteriv(GLuint texture, GLenum pname, GLint *params)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, GLint *params = 0x%016" PRIxPTR ")", texture,
          pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTextureParameteriv(context, texture, pname, params));
        if (isCallValid)
        {
            context->getTextureParameteriv(texture, pname, params);
        }
        ANGLE_CAPTURE(GetTextureParameteriv, isCallValid, context, texture, pname, params);
    }
}

void GL_APIENTRY GetTextureSubImage(GLuint texture,
                                    GLint level,
                                    GLint xoffset,
                                    GLint yoffset,
                                    GLint zoffset,
                                    GLsizei width,
                                    GLsizei height,
                                    GLsizei depth,
                                    GLenum format,
                                    GLenum type,
                                    GLsizei bufSize,
                                    void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
        "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
        "= 0x%X, GLenum type = 0x%X, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
        texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, bufSize,
        (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetTextureSubImage(context, texture, level, xoffset, yoffset, zoffset, width,
                                        height, depth, format, type, bufSize, pixels));
        if (isCallValid)
        {
            context->getTextureSubImage(texture, level, xoffset, yoffset, zoffset, width, height,
                                        depth, format, type, bufSize, pixels);
        }
        ANGLE_CAPTURE(GetTextureSubImage, isCallValid, context, texture, level, xoffset, yoffset,
                      zoffset, width, height, depth, format, type, bufSize, pixels);
    }
}

void GL_APIENTRY GetTransformFeedbacki64_v(GLuint xfb, GLenum pname, GLuint index, GLint64 *param)
{
    EVENT(
        "(GLuint xfb = %u, GLenum pname = 0x%X, GLuint index = %u, GLint64 *param = 0x%016" PRIxPTR
        ")",
        xfb, pname, index, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTransformFeedbacki64_v(context, xfb, pname, index, param));
        if (isCallValid)
        {
            context->getTransformFeedbacki64_v(xfb, pname, index, param);
        }
        ANGLE_CAPTURE(GetTransformFeedbacki64_v, isCallValid, context, xfb, pname, index, param);
    }
}

void GL_APIENTRY GetTransformFeedbacki_v(GLuint xfb, GLenum pname, GLuint index, GLint *param)
{
    EVENT("(GLuint xfb = %u, GLenum pname = 0x%X, GLuint index = %u, GLint *param = 0x%016" PRIxPTR
          ")",
          xfb, pname, index, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTransformFeedbacki_v(context, xfb, pname, index, param));
        if (isCallValid)
        {
            context->getTransformFeedbacki_v(xfb, pname, index, param);
        }
        ANGLE_CAPTURE(GetTransformFeedbacki_v, isCallValid, context, xfb, pname, index, param);
    }
}

void GL_APIENTRY GetTransformFeedbackiv(GLuint xfb, GLenum pname, GLint *param)
{
    EVENT("(GLuint xfb = %u, GLenum pname = 0x%X, GLint *param = 0x%016" PRIxPTR ")", xfb, pname,
          (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetTransformFeedbackiv(context, xfb, pname, param));
        if (isCallValid)
        {
            context->getTransformFeedbackiv(xfb, pname, param);
        }
        ANGLE_CAPTURE(GetTransformFeedbackiv, isCallValid, context, xfb, pname, param);
    }
}

void GL_APIENTRY GetVertexArrayIndexed64iv(GLuint vaobj, GLuint index, GLenum pname, GLint64 *param)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint index = %u, GLenum pname = 0x%X, GLint64 *param = "
        "0x%016" PRIxPTR ")",
        vaobj, index, pname, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetVertexArrayIndexed64iv(context, vaobj, index, pname, param));
        if (isCallValid)
        {
            context->getVertexArrayIndexed64iv(vaobj, index, pname, param);
        }
        ANGLE_CAPTURE(GetVertexArrayIndexed64iv, isCallValid, context, vaobj, index, pname, param);
    }
}

void GL_APIENTRY GetVertexArrayIndexediv(GLuint vaobj, GLuint index, GLenum pname, GLint *param)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint index = %u, GLenum pname = 0x%X, GLint *param = 0x%016" PRIxPTR
        ")",
        vaobj, index, pname, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetVertexArrayIndexediv(context, vaobj, index, pname, param));
        if (isCallValid)
        {
            context->getVertexArrayIndexediv(vaobj, index, pname, param);
        }
        ANGLE_CAPTURE(GetVertexArrayIndexediv, isCallValid, context, vaobj, index, pname, param);
    }
}

void GL_APIENTRY GetVertexArrayiv(GLuint vaobj, GLenum pname, GLint *param)
{
    EVENT("(GLuint vaobj = %u, GLenum pname = 0x%X, GLint *param = 0x%016" PRIxPTR ")", vaobj,
          pname, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetVertexArrayiv(context, vaobj, pname, param));
        if (isCallValid)
        {
            context->getVertexArrayiv(vaobj, pname, param);
        }
        ANGLE_CAPTURE(GetVertexArrayiv, isCallValid, context, vaobj, pname, param);
    }
}

void GL_APIENTRY
GetnColorTable(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *table)
{
    EVENT(
        "(GLenum target = 0x%X, GLenum format = 0x%X, GLenum type = 0x%X, GLsizei bufSize = %d, "
        "void *table = 0x%016" PRIxPTR ")",
        target, format, type, bufSize, (uintptr_t)table);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnColorTable(context, target, format, type, bufSize, table));
        if (isCallValid)
        {
            context->getnColorTable(target, format, type, bufSize, table);
        }
        ANGLE_CAPTURE(GetnColorTable, isCallValid, context, target, format, type, bufSize, table);
    }
}

void GL_APIENTRY GetnCompressedTexImage(GLenum target, GLint lod, GLsizei bufSize, void *pixels)
{
    EVENT(
        "(GLenum target = 0x%X, GLint lod = %d, GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR
        ")",
        target, lod, bufSize, (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnCompressedTexImage(context, target, lod, bufSize, pixels));
        if (isCallValid)
        {
            context->getnCompressedTexImage(target, lod, bufSize, pixels);
        }
        ANGLE_CAPTURE(GetnCompressedTexImage, isCallValid, context, target, lod, bufSize, pixels);
    }
}

void GL_APIENTRY
GetnConvolutionFilter(GLenum target, GLenum format, GLenum type, GLsizei bufSize, void *image)
{
    EVENT(
        "(GLenum target = 0x%X, GLenum format = 0x%X, GLenum type = 0x%X, GLsizei bufSize = %d, "
        "void *image = 0x%016" PRIxPTR ")",
        target, format, type, bufSize, (uintptr_t)image);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetnConvolutionFilter(context, target, format, type, bufSize, image));
        if (isCallValid)
        {
            context->getnConvolutionFilter(target, format, type, bufSize, image);
        }
        ANGLE_CAPTURE(GetnConvolutionFilter, isCallValid, context, target, format, type, bufSize,
                      image);
    }
}

void GL_APIENTRY GetnHistogram(GLenum target,
                               GLboolean reset,
                               GLenum format,
                               GLenum type,
                               GLsizei bufSize,
                               void *values)
{
    EVENT(
        "(GLenum target = 0x%X, GLboolean reset = %u, GLenum format = 0x%X, GLenum type = 0x%X, "
        "GLsizei bufSize = %d, void *values = 0x%016" PRIxPTR ")",
        target, reset, format, type, bufSize, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetnHistogram(context, target, reset, format, type, bufSize, values));
        if (isCallValid)
        {
            context->getnHistogram(target, reset, format, type, bufSize, values);
        }
        ANGLE_CAPTURE(GetnHistogram, isCallValid, context, target, reset, format, type, bufSize,
                      values);
    }
}

void GL_APIENTRY GetnMapdv(GLenum target, GLenum query, GLsizei bufSize, GLdouble *v)
{
    EVENT(
        "(GLenum target = 0x%X, GLenum query = 0x%X, GLsizei bufSize = %d, GLdouble *v = "
        "0x%016" PRIxPTR ")",
        target, query, bufSize, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnMapdv(context, target, query, bufSize, v));
        if (isCallValid)
        {
            context->getnMapdv(target, query, bufSize, v);
        }
        ANGLE_CAPTURE(GetnMapdv, isCallValid, context, target, query, bufSize, v);
    }
}

void GL_APIENTRY GetnMapfv(GLenum target, GLenum query, GLsizei bufSize, GLfloat *v)
{
    EVENT(
        "(GLenum target = 0x%X, GLenum query = 0x%X, GLsizei bufSize = %d, GLfloat *v = "
        "0x%016" PRIxPTR ")",
        target, query, bufSize, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnMapfv(context, target, query, bufSize, v));
        if (isCallValid)
        {
            context->getnMapfv(target, query, bufSize, v);
        }
        ANGLE_CAPTURE(GetnMapfv, isCallValid, context, target, query, bufSize, v);
    }
}

void GL_APIENTRY GetnMapiv(GLenum target, GLenum query, GLsizei bufSize, GLint *v)
{
    EVENT(
        "(GLenum target = 0x%X, GLenum query = 0x%X, GLsizei bufSize = %d, GLint *v = "
        "0x%016" PRIxPTR ")",
        target, query, bufSize, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnMapiv(context, target, query, bufSize, v));
        if (isCallValid)
        {
            context->getnMapiv(target, query, bufSize, v);
        }
        ANGLE_CAPTURE(GetnMapiv, isCallValid, context, target, query, bufSize, v);
    }
}

void GL_APIENTRY GetnMinmax(GLenum target,
                            GLboolean reset,
                            GLenum format,
                            GLenum type,
                            GLsizei bufSize,
                            void *values)
{
    EVENT(
        "(GLenum target = 0x%X, GLboolean reset = %u, GLenum format = 0x%X, GLenum type = 0x%X, "
        "GLsizei bufSize = %d, void *values = 0x%016" PRIxPTR ")",
        target, reset, format, type, bufSize, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetnMinmax(context, target, reset, format, type, bufSize, values));
        if (isCallValid)
        {
            context->getnMinmax(target, reset, format, type, bufSize, values);
        }
        ANGLE_CAPTURE(GetnMinmax, isCallValid, context, target, reset, format, type, bufSize,
                      values);
    }
}

void GL_APIENTRY GetnPixelMapfv(GLenum map, GLsizei bufSize, GLfloat *values)
{
    EVENT("(GLenum map = 0x%X, GLsizei bufSize = %d, GLfloat *values = 0x%016" PRIxPTR ")", map,
          bufSize, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnPixelMapfv(context, map, bufSize, values));
        if (isCallValid)
        {
            context->getnPixelMapfv(map, bufSize, values);
        }
        ANGLE_CAPTURE(GetnPixelMapfv, isCallValid, context, map, bufSize, values);
    }
}

void GL_APIENTRY GetnPixelMapuiv(GLenum map, GLsizei bufSize, GLuint *values)
{
    EVENT("(GLenum map = 0x%X, GLsizei bufSize = %d, GLuint *values = 0x%016" PRIxPTR ")", map,
          bufSize, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnPixelMapuiv(context, map, bufSize, values));
        if (isCallValid)
        {
            context->getnPixelMapuiv(map, bufSize, values);
        }
        ANGLE_CAPTURE(GetnPixelMapuiv, isCallValid, context, map, bufSize, values);
    }
}

void GL_APIENTRY GetnPixelMapusv(GLenum map, GLsizei bufSize, GLushort *values)
{
    EVENT("(GLenum map = 0x%X, GLsizei bufSize = %d, GLushort *values = 0x%016" PRIxPTR ")", map,
          bufSize, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnPixelMapusv(context, map, bufSize, values));
        if (isCallValid)
        {
            context->getnPixelMapusv(map, bufSize, values);
        }
        ANGLE_CAPTURE(GetnPixelMapusv, isCallValid, context, map, bufSize, values);
    }
}

void GL_APIENTRY GetnPolygonStipple(GLsizei bufSize, GLubyte *pattern)
{
    EVENT("(GLsizei bufSize = %d, GLubyte *pattern = 0x%016" PRIxPTR ")", bufSize,
          (uintptr_t)pattern);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetnPolygonStipple(context, bufSize, pattern));
        if (isCallValid)
        {
            context->getnPolygonStipple(bufSize, pattern);
        }
        ANGLE_CAPTURE(GetnPolygonStipple, isCallValid, context, bufSize, pattern);
    }
}

void GL_APIENTRY GetnSeparableFilter(GLenum target,
                                     GLenum format,
                                     GLenum type,
                                     GLsizei rowBufSize,
                                     void *row,
                                     GLsizei columnBufSize,
                                     void *column,
                                     void *span)
{
    EVENT(
        "(GLenum target = 0x%X, GLenum format = 0x%X, GLenum type = 0x%X, GLsizei rowBufSize = %d, "
        "void *row = 0x%016" PRIxPTR ", GLsizei columnBufSize = %d, void *column = 0x%016" PRIxPTR
        ", void *span = 0x%016" PRIxPTR ")",
        target, format, type, rowBufSize, (uintptr_t)row, columnBufSize, (uintptr_t)column,
        (uintptr_t)span);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnSeparableFilter(context, target, format, type, rowBufSize,
                                                        row, columnBufSize, column, span));
        if (isCallValid)
        {
            context->getnSeparableFilter(target, format, type, rowBufSize, row, columnBufSize,
                                         column, span);
        }
        ANGLE_CAPTURE(GetnSeparableFilter, isCallValid, context, target, format, type, rowBufSize,
                      row, columnBufSize, column, span);
    }
}

void GL_APIENTRY
GetnTexImage(GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels)
{
    EVENT(
        "(GLenum target = 0x%X, GLint level = %d, GLenum format = 0x%X, GLenum type = 0x%X, "
        "GLsizei bufSize = %d, void *pixels = 0x%016" PRIxPTR ")",
        target, level, format, type, bufSize, (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetnTexImage(context, target, level, format, type, bufSize, pixels));
        if (isCallValid)
        {
            context->getnTexImage(target, level, format, type, bufSize, pixels);
        }
        ANGLE_CAPTURE(GetnTexImage, isCallValid, context, target, level, format, type, bufSize,
                      pixels);
    }
}

void GL_APIENTRY GetnUniformdv(GLuint program, GLint location, GLsizei bufSize, GLdouble *params)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLdouble *params = "
        "0x%016" PRIxPTR ")",
        program, location, bufSize, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnUniformdv(context, program, location, bufSize, params));
        if (isCallValid)
        {
            context->getnUniformdv(program, location, bufSize, params);
        }
        ANGLE_CAPTURE(GetnUniformdv, isCallValid, context, program, location, bufSize, params);
    }
}

void GL_APIENTRY GetnUniformfv(GLuint program, GLint location, GLsizei bufSize, GLfloat *params)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLfloat *params = "
        "0x%016" PRIxPTR ")",
        program, location, bufSize, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnUniformfv(context, program, location, bufSize, params));
        if (isCallValid)
        {
            context->getnUniformfv(program, location, bufSize, params);
        }
        ANGLE_CAPTURE(GetnUniformfv, isCallValid, context, program, location, bufSize, params);
    }
}

void GL_APIENTRY GetnUniformiv(GLuint program, GLint location, GLsizei bufSize, GLint *params)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLint *params = "
        "0x%016" PRIxPTR ")",
        program, location, bufSize, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnUniformiv(context, program, location, bufSize, params));
        if (isCallValid)
        {
            context->getnUniformiv(program, location, bufSize, params);
        }
        ANGLE_CAPTURE(GetnUniformiv, isCallValid, context, program, location, bufSize, params);
    }
}

void GL_APIENTRY GetnUniformuiv(GLuint program, GLint location, GLsizei bufSize, GLuint *params)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei bufSize = %d, GLuint *params = "
        "0x%016" PRIxPTR ")",
        program, location, bufSize, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetnUniformuiv(context, program, location, bufSize, params));
        if (isCallValid)
        {
            context->getnUniformuiv(program, location, bufSize, params);
        }
        ANGLE_CAPTURE(GetnUniformuiv, isCallValid, context, program, location, bufSize, params);
    }
}

void GL_APIENTRY InvalidateNamedFramebufferData(GLuint framebuffer,
                                                GLsizei numAttachments,
                                                const GLenum *attachments)
{
    EVENT(
        "(GLuint framebuffer = %u, GLsizei numAttachments = %d, const GLenum *attachments = "
        "0x%016" PRIxPTR ")",
        framebuffer, numAttachments, (uintptr_t)attachments);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateInvalidateNamedFramebufferData(
                                              context, framebuffer, numAttachments, attachments));
        if (isCallValid)
        {
            context->invalidateNamedFramebufferData(framebuffer, numAttachments, attachments);
        }
        ANGLE_CAPTURE(InvalidateNamedFramebufferData, isCallValid, context, framebuffer,
                      numAttachments, attachments);
    }
}

void GL_APIENTRY InvalidateNamedFramebufferSubData(GLuint framebuffer,
                                                   GLsizei numAttachments,
                                                   const GLenum *attachments,
                                                   GLint x,
                                                   GLint y,
                                                   GLsizei width,
                                                   GLsizei height)
{
    EVENT(
        "(GLuint framebuffer = %u, GLsizei numAttachments = %d, const GLenum *attachments = "
        "0x%016" PRIxPTR ", GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d)",
        framebuffer, numAttachments, (uintptr_t)attachments, x, y, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateInvalidateNamedFramebufferSubData(
                                                             context, framebuffer, numAttachments,
                                                             attachments, x, y, width, height));
        if (isCallValid)
        {
            context->invalidateNamedFramebufferSubData(framebuffer, numAttachments, attachments, x,
                                                       y, width, height);
        }
        ANGLE_CAPTURE(InvalidateNamedFramebufferSubData, isCallValid, context, framebuffer,
                      numAttachments, attachments, x, y, width, height);
    }
}

void *GL_APIENTRY MapNamedBuffer(GLuint buffer, GLenum access)
{
    EVENT("(GLuint buffer = %u, GLenum access = 0x%X)", buffer, access);

    Context *context = GetValidGlobalContext();
    void *returnValue;
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateMapNamedBuffer(context, buffer, access));
        if (isCallValid)
        {
            returnValue = context->mapNamedBuffer(buffer, access);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBuffer, void *>();
        }
        ANGLE_CAPTURE(MapNamedBuffer, isCallValid, context, buffer, access, returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBuffer, void *>();
    }
    return returnValue;
}

void *GL_APIENTRY MapNamedBufferRange(GLuint buffer,
                                      GLintptr offset,
                                      GLsizeiptr length,
                                      GLbitfield access)
{
    EVENT(
        "(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr length = %llu, GLbitfield access "
        "= 0x%X)",
        buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(length),
        access);

    Context *context = GetValidGlobalContext();
    void *returnValue;
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMapNamedBufferRange(context, buffer, offset, length, access));
        if (isCallValid)
        {
            returnValue = context->mapNamedBufferRange(buffer, offset, length, access);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBufferRange, void *>();
        }
        ANGLE_CAPTURE(MapNamedBufferRange, isCallValid, context, buffer, offset, length, access,
                      returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::MapNamedBufferRange, void *>();
    }
    return returnValue;
}

void GL_APIENTRY MemoryBarrierByRegion(GLbitfield barriers)
{
    EVENT("(GLbitfield barriers = 0x%X)", barriers);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateMemoryBarrierByRegion(context, barriers));
        if (isCallValid)
        {
            context->memoryBarrierByRegion(barriers);
        }
        ANGLE_CAPTURE(MemoryBarrierByRegion, isCallValid, context, barriers);
    }
}

void GL_APIENTRY NamedBufferData(GLuint buffer, GLsizeiptr size, const void *data, GLenum usage)
{
    EVENT("(GLuint buffer = %u, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR
          ", GLenum usage = 0x%X)",
          buffer, static_cast<unsigned long long>(size), (uintptr_t)data, usage);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedBufferData(context, buffer, size, data, usage));
        if (isCallValid)
        {
            context->namedBufferData(buffer, size, data, usage);
        }
        ANGLE_CAPTURE(NamedBufferData, isCallValid, context, buffer, size, data, usage);
    }
}

void GL_APIENTRY NamedBufferStorage(GLuint buffer,
                                    GLsizeiptr size,
                                    const void *data,
                                    GLbitfield flags)
{
    EVENT("(GLuint buffer = %u, GLsizeiptr size = %llu, const void *data = 0x%016" PRIxPTR
          ", GLbitfield flags = 0x%X)",
          buffer, static_cast<unsigned long long>(size), (uintptr_t)data, flags);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedBufferStorage(context, buffer, size, data, flags));
        if (isCallValid)
        {
            context->namedBufferStorage(buffer, size, data, flags);
        }
        ANGLE_CAPTURE(NamedBufferStorage, isCallValid, context, buffer, size, data, flags);
    }
}

void GL_APIENTRY NamedBufferSubData(GLuint buffer,
                                    GLintptr offset,
                                    GLsizeiptr size,
                                    const void *data)
{
    EVENT(
        "(GLuint buffer = %u, GLintptr offset = %llu, GLsizeiptr size = %llu, const void *data = "
        "0x%016" PRIxPTR ")",
        buffer, static_cast<unsigned long long>(offset), static_cast<unsigned long long>(size),
        (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedBufferSubData(context, buffer, offset, size, data));
        if (isCallValid)
        {
            context->namedBufferSubData(buffer, offset, size, data);
        }
        ANGLE_CAPTURE(NamedBufferSubData, isCallValid, context, buffer, offset, size, data);
    }
}

void GL_APIENTRY NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
{
    EVENT("(GLuint framebuffer = %u, GLenum buf = 0x%X)", framebuffer, buf);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedFramebufferDrawBuffer(context, framebuffer, buf));
        if (isCallValid)
        {
            context->namedFramebufferDrawBuffer(framebuffer, buf);
        }
        ANGLE_CAPTURE(NamedFramebufferDrawBuffer, isCallValid, context, framebuffer, buf);
    }
}

void GL_APIENTRY NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, const GLenum *bufs)
{
    EVENT("(GLuint framebuffer = %u, GLsizei n = %d, const GLenum *bufs = 0x%016" PRIxPTR ")",
          framebuffer, n, (uintptr_t)bufs);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedFramebufferDrawBuffers(context, framebuffer, n, bufs));
        if (isCallValid)
        {
            context->namedFramebufferDrawBuffers(framebuffer, n, bufs);
        }
        ANGLE_CAPTURE(NamedFramebufferDrawBuffers, isCallValid, context, framebuffer, n, bufs);
    }
}

void GL_APIENTRY NamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param)
{
    EVENT("(GLuint framebuffer = %u, GLenum pname = 0x%X, GLint param = %d)", framebuffer, pname,
          param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedFramebufferParameteri(context, framebuffer, pname, param));
        if (isCallValid)
        {
            context->namedFramebufferParameteri(framebuffer, pname, param);
        }
        ANGLE_CAPTURE(NamedFramebufferParameteri, isCallValid, context, framebuffer, pname, param);
    }
}

void GL_APIENTRY NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
{
    EVENT("(GLuint framebuffer = %u, GLenum src = 0x%X)", framebuffer, src);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedFramebufferReadBuffer(context, framebuffer, src));
        if (isCallValid)
        {
            context->namedFramebufferReadBuffer(framebuffer, src);
        }
        ANGLE_CAPTURE(NamedFramebufferReadBuffer, isCallValid, context, framebuffer, src);
    }
}

void GL_APIENTRY NamedFramebufferRenderbuffer(GLuint framebuffer,
                                              GLenum attachment,
                                              GLenum renderbuffertarget,
                                              GLuint renderbuffer)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum attachment = 0x%X, GLenum renderbuffertarget = 0x%X, "
        "GLuint renderbuffer = %u)",
        framebuffer, attachment, renderbuffertarget, renderbuffer);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
        bool isCallValid =
            (context->skipValidation() ||
             ValidateNamedFramebufferRenderbuffer(context, framebuffer, attachment,
                                                  renderbuffertarget, renderbufferPacked));
        if (isCallValid)
        {
            context->namedFramebufferRenderbuffer(framebuffer, attachment, renderbuffertarget,
                                                  renderbufferPacked);
        }
        ANGLE_CAPTURE(NamedFramebufferRenderbuffer, isCallValid, context, framebuffer, attachment,
                      renderbuffertarget, renderbufferPacked);
    }
}

void GL_APIENTRY NamedFramebufferTexture(GLuint framebuffer,
                                         GLenum attachment,
                                         GLuint texture,
                                         GLint level)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum attachment = 0x%X, GLuint texture = %u, GLint level = "
        "%d)",
        framebuffer, attachment, texture, level);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateNamedFramebufferTexture(context, framebuffer, attachment, texture, level));
        if (isCallValid)
        {
            context->namedFramebufferTexture(framebuffer, attachment, texture, level);
        }
        ANGLE_CAPTURE(NamedFramebufferTexture, isCallValid, context, framebuffer, attachment,
                      texture, level);
    }
}

void GL_APIENTRY NamedFramebufferTextureLayer(GLuint framebuffer,
                                              GLenum attachment,
                                              GLuint texture,
                                              GLint level,
                                              GLint layer)
{
    EVENT(
        "(GLuint framebuffer = %u, GLenum attachment = 0x%X, GLuint texture = %u, GLint level = "
        "%d, GLint layer = %d)",
        framebuffer, attachment, texture, level, layer);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateNamedFramebufferTextureLayer(context, framebuffer, attachment,
                                                                 texture, level, layer));
        if (isCallValid)
        {
            context->namedFramebufferTextureLayer(framebuffer, attachment, texture, level, layer);
        }
        ANGLE_CAPTURE(NamedFramebufferTextureLayer, isCallValid, context, framebuffer, attachment,
                      texture, level, layer);
    }
}

void GL_APIENTRY NamedRenderbufferStorage(GLuint renderbuffer,
                                          GLenum internalformat,
                                          GLsizei width,
                                          GLsizei height)
{
    EVENT(
        "(GLuint renderbuffer = %u, GLenum internalformat = 0x%X, GLsizei width = %d, GLsizei "
        "height = %d)",
        renderbuffer, internalformat, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
        bool isCallValid                  = (context->skipValidation() ||
                            ValidateNamedRenderbufferStorage(context, renderbufferPacked,
                                                             internalformat, width, height));
        if (isCallValid)
        {
            context->namedRenderbufferStorage(renderbufferPacked, internalformat, width, height);
        }
        ANGLE_CAPTURE(NamedRenderbufferStorage, isCallValid, context, renderbufferPacked,
                      internalformat, width, height);
    }
}

void GL_APIENTRY NamedRenderbufferStorageMultisample(GLuint renderbuffer,
                                                     GLsizei samples,
                                                     GLenum internalformat,
                                                     GLsizei width,
                                                     GLsizei height)
{
    EVENT(
        "(GLuint renderbuffer = %u, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei "
        "width = %d, GLsizei height = %d)",
        renderbuffer, samples, internalformat, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        RenderbufferID renderbufferPacked = FromGL<RenderbufferID>(renderbuffer);
        bool isCallValid =
            (context->skipValidation() ||
             ValidateNamedRenderbufferStorageMultisample(context, renderbufferPacked, samples,
                                                         internalformat, width, height));
        if (isCallValid)
        {
            context->namedRenderbufferStorageMultisample(renderbufferPacked, samples,
                                                         internalformat, width, height);
        }
        ANGLE_CAPTURE(NamedRenderbufferStorageMultisample, isCallValid, context, renderbufferPacked,
                      samples, internalformat, width, height);
    }
}

void GL_APIENTRY ReadnPixels(GLint x,
                             GLint y,
                             GLsizei width,
                             GLsizei height,
                             GLenum format,
                             GLenum type,
                             GLsizei bufSize,
                             void *data)
{
    EVENT(
        "(GLint x = %d, GLint y = %d, GLsizei width = %d, GLsizei height = %d, GLenum format = "
        "0x%X, GLenum type = 0x%X, GLsizei bufSize = %d, void *data = 0x%016" PRIxPTR ")",
        x, y, width, height, format, type, bufSize, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateReadnPixels(context, x, y, width, height, format, type, bufSize, data));
        if (isCallValid)
        {
            context->readnPixels(x, y, width, height, format, type, bufSize, data);
        }
        ANGLE_CAPTURE(ReadnPixels, isCallValid, context, x, y, width, height, format, type, bufSize,
                      data);
    }
}

void GL_APIENTRY TextureBarrier()
{
    EVENT("()");

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateTextureBarrier(context));
        if (isCallValid)
        {
            context->textureBarrier();
        }
        ANGLE_CAPTURE(TextureBarrier, isCallValid, context);
    }
}

void GL_APIENTRY TextureBuffer(GLuint texture, GLenum internalformat, GLuint buffer)
{
    EVENT("(GLuint texture = %u, GLenum internalformat = 0x%X, GLuint buffer = %u)", texture,
          internalformat, buffer);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureBuffer(context, texture, internalformat, buffer));
        if (isCallValid)
        {
            context->textureBuffer(texture, internalformat, buffer);
        }
        ANGLE_CAPTURE(TextureBuffer, isCallValid, context, texture, internalformat, buffer);
    }
}

void GL_APIENTRY TextureBufferRange(GLuint texture,
                                    GLenum internalformat,
                                    GLuint buffer,
                                    GLintptr offset,
                                    GLsizeiptr size)
{
    EVENT(
        "(GLuint texture = %u, GLenum internalformat = 0x%X, GLuint buffer = %u, GLintptr offset = "
        "%llu, GLsizeiptr size = %llu)",
        texture, internalformat, buffer, static_cast<unsigned long long>(offset),
        static_cast<unsigned long long>(size));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTextureBufferRange(context, texture, internalformat, buffer, offset, size));
        if (isCallValid)
        {
            context->textureBufferRange(texture, internalformat, buffer, offset, size);
        }
        ANGLE_CAPTURE(TextureBufferRange, isCallValid, context, texture, internalformat, buffer,
                      offset, size);
    }
}

void GL_APIENTRY TextureParameterIiv(GLuint texture, GLenum pname, const GLint *params)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, const GLint *params = 0x%016" PRIxPTR ")",
          texture, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureParameterIiv(context, texture, pname, params));
        if (isCallValid)
        {
            context->textureParameterIiv(texture, pname, params);
        }
        ANGLE_CAPTURE(TextureParameterIiv, isCallValid, context, texture, pname, params);
    }
}

void GL_APIENTRY TextureParameterIuiv(GLuint texture, GLenum pname, const GLuint *params)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, const GLuint *params = 0x%016" PRIxPTR ")",
          texture, pname, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureParameterIuiv(context, texture, pname, params));
        if (isCallValid)
        {
            context->textureParameterIuiv(texture, pname, params);
        }
        ANGLE_CAPTURE(TextureParameterIuiv, isCallValid, context, texture, pname, params);
    }
}

void GL_APIENTRY TextureParameterf(GLuint texture, GLenum pname, GLfloat param)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, GLfloat param = %f)", texture, pname, param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureParameterf(context, texture, pname, param));
        if (isCallValid)
        {
            context->textureParameterf(texture, pname, param);
        }
        ANGLE_CAPTURE(TextureParameterf, isCallValid, context, texture, pname, param);
    }
}

void GL_APIENTRY TextureParameterfv(GLuint texture, GLenum pname, const GLfloat *param)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, const GLfloat *param = 0x%016" PRIxPTR ")",
          texture, pname, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureParameterfv(context, texture, pname, param));
        if (isCallValid)
        {
            context->textureParameterfv(texture, pname, param);
        }
        ANGLE_CAPTURE(TextureParameterfv, isCallValid, context, texture, pname, param);
    }
}

void GL_APIENTRY TextureParameteri(GLuint texture, GLenum pname, GLint param)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, GLint param = %d)", texture, pname, param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureParameteri(context, texture, pname, param));
        if (isCallValid)
        {
            context->textureParameteri(texture, pname, param);
        }
        ANGLE_CAPTURE(TextureParameteri, isCallValid, context, texture, pname, param);
    }
}

void GL_APIENTRY TextureParameteriv(GLuint texture, GLenum pname, const GLint *param)
{
    EVENT("(GLuint texture = %u, GLenum pname = 0x%X, const GLint *param = 0x%016" PRIxPTR ")",
          texture, pname, (uintptr_t)param);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureParameteriv(context, texture, pname, param));
        if (isCallValid)
        {
            context->textureParameteriv(texture, pname, param);
        }
        ANGLE_CAPTURE(TextureParameteriv, isCallValid, context, texture, pname, param);
    }
}

void GL_APIENTRY TextureStorage1D(GLuint texture,
                                  GLsizei levels,
                                  GLenum internalformat,
                                  GLsizei width)
{
    EVENT(
        "(GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
        "%d)",
        texture, levels, internalformat, width);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTextureStorage1D(context, texture, levels, internalformat, width));
        if (isCallValid)
        {
            context->textureStorage1D(texture, levels, internalformat, width);
        }
        ANGLE_CAPTURE(TextureStorage1D, isCallValid, context, texture, levels, internalformat,
                      width);
    }
}

void GL_APIENTRY TextureStorage2D(GLuint texture,
                                  GLsizei levels,
                                  GLenum internalformat,
                                  GLsizei width,
                                  GLsizei height)
{
    EVENT(
        "(GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
        "%d, GLsizei height = %d)",
        texture, levels, internalformat, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTextureStorage2D(context, texture, levels, internalformat, width, height));
        if (isCallValid)
        {
            context->textureStorage2D(texture, levels, internalformat, width, height);
        }
        ANGLE_CAPTURE(TextureStorage2D, isCallValid, context, texture, levels, internalformat,
                      width, height);
    }
}

void GL_APIENTRY TextureStorage2DMultisample(GLuint texture,
                                             GLsizei samples,
                                             GLenum internalformat,
                                             GLsizei width,
                                             GLsizei height,
                                             GLboolean fixedsamplelocations)
{
    EVENT(
        "(GLuint texture = %u, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width = "
        "%d, GLsizei height = %d, GLboolean fixedsamplelocations = %u)",
        texture, samples, internalformat, width, height, fixedsamplelocations);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTextureStorage2DMultisample(context, texture, samples, internalformat, width,
                                                 height, fixedsamplelocations));
        if (isCallValid)
        {
            context->textureStorage2DMultisample(texture, samples, internalformat, width, height,
                                                 fixedsamplelocations);
        }
        ANGLE_CAPTURE(TextureStorage2DMultisample, isCallValid, context, texture, samples,
                      internalformat, width, height, fixedsamplelocations);
    }
}

void GL_APIENTRY TextureStorage3D(GLuint texture,
                                  GLsizei levels,
                                  GLenum internalformat,
                                  GLsizei width,
                                  GLsizei height,
                                  GLsizei depth)
{
    EVENT(
        "(GLuint texture = %u, GLsizei levels = %d, GLenum internalformat = 0x%X, GLsizei width = "
        "%d, GLsizei height = %d, GLsizei depth = %d)",
        texture, levels, internalformat, width, height, depth);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureStorage3D(context, texture, levels, internalformat,
                                                     width, height, depth));
        if (isCallValid)
        {
            context->textureStorage3D(texture, levels, internalformat, width, height, depth);
        }
        ANGLE_CAPTURE(TextureStorage3D, isCallValid, context, texture, levels, internalformat,
                      width, height, depth);
    }
}

void GL_APIENTRY TextureStorage3DMultisample(GLuint texture,
                                             GLsizei samples,
                                             GLenum internalformat,
                                             GLsizei width,
                                             GLsizei height,
                                             GLsizei depth,
                                             GLboolean fixedsamplelocations)
{
    EVENT(
        "(GLuint texture = %u, GLsizei samples = %d, GLenum internalformat = 0x%X, GLsizei width = "
        "%d, GLsizei height = %d, GLsizei depth = %d, GLboolean fixedsamplelocations = %u)",
        texture, samples, internalformat, width, height, depth, fixedsamplelocations);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTextureStorage3DMultisample(context, texture, samples, internalformat, width,
                                                 height, depth, fixedsamplelocations));
        if (isCallValid)
        {
            context->textureStorage3DMultisample(texture, samples, internalformat, width, height,
                                                 depth, fixedsamplelocations);
        }
        ANGLE_CAPTURE(TextureStorage3DMultisample, isCallValid, context, texture, samples,
                      internalformat, width, height, depth, fixedsamplelocations);
    }
}

void GL_APIENTRY TextureSubImage1D(GLuint texture,
                                   GLint level,
                                   GLint xoffset,
                                   GLsizei width,
                                   GLenum format,
                                   GLenum type,
                                   const void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLsizei width = %d, GLenum "
        "format = 0x%X, GLenum type = 0x%X, const void *pixels = 0x%016" PRIxPTR ")",
        texture, level, xoffset, width, format, type, (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureSubImage1D(context, texture, level, xoffset, width,
                                                      format, type, pixels));
        if (isCallValid)
        {
            context->textureSubImage1D(texture, level, xoffset, width, format, type, pixels);
        }
        ANGLE_CAPTURE(TextureSubImage1D, isCallValid, context, texture, level, xoffset, width,
                      format, type, pixels);
    }
}

void GL_APIENTRY TextureSubImage2D(GLuint texture,
                                   GLint level,
                                   GLint xoffset,
                                   GLint yoffset,
                                   GLsizei width,
                                   GLsizei height,
                                   GLenum format,
                                   GLenum type,
                                   const void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLsizei "
        "width = %d, GLsizei height = %d, GLenum format = 0x%X, GLenum type = 0x%X, const void "
        "*pixels = 0x%016" PRIxPTR ")",
        texture, level, xoffset, yoffset, width, height, format, type, (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTextureSubImage2D(context, texture, level, xoffset, yoffset,
                                                      width, height, format, type, pixels));
        if (isCallValid)
        {
            context->textureSubImage2D(texture, level, xoffset, yoffset, width, height, format,
                                       type, pixels);
        }
        ANGLE_CAPTURE(TextureSubImage2D, isCallValid, context, texture, level, xoffset, yoffset,
                      width, height, format, type, pixels);
    }
}

void GL_APIENTRY TextureSubImage3D(GLuint texture,
                                   GLint level,
                                   GLint xoffset,
                                   GLint yoffset,
                                   GLint zoffset,
                                   GLsizei width,
                                   GLsizei height,
                                   GLsizei depth,
                                   GLenum format,
                                   GLenum type,
                                   const void *pixels)
{
    EVENT(
        "(GLuint texture = %u, GLint level = %d, GLint xoffset = %d, GLint yoffset = %d, GLint "
        "zoffset = %d, GLsizei width = %d, GLsizei height = %d, GLsizei depth = %d, GLenum format "
        "= 0x%X, GLenum type = 0x%X, const void *pixels = 0x%016" PRIxPTR ")",
        texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type,
        (uintptr_t)pixels);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTextureSubImage3D(context, texture, level, xoffset, yoffset, zoffset, width,
                                       height, depth, format, type, pixels));
        if (isCallValid)
        {
            context->textureSubImage3D(texture, level, xoffset, yoffset, zoffset, width, height,
                                       depth, format, type, pixels);
        }
        ANGLE_CAPTURE(TextureSubImage3D, isCallValid, context, texture, level, xoffset, yoffset,
                      zoffset, width, height, depth, format, type, pixels);
    }
}

void GL_APIENTRY TransformFeedbackBufferBase(GLuint xfb, GLuint index, GLuint buffer)
{
    EVENT("(GLuint xfb = %u, GLuint index = %u, GLuint buffer = %u)", xfb, index, buffer);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateTransformFeedbackBufferBase(context, xfb, index, buffer));
        if (isCallValid)
        {
            context->transformFeedbackBufferBase(xfb, index, buffer);
        }
        ANGLE_CAPTURE(TransformFeedbackBufferBase, isCallValid, context, xfb, index, buffer);
    }
}

void GL_APIENTRY TransformFeedbackBufferRange(GLuint xfb,
                                              GLuint index,
                                              GLuint buffer,
                                              GLintptr offset,
                                              GLsizeiptr size)
{
    EVENT(
        "(GLuint xfb = %u, GLuint index = %u, GLuint buffer = %u, GLintptr offset = %llu, "
        "GLsizeiptr size = %llu)",
        xfb, index, buffer, static_cast<unsigned long long>(offset),
        static_cast<unsigned long long>(size));

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateTransformFeedbackBufferRange(context, xfb, index, buffer, offset, size));
        if (isCallValid)
        {
            context->transformFeedbackBufferRange(xfb, index, buffer, offset, size);
        }
        ANGLE_CAPTURE(TransformFeedbackBufferRange, isCallValid, context, xfb, index, buffer,
                      offset, size);
    }
}

GLboolean GL_APIENTRY UnmapNamedBuffer(GLuint buffer)
{
    EVENT("(GLuint buffer = %u)", buffer);

    Context *context = GetValidGlobalContext();
    GLboolean returnValue;
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateUnmapNamedBuffer(context, buffer));
        if (isCallValid)
        {
            returnValue = context->unmapNamedBuffer(buffer);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::UnmapNamedBuffer, GLboolean>();
        }
        ANGLE_CAPTURE(UnmapNamedBuffer, isCallValid, context, buffer, returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::UnmapNamedBuffer, GLboolean>();
    }
    return returnValue;
}

void GL_APIENTRY VertexArrayAttribBinding(GLuint vaobj, GLuint attribindex, GLuint bindingindex)
{
    EVENT("(GLuint vaobj = %u, GLuint attribindex = %u, GLuint bindingindex = %u)", vaobj,
          attribindex, bindingindex);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateVertexArrayAttribBinding(context, vaobj, attribindex, bindingindex));
        if (isCallValid)
        {
            context->vertexArrayAttribBinding(vaobj, attribindex, bindingindex);
        }
        ANGLE_CAPTURE(VertexArrayAttribBinding, isCallValid, context, vaobj, attribindex,
                      bindingindex);
    }
}

void GL_APIENTRY VertexArrayAttribFormat(GLuint vaobj,
                                         GLuint attribindex,
                                         GLint size,
                                         GLenum type,
                                         GLboolean normalized,
                                         GLuint relativeoffset)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, "
        "GLboolean normalized = %u, GLuint relativeoffset = %u)",
        vaobj, attribindex, size, type, normalized, relativeoffset);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexArrayAttribFormat(context, vaobj, attribindex, size, type,
                                                            normalized, relativeoffset));
        if (isCallValid)
        {
            context->vertexArrayAttribFormat(vaobj, attribindex, size, type, normalized,
                                             relativeoffset);
        }
        ANGLE_CAPTURE(VertexArrayAttribFormat, isCallValid, context, vaobj, attribindex, size, type,
                      normalized, relativeoffset);
    }
}

void GL_APIENTRY VertexArrayAttribIFormat(GLuint vaobj,
                                          GLuint attribindex,
                                          GLint size,
                                          GLenum type,
                                          GLuint relativeoffset)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, GLuint "
        "relativeoffset = %u)",
        vaobj, attribindex, size, type, relativeoffset);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexArrayAttribIFormat(context, vaobj, attribindex, size,
                                                             type, relativeoffset));
        if (isCallValid)
        {
            context->vertexArrayAttribIFormat(vaobj, attribindex, size, type, relativeoffset);
        }
        ANGLE_CAPTURE(VertexArrayAttribIFormat, isCallValid, context, vaobj, attribindex, size,
                      type, relativeoffset);
    }
}

void GL_APIENTRY VertexArrayAttribLFormat(GLuint vaobj,
                                          GLuint attribindex,
                                          GLint size,
                                          GLenum type,
                                          GLuint relativeoffset)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint attribindex = %u, GLint size = %d, GLenum type = 0x%X, GLuint "
        "relativeoffset = %u)",
        vaobj, attribindex, size, type, relativeoffset);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexArrayAttribLFormat(context, vaobj, attribindex, size,
                                                             type, relativeoffset));
        if (isCallValid)
        {
            context->vertexArrayAttribLFormat(vaobj, attribindex, size, type, relativeoffset);
        }
        ANGLE_CAPTURE(VertexArrayAttribLFormat, isCallValid, context, vaobj, attribindex, size,
                      type, relativeoffset);
    }
}

void GL_APIENTRY VertexArrayBindingDivisor(GLuint vaobj, GLuint bindingindex, GLuint divisor)
{
    EVENT("(GLuint vaobj = %u, GLuint bindingindex = %u, GLuint divisor = %u)", vaobj, bindingindex,
          divisor);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateVertexArrayBindingDivisor(context, vaobj, bindingindex, divisor));
        if (isCallValid)
        {
            context->vertexArrayBindingDivisor(vaobj, bindingindex, divisor);
        }
        ANGLE_CAPTURE(VertexArrayBindingDivisor, isCallValid, context, vaobj, bindingindex,
                      divisor);
    }
}

void GL_APIENTRY VertexArrayElementBuffer(GLuint vaobj, GLuint buffer)
{
    EVENT("(GLuint vaobj = %u, GLuint buffer = %u)", vaobj, buffer);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexArrayElementBuffer(context, vaobj, buffer));
        if (isCallValid)
        {
            context->vertexArrayElementBuffer(vaobj, buffer);
        }
        ANGLE_CAPTURE(VertexArrayElementBuffer, isCallValid, context, vaobj, buffer);
    }
}

void GL_APIENTRY VertexArrayVertexBuffer(GLuint vaobj,
                                         GLuint bindingindex,
                                         GLuint buffer,
                                         GLintptr offset,
                                         GLsizei stride)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint bindingindex = %u, GLuint buffer = %u, GLintptr offset = %llu, "
        "GLsizei stride = %d)",
        vaobj, bindingindex, buffer, static_cast<unsigned long long>(offset), stride);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateVertexArrayVertexBuffer(context, vaobj, bindingindex, buffer, offset, stride));
        if (isCallValid)
        {
            context->vertexArrayVertexBuffer(vaobj, bindingindex, buffer, offset, stride);
        }
        ANGLE_CAPTURE(VertexArrayVertexBuffer, isCallValid, context, vaobj, bindingindex, buffer,
                      offset, stride);
    }
}

void GL_APIENTRY VertexArrayVertexBuffers(GLuint vaobj,
                                          GLuint first,
                                          GLsizei count,
                                          const GLuint *buffers,
                                          const GLintptr *offsets,
                                          const GLsizei *strides)
{
    EVENT(
        "(GLuint vaobj = %u, GLuint first = %u, GLsizei count = %d, const GLuint *buffers = "
        "0x%016" PRIxPTR ", const GLintptr *offsets = 0x%016" PRIxPTR
        ", const GLsizei *strides = 0x%016" PRIxPTR ")",
        vaobj, first, count, (uintptr_t)buffers, (uintptr_t)offsets, (uintptr_t)strides);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexArrayVertexBuffers(context, vaobj, first, count, buffers,
                                                             offsets, strides));
        if (isCallValid)
        {
            context->vertexArrayVertexBuffers(vaobj, first, count, buffers, offsets, strides);
        }
        ANGLE_CAPTURE(VertexArrayVertexBuffers, isCallValid, context, vaobj, first, count, buffers,
                      offsets, strides);
    }
}
}  // namespace gl
