diff options
author | Keith Whitwell <keithw@vmware.com> | 2010-06-14 15:11:59 +0100 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2010-06-15 09:12:19 -0400 |
commit | b85a361ccbac956d2842251395c048a4b3f4c440 (patch) | |
tree | 8acef8fdd62dc93eae50ff359acbffc293e8bffa /src/gallium/auxiliary/draw/draw_pt_so_emit.c | |
parent | 5d4d4b2134595c4ed8060d6d002a0cd54690c289 (diff) |
draw wip
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_so_emit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_so_emit.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_so_emit.c b/src/gallium/auxiliary/draw/draw_pt_so_emit.c index bb153cedfa..2bdfef114e 100644 --- a/src/gallium/auxiliary/draw/draw_pt_so_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_so_emit.c @@ -133,10 +133,12 @@ void draw_pt_so_emit_prepare( struct pt_so_emit *emit, void draw_pt_so_emit( struct pt_so_emit *emit, - const float (*vertex_data)[4], - unsigned vertex_count, - unsigned stride ) + const struct draw_vertex_info *vert_info, + const struct draw_prim_info *prim_info ) { + const float (*vertex_data)[4] = vert_info->verts; + unsigned vertex_count = vert_info->count; + unsigned stride = vert_info->stride; struct draw_context *draw = emit->draw; struct translate *translate = emit->translate; struct vbuf_render *render = draw->render; @@ -166,8 +168,22 @@ void draw_pt_so_emit( struct pt_so_emit *emit, translate->set_buffer(translate, 0, vertex_data, stride, ~0); - translate->run(translate, 0, vertex_count, - draw->instance_id, so_buffer); + + for (start = i = 0; + i < prim_info->primitive_count; + start += prim_info->primitive_lengths[i], i++) + { + unsigned count = prim_info->primitive_lengths[i]; + + if (prim_info->linear) { + translate->runXXX(translate, start, count, + draw->instance_id, so_buffer); + } + else { + translate->runYYY(translate, start, count, + draw->instance_id, so_buffer); + } + } render->set_stream_output_info(render, 0, vertex_count); } |