summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorFelix Kuehling <fxkuehl@gmx.de>2004-01-26 23:38:12 +0000
committerFelix Kuehling <fxkuehl@gmx.de>2004-01-26 23:38:12 +0000
commit8135a445f3b0ae207ec5e4485b5936050d438320 (patch)
treee0c63e4985bd670b34686ca5733d99364c9a1a12 /src/mesa/drivers/dri/radeon
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/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c5
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_tex.c9
2 files changed, 4 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 6e9cc5f5d9..de197aa4db 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -354,11 +354,6 @@ radeonCreateContext( const __GLcontextModes *glVisual,
rmesa->boxes = 0;
- /* formerly in radeon_tex.c */
- driInitTextureObjects( ctx, & rmesa->swapped,
- DRI_TEXMGR_DO_TEXTURE_1D
- | DRI_TEXMGR_DO_TEXTURE_2D );
-
/* Initialize the software rasterizer and helper modules.
*/
_swrast_CreateContext( ctx );
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;
}