On Mon, Aug 01, 2016 at 03:16:15PM -0700, Anuj Phogat wrote:

Patches 2 and 5 are,
Reviewed-by: Nanley Chery <[email protected]>

> Cc: Nanley Chery <[email protected]>
> Signed-off-by: Anuj Phogat <[email protected]>
> ---
>  .../khr_compressed_astc-sliced-3d-miptree.c        | 37 
> ++++++++++------------
>  1 file changed, 17 insertions(+), 20 deletions(-)
> 
> 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
> index 53f0529..29ecc8b 100644
> --- 
> 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
> @@ -170,14 +170,14 @@ bool draw_compare_levels(bool check_error,
>  
>       unsigned y = 0;
>       unsigned x = 0;
> -     bool pass = true;
> +     bool result = true;
>       int level = 0;
>  
>       for (; level < NUM_LEVELS; ++level) {
>               int w = LEVEL0_WIDTH >> level;
>               int h = LEVEL0_HEIGHT >> level;
>               int d = LEVEL0_DEPTH >> level;
> -             pass = true;
> +             bool pass = true;
>               glUniform2f(level_pixel_size_loc, (float) w, (float) h);
>               glUniform1f(slice_loc, slice);
>               glUniform1f(depth_loc, d);
> @@ -187,27 +187,24 @@ bool draw_compare_levels(bool check_error,
>               glUniform2f(pixel_offset_loc, x, y);
>               glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_VERTICES);
>  
> -             /* Draw miplevel of decompressed texture. */
> -             if (!check_error) {
> +             /* Check the textures (or error-colors) for equivalence. */
> +             if (check_error) {
> +                     pass = piglit_probe_rect_rgba(x, y, w, h,
> +                                                   error_color);
> +             } else {
> +                     /* Draw miplevel of decompressed texture. */
>                       glBindTexture(GL_TEXTURE_3D, decompressed_tex);
>                       glUniform2f(pixel_offset_loc, LEVEL0_WIDTH + x, y);
>                       glDrawArrays(GL_TRIANGLE_FAN, 0, NUM_VERTICES);
> -             }
> -
> -             /* Check the textures (or error-colors) for equivalence. */
> -             if (pass) {
> -                     if (check_error) {
> -                             pass = piglit_probe_rect_rgba(x, y, w, h,
> -                                                           error_color);
> -                     } else {
> -                             pass = piglit_probe_rects_equal(x, y,
> -                                                     LEVEL0_WIDTH + x, y,
> -                                                     w, h, GL_RGBA);
> -                     }
>  
> -                     if (!pass)
> -                             piglit_loge("Slice: %d, Miplevel: %d",
> -                                         slice, level);
> +                     pass = piglit_probe_rects_equal(x, y,
> +                                             LEVEL0_WIDTH + x, y,
> +                                             w, h, GL_RGBA);
> +             }
> +             if (!pass) {
> +                     piglit_loge("Slice: %d, Miplevel: %d",
> +                                 slice, level);
> +                     result = false;
>               }
>  
>               /* Update the next miplevel arrangement */
> @@ -222,7 +219,7 @@ bool draw_compare_levels(bool check_error,
>       glDeleteTextures(1, &decompressed_tex);
>  
>       piglit_present_results();
> -     return pass;
> +     return result;
>  }
>  
>  enum piglit_result
> -- 
> 2.5.5
> 
> _______________________________________________
> Piglit mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/piglit
_______________________________________________
Piglit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to