[Piglit] [PATCH 3/5] arb_transform_feedback2: Misc. API error checks

Eric Anholt eric at anholt.net
Mon Jul 23 08:58:16 PDT 2012


Ian Romanick <idr at freedesktop.org> writes:

> From: Ian Romanick <ian.d.romanick at intel.com>
>
> This covers most of the errors mentioned in the spec that aren't
> already covered in cannot-bind-when-active.c and gen-names-only.c.
> Most of the other errors should be covered by existing
> EXT_transform_feedback tests.
>
> Mesa currently fails three of the subtests (TransformFeedbackVaryings
> only when inactive; Link program only when inactive; and Resume with
> the same program only).
>
> NVIDIA's closed-source driver fails several subtests.
>
>     Pause active feedback only: Incorrectly generates error in
>     glEndTransformFeedback.  Later subtests have a work-around for
>     this bug.  Without the work-around, every test would fail.

Probably should put the note about the work-around next to the
workaround in pause_active_only.  Other tests say "go look at
pause_active_only", but I only knew what specifically that referred to
due to the commit msg.

> +static bool resume_same_program_only(void)
> +{
> +	bool pass = true;
> +
> +	if (!piglit_automatic)
> +		printf("Resume with the same program only...\n");
> +
> +	/* The ARB_transform_feedback2 spec says:
> +	 *
> +	 *     "The error INVALID_OPERATION is generated:
> +	 *
> +	 *         * by ResumeTransformFeedback if the program object being
> +	 *           used by the current transform feedback object is not
> +	 *           active."
> +	 */
> +	glBeginTransformFeedback(GL_TRIANGLES);
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glPauseTransformFeedback();
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glUseProgram(0);
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glResumeTransformFeedback();
> +	pass = piglit_check_gl_error(GL_INVALID_OPERATION) && pass;

By using program 0, you should also see GL_INVALID_OPERATION due to
vertex_shader_only, so you may not be testing what you mean to be
testing here.

Other than that,

Reviewed-by: Eric Anholt <eric at anholt.net>

(also the previous two)
-------------- 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/20120723/38e8149a/attachment.pgp>


More information about the Piglit mailing list