// 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateActiveShaderProgram(context, pipeline, program));
        if (isCallValid)
        {
            context->activeShaderProgram(pipeline, program);
        }
        ANGLE_CAPTURE(ActiveShaderProgram, isCallValid, context, pipeline, program);
    }
}

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

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

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateClearDepthf(context, d));
        if (isCallValid)
        {
            context->clearDepthf(d);
        }
        ANGLE_CAPTURE(ClearDepthf, isCallValid, context, 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();
    GLuint returnValue;
    if (context)
    {
        ShaderType typePacked = FromGL<ShaderType>(type);
        bool isCallValid      = (context->skipValidation() ||
                            ValidateCreateShaderProgramv(context, typePacked, count, strings));
        if (isCallValid)
        {
            returnValue = context->createShaderProgramv(typePacked, count, strings);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
        }
        ANGLE_CAPTURE(CreateShaderProgramv, isCallValid, context, typePacked, count, strings,
                      returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::CreateShaderProgramv, GLuint>();
    }
    return returnValue;
}

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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateDeleteProgramPipelines(context, n, pipelines));
        if (isCallValid)
        {
            context->deleteProgramPipelines(n, pipelines);
        }
        ANGLE_CAPTURE(DeleteProgramPipelines, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateDepthRangeArrayv(context, first, count, v));
        if (isCallValid)
        {
            context->depthRangeArrayv(first, count, v);
        }
        ANGLE_CAPTURE(DepthRangeArrayv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateDepthRangeIndexed(context, index, n, f));
        if (isCallValid)
        {
            context->depthRangeIndexed(index, n, f);
        }
        ANGLE_CAPTURE(DepthRangeIndexed, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() || ValidateDepthRangef(context, n, f));
        if (isCallValid)
        {
            context->depthRangef(n, f);
        }
        ANGLE_CAPTURE(DepthRangef, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGenProgramPipelines(context, n, pipelines));
        if (isCallValid)
        {
            context->genProgramPipelines(n, pipelines);
        }
        ANGLE_CAPTURE(GenProgramPipelines, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetDoublei_v(context, target, index, data));
        if (isCallValid)
        {
            context->getDoublei_v(target, index, data);
        }
        ANGLE_CAPTURE(GetDoublei_v, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetFloati_v(context, target, index, data));
        if (isCallValid)
        {
            context->getFloati_v(target, index, data);
        }
        ANGLE_CAPTURE(GetFloati_v, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetProgramBinary(context, program, bufSize, length, binaryFormat, binary));
        if (isCallValid)
        {
            context->getProgramBinary(program, bufSize, length, binaryFormat, binary);
        }
        ANGLE_CAPTURE(GetProgramBinary, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateGetProgramPipelineInfoLog(context, pipeline, bufSize, length, infoLog));
        if (isCallValid)
        {
            context->getProgramPipelineInfoLog(pipeline, bufSize, length, infoLog);
        }
        ANGLE_CAPTURE(GetProgramPipelineInfoLog, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetProgramPipelineiv(context, pipeline, pname, params));
        if (isCallValid)
        {
            context->getProgramPipelineiv(pipeline, pname, params);
        }
        ANGLE_CAPTURE(GetProgramPipelineiv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetShaderPrecisionFormat(context, shadertype, precisiontype,
                                                             range, precision));
        if (isCallValid)
        {
            context->getShaderPrecisionFormat(shadertype, precisiontype, range, precision);
        }
        ANGLE_CAPTURE(GetShaderPrecisionFormat, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetVertexAttribLdv(context, index, pname, params));
        if (isCallValid)
        {
            context->getVertexAttribLdv(index, pname, params);
        }
        ANGLE_CAPTURE(GetVertexAttribLdv, isCallValid, context, index, pname, params);
    }
}

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

    Context *context = GetValidGlobalContext();
    GLboolean returnValue;
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateIsProgramPipeline(context, pipeline));
        if (isCallValid)
        {
            returnValue = context->isProgramPipeline(pipeline);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
        }
        ANGLE_CAPTURE(IsProgramPipeline, isCallValid, context, pipeline, returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::IsProgramPipeline, GLboolean>();
    }
    return returnValue;
}

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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramBinary(context, program, binaryFormat, binary, length));
        if (isCallValid)
        {
            context->programBinary(program, binaryFormat, binary, length);
        }
        ANGLE_CAPTURE(ProgramBinary, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramParameteri(context, program, pname, value));
        if (isCallValid)
        {
            context->programParameteri(program, pname, value);
        }
        ANGLE_CAPTURE(ProgramParameteri, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniform1d(context, program, location, v0));
        if (isCallValid)
        {
            context->programUniform1d(program, location, v0);
        }
        ANGLE_CAPTURE(ProgramUniform1d, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform1dv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform1dv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform1dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniform1f(context, program, location, v0));
        if (isCallValid)
        {
            context->programUniform1f(program, location, v0);
        }
        ANGLE_CAPTURE(ProgramUniform1f, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform1fv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform1fv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform1fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniform1i(context, program, location, v0));
        if (isCallValid)
        {
            context->programUniform1i(program, location, v0);
        }
        ANGLE_CAPTURE(ProgramUniform1i, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform1iv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform1iv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform1iv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform1ui(context, program, location, v0));
        if (isCallValid)
        {
            context->programUniform1ui(program, location, v0);
        }
        ANGLE_CAPTURE(ProgramUniform1ui, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform1uiv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform1uiv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform1uiv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2d(context, program, location, v0, v1));
        if (isCallValid)
        {
            context->programUniform2d(program, location, v0, v1);
        }
        ANGLE_CAPTURE(ProgramUniform2d, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2dv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform2dv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform2dv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2f(context, program, location, v0, v1));
        if (isCallValid)
        {
            context->programUniform2f(program, location, v0, v1);
        }
        ANGLE_CAPTURE(ProgramUniform2f, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2fv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform2fv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform2fv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2i(context, program, location, v0, v1));
        if (isCallValid)
        {
            context->programUniform2i(program, location, v0, v1);
        }
        ANGLE_CAPTURE(ProgramUniform2i, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2iv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform2iv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform2iv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2ui(context, program, location, v0, v1));
        if (isCallValid)
        {
            context->programUniform2ui(program, location, v0, v1);
        }
        ANGLE_CAPTURE(ProgramUniform2ui, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform2uiv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform2uiv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform2uiv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3d(context, program, location, v0, v1, v2));
        if (isCallValid)
        {
            context->programUniform3d(program, location, v0, v1, v2);
        }
        ANGLE_CAPTURE(ProgramUniform3d, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3dv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform3dv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform3dv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3f(context, program, location, v0, v1, v2));
        if (isCallValid)
        {
            context->programUniform3f(program, location, v0, v1, v2);
        }
        ANGLE_CAPTURE(ProgramUniform3f, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3fv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform3fv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform3fv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3i(context, program, location, v0, v1, v2));
        if (isCallValid)
        {
            context->programUniform3i(program, location, v0, v1, v2);
        }
        ANGLE_CAPTURE(ProgramUniform3i, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3iv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform3iv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform3iv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3ui(context, program, location, v0, v1, v2));
        if (isCallValid)
        {
            context->programUniform3ui(program, location, v0, v1, v2);
        }
        ANGLE_CAPTURE(ProgramUniform3ui, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform3uiv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform3uiv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform3uiv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4d(context, program, location, v0, v1, v2, v3));
        if (isCallValid)
        {
            context->programUniform4d(program, location, v0, v1, v2, v3);
        }
        ANGLE_CAPTURE(ProgramUniform4d, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4dv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform4dv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform4dv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4f(context, program, location, v0, v1, v2, v3));
        if (isCallValid)
        {
            context->programUniform4f(program, location, v0, v1, v2, v3);
        }
        ANGLE_CAPTURE(ProgramUniform4f, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4fv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform4fv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform4fv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4i(context, program, location, v0, v1, v2, v3));
        if (isCallValid)
        {
            context->programUniform4i(program, location, v0, v1, v2, v3);
        }
        ANGLE_CAPTURE(ProgramUniform4i, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4iv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform4iv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform4iv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4ui(context, program, location, v0, v1, v2, v3));
        if (isCallValid)
        {
            context->programUniform4ui(program, location, v0, v1, v2, v3);
        }
        ANGLE_CAPTURE(ProgramUniform4ui, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateProgramUniform4uiv(context, program, location, count, value));
        if (isCallValid)
        {
            context->programUniform4uiv(program, location, count, value);
        }
        ANGLE_CAPTURE(ProgramUniform4uiv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateProgramUniformMatrix2dv(context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix2dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix2dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateProgramUniformMatrix2fv(context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix2fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix2fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix2x3dv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix2x3dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix2x3dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix2x3fv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix2x3fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix2x3fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix2x4dv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix2x4dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix2x4dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix2x4fv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix2x4fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix2x4fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateProgramUniformMatrix3dv(context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix3dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix3dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateProgramUniformMatrix3fv(context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix3fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix3fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix3x2dv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix3x2dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix3x2dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix3x2fv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix3x2fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix3x2fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix3x4dv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix3x4dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix3x4dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix3x4fv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix3x4fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix3x4fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateProgramUniformMatrix4dv(context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix4dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix4dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateProgramUniformMatrix4fv(context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix4fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix4fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix4x2dv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix4x2dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix4x2dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix4x2fv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix4x2fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix4x2fv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix4x3dv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix4x3dv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix4x3dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateProgramUniformMatrix4x3fv(
                                              context, program, location, count, transpose, value));
        if (isCallValid)
        {
            context->programUniformMatrix4x3fv(program, location, count, transpose, value);
        }
        ANGLE_CAPTURE(ProgramUniformMatrix4x3fv, isCallValid, context, program, location, count,
                      transpose, value);
    }
}

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

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

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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateScissorArrayv(context, first, count, v));
        if (isCallValid)
        {
            context->scissorArrayv(first, count, v);
        }
        ANGLE_CAPTURE(ScissorArrayv, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateScissorIndexed(context, index, left, bottom, width, height));
        if (isCallValid)
        {
            context->scissorIndexed(index, left, bottom, width, height);
        }
        ANGLE_CAPTURE(ScissorIndexed, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateScissorIndexedv(context, index, v));
        if (isCallValid)
        {
            context->scissorIndexedv(index, v);
        }
        ANGLE_CAPTURE(ScissorIndexedv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateShaderBinary(context, count, shaders, binaryformat, binary, length));
        if (isCallValid)
        {
            context->shaderBinary(count, shaders, binaryformat, binary, length);
        }
        ANGLE_CAPTURE(ShaderBinary, isCallValid, context, 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)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateUseProgramStages(context, pipeline, stages, program));
        if (isCallValid)
        {
            context->useProgramStages(pipeline, stages, program);
        }
        ANGLE_CAPTURE(UseProgramStages, isCallValid, context, pipeline, stages, program);
    }
}

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

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

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL1d(context, index, x));
        if (isCallValid)
        {
            context->vertexAttribL1d(index, x);
        }
        ANGLE_CAPTURE(VertexAttribL1d, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL1dv(context, index, v));
        if (isCallValid)
        {
            context->vertexAttribL1dv(index, v);
        }
        ANGLE_CAPTURE(VertexAttribL1dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL2d(context, index, x, y));
        if (isCallValid)
        {
            context->vertexAttribL2d(index, x, y);
        }
        ANGLE_CAPTURE(VertexAttribL2d, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL2dv(context, index, v));
        if (isCallValid)
        {
            context->vertexAttribL2dv(index, v);
        }
        ANGLE_CAPTURE(VertexAttribL2dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL3d(context, index, x, y, z));
        if (isCallValid)
        {
            context->vertexAttribL3d(index, x, y, z);
        }
        ANGLE_CAPTURE(VertexAttribL3d, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL3dv(context, index, v));
        if (isCallValid)
        {
            context->vertexAttribL3dv(index, v);
        }
        ANGLE_CAPTURE(VertexAttribL3dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL4d(context, index, x, y, z, w));
        if (isCallValid)
        {
            context->vertexAttribL4d(index, x, y, z, w);
        }
        ANGLE_CAPTURE(VertexAttribL4d, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribL4dv(context, index, v));
        if (isCallValid)
        {
            context->vertexAttribL4dv(index, v);
        }
        ANGLE_CAPTURE(VertexAttribL4dv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateVertexAttribLPointer(context, index, size, type, stride, pointer));
        if (isCallValid)
        {
            context->vertexAttribLPointer(index, size, type, stride, pointer);
        }
        ANGLE_CAPTURE(VertexAttribLPointer, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateViewportArrayv(context, first, count, v));
        if (isCallValid)
        {
            context->viewportArrayv(first, count, v);
        }
        ANGLE_CAPTURE(ViewportArrayv, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateViewportIndexedf(context, index, x, y, w, h));
        if (isCallValid)
        {
            context->viewportIndexedf(index, x, y, w, h);
        }
        ANGLE_CAPTURE(ViewportIndexedf, isCallValid, context, 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)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateViewportIndexedfv(context, index, v));
        if (isCallValid)
        {
            context->viewportIndexedfv(index, v);
        }
        ANGLE_CAPTURE(ViewportIndexedfv, isCallValid, context, index, v);
    }
}
}  // namespace gl
