Reviewed-by: Iago Toral Quiroga <ito...@igalia.com> On Tue, 2015-06-16 at 11:15 -0700, Anuj Phogat wrote: > Signed-off-by: Anuj Phogat <anuj.pho...@gmail.com> > --- > src/mesa/drivers/common/meta.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c > index 6108d98..e123500 100644 > --- a/src/mesa/drivers/common/meta.c > +++ b/src/mesa/drivers/common/meta.c > @@ -3137,11 +3137,8 @@ decompress_texture_image(struct gl_context *ctx, > /* If we're reading back an RGB(A) texture (using glGetTexImage) as > * luminance then we need to return L=tex(R). > */ > - ((baseTexFormat == GL_RGBA || > - baseTexFormat == GL_RGB || > - baseTexFormat == GL_RG) && > - (destBaseFormat == GL_LUMINANCE || > - destBaseFormat == GL_LUMINANCE_ALPHA))) { > + _mesa_need_rgb_to_luminance_conversion(baseTexFormat, > + destBaseFormat)) { > /* Green and blue must be zero */ > _mesa_PixelTransferf(GL_GREEN_SCALE, 0.0f); > _mesa_PixelTransferf(GL_BLUE_SCALE, 0.0f);
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev