aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_draw_arrays.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_draw_arrays.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index f37b3ca1cea..3497edf9d1c 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -68,8 +68,12 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
*/
for (i = 0; i < lp->num_vertex_buffers; i++) {
const void *buf = lp->vertex_buffer[i].user_buffer;
- if (!buf)
+ if (!buf) {
+ if (!lp->vertex_buffer[i].buffer) {
+ continue;
+ }
buf = llvmpipe_resource_data(lp->vertex_buffer[i].buffer);
+ }
draw_set_mapped_vertex_buffer(draw, i, buf);
}