diff options
author | Chia-I Wu <[email protected]> | 2013-06-04 16:39:07 +0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2013-06-13 23:57:20 +0800 |
commit | dfb163165a43f6c1ab3f89c17e19618b74e52147 (patch) | |
tree | 2a401082c48bee8e2a99e1ec29c8e5f28db3651f /src/gallium | |
parent | cffc0126303efeaae4ed526921a19bf469429595 (diff) |
u_vbuf: fix index buffer leak
Signed-off-by: Chia-I Wu <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
(cherry picked from commit 97d641eb229e48cacc448eefb583381a27bd8af1)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/util/u_vbuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 244b04d2a42..5936f74a039 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -307,6 +307,9 @@ void u_vbuf_destroy(struct u_vbuf *mgr) unsigned num_vb = screen->get_shader_param(screen, PIPE_SHADER_VERTEX, PIPE_SHADER_CAP_MAX_INPUTS); + mgr->pipe->set_index_buffer(mgr->pipe, NULL); + pipe_resource_reference(&mgr->index_buffer.buffer, NULL); + mgr->pipe->set_vertex_buffers(mgr->pipe, 0, num_vb, NULL); for (i = 0; i < PIPE_MAX_ATTRIBS; i++) { |