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/i830 | |
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/i830')
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_context.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i830/i830_tex.c | 6 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i830/i830_context.c b/src/mesa/drivers/dri/i830/i830_context.c index 74a7d77a86a..0d6b2b74644 100644 --- a/src/mesa/drivers/dri/i830/i830_context.c +++ b/src/mesa/drivers/dri/i830/i830_context.c @@ -370,10 +370,6 @@ GLboolean i830CreateContext( const __GLcontextModes *mesaVis, i830DDInitSpanFuncs( ctx ); i830DDInitState (ctx); - driInitTextureObjects( ctx, & imesa->swapped, - DRI_TEXMGR_DO_TEXTURE_2D - | DRI_TEXMGR_DO_TEXTURE_RECT ); - #if DO_DEBUG I830_DEBUG = driParseDebugString( getenv( "I830_DEBUG" ), debug_control ); diff --git a/src/mesa/drivers/dri/i830/i830_tex.c b/src/mesa/drivers/dri/i830/i830_tex.c index 33998598041..00b869a7a90 100644 --- a/src/mesa/drivers/dri/i830/i830_tex.c +++ b/src/mesa/drivers/dri/i830/i830_tex.c @@ -420,9 +420,8 @@ static void i830TexSubImage2D( GLcontext *ctx, static void i830BindTexture( GLcontext *ctx, GLenum target, struct gl_texture_object *tObj ) { - if (!tObj->DriverData) { - i830AllocTexObj( tObj ); - } + assert( (target != GL_TEXTURE_2D && target != GL_TEXTURE_RECTANGLE_NV) || + (tObj->DriverData != NULL) ); } @@ -565,6 +564,7 @@ i830NewTextureObject( GLcontext *ctx, GLuint name, GLenum target ) { struct gl_texture_object *obj; obj = _mesa_new_texture_object(ctx, name, target); + i830AllocTexObj( obj ); return obj; } |