Commit be849e4f by Jamie Madill Committed by Commit Bot

GLES2: Clean up entry points for auto-gen.

This cleans up a few things: * refactors a few remaining missed EPs * removes unnecessary includes * rename one Context entry point * moves some ES2 EP validation to validationES2 The last item makes for a significant diff, but this is a refactor change only, with no functionality change. BUG=angleproject:747 Change-Id: I7860cc4b6260b6c22faa5f2885297333c0cdb4ed Reviewed-on: https://chromium-review.googlesource.com/483426Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c4e93668
......@@ -4240,7 +4240,7 @@ void Context::getProgramiv(GLuint program, GLenum pname, GLint *params)
QueryProgramiv(programObject, pname, params);
}
void Context::getInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog)
void Context::getProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog)
{
Program *programObject = getProgram(program);
ASSERT(programObject);
......
......@@ -694,7 +694,7 @@ class Context final : public ValidationContext
void getAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders);
GLint getAttribLocation(GLuint program, const GLchar *name);
void getProgramiv(GLuint program, GLenum pname, GLint *params);
void getInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog);
void getProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei *length, GLchar *infolog);
void getShaderiv(GLuint shader, GLenum pname, GLint *params);
void getShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *infolog);
void getShaderPrecisionFormat(GLenum shadertype,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -16,7 +16,6 @@ namespace gl
{
class Context;
class ValidationContext;
class Texture;
bool ValidateES2TexStorageParameters(Context *context, GLenum target, GLsizei levels, GLenum internalformat,
GLsizei width, GLsizei height);
......@@ -512,6 +511,7 @@ bool ValidateUniform1fv(ValidationContext *context,
GLint location,
GLsizei count,
const GLfloat *v);
bool ValidateUniform1i(ValidationContext *context, GLint location, GLint x);
bool ValidateUniform2f(ValidationContext *context, GLint location, GLfloat x, GLfloat y);
bool ValidateUniform2fv(ValidationContext *context,
GLint location,
......@@ -585,6 +585,91 @@ bool ValidateDrawElements(ValidationContext *context,
bool ValidateDrawArrays(ValidationContext *context, GLenum mode, GLint first, GLsizei count);
bool ValidateGetFramebufferAttachmentParameteriv(ValidationContext *context,
GLenum target,
GLenum attachment,
GLenum pname,
GLint *params);
bool ValidateGetProgramiv(ValidationContext *context, GLuint program, GLenum pname, GLint *params);
bool ValidateCopyTexImage2D(ValidationContext *context,
GLenum target,
GLint level,
GLenum internalformat,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLint border);
bool ValidateCopyTexSubImage2D(Context *context,
GLenum target,
GLint level,
GLint xoffset,
GLint yoffset,
GLint x,
GLint y,
GLsizei width,
GLsizei height);
bool ValidateDeleteBuffers(Context *context, GLint n, const GLuint *buffers);
bool ValidateDeleteFramebuffers(Context *context, GLint n, const GLuint *framebuffers);
bool ValidateDeleteRenderbuffers(Context *context, GLint n, const GLuint *renderbuffers);
bool ValidateDeleteTextures(Context *context, GLint n, const GLuint *textures);
bool ValidateDisable(Context *context, GLenum cap);
bool ValidateEnable(Context *context, GLenum cap);
bool ValidateFramebufferRenderbuffer(Context *context,
GLenum target,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
bool ValidateFramebufferTexture2D(Context *context,
GLenum target,
GLenum attachment,
GLenum textarget,
GLuint texture,
GLint level);
bool ValidateGenBuffers(Context *context, GLint n, GLuint *buffers);
bool ValidateGenerateMipmap(Context *context, GLenum target);
bool ValidateGenFramebuffers(Context *context, GLint n, GLuint *framebuffers);
bool ValidateGenRenderbuffers(Context *context, GLint n, GLuint *renderbuffers);
bool ValidateGenTextures(Context *context, GLint n, GLuint *textures);
bool ValidateGetBufferParameteriv(ValidationContext *context,
GLenum target,
GLenum pname,
GLint *params);
bool ValidateGetRenderbufferParameteriv(Context *context,
GLenum target,
GLenum pname,
GLint *params);
bool ValidateGetShaderiv(Context *context, GLuint shader, GLenum pname, GLint *params);
bool ValidateGetTexParameterfv(Context *context, GLenum target, GLenum pname, GLfloat *params);
bool ValidateGetTexParameteriv(Context *context, GLenum target, GLenum pname, GLint *params);
bool ValidateGetUniformfv(Context *context, GLuint program, GLint location, GLfloat *params);
bool ValidateGetUniformiv(Context *context, GLuint program, GLint location, GLint *params);
bool ValidateGetVertexAttribfv(Context *context, GLuint index, GLenum pname, GLfloat *params);
bool ValidateGetVertexAttribiv(Context *context, GLuint index, GLenum pname, GLint *params);
bool ValidateGetVertexAttribPointerv(Context *context, GLuint index, GLenum pname, void **pointer);
bool ValidateIsEnabled(Context *context, GLenum cap);
bool ValidateLinkProgram(Context *context, GLuint program);
bool ValidateReadPixels(ValidationContext *context,
GLint x,
GLint y,
GLsizei width,
GLsizei height,
GLenum format,
GLenum type,
void *pixels);
bool ValidateTexParameterf(Context *context, GLenum target, GLenum pname, GLfloat param);
bool ValidateTexParameterfv(Context *context, GLenum target, GLenum pname, const GLfloat *params);
bool ValidateTexParameteri(Context *context, GLenum target, GLenum pname, GLint param);
bool ValidateTexParameteriv(Context *context, GLenum target, GLenum pname, const GLint *params);
bool ValidateUniform1iv(ValidationContext *context,
GLint location,
GLsizei count,
const GLint *value);
bool ValidateUseProgram(Context *context, GLuint program);
} // namespace gl
#endif // LIBANGLE_VALIDATION_ES2_H_
......@@ -8,29 +8,10 @@
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "libGLESv2/global_state.h"
#include "libANGLE/Buffer.h"
#include "libANGLE/Compiler.h"
#include "common/debug.h"
#include "libANGLE/Context.h"
#include "libANGLE/Error.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/FramebufferAttachment.h"
#include "libANGLE/Program.h"
#include "libANGLE/Renderbuffer.h"
#include "libANGLE/Shader.h"
#include "libANGLE/Texture.h"
#include "libANGLE/VertexArray.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/queryconversions.h"
#include "libANGLE/queryutils.h"
#include "libANGLE/validationES.h"
#include "libANGLE/validationES2.h"
#include "libANGLE/validationES3.h"
#include "common/debug.h"
#include "common/utilities.h"
#include "libGLESv2/global_state.h"
namespace gl
{
......@@ -1174,7 +1155,7 @@ void GL_APIENTRY GetFramebufferAttachmentParameteriv(GLenum target,
if (context)
{
if (!context->skipValidation() && !ValidateGetFramebufferAttachmentParameteriv(
context, target, attachment, pname, nullptr))
context, target, attachment, pname, params))
{
return;
}
......@@ -1207,7 +1188,7 @@ void GL_APIENTRY GetProgramiv(GLuint program, GLenum pname, GLint *params)
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateGetProgramiv(context, program, pname, nullptr))
if (!context->skipValidation() && !ValidateGetProgramiv(context, program, pname, params))
{
return;
}
......@@ -1235,7 +1216,7 @@ void GL_APIENTRY GetProgramInfoLog(GLuint program,
return;
}
context->getInfoLog(program, bufsize, length, infolog);
context->getProgramInfoLog(program, bufsize, length, infolog);
}
}
......@@ -2118,7 +2099,7 @@ void GL_APIENTRY Uniform1i(GLint location, GLint x)
Context *context = GetValidGlobalContext();
if (context)
{
if (!context->skipValidation() && !ValidateUniform1iv(context, location, 1, &x))
if (!context->skipValidation() && !ValidateUniform1i(context, location, x))
{
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment