aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-08-24 07:20:58 -0600
committerBrian Paul <[email protected]>2012-08-24 13:15:27 -0600
commit09fafd3b856109ad4b24ac082ccf436022a1701c (patch)
tree507b4c60fbc33720bd41396fbbbc9357ab433314 /src/mesa
parent261719b21c3dab4e2c0b79bbe148f494667da67c (diff)
st/mesa: clean up use of 'target' variable in st_context_teximage()
'target' was used both as a parameter of type st_texture_type and then re-used for GL_TEXTURE_x targets. Rename the function parameter and add a new local 'GLenum target'. And remove an extraneous break statement.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_manager.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_manager.c b/src/mesa/state_tracker/st_manager.c
index 33389fc981f..c050048aa5d 100644
--- a/src/mesa/state_tracker/st_manager.c
+++ b/src/mesa/state_tracker/st_manager.c
@@ -468,7 +468,7 @@ st_context_flush(struct st_context_iface *stctxi, unsigned flags,
static boolean
st_context_teximage(struct st_context_iface *stctxi,
- enum st_texture_type target,
+ enum st_texture_type tex_type,
int level, enum pipe_format internal_format,
struct pipe_resource *tex, boolean mipmap)
{
@@ -481,8 +481,9 @@ st_context_teximage(struct st_context_iface *stctxi,
struct st_texture_image *stImage;
GLenum internalFormat;
GLuint width, height, depth;
+ GLenum target;
- switch (target) {
+ switch (tex_type) {
case ST_TEXTURE_1D:
target = GL_TEXTURE_1D;
break;
@@ -497,7 +498,6 @@ st_context_teximage(struct st_context_iface *stctxi,
break;
default:
return FALSE;
- break;
}
texObj = _mesa_select_tex_object(ctx, texUnit, target);