summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_prim_vbuf.c
diff options
context:
space:
mode:
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*/;
}