[Piglit] [PATCH] no-op-paths: Clear between each test.

Brian Paul brianp at vmware.com
Mon Jul 17 17:38:39 UTC 2017


On 07/17/2017 11:12 AM, Eric Anholt wrote:
> This matches the behavior of the old glean test.  Without it, the
> always-pass subtests would all pass if the first one had passed, and
> if a single always-fail subtest failed then the rest would also fail.
> ---
>   tests/spec/gl-1.0/no-op-paths.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tests/spec/gl-1.0/no-op-paths.c b/tests/spec/gl-1.0/no-op-paths.c
> index 4576f35e9a23..7c86b7c30941 100644
> --- a/tests/spec/gl-1.0/no-op-paths.c
> +++ b/tests/spec/gl-1.0/no-op-paths.c
> @@ -250,10 +250,10 @@ piglit_display(void)
>   	piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
>
>   	glDisable(GL_DITHER);
> -	glClear(GL_COLOR_BUFFER_BIT);
>   	
>   	/* test always-pass paths */
>   	for (i = 0; i < NUM_PATHS; i++) {
> +		glClear(GL_COLOR_BUFFER_BIT);
>   		set_path_state(i, ALWAYS_PASS);
>
>   		/* draw polygon */
> @@ -272,6 +272,7 @@ piglit_display(void)
>
>   	/* enable all always-pass paths */
>   	{
> +		glClear(GL_COLOR_BUFFER_BIT);
>   		for (i = 0; i < NUM_PATHS; i++) {
>   			set_path_state(i, ALWAYS_PASS);
>   		}
> @@ -292,6 +293,7 @@ piglit_display(void)
>
>   	/* test never-pass paths */
>   	for (i = 0; i < NUM_PATHS; i++) {
> +		glClear(GL_COLOR_BUFFER_BIT);
>   		set_path_state(i, ALWAYS_FAIL);
>
>   		/* draw polygon */
>

Reviewed-by: Brian Paul <brianp at vmware.com>




More information about the Piglit mailing list