summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_prim_vbuf.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2010-06-07 12:14:56 -0400
committerZack Rusin <zackr@vmware.com>2010-06-08 06:28:11 -0400
commitbe7d8ddf0c0a293ee94db360a44561beb10e62f9 (patch)
tree1e437b13943146fbe769b45373eedd156e99d12c /src/gallium/drivers/softpipe/sp_prim_vbuf.c
parent34f7681669987bc804f4603463f2fa3f82bc844f (diff)
gallium: add basic support for stream output queries
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_prim_vbuf.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_prim_vbuf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_prim_vbuf.c b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
index 06691e8395..ddfe56f73a 100644
--- a/src/gallium/drivers/softpipe/sp_prim_vbuf.c
+++ b/src/gallium/drivers/softpipe/sp_prim_vbuf.c
@@ -549,6 +549,11 @@ sp_vbuf_so_info(struct vbuf_render *vbr, uint buffer, uint vertices)
struct softpipe_context *softpipe = cvbr->softpipe;
softpipe->so_target.so_count[buffer] += vertices;
+
+ softpipe->so_stats.num_primitives_written =
+ vertices / u_vertices_per_prim(cvbr->prim);
+ softpipe->so_stats.primitives_storage_needed =
+ vertices * 4 /*sizeof(float|int32)*/ * 4 /*x,y,z,w*/;
}