This fixes fdo bug #29286.
* 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) ?
/* 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) ?
indices = pipe_buffer_map(pipe, r300->index_buffer.buffer,
PIPE_TRANSFER_READ, &ib_transfer);
if (indices)
- indices += r300->index_buffer.offset;
+ indices = (void *) ((char *) indices + r300->index_buffer.offset);
}
draw_set_mapped_element_buffer_range(r300->draw, (indices) ?
/* Map index buffer, if present */
if (info->indexed && sp->index_buffer.buffer) {
- mapped_indices = softpipe_resource(sp->index_buffer.buffer)->data;
- mapped_indices += sp->index_buffer.offset;
+ char *indices = (char *) softpipe_resource(sp->index_buffer.buffer)->data;
+ mapped_indices = (void *) (indices + sp->index_buffer.offset);
}
draw_set_mapped_element_buffer_range(draw, (mapped_indices) ?