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/i915 | |
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/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_context.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/i915/i915_context.c b/src/gallium/drivers/i915/i915_context.c index f3c7b30527c..988d6591519 100644 --- a/src/gallium/drivers/i915/i915_context.c +++ b/src/gallium/drivers/i915/i915_context.c @@ -71,8 +71,10 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) mapped_indices = i915->index_buffer.user_buffer; if (!mapped_indices) mapped_indices = i915_buffer(i915->index_buffer.buffer)->data; + draw_set_indexes(draw, + (ubyte *) mapped_indices + i915->index_buffer.offset, + i915->index_buffer.index_size); } - draw_set_mapped_index_buffer(draw, mapped_indices); if (i915->constants[PIPE_SHADER_VERTEX]) draw_set_mapped_constant_buffer(draw, PIPE_SHADER_VERTEX, 0, @@ -91,7 +93,7 @@ i915_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info) draw_vbo(i915->draw, info); if (mapped_indices) - draw_set_mapped_index_buffer(draw, NULL); + draw_set_indexes(draw, NULL, 0); if (i915->num_vertex_sampler_views > 0) i915_cleanup_vertex_sampling(i915); diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index 1ff53884ada..f4b5d6f37b7 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -1048,9 +1048,6 @@ static void i915_set_index_buffer(struct pipe_context *pipe, memcpy(&i915->index_buffer, ib, sizeof(i915->index_buffer)); else memset(&i915->index_buffer, 0, sizeof(i915->index_buffer)); - - /* pass-through to draw module */ - draw_set_index_buffer(i915->draw, ib); } static void |