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 b4fa6bd9670cfc8d1f0ded6df8b5c5f7b7c2a93e..6742f7f4b9665c6448d7f4f3c16fea06d245fef0 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 9d154a6838168f59d09a3d3529292868f766a18f..bd8d3a76ae57de4368964cc08f5baa9e64454927 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 );
 }