diff options
author | Felix Kuehling <[email protected]> | 2004-01-26 23:38:12 +0000 |
---|---|---|
committer | Felix Kuehling <[email protected]> | 2004-01-26 23:38:12 +0000 |
commit | 8135a445f3b0ae207ec5e4485b5936050d438320 (patch) | |
tree | e0c63e4985bd670b34686ca5733d99364c9a1a12 /src/mesa/drivers/dri/mga/mgatex.c | |
parent | ef167c63282bb9b98492f46f9a3ad8f861db1a30 (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/mga/mgatex.c')
-rw-r--r-- | src/mesa/drivers/dri/mga/mgatex.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/mga/mgatex.c b/src/mesa/drivers/dri/mga/mgatex.c index 2fef5b832a9..1b45c0f9019 100644 --- a/src/mesa/drivers/dri/mga/mgatex.c +++ b/src/mesa/drivers/dri/mga/mgatex.c @@ -484,12 +484,8 @@ static void mgaBindTexture( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ) { - if ( target == GL_TEXTURE_2D || - target == GL_TEXTURE_RECTANGLE_NV ) { - if ( tObj->DriverData == NULL ) { - mgaAllocTexObj( tObj ); - } - } + assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_NV) || + (tObj->DriverData != NULL) ); } @@ -523,6 +519,7 @@ mgaNewTextureObject( GLcontext *ctx, GLuint name, GLenum target ) { struct gl_texture_object *obj; obj = _mesa_new_texture_object(ctx, name, target); + mgaAllocTexObj( obj ); return obj; } |