[Piglit] [PATCH] glsl-fs-discard-mrt: New test for bug 75207

Emil Velikov emil.l.velikov at gmail.com
Thu Jul 9 08:44:54 PDT 2015


On 9 July 2015 at 06:36, Eric Anholt <eric at anholt.net> wrote:
> ---
>
> Here's another old test of mine, not *quite* as stale.
>
>  tests/all.py                        |   1 +
>  tests/shaders/CMakeLists.gl.txt     |   1 +
>  tests/shaders/glsl-fs-discard-mrt.c | 199 ++++++++++++++++++++++++++++++++++++
>  3 files changed, 201 insertions(+)
>  create mode 100644 tests/shaders/glsl-fs-discard-mrt.c
>
> diff --git a/tests/all.py b/tests/all.py
> index b85d2a2..abb73af 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -503,6 +503,7 @@ with profile.group_manager(PiglitGLTest, 'shaders') as g:
>      g(['glsl-fs-bug25902'])
>      g(['glsl-fs-color-matrix'])
>      g(['glsl-fs-discard-02'])
> +    g(['glsl-fs-discard-mrt'])
>      g(['glsl-fs-exp2'])
>      g(['glsl-fs-flat-color'])
>      g(['glsl-fs-fogcolor-statechange'])
> diff --git a/tests/shaders/CMakeLists.gl.txt b/tests/shaders/CMakeLists.gl.txt
> index 192debb..2e0d4fb 100644
> --- a/tests/shaders/CMakeLists.gl.txt
> +++ b/tests/shaders/CMakeLists.gl.txt
> @@ -133,6 +133,7 @@ piglit_add_executable (vpfp-generic vpfp-generic.cpp)
>  piglit_add_executable (vp-max-array vp-max-array.c)
>  piglit_add_executable (glsl-derivs glsl-derivs.c)
>  piglit_add_executable (glsl-fs-discard-02 glsl-fs-discard-02.c)
> +piglit_add_executable (glsl-fs-discard-mrt glsl-fs-discard-mrt.c)
>  piglit_add_executable (glsl-fwidth glsl-fwidth.c)
>  piglit_add_executable (glsl-lod-bias glsl-lod-bias.c)
>  piglit_add_executable (glsl-preprocessor-comments glsl-preprocessor-comments.c)
> diff --git a/tests/shaders/glsl-fs-discard-mrt.c b/tests/shaders/glsl-fs-discard-mrt.c
> new file mode 100644
> index 0000000..ca4e7d7
> --- /dev/null
> +++ b/tests/shaders/glsl-fs-discard-mrt.c
> @@ -0,0 +1,199 @@
> +/*
> + * Copyright © 2014 Intel Corporation
> + *
> + * Permission is hereby granted, free of charge, to any person obtaining a
> + * copy of this software and associated documentation files (the "Software"),
> + * to deal in the Software without restriction, including without limitation
> + * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> + * and/or sell copies of the Software, and to permit persons to whom the
> + * Software is furnished to do so, subject to the following conditions:
> + *
> + * The above copyright notice and this permission notice (including the next
> + * paragraph) shall be included in all copies or substantial portions of the
> + * Software.
> + *
> + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> + * IN THE SOFTWARE.
> + *
> + */
> +
> +/** @file glsl-fs-discard-mrt.c
> + *
> + * Tests that discarding fragments works correctly when rendering to
> + * multiple render targets.
> + */
> +
> +#include "piglit-util-gl.h"
> +
> +#define TEX_W 64
> +#define TEX_H 64
> +#define STRIPE_SIZE 25
> +
> +PIGLIT_GL_TEST_CONFIG_BEGIN
> +
> +       config.supports_gl_compat_version = 10;
> +
> +       config.window_visual = PIGLIT_GL_VISUAL_RGBA | PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_DEPTH;
> +
> +       config.window_width = TEX_W * 2 + 60;
> +       config.window_height = TEX_H + 40;
> +
With the window dimensions below 160x160 the test will be picky on
Windows. I don't use/test such platforms but we could be kind to Brian
& Jose and increase the width/height ?

-Emil


More information about the Piglit mailing list