diff options
author | Marek Olšák <[email protected]> | 2011-11-20 03:43:11 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-11-20 16:24:12 +0100 |
commit | a18dad8055b452595a1ddece7da912ab67a850af (patch) | |
tree | 9b5a2792bde53e40026aafe68d5334500443c1aa /src/gallium/drivers/r300/r300_state.c | |
parent | 4cfc8c775c751dd2b2b43f3ca58ae9798a84c0f1 (diff) |
r300g: use u_vbuf_mgr to set/get the index buffer
Diffstat (limited to 'src/gallium/drivers/r300/r300_state.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/gallium/drivers/r300/r300_state.c b/src/gallium/drivers/r300/r300_state.c index 11282a45e0f..10d7ac285d3 100644 --- a/src/gallium/drivers/r300/r300_state.c +++ b/src/gallium/drivers/r300/r300_state.c @@ -1604,17 +1604,7 @@ static void r300_set_index_buffer(struct pipe_context* pipe, { struct r300_context* r300 = r300_context(pipe); - if (ib && ib->buffer) { - assert(ib->offset % ib->index_size == 0); - - pipe_resource_reference(&r300->index_buffer.buffer, ib->buffer); - memcpy(&r300->index_buffer, ib, sizeof(r300->index_buffer)); - r300->index_buffer.offset /= r300->index_buffer.index_size; - } - else { - pipe_resource_reference(&r300->index_buffer.buffer, NULL); - memset(&r300->index_buffer, 0, sizeof(r300->index_buffer)); - } + u_vbuf_set_index_buffer(r300->vbuf_mgr, ib); if (!r300->screen->caps.has_tcl) { draw_set_index_buffer(r300->draw, ib); |