[Mesa-dev] [PATCH 3/3] mesa: make _mesa_texture_buffer_range() static
Anuj Phogat
anuj.phogat at gmail.com
Fri Sep 30 22:43:24 UTC 2016
On Fri, Sep 30, 2016 at 3:37 PM, Brian Paul <brianp at vmware.com> wrote:
>
> Not called from any other file. Also, add a comment.
> ---
> src/mesa/main/teximage.c | 34 +++++++++++++++++++---------------
> src/mesa/main/teximage.h | 8 --------
> 2 files changed, 19 insertions(+), 23 deletions(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 1d0a6a2..df8f0bc 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -5034,13 +5034,17 @@ _mesa_validate_texbuffer_format(const struct gl_context *ctx,
> }
>
>
> -void
> -_mesa_texture_buffer_range(struct gl_context *ctx,
> - struct gl_texture_object *texObj,
> - GLenum internalFormat,
> - struct gl_buffer_object *bufObj,
> - GLintptr offset, GLsizeiptr size,
> - const char *caller)
> +/**
> + * Do work common to glTexBuffer, glTexBufferRange, glTextureBuffer
> + * and glTextureBufferRange, including some error checking.
> + */
> +static void
> +texture_buffer_range(struct gl_context *ctx,
> + struct gl_texture_object *texObj,
> + GLenum internalFormat,
> + struct gl_buffer_object *bufObj,
> + GLintptr offset, GLsizeiptr size,
> + const char *caller)
> {
> mesa_format format;
>
> @@ -5177,8 +5181,8 @@ _mesa_TexBuffer(GLenum target, GLenum internalFormat, GLuint buffer)
> if (!texObj)
> return;
>
> - _mesa_texture_buffer_range(ctx, texObj, internalFormat, bufObj, 0,
> - buffer ? -1 : 0, "glTexBuffer");
> + texture_buffer_range(ctx, texObj, internalFormat, bufObj, 0,
> + buffer ? -1 : 0, "glTexBuffer");
> }
>
>
> @@ -5224,8 +5228,8 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer,
> if (!texObj)
> return;
>
> - _mesa_texture_buffer_range(ctx, texObj, internalFormat, bufObj,
> - offset, size, "glTexBufferRange");
> + texture_buffer_range(ctx, texObj, internalFormat, bufObj,
> + offset, size, "glTexBufferRange");
> }
>
> void GLAPIENTRY
> @@ -5251,8 +5255,8 @@ _mesa_TextureBuffer(GLuint texture, GLenum internalFormat, GLuint buffer)
> if (!check_texture_buffer_target(ctx, texObj->Target, "glTextureBuffer"))
> return;
>
> - _mesa_texture_buffer_range(ctx, texObj, internalFormat,
> - bufObj, 0, buffer ? -1 : 0, "glTextureBuffer");
> + texture_buffer_range(ctx, texObj, internalFormat,
> + bufObj, 0, buffer ? -1 : 0, "glTextureBuffer");
> }
>
> void GLAPIENTRY
> @@ -5296,8 +5300,8 @@ _mesa_TextureBufferRange(GLuint texture, GLenum internalFormat, GLuint buffer,
> "glTextureBufferRange"))
> return;
>
> - _mesa_texture_buffer_range(ctx, texObj, internalFormat,
> - bufObj, offset, size, "glTextureBufferRange");
> + texture_buffer_range(ctx, texObj, internalFormat,
> + bufObj, offset, size, "glTextureBufferRange");
> }
>
> GLboolean
> diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
> index c52a780..05fa00d 100644
> --- a/src/mesa/main/teximage.h
> +++ b/src/mesa/main/teximage.h
> @@ -250,14 +250,6 @@ _mesa_copy_texture_sub_image(struct gl_context *ctx, GLuint dims,
> GLsizei width, GLsizei height,
> const char *caller);
>
> -extern void
> -_mesa_texture_buffer_range(struct gl_context *ctx,
> - struct gl_texture_object *texObj,
> - GLenum internalFormat,
> - struct gl_buffer_object *bufObj,
> - GLintptr offset, GLsizeiptr size,
> - const char *caller);
> -
> bool
> _mesa_is_cube_map_texture(GLenum target);
>
> --
> 1.9.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Series is:
Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>
More information about the mesa-dev
mailing list