From bb1036aae5b31af583b9aa263fec73c899383493 Mon Sep 17 00:00:00 2001 From: Thomas Hellstrom Date: Mon, 7 Feb 2011 15:37:05 +0100 Subject: [PATCH] mesa/st: Fix vertex buffer leak Make sure we unreference the vertex buffer pointers in a local array. This fixes huge vertex buffer / memory leaks in mesa demos "fire" and "engine". NOTE: This is a candidate for the 7.9 and 7.10 branches. Signed-off-by: Thomas Hellstrom --- src/mesa/state_tracker/st_draw_feedback.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c index 4e76a050701..c11c7696e30 100644 --- a/src/mesa/state_tracker/st_draw_feedback.c +++ b/src/mesa/state_tracker/st_draw_feedback.c @@ -261,6 +261,7 @@ st_feedback_draw_vbo(struct gl_context *ctx, pipe_buffer_unmap(pipe, vb_transfer[i]); pipe_resource_reference(&draw->pt.vertex_buffer[i].buffer, NULL); draw_set_mapped_vertex_buffer(draw, i, NULL); + pipe_resource_reference(&vbuffers[i].buffer, NULL); } } -- 2.30.2