diff options
author | Jerome Glisse <[email protected]> | 2010-09-27 09:01:55 -0400 |
---|---|---|
committer | Jerome Glisse <[email protected]> | 2010-09-27 09:59:52 -0400 |
commit | 58a31758e3b8249b12f0e797034bec235343aa15 (patch) | |
tree | 93fd066a073ba777fa77d73f8c70b25b32f8f9aa /src/gallium/drivers/r600/evergreen_state.c | |
parent | 99486bfc5b26f6deec38a2ccf2ee5645a92ae249 (diff) |
r600g: fix index buffer drawing
Signed-off-by: Jerome Glisse <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_state.c')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_state.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index b0b0f5ce776..89f7c7f53a4 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -1349,6 +1349,7 @@ void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info) draw.start = info->start; draw.count = info->count; if (info->indexed && rctx->index_buffer.buffer) { + draw.start += rctx->index_buffer.offset / rctx->index_buffer.index_size; draw.min_index = info->min_index; draw.max_index = info->max_index; draw.index_bias = info->index_bias; @@ -1495,7 +1496,7 @@ void evergreen_draw(struct pipe_context *ctx, const struct pipe_draw_info *info) if (draw.index_buffer) { rbuffer = (struct r600_resource*)draw.index_buffer; rdraw.indices = rbuffer->bo; - rdraw.indices_bo_offset = 0; + rdraw.indices_bo_offset = draw.index_buffer_offset; } evergreen_context_draw(&rctx->ctx, &rdraw); } |