From: Brian Date: Sat, 22 Mar 2008 15:42:59 +0000 (-0600) Subject: gallium: free samplers, textures in destroy() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dae7993afc56be1e71e600af60e01e51eab17eda;p=mesa.git gallium: free samplers, textures in destroy() --- diff --git a/src/gallium/auxiliary/draw/draw_aaline.c b/src/gallium/auxiliary/draw/draw_aaline.c index b4fa6bd9670..6742f7f4b96 100644 --- a/src/gallium/auxiliary/draw/draw_aaline.c +++ b/src/gallium/auxiliary/draw/draw_aaline.c @@ -665,7 +665,14 @@ aaline_reset_stipple_counter(struct draw_stage *stage) static void aaline_destroy(struct draw_stage *stage) { + struct aaline_stage *aaline = aaline_stage(stage); + + aaline->pipe->delete_sampler_state(aaline->pipe, aaline->sampler_cso); + + pipe_texture_release(&aaline->texture); + draw_free_temp_verts( stage ); + FREE( stage ); } diff --git a/src/gallium/auxiliary/draw/draw_pstipple.c b/src/gallium/auxiliary/draw/draw_pstipple.c index 9d154a68381..bd8d3a76ae5 100644 --- a/src/gallium/auxiliary/draw/draw_pstipple.c +++ b/src/gallium/auxiliary/draw/draw_pstipple.c @@ -534,6 +534,12 @@ pstip_reset_stipple_counter(struct draw_stage *stage) static void pstip_destroy(struct draw_stage *stage) { + struct pstip_stage *pstip = pstip_stage(stage); + + pstip->pipe->delete_sampler_state(pstip->pipe, pstip->sampler_cso); + + pipe_texture_release(&pstip->texture); + draw_free_temp_verts( stage ); FREE( stage ); }