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

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

namespace gl
{
void GL_APIENTRY BeginQueryIndexed(GLenum target, GLuint index, GLuint id)
{
    EVENT("(GLenum target = 0x%X, GLuint index = %u, GLuint id = %u)", target, index, id);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BeginQueryIndexed, context, target, index, id);
        if (context->skipValidation() || ValidateBeginQueryIndexed(context, target, index, id))
        {
            context->beginQueryIndexed(target, index, id);
        }
    }
}

void GL_APIENTRY BindTransformFeedback(GLenum target, GLuint id)
{
    EVENT("(GLenum target = 0x%X, GLuint id = %u)", target, id);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BindTransformFeedback, context, target, id);
        if (context->skipValidation() || ValidateBindTransformFeedback(context, target, id))
        {
            context->bindTransformFeedback(target, id);
        }
    }
}

void GL_APIENTRY BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeAlpha)
{
    EVENT("(GLuint buf = %u, GLenum modeRGB = 0x%X, GLenum modeAlpha = 0x%X)", buf, modeRGB,
          modeAlpha);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BlendEquationSeparatei, context, buf, modeRGB, modeAlpha);
        if (context->skipValidation() ||
            ValidateBlendEquationSeparatei(context, buf, modeRGB, modeAlpha))
        {
            context->blendEquationSeparatei(buf, modeRGB, modeAlpha);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BlendEquationi, context, buf, mode);
        if (context->skipValidation() || ValidateBlendEquationi(context, buf, mode))
        {
            context->blendEquationi(buf, mode);
        }
    }
}

void GL_APIENTRY
BlendFuncSeparatei(GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
    EVENT(
        "(GLuint buf = %u, GLenum srcRGB = 0x%X, GLenum dstRGB = 0x%X, GLenum srcAlpha = 0x%X, "
        "GLenum dstAlpha = 0x%X)",
        buf, srcRGB, dstRGB, srcAlpha, dstAlpha);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BlendFuncSeparatei, context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
        if (context->skipValidation() ||
            ValidateBlendFuncSeparatei(context, buf, srcRGB, dstRGB, srcAlpha, dstAlpha))
        {
            context->blendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha);
        }
    }
}

void GL_APIENTRY BlendFunci(GLuint buf, GLenum src, GLenum dst)
{
    EVENT("(GLuint buf = %u, GLenum src = 0x%X, GLenum dst = 0x%X)", buf, src, dst);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(BlendFunci, context, buf, src, dst);
        if (context->skipValidation() || ValidateBlendFunci(context, buf, src, dst))
        {
            context->blendFunci(buf, src, dst);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DeleteTransformFeedbacks, context, n, ids);
        if (context->skipValidation() || ValidateDeleteTransformFeedbacks(context, n, ids))
        {
            context->deleteTransformFeedbacks(n, ids);
        }
    }
}

void GL_APIENTRY DrawArraysIndirect(GLenum mode, const void *indirect)
{
    EVENT("(GLenum mode = 0x%X, const void *indirect = 0x%016" PRIxPTR ")", mode,
          (uintptr_t)indirect);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        PrimitiveMode modePacked = FromGLenum<PrimitiveMode>(mode);
        ANGLE_CAPTURE(DrawArraysIndirect, context, modePacked, indirect);
        if (context->skipValidation() || ValidateDrawArraysIndirect(context, modePacked, indirect))
        {
            context->drawArraysIndirect(modePacked, indirect);
        }
    }
}

void GL_APIENTRY DrawElementsIndirect(GLenum mode, GLenum type, const void *indirect)
{
    EVENT("(GLenum mode = 0x%X, GLenum type = 0x%X, const void *indirect = 0x%016" PRIxPTR ")",
          mode, type, (uintptr_t)indirect);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        PrimitiveMode modePacked    = FromGLenum<PrimitiveMode>(mode);
        DrawElementsType typePacked = FromGLenum<DrawElementsType>(type);
        ANGLE_CAPTURE(DrawElementsIndirect, context, modePacked, typePacked, indirect);
        if (context->skipValidation() ||
            ValidateDrawElementsIndirect(context, modePacked, typePacked, indirect))
        {
            context->drawElementsIndirect(modePacked, typePacked, indirect);
        }
    }
}

void GL_APIENTRY DrawTransformFeedback(GLenum mode, GLuint id)
{
    EVENT("(GLenum mode = 0x%X, GLuint id = %u)", mode, id);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DrawTransformFeedback, context, mode, id);
        if (context->skipValidation() || ValidateDrawTransformFeedback(context, mode, id))
        {
            context->drawTransformFeedback(mode, id);
        }
    }
}

void GL_APIENTRY DrawTransformFeedbackStream(GLenum mode, GLuint id, GLuint stream)
{
    EVENT("(GLenum mode = 0x%X, GLuint id = %u, GLuint stream = %u)", mode, id, stream);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(DrawTransformFeedbackStream, context, mode, id, stream);
        if (context->skipValidation() ||
            ValidateDrawTransformFeedbackStream(context, mode, id, stream))
        {
            context->drawTransformFeedbackStream(mode, id, stream);
        }
    }
}

void GL_APIENTRY EndQueryIndexed(GLenum target, GLuint index)
{
    EVENT("(GLenum target = 0x%X, GLuint index = %u)", target, index);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(EndQueryIndexed, context, target, index);
        if (context->skipValidation() || ValidateEndQueryIndexed(context, target, index))
        {
            context->endQueryIndexed(target, index);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GenTransformFeedbacks, context, n, ids);
        if (context->skipValidation() || ValidateGenTransformFeedbacks(context, n, ids))
        {
            context->genTransformFeedbacks(n, ids);
        }
    }
}

void GL_APIENTRY GetActiveSubroutineName(GLuint program,
                                         GLenum shadertype,
                                         GLuint index,
                                         GLsizei bufsize,
                                         GLsizei *length,
                                         GLchar *name)
{
    EVENT(
        "(GLuint program = %u, GLenum shadertype = 0x%X, GLuint index = %u, GLsizei bufsize = %d, "
        "GLsizei *length = 0x%016" PRIxPTR ", GLchar *name = 0x%016" PRIxPTR ")",
        program, shadertype, index, bufsize, (uintptr_t)length, (uintptr_t)name);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetActiveSubroutineName, context, program, shadertype, index, bufsize, length,
                      name);
        if (context->skipValidation() ||
            ValidateGetActiveSubroutineName(context, program, shadertype, index, bufsize, length,
                                            name))
        {
            context->getActiveSubroutineName(program, shadertype, index, bufsize, length, name);
        }
    }
}

void GL_APIENTRY GetActiveSubroutineUniformName(GLuint program,
                                                GLenum shadertype,
                                                GLuint index,
                                                GLsizei bufsize,
                                                GLsizei *length,
                                                GLchar *name)
{
    EVENT(
        "(GLuint program = %u, GLenum shadertype = 0x%X, GLuint index = %u, GLsizei bufsize = %d, "
        "GLsizei *length = 0x%016" PRIxPTR ", GLchar *name = 0x%016" PRIxPTR ")",
        program, shadertype, index, bufsize, (uintptr_t)length, (uintptr_t)name);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetActiveSubroutineUniformName, context, program, shadertype, index, bufsize,
                      length, name);
        if (context->skipValidation() ||
            ValidateGetActiveSubroutineUniformName(context, program, shadertype, index, bufsize,
                                                   length, name))
        {
            context->getActiveSubroutineUniformName(program, shadertype, index, bufsize, length,
                                                    name);
        }
    }
}

void GL_APIENTRY GetActiveSubroutineUniformiv(GLuint program,
                                              GLenum shadertype,
                                              GLuint index,
                                              GLenum pname,
                                              GLint *values)
{
    EVENT(
        "(GLuint program = %u, GLenum shadertype = 0x%X, GLuint index = %u, GLenum pname = 0x%X, "
        "GLint *values = 0x%016" PRIxPTR ")",
        program, shadertype, index, pname, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetActiveSubroutineUniformiv, context, program, shadertype, index, pname,
                      values);
        if (context->skipValidation() || ValidateGetActiveSubroutineUniformiv(
                                             context, program, shadertype, index, pname, values))
        {
            context->getActiveSubroutineUniformiv(program, shadertype, index, pname, values);
        }
    }
}

void GL_APIENTRY GetProgramStageiv(GLuint program, GLenum shadertype, GLenum pname, GLint *values)
{
    EVENT(
        "(GLuint program = %u, GLenum shadertype = 0x%X, GLenum pname = 0x%X, GLint *values = "
        "0x%016" PRIxPTR ")",
        program, shadertype, pname, (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetProgramStageiv, context, program, shadertype, pname, values);
        if (context->skipValidation() ||
            ValidateGetProgramStageiv(context, program, shadertype, pname, values))
        {
            context->getProgramStageiv(program, shadertype, pname, values);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetQueryIndexediv, context, target, index, pname, params);
        if (context->skipValidation() ||
            ValidateGetQueryIndexediv(context, target, index, pname, params))
        {
            context->getQueryIndexediv(target, index, pname, params);
        }
    }
}

GLuint GL_APIENTRY GetSubroutineIndex(GLuint program, GLenum shadertype, const GLchar *name)
{
    EVENT("(GLuint program = %u, GLenum shadertype = 0x%X, const GLchar *name = 0x%016" PRIxPTR ")",
          program, shadertype, (uintptr_t)name);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetSubroutineIndex, context, program, shadertype, name);
        if (context->skipValidation() ||
            ValidateGetSubroutineIndex(context, program, shadertype, name))
        {
            return context->getSubroutineIndex(program, shadertype, name);
        }
    }

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

GLint GL_APIENTRY GetSubroutineUniformLocation(GLuint program,
                                               GLenum shadertype,
                                               const GLchar *name)
{
    EVENT("(GLuint program = %u, GLenum shadertype = 0x%X, const GLchar *name = 0x%016" PRIxPTR ")",
          program, shadertype, (uintptr_t)name);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetSubroutineUniformLocation, context, program, shadertype, name);
        if (context->skipValidation() ||
            ValidateGetSubroutineUniformLocation(context, program, shadertype, name))
        {
            return context->getSubroutineUniformLocation(program, shadertype, name);
        }
    }

    return GetDefaultReturnValue<EntryPoint::GetSubroutineUniformLocation, GLint>();
}

void GL_APIENTRY GetUniformSubroutineuiv(GLenum shadertype, GLint location, GLuint *params)
{
    EVENT("(GLenum shadertype = 0x%X, GLint location = %d, GLuint *params = 0x%016" PRIxPTR ")",
          shadertype, location, (uintptr_t)params);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetUniformSubroutineuiv, context, shadertype, location, params);
        if (context->skipValidation() ||
            ValidateGetUniformSubroutineuiv(context, shadertype, location, params))
        {
            context->getUniformSubroutineuiv(shadertype, location, params);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(GetUniformdv, context, program, location, params);
        if (context->skipValidation() || ValidateGetUniformdv(context, program, location, params))
        {
            context->getUniformdv(program, location, params);
        }
    }
}

GLboolean GL_APIENTRY IsTransformFeedback(GLuint id)
{
    EVENT("(GLuint id = %u)", id);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(IsTransformFeedback, context, id);
        if (context->skipValidation() || ValidateIsTransformFeedback(context, id))
        {
            return context->isTransformFeedback(id);
        }
    }

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

void GL_APIENTRY MinSampleShading(GLfloat value)
{
    EVENT("(GLfloat value = %f)", value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(MinSampleShading, context, value);
        if (context->skipValidation() || ValidateMinSampleShading(context, value))
        {
            context->minSampleShading(value);
        }
    }
}

void GL_APIENTRY PatchParameterfv(GLenum pname, const GLfloat *values)
{
    EVENT("(GLenum pname = 0x%X, const GLfloat *values = 0x%016" PRIxPTR ")", pname,
          (uintptr_t)values);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(PatchParameterfv, context, pname, values);
        if (context->skipValidation() || ValidatePatchParameterfv(context, pname, values))
        {
            context->patchParameterfv(pname, values);
        }
    }
}

void GL_APIENTRY PatchParameteri(GLenum pname, GLint value)
{
    EVENT("(GLenum pname = 0x%X, GLint value = %d)", pname, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(PatchParameteri, context, pname, value);
        if (context->skipValidation() || ValidatePatchParameteri(context, pname, value))
        {
            context->patchParameteri(pname, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(PauseTransformFeedback, context);
        if (context->skipValidation() || ValidatePauseTransformFeedback(context))
        {
            context->pauseTransformFeedback();
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(ResumeTransformFeedback, context);
        if (context->skipValidation() || ValidateResumeTransformFeedback(context))
        {
            context->resumeTransformFeedback();
        }
    }
}

void GL_APIENTRY Uniform1d(GLint location, GLdouble x)
{
    EVENT("(GLint location = %d, GLdouble x = %f)", location, x);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform1d, context, location, x);
        if (context->skipValidation() || ValidateUniform1d(context, location, x))
        {
            context->uniform1d(location, x);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform1dv, context, location, count, value);
        if (context->skipValidation() || ValidateUniform1dv(context, location, count, value))
        {
            context->uniform1dv(location, count, value);
        }
    }
}

void GL_APIENTRY Uniform2d(GLint location, GLdouble x, GLdouble y)
{
    EVENT("(GLint location = %d, GLdouble x = %f, GLdouble y = %f)", location, x, y);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform2d, context, location, x, y);
        if (context->skipValidation() || ValidateUniform2d(context, location, x, y))
        {
            context->uniform2d(location, x, y);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform2dv, context, location, count, value);
        if (context->skipValidation() || ValidateUniform2dv(context, location, count, value))
        {
            context->uniform2dv(location, count, value);
        }
    }
}

void GL_APIENTRY Uniform3d(GLint location, GLdouble x, GLdouble y, GLdouble z)
{
    EVENT("(GLint location = %d, GLdouble x = %f, GLdouble y = %f, GLdouble z = %f)", location, x,
          y, z);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform3d, context, location, x, y, z);
        if (context->skipValidation() || ValidateUniform3d(context, location, x, y, z))
        {
            context->uniform3d(location, x, y, z);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform3dv, context, location, count, value);
        if (context->skipValidation() || ValidateUniform3dv(context, location, count, value))
        {
            context->uniform3dv(location, count, value);
        }
    }
}

void GL_APIENTRY Uniform4d(GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w)
{
    EVENT(
        "(GLint location = %d, GLdouble x = %f, GLdouble y = %f, GLdouble z = %f, GLdouble w = %f)",
        location, x, y, z, w);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform4d, context, location, x, y, z, w);
        if (context->skipValidation() || ValidateUniform4d(context, location, x, y, z, w))
        {
            context->uniform4d(location, x, y, z, w);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(Uniform4dv, context, location, count, value);
        if (context->skipValidation() || ValidateUniform4dv(context, location, count, value))
        {
            context->uniform4dv(location, count, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix2dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix2dv(context, location, count, transpose, value))
        {
            context->uniformMatrix2dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix2x3dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix2x3dv(context, location, count, transpose, value))
        {
            context->uniformMatrix2x3dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix2x4dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix2x4dv(context, location, count, transpose, value))
        {
            context->uniformMatrix2x4dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix3dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix3dv(context, location, count, transpose, value))
        {
            context->uniformMatrix3dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix3x2dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix3x2dv(context, location, count, transpose, value))
        {
            context->uniformMatrix3x2dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix3x4dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix3x4dv(context, location, count, transpose, value))
        {
            context->uniformMatrix3x4dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix4dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix4dv(context, location, count, transpose, value))
        {
            context->uniformMatrix4dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix4x2dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix4x2dv(context, location, count, transpose, value))
        {
            context->uniformMatrix4x2dv(location, count, transpose, value);
        }
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformMatrix4x3dv, context, location, count, transpose, value);
        if (context->skipValidation() ||
            ValidateUniformMatrix4x3dv(context, location, count, transpose, value))
        {
            context->uniformMatrix4x3dv(location, count, transpose, value);
        }
    }
}

void GL_APIENTRY UniformSubroutinesuiv(GLenum shadertype, GLsizei count, const GLuint *indices)
{
    EVENT("(GLenum shadertype = 0x%X, GLsizei count = %d, const GLuint *indices = 0x%016" PRIxPTR
          ")",
          shadertype, count, (uintptr_t)indices);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        ANGLE_CAPTURE(UniformSubroutinesuiv, context, shadertype, count, indices);
        if (context->skipValidation() ||
            ValidateUniformSubroutinesuiv(context, shadertype, count, indices))
        {
            context->uniformSubroutinesuiv(shadertype, count, indices);
        }
    }
}
}  // namespace gl
