summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r128
diff options
context:
space:
mode:
authorFelix Kuehling <[email protected]>2004-01-26 23:38:12 +0000
committerFelix Kuehling <[email protected]>2004-01-26 23:38:12 +0000
commit8135a445f3b0ae207ec5e4485b5936050d438320 (patch)
treee0c63e4985bd670b34686ca5733d99364c9a1a12 /src/mesa/drivers/dri/r128
parentef167c63282bb9b98492f46f9a3ad8f861db1a30 (diff)
Make the drivers using the common texmem code work with NewTextureObject
in Mesa. This is analogous to changes idr made to the r200 driver. Patch submitted by Andreas Stenglein.
Diffstat (limited to 'src/mesa/drivers/dri/r128')
-rw-r--r--src/mesa/drivers/dri/r128/r128_context.c4
-rw-r--r--src/mesa/drivers/dri/r128/r128_tex.c8
2 files changed, 3 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r128/r128_context.c b/src/mesa/drivers/dri/r128/r128_context.c
index 7bb324473f7..ea1c2767704 100644
--- a/src/mesa/drivers/dri/r128/r128_context.c
+++ b/src/mesa/drivers/dri/r128/r128_context.c
@@ -245,10 +245,6 @@ GLboolean r128CreateContext( const __GLcontextModes *glVisual,
r128DDInitSpanFuncs( ctx );
r128DDInitState( rmesa );
- driInitTextureObjects( ctx, & rmesa->swapped,
- DRI_TEXMGR_DO_TEXTURE_1D
- | DRI_TEXMGR_DO_TEXTURE_2D );
-
rmesa->vblank_flags = (rmesa->r128Screen->irq != 0)
? driGetDefaultVBlankFlags(&rmesa->optionCache) : VBLANK_FLAG_NO_IRQ;
diff --git a/src/mesa/drivers/dri/r128/r128_tex.c b/src/mesa/drivers/dri/r128/r128_tex.c
index 373ff5c76bf..d459b6243dc 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.c
+++ b/src/mesa/drivers/dri/r128/r128_tex.c
@@ -561,11 +561,8 @@ static void r128BindTexture( GLcontext *ctx, GLenum target,
ctx->Texture.CurrentUnit );
}
- if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) {
- if ( tObj->DriverData == NULL ) {
- r128AllocTexObj( tObj );
- }
- }
+ assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_1D) ||
+ (tObj->DriverData != NULL) );
}
@@ -598,6 +595,7 @@ r128NewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);
+ r128AllocTexObj( obj );
return obj;
}