From: Marek Olšák Date: Sun, 29 Apr 2012 15:41:37 +0000 (+0200) Subject: u_vbuf: unbind vertex buffers on destroy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18bcb962bbad451a5e34f0315f03b8fb4533ea73;p=mesa.git u_vbuf: unbind vertex buffers on destroy --- 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); }