summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2010-06-16 14:42:17 -0400
committerZack Rusin <[email protected]>2010-06-16 14:43:56 -0400
commit287531772ccea82c8a6c4dab5656d751a8943524 (patch)
treef5f0a8bf809e8aa5853d971e0854230e8ddbe695 /src/gallium/drivers
parent668fa68019ec09fcd0486e612d01d61a0c9a4b2f (diff)
draw: rewrite stream output to handle all the dark corners
register masks, multiple output buffers, multiple primitives, non-linear vertices (elts) and stride semantics.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_vbuf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
index ddfe56f73a4..c60249dbfbc 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
@@ -543,15 +543,17 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
}
static void
-sp_vbuf_so_info(struct vbuf_render *vbr, uint buffer, uint vertices)
+sp_vbuf_so_info(struct vbuf_render *vbr, uint primitives, uint vertices)
{
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
struct softpipe_context *softpipe = cvbr->softpipe;
+ unsigned i;
- softpipe->so_target.so_count[buffer] += vertices;
+ for (i = 0; i < softpipe->so_target.num_buffers; ++i) {
+ softpipe->so_target.so_count[i] += vertices;
+ }
- softpipe->so_stats.num_primitives_written =
- vertices / u_vertices_per_prim(cvbr->prim);
+ softpipe->so_stats.num_primitives_written = primitives;
softpipe->so_stats.primitives_storage_needed =
vertices * 4 /*sizeof(float|int32)*/ * 4 /*x,y,z,w*/;
}