diff options
Diffstat (limited to 'src/mesa/drivers/dri/i830/i830_texmem.c')
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_texmem.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_texmem.c b/src/mesa/drivers/dri/i830/i830_texmem.c index b61ce6f867..b41957cafc 100644 --- a/src/mesa/drivers/dri/i830/i830_texmem.c +++ b/src/mesa/drivers/dri/i830/i830_texmem.c @@ -62,7 +62,7 @@ void i830DestroyTexObj(i830ContextPtr imesa, i830TextureObjectPtr t) for ( i = 0 ; i < imesa->glCtx->Const.MaxTextureUnits ; i++ ) { if ( t == imesa->CurrentTexObj[ i ] ) { imesa->CurrentTexObj[ i ] = NULL; - imesa->dirty &= ~(I830_UPLOAD_TEX0 << i); + imesa->dirty &= ~I830_UPLOAD_TEX_N( i ); } } } @@ -162,6 +162,7 @@ static void i830UploadTexLevel( i830ContextPtr imesa, int i830UploadTexImagesLocked( i830ContextPtr imesa, i830TextureObjectPtr t ) { int ofs; + int i; if ( t->base.memBlock == NULL ) { int heap; @@ -178,18 +179,11 @@ int i830UploadTexImagesLocked( i830ContextPtr imesa, i830TextureObjectPtr t ) t->Setup[I830_TEXREG_TM0S0] = (TM0S0_USE_FENCE | (imesa->i830Screen->textureOffset + ofs)); - if (t == imesa->CurrentTexObj[0]) - imesa->dirty |= I830_UPLOAD_TEX0; - - if (t == imesa->CurrentTexObj[1]) - imesa->dirty |= I830_UPLOAD_TEX1; -#if 0 - if (t == imesa->CurrentTexObj[2]) - I830_STATECHANGE(imesa, I830_UPLOAD_TEX2); - - if (t == imesa->CurrentTexObj[3]) - I830_STATECHANGE(imesa, I830_UPLOAD_TEX3); -#endif + for ( i = 0 ; i < imesa->glCtx->Const.MaxTextureUnits ; i++ ) { + if (t == imesa->CurrentTexObj[i]) { + imesa->dirty |= I830_UPLOAD_TEX_N( i ); + } + } } @@ -202,7 +196,6 @@ int i830UploadTexImagesLocked( i830ContextPtr imesa, i830TextureObjectPtr t ) /* Upload any images that are new */ if (t->base.dirty_images[0]) { - int i; const int numLevels = t->base.lastLevel - t->base.firstLevel + 1; for (i = 0 ; i < numLevels ; i++) { |