From 18bcb962bbad451a5e34f0315f03b8fb4533ea73 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 29 Apr 2012 17:41:37 +0200 Subject: [PATCH] u_vbuf: unbind vertex buffers on destroy --- src/gallium/auxiliary/util/u_vbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c index 2d60c07c4ad..401c8a4a850 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -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); } -- 2.30.2