diff options
author | Ian Romanick <[email protected]> | 2004-01-21 16:42:30 +0000 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2004-01-21 16:42:30 +0000 |
commit | 169223c9eee5ee365bb4575939d92f852383d562 (patch) | |
tree | 3739ed536dac457effdf45389a7b6e5a6af982dc /src/mesa/drivers/dri/r200/r200_tex.c | |
parent | 34a78574114d5f3ff814cf55c222fe26bded334b (diff) |
Make the R200 driver work with the NewTextureObject in Mesa. Other
drivers that use the texmem interface will likely need similar changes.
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_tex.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_tex.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_tex.c b/src/mesa/drivers/dri/r200/r200_tex.c index c1c535507fe..a644b2ad352 100644 --- a/src/mesa/drivers/dri/r200/r200_tex.c +++ b/src/mesa/drivers/dri/r200/r200_tex.c @@ -941,10 +941,14 @@ static void r200BindTexture( GLcontext *ctx, GLenum target, ctx->Texture.CurrentUnit ); } - if ( target == GL_TEXTURE_2D || target == GL_TEXTURE_1D ) { - if ( texObj->DriverData == NULL ) { - r200AllocTexObj( texObj ); - } + if ( (target == GL_TEXTURE_1D) + || (target == GL_TEXTURE_2D) +#if ENABLE_HW_3D_TEXTURE + || (target == GL_TEXTURE_3D) +#endif + || (target == GL_TEXTURE_CUBE_MAP) + || (target == GL_TEXTURE_RECTANGLE_NV) ) { + assert( texObj->DriverData != NULL ); } } @@ -1012,6 +1016,7 @@ r200NewTextureObject( GLcontext *ctx, GLuint name, GLenum target ) if (!obj) return NULL; obj->MaxAnisotropy = rmesa->initialMaxAnisotropy; + r200AllocTexObj( obj ); return obj; } |