diff options
author | Felix Kuehling <fxkuehl@gmx.de> | 2004-01-26 23:38:12 +0000 |
---|---|---|
committer | Felix Kuehling <fxkuehl@gmx.de> | 2004-01-26 23:38:12 +0000 |
commit | 8135a445f3b0ae207ec5e4485b5936050d438320 (patch) | |
tree | e0c63e4985bd670b34686ca5733d99364c9a1a12 /src/mesa/drivers/dri/radeon/radeon_tex.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/radeon/radeon_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_tex.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex.c b/src/mesa/drivers/dri/radeon/radeon_tex.c index 99aa4a458b..78220c6860 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex.c @@ -674,11 +674,9 @@ static void radeonBindTexture( GLcontext *ctx, GLenum target, ctx->Texture.CurrentUnit ); } - if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) { - if ( texObj->DriverData == NULL ) { - radeonAllocTexObj( texObj ); - } - } + assert( (target != GL_TEXTURE_1D && target != GL_TEXTURE_2D && + target != GL_TEXTURE_RECTANGLE_NV) || + (texObj->DriverData != NULL) ); } @@ -741,6 +739,7 @@ radeonNewTextureObject( GLcontext *ctx, GLuint name, GLenum target ) if (!obj) return NULL; obj->MaxAnisotropy = rmesa->initialMaxAnisotropy; + radeonAllocTexObj( obj ); return obj; } |