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/svga | |
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/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_swtnl_draw.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/svga/svga_swtnl_draw.c b/src/gallium/drivers/svga/svga_swtnl_draw.c index bb6870f6572..212f11a8230 100644 --- a/src/gallium/drivers/svga/svga_swtnl_draw.c +++ b/src/gallium/drivers/svga/svga_swtnl_draw.c @@ -76,17 +76,16 @@ svga_swtnl_draw_vbo(struct svga_context *svga, } } - /* TODO move this to update_swtnl_draw */ - draw_set_index_buffer(draw, &svga->curr.ib); - /* Map index buffer, if present */ map = NULL; if (info->indexed && svga->curr.ib.buffer) { map = pipe_buffer_map(&svga->pipe, svga->curr.ib.buffer, PIPE_TRANSFER_READ, &ib_transfer); + draw_set_indexes(draw, + (const ubyte *) map + svga->curr.ib.offset, + svga->curr.ib.index_size); } - draw_set_mapped_index_buffer(draw, map); if (svga->curr.cb[PIPE_SHADER_VERTEX]) { map = pipe_buffer_map(&svga->pipe, @@ -119,7 +118,7 @@ svga_swtnl_draw_vbo(struct svga_context *svga, if (ib_transfer) { pipe_buffer_unmap(&svga->pipe, ib_transfer); - draw_set_mapped_index_buffer(draw, NULL); + draw_set_indexes(draw, NULL, 0); } if (svga->curr.cb[PIPE_SHADER_VERTEX]) { |