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

Ilia Mirkin imirkin at alum.mit.edu
Wed Jan 6 19:27:32 PST 2016


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

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 glcopypixels
>
> 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 44bbb05..4ffe824 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", "glDrawPixels", "glGenerateMipmap"):
> +        for operation in ("glBitmap", "glClear", "glCopyPixels", "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 dd9bebd..973f997 100644
> --- a/tests/general/object-namespace-pollution.c
> +++ b/tests/general/object-namespace-pollution.c
> @@ -446,6 +446,25 @@ do_Clear(bool silent_skip)
>  }
>
>  static bool
> +do_CopyPixels(bool silent_skip)
> +{
> +       /* glCopyPixels is always supported, so there is no opportunity to
> +        * skip.
> +        */
> +       (void) silent_skip;
> +
> +       /* Set non-1.0 pixel zoom to avoid i965 blit path. */
> +       glPixelZoom(1.5f, 1.5f);
> +
> +       glRasterPos2f(0.5, 0.5);
> +       glCopyPixels(0, 0, 4, 4, GL_COLOR);
> +
> +       glPixelZoom(1.0f, 1.0f);
> +
> +       return piglit_check_gl_error(GL_NO_ERROR);
> +}
> +
> +static bool
>  do_DrawPixels(bool silent_skip)
>  {
>         GLuint pixels[16 * 16];
> @@ -503,6 +522,7 @@ static const struct {
>  } operations[] = {
>         { "glBitmap", do_Bitmap },
>         { "glClear", do_Clear },
> +       { "glCopyPixels", do_CopyPixels },
>         { "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