summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_prim_vbuf.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-01-04 17:38:55 +0000
committerDave Airlie <airlied@redhat.com>2012-01-10 12:07:51 +0000
commitec8cbd79ac4065111365a6720c9564de56855cc8 (patch)
tree741b04a8e779a4ce401f59bbe505fbd1e55e78ab /src/gallium/drivers/softpipe/sp_prim_vbuf.c
parent67e3cbf1632e361220234013147331e4618b70cb (diff)
draw/softpipe: EXT_transform_feedback support (v2)
This replaces the current code with an implementation compatible with the new gallium interface. I've left some of the remains of the interface intact so llvmpipe keeps building correctly, and I'll take a look at fixing llvmpipe up later. v2: fixup as per Brian's review Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_prim_vbuf.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_vbuf.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
index 54a6542bdcd..a142118f31e 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
@@ -542,19 +542,16 @@ sp_vbuf_draw_arrays(struct vbuf_render *vbr, uint start, uint nr)
}
static void
-sp_vbuf_so_info(struct vbuf_render *vbr, uint primitives, uint vertices)
+sp_vbuf_so_info(struct vbuf_render *vbr, uint primitives, uint vertices,
+ uint prim_generated)
{
struct softpipe_vbuf_render *cvbr = softpipe_vbuf_render(vbr);
struct softpipe_context *softpipe = cvbr->softpipe;
- unsigned i;
-
- for (i = 0; i < softpipe->so_target.num_buffers; ++i) {
- softpipe->so_target.so_count[i] += vertices;
- }
- softpipe->so_stats.num_primitives_written = primitives;
+ softpipe->so_stats.num_primitives_written += primitives;
softpipe->so_stats.primitives_storage_needed =
vertices * 4 /*sizeof(float|int32)*/ * 4 /*x,y,z,w*/;
+ softpipe->num_primitives_generated += prim_generated;
}