[Piglit] [PATCH 3/4] arb_copy_image-formats: exit loops upon pixel mismatch
Anuj Phogat
anuj.phogat at gmail.com
Mon Sep 14 11:00:30 PDT 2015
On Fri, Sep 11, 2015 at 3:50 PM, Brian Paul <brianp at vmware.com> wrote:
> Instead of printing potentially a thousand error messages when
> there's a failure.
>
> Also, some minor code reformatting.
> ---
> tests/spec/arb_copy_image/formats.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_copy_image/formats.c
> b/tests/spec/arb_copy_image/formats.c
> index 787194b..eb0f314 100644
> --- a/tests/spec/arb_copy_image/formats.c
> +++ b/tests/spec/arb_copy_image/formats.c
> @@ -747,6 +747,7 @@ check_texture(GLuint texture, unsigned level,
> fprintf(stdout, ".\n");
>
> pass = false;
> + i = j = TEX_SIZE; /* exit loops upon error
> */
>
With this change, you should also remove 'passrate' computations
in the test.
> }
> }
> }
> @@ -803,7 +804,9 @@ run_test(struct texture_format *src_format, struct
> texture_format *dst_format)
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
> pass &= piglit_check_gl_error(GL_NO_ERROR);
> - if (!pass) goto cleanup;
> + if (!pass)
> + goto cleanup;
> +
> warn |= !check_texture(texture[0], src_level, src_format,
> src_data);
>
> dst_width = TEX_SIZE * dst_format->block_width;
> @@ -839,7 +842,9 @@ run_test(struct texture_format *src_format, struct
> texture_format *dst_format)
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
> glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
> pass &= piglit_check_gl_error(GL_NO_ERROR);
> - if (!pass) goto cleanup;
> + if (!pass)
> + goto cleanup;
> +
> warn |= !check_texture(texture[1], dst_level, dst_format,
> dst_data);
>
> glCopyImageSubData(texture[0], GL_TEXTURE_2D, src_level,
> --
> 1.9.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20150914/e60c80c3/attachment-0001.html>
More information about the Piglit
mailing list