From: Marek Olšák Date: Mon, 30 Apr 2012 22:11:25 +0000 (+0200) Subject: u_vbuf: set user buffer pointer for drivers which support user buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=96863baa42564ce2daa5f4651f1c52f1d281d9a5;p=mesa.git 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. --- 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++) {