Mesa (master): u_vbuf: unbind vertex buffers on destroy

Marek Olšák mareko at kemper.freedesktop.org
Sun Apr 29 15:44:15 UTC 2012


Module: Mesa
Branch: master
Commit: 18bcb962bbad451a5e34f0315f03b8fb4533ea73
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=18bcb962bbad451a5e34f0315f03b8fb4533ea73

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sun Apr 29 17:41:37 2012 +0200

u_vbuf: unbind vertex buffers on destroy

---

 src/gallium/auxiliary/util/u_vbuf.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/gallium/auxiliary/util/u_vbuf.c b/src/gallium/auxiliary/util/u_vbuf.c
index 2d60c07..401c8a4 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);
    }




More information about the mesa-commit mailing list