[Piglit] [PATCH 4/5] arb_transform_feedback2: Misc. API query tests

Eric Anholt eric at anholt.net
Mon Jul 23 09:00:13 PDT 2012


Ian Romanick <idr at freedesktop.org> writes:
> +	/* Verify the initial state of transform feedback object queires.
> +	 */
> +	glGetIntegerv(GL_TRANSFORM_FEEDBACK_BINDING, &int_value);
> +	pass = expect_int("GL_TRANSFORM_FEEDBACK_BINDING",
> +			   id, int_value)
> +		&& pass;
> +
> +	glGetBooleanv(GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, &bool_value);
> +	pass = expect_bool("GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED",
> +			   false, bool_value)
> +		&& pass;
> +
> +	glGetBooleanv(GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, &bool_value);
> +	pass = expect_bool("GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE",
> +			   false, bool_value)
> +		&& pass;
> +
> +	/* Make active and verify.
> +	 */
> +	glBeginTransformFeedback(GL_TRIANGLES);
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glGetBooleanv(GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, &bool_value);
> +	pass = expect_bool("GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE",
> +			   true, bool_value)
> +		&& pass;
> +
> +	/* Pause and verify.
> +	 */
> +	glPauseTransformFeedback();
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glGetBooleanv(GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, &bool_value);
> +	pass = expect_bool("GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED",
> +			   true, bool_value)
> +		&& pass;
> +
> +	/* Resume and verify.
> +	 */
> +	glResumeTransformFeedback();
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glGetBooleanv(GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED, &bool_value);
> +	pass = expect_bool("GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED",
> +			   false, bool_value)
> +		&& pass;

It's probably worth checking ACTIVE here as well to distinguish the two
state that could be returned for that query.

> +	/* End and verify.
> +	 */
> +	glEndTransformFeedback();
> +	pass = piglit_check_gl_error(0) && pass;
> +
> +	glGetBooleanv(GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE, &bool_value);
> +	pass = expect_bool("GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE",
> +			   false, bool_value)
> +		&& pass;


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: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20120723/e5814b10/attachment.pgp>


More information about the Piglit mailing list