summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2011-02-07 15:37:05 +0100
committerThomas Hellstrom <thellstrom@vmware.com>2011-02-08 11:01:21 +0100
commitbb1036aae5b31af583b9aa263fec73c899383493 (patch)
tree945b262d37212d7f7fae012ef40670df397b8a5b /src
parent1e1b89103e1cdce9f20b9f32825dd166f8d9d6e1 (diff)
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 <thellstrom@vmware.com>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 4e76a05070..c11c7696e3 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);
}
}