draw: Fix memory leak in gs code

This commit is contained in:
Jakob Bornecrantz 2010-01-16 09:30:28 +00:00
parent 66e561a036
commit a5c03bd6f1
3 changed files with 11 additions and 0 deletions

View File

@ -95,6 +95,7 @@ void draw_destroy( struct draw_context *draw )
draw_pipeline_destroy( draw );
draw_pt_destroy( draw );
draw_vs_destroy( draw );
draw_gs_destroy( draw );
FREE( draw );
}

View File

@ -59,6 +59,15 @@ draw_gs_init( struct draw_context *draw )
return TRUE;
}
void draw_gs_destroy( struct draw_context *draw )
{
if (!draw->gs.machine)
return;
align_free(draw->gs.machine->Primitives);
tgsi_exec_machine_destroy(draw->gs.machine);
}
void draw_gs_set_constants( struct draw_context *draw,
const float (*constants)[4],

View File

@ -269,6 +269,7 @@ boolean draw_gs_init( struct draw_context *draw );
void draw_gs_set_constants( struct draw_context *,
const float (*constants)[4],
unsigned size );
void draw_gs_destroy( struct draw_context *draw );
/*******************************************************************************
* Common shading code: