summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/i915/i915_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/i915/i915_context.c')
-rw-r--r--src/gallium/drivers/i915/i915_context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c
index 496efc99da4..2beb9e3091f 100644
--- a/src/gallium/drivers/i915/i915_context.c
+++ b/src/gallium/drivers/i915/i915_context.c
@@ -67,8 +67,8 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
* Map index buffer, if present
*/
if (info->indexed && i915->index_buffer.buffer) {
- mapped_indices = i915_buffer(i915->index_buffer.buffer)->data;
- mapped_indices += i915->index_buffer.offset;
+ char *indices = (char *) i915_buffer(i915->index_buffer.buffer)->data;
+ mapped_indices = (void *) (indices + i915->index_buffer.offset);
}
draw_set_mapped_element_buffer_range(draw, (mapped_indices) ?