draw: Fix memory leak in gs code
This commit is contained in:
parent
66e561a036
commit
a5c03bd6f1
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -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],
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue