// GENERATED FILE - DO NOT EDIT.
// Generated by generate_entry_points.py using data from gl.xml and gl_angle_ext.xml.
//
// Copyright 2020 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.
//
// validationES32_autogen.h:
//   Validation functions for the OpenGL ES 3.2 entry points.

#ifndef LIBANGLE_VALIDATION_ES32_AUTOGEN_H_
#define LIBANGLE_VALIDATION_ES32_AUTOGEN_H_

#include "common/PackedEnums.h"
#include "common/entry_points_enum_autogen.h"

namespace gl
{
class Context;

bool ValidateBlendBarrier(const Context *context, angle::EntryPoint entryPoint);
bool ValidateBlendEquationSeparatei(const Context *context,
                                    angle::EntryPoint entryPoint,
                                    GLuint buf,
                                    GLenum modeRGB,
                                    GLenum modeAlpha);
bool ValidateBlendEquationi(const Context *context,
                            angle::EntryPoint entryPoint,
                            GLuint buf,
                            GLenum mode);
bool ValidateBlendFuncSeparatei(const Context *context,
                                angle::EntryPoint entryPoint,
                                GLuint buf,
                                GLenum srcRGB,
                                GLenum dstRGB,
                                GLenum srcAlpha,
                                GLenum dstAlpha);
bool ValidateBlendFunci(const Context *context,
                        angle::EntryPoint entryPoint,
                        GLuint buf,
                        GLenum src,
                        GLenum dst);
bool ValidateColorMaski(const Context *context,
                        angle::EntryPoint entryPoint,
                        GLuint index,
                        GLboolean r,
                        GLboolean g,
                        GLboolean b,
                        GLboolean a);
bool ValidateCopyImageSubData(const Context *context,
                              angle::EntryPoint entryPoint,
                              GLuint srcName,
                              GLenum srcTarget,
                              GLint srcLevel,
                              GLint srcX,
                              GLint srcY,
                              GLint srcZ,
                              GLuint dstName,
                              GLenum dstTarget,
                              GLint dstLevel,
                              GLint dstX,
                              GLint dstY,
                              GLint dstZ,
                              GLsizei srcWidth,
                              GLsizei srcHeight,
                              GLsizei srcDepth);
bool ValidateDebugMessageCallback(const Context *context,
                                  angle::EntryPoint entryPoint,
                                  GLDEBUGPROC callback,
                                  const void *userParam);
bool ValidateDebugMessageControl(const Context *context,
                                 angle::EntryPoint entryPoint,
                                 GLenum source,
                                 GLenum type,
                                 GLenum severity,
                                 GLsizei count,
                                 const GLuint *ids,
                                 GLboolean enabled);
bool ValidateDebugMessageInsert(const Context *context,
                                angle::EntryPoint entryPoint,
                                GLenum source,
                                GLenum type,
                                GLuint id,
                                GLenum severity,
                                GLsizei length,
                                const GLchar *buf);
bool ValidateDisablei(const Context *context,
                      angle::EntryPoint entryPoint,
                      GLenum target,
                      GLuint index);
bool ValidateDrawElementsBaseVertex(const Context *context,
                                    angle::EntryPoint entryPoint,
                                    PrimitiveMode modePacked,
                                    GLsizei count,
                                    DrawElementsType typePacked,
                                    const void *indices,
                                    GLint basevertex);
bool ValidateDrawElementsInstancedBaseVertex(const Context *context,
                                             angle::EntryPoint entryPoint,
                                             PrimitiveMode modePacked,
                                             GLsizei count,
                                             DrawElementsType typePacked,
                                             const void *indices,
                                             GLsizei instancecount,
                                             GLint basevertex);
bool ValidateDrawRangeElementsBaseVertex(const Context *context,
                                         angle::EntryPoint entryPoint,
                                         PrimitiveMode modePacked,
                                         GLuint start,
                                         GLuint end,
                                         GLsizei count,
                                         DrawElementsType typePacked,
                                         const void *indices,
                                         GLint basevertex);
bool ValidateEnablei(const Context *context,
                     angle::EntryPoint entryPoint,
                     GLenum target,
                     GLuint index);
bool ValidateFramebufferTexture(const Context *context,
                                angle::EntryPoint entryPoint,
                                GLenum target,
                                GLenum attachment,
                                TextureID texturePacked,
                                GLint level);
bool ValidateGetDebugMessageLog(const Context *context,
                                angle::EntryPoint entryPoint,
                                GLuint count,
                                GLsizei bufSize,
                                const GLenum *sources,
                                const GLenum *types,
                                const GLuint *ids,
                                const GLenum *severities,
                                const GLsizei *lengths,
                                const GLchar *messageLog);
bool ValidateGetGraphicsResetStatus(const Context *context, angle::EntryPoint entryPoint);
bool ValidateGetObjectLabel(const Context *context,
                            angle::EntryPoint entryPoint,
                            GLenum identifier,
                            GLuint name,
                            GLsizei bufSize,
                            const GLsizei *length,
                            const GLchar *label);
bool ValidateGetObjectPtrLabel(const Context *context,
                               angle::EntryPoint entryPoint,
                               const void *ptr,
                               GLsizei bufSize,
                               const GLsizei *length,
                               const GLchar *label);
bool ValidateGetPointerv(const Context *context,
                         angle::EntryPoint entryPoint,
                         GLenum pname,
                         void *const *params);
bool ValidateGetSamplerParameterIiv(const Context *context,
                                    angle::EntryPoint entryPoint,
                                    SamplerID samplerPacked,
                                    GLenum pname,
                                    const GLint *params);
bool ValidateGetSamplerParameterIuiv(const Context *context,
                                     angle::EntryPoint entryPoint,
                                     SamplerID samplerPacked,
                                     GLenum pname,
                                     const GLuint *params);
bool ValidateGetTexParameterIiv(const Context *context,
                                angle::EntryPoint entryPoint,
                                TextureType targetPacked,
                                GLenum pname,
                                const GLint *params);
bool ValidateGetTexParameterIuiv(const Context *context,
                                 angle::EntryPoint entryPoint,
                                 TextureType targetPacked,
                                 GLenum pname,
                                 const GLuint *params);
bool ValidateGetnUniformfv(const Context *context,
                           angle::EntryPoint entryPoint,
                           ShaderProgramID programPacked,
                           UniformLocation locationPacked,
                           GLsizei bufSize,
                           const GLfloat *params);
bool ValidateGetnUniformiv(const Context *context,
                           angle::EntryPoint entryPoint,
                           ShaderProgramID programPacked,
                           UniformLocation locationPacked,
                           GLsizei bufSize,
                           const GLint *params);
bool ValidateGetnUniformuiv(const Context *context,
                            angle::EntryPoint entryPoint,
                            ShaderProgramID programPacked,
                            UniformLocation locationPacked,
                            GLsizei bufSize,
                            const GLuint *params);
bool ValidateIsEnabledi(const Context *context,
                        angle::EntryPoint entryPoint,
                        GLenum target,
                        GLuint index);
bool ValidateMinSampleShading(const Context *context, angle::EntryPoint entryPoint, GLfloat value);
bool ValidateObjectLabel(const Context *context,
                         angle::EntryPoint entryPoint,
                         GLenum identifier,
                         GLuint name,
                         GLsizei length,
                         const GLchar *label);
bool ValidateObjectPtrLabel(const Context *context,
                            angle::EntryPoint entryPoint,
                            const void *ptr,
                            GLsizei length,
                            const GLchar *label);
bool ValidatePatchParameteri(const Context *context,
                             angle::EntryPoint entryPoint,
                             GLenum pname,
                             GLint value);
bool ValidatePopDebugGroup(const Context *context, angle::EntryPoint entryPoint);
bool ValidatePrimitiveBoundingBox(const Context *context,
                                  angle::EntryPoint entryPoint,
                                  GLfloat minX,
                                  GLfloat minY,
                                  GLfloat minZ,
                                  GLfloat minW,
                                  GLfloat maxX,
                                  GLfloat maxY,
                                  GLfloat maxZ,
                                  GLfloat maxW);
bool ValidatePushDebugGroup(const Context *context,
                            angle::EntryPoint entryPoint,
                            GLenum source,
                            GLuint id,
                            GLsizei length,
                            const GLchar *message);
bool ValidateReadnPixels(const Context *context,
                         angle::EntryPoint entryPoint,
                         GLint x,
                         GLint y,
                         GLsizei width,
                         GLsizei height,
                         GLenum format,
                         GLenum type,
                         GLsizei bufSize,
                         const void *data);
bool ValidateSamplerParameterIiv(const Context *context,
                                 angle::EntryPoint entryPoint,
                                 SamplerID samplerPacked,
                                 GLenum pname,
                                 const GLint *param);
bool ValidateSamplerParameterIuiv(const Context *context,
                                  angle::EntryPoint entryPoint,
                                  SamplerID samplerPacked,
                                  GLenum pname,
                                  const GLuint *param);
bool ValidateTexBuffer(const Context *context,
                       angle::EntryPoint entryPoint,
                       TextureType targetPacked,
                       GLenum internalformat,
                       BufferID bufferPacked);
bool ValidateTexBufferRange(const Context *context,
                            angle::EntryPoint entryPoint,
                            TextureType targetPacked,
                            GLenum internalformat,
                            BufferID bufferPacked,
                            GLintptr offset,
                            GLsizeiptr size);
bool ValidateTexParameterIiv(const Context *context,
                             angle::EntryPoint entryPoint,
                             TextureType targetPacked,
                             GLenum pname,
                             const GLint *params);
bool ValidateTexParameterIuiv(const Context *context,
                              angle::EntryPoint entryPoint,
                              TextureType targetPacked,
                              GLenum pname,
                              const GLuint *params);
bool ValidateTexStorage3DMultisample(const Context *context,
                                     angle::EntryPoint entryPoint,
                                     TextureType targetPacked,
                                     GLsizei samples,
                                     GLenum internalformat,
                                     GLsizei width,
                                     GLsizei height,
                                     GLsizei depth,
                                     GLboolean fixedsamplelocations);
}  // namespace gl

#endif  // LIBANGLE_VALIDATION_ES32_AUTOGEN_H_
