[Piglit] [PATCH 1/2] glsl-fs-discard-mrt: Check that we have 2 draw buffers before testing.

Ilia Mirkin imirkin at alum.mit.edu
Sat Apr 16 02:13:50 UTC 2016


On Fri, Apr 15, 2016 at 9:40 PM, Eric Anholt <eric at anholt.net> wrote:
> Fixes later failure on vc4.
> ---
>  tests/shaders/glsl-fs-discard-mrt.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/tests/shaders/glsl-fs-discard-mrt.c b/tests/shaders/glsl-fs-discard-mrt.c
> index ca4e7d7e8fbc..8447cf270b96 100644
> --- a/tests/shaders/glsl-fs-discard-mrt.c
> +++ b/tests/shaders/glsl-fs-discard-mrt.c
> @@ -192,8 +192,16 @@ piglit_display(void)
>  void
>  piglit_init(int argc, char **argv)
>  {
> +       GLint max_buffers;
> +
>         piglit_require_GLSL();
>         piglit_require_extension("GL_ARB_explicit_attrib_location");
>         piglit_require_extension("GL_EXT_framebuffer_object");
> +
> +       glGetIntegerv(GL_MAX_DRAW_BUFFERS, &max_buffers);
> +       if (max_buffers == 1) {

I'd kinda prefer < 2, but I realize that 0 is unlikely to be returned as well...

Either way,

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> +               fprintf(stderr, "Test requires 2 draw buffers\n");
> +               piglit_report_result(PIGLIT_SKIP);
> +       }
>  }
>
> --
> 2.8.0.rc3
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list