On Fri, Jun 15, 2012 at 8:32 AM, Paul Berry <stereotype...@gmail.com> wrote:
> The switch statement in visualize_image() wasn't properly handling
> formats whose base internal format is GL_RED or GL_RG.  As a result,
> tests of these formats showed up as a black screen.  This patch addes
> switch cases to handle the formats properly.
> ---
>  tests/spec/ext_framebuffer_multisample/formats.cpp |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/tests/spec/ext_framebuffer_multisample/formats.cpp 
> b/tests/spec/ext_framebuffer_multisample/formats.cpp
> index b8e8352..d1e03e5 100644
> --- a/tests/spec/ext_framebuffer_multisample/formats.cpp
> +++ b/tests/spec/ext_framebuffer_multisample/formats.cpp
> @@ -359,9 +359,13 @@ visualize_image(float *img, GLenum base_internal_format, 
> bool rhs)
>                                a = pixel[3];
>                                /* Fall through */
>                        case GL_RGB:
> -                               r = pixel[0];
> -                               g = pixel[1];
>                                b = pixel[2];
> +                               /* Fall through */
> +                       case GL_RG:
> +                               g = pixel[1];
> +                               /* Fall through */
> +                       case GL_RED:
> +                               r = pixel[0];
>                                break;
>                        case GL_LUMINANCE_ALPHA:
>                                a = pixel[1];
> --
> 1.7.7.6
>
> _______________________________________________
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit

Reviewed-by: Anuj Phogat <anuj.pho...@gmail.com>
_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to