summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-21 20:22:27 -0600
committerBrian Paul <[email protected]>2012-08-24 06:18:41 -0600
commit8a935d71ff4ded6f3cdd8e06dcd1a5e3de3d3cc0 (patch)
tree4222531aa94636e1833d2a13bd3b142440823959 /src/mesa/main
parent637a79aa2381e363d6b94c0bb5692a1882e9c945 (diff)
mesa: make _mesa_get_proxy_tex_image() static
It's not used by any other file.
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/teximage.c13
-rw-r--r--src/mesa/main/teximage.h4
2 files changed, 8 insertions, 9 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 1338afd459f..eff6fb7c6e8 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -839,8 +839,8 @@ _mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
* \return pointer to texture image or NULL if invalid target, invalid
* level, or out of memory.
*/
-struct gl_texture_image *
-_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level)
+static struct gl_texture_image *
+get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level)
{
struct gl_texture_image *texImage;
GLuint texIndex;
@@ -2682,7 +2682,7 @@ teximage(struct gl_context *ctx, GLuint dims,
if (_mesa_is_proxy_texture(target)) {
/* Proxy texture: just clear or set state depending on error checking */
struct gl_texture_image *texImage =
- _mesa_get_proxy_tex_image(ctx, target, level);
+ get_proxy_tex_image(ctx, target, level);
if (error == PROXY_ERROR) {
/* image too large, etc. Clear all proxy texture image parameters. */
@@ -3646,17 +3646,20 @@ compressedteximage(struct gl_context *ctx, GLuint dims,
struct gl_texture_image *texImage;
if (!error) {
+ /* No parameter errors. Choose a texture format and see if we
+ * can really allocate the texture.
+ */
struct gl_texture_object *texObj =
_mesa_get_current_tex_object(ctx, target);
gl_format texFormat =
_mesa_choose_texture_format(ctx, texObj, target, level,
internalFormat, GL_NONE, GL_NONE);
if (!legal_texture_size(ctx, texFormat, width, height, depth)) {
- error = GL_OUT_OF_MEMORY;
+ error = PROXY_ERROR;
}
}
- texImage = _mesa_get_proxy_tex_image(ctx, target, level);
+ texImage = get_proxy_tex_image(ctx, target, level);
if (texImage) {
if (error == PROXY_ERROR) {
/* if error, clear all proxy texture image parameters */
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
index 739c5dda132..feaaf0cba6d 100644
--- a/src/mesa/main/teximage.h
+++ b/src/mesa/main/teximage.h
@@ -120,10 +120,6 @@ _mesa_get_tex_image(struct gl_context *ctx, struct gl_texture_object *texObj,
GLenum target, GLint level);
-extern struct gl_texture_image *
-_mesa_get_proxy_tex_image(struct gl_context *ctx, GLenum target, GLint level);
-
-
extern GLint
_mesa_max_texture_levels(struct gl_context *ctx, GLenum target);