From cf899d400d480d7017311d92f2cfd94391b785b4 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 5 Feb 2005 17:37:00 +0000 Subject: removed need for Shared->TexObjectList, walk over texture hash table entries instead --- src/mesa/drivers/dri/tdfx/tdfx_context.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/mesa/drivers/dri/tdfx/tdfx_context.c') 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 */ -- cgit v1.2.3