// 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_1_autogen.cpp:
//   Defines the GL 4.1 entry points.

#include "libGL/entry_points_gl_4_1_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/validationGL41_autogen.h"
#include "libGLESv2/global_state.h"

namespace gl
{
void GL_APIENTRY ActiveShaderProgram(GLuint pipeline, GLuint program)
{
    EVENT("(GLuint pipeline = %u, GLuint program = %u)", pipeline, program);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ActiveShaderProgram, context, pipeline, program);
        if (context->skipValidation() || ValidateActiveShaderProgram(context, pipeline, program))
        {
            context->activeShaderProgram(pipeline, program);
        }
    }
}

void GL_APIENTRY BindProgramPipeline(GLuint pipeline)
{
    EVENT("(GLuint pipeline = %u)", pipeline);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BindProgramPipeline, context, pipeline);
        if (context->skipValidation() || ValidateBindProgramPipeline(context, pipeline))
        {
            context->bindProgramPipeline(pipeline);
        }
    }
}

void GL_APIENTRY ClearDepthf(GLfloat d)
{
    EVENT("(GLfloat d = %f)", d);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ClearDepthf, context, d);
        if (context->skipValidation() || ValidateClearDepthf(context, d))
        {
            context->clearDepthf(d);
        }
    }
}

GLuint GL_APIENTRY CreateShaderProgramv(GLenum type, GLsizei count, const GLchar *const *strings)
{
    EVENT("(GLenum type = 0x%X, GLsizei count = %d, const GLchar *const*strings = 0x%016" PRIxPTR
          ")",
          type, count, (uintptr_t)strings);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ShaderType typePacked = FromGLenum<ShaderType>(type);
        ANGLE_CAPTURE(CreateShaderProgramv, context, typePacked, count, strings);
        if (context->skipValidation() ||
            ValidateCreateShaderProgramv(context, typePacked, count, strings))
        {
            return context->createShaderProgramv(typePacked, count, strings);
        }
    }

    return GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DeleteProgramPipelines, context, n, pipelines);
        if (context->skipValidation() || ValidateDeleteProgramPipelines(context, n, pipelines))
        {
            context->deleteProgramPipelines(n, pipelines);
        }
    }
}

void GL_APIENTRY DepthRangeArrayv(GLuint first, GLsizei count, const GLdouble *v)
{
    EVENT("(GLuint first = %u, GLsizei count = %d, const GLdouble *v = 0x%016" PRIxPTR ")", first,
          count, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DepthRangeArrayv, context, first, count, v);
        if (context->skipValidation() || ValidateDepthRangeArrayv(context, first, count, v))
        {
            context->depthRangeArrayv(first, count, v);
        }
    }
}

void GL_APIENTRY DepthRangeIndexed(GLuint index, GLdouble n, GLdouble f)
{
    EVENT("(GLuint index = %u, GLdouble n = %f, GLdouble f = %f)", index, n, f);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DepthRangeIndexed, context, index, n, f);
        if (context->skipValidation() || ValidateDepthRangeIndexed(context, index, n, f))
        {
            context->depthRangeIndexed(index, n, f);
        }
    }
}

void GL_APIENTRY DepthRangef(GLfloat n, GLfloat f)
{
    EVENT("(GLfloat n = %f, GLfloat f = %f)", n, f);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DepthRangef, context, n, f);
        if (context->skipValidation() || ValidateDepthRangef(context, n, f))
        {
            context->depthRangef(n, f);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GenProgramPipelines, context, n, pipelines);
        if (context->skipValidation() || ValidateGenProgramPipelines(context, n, pipelines))
        {
            context->genProgramPipelines(n, pipelines);
        }
    }
}

void GL_APIENTRY GetDoublei_v(GLenum target, GLuint index, GLdouble *data)
{
    EVENT("(GLenum target = 0x%X, GLuint index = %u, GLdouble *data = 0x%016" PRIxPTR ")", target,
          index, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetDoublei_v, context, target, index, data);
        if (context->skipValidation() || ValidateGetDoublei_v(context, target, index, data))
        {
            context->getDoublei_v(target, index, data);
        }
    }
}

void GL_APIENTRY GetFloati_v(GLenum target, GLuint index, GLfloat *data)
{
    EVENT("(GLenum target = 0x%X, GLuint index = %u, GLfloat *data = 0x%016" PRIxPTR ")", target,
          index, (uintptr_t)data);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetFloati_v, context, target, index, data);
        if (context->skipValidation() || ValidateGetFloati_v(context, target, index, data))
        {
            context->getFloati_v(target, index, data);
        }
    }
}

void GL_APIENTRY GetProgramBinary(GLuint program,
                                  GLsizei bufSize,
                                  GLsizei *length,
                                  GLenum *binaryFormat,
                                  void *binary)
{
    EVENT("(GLuint program = %u, GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
          ", GLenum *binaryFormat = 0x%016" PRIxPTR ", void *binary = 0x%016" PRIxPTR ")",
          program, bufSize, (uintptr_t)length, (uintptr_t)binaryFormat, (uintptr_t)binary);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetProgramBinary, context, program, bufSize, length, binaryFormat, binary);
        if (context->skipValidation() ||
            ValidateGetProgramBinary(context, program, bufSize, length, binaryFormat, binary))
        {
            context->getProgramBinary(program, bufSize, length, binaryFormat, binary);
        }
    }
}

void GL_APIENTRY GetProgramPipelineInfoLog(GLuint pipeline,
                                           GLsizei bufSize,
                                           GLsizei *length,
                                           GLchar *infoLog)
{
    EVENT("(GLuint pipeline = %u, GLsizei bufSize = %d, GLsizei *length = 0x%016" PRIxPTR
          ", GLchar *infoLog = 0x%016" PRIxPTR ")",
          pipeline, bufSize, (uintptr_t)length, (uintptr_t)infoLog);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetProgramPipelineInfoLog, context, pipeline, bufSize, length, infoLog);
        if (context->skipValidation() ||
            ValidateGetProgramPipelineInfoLog(context, pipeline, bufSize, length, infoLog))
        {
            context->getProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetProgramPipelineiv, context, pipeline, pname, params);
        if (context->skipValidation() ||
            ValidateGetProgramPipelineiv(context, pipeline, pname, params))
        {
            context->getProgramPipelineiv(pipeline, pname, params);
        }
    }
}

void GL_APIENTRY GetShaderPrecisionFormat(GLenum shadertype,
                                          GLenum precisiontype,
                                          GLint *range,
                                          GLint *precision)
{
    EVENT("(GLenum shadertype = 0x%X, GLenum precisiontype = 0x%X, GLint *range = 0x%016" PRIxPTR
          ", GLint *precision = 0x%016" PRIxPTR ")",
          shadertype, precisiontype, (uintptr_t)range, (uintptr_t)precision);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetShaderPrecisionFormat, context, shadertype, precisiontype, range,
                      precision);
        if (context->skipValidation() ||
            ValidateGetShaderPrecisionFormat(context, shadertype, precisiontype, range, precision))
        {
            context->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetVertexAttribLdv, context, index, pname, params);
        if (context->skipValidation() || ValidateGetVertexAttribLdv(context, index, pname, params))
        {
            context->getVertexAttribLdv(index, pname, params);
        }
    }
}

GLboolean GL_APIENTRY IsProgramPipeline(GLuint pipeline)
{
    EVENT("(GLuint pipeline = %u)", pipeline);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(IsProgramPipeline, context, pipeline);
        if (context->skipValidation() || ValidateIsProgramPipeline(context, pipeline))
        {
            return context->isProgramPipeline(pipeline);
        }
    }

    return GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
}

void GL_APIENTRY ProgramBinary(GLuint program,
                               GLenum binaryFormat,
                               const void *binary,
                               GLsizei length)
{
    EVENT("(GLuint program = %u, GLenum binaryFormat = 0x%X, const void *binary = 0x%016" PRIxPTR
          ", GLsizei length = %d)",
          program, binaryFormat, (uintptr_t)binary, length);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramBinary, context, program, binaryFormat, binary, length);
        if (context->skipValidation() ||
            ValidateProgramBinary(context, program, binaryFormat, binary, length))
        {
            context->programBinary(program, binaryFormat, binary, length);
        }
    }
}

void GL_APIENTRY ProgramParameteri(GLuint program, GLenum pname, GLint value)
{
    EVENT("(GLuint program = %u, GLenum pname = 0x%X, GLint value = %d)", program, pname, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramParameteri, context, program, pname, value);
        if (context->skipValidation() || ValidateProgramParameteri(context, program, pname, value))
        {
            context->programParameteri(program, pname, value);
        }
    }
}

void GL_APIENTRY ProgramUniform1d(GLuint program, GLint location, GLdouble v0)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLdouble v0 = %f)", program, location, v0);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1d, context, program, location, v0);
        if (context->skipValidation() || ValidateProgramUniform1d(context, program, location, v0))
        {
            context->programUniform1d(program, location, v0);
        }
    }
}

void GL_APIENTRY ProgramUniform1dv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLdouble *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1dv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform1dv(context, program, location, count, value))
        {
            context->programUniform1dv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform1f(GLuint program, GLint location, GLfloat v0)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLfloat v0 = %f)", program, location, v0);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1f, context, program, location, v0);
        if (context->skipValidation() || ValidateProgramUniform1f(context, program, location, v0))
        {
            context->programUniform1f(program, location, v0);
        }
    }
}

void GL_APIENTRY ProgramUniform1fv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1fv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform1fv(context, program, location, count, value))
        {
            context->programUniform1fv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform1i(GLuint program, GLint location, GLint v0)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLint v0 = %d)", program, location, v0);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1i, context, program, location, v0);
        if (context->skipValidation() || ValidateProgramUniform1i(context, program, location, v0))
        {
            context->programUniform1i(program, location, v0);
        }
    }
}

void GL_APIENTRY ProgramUniform1iv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1iv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform1iv(context, program, location, count, value))
        {
            context->programUniform1iv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform1ui(GLuint program, GLint location, GLuint v0)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLuint v0 = %u)", program, location, v0);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1ui, context, program, location, v0);
        if (context->skipValidation() || ValidateProgramUniform1ui(context, program, location, v0))
        {
            context->programUniform1ui(program, location, v0);
        }
    }
}

void GL_APIENTRY ProgramUniform1uiv(GLuint program,
                                    GLint location,
                                    GLsizei count,
                                    const GLuint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform1uiv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform1uiv(context, program, location, count, value))
        {
            context->programUniform1uiv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform2d(GLuint program, GLint location, GLdouble v0, GLdouble v1)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLdouble v0 = %f, GLdouble v1 = %f)", program,
          location, v0, v1);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2d, context, program, location, v0, v1);
        if (context->skipValidation() ||
            ValidateProgramUniform2d(context, program, location, v0, v1))
        {
            context->programUniform2d(program, location, v0, v1);
        }
    }
}

void GL_APIENTRY ProgramUniform2dv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLdouble *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2dv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform2dv(context, program, location, count, value))
        {
            context->programUniform2dv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform2f(GLuint program, GLint location, GLfloat v0, GLfloat v1)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f)", program,
          location, v0, v1);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2f, context, program, location, v0, v1);
        if (context->skipValidation() ||
            ValidateProgramUniform2f(context, program, location, v0, v1))
        {
            context->programUniform2f(program, location, v0, v1);
        }
    }
}

void GL_APIENTRY ProgramUniform2fv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2fv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform2fv(context, program, location, count, value))
        {
            context->programUniform2fv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform2i(GLuint program, GLint location, GLint v0, GLint v1)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLint v0 = %d, GLint v1 = %d)", program,
          location, v0, v1);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2i, context, program, location, v0, v1);
        if (context->skipValidation() ||
            ValidateProgramUniform2i(context, program, location, v0, v1))
        {
            context->programUniform2i(program, location, v0, v1);
        }
    }
}

void GL_APIENTRY ProgramUniform2iv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2iv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform2iv(context, program, location, count, value))
        {
            context->programUniform2iv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform2ui(GLuint program, GLint location, GLuint v0, GLuint v1)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLuint v0 = %u, GLuint v1 = %u)", program,
          location, v0, v1);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2ui, context, program, location, v0, v1);
        if (context->skipValidation() ||
            ValidateProgramUniform2ui(context, program, location, v0, v1))
        {
            context->programUniform2ui(program, location, v0, v1);
        }
    }
}

void GL_APIENTRY ProgramUniform2uiv(GLuint program,
                                    GLint location,
                                    GLsizei count,
                                    const GLuint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform2uiv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform2uiv(context, program, location, count, value))
        {
            context->programUniform2uiv(program, location, count, value);
        }
    }
}

void GL_APIENTRY
ProgramUniform3d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLdouble v0 = %f, GLdouble v1 = %f, GLdouble "
        "v2 = %f)",
        program, location, v0, v1, v2);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3d, context, program, location, v0, v1, v2);
        if (context->skipValidation() ||
            ValidateProgramUniform3d(context, program, location, v0, v1, v2))
        {
            context->programUniform3d(program, location, v0, v1, v2);
        }
    }
}

void GL_APIENTRY ProgramUniform3dv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLdouble *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3dv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform3dv(context, program, location, count, value))
        {
            context->programUniform3dv(program, location, count, value);
        }
    }
}

void GL_APIENTRY
ProgramUniform3f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f, GLfloat v2 = "
        "%f)",
        program, location, v0, v1, v2);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3f, context, program, location, v0, v1, v2);
        if (context->skipValidation() ||
            ValidateProgramUniform3f(context, program, location, v0, v1, v2))
        {
            context->programUniform3f(program, location, v0, v1, v2);
        }
    }
}

void GL_APIENTRY ProgramUniform3fv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3fv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform3fv(context, program, location, count, value))
        {
            context->programUniform3fv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform3i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2)
{
    EVENT("(GLuint program = %u, GLint location = %d, GLint v0 = %d, GLint v1 = %d, GLint v2 = %d)",
          program, location, v0, v1, v2);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3i, context, program, location, v0, v1, v2);
        if (context->skipValidation() ||
            ValidateProgramUniform3i(context, program, location, v0, v1, v2))
        {
            context->programUniform3i(program, location, v0, v1, v2);
        }
    }
}

void GL_APIENTRY ProgramUniform3iv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3iv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform3iv(context, program, location, count, value))
        {
            context->programUniform3iv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniform3ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLuint v0 = %u, GLuint v1 = %u, GLuint v2 = "
        "%u)",
        program, location, v0, v1, v2);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3ui, context, program, location, v0, v1, v2);
        if (context->skipValidation() ||
            ValidateProgramUniform3ui(context, program, location, v0, v1, v2))
        {
            context->programUniform3ui(program, location, v0, v1, v2);
        }
    }
}

void GL_APIENTRY ProgramUniform3uiv(GLuint program,
                                    GLint location,
                                    GLsizei count,
                                    const GLuint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform3uiv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform3uiv(context, program, location, count, value))
        {
            context->programUniform3uiv(program, location, count, value);
        }
    }
}

void GL_APIENTRY
ProgramUniform4d(GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLdouble v0 = %f, GLdouble v1 = %f, GLdouble "
        "v2 = %f, GLdouble v3 = %f)",
        program, location, v0, v1, v2, v3);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4d, context, program, location, v0, v1, v2, v3);
        if (context->skipValidation() ||
            ValidateProgramUniform4d(context, program, location, v0, v1, v2, v3))
        {
            context->programUniform4d(program, location, v0, v1, v2, v3);
        }
    }
}

void GL_APIENTRY ProgramUniform4dv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLdouble *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4dv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform4dv(context, program, location, count, value))
        {
            context->programUniform4dv(program, location, count, value);
        }
    }
}

void GL_APIENTRY
ProgramUniform4f(GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLfloat v0 = %f, GLfloat v1 = %f, GLfloat v2 = "
        "%f, GLfloat v3 = %f)",
        program, location, v0, v1, v2, v3);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4f, context, program, location, v0, v1, v2, v3);
        if (context->skipValidation() ||
            ValidateProgramUniform4f(context, program, location, v0, v1, v2, v3))
        {
            context->programUniform4f(program, location, v0, v1, v2, v3);
        }
    }
}

void GL_APIENTRY ProgramUniform4fv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLfloat *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4fv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform4fv(context, program, location, count, value))
        {
            context->programUniform4fv(program, location, count, value);
        }
    }
}

void GL_APIENTRY
ProgramUniform4i(GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLint v0 = %d, GLint v1 = %d, GLint v2 = %d, "
        "GLint v3 = %d)",
        program, location, v0, v1, v2, v3);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4i, context, program, location, v0, v1, v2, v3);
        if (context->skipValidation() ||
            ValidateProgramUniform4i(context, program, location, v0, v1, v2, v3))
        {
            context->programUniform4i(program, location, v0, v1, v2, v3);
        }
    }
}

void GL_APIENTRY ProgramUniform4iv(GLuint program,
                                   GLint location,
                                   GLsizei count,
                                   const GLint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4iv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform4iv(context, program, location, count, value))
        {
            context->programUniform4iv(program, location, count, value);
        }
    }
}

void GL_APIENTRY
ProgramUniform4ui(GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLuint v0 = %u, GLuint v1 = %u, GLuint v2 = "
        "%u, GLuint v3 = %u)",
        program, location, v0, v1, v2, v3);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4ui, context, program, location, v0, v1, v2, v3);
        if (context->skipValidation() ||
            ValidateProgramUniform4ui(context, program, location, v0, v1, v2, v3))
        {
            context->programUniform4ui(program, location, v0, v1, v2, v3);
        }
    }
}

void GL_APIENTRY ProgramUniform4uiv(GLuint program,
                                    GLint location,
                                    GLsizei count,
                                    const GLuint *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        program, location, count, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniform4uiv, context, program, location, count, value);
        if (context->skipValidation() ||
            ValidateProgramUniform4uiv(context, program, location, count, value))
        {
            context->programUniform4uiv(program, location, count, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix2dv(GLuint program,
                                         GLint location,
                                         GLsizei count,
                                         GLboolean transpose,
                                         const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix2dv, context, program, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix2dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix2dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix2fv(GLuint program,
                                         GLint location,
                                         GLsizei count,
                                         GLboolean transpose,
                                         const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix2fv, context, program, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix2fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix2x3dv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix2x3dv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix2x3dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix2x3dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix2x3fv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix2x3fv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix2x3fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix2x3fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix2x4dv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix2x4dv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix2x4dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix2x4dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix2x4fv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix2x4fv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix2x4fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix2x4fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix3dv(GLuint program,
                                         GLint location,
                                         GLsizei count,
                                         GLboolean transpose,
                                         const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix3dv, context, program, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix3dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix3dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix3fv(GLuint program,
                                         GLint location,
                                         GLsizei count,
                                         GLboolean transpose,
                                         const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix3fv, context, program, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix3fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix3x2dv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix3x2dv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix3x2dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix3x2dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix3x2fv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix3x2fv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix3x2fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix3x2fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix3x4dv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix3x4dv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix3x4dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix3x4dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix3x4fv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix3x4fv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix3x4fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix3x4fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix4dv(GLuint program,
                                         GLint location,
                                         GLsizei count,
                                         GLboolean transpose,
                                         const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix4dv, context, program, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix4dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix4dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix4fv(GLuint program,
                                         GLint location,
                                         GLsizei count,
                                         GLboolean transpose,
                                         const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix4fv, context, program, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix4fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix4x2dv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix4x2dv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix4x2dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix4x2dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix4x2fv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix4x2fv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix4x2fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix4x2fv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix4x3dv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLdouble *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLdouble *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix4x3dv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix4x3dv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix4x3dv(program, location, count, transpose, value);
        }
    }
}

void GL_APIENTRY ProgramUniformMatrix4x3fv(GLuint program,
                                           GLint location,
                                           GLsizei count,
                                           GLboolean transpose,
                                           const GLfloat *value)
{
    EVENT(
        "(GLuint program = %u, GLint location = %d, GLsizei count = %d, GLboolean transpose = %u, "
        "const GLfloat *value = 0x%016" PRIxPTR ")",
        program, location, count, transpose, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ProgramUniformMatrix4x3fv, context, program, location, count, transpose,
                      value);
        if (context->skipValidation() ||
            ValidateProgramUniformMatrix4x3fv(context, program, location, count, transpose, value))
        {
            context->programUniformMatrix4x3fv(program, location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ReleaseShaderCompiler, context);
        if (context->skipValidation() || ValidateReleaseShaderCompiler(context))
        {
            context->releaseShaderCompiler();
        }
    }
}

void GL_APIENTRY ScissorArrayv(GLuint first, GLsizei count, const GLint *v)
{
    EVENT("(GLuint first = %u, GLsizei count = %d, const GLint *v = 0x%016" PRIxPTR ")", first,
          count, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ScissorArrayv, context, first, count, v);
        if (context->skipValidation() || ValidateScissorArrayv(context, first, count, v))
        {
            context->scissorArrayv(first, count, v);
        }
    }
}

void GL_APIENTRY
ScissorIndexed(GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height)
{
    EVENT(
        "(GLuint index = %u, GLint left = %d, GLint bottom = %d, GLsizei width = %d, GLsizei "
        "height = %d)",
        index, left, bottom, width, height);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ScissorIndexed, context, index, left, bottom, width, height);
        if (context->skipValidation() ||
            ValidateScissorIndexed(context, index, left, bottom, width, height))
        {
            context->scissorIndexed(index, left, bottom, width, height);
        }
    }
}

void GL_APIENTRY ScissorIndexedv(GLuint index, const GLint *v)
{
    EVENT("(GLuint index = %u, const GLint *v = 0x%016" PRIxPTR ")", index, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ScissorIndexedv, context, index, v);
        if (context->skipValidation() || ValidateScissorIndexedv(context, index, v))
        {
            context->scissorIndexedv(index, v);
        }
    }
}

void GL_APIENTRY ShaderBinary(GLsizei count,
                              const GLuint *shaders,
                              GLenum binaryformat,
                              const void *binary,
                              GLsizei length)
{
    EVENT("(GLsizei count = %d, const GLuint *shaders = 0x%016" PRIxPTR
          ", GLenum binaryformat = 0x%X, const void *binary = 0x%016" PRIxPTR
          ", GLsizei length = %d)",
          count, (uintptr_t)shaders, binaryformat, (uintptr_t)binary, length);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ShaderBinary, context, count, shaders, binaryformat, binary, length);
        if (context->skipValidation() ||
            ValidateShaderBinary(context, count, shaders, binaryformat, binary, length))
        {
            context->shaderBinary(count, shaders, binaryformat, binary, length);
        }
    }
}

void GL_APIENTRY UseProgramStages(GLuint pipeline, GLbitfield stages, GLuint program)
{
    EVENT("(GLuint pipeline = %u, GLbitfield stages = 0x%X, GLuint program = %u)", pipeline, stages,
          program);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UseProgramStages, context, pipeline, stages, program);
        if (context->skipValidation() ||
            ValidateUseProgramStages(context, pipeline, stages, program))
        {
            context->useProgramStages(pipeline, stages, program);
        }
    }
}

void GL_APIENTRY ValidateProgramPipeline(GLuint pipeline)
{
    EVENT("(GLuint pipeline = %u)", pipeline);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ValidateProgramPipeline, context, pipeline);
        if (context->skipValidation() || ValidateValidateProgramPipeline(context, pipeline))
        {
            context->validateProgramPipeline(pipeline);
        }
    }
}

void GL_APIENTRY VertexAttribL1d(GLuint index, GLdouble x)
{
    EVENT("(GLuint index = %u, GLdouble x = %f)", index, x);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL1d, context, index, x);
        if (context->skipValidation() || ValidateVertexAttribL1d(context, index, x))
        {
            context->vertexAttribL1d(index, x);
        }
    }
}

void GL_APIENTRY VertexAttribL1dv(GLuint index, const GLdouble *v)
{
    EVENT("(GLuint index = %u, const GLdouble *v = 0x%016" PRIxPTR ")", index, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL1dv, context, index, v);
        if (context->skipValidation() || ValidateVertexAttribL1dv(context, index, v))
        {
            context->vertexAttribL1dv(index, v);
        }
    }
}

void GL_APIENTRY VertexAttribL2d(GLuint index, GLdouble x, GLdouble y)
{
    EVENT("(GLuint index = %u, GLdouble x = %f, GLdouble y = %f)", index, x, y);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL2d, context, index, x, y);
        if (context->skipValidation() || ValidateVertexAttribL2d(context, index, x, y))
        {
            context->vertexAttribL2d(index, x, y);
        }
    }
}

void GL_APIENTRY VertexAttribL2dv(GLuint index, const GLdouble *v)
{
    EVENT("(GLuint index = %u, const GLdouble *v = 0x%016" PRIxPTR ")", index, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL2dv, context, index, v);
        if (context->skipValidation() || ValidateVertexAttribL2dv(context, index, v))
        {
            context->vertexAttribL2dv(index, v);
        }
    }
}

void GL_APIENTRY VertexAttribL3d(GLuint index, GLdouble x, GLdouble y, GLdouble z)
{
    EVENT("(GLuint index = %u, GLdouble x = %f, GLdouble y = %f, GLdouble z = %f)", index, x, y, z);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL3d, context, index, x, y, z);
        if (context->skipValidation() || ValidateVertexAttribL3d(context, index, x, y, z))
        {
            context->vertexAttribL3d(index, x, y, z);
        }
    }
}

void GL_APIENTRY VertexAttribL3dv(GLuint index, const GLdouble *v)
{
    EVENT("(GLuint index = %u, const GLdouble *v = 0x%016" PRIxPTR ")", index, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL3dv, context, index, v);
        if (context->skipValidation() || ValidateVertexAttribL3dv(context, index, v))
        {
            context->vertexAttribL3dv(index, v);
        }
    }
}

void GL_APIENTRY VertexAttribL4d(GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
    EVENT("(GLuint index = %u, GLdouble x = %f, GLdouble y = %f, GLdouble z = %f, GLdouble w = %f)",
          index, x, y, z, w);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL4d, context, index, x, y, z, w);
        if (context->skipValidation() || ValidateVertexAttribL4d(context, index, x, y, z, w))
        {
            context->vertexAttribL4d(index, x, y, z, w);
        }
    }
}

void GL_APIENTRY VertexAttribL4dv(GLuint index, const GLdouble *v)
{
    EVENT("(GLuint index = %u, const GLdouble *v = 0x%016" PRIxPTR ")", index, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribL4dv, context, index, v);
        if (context->skipValidation() || ValidateVertexAttribL4dv(context, index, v))
        {
            context->vertexAttribL4dv(index, v);
        }
    }
}

void GL_APIENTRY
VertexAttribLPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer)
{
    EVENT(
        "(GLuint index = %u, GLint size = %d, GLenum type = 0x%X, GLsizei stride = %d, const void "
        "*pointer = 0x%016" PRIxPTR ")",
        index, size, type, stride, (uintptr_t)pointer);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(VertexAttribLPointer, context, index, size, type, stride, pointer);
        if (context->skipValidation() ||
            ValidateVertexAttribLPointer(context, index, size, type, stride, pointer))
        {
            context->vertexAttribLPointer(index, size, type, stride, pointer);
        }
    }
}

void GL_APIENTRY ViewportArrayv(GLuint first, GLsizei count, const GLfloat *v)
{
    EVENT("(GLuint first = %u, GLsizei count = %d, const GLfloat *v = 0x%016" PRIxPTR ")", first,
          count, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ViewportArrayv, context, first, count, v);
        if (context->skipValidation() || ValidateViewportArrayv(context, first, count, v))
        {
            context->viewportArrayv(first, count, v);
        }
    }
}

void GL_APIENTRY ViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)
{
    EVENT("(GLuint index = %u, GLfloat x = %f, GLfloat y = %f, GLfloat w = %f, GLfloat h = %f)",
          index, x, y, w, h);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ViewportIndexedf, context, index, x, y, w, h);
        if (context->skipValidation() || ValidateViewportIndexedf(context, index, x, y, w, h))
        {
            context->viewportIndexedf(index, x, y, w, h);
        }
    }
}

void GL_APIENTRY ViewportIndexedfv(GLuint index, const GLfloat *v)
{
    EVENT("(GLuint index = %u, const GLfloat *v = 0x%016" PRIxPTR ")", index, (uintptr_t)v);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ViewportIndexedfv, context, index, v);
        if (context->skipValidation() || ValidateViewportIndexedfv(context, index, v))
        {
            context->viewportIndexedfv(index, v);
        }
    }
}
}  // namespace gl
