diff options
author | Marek Olšák <[email protected]> | 2011-10-26 02:17:52 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-10-26 15:15:57 +0200 |
commit | 344039d81d3cc079dd73b3b703ff613c344904e0 (patch) | |
tree | d2f600001ba4cf12c15e995e830d60d74c860c74 /src/gallium/drivers/r600/r600_translate.c | |
parent | 20a20c781ac2143e92807fa8dfab086a5b7c1d53 (diff) |
r600g: cleanup draw_vbo and add comments
Diffstat (limited to 'src/gallium/drivers/r600/r600_translate.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_translate.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/drivers/r600/r600_translate.c b/src/gallium/drivers/r600/r600_translate.c index 32f683b0152..9159e452343 100644 --- a/src/gallium/drivers/r600/r600_translate.c +++ b/src/gallium/drivers/r600/r600_translate.c @@ -30,27 +30,26 @@ void r600_translate_index_buffer(struct r600_pipe_context *r600, - struct pipe_resource **index_buffer, - unsigned *index_size, - unsigned *start, unsigned count) + struct pipe_index_buffer *ib, + unsigned count) { struct pipe_resource *out_buffer = NULL; unsigned out_offset; void *ptr; boolean flushed; - switch (*index_size) { + switch (ib->index_size) { case 1: u_upload_alloc(r600->vbuf_mgr->uploader, 0, count * 2, &out_offset, &out_buffer, &flushed, &ptr); util_shorten_ubyte_elts_to_userptr( - &r600->context, *index_buffer, 0, *start, count, ptr); + &r600->context, ib->buffer, 0, ib->offset, count, ptr); - pipe_resource_reference(index_buffer, out_buffer); - pipe_resource_reference(&out_buffer, NULL); - *index_size = 2; - *start = out_offset / 2; + pipe_resource_reference(&ib->buffer, NULL); + ib->buffer = out_buffer; + ib->offset = out_offset; + ib->index_size = 2; break; } } |