diff options
author | Brian Paul <[email protected]> | 2012-05-25 09:44:53 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-05-31 09:40:35 -0600 |
commit | 185ed2105829d6f5eb19edb9abbf0d7977e157c3 (patch) | |
tree | 91716430893902305c60756e64b2ec8328895640 /src/gallium/drivers/r300/r300_state.c | |
parent | 151bf6e6cf8f9de4067cfcf15f6ac448ff295533 (diff) |
draw: simplify index buffer specification
Replace draw_set_index_buffer() and draw_set_mapped_index_buffer() with
draw_set_indexes() which simply takes a pointer and an index size.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-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); } } |