From 88f3b89a2cb77766d2009b9868c44e03abe2dbb2 Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Thu, 28 Dec 2000 22:11:04 +0000 Subject: Add render stage for unclipped vb's to fx driver. Bump MAX_TEXTURE_UNITS to 8 Fix mem. leak in destroy_lists Fix crash in q3 (cva generally) --- src/mesa/tnl/t_imm_alloc.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/mesa/tnl/t_imm_alloc.c') diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c index 44e3a598ec..e6a37f8101 100644 --- a/src/mesa/tnl/t_imm_alloc.c +++ b/src/mesa/tnl/t_imm_alloc.c @@ -1,4 +1,4 @@ -/* $Id: t_imm_alloc.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */ +/* $Id: t_imm_alloc.c,v 1.2 2000/12/28 22:11:05 keithw Exp $ */ /* * Mesa 3-D graphics library @@ -34,10 +34,10 @@ #include "t_imm_alloc.h" + static int id = 0; struct immediate *_tnl_alloc_immediate( GLcontext *ctx ) { - static int id = 0; struct immediate *IM = ALIGN_MALLOC_STRUCT( immediate, 32 ); GLuint j; @@ -80,6 +80,7 @@ struct immediate *_tnl_alloc_immediate( GLcontext *ctx ) void _tnl_free_immediate( struct immediate *IM ) { + static int freed = 0; GLuint j; if (IM->NormalLengths) { @@ -92,12 +93,15 @@ void _tnl_free_immediate( struct immediate *IM ) FREE( IM->MaterialMask ); IM->Material = 0; IM->MaterialMask = 0; - - for (j = 1; j < IM->MaxTextureUnits; j++) - ALIGN_FREE( IM->TexCoord[j] ); } + for (j = 1; j < IM->MaxTextureUnits; j++) + ALIGN_FREE( IM->TexCoord[j] ); + + ALIGN_FREE( IM ); + freed++; +/* printf("outstanding %d\n", id - freed); */ } -- cgit v1.2.3