radeon: use _mesa_get_current_tex_unit
authorDave Airlie <airlied@linux.ie>
Sat, 31 Oct 2009 05:48:59 +0000 (15:48 +1000)
committerDave Airlie <airlied@linux.ie>
Sat, 31 Oct 2009 05:50:12 +0000 (15:50 +1000)
src/mesa/drivers/dri/radeon/radeon_texstate.c

index 0fd9a138d6c80b35d0dc2dc738e16a7469e9608c..d6e8d4984a67094c563ef14af5b9bbf35c7a108b 100644 (file)
@@ -661,7 +661,7 @@ void radeonSetTexBuffer2(__DRIcontext *pDRICtx, GLint target, GLint glx_texture_
        rmesa = pDRICtx->driverPrivate;
 
        rfb = dPriv->driverPrivate;
-        texUnit = &radeon->glCtx->Texture.Unit[radeon->glCtx->Texture.CurrentUnit];
+        texUnit = _mesa_get_current_tex_unit(radeon->glCtx);
        texObj = _mesa_select_tex_object(radeon->glCtx, texUnit, target);
         texImage = _mesa_get_tex_image(radeon->glCtx, texObj, target, 0);