[Piglit] [PATCH 01/20] util: Generalize piglit_probe_image_{rgb, rgba}

Marek Olšák maraeo at gmail.com
Wed Jun 6 06:27:24 PDT 2012


Hi Paul, this patch is:

Acked-by: Marek Olšák <maraeo at gmail.com>

Marek

On Wed, Jun 6, 2012 at 2:03 AM, Paul Berry <stereotype441 at gmail.com> wrote:
> This patch eliminates code duplication between
> piglit_probe_image_rgb() and piglit_probe_image_rgba() by implementing
> them both in terms of a common function, piglit_probe_image_color().
> In addition to being able to test GL_RGB and GL_RGBA,
> piglit_probe_image_color() should be able to test any color buffer
> format (e.g. GL_RG or GL_LUMINANCE_ALPHA).
>
> piglit_probe_image_color() makes use of a new function,
> piglit_num_components(), to determine how many components a given base
> internal format contains (e.g. piglit_num_components(GL_RGBA) == 4).
> This function is exposed through piglit-util.h in case it can be
> useful in writing tests.
> ---
>  tests/util/piglit-util-gl.c |  113 ++++++++++++++++++++++++++++---------------
>  tests/util/piglit-util.h    |    2 +
>  2 files changed, 76 insertions(+), 39 deletions(-)


More information about the Piglit mailing list