diff options
author | Keith Whitwell <[email protected]> | 2000-12-28 22:11:04 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2000-12-28 22:11:04 +0000 |
commit | 88f3b89a2cb77766d2009b9868c44e03abe2dbb2 (patch) | |
tree | c382e12f28f661a17974ea79b394fbabf101d89e /src/mesa/tnl/t_imm_alloc.c | |
parent | e5d6fb20a5c2519ac216a9fa247b5922e76528c1 (diff) |
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)
Diffstat (limited to 'src/mesa/tnl/t_imm_alloc.c')
-rw-r--r-- | src/mesa/tnl/t_imm_alloc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/mesa/tnl/t_imm_alloc.c b/src/mesa/tnl/t_imm_alloc.c index 44e3a598ecb..e6a37f81015 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); */ } |