diff options
author | Ilia Mirkin <[email protected]> | 2015-05-24 02:23:16 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-05-24 02:26:29 -0400 |
commit | 9870ed05dd333a20662479b9b1e3a8db542924c4 (patch) | |
tree | 23f657e6646541099dd6343efaa47ff274ff0279 /src/gallium/drivers/nouveau/nv30/nv30_draw.c | |
parent | 605ce36d7f4a90c4062d6940bea82ab483bbe3b2 (diff) |
nv30: avoid leaking render state and draw shaders
Signed-off-by: Ilia Mirkin <[email protected]>
Cc: "10.5 10.6" <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30/nv30_draw.c')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_draw.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_draw.c b/src/gallium/drivers/nouveau/nv30/nv30_draw.c index 3575c3d29fa..13aad7a4e09 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_draw.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_draw.c @@ -103,6 +103,7 @@ nv30_render_unmap_vertices(struct vbuf_render *render, { struct nv30_render *r = nv30_render(render); pipe_buffer_unmap(&r->nv30->base.pipe, r->transfer); + r->transfer = NULL; } static void @@ -444,6 +445,12 @@ nv30_render_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) static void nv30_render_destroy(struct vbuf_render *render) { + struct nv30_render *r = nv30_render(render); + + if (r->transfer) + pipe_buffer_unmap(&r->nv30->base.pipe, r->transfer); + pipe_resource_reference(&r->buffer, NULL); + nouveau_heap_free(&r->vertprog); FREE(render); } |