summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxapi.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2000-12-26 05:09:27 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2000-12-26 05:09:27 +0000
commitcab974cf6c2dbfbf5dd5d291e1aae0f8eeb34290 (patch)
tree45385bd755d8e3876c54b2b0113636f5ceb7976a /src/mesa/drivers/glide/fxapi.c
parentd1ff1f6798b003a820f5de9fad835ff352f31afe (diff)
Major rework of tnl module
New array_cache module Support 8 texture units in core mesa (now support 8 everywhere) Rework core mesa statechange operations to avoid flushing on many noop statechanges.
Diffstat (limited to 'src/mesa/drivers/glide/fxapi.c')
-rw-r--r--src/mesa/drivers/glide/fxapi.c61
1 files changed, 29 insertions, 32 deletions
diff --git a/src/mesa/drivers/glide/fxapi.c b/src/mesa/drivers/glide/fxapi.c
index f3a6431aec..6470affd9a 100644
--- a/src/mesa/drivers/glide/fxapi.c
+++ b/src/mesa/drivers/glide/fxapi.c
@@ -581,55 +581,52 @@ void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext fxMesa)
*/
void GLAPIENTRY fxMesaDestroyContext(fxMesaContext fxMesa)
{
- if (MESA_VERBOSE&VERBOSE_DRIVER) {
- fprintf(stderr,"fxmesa: fxMesaDestroyContext()\n");
- }
-
- if(fxMesa) {
- _mesa_destroy_visual(fxMesa->glVis);
- _mesa_destroy_context(fxMesa->glCtx);
- _mesa_destroy_framebuffer(fxMesa->glBuffer);
-
- glbTotNumCtx--;
+ if (MESA_VERBOSE&VERBOSE_DRIVER) {
+ fprintf(stderr,"fxmesa: fxMesaDestroyContext()\n");
+ }
- fxCloseHardware();
- FX_grSstWinClose(fxMesa->glideContext);
+ if(!fxMesa)
+ return;
- if(fxMesa->verbose) {
+ if(fxMesa->verbose) {
fprintf(stderr,"Misc Stats:\n");
fprintf(stderr," # swap buffer: %u\n",fxMesa->stats.swapBuffer);
if(!fxMesa->stats.swapBuffer)
- fxMesa->stats.swapBuffer=1;
+ fxMesa->stats.swapBuffer=1;
fprintf(stderr,"Textures Stats:\n");
fprintf(stderr," Free texture memory on TMU0: %d:\n",fxMesa->freeTexMem[FX_TMU0]);
if(fxMesa->haveTwoTMUs)
- fprintf(stderr," Free texture memory on TMU1: %d:\n",fxMesa->freeTexMem[FX_TMU1]);
+ fprintf(stderr," Free texture memory on TMU1: %d:\n",fxMesa->freeTexMem[FX_TMU1]);
fprintf(stderr," # request to TMM to upload a texture objects: %u\n",
- fxMesa->stats.reqTexUpload);
+ fxMesa->stats.reqTexUpload);
fprintf(stderr," # request to TMM to upload a texture objects per swapbuffer: %.2f\n",
- fxMesa->stats.reqTexUpload/(float)fxMesa->stats.swapBuffer);
+ fxMesa->stats.reqTexUpload/(float)fxMesa->stats.swapBuffer);
fprintf(stderr," # texture objects uploaded: %u\n",
- fxMesa->stats.texUpload);
+ fxMesa->stats.texUpload);
fprintf(stderr," # texture objects uploaded per swapbuffer: %.2f\n",
- fxMesa->stats.texUpload/(float)fxMesa->stats.swapBuffer);
+ fxMesa->stats.texUpload/(float)fxMesa->stats.swapBuffer);
fprintf(stderr," # MBs uploaded to texture memory: %.2f\n",
- fxMesa->stats.memTexUpload/(float)(1<<20));
+ fxMesa->stats.memTexUpload/(float)(1<<20));
fprintf(stderr," # MBs uploaded to texture memory per swapbuffer: %.2f\n",
- (fxMesa->stats.memTexUpload/(float)fxMesa->stats.swapBuffer)/(float)(1<<20));
- }
- if (fxMesa->state)
- free(fxMesa->state);
- if (fxMesa->fogTable)
- free(fxMesa->fogTable);
- fxTMClose(fxMesa);
-
- free(fxMesa);
- }
+ (fxMesa->stats.memTexUpload/(float)fxMesa->stats.swapBuffer)/(float)(1<<20));
+ }
- if(fxMesa==fxMesaCurrentCtx)
- fxMesaCurrentCtx=NULL;
+ glbTotNumCtx--;
+
+ fxDDDestroyFxMesaContext(fxMesa);
+ _mesa_destroy_visual(fxMesa->glVis);
+ _mesa_destroy_context(fxMesa->glCtx);
+ _mesa_destroy_framebuffer(fxMesa->glBuffer);
+
+ fxCloseHardware();
+ FX_grSstWinClose(fxMesa->glideContext);
+
+ free(fxMesa);
+
+ if(fxMesa==fxMesaCurrentCtx)
+ fxMesaCurrentCtx=NULL;
}