summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-09-26 15:03:43 +0200
committerMarek Olšák <[email protected]>2011-09-26 15:25:05 +0200
commit44afac04eaac08eb49938001a65363bef6bd3d3b (patch)
treefbfbc3e9ea8357bf193b30acb804ffd6e77f918a /src
parent60a77cf316a90cb5be4f73495c2545b3d49e5ca1 (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index bec31ffe9fd..3a6298115ae 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -572,6 +572,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) {