gallium: free samplers, textures in destroy()
authorBrian <brian.paul@tungstengraphics.com>
Sat, 22 Mar 2008 15:42:59 +0000 (09:42 -0600)
committerBrian <brian.paul@tungstengraphics.com>
Sat, 22 Mar 2008 15:42:59 +0000 (09:42 -0600)
src/gallium/auxiliary/draw/draw_aaline.c
src/gallium/auxiliary/draw/draw_pstipple.c

index b4fa6bd..6742f7f 100644 (file)
@@ -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 );
 }
 
index 9d154a6..bd8d3a7 100644 (file)
@@ -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 );
 }