diff options
author | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2018-11-16 10:58:12 +0100 |
---|---|---|
committer | Erik Faye-Lund <erik.faye-lund@collabora.com> | 2018-12-03 18:16:44 +0100 |
commit | e8b331ae1337cfbfe7889cf03405c8943f486a3c (patch) | |
tree | eb3de9bb90741e814131708538b05b5676f3ee95 | |
parent | ca8e2a5277aadd587fe7b26941eba8b3bbefe390 (diff) |
mesa/main: rename format-check function
_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 <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | src/mesa/main/glformats.c | 12 | ||||
-rw-r--r-- | src/mesa/main/glformats.h | 6 | ||||
-rw-r--r-- | 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)", |