summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util/u_vbuf.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-05-01 00:11:25 +0200
committerMarek Olšák <[email protected]>2012-05-01 00:19:45 +0200
commit96863baa42564ce2daa5f4651f1c52f1d281d9a5 (patch)
tree3821fe72acde811788572e0c34109f1218775020 /src/gallium/auxiliary/util/u_vbuf.c
parent8c5ff5a41fa63634e2cc8037a0a601c60d233537 (diff)
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.
Diffstat (limited to 'src/gallium/auxiliary/util/u_vbuf.c')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf.c2
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 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++) {