[Piglit] [PATCH 12/16] msaa/formats: Fix visualization of RED and RG formats
Anuj Phogat
anuj.phogat at gmail.com
Fri Jun 22 12:47:23 PDT 2012
On Fri, Jun 15, 2012 at 8:32 AM, Paul Berry <stereotype441 at 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 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