From dc7b6d7d6defdfe4f79fb682d3378a3bed8b5db9 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Mon, 19 Dec 2011 11:47:14 -0800 Subject: mesa: Add count_tessellated_primitives() function. This function computes the number of primitives that will be generated when the given drawing operation is performed. It accounts for the tessellation that is performed on line strips, line loops, triangle strips, triangle fans, quads, quad strips, and polygons, so it is suitable for implementing the primitive counters needed by transform feedback. Reviewed-by: Kenneth Graunke --- src/mesa/vbo/vbo.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/mesa/vbo/vbo.h') diff --git a/src/mesa/vbo/vbo.h b/src/mesa/vbo/vbo.h index f357657afa7..7384790e3ca 100644 --- a/src/mesa/vbo/vbo.h +++ b/src/mesa/vbo/vbo.h @@ -137,6 +137,9 @@ void vbo_check_buffers_are_unmapped(struct gl_context *ctx); void vbo_bind_arrays(struct gl_context *ctx); +size_t +count_tessellated_primitives(const struct _mesa_prim *prim); + void GLAPIENTRY _es_Color4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a); -- cgit v1.2.3