From 7e0f47c1348273ed3bb39d00aa4a9498a28b8d6a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 2 Mar 2009 14:27:16 -0700 Subject: mesa: use _mesa_reference_texobj() when setting texUnit->Current pointer Fixes piglit copytexsubimage regression. --- src/mesa/main/texstate.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3