[Piglit] [PATCH 03/16] namespace-pollution: Add glDrawPixels as an operation to test

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 6 19:26:31 PST 2016


On Wed, Jan 6, 2016 at 7:53 PM, Ian Romanick <idr at freedesktop.org> wrote:
> From: Ian Romanick <ian.d.romanick at intel.com>
>
> NOTE: The following tests fail on i965 (and presumably other drivers
> that use meta) on Mesa master and 11.1:
>
>     texture with gldrawpixels
>
> Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92363
> ---
>  tests/all.py                               |  2 +-
>  tests/general/object-namespace-pollution.c | 20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/tests/all.py b/tests/all.py
> index 88a3f36..44bbb05 100644
> --- a/tests/all.py
> +++ b/tests/all.py
> @@ -4609,7 +4609,7 @@ with profile.group_manager(
>          PiglitGLTest,
>          grouptools.join('object namespace pollution')) as g:
>      for object_type in ("buffer", "texture"):
> -        for operation in ("glBitmap", "glClear", "glGenerateMipmap"):
> +        for operation in ("glBitmap", "glClear", "glDrawPixels", "glGenerateMipmap"):
>              g(['object-namespace-pollution', operation, object_type],
>                '{} with {}'.format(object_type, operation))
>
> diff --git a/tests/general/object-namespace-pollution.c b/tests/general/object-namespace-pollution.c
> index c1c8b40..dd9bebd 100644
> --- a/tests/general/object-namespace-pollution.c
> +++ b/tests/general/object-namespace-pollution.c
> @@ -104,6 +104,7 @@
>  PIGLIT_GL_TEST_CONFIG_BEGIN
>
>         config.supports_gl_compat_version = 12;
> +       config.window_visual = PIGLIT_GL_VISUAL_RGB | PIGLIT_GL_VISUAL_DOUBLE | PIGLIT_GL_VISUAL_DEPTH | PIGLIT_GL_VISUAL_STENCIL;

May I suggest RGBA here instead of RGB? Either way, this patch is

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

>
>  PIGLIT_GL_TEST_CONFIG_END
>
> @@ -445,6 +446,24 @@ do_Clear(bool silent_skip)
>  }
>
>  static bool
> +do_DrawPixels(bool silent_skip)
> +{
> +       GLuint pixels[16 * 16];
> +
> +       /* glDrawPixels is always supported, so there is no opportunity to
> +        * skip.
> +        */
> +       (void) silent_skip;
> +
> +       memset(pixels, 0x81, sizeof(pixels));
> +       glDrawPixels(16, 16, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, pixels);
> +       glDrawPixels(16, 16, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, pixels);
> +       glDrawPixels(16, 16, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, pixels);
> +
> +       return piglit_check_gl_error(GL_NO_ERROR);
> +}
> +
> +static bool
>  do_GenerateMipmap(bool silent_skip)
>  {
>         const GLuint tex = FIRST_SPARE_OBJECT;
> @@ -484,6 +503,7 @@ static const struct {
>  } operations[] = {
>         { "glBitmap", do_Bitmap },
>         { "glClear", do_Clear },
> +       { "glDrawPixels", do_DrawPixels },
>         { "glGenerateMipmap", do_GenerateMipmap },
>  };
>
> --
> 2.5.0
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit


More information about the Piglit mailing list