summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-03-02 14:27:16 -0700
committerBrian Paul <[email protected]>2009-03-02 14:29:37 -0700
commit7e0f47c1348273ed3bb39d00aa4a9498a28b8d6a (patch)
tree5effef18906419de17255d6ecf7a6acf70e640d1
parent97dd2ddbd97ba95e8bc8ab572ec05e8081556e1e (diff)
mesa: use _mesa_reference_texobj() when setting texUnit->Current pointer
Fixes piglit copytexsubimage regression.
-rw-r--r--src/mesa/main/texstate.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 5d53e359107..672a125bf1b 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -554,7 +554,6 @@ update_texture_state( GLcontext *ctx )
continue;
}
- texUnit->_Current = NULL;
texUnit->_ReallyEnabled = 0x0;
/* Look for the highest priority texture target that's enabled (or used
@@ -571,7 +570,7 @@ update_texture_state( GLcontext *ctx )
}
if (texObj->_Complete) {
texUnit->_ReallyEnabled = 1 << texIndex;
- texUnit->_Current = texObj;
+ _mesa_reference_texobj(&texUnit->_Current, texObj);
break;
}
}