summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxapi.c
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2004-01-26 10:38:46 +0000
committerDaniel Borca <[email protected]>2004-01-26 10:38:46 +0000
commitd3682ce37616bb1b33c587263bcb6c4e4eeac313 (patch)
treee65d1604f39c326b19a63324770d1889c726005c /src/mesa/drivers/glide/fxapi.c
parentc9d2f4ca474c7ae0fcd6d4a7ea6da671b9a4725f (diff)
accomodate FetchTexel and fix some memory leak bugs
Diffstat (limited to 'src/mesa/drivers/glide/fxapi.c')
-rw-r--r--src/mesa/drivers/glide/fxapi.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index 50f783f3b25..61c69853e6a 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -784,13 +784,21 @@ fxMesaDestroyContext(fxMesaContext fxMesa)
glbTotNumCtx--;
+ /* [dBorca]
+ * close the hardware first, so we can debug
+ * atexit problems (memory leaks, etc).
+ * NB: fxDDDestroyFxMesaContext must be called
+ * before _mesa_destroy_context; which must be
+ * called before fxTMClose!
+ */
+ grSstWinClose(fxMesa->glideContext);
+ fxCloseHardware();
+
fxDDDestroyFxMesaContext(fxMesa);
_mesa_destroy_visual(fxMesa->glVis);
_mesa_destroy_context(fxMesa->glCtx);
_mesa_destroy_framebuffer(fxMesa->glBuffer);
-
- grSstWinClose(fxMesa->glideContext);
- fxCloseHardware();
+ fxTMClose(fxMesa);
FREE(fxMesa);