[Piglit] [PATCH 1/2] arb_vertex_type_10f_10f_11f_rev: add test for api-errors

Eric Anholt eric at anholt.net
Thu Nov 7 10:54:06 PST 2013


Chris Forbes <chrisf at ijw.co.nz> writes:
> +static bool
> +test_vertex_attribs()
> +{
> +	bool pass = true;
> +	GLuint data = 0;
> +
> +	/* "The error INVALID_OPERATION is generated by ... , or VertexAttribPointer
> +	 * if <type> is UNSIGNED_INT_10F_11F_11F_REV and <size> is not 3.
> +	 */
> +
> +	glVertexAttribPointer(0, 3, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FALSE, 0, (GLvoid *)0);
> +	TEST("VertexAttribPointer-ok", GL_NO_ERROR);
> +
> +	glVertexAttribPointer(0, 2, GL_UNSIGNED_INT_10F_11F_11F_REV, GL_FALSE, 0, (GLvoid *)0);
> +	TEST("VertexAttribPointer-badsize", GL_INVALID_OPERATION);

I think file could also use a test that a normalized == GL_TRUE doesn't
spuriously throw an error, given how much spec text is devoted to that.

> +void
> +piglit_init(int argc, char **argv)
> +{
> +	bool pass = true;
> +	GLuint bo;
> +
> +	piglit_require_extension("GL_ARB_vertex_type_2_10_10_10_rev");
> +	piglit_require_extension("GL_ARB_vertex_type_10f_11f_11f_rev");

The 2_10_10_10 check seems gratuitous.  In particular, if an
implementation exposed 10f without the infrastructure from 2_10, you'd
want this test to run and fail.

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20131107/cd8a68c9/attachment.pgp>


More information about the Piglit mailing list