u_vbuf: unbind vertex buffers on destroy
authorMarek Olšák <maraeo@gmail.com>
Sun, 29 Apr 2012 15:41:37 +0000 (17:41 +0200)
committerMarek Olšák <maraeo@gmail.com>
Sun, 29 Apr 2012 15:41:37 +0000 (17:41 +0200)
src/gallium/auxiliary/util/u_vbuf.c

index 2d60c07c4ad728568897ce2321d76511ac6e881f..401c8a4a850dbaf1a4d9ede36b97ee1ad12750d7 100644 (file)
@@ -239,6 +239,8 @@ void u_vbuf_destroy(struct u_vbuf *mgr)
 {
    unsigned i;
 
+   mgr->pipe->set_vertex_buffers(mgr->pipe, 0, NULL);
+
    for (i = 0; i < mgr->nr_vertex_buffers; i++) {
       pipe_resource_reference(&mgr->vertex_buffer[i].buffer, NULL);
    }