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/llvmpipe | |
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/llvmpipe')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_draw_arrays.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_vertex.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c index 225b80e3dfb..96259d7144f 100644 --- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c +++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c @@ -78,9 +78,11 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) mapped_indices = lp->index_buffer.user_buffer; if (!mapped_indices) mapped_indices = llvmpipe_resource_data(lp->index_buffer.buffer); - } - draw_set_mapped_index_buffer(draw, mapped_indices); + draw_set_indexes(draw, + (ubyte *) mapped_indices + lp->index_buffer.offset, + lp->index_buffer.index_size); + } llvmpipe_prepare_vertex_sampling(lp, lp->num_vertex_sampler_views, @@ -96,7 +98,7 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) draw_set_mapped_vertex_buffer(draw, i, NULL); } if (mapped_indices) { - draw_set_mapped_index_buffer(draw, NULL); + draw_set_indexes(draw, NULL, 0); } llvmpipe_cleanup_vertex_sampling(lp); diff --git a/src/gallium/drivers/llvmpipe/lp_state_vertex.c b/src/gallium/drivers/llvmpipe/lp_state_vertex.c index a62cfd55334..4a74cd7c9d4 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_vertex.c +++ b/src/gallium/drivers/llvmpipe/lp_state_vertex.c @@ -102,8 +102,6 @@ llvmpipe_set_index_buffer(struct pipe_context *pipe, memcpy(&llvmpipe->index_buffer, ib, sizeof(llvmpipe->index_buffer)); else memset(&llvmpipe->index_buffer, 0, sizeof(llvmpipe->index_buffer)); - - draw_set_index_buffer(llvmpipe->draw, ib); } void |