diff options
Diffstat (limited to 'src/mesa/drivers/dri/tdfx/tdfx_context.c')
-rw-r--r-- | src/mesa/drivers/dri/tdfx/tdfx_context.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/tdfx/tdfx_context.c b/src/mesa/drivers/dri/tdfx/tdfx_context.c index c1491ce472..e251c03a1c 100644 --- a/src/mesa/drivers/dri/tdfx/tdfx_context.c +++ b/src/mesa/drivers/dri/tdfx/tdfx_context.c @@ -49,6 +49,7 @@ #include "tdfx_span.h" #include "tdfx_texman.h" #include "extensions.h" +#include "hash.h" #include "swrast/swrast.h" #include "swrast_setup/swrast_setup.h" @@ -560,12 +561,24 @@ tdfxDestroyContext( __DRIcontextPrivate *driContextPriv ) /* This share group is about to go away, free our private * texture object data. */ +#if 0 struct gl_texture_object *tObj; tObj = fxMesa->glCtx->Shared->TexObjectList; while (tObj) { tdfxTMFreeTexture(fxMesa, tObj); tObj = tObj->Next; } +#else + struct _mesa_HashTable *textures = fxMesa->glCtx->Shared->TexObjects; + GLuint id; + for (id = _mesa_HashFirstEntry(textures); + id; + id = _mesa_HashNextEntry(textures, id)) { + struct gl_texture_object *tObj + = (struct gl_texture_object *) _mesa_HashLookup(textures, id); + tdfxTMFreeTexture(fxMesa, tObj); + } +#endif } tdfxTMClose(fxMesa); /* free texture memory */ |