diff options
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index e025c2fcd1e..6f9feb10564 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1649,16 +1649,16 @@ static void r300_set_index_buffer_swtcl(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); - draw_set_index_buffer(r300->draw, ib); - if (ib) { + const void *buf = NULL; if (ib->user_buffer) { - draw_set_mapped_index_buffer(r300->draw, - ib->user_buffer); + buf = ib->user_buffer; } else if (ib->buffer) { - draw_set_mapped_index_buffer(r300->draw, - r300_resource(ib->buffer)->malloced_buffer); + buf = r300_resource(ib->buffer)->malloced_buffer; } + draw_set_indexes(r300->draw, + (const ubyte *) buf + ib->offset, + ib->index_size); } } |