[Piglit] [PATCH] primgen: new test for PRIMITIVES_GENERATED query

Eric Anholt eric at anholt.net
Fri Mar 22 11:49:48 PDT 2013


Marek Olšák <maraeo at gmail.com> writes:

Could you give it a more informative name than "primgen"?  Like
"primgen-rasterizer-discard" or something?  Other than that, 2 minor
suggestions you can take or leave.

> +enum piglit_result piglit_display(void)
> +{

> +	glClear(GL_COLOR_BUFFER_BIT);
> +	glBeginQuery(GL_PRIMITIVES_GENERATED, q);
> +
> +	glLoadIdentity();

Superfluous, right?  The matrix never changes?

> +	glUseProgram(prog);
> +	glVertexPointer(2, GL_FLOAT, 0, verts);
> +	glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_INT, indices);

I don't think piglit_draw_rect() would ever produce other than 2 prims,
which could simplify this test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20130322/41dee0a6/attachment.pgp>


More information about the Piglit mailing list