diff options
| author | Brian <brian.paul@tungstengraphics.com> | 2008-03-22 09:42:59 -0600 |
|---|---|---|
| committer | Brian <brian.paul@tungstengraphics.com> | 2008-03-22 09:42:59 -0600 |
| commit | dae7993afc56be1e71e600af60e01e51eab17eda (patch) | |
| tree | 342cab2ce9efad08840a2edec6a931bb7950cae4 | |
| parent | 2f8f6c2918e721f6525b2124cde053b84beecafe (diff) | |
gallium: free samplers, textures in destroy()
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_aaline.c | 7 | ||||
| -rw-r--r-- | src/gallium/auxiliary/draw/draw_pstipple.c | 6 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/draw/draw_aaline.c b/src/gallium/auxiliary/draw/draw_aaline.c index b4fa6bd967..6742f7f4b9 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 9d154a6838..bd8d3a76ae 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 ); } |
