r600g: add index_bias to index buffer bounds

This fixes ARB_draw_elements_base_vertex with max_index != ~0.

NOTE: This is a candidate for the 7.11 branch.
(cherry picked from commit 44afac04ea)
This commit is contained in:
Marek Olšák 2011-09-26 15:03:43 +02:00
parent 2781baaa64
commit 1cf8f9599c

View file

@ -569,6 +569,11 @@ void r600_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
r600_vertex_buffer_update(rctx);
draw.info = *info;
if (draw.info.max_index != ~0) {
draw.info.min_index += info->index_bias;
draw.info.max_index += info->index_bias;
}
draw.ctx = ctx;
draw.index_buffer = NULL;
if (info->indexed && rctx->index_buffer.buffer) {