diff options
author | Brian Paul <brianp@vmware.com> | 2012-01-07 14:16:27 -0700 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2012-01-07 14:16:27 -0700 |
commit | 994c33db875c6af2f5b535a7a173ff3bfa24fc32 (patch) | |
tree | bca510120de52f4fb064be1d6b213bc087e6b0c3 /src/gallium/auxiliary/draw/draw_pt_fetch.c | |
parent | 488dd2c1912132fe7ee5e81b05fb64ba62a46098 (diff) | |
download | external_mesa3d-994c33db875c6af2f5b535a7a173ff3bfa24fc32.zip external_mesa3d-994c33db875c6af2f5b535a7a173ff3bfa24fc32.tar.gz external_mesa3d-994c33db875c6af2f5b535a7a173ff3bfa24fc32.tar.bz2 |
draw: whitespace fixes, etc.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index 534a077..b0032e5 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -46,7 +46,8 @@ struct pt_fetch { }; -/* Perform the fetch from API vertex elements & vertex buffers, to a +/** + * Perform the fetch from API vertex elements & vertex buffers, to a * contiguous set of float[4] attributes as required for the * vertex_shader->run_linear() method. * @@ -55,10 +56,11 @@ struct pt_fetch { * directly to hw vertices. * */ -void draw_pt_fetch_prepare( struct pt_fetch *fetch, - unsigned vs_input_count, - unsigned vertex_size, - unsigned instance_id_index ) +void +draw_pt_fetch_prepare(struct pt_fetch *fetch, + unsigned vs_input_count, + unsigned vertex_size, + unsigned instance_id_index) { struct draw_context *draw = fetch->draw; unsigned nr_inputs; @@ -141,43 +143,41 @@ void draw_pt_fetch_prepare( struct pt_fetch *fetch, translate_key_sanitize(&key); fetch->translate = translate_cache_find(fetch->cache, &key); } - } - - -void draw_pt_fetch_run( struct pt_fetch *fetch, - const unsigned *elts, - unsigned count, - char *verts ) +void +draw_pt_fetch_run(struct pt_fetch *fetch, + const unsigned *elts, + unsigned count, + char *verts) { struct draw_context *draw = fetch->draw; struct translate *translate = fetch->translate; unsigned i; for (i = 0; i < draw->pt.nr_vertex_buffers; i++) { - translate->set_buffer(translate, - i, - ((char *)draw->pt.user.vbuffer[i] + + translate->set_buffer(translate, + i, + ((char *)draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), draw->pt.vertex_buffer[i].stride, draw->pt.max_index); } translate->run_elts( translate, - elts, + elts, count, draw->instance_id, verts ); - } -void draw_pt_fetch_run_linear( struct pt_fetch *fetch, - unsigned start, - unsigned count, - char *verts ) +void +draw_pt_fetch_run_linear(struct pt_fetch *fetch, + unsigned start, + unsigned count, + char *verts) { struct draw_context *draw = fetch->draw; struct translate *translate = fetch->translate; @@ -200,7 +200,8 @@ void draw_pt_fetch_run_linear( struct pt_fetch *fetch, } -struct pt_fetch *draw_pt_fetch_create( struct draw_context *draw ) +struct pt_fetch * +draw_pt_fetch_create(struct draw_context *draw) { struct pt_fetch *fetch = CALLOC_STRUCT(pt_fetch); if (!fetch) @@ -216,11 +217,12 @@ struct pt_fetch *draw_pt_fetch_create( struct draw_context *draw ) return fetch; } -void draw_pt_fetch_destroy( struct pt_fetch *fetch ) + +void +draw_pt_fetch_destroy(struct pt_fetch *fetch) { if (fetch->cache) translate_cache_destroy(fetch->cache); FREE(fetch); } - |