summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-05-25 09:44:53 -0600
committerBrian Paul <[email protected]>2012-05-31 09:40:35 -0600
commit185ed2105829d6f5eb19edb9abbf0d7977e157c3 (patch)
tree91716430893902305c60756e64b2ec8328895640 /src/mesa/state_tracker
parent151bf6e6cf8f9de4067cfcf15f6ac448ff295533 (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/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw_feedback.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mesa/state_tracker/st_draw_feedback.c b/src/mesa/state_tracker/st_draw_feedback.c
index 4209fb214f8..820918e51e3 100644
--- a/src/mesa/state_tracker/st_draw_feedback.c
+++ b/src/mesa/state_tracker/st_draw_feedback.c
@@ -232,8 +232,9 @@ st_feedback_draw_vbo(struct gl_context *ctx,
mapped_indices = ib->ptr;
}
- draw_set_index_buffer(draw, &ibuffer);
- draw_set_mapped_index_buffer(draw, mapped_indices);
+ draw_set_indexes(draw,
+ (ubyte *) mapped_indices + ibuffer.offset,
+ ibuffer.index_size);
}
/* set the constant buffer */
@@ -252,9 +253,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
* unmap vertex/index buffers
*/
if (ib) {
- draw_set_mapped_index_buffer(draw, NULL);
- draw_set_index_buffer(draw, NULL);
-
+ draw_set_indexes(draw, NULL, 0);
if (ib_transfer)
pipe_buffer_unmap(pipe, ib_transfer);
pipe_resource_reference(&ibuffer.buffer, NULL);