<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 3:36 PM, Nanley Chery <span dir="ltr"><<a href="mailto:nanleychery@gmail.com" target="_blank">nanleychery@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5">On Mon, Aug 01, 2016 at 03:16:17PM -0700, Anuj Phogat wrote:<br>
> Cc: Nanley Chery <<a href="mailto:nanley.g.chery@intel.com">nanley.g.chery@intel.com</a>><br>
> Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
> ---<br>
>  .../khr_compressed_astc-sliced-3d-miptree.c        | 39 +++++++++++-----------<br>
>  1 file changed, 19 insertions(+), 20 deletions(-)<br>
><br>
> diff --git a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c<br>
> index d833bac..cb884e9 100644<br>
> --- a/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c<br>
> +++ b/tests/spec/khr_texture_compression_astc/khr_compressed_astc-sliced-3d-miptree.c<br>
> @@ -216,10 +216,6 @@ bool draw_compare_levels(bool check_error,<br>
>                       y += h;<br>
>       }<br>
><br>
> -     /* Delete bound textures */<br>
> -     glDeleteTextures(1, &compressed_tex);<br>
> -     glDeleteTextures(1, &decompressed_tex);<br>
> -<br>
>       piglit_present_results();<br>
>       return result;<br>
>  }<br>
> @@ -279,23 +275,21 @@ test_miptrees(void* input_type)<br>
>               piglit_set_tolerance_for_bits(8, 8, 8, 8);<br>
><br>
>       for ( ; block_dims < ARRAY_SIZE(block_dim_str); block_dims++) {<br>
> +             /* Texture objects. */<br>
> +             GLuint tex_compressed = 0;<br>
> +             GLuint tex_decompressed = 0;<br>
> +<br>
> +             /* Load texture for current submode and block size */<br>
> +             load_texture("compressed/SLICED3D", tests[subtest],<br>
> +                             block_dim_str[block_dims],<br>
> +                             &tex_compressed);<br>
> +             if (!check_error) {<br>
> +                     load_texture("decompressed/SLICED3D",<br>
> +                                  tests[subtest],<br>
> +                                  block_dim_str[block_dims],<br>
> +                                  &tex_decompressed);<br>
> +             }<br>
>               for (slice = 0 ; slice < LEVEL0_DEPTH; slice++) {<br>
> -<br>
> -                     /* Texture objects. */<br>
> -                     GLuint tex_compressed = 0;<br>
> -                     GLuint tex_decompressed = 0;<br>
> -<br>
> -                     /* Load texture for current submode and block size */<br>
> -                     load_texture("compressed/SLICED3D", tests[subtest],<br>
> -                                     block_dim_str[block_dims],<br>
> -                                     &tex_compressed);<br>
> -                     if (!check_error) {<br>
> -                             load_texture("decompressed/SLICED3D",<br>
> -                                          tests[subtest],<br>
> -                                          block_dim_str[block_dims],<br>
> -                                          &tex_decompressed);<br>
> -                     }<br>
> -<br>
>                       /* Draw and compare each level of the two textures */<br>
>                       glClear(GL_COLOR_BUFFER_BIT);<br>
>                       if (!draw_compare_levels(check_error,<br>
> @@ -311,6 +305,11 @@ test_miptrees(void* input_type)<br>
>                               return PIGLIT_FAIL;<br>
>                       }<br>
>               }<br>
> +             /* Delete bound textures */<br>
> +             glDeleteTextures(1, &tex_compressed);<br>
> +             if (!check_error)<br>
> +                     glDeleteTextures(1, &tex_decompressed);<br>
> +<br>
<br>
</div></div>This patch does more than the commit title says. I think you should<br>
mention the purpose of this (and the related) hunk or leave it out.<br>
<br></blockquote><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">Earlier the test was calling the load_texture() for each slice and deleting</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">the created textures inside the slice 'for' loop (in draw_compare_levels()).</div></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">If we want to avoid reloading </div><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">the </div><span style="font-family:verdana,sans-serif">textures for each slice, <div class="gmail_default" style="display:inline">​we've to take the</div></span></div><div><span style="font-family:verdana,sans-serif">glDeleteTextures</span><div class="gmail_default" style="font-family:verdana,sans-serif;display:inline">​() calls out of </div><span style="font-family:verdana,sans-serif">slice 'for' loop.​<div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">​ I can update the commit</div></span></div><div><span style="font-family:verdana,sans-serif"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">message​ with above details.</div></span></div><div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;display:inline">​</div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
- Nanley<br>
<span class="gmail-"><br>
>               block_dims++;<br>
>       }<br>
>       return PIGLIT_PASS;<br>
> --<br>
> 2.5.5<br>
><br>
</span>> _______________________________________________<br>
> Piglit mailing list<br>
> <a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/piglit" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</blockquote></div><br></div></div>