summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_draw_arrays.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index 22c2836e225..e73b431cb4d 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -69,8 +69,8 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
/* Map index buffer, if present */
if (info->indexed && lp->index_buffer.buffer) {
- mapped_indices = llvmpipe_resource_data(lp->index_buffer.buffer);
- mapped_indices += lp->index_buffer.offset;
+ char *indices = (char *) llvmpipe_resource_data(lp->index_buffer.buffer);
+ mapped_indices = (void *) (indices + lp->index_buffer.offset);
}
draw_set_mapped_element_buffer_range(draw, (mapped_indices) ?