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

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

namespace gl
{
void GL_APIENTRY BindFragDataLocationIndexed(GLuint program,
                                             GLuint colorNumber,
                                             GLuint index,
                                             const GLchar *name)
{
    EVENT(
        "(GLuint program = %u, GLuint colorNumber = %u, GLuint index = %u, const GLchar *name = "
        "0x%016" PRIxPTR ")",
        program, colorNumber, index, (uintptr_t)name);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() ||
             ValidateBindFragDataLocationIndexed(context, program, colorNumber, index, name));
        if (isCallValid)
        {
            context->bindFragDataLocationIndexed(program, colorNumber, index, name);
        }
        ANGLE_CAPTURE(BindFragDataLocationIndexed, isCallValid, context, program, colorNumber,
                      index, name);
    }
}

void GL_APIENTRY BindSampler(GLuint unit, GLuint sampler)
{
    EVENT("(GLuint unit = %u, GLuint sampler = %u)", unit, sampler);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateBindSampler(context, unit, sampler));
        if (isCallValid)
        {
            context->bindSampler(unit, sampler);
        }
        ANGLE_CAPTURE(BindSampler, isCallValid, context, unit, sampler);
    }
}

void GL_APIENTRY ColorP3ui(GLenum type, GLuint color)
{
    EVENT("(GLenum type = 0x%X, GLuint color = %u)", type, color);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateColorP3ui(context, type, color));
        if (isCallValid)
        {
            context->colorP3ui(type, color);
        }
        ANGLE_CAPTURE(ColorP3ui, isCallValid, context, type, color);
    }
}

void GL_APIENTRY ColorP3uiv(GLenum type, const GLuint *color)
{
    EVENT("(GLenum type = 0x%X, const GLuint *color = 0x%016" PRIxPTR ")", type, (uintptr_t)color);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateColorP3uiv(context, type, color));
        if (isCallValid)
        {
            context->colorP3uiv(type, color);
        }
        ANGLE_CAPTURE(ColorP3uiv, isCallValid, context, type, color);
    }
}

void GL_APIENTRY ColorP4ui(GLenum type, GLuint color)
{
    EVENT("(GLenum type = 0x%X, GLuint color = %u)", type, color);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateColorP4ui(context, type, color));
        if (isCallValid)
        {
            context->colorP4ui(type, color);
        }
        ANGLE_CAPTURE(ColorP4ui, isCallValid, context, type, color);
    }
}

void GL_APIENTRY ColorP4uiv(GLenum type, const GLuint *color)
{
    EVENT("(GLenum type = 0x%X, const GLuint *color = 0x%016" PRIxPTR ")", type, (uintptr_t)color);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateColorP4uiv(context, type, color));
        if (isCallValid)
        {
            context->colorP4uiv(type, color);
        }
        ANGLE_CAPTURE(ColorP4uiv, isCallValid, context, type, color);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateDeleteSamplers(context, count, samplers));
        if (isCallValid)
        {
            context->deleteSamplers(count, samplers);
        }
        ANGLE_CAPTURE(DeleteSamplers, isCallValid, context, count, samplers);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGenSamplers(context, count, samplers));
        if (isCallValid)
        {
            context->genSamplers(count, samplers);
        }
        ANGLE_CAPTURE(GenSamplers, isCallValid, context, count, samplers);
    }
}

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

    Context *context = GetValidGlobalContext();
    GLint returnValue;
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetFragDataIndex(context, program, name));
        if (isCallValid)
        {
            returnValue = context->getFragDataIndex(program, name);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::GetFragDataIndex, GLint>();
        }
        ANGLE_CAPTURE(GetFragDataIndex, isCallValid, context, program, name, returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::GetFragDataIndex, GLint>();
    }
    return returnValue;
}

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

    Context *context = GetGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetQueryObjecti64v(context, id, pname, params));
        if (isCallValid)
        {
            context->getQueryObjecti64v(id, pname, params);
        }
        ANGLE_CAPTURE(GetQueryObjecti64v, isCallValid, context, id, pname, params);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateGetQueryObjectui64v(context, id, pname, params));
        if (isCallValid)
        {
            context->getQueryObjectui64v(id, pname, params);
        }
        ANGLE_CAPTURE(GetQueryObjectui64v, isCallValid, context, id, pname, params);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetSamplerParameterIiv(context, sampler, pname, params));
        if (isCallValid)
        {
            context->getSamplerParameterIiv(sampler, pname, params);
        }
        ANGLE_CAPTURE(GetSamplerParameterIiv, isCallValid, context, sampler, pname, params);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetSamplerParameterIuiv(context, sampler, pname, params));
        if (isCallValid)
        {
            context->getSamplerParameterIuiv(sampler, pname, params);
        }
        ANGLE_CAPTURE(GetSamplerParameterIuiv, isCallValid, context, sampler, pname, params);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetSamplerParameterfv(context, sampler, pname, params));
        if (isCallValid)
        {
            context->getSamplerParameterfv(sampler, pname, params);
        }
        ANGLE_CAPTURE(GetSamplerParameterfv, isCallValid, context, sampler, pname, params);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateGetSamplerParameteriv(context, sampler, pname, params));
        if (isCallValid)
        {
            context->getSamplerParameteriv(sampler, pname, params);
        }
        ANGLE_CAPTURE(GetSamplerParameteriv, isCallValid, context, sampler, pname, params);
    }
}

GLboolean GL_APIENTRY IsSampler(GLuint sampler)
{
    EVENT("(GLuint sampler = %u)", sampler);

    Context *context = GetValidGlobalContext();
    GLboolean returnValue;
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateIsSampler(context, sampler));
        if (isCallValid)
        {
            returnValue = context->isSampler(sampler);
        }
        else
        {
            returnValue = GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
        }
        ANGLE_CAPTURE(IsSampler, isCallValid, context, sampler, returnValue);
    }
    else
    {
        returnValue = GetDefaultReturnValue<EntryPoint::IsSampler, GLboolean>();
    }
    return returnValue;
}

void GL_APIENTRY MultiTexCoordP1ui(GLenum texture, GLenum type, GLuint coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, GLuint coords = %u)", texture, type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP1ui(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP1ui(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP1ui, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP1uiv(GLenum texture, GLenum type, const GLuint *coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")",
          texture, type, (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP1uiv(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP1uiv(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP1uiv, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP2ui(GLenum texture, GLenum type, GLuint coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, GLuint coords = %u)", texture, type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP2ui(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP2ui(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP2ui, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP2uiv(GLenum texture, GLenum type, const GLuint *coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")",
          texture, type, (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP2uiv(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP2uiv(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP2uiv, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP3ui(GLenum texture, GLenum type, GLuint coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, GLuint coords = %u)", texture, type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP3ui(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP3ui(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP3ui, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP3uiv(GLenum texture, GLenum type, const GLuint *coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")",
          texture, type, (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP3uiv(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP3uiv(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP3uiv, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP4ui(GLenum texture, GLenum type, GLuint coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, GLuint coords = %u)", texture, type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP4ui(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP4ui(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP4ui, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY MultiTexCoordP4uiv(GLenum texture, GLenum type, const GLuint *coords)
{
    EVENT("(GLenum texture = 0x%X, GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")",
          texture, type, (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateMultiTexCoordP4uiv(context, texture, type, coords));
        if (isCallValid)
        {
            context->multiTexCoordP4uiv(texture, type, coords);
        }
        ANGLE_CAPTURE(MultiTexCoordP4uiv, isCallValid, context, texture, type, coords);
    }
}

void GL_APIENTRY NormalP3ui(GLenum type, GLuint coords)
{
    EVENT("(GLenum type = 0x%X, GLuint coords = %u)", type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateNormalP3ui(context, type, coords));
        if (isCallValid)
        {
            context->normalP3ui(type, coords);
        }
        ANGLE_CAPTURE(NormalP3ui, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY NormalP3uiv(GLenum type, const GLuint *coords)
{
    EVENT("(GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")", type,
          (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateNormalP3uiv(context, type, coords));
        if (isCallValid)
        {
            context->normalP3uiv(type, coords);
        }
        ANGLE_CAPTURE(NormalP3uiv, isCallValid, context, type, coords);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        QueryType targetPacked = FromGLenum<QueryType>(target);
        bool isCallValid =
            (context->skipValidation() || ValidateQueryCounter(context, id, targetPacked));
        if (isCallValid)
        {
            context->queryCounter(id, targetPacked);
        }
        ANGLE_CAPTURE(QueryCounter, isCallValid, context, id, targetPacked);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateSamplerParameterIiv(context, sampler, pname, param));
        if (isCallValid)
        {
            context->samplerParameterIiv(sampler, pname, param);
        }
        ANGLE_CAPTURE(SamplerParameterIiv, isCallValid, context, sampler, pname, param);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateSamplerParameterIuiv(context, sampler, pname, param));
        if (isCallValid)
        {
            context->samplerParameterIuiv(sampler, pname, param);
        }
        ANGLE_CAPTURE(SamplerParameterIuiv, isCallValid, context, sampler, pname, param);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateSamplerParameterf(context, sampler, pname, param));
        if (isCallValid)
        {
            context->samplerParameterf(sampler, pname, param);
        }
        ANGLE_CAPTURE(SamplerParameterf, isCallValid, context, sampler, pname, param);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateSamplerParameterfv(context, sampler, pname, param));
        if (isCallValid)
        {
            context->samplerParameterfv(sampler, pname, param);
        }
        ANGLE_CAPTURE(SamplerParameterfv, isCallValid, context, sampler, pname, param);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateSamplerParameteri(context, sampler, pname, param));
        if (isCallValid)
        {
            context->samplerParameteri(sampler, pname, param);
        }
        ANGLE_CAPTURE(SamplerParameteri, isCallValid, context, sampler, pname, param);
    }
}

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

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateSamplerParameteriv(context, sampler, pname, param));
        if (isCallValid)
        {
            context->samplerParameteriv(sampler, pname, param);
        }
        ANGLE_CAPTURE(SamplerParameteriv, isCallValid, context, sampler, pname, param);
    }
}

void GL_APIENTRY SecondaryColorP3ui(GLenum type, GLuint color)
{
    EVENT("(GLenum type = 0x%X, GLuint color = %u)", type, color);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateSecondaryColorP3ui(context, type, color));
        if (isCallValid)
        {
            context->secondaryColorP3ui(type, color);
        }
        ANGLE_CAPTURE(SecondaryColorP3ui, isCallValid, context, type, color);
    }
}

void GL_APIENTRY SecondaryColorP3uiv(GLenum type, const GLuint *color)
{
    EVENT("(GLenum type = 0x%X, const GLuint *color = 0x%016" PRIxPTR ")", type, (uintptr_t)color);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateSecondaryColorP3uiv(context, type, color));
        if (isCallValid)
        {
            context->secondaryColorP3uiv(type, color);
        }
        ANGLE_CAPTURE(SecondaryColorP3uiv, isCallValid, context, type, color);
    }
}

void GL_APIENTRY TexCoordP1ui(GLenum type, GLuint coords)
{
    EVENT("(GLenum type = 0x%X, GLuint coords = %u)", type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP1ui(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP1ui(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP1ui, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP1uiv(GLenum type, const GLuint *coords)
{
    EVENT("(GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")", type,
          (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP1uiv(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP1uiv(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP1uiv, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP2ui(GLenum type, GLuint coords)
{
    EVENT("(GLenum type = 0x%X, GLuint coords = %u)", type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP2ui(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP2ui(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP2ui, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP2uiv(GLenum type, const GLuint *coords)
{
    EVENT("(GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")", type,
          (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP2uiv(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP2uiv(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP2uiv, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP3ui(GLenum type, GLuint coords)
{
    EVENT("(GLenum type = 0x%X, GLuint coords = %u)", type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP3ui(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP3ui(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP3ui, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP3uiv(GLenum type, const GLuint *coords)
{
    EVENT("(GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")", type,
          (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP3uiv(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP3uiv(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP3uiv, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP4ui(GLenum type, GLuint coords)
{
    EVENT("(GLenum type = 0x%X, GLuint coords = %u)", type, coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP4ui(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP4ui(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP4ui, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY TexCoordP4uiv(GLenum type, const GLuint *coords)
{
    EVENT("(GLenum type = 0x%X, const GLuint *coords = 0x%016" PRIxPTR ")", type,
          (uintptr_t)coords);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateTexCoordP4uiv(context, type, coords));
        if (isCallValid)
        {
            context->texCoordP4uiv(type, coords);
        }
        ANGLE_CAPTURE(TexCoordP4uiv, isCallValid, context, type, coords);
    }
}

void GL_APIENTRY VertexAttribDivisor(GLuint index, GLuint divisor)
{
    EVENT("(GLuint index = %u, GLuint divisor = %u)", index, divisor);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid =
            (context->skipValidation() || ValidateVertexAttribDivisor(context, index, divisor));
        if (isCallValid)
        {
            context->vertexAttribDivisor(index, divisor);
        }
        ANGLE_CAPTURE(VertexAttribDivisor, isCallValid, context, index, divisor);
    }
}

void GL_APIENTRY VertexAttribP1ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
{
    EVENT("(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, GLuint value = %u)",
          index, type, normalized, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP1ui(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP1ui(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP1ui, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP1uiv(GLuint index,
                                   GLenum type,
                                   GLboolean normalized,
                                   const GLuint *value)
{
    EVENT(
        "(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        index, type, normalized, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP1uiv(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP1uiv(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP1uiv, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP2ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
{
    EVENT("(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, GLuint value = %u)",
          index, type, normalized, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP2ui(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP2ui(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP2ui, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP2uiv(GLuint index,
                                   GLenum type,
                                   GLboolean normalized,
                                   const GLuint *value)
{
    EVENT(
        "(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        index, type, normalized, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP2uiv(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP2uiv(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP2uiv, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP3ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
{
    EVENT("(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, GLuint value = %u)",
          index, type, normalized, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP3ui(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP3ui(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP3ui, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP3uiv(GLuint index,
                                   GLenum type,
                                   GLboolean normalized,
                                   const GLuint *value)
{
    EVENT(
        "(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        index, type, normalized, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP3uiv(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP3uiv(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP3uiv, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP4ui(GLuint index, GLenum type, GLboolean normalized, GLuint value)
{
    EVENT("(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, GLuint value = %u)",
          index, type, normalized, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP4ui(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP4ui(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP4ui, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexAttribP4uiv(GLuint index,
                                   GLenum type,
                                   GLboolean normalized,
                                   const GLuint *value)
{
    EVENT(
        "(GLuint index = %u, GLenum type = 0x%X, GLboolean normalized = %u, const GLuint *value = "
        "0x%016" PRIxPTR ")",
        index, type, normalized, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() ||
                            ValidateVertexAttribP4uiv(context, index, type, normalized, value));
        if (isCallValid)
        {
            context->vertexAttribP4uiv(index, type, normalized, value);
        }
        ANGLE_CAPTURE(VertexAttribP4uiv, isCallValid, context, index, type, normalized, value);
    }
}

void GL_APIENTRY VertexP2ui(GLenum type, GLuint value)
{
    EVENT("(GLenum type = 0x%X, GLuint value = %u)", type, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateVertexP2ui(context, type, value));
        if (isCallValid)
        {
            context->vertexP2ui(type, value);
        }
        ANGLE_CAPTURE(VertexP2ui, isCallValid, context, type, value);
    }
}

void GL_APIENTRY VertexP2uiv(GLenum type, const GLuint *value)
{
    EVENT("(GLenum type = 0x%X, const GLuint *value = 0x%016" PRIxPTR ")", type, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateVertexP2uiv(context, type, value));
        if (isCallValid)
        {
            context->vertexP2uiv(type, value);
        }
        ANGLE_CAPTURE(VertexP2uiv, isCallValid, context, type, value);
    }
}

void GL_APIENTRY VertexP3ui(GLenum type, GLuint value)
{
    EVENT("(GLenum type = 0x%X, GLuint value = %u)", type, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateVertexP3ui(context, type, value));
        if (isCallValid)
        {
            context->vertexP3ui(type, value);
        }
        ANGLE_CAPTURE(VertexP3ui, isCallValid, context, type, value);
    }
}

void GL_APIENTRY VertexP3uiv(GLenum type, const GLuint *value)
{
    EVENT("(GLenum type = 0x%X, const GLuint *value = 0x%016" PRIxPTR ")", type, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateVertexP3uiv(context, type, value));
        if (isCallValid)
        {
            context->vertexP3uiv(type, value);
        }
        ANGLE_CAPTURE(VertexP3uiv, isCallValid, context, type, value);
    }
}

void GL_APIENTRY VertexP4ui(GLenum type, GLuint value)
{
    EVENT("(GLenum type = 0x%X, GLuint value = %u)", type, value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateVertexP4ui(context, type, value));
        if (isCallValid)
        {
            context->vertexP4ui(type, value);
        }
        ANGLE_CAPTURE(VertexP4ui, isCallValid, context, type, value);
    }
}

void GL_APIENTRY VertexP4uiv(GLenum type, const GLuint *value)
{
    EVENT("(GLenum type = 0x%X, const GLuint *value = 0x%016" PRIxPTR ")", type, (uintptr_t)value);

    Context *context = GetValidGlobalContext();
    if (context)
    {
        bool isCallValid = (context->skipValidation() || ValidateVertexP4uiv(context, type, value));
        if (isCallValid)
        {
            context->vertexP4uiv(type, value);
        }
        ANGLE_CAPTURE(VertexP4uiv, isCallValid, context, type, value);
    }
}
}  // namespace gl
