summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/svga/svga_pipe_vertex.c
diff options
context:
space:
mode:
authorCharmaine Lee <charmainel@vmware.com>2016-05-02 18:12:24 -0700
committerBrian Paul <brianp@vmware.com>2016-06-23 07:31:19 -0600
commita1d74f5528f4bab6679fc08b1a25055336c85089 (patch)
treef051a0ee58972655e927cd7a2b7a87b95b1a4f82 /src/gallium/drivers/svga/svga_pipe_vertex.c
parentab99196b6bc5b0170db20db6cc3837ce7642d22a (diff)
svga: fix index buffer reference in the hw state
Instead of copy the index buffer resource handle to the hw state in the context structure, use pipe_resource_reference to properly reference the index buffer resource in the context. Reviewed-by: Brian Paul <brianp@vmware.com>
Diffstat (limited to 'src/gallium/drivers/svga/svga_pipe_vertex.c')
-rw-r--r--src/gallium/drivers/svga/svga_pipe_vertex.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_pipe_vertex.c b/src/gallium/drivers/svga/svga_pipe_vertex.c
index 99757e4e135..4692f766546 100644
--- a/src/gallium/drivers/svga/svga_pipe_vertex.c
+++ b/src/gallium/drivers/svga/svga_pipe_vertex.c
@@ -327,6 +327,8 @@ void svga_cleanup_vertex_state( struct svga_context *svga )
for (i = 0 ; i < svga->curr.num_vertex_buffers; i++)
pipe_resource_reference(&svga->curr.vb[i].buffer, NULL);
+
+ pipe_resource_reference(&svga->state.hw_draw.ib, NULL);
}