mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
free buffer in t_vertex_c.c on context delete
This commit is contained in:
parent
8e46534b3b
commit
0aca086f7a
3 changed files with 11 additions and 0 deletions
|
|
@ -1442,4 +1442,6 @@ void _tnl_free_vertices( GLcontext *ctx )
|
|||
ALIGN_FREE(vtx->vertex_buf);
|
||||
vtx->vertex_buf = 0;
|
||||
}
|
||||
|
||||
_tnl_free_c_codegen( &vtx->codegen );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,6 +144,7 @@ extern tnl_emit_func _tnl_codegen_emit( GLcontext *ctx );
|
|||
|
||||
|
||||
extern void _tnl_init_c_codegen( struct tnl_clipspace_codegen *p );
|
||||
extern void _tnl_free_c_codegen( struct tnl_clipspace_codegen *p );
|
||||
|
||||
#define GET_VERTEX_STATE(ctx) &(TNL_CONTEXT(ctx)->clipspace)
|
||||
|
||||
|
|
|
|||
|
|
@ -257,3 +257,11 @@ void _tnl_init_c_codegen( struct tnl_clipspace_codegen *p )
|
|||
p->buf_size = 2048;
|
||||
p->buf = (char *) MALLOC(p->buf_size);
|
||||
}
|
||||
|
||||
void _tnl_free_c_codegen( struct tnl_clipspace_codegen *p )
|
||||
{
|
||||
if (p->buf) {
|
||||
FREE(p->buf);
|
||||
p->buf = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue