[Piglit] [PATCH v2 3/5] fbo-storage-formats:minor improvements to error detection.

Chad Versace chad.versace at linux.intel.com
Tue Sep 3 11:19:01 PDT 2013


On 08/23/2013 11:51 AM, Kenney Phillis wrote:
> sometimes errors can sneak in when generating the context and
> interfere with the test. This clears out all errors before the
> actual test begins.
> ---
>   tests/fbo/fbo-storage-formats.c |    3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
> index e66d4f0..564f7dc 100644
> --- a/tests/fbo/fbo-storage-formats.c
> +++ b/tests/fbo/fbo-storage-formats.c
> @@ -165,6 +165,9 @@ test(void)
>   	int i;
>   	GLboolean pass = GL_TRUE;
>
> +	/* clear out any errors */
> +	while (glGetError())
> +		;
>   	glGenFramebuffersEXT(1, &fbo);
>   	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
>   	if (!piglit_check_gl_error(GL_NO_ERROR))


There exists a function for this in piglit-util-gl-common.h, named
'piglit_reset_error' or something similar. Use that function instead,
and this gets Reviewed-by: Chad Versace <chad.versace at linux.intel.com>



More information about the Piglit mailing list