summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-09-23 12:59:56 -0600
committerBrian Paul <brianp@vmware.com>2016-10-06 11:29:31 -0600
commit9add37b1007eb0dcb071c706e3b27300d91bb4ad (patch)
treec5786124788540e20ddf58904948e0661ead3206 /src/mesa/main/teximage.c
parent92188c207eb2ec4525a026d3a95d483ac893e1cf (diff)
downloadexternal_mesa3d-9add37b1007eb0dcb071c706e3b27300d91bb4ad.zip
external_mesa3d-9add37b1007eb0dcb071c706e3b27300d91bb4ad.tar.gz
external_mesa3d-9add37b1007eb0dcb071c706e3b27300d91bb4ad.tar.bz2
mesa: make _mesa_texture_buffer_range() static
Not called from any other file. Also, add a comment. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c34
1 files changed, 19 insertions, 15 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