Mesa (master): mesa: remove unneeded local var in BindTexture()
Brian Paul
brianp at kemper.freedesktop.org
Thu Mar 17 03:13:50 UTC 2011
Module: Mesa
Branch: master
Commit: 552f54bf0490dabce3fac6d17e78ac65411fde5c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=552f54bf0490dabce3fac6d17e78ac65411fde5c
Author: Brian Paul <brianp at vmware.com>
Date: Wed Mar 16 21:13:31 2011 -0600
mesa: remove unneeded local var in BindTexture()
---
src/mesa/main/texobj.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 10ddc77..c06bbb6 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -1015,7 +1015,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
GET_CURRENT_CONTEXT(ctx);
const GLuint unit = ctx->Texture.CurrentUnit;
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
- struct gl_texture_object *newTexObj = NULL, *defaultTexObj = NULL;
+ struct gl_texture_object *newTexObj = NULL;
GLint targetIndex;
ASSERT_OUTSIDE_BEGIN_END(ctx);
@@ -1029,13 +1029,13 @@ _mesa_BindTexture( GLenum target, GLuint texName )
return;
}
assert(targetIndex < NUM_TEXTURE_TARGETS);
- defaultTexObj = ctx->Shared->DefaultTex[targetIndex];
/*
* Get pointer to new texture object (newTexObj)
*/
if (texName == 0) {
- newTexObj = defaultTexObj;
+ /* Use a default texture object */
+ newTexObj = ctx->Shared->DefaultTex[targetIndex];
}
else {
/* non-default texture object */
More information about the mesa-commit
mailing list