From 96863baa42564ce2daa5f4651f1c52f1d281d9a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 1 May 2012 00:11:25 +0200 Subject: [PATCH] u_vbuf: set user buffer pointer for drivers which support user buffers It's not common to end up in u_vbuf and at the same time support user buffers in a driver, but such a combination should work. --- 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 400fada1830..4141ba536fd 100644 --- a/src/gallium/auxiliary/util/u_vbuf.c +++ b/src/gallium/auxiliary/util/u_vbuf.c @@ -717,6 +717,7 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr, unsigned count, real_vb->buffer_offset = orig_vb->buffer_offset = vb->buffer_offset; real_vb->stride = orig_vb->stride = vb->stride; + real_vb->user_buffer = NULL; if (vb->stride) { mgr->nonzero_stride_vb_mask |= 1 << i; @@ -741,6 +742,7 @@ void u_vbuf_set_vertex_buffers(struct u_vbuf *mgr, unsigned count, } pipe_resource_reference(&real_vb->buffer, vb->buffer); + real_vb->user_buffer = vb->user_buffer; } for (i = count; i < mgr->nr_vertex_buffers; i++) { -- 2.30.2