[Piglit] [PATCH 06/20] fbo: Remove test_desc::base.

Anuj Phogat anuj.phogat at gmail.com
Wed Jun 6 11:14:57 PDT 2012


On Tue, Jun 5, 2012 at 5:03 PM, Paul Berry <stereotype441 at gmail.com> wrote:
> The field test_desc::base is no longer used.  This patch removes it
> and simplifies the type signatures of the functions that previously
> used it.
> ---
>  tests/fbo/fbo-alphatest-formats.c                  |    2 +-
>  tests/fbo/fbo-blending-formats.c                   |    2 +-
>  tests/fbo/fbo-clear-formats.c                      |    2 +-
>  tests/fbo/fbo-formats.h                            |   14 +++-----------
>  tests/fbo/fbo-generatemipmap-formats.c             |    8 ++++----
>  .../get-renderbuffer-internalformat.c              |    2 +-
>  6 files changed, 11 insertions(+), 19 deletions(-)
>
> diff --git a/tests/fbo/fbo-alphatest-formats.c b/tests/fbo/fbo-alphatest-formats.c
> index ca6c1ec..3718d7b 100644
> --- a/tests/fbo/fbo-alphatest-formats.c
> +++ b/tests/fbo/fbo-alphatest-formats.c
> @@ -52,7 +52,7 @@ static void alphatest(const float *rect, float alpha, GLenum func, float ref)
>        glColor4f(1, 1, 1, 1);
>  }
>
> -static enum piglit_result test_format(const struct format_desc *format, GLenum baseformat)
> +static enum piglit_result test_format(const struct format_desc *format)
>  {
>        GLboolean pass = GL_TRUE;
>        GLuint tex, fb;
> diff --git a/tests/fbo/fbo-blending-formats.c b/tests/fbo/fbo-blending-formats.c
> index fc6a0e6..c7e5abb 100644
> --- a/tests/fbo/fbo-blending-formats.c
> +++ b/tests/fbo/fbo-blending-formats.c
> @@ -56,7 +56,7 @@ static void blend(const float *rect, const float *src, const float *dst, const f
>                                                  a >= 0.333 ? 0.333f : 0.0f) : \
>         (a))
>
> -static enum piglit_result test_format(const struct format_desc *format, GLenum baseformat)
> +static enum piglit_result test_format(const struct format_desc *format)
>  {
>        GLboolean pass = GL_TRUE;
>        GLuint tex, fb;
> diff --git a/tests/fbo/fbo-clear-formats.c b/tests/fbo/fbo-clear-formats.c
> index da975dc..046a8da 100644
> --- a/tests/fbo/fbo-clear-formats.c
> +++ b/tests/fbo/fbo-clear-formats.c
> @@ -398,7 +398,7 @@ test_mipmap_drawing(int x, int y, int dim, int level, GLuint internalformat)
>  }
>
>  static enum piglit_result
> -test_format(const struct format_desc *format, GLenum baseformat)
> +test_format(const struct format_desc *format)
>  {
>        int dim;
>        GLuint tex;
> diff --git a/tests/fbo/fbo-formats.h b/tests/fbo/fbo-formats.h
> index 52c42d8..ceec8c5 100644
> --- a/tests/fbo/fbo-formats.h
> +++ b/tests/fbo/fbo-formats.h
> @@ -302,7 +302,6 @@ struct test_desc {
>        const char *param;
>        GLenum basetype;
>        const char *ext[3];
> -       GLenum base;
>  };
>
>  static const struct test_desc test_sets[] = {
> @@ -341,7 +340,6 @@ static const struct test_desc test_sets[] = {
>                "GL_ARB_depth_texture",
>                GL_UNSIGNED_NORMALIZED,
>                {"GL_ARB_depth_texture"},
> -               GL_DEPTH_COMPONENT,
>        },
>        {
>                ext_packed_depth_stencil,
> @@ -349,7 +347,6 @@ static const struct test_desc test_sets[] = {
>                "GL_EXT_packed_depth_stencil",
>                GL_UNSIGNED_NORMALIZED,
>                {"GL_EXT_packed_depth_stencil"},
> -               GL_DEPTH_STENCIL,
>        },
>        {
>                ext_texture_srgb,
> @@ -417,9 +414,6 @@ static const struct test_desc test_sets[] = {
>                "GL_ARB_depth_buffer_float",
>                GL_FLOAT,
>                {"GL_ARB_depth_buffer_float"},
> -               /* XXX this extension consists of both DEPTH_COMPONENT and
> -                * DEPTH_STENCIL formats. */
> -               GL_DEPTH_COMPONENT,
>        },
>        {
>                ext_texture_compression_rgtc,
> @@ -606,7 +600,7 @@ static void add_result(bool *all_skip, enum piglit_result *end_result,
>                *end_result = new_result;
>  }
>
> -typedef enum piglit_result (*test_func)(const struct format_desc *format, GLenum baseformat);
> +typedef enum piglit_result (*test_func)(const struct format_desc *format);
>
>  static enum piglit_result fbo_formats_display(test_func test_format)
>  {
> @@ -620,13 +614,11 @@ static enum piglit_result fbo_formats_display(test_func test_format)
>
>        if (piglit_automatic) {
>                for (i = 0; i < test_set->num_formats; i++) {
> -                       result = test_format(&test_set->format[i],
> -                                            test_set->base);
> +                       result = test_format(&test_set->format[i]);
>                        add_result(&all_skip, &end_result, result);
>                }
>        } else {
> -               result = test_format(&test_sets[test_index].format[format_index],
> -                                    test_sets[test_index].base);
> +               result = test_format(&test_sets[test_index].format[format_index]);
>                add_result(&all_skip, &end_result, result);
>        }
>
> diff --git a/tests/fbo/fbo-generatemipmap-formats.c b/tests/fbo/fbo-generatemipmap-formats.c
> index 92b3276..874ff33 100644
> --- a/tests/fbo/fbo-generatemipmap-formats.c
> +++ b/tests/fbo/fbo-generatemipmap-formats.c
> @@ -403,7 +403,7 @@ test_mipmap_drawing(int x, int y, int level, GLuint internalformat)
>  }
>
>  static GLboolean
> -test_format(const struct format_desc *format, GLenum baseformat, GLenum basetype)
> +test_format(const struct format_desc *format, GLenum basetype)
>  {
>        GLuint tex;
>        int x;
> @@ -445,19 +445,19 @@ piglit_display(void)
>        if (piglit_automatic) {
>                for (i = 0; i < test_set->num_formats; i++) {
>                        pass = test_format(&test_set->format[i],
> -                                          test_set->base, test_set->basetype) && pass;
> +                                          test_set->basetype) && pass;
>                }
>                if (piglit_is_extension_supported("GL_ARB_texture_non_power_of_two")) {
>                        set_npot(GL_TRUE);
>                        for (i = 0; i < test_set->num_formats; i++) {
>                                pass = test_format(&test_set->format[i],
> -                                                  test_set->base, test_set->basetype) && pass;
> +                                                  test_set->basetype) && pass;
>                        }
>                        set_npot(GL_FALSE);
>                }
>        } else {
>                pass = test_format(&test_sets[test_index].format[format_index],
> -                                  test_sets[test_index].base, test_sets[test_index].basetype);
> +                                  test_sets[test_index].basetype);
>        }
>
>        glutSwapBuffers();
> diff --git a/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c b/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c
> index 28e9a3c..6185e6d 100644
> --- a/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c
> +++ b/tests/spec/arb_framebuffer_object/get-renderbuffer-internalformat.c
> @@ -44,7 +44,7 @@ piglit_display()
>  }
>
>  static enum piglit_result
> -test_format(const struct format_desc *format, GLenum baseformat)
> +test_format(const struct format_desc *format)
>  {
>        GLuint rb;
>        GLint internalformat;
> --
> 1.7.7.6
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <anuj.phogat at gmail.com>


More information about the Piglit mailing list