[Piglit] [PATCH] arb_texture_multisample/sample-mask-execution: check for GL_MAX_SAMPLES >= 4

Ilia Mirkin imirkin at alum.mit.edu
Tue Jul 25 13:46:02 UTC 2017


Of course ARB_texture_multisample requires GL 3.x, which in turn
requires GL_MAX_SAMPLES >= 4... I suppose this helps cheating drivers
get cleaner results. Not a bad goal I guess, but perhaps good to note
somewhere?

On Tue, Jul 25, 2017 at 9:37 AM, Brian Paul <brianp at vmware.com> wrote:
> Skip the test if GL_MAX_SAMPLES<4 because we need 4x msaa to run this
> test.
>
> As is, if 4x MSAA is not supported, we get a bunch of FBO errors and then
> an unexpected GL_INVALID_OPERATION error which generates a piglit failure.
>
> v2: check for GL_MAX_SAMPLES >= 4 instead of non-zero.
> ---
>  tests/spec/arb_texture_multisample/sample-mask-execution.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/tests/spec/arb_texture_multisample/sample-mask-execution.c b/tests/spec/arb_texture_multisample/sample-mask-execution.c
> index 4605465..4c4ff9f 100644
> --- a/tests/spec/arb_texture_multisample/sample-mask-execution.c
> +++ b/tests/spec/arb_texture_multisample/sample-mask-execution.c
> @@ -103,9 +103,17 @@ void
>  piglit_init(int argc, char **argv)
>  {
>      bool use_multisample_texture = false;
> +    GLint max_samples;
>
>      piglit_require_extension("GL_ARB_texture_multisample");
>
> +    glGetIntegerv(GL_MAX_SAMPLES, &max_samples);
> +    if (max_samples < 4) {
> +       /* we need 4x msaa for this test */
> +       printf("GL_MAX_SAMPLES = %d, need 4\n", max_samples);
> +       piglit_report_result(PIGLIT_SKIP);
> +    }
> +
>      while (++argv,--argc) {
>          if (!strcmp(*argv, "-tex"))
>              use_multisample_texture = true;
> --
> 1.9.1
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list