[Piglit] [PATCH] fixed-oes_compressed_etc2_texture-miptree-failure

Ilia Mirkin imirkin at alum.mit.edu
Wed Apr 16 06:21:47 PDT 2014


On Wed, Apr 16, 2014 at 5:22 AM, Guo, Johney <Weijun.Guo at amd.com> wrote:
> Good ideal. Fixed it.

Did you?

$ git am --whitespace=fix ~/test-patch.txt

Looks like the email was base64-encoded, which preserved the
windows-style CR-LF newlines. This in turn doesn't apply without the
"--whitespace=fix" option. Normally the contents are just inline, and
the mail client implicitly converts to the platform's native
line-endings. Again, I highly recommend using "git send-email" :)
Otherwise people are stuck figuring this stuff out and are more likely
to just not apply your patches.

Now "git show" shows:

"""
commit e6b20f8f202eed98764248959b2e83d839c704b9
Author: Guo, Johney <Weijun.Guo at amd.com>
Date:   Wed Apr 16 09:18:16 2014 +0000

    fixed-oes_compressed_etc2_texture-miptree-failure

    From 4fd6692a1ec964dd85c1de6b236a671d35a89c3f Mon Sep 17 00:00:00 2001
    From: infi <infidragon at 163.com>
    Date: Wed, 16 Apr 2014 17:17:11 +0800
    Subject: [PATCH]    Fix oes_compressed_etc2_texture-miptree failures

       - glut config.window_width should be > 160 so as to avoid warning
         message.
       - fopen ktx texture file should be binary mode
       - viewport need be reset in each display, since it has changed in
         glut reshape() function
"""

This is wrong -- it grabbed the header-looking items from the body and
put them in the body (as I expected, but probably not as you
expected). The subject should be in... the subject. Not in the body.
Same for the 'From' (unless you're sending on someone's behalf, in
which case it should be the first line of the email body). And
definitely no good reason to include 'Date'.

>
> -----Original Message-----
> From: Piglit [mailto:piglit-bounces at lists.freedesktop.org] On Behalf Of Guo, Johney
> Sent: 2014年4月16日 17:18
> To: Ilia Mirkin
> Cc: piglit at lists.freedesktop.org
> Subject: [Piglit] [PATCH] fixed-oes_compressed_etc2_texture-miptree-failure
>
> From 4fd6692a1ec964dd85c1de6b236a671d35a89c3f Mon Sep 17 00:00:00 2001
> From: infi <infidragon at 163.com>
> Date: Wed, 16 Apr 2014 17:17:11 +0800
> Subject: [PATCH]    Fix oes_compressed_etc2_texture-miptree failures
>
>    - glut config.window_width should be > 160 so as to avoid warning
>      message.
>    - fopen ktx texture file should be binary mode
>    - viewport need be reset in each display, since it has changed in
>      glut reshape() function
> ---
>  tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c | 3 ++-
>  tests/util/piglit_ktx.c                                   | 4 ++--
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c
> index 59d8748..eeda3cb 100644
> --- a/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c
> +++ b/tests/spec/gles-3.0/oes_compressed_etc2_texture-miptree.c
> @@ -289,6 +289,7 @@ piglit_display(void)
>         bool pass = true;
>
>         glClear(GL_COLOR_BUFFER_BIT);
> +       glViewport(0, 0, window_width, window_height);
>         for (level = 0; level < num_levels; ++level) {
>                 glUniform2f(level_pixel_size_loc,
>                             (float) level_width,
> @@ -339,7 +340,7 @@ PIGLIT_GL_TEST_CONFIG_BEGIN
>
>         config.supports_gl_es_version = 30;
>
> -       config.window_width = 150;
> +       config.window_width = 160;
>         config.window_height = 150;
>         config.window_visual = PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_RGBA;  PIGLIT_GL_TEST_CONFIG_END diff --git a/tests/util/piglit_ktx.c b/tests/util/piglit_ktx.c index b60f737..d844540 100644
> --- a/tests/util/piglit_ktx.c
> +++ b/tests/util/piglit_ktx.c
> @@ -436,7 +436,7 @@ piglit_ktx_read_file(const char *filename)
>         if (self == NULL)
>                 goto out_of_memory;
>
> -       file = fopen(filename, "r");
> +       file = fopen(filename, "rb");
>         if (file == NULL)
>                 goto bad_open;
>
> @@ -521,7 +521,7 @@ piglit_ktx_write_file(struct piglit_ktx *self, const char *filename)
>         size_t size_written = 0;
>         bool ok = true;
>
> -       file = fopen(filename, "w");
> +       file = fopen(filename, "wb");
>         if (file == NULL)
>                 goto bad_open;
>
> --
> 1.8.4.msysgit.0
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list