On 02/01/2018 11:17 AM, Brian Paul wrote:
> Seems overkill to write a brand new test just for this so add it to
> the existing invalid-formats.c test.
> 
> See Bugzilla https://bugs.freedesktop.org/show_bug.cgi?id=104908

I think there are some tools that look for the format:

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104908

Looking at the bug report, it looks like this should reproduce the error.

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

> ---
>  .../spec/arb_texture_compression/invalid-formats.c | 26 
> ++++++++++++++++++++++
>  1 file changed, 26 insertions(+)
> 
> diff --git a/tests/spec/arb_texture_compression/invalid-formats.c 
> b/tests/spec/arb_texture_compression/invalid-formats.c
> index a201f8f..cca35cc 100644
> --- a/tests/spec/arb_texture_compression/invalid-formats.c
> +++ b/tests/spec/arb_texture_compression/invalid-formats.c
> @@ -412,6 +412,30 @@ try_formats(const struct format_list *t, GLenum 
> *compressed_formats,
>       return pass;
>  }
>  
> +
> +static bool
> +test_hint(void)
> +{
> +     GLint hint = 0;
> +     glGetIntegerv(GL_TEXTURE_COMPRESSION_HINT, &hint);
> +     if (hint != GL_DONT_CARE) {
> +             printf("Unexpected default GL_TEXTURE_COMPRESSION_HINT"
> +                    " value: %s\n", piglit_get_gl_enum_name(hint));
> +             return false;
> +     }
> +
> +     glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST);
> +     glGetIntegerv(GL_TEXTURE_COMPRESSION_HINT, &hint);
> +     if (hint != GL_NICEST) {
> +             printf("Unexpected GL_TEXTURE_COMPRESSION_HINT"
> +                    " value: %s\n", piglit_get_gl_enum_name(hint));
> +             return false;
> +     }
> +
> +     return true;
> +}
> +
> +
>  void
>  piglit_init(int argc, char **argv)
>  {
> @@ -593,5 +617,7 @@ piglit_init(int argc, char **argv)
>               }
>       }
>  
> +     pass = test_hint() && pass;
> +
>       piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);
>  }
> 

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to