From e8b331ae1337cfbfe7889cf03405c8943f486a3c Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Fri, 16 Nov 2018 10:58:12 +0100 Subject: mesa/main: rename format-check function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _mesa_es3_error_check_format_and_type isn't specific to OpenGL ES 3.x, it applies to all versions of OpenGL ES. So let's rename it to reflect this. While we're at it, let's also rename a helper function it uses similarly. As the helper is static, we can also remove the namespacing-prefix from the name. Signed-off-by: Erik Faye-Lund Reviewed-by: Marek Olšák --- src/mesa/main/glformats.c | 12 ++++++------ src/mesa/main/glformats.h | 6 +++--- src/mesa/main/teximage.c | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c index 6cdc7818756..9a507d11b96 100644 --- a/src/mesa/main/glformats.c +++ b/src/mesa/main/glformats.c @@ -2653,8 +2653,8 @@ _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat) * \param type the texture type */ static GLenum -_mesa_es3_effective_internal_format_for_format_and_type(GLenum format, - GLenum type) +gles_effective_internal_format_for_format_and_type(GLenum format, + GLenum type) { switch (type) { case GL_UNSIGNED_BYTE: @@ -2767,9 +2767,9 @@ _mesa_es3_effective_internal_format_for_format_and_type(GLenum format, * \return error code, or GL_NO_ERROR. */ GLenum -_mesa_es3_error_check_format_and_type(const struct gl_context *ctx, - GLenum format, GLenum type, - GLenum internalFormat) +_mesa_gles_error_check_format_and_type(const struct gl_context *ctx, + GLenum format, GLenum type, + GLenum internalFormat) { /* If internalFormat is an unsized format, then the effective internal * format derived from format and type should be used instead. Page 127, @@ -2787,7 +2787,7 @@ _mesa_es3_error_check_format_and_type(const struct gl_context *ctx, */ if (_mesa_is_enum_format_unsized(internalFormat)) { GLenum effectiveInternalFormat = - _mesa_es3_effective_internal_format_for_format_and_type(format, type); + gles_effective_internal_format_for_format_and_type(format, type); if (effectiveInternalFormat == GL_NONE) return GL_INVALID_OPERATION; diff --git a/src/mesa/main/glformats.h b/src/mesa/main/glformats.h index 0aefdf50fef..487e7fe80e8 100644 --- a/src/mesa/main/glformats.h +++ b/src/mesa/main/glformats.h @@ -138,9 +138,9 @@ _mesa_es_error_check_format_and_type(const struct gl_context *ctx, unsigned dimensions); extern GLenum -_mesa_es3_error_check_format_and_type(const struct gl_context *ctx, - GLenum format, GLenum type, - GLenum internalFormat); +_mesa_gles_error_check_format_and_type(const struct gl_context *ctx, + GLenum format, GLenum type, + GLenum internalFormat); extern GLint _mesa_base_tex_format(const struct gl_context *ctx, GLint internalFormat ); diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 6805b47c728..21415b48490 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -1798,8 +1798,8 @@ static bool texture_format_error_check_gles(struct gl_context *ctx, GLenum format, GLenum type, GLenum internalFormat, const char *callerName) { - GLenum err = _mesa_es3_error_check_format_and_type(ctx, format, type, - internalFormat); + GLenum err = _mesa_gles_error_check_format_and_type(ctx, format, type, + internalFormat); if (err != GL_NO_ERROR) { _mesa_error(ctx, err, "%s(format = %s, type = %s, internalformat = %s)", -- cgit v1.2.3