Commit 9696d073 by Jamie Madill Committed by Commit Bot

Clean up the ES3 entry points for auto-generation.

Removes some unnecessary includes, and moves some validatoinfunctions to the ES3-only file. BUG=angleproject:1309 Change-Id: I3b274014c48f6f39b5e67223987c91fbc5b4d390 Reviewed-on: https://chromium-review.googlesource.com/636519Reviewed-by: 's avatarCorentin Wallez <cwallez@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 70b5bb00
......@@ -54,9 +54,6 @@ template_entry_point_source = """// GENERATED FILE - DO NOT EDIT.
// entry_points_gles_{major_version}_{minor_version}_autogen.cpp:
// Defines the GLES {major_version}.{minor_version} entry points.
#include "libGLESv2/entry_points_gles_{major_version}_{minor_version}_autogen.h"
#include "common/debug.h"
#include "libANGLE/Context.h"
#include "libANGLE/validationES2.h"
#include "libGLESv2/global_state.h"
......
......@@ -410,10 +410,6 @@ bool ValidateGetBufferParameterivRobustANGLE(ValidationContext *context,
GLsizei *length,
GLint *params);
bool ValidateGetBufferParameteri64v(ValidationContext *context,
GLenum target,
GLenum pname,
GLint64 *params);
bool ValidateGetBufferParameteri64vRobustANGLE(ValidationContext *context,
GLenum target,
GLenum pname,
......@@ -481,14 +477,12 @@ bool ValidateTexParameterivRobustANGLE(Context *context,
GLsizei bufSize,
const GLint *params);
bool ValidateGetSamplerParameterfv(Context *context, GLuint sampler, GLenum pname, GLfloat *params);
bool ValidateGetSamplerParameterfvRobustANGLE(Context *context,
GLuint sampler,
GLenum pname,
GLuint bufSize,
GLsizei *length,
GLfloat *params);
bool ValidateGetSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, GLint *params);
bool ValidateGetSamplerParameterivRobustANGLE(Context *context,
GLuint sampler,
GLenum pname,
......@@ -496,21 +490,11 @@ bool ValidateGetSamplerParameterivRobustANGLE(Context *context,
GLsizei *length,
GLint *params);
bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param);
bool ValidateSamplerParameterfv(Context *context,
GLuint sampler,
GLenum pname,
const GLfloat *params);
bool ValidateSamplerParameterfvRobustANGLE(Context *context,
GLuint sampler,
GLenum pname,
GLsizei bufSize,
const GLfloat *params);
bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param);
bool ValidateSamplerParameteriv(Context *context,
GLuint sampler,
GLenum pname,
const GLint *params);
bool ValidateSamplerParameterivRobustANGLE(Context *context,
GLuint sampler,
GLenum pname,
......@@ -544,7 +528,6 @@ bool ValidateGetVertexAttribPointervRobustANGLE(Context *context,
GLsizei *length,
void **pointer);
bool ValidateGetVertexAttribIiv(Context *context, GLuint index, GLenum pname, GLint *params);
bool ValidateGetVertexAttribIivRobustANGLE(Context *context,
GLuint index,
GLenum pname,
......@@ -552,7 +535,6 @@ bool ValidateGetVertexAttribIivRobustANGLE(Context *context,
GLsizei *length,
GLint *params);
bool ValidateGetVertexAttribIuiv(Context *context, GLuint index, GLenum pname, GLuint *params);
bool ValidateGetVertexAttribIuivRobustANGLE(Context *context,
GLuint index,
GLenum pname,
......@@ -568,13 +550,6 @@ bool ValidateGetActiveUniformBlockivRobustANGLE(Context *context,
GLsizei *length,
GLint *params);
bool ValidateGetInternalFormativ(Context *context,
GLenum target,
GLenum internalformat,
GLenum pname,
GLsizei bufSize,
GLint *params);
bool ValidateGetInternalFormativRobustANGLE(Context *context,
GLenum target,
GLenum internalformat,
......@@ -606,6 +581,25 @@ bool ValidateGetActiveUniformBlockivBase(Context *context,
GLenum pname,
GLsizei *length);
bool ValidateGetSamplerParameterBase(Context *context,
GLuint sampler,
GLenum pname,
GLsizei *length);
template <typename ParamType>
bool ValidateSamplerParameterBase(Context *context,
GLuint sampler,
GLenum pname,
GLsizei bufSize,
ParamType *params);
bool ValidateGetInternalFormativBase(Context *context,
GLenum target,
GLenum internalformat,
GLenum pname,
GLsizei bufSize,
GLsizei *numParams);
} // namespace gl
#endif // LIBANGLE_VALIDATION_ES_H_
......@@ -3598,4 +3598,66 @@ bool ValidateTexStorage3D(Context *context,
return true;
}
bool ValidateGetBufferParameteri64v(ValidationContext *context,
GLenum target,
GLenum pname,
GLint64 *params)
{
return ValidateGetBufferParameterBase(context, target, pname, false, nullptr);
}
bool ValidateGetSamplerParameterfv(Context *context, GLuint sampler, GLenum pname, GLfloat *params)
{
return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
}
bool ValidateGetSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, GLint *params)
{
return ValidateGetSamplerParameterBase(context, sampler, pname, nullptr);
}
bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param)
{
return ValidateSamplerParameterBase(context, sampler, pname, -1, &param);
}
bool ValidateSamplerParameterfv(Context *context,
GLuint sampler,
GLenum pname,
const GLfloat *params)
{
return ValidateSamplerParameterBase(context, sampler, pname, -1, params);
}
bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param)
{
return ValidateSamplerParameterBase(context, sampler, pname, -1, &param);
}
bool ValidateSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, const GLint *params)
{
return ValidateSamplerParameterBase(context, sampler, pname, -1, params);
}
bool ValidateGetVertexAttribIiv(Context *context, GLuint index, GLenum pname, GLint *params)
{
return ValidateGetVertexAttribBase(context, index, pname, nullptr, false, true);
}
bool ValidateGetVertexAttribIuiv(Context *context, GLuint index, GLenum pname, GLuint *params)
{
return ValidateGetVertexAttribBase(context, index, pname, nullptr, false, true);
}
bool ValidateGetInternalformativ(Context *context,
GLenum target,
GLenum internalformat,
GLenum pname,
GLsizei bufSize,
GLint *params)
{
return ValidateGetInternalFormativBase(context, target, internalformat, pname, bufSize,
nullptr);
}
} // namespace gl
......@@ -585,6 +585,31 @@ bool ValidateTexStorage3D(Context *context,
GLsizei height,
GLsizei depth);
bool ValidateGetVertexAttribIiv(Context *context, GLuint index, GLenum pname, GLint *params);
bool ValidateGetVertexAttribIuiv(Context *context, GLuint index, GLenum pname, GLuint *params);
bool ValidateGetBufferParameteri64v(ValidationContext *context,
GLenum target,
GLenum pname,
GLint64 *params);
bool ValidateSamplerParameteri(Context *context, GLuint sampler, GLenum pname, GLint param);
bool ValidateSamplerParameteriv(Context *context,
GLuint sampler,
GLenum pname,
const GLint *params);
bool ValidateSamplerParameterf(Context *context, GLuint sampler, GLenum pname, GLfloat param);
bool ValidateSamplerParameterfv(Context *context,
GLuint sampler,
GLenum pname,
const GLfloat *params);
bool ValidateGetSamplerParameteriv(Context *context, GLuint sampler, GLenum pname, GLint *params);
bool ValidateGetSamplerParameterfv(Context *context, GLuint sampler, GLenum pname, GLfloat *params);
bool ValidateGetInternalformativ(Context *context,
GLenum target,
GLenum internalformat,
GLenum pname,
GLsizei bufSize,
GLint *params);
} // namespace gl
#endif // LIBANGLE_VALIDATION_ES3_H_
......@@ -8,9 +8,6 @@
// entry_points_gles_2_0_autogen.cpp:
// Defines the GLES 2.0 entry points.
#include "libGLESv2/entry_points_gles_2_0_autogen.h"
#include "common/debug.h"
#include "libANGLE/Context.h"
#include "libANGLE/validationES2.h"
#include "libGLESv2/global_state.h"
......
......@@ -7,24 +7,10 @@
// entry_points_gles_3_0.cpp : Implements the GLES 3.0 entry points.
#include "libGLESv2/entry_points_gles_3_0.h"
#include "libGLESv2/entry_points_gles_2_0_ext.h"
#include "libGLESv2/global_state.h"
#include "libANGLE/Buffer.h"
#include "libANGLE/Context.h"
#include "libANGLE/Error.h"
#include "libANGLE/Fence.h"
#include "libANGLE/Framebuffer.h"
#include "libANGLE/Query.h"
#include "libANGLE/VertexArray.h"
#include "libANGLE/formatutils.h"
#include "libANGLE/queryconversions.h"
#include "libANGLE/queryutils.h"
#include "libANGLE/validationES.h"
#include "libANGLE/validationES3.h"
#include "common/debug.h"
#include "libGLESv2/global_state.h"
namespace gl
{
......@@ -2070,7 +2056,7 @@ void GL_APIENTRY GetInternalformativ(GLenum target,
if (context)
{
if (!context->skipValidation() &&
!ValidateGetInternalFormativ(context, target, internalformat, pname, bufSize, params))
!ValidateGetInternalformativ(context, target, internalformat, pname, bufSize, params))
{
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